compare-elim.c (struct comparison): Add not_in_a field.
[official-gcc.git] / gcc / ChangeLog
blob98038718e7d31d18789bac5830538983692ddbd0
1 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
3         * compare-elim.c (struct comparison): Add not_in_a field.
4         (is_not): New static function.
5         (strip_not): Likewise.
6         (conforming_compare): Handle a NOT in the first operand.
7         (can_eliminate_compare): Likewise.
8         (find_comparison_dom_walker::before_dom_children): Likewise.
9         (try_eliminate_compare): Likewise.
10         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
11         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
13 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
15         * doc/extend.texi (Common Type Attributes): Fix typos.
17 2018-11-19  Martin Liska  <mliska@suse.cz>
19         PR gcov-profile/88045
20         * coverage.c (coverage_begin_function): Add assert.
22 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
24         PR other/40498
25         * doc/extend.texi (Common Function Attributes): Document that
26         no_instrument_function applies to -p and -pg, too.
27         * doc/invoke.texi (Instrumentation Options): Add cross-references
28         to docs for -p, -pg, and -finstrument-functions.
30 2018-11-18  Alan Modra  <amodra@gmail.com>
32         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
33         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
34         (GNU_USER_TARGET_CRTN): Define.
35         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
36         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
38 2018-11-18  Alan Modra  <amodra@gmail.com>
40         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
41         !HAVE_LD_PIE variant.
42         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
44 2018-11-17  Nick Clifton  <nickc@redhat.com>
45             Sandra Loosemore  <sandra@codesourcery.com>
47         PR driver/31357
48         * doc/invoke.texi (Overall Options): Document that --help and
49         --help=<value> options cannot be combined.
51 2018-11-17  Jim Wilson  <jimw@sifive.com>
53         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
54         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
55         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
56         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
57         to step2 if frame_pointer_needed and step1 is 0.
59 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
61         PR c++/4225
62         * doc/cpp.texi (System Headers): Add note about implicit
63         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
65 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
67         PR c++/4025
68         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
69         -fno-implicit-templates.
71 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
73         PR tree-optimization/87546
74         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
75         min_precision variable, initially set it to orig_precision, only does
76         something if op_type's precision is <= min_precision and update
77         min_precision whenever calling set_op.
79 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
81         PR ipa/87957
82         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
84 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
86         * doc/invoke.texi (Option Summary): Fix whitespace and line
87         breaks in @gccoptlist environments.
88         (Warning Options): Likewise.
89         (Optimize Options): Likewise.
90         (PowerPC SPE Options): Likewise.
91         (RS/6000 and PowerPC Options): Likewise.
93 2018-11-16  Jeff Law  <law@redhat.com>
95         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
96         gcc_assert.
98 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
100         PR middle-end/23197
101         * doc/invoke.texi (Optimize Options): Update options enabled by
102         fprofile-generate, -fprofile-use, and -fauto-profile.
104 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
106         PR target/87927
107         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
108         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
109         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
110         the byte_op hook.
111         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
112         * targhooks.c (default_print_patchable_function_entry): Assert
113         asm_int_op does not return a NULL string.
114         * varasm.c (integer_asm_op): Return the op for a partial int type
115         when the requested size does not correspond to an integer type.
116         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
117         * doc/tm.texi: Regenerate.
119 2018-11-12  Jason Merrill  <jason@redhat.com>
121         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
123 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
125         * config/rs6000/constraints.md (wF constraint): Remove power9
126         fusion documentation.  Just document wF's use for power8 fusion.
127         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
128         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
129         fusion support to require the upper 12 bits to be all 0's or all
130         1's.
131         (fusion_gpr_mem_load): Add comment.
132         (fusion_addis_mem_combo_load): Remove power9 fusion support.
133         (fusion_addis_mem_combo_store): Delete.
134         (fusion_offsettable_mem_operand): Delete.
135         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
136         power8 fusion here.
137         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
138         (POWERPC_MASKS): Delete power9 fusion.
139         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
140         (fusion_p9_p): Delete.
141         (expand_fusion_p9_load): Delete.
142         (expand_fusion_p9_store): Delete.
143         (emit_fusion_p9_load): Delete.
144         (emit_fusion_p9_store): Delete.
145         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
146         fusion support.
147         (rs6000_option_override_internal): Set power8 fusion based on
148         whether we are tuning for power8.  Delete power9 fusion support.
149         (rs6000_opt_masks): Delete -mpower9-fusion switch.
150         (emit_fusion_load): Rename emit_fusion_load_store to
151         emit_fusion_load, and drop fusion store support.  Update callers.
152         (emit_fusion_load_store): Likewise.
153         (emit_fusion_gpr_load): Likewise.
154         (fusion_p9_p): Delete.
155         (expand_fusion_p9_load): Delete.
156         (expand_fusion_p9_store): Delete.
157         (emit_fusion_p9_load): Delete.
158         (emit_fusion_p9_store): Delete.
159         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
160         (GPR_FUSION): Delete.
161         (FPR_FUSION): Delete.
162         (power9 fusion peephole2s): Delete.
163         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
164         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
165         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
166         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
167         (fusion_p9_<mode>_constant): Delete.
168         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
169         power9 fusion switch.
170         * doc/md.texi (PowerPC constraints): Update wF constraint
171         documentation for power8 fusion only.
173 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
175         PR rtl-optimization/87475
176         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
177         CROSSING_JUMP_P insns.
178         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
180 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
182         PR target/88051
183         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
184         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
185         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
187 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
189         PR middle-end/88032
190         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
191         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
193 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
195         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
196         location_t parameter.
197         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
198         (switch_decision_tree::do_jump_if_equal): Likewise.
199         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
200         of switch statement to emit_case_nodes.
201         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
202         set it on the newly built GIMPLE comparison statement.
203         (switch_decision_tree::do_jump_if_equal): Likewise.
204         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
205         in calls to do_jump_if_equal as well as recursive calls.
207 2018-11-16  Andi Kleen  <ak@linux.intel.com>
209         * config/i386/i386.md: Allow memory operands to ptwrite.
211 2018-11-16  Michael Matz  <matz@suse.de>
213         * system.h (PRsa): New macro.
214         (SIZE_AMOUNT): Cast number to uint64_t.
215         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
216         (pool_usage::dump_footer): Likewise and also use PRIu64.
217         * bitmap.h (bitmap_usage::dump): Likewise.
218         * ggc-common.c (ggc_usage::dump): Likewise.
219         * ggc-page.c (ggc_print_statistics): Likewise.
220         * input.c (dump_line_table_statistics): Likewise.
221         * mem-stats.h (mem_usage::dump): Likewise.
222         (mem_usage::dump_footer): Likewise.
223         * rtl.c (dump_rtx_statistics): Likewise.
224         * tree-cfg.c (dump_cfg_stats): Likewise.
225         * tree-dfa.c (dump_dfa_stats): Likewise.
226         * tree-phinodes.c (phinodes_print_statistics): Likewise.
227         * tree-ssanames (ssanames_print_statistics): Likewise.
228         * vec.c (vec_usage::dump): Likewise.
229         (vec_usage::dump_footer): Likewise.
231 2018-11-16  Richard Biener  <rguenther@suse.de>
233         PR tree-optimization/88011
234         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
235         replacing set_value_range_to_undefined and
236         set_value_range_to_varying with method calls.
238 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
240         * config/s390/s390.md
241         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
242         assembler.
243         (*r<noxa>sbg_<mode>_sll): Likewise.
244         (*r<noxa>sbg_<mode>_srl): Likewise.
245         (*r<noxa>sbg_sidi_srl): New pattern.
247 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
249         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
250         Default to TARGET_VXWORKS_RTP.
251         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
252         of TARGET_VXWORKS_RTP.
253         * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
254         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
255         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
257 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
259         PR c++/25759
260         * doc/extend.texi (Common Type Attributes): Make it explicit
261         that attribute "packed" can apply to C++ classes.
263 2018-11-15  Martin Sebor  <msebor@redhat.com>
265         PR c++/87541
266         PR c++/87542
267         * tree.c (type_argument_type): New function.
268         * tree.h (type_argument_type): Declare it.
269         * gcc/doc/extend.texi (alloc_align): Update and clarify.
270         (alloc_size, nonnull, sentinel): Same.
272 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
273             Kwok Cheung Yeung  <kcy@codesourcery.com>
275         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
276         int_mode_for_size fails.
277         (vectorizable_load): Likewise.
279 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
281         * doc/ux.texi (Group logically-related diagnostics): Move
282         discussion of auto_diagnostic_group into this new subsection.
283         Give an example of where this grouping is used.
285 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
287         PR other/19165
288         * Makefile.in (OBJS): Move json.o to...
289         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
290         * common.opt (fdiagnostics-format=): New option.
291         (diagnostics_output_format): New enum.
292         * diagnostic-format-json.cc: New file.
293         * diagnostic.c (default_diagnostic_final_cb): New function, taken
294         from start of diagnostic_finish.
295         (diagnostic_initialize): Initialize final_cb to
296         default_diagnostic_final_cb.
297         (diagnostic_finish): Move "being treated as errors" messages to
298         default_diagnostic_final_cb.  Call any final_cb.
299         (default_diagnostic_finalizer): Add diagnostic_t param.
300         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
301         diagnostic_finalizer callback.
302         * diagnostic.h (enum diagnostics_output_format): New enum.
303         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
304         (struct diagnostic_context): Add "final_cb".
305         (default_diagnostic_finalizer): Add diagnostic_t param.
306         (diagnostic_output_format_init): New decl.
307         * doc/invoke.texi (-fdiagnostics-format): New option.
308         * dwarf2out.c (gen_producer_string): Ignore
309         OPT_fdiagnostics_format_.
310         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
311         * lto-wrapper.c (append_diag_options): Ignore it.
312         * opts.c (common_handle_option): Handle it.
314 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
316         PR tree-optimization/88015
317         * graphite-isl-ast-to-gimple.c
318         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
319         for dump_enabled_p.
320         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
322 2018-11-15  Richard Biener  <rguenther@suse.de>
324         PR middle-end/88029
325         * gimple.c (gimple_call_flags): Union flags from decl, type
326         and call fntype.
327         * trans-mem.c (is_tm_pure_call): Simplify.
329 2018-11-15  Richard Biener  <rguenther@suse.de>
331         PR tree-optimization/88031
332         * tree-vect-loop.c (vectorizable_reduction): Move check
333         for multiple types earlier so we get the expected dump.
334         Simplify calls to vectorizable_condition.
335         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
336         * tree-vect-stmts.c (vectorizable_condition): Instead of
337         reduc_def and reduc_index take just a flag.  Simplify
338         code-generation now that we can rely on the defs being set up.
339         (vectorizable_comparison): Remove unused argument.
341 2018-11-15  Richard Biener  <rguenther@suse.de>
343         PR tree-optimization/88030
344         * tree-complex.c (need_eh_cleanup): New global.
345         (update_complex_assignment): Mark blocks that need EH update.
346         (expand_complex_comparison): Likewise.
347         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
348         perform EH cleanup and schedule CFG cleanup if that did anything.
350 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
352         PR rtl-optimization/88018
353         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
354         on the presence of fallthru edge, rather than if it is a USE or not.
356 2018-11-15  Richard Biener  <rguenther@suse.de>
358         PR middle-end/87917
359         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
360         analyze_subscript_affine_affine properly.
362 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
364         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
365         (GLIBC_DYNAMIC_LINKER): Define.
366         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
368 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
370         PR tree-optimization/84648
371         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
372         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
373         by calling adjust_cond_for_loop_until_wrap.
375 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
377         PR other/56334
378         * doc/extend.texi (Common Function Attributes): Clarify linker
379         restrictions on "aligned" attribute.
380         (Common Variable Attributes): Likewise.  Mention that linker
381         restrictions don't apply to stack-allocated variables.
383 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
385         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
386         as an lvalue.
388 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
390         PR lto/55102
391         PR lto/56700
392         * doc/invoke.texi (Optimize Options): Remove bad example about
393         interaction between -flto and -O.  Replace it with a note that
394         you need to compile with -O and not just link.  Copy-edit -flto
395         discussion to reduce verbiage and improve flow.
397 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
399         PR middle-end/59658
400         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
401         also suppress many optimizations.  Alphabetize option lists for
402         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
403         correct documentation for those options to say that.
404         * opts.c (default_options_table): Sort table by level and option
405         name, to make it easier to correlate to the manual.
407 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
409         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
410         printing of the names of segment registers.
412 2018-11-14  Nathan Sidwell  <nathan@acm.org>
414         PR debug/88006
415         PR debug/87462
416         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
417         type list.
419 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
421         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
423 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
425         P1236R1 - Signed integers are two's complement
426         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
428         PR bootstrap/86739
429         * hash-map.h (hash_map::iterator::reference_pair): New class.
430         (hash_map::iterator::operator*): Return it rather than std::pair.
432 2018-11-14  Jeff Law  <law@redhat.com>
434         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
435         iff the operand is a constant.
437 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
439         * gimple-ssa-evrp-analyze.c
440         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
441         ignore_equivs_equal_p to equal_p.
442         * ipa-cp.c (meet_with_1): Use equal_p instead of
443         ignore_equivs_equal_p.
444         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
445         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
446         (value_range::operator==): Remove.
447         (value_range::operator!=): Remove.
448         (vrp_prop::visit_stmt): Use equal_p.
449         * tree-vrp.h (value_range): Remove operator==, operator!=,
450         ignore_equivs_equal_p.
451         * vr-values.c (update_value_range): Use equal_p.
453 2018-11-14  Michael Matz  <matz@suse.de>
455         PR middle-end/86575
456         * gimplify.c (collect_fallthrough_labels): Add new argument,
457         return location via that, don't modify statements.
458         (warn_implicit_fallthrough_r): Adjust call, don't use
459         statement location directly.
461 2018-11-14  Richard Biener  <rguenther@suse.de>
463         PR middle-end/87985
464         * tree-data-ref.c (split_constant_offset): Add wrapper
465         allocating a cache hash-map.
466         (split_constant_offset_1): Cache results of expanding
467         expressions from SSA def stmts.
469 2018-11-14  Richard Biener  <rguenther@suse.de>
471         PR middle-end/88021
472         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
473         to lambda_int.
474         (lambda_vector_mult_const): Likewise.
475         (lambda_matrix_right_hermite): Use lambda_int temporaries.
477 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
478             Jackson Woodruff  <jackson.woodruff@arm.com>
480         PR 71026/tree-optimization
481         * match.pd: Simplify floating point comparisons.
483 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
485         PR rtl-optimization/87817
486         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
487         last argument has low 8 bits clear, fold to 0.
489 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
491         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
492         MAX_OFILE_ALIGNMENT as needed.
494 2018-11-14  Richard Biener  <rguenther@suse.de>
496         PR tree-optimization/88019
497         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
498         COND_EXPR arguments to non-trapping overflow.
500 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
502         * config/arc/arc.h (reg_class): Reorder registers classes, remove
503         unused register classes.
504         (REG_CLASS_NAMES): Likewise.
505         (REG_CLASS_CONTENTS): Likewise.
506         (FIXED_REGISTERS): Make lp_count fixed.
507         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
508         (PROGRAM_COUNTER_REGNO): Remove.
509         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
510         register classes, use constants for register numbers, remove
511         reg_class_contents references.
512         (arc_process_double_reg_moves): Add asserts.
513         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
514         lra_in_progress predicate.
515         (arc_init_reg_tables): Remove unused register classes.
516         (arc_register_move_cost): Likewise.
517         (arc_preferred_reload_class): Likewise.
518         (hwloop_optimize): Update rtx patterns involving lp_count register.
519         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
520         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
521         CHEAP_CORE_REGS.  Former one will be used for LRA.
522         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
523         one will be used for LRA.
524         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
525         one will be used for LRA.
526         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
527         Former one will be used for LRA.
528         ("f"): Delete constraint.
529         ("k"): Likewise.
530         ("e"): Likewise.
531         ("l"): Change it from register constraint to constraint.
532         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
533         (movhi_insn): Likewise.
534         (movsi_insn): Update pattern.
535         (arc_lp): Likewise.
536         (dbnz): Likewise.
537         (stack_tie): Remove 'b' constraint letter.
538         (R4_REG): Define.
539         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
540         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
541         (R57_REG, R59_REG, PCL_REG): Likewise.
542         (ILINK1_REGNUM): Renamed to ILINK1_REG.
543         (ILINK2_REGNUM): Renamed to ILINK2_REG.
544         (Rgp): Remove.
545         (SP_REGS): Likewise.
546         (Rcw): Remove unused reg classes.
547         * config/arc/predicates.md (dest_reg_operand): Just default on
548         register_operand predicate.
549         (mpy_dest_reg_operand): Likewise.
550         (move_dest_operand): Use macros instead of constants.
551         * config/arc/arc.opt (mlra): Switch to lra as default.
553 2018-11-14  Richard Biener  <rguenther@suse.de>
555         PR tree-optimization/87974
556         * tree-vect-loop.c (vectorizable_reduction): When computing
557         the vectorized reduction PHI vector type ignore constant
558         and external defs.
560 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
562         PR tree-optimization/87977
563         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
564         stmt, build a new one and replace the old one with it.  Formatting fix.
565         Call release_ssa_name (x) if !has_other_use and !delete_div.
566         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
567         verify lhs of stmt is still def.
569 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
571         PR rtl-optimization/87507
572         * lower-subreg.c (operand_for_swap_move_operator): New function.
573         (simple_move): Strip simple operators.
574         (find_pseudo_copy): Likewise.
575         (resolve_operand_for_swap_move_operator): New function.
576         (resolve_simple_move): Strip simple operators and swap operands.
578 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
580         PR tree-optimization/87898
581         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
582         (ipa_simd_modify_function_body): Remove debug stmts where the first
583         argument was changed into a non-decl.
585 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
587         PR rtl-optimization/87899
588         * lra-lives.c (start_living): Update white space in comment.
589         (enum point_type): New.
590         (sparseset_contains_pseudos_p): New function.
591         (update_pseudo_point): Likewise.
592         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
593         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
594         handling.  Move early exit after adding conflicts.
595         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
596         if regno is already live.  Remove all handling of program points.
597         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
598         after adding conflicts.  Remove all handling of program points and
599         ignore_reg_for_conflicts.
600         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
601         and do not guard call to mark_pseudo_live.
602         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
603         and do not guard call to mark_pseudo_dead.
604         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
605         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
606         Use new function update_pseudo_point.  Handle register copies by
607         removing the source register from the live set.  Handle INOUT operands.
608         Update to the next program point using the unused_set, dead_set and
609         start_dying sets.
610         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
612 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
614         * builtins.c: Replace "source_location" with "location_t".
615         * diagnostic-show-locus.c: Likewise.
616         * diagnostic.c: Likewise.
617         * dumpfile.c: Likewise.
618         * gcc-rich-location.h: Likewise.
619         * genmatch.c: Likewise.
620         * gimple.h: Likewise.
621         * gimplify.c: Likewise.
622         * input.c: Likewise.
623         * input.h: Likewise.  Eliminate the typedef.
624         * omp-expand.c: Likewise.
625         * selftest.h: Likewise.
626         * substring-locations.h (get_source_location_for_substring):
627         Rename to...
628         (get_location_within_string): ...this.
629         * tree-cfg.c: Replace "source_location" with "location_t".
630         * tree-cfgcleanup.c: Likewise.
631         * tree-diagnostic.c: Likewise.
632         * tree-into-ssa.c: Likewise.
633         * tree-outof-ssa.c: Likewise.
634         * tree-parloops.c: Likewise.
635         * tree-phinodes.c: Likewise.
636         * tree-phinodes.h: Likewise.
637         * tree-ssa-loop-ivopts.c: Likewise.
638         * tree-ssa-loop-manip.c: Likewise.
639         * tree-ssa-phiopt.c: Likewise.
640         * tree-ssa-phiprop.c: Likewise.
641         * tree-ssa-threadupdate.c: Likewise.
642         * tree-ssa.c: Likewise.
643         * tree-ssa.h: Likewise.
644         * tree-vect-loop-manip.c: Likewise.
646 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
648         * doc/extend.texi: Fix typo in the weakref description.
650 2018-11-13  Richard Biener  <rguenther@suse.de>
652         PR tree-optimization/86991
653         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
654         group building until we have successfully detected the SLP
655         reduction.
656         (vect_is_simple_reduction): Remove fixup code here.
658 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
660         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
661         (dump_gimple_stmt): Use it.
662         (dump_gimple_stmt_loc): Likewise.
663         (dump_gimple_expr): Likewise.
664         (dump_gimple_expr_loc): Likewise.
665         (dump_generic_expr): Likewise.
666         (dump_generic_expr_loc): Likewise.
667         (dump_printf): Likewise.
668         (dump_printf_loc): Likewise.
669         (dump_dec): Likewise.
670         (dump_dec): Likewise.
671         (dump_hex): Likewise.
672         (dump_symtab_node): Likewise.
673         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
674         Guard dump call with dump_enabled_p.
675         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
676         * graphite-optimize-isl.c (optimize_isl): Likewise.
677         * graphite.c (graphite_transform_loops): Likewise.
678         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
679         * tree-parloops.c (parallelize_loops): Likewise.
680         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
681         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
682         (vect_prune_runtime_alias_test_list): Likewise.
683         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
684         (vect_estimate_min_profitable_iters): Likewise.
685         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
686         (vect_build_slp_tree_2): Likewise.
687         (vect_supported_load_permutation_p): Likewise.
688         (vect_slp_analyze_operations): Likewise.
689         (vect_slp_analyze_bb_1): Likewise.
690         (vect_slp_bb): Likewise.
691         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
692         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
693         (pass_slp_vectorize::execute): Likewise.
694         (increase_alignment): Likewise.
696 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
698         PR ipa/87955
699         * ipa-inline.c (report_inline_failed_reason): Guard calls to
700         cl_target_option_print_diff and cl_optimization_print_diff with
701         if (dump_file).
703 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
705         * doc/invoke.texi (-fsave-optimization-record): Note that the
706         output is compressed.
707         * optinfo-emit-json.cc: Include <zlib.h>.
708         (optrecord_json_writer::write): Compress the output.
710 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
712         * tree-vrp.c (value_range_base::dump): Dump type.
713         Do not use INF nomenclature for 1-bit types.
714         (dump_value_range): Group all variants to common dumping code.
715         (debug): New overloaded functions for value_ranges.
716         (value_range_base::dump): Remove no argument version.
717         (value_range::dump): Same.
719 2018-11-13  Richard Biener  <rguenther@suse.de>
721         PR tree-optimization/87931
722         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
723         nested cycles we support to latch computations vectorizable_reduction
724         handles.
726 2018-11-13  Martin Liska  <mliska@suse.cz>
728         PR tree-optimization/87885
729         * cfghooks.c (account_profile_record): Rename
730         to ...
731         (profile_record_check_consistency): ... this.
732         Calculate missing num_mismatched_freq_in.
733         (profile_record_account_profile): New function
734         that calculates time and size of a function.
735         * cfghooks.h (struct profile_record): Remove
736         all tuples.
737         (struct cfg_hooks): Remove after_pass flag.
738         (account_profile_record): Rename to ...
739         (profile_record_check_consistency): ... this.
740         (profile_record_account_profile): New.
741         * cfgrtl.c (rtl_account_profile_record): Remove
742         after_pass flag.
743         * passes.c (check_profile_consistency): Do only
744         checking.
745         (account_profile): Calculate size and time of
746         function only.
747         (pass_manager::dump_profile_report): Reformat
748         output.
749         (execute_one_ipa_transform_pass): Call
750         consistency check before clean upand call account_profile
751         after a clean up is done.
752         (execute_one_pass): Call check_profile_consistency and
753         account_profile instead of using after_pass flag..
754         * tree-cfg.c (gimple_account_profile_record): Likewise.
756 2018-11-13  Martin Liska  <mliska@suse.cz>
758         PR sanitizer/87930
759         * config/i386/i386.c (ix86_option_override_internal): Error
760         about usage -mabi=ms and -fsanitize={,kernel-}address.
762 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
764         * config/aarch64/aarch64.c
765         (aarch64_vectorize_preferred_vector_alignment): Change return type to
766         poly_uint64.
767         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
768         alignment being a poly int.
769         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
770         return type to poly_uint64.
771         * target.def (default_preferred_vector_alignment): Likewise.
772         * targhooks.c (default_preferred_vector_alignment): Likewise.
773         * targhooks.h (default_preferred_vector_alignment): Likewise.
774         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
775         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
776         poly int.
777         (vect_update_misalignment_for_peel): Likewise.
778         (vect_enhance_data_refs_alignment): Likewise.
779         (vect_find_same_alignment_drs): Likewise.
780         (vect_duplicate_ssa_name_ptr_info): Likewise.
781         (vect_setup_realignment): Likewise.
782         (vect_can_force_dr_alignment_p): Change alignment parameter type to
783         poly_uint64.
784         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
785         mask with a compile time variable vector alignment.
786         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
787         int.
788         (vect_do_peeling): Exit early if vector alignment is not constant.
789         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
790         a poly int.
791         (vectorizable_store): Likewise.
792         (vectorizable_load): Likweise.
793         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
794         poly_uint64.
795         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
796         poly int.
797         (vect_can_force_dr_alignment_p): Change alignment parameter type to
798         poly_uint64.
800 2018-11-13  Richard Biener  <rguenther@suse.de>
802         PR tree-optimization/87962
803         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
804         detect outer reduction for disqualifying in-loop uses.
806 2018-11-13  Richard Biener  <rguenther@suse.de>
808         PR tree-optimization/87967
809         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
810         for constants for the scalar loop.
812 2018-11-13  Alan Modra  <amodra@gmail.com>
814         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
815         integer constants when -mcmodel=medium.
817 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
819         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
820         * config/arc/elf.h (PROFILE_HOOK): Define.
821         * config/arc/linux.h (PROFILE_HOOK): Likewise.
823 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
825         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
826         jump table data in the text section.
828 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
830         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
831         to fit the eh_return pattern.
832         * config/arc/arc.md (eh_return): Define.
833         (VUNSPEC_ARC_EH_RETURN): Likewise.
834         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
835         new implementation.
836         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
839 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
841         * common/config/arc/arc-common.c (arc_option_optimization_table):
842         Millicode optimization is default on for size optimizations.
843         * config/arc/arc-protos.h (arc_check_multi): New function.
844         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
845         (ENTER_LEAVE_START_REG): Define.
846         (ENTER_LEAVE_END_REG): Likewise.
847         (arc_override_options): Disable millicode when long calls option
848         is on.
849         (arc_frame_info): Change it from int to bool.
850         (arc_compute_frame_size): Clean up.
851         (arc_save_restore): Remove.
852         (frame_save_reg): New function.
853         (frame_restore_reg): Likewise.
854         (arc_enter_leave_p): Likewise.
855         (arc_save_callee_saves): Likewise.
856         (arc_restore_callee_saves): Likewise.
857         (arc_save_callee_enter): Likewise.
858         (arc_restore_callee_leave): Likewise.
859         (arc_save_callee_milli): Likewise.
860         (arc_restore_callee_milli): Likewise.
861         (arc_expand_prologue): Reimplement to emit enter/leave
862         instructions.
863         (arc_expand_epilogue): Likewise.
864         (arc_check_multi): New function.
865         * config/arc/arc.md (push_multi_fp): New pattern.
866         (push_multi_fp_blink): Likewise.
867         (pop_multi_fp): Likewise.
868         (pop_multi_fp_blink): Likewise.
869         (pop_multi_fp_ret): Likewise.
870         (pop_multi_fp_blink_ret): Likewise.
871         * config/arc/arc.opt (mmillicode): Update option.
872         (mcode-density-frame): New option.
873         * config/arc/predicates.md (push_multi_operand): New predicate.
874         (pop_multi_operand): Likewise.
875         * doc/invoke.texi (ARC): Update ARC options information.
878 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
880         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
881         * config/arc/arc.c (operands_ok_ldd_std): New function.
882         (mem_ok_for_ldd_std): Likewise.
883         (gen_operands_ldd_std): Likewise.
884         * config/arc/arc.md: Add peephole2 rules for std/ldd.
886 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
888         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
889         test on stack_usage_file.
890         (lang_dependent_init): Do not open the .su file if generating LTO.
892 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
894         PR rtl-optimization/87918
895         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
896         simplify_gen_relational rather than simplify_gen_binary.
898 2018-11-13  Richard Biener  <rguenther@suse.de>
900         * tree-ssanames.h (set_range_info): Use value_range_base.
901         (get_range_info): Likewise.
902         * tree-ssanames.c (set_range_info): Likewise.
903         (get_range_info): Likewise.
904         * tree-vrp.c (value_range_base::union_helper): Split
905         out common parts of value_range[_base]::union_.
906         (value_range_base::union_): Update.
907         (value_range::union_): Likewise.
908         (determine_value_range_1): Use value_range_base.
909         (determine_value_range): Likewise.
910         * tree-vrp.h (value_range_base::union_helper): Move ...
911         (value_range::union_helper): ... from here.
913 2018-11-13  Alan Modra  <amodra@gmail.com>
915         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
916         offset for PRE_DEC.
917         (rs6000_secondary_reload_gpr): Don't call find_replacement.
919 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
921         PR middle-end/59634
922         * doc/invoke.texi (Optimize Options): Clarify that the
923         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
924         apply to data cache size.
926 2018-11-13  Alan Modra  <amodra@gmail.com>
928         * config/rs6000/predicates.md (logical_const_operand),
929         (logical_operand): Correct comment.
930         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
932 2018-11-13  Alan Modra  <amodra@gmail.com>
934         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
936 2018-11-13  Alan Modra  <amodra@gmail.com>
938         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
939         description.
940         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
941         covered by alternative.
942         (movcc_internal1): Ignore h for register preference.
943         (mov<mode>_hardfloat64): Likewise.
944         (mov<mode>_softfloat): Ignore c, l, h for register preference.
946 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
948         PR preprocessor/47823
949         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
950         documentation to...
951         (Pragmas): ...here.
952         * doc/extend.texi (Pragmas): Note additional pragmas documented
953         in the CPP manual.
955 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
957         PR middle-end/86677
958         PR middle-end/87528
959         * tree-scalar-evolution.c (expression_expensive_p): Make
960         BUILTIN POPCOUNT as expensive when backend does not define it.
962 2018-11-12  Fredrik Noring  <noring@nocrew.org>
964         * config.gcc: Update with-llsc defaults for MIPS r5900.
966 2018-11-12  Martin Liska  <mliska@suse.cz>
968         PR gcov-profile/87442
969         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
970         options.
971         * doc/invoke.texi: Document them.
972         * tree-profile.c (parse_profile_filter): New.
973         (parse_profile_file_filtering): Likewise.
974         (release_profile_file_filtering): Likewise.
975         (include_source_file_for_profile): Likewise.
976         (tree_profiling): Filter source files based on the
977         newly added options.
979 2018-11-12  Martin Liska  <mliska@suse.cz>
981         PR target/87903
982         * doc/extend.texi: Add missing values for __builtin_cpu_is and
983         __builtin_cpu_supports for x86 target.
985 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
987         PR middle-end/21110
988         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
989         have to be Pmode.
990         (Arithmetic): Likewise for "lo_sum".
992 2018-11-12  Renlin Li  <renlin.li@arm.com>
994         PR target/87815
995         * dse.c (get_stored_val): Add check for compile-time constantness
996         of gap.
998 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
1000         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
1001         (ARMv8_5a): New fgroup.
1002         (armv8.5-a): New arch.
1003         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
1004         sb and predres.
1005         * config/arm/arm-tables.opt: Regenerate.
1006         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
1007         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
1008         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
1009         Add matching rules for -march=armv8.5-a and extensions.
1010         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
1011         Add sb and predres to all armv8-a except armv8.5-a.
1013 2018-11-12  Richard Biener  <rguenther@suse.de>
1015         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
1016         overload for single value.
1017         (value_range[_base]::set_nonnull): New.
1018         (value_range[_base]::set_null): Likewise.
1019         (value_range): Document bitmap copying behavior, mark
1020         copy constructor and assignment operator deleted.
1021         (value_range::move): New.
1022         (value_range::set_and_canonicalize): Default bitmap to zero.
1023         (set_value_range_to_nonnull): Remove.
1024         (set_value_range_to_null): Likewise.
1025         (set_value_range): Likewise.
1026         (set_value_range_to_value): Likewise.
1027         (extract_range_from_unary_expr): Work on value_range_base.
1028         (extract_range_from_binary_expr_1): Likewise.  Rename to...
1029         (extract_range_from_binary_expr): ... this.
1030         * tree-vrp.c (value_range::update): Clear equiv bitmap
1031         if required.
1032         (value_range::move): New, move equiv bitmap.
1033         (value_range_base::set_undefined): Avoid assignment.
1034         (value_range::set_undefined): Likewise.
1035         (value_range_base::set_varying): Likewise.
1036         (value_range::set_varying): Likewise.
1037         (set_value_range): Remove.
1038         (value_range_base::set): New overload for value.
1039         (value_range::set): Likewise.
1040         (set_value_range_to_nonnull): Remove.
1041         (value_range_base::set_nonnull): New.
1042         (value_range::set_nonnull): Likewise.
1043         (set_value_range_to_null): Remove.
1044         (value_range_base::set_null): New.
1045         (value_range::set_null): Likewise.
1046         (range_is_null): Work on value_range_base.
1047         (range_is_nonnull): Likewise.
1048         (ranges_from_anti_range): Likewise.
1049         (extract_range_into_wide_ints): Likewise.
1050         (extract_range_from_multiplicative_op): Likewise.
1051         (extract_range_from_binary_expr): Likewise.  Update for API changes.
1052         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
1053         handling.
1054         (value_range::intersect_helper): Avoid copy and assignment.
1055         (value_range::union_helper): Likewise.
1056         (determine_value_range_1): Adjust.
1057         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1058         Avoid assignment by using move.
1059         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
1060         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1061         Likewise.
1062         * tree-ssanames.c (get_range_info): Likewise.
1063         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1064         * vr-values.c (vr_values::get_value_range): Adjust.
1065         (vr_values::update_value_range): Likewise.
1066         (symbolic_range_based_on_p): Work on value_range_base.
1067         (vr_values::extract_range_from_binary_expr): Use value_range_base.
1068         (vr_values::extract_range_from_unary_expr): Likewise.
1069         (vr_values::extract_range_from_cond_expr): Avoid assignment.
1070         (vr_values::extract_range_from_comparison): Adjust.
1071         (vr_values::check_for_binary_op_overflow): Use value_range_base.
1072         (vr_values::extract_range_basic): Adjust.
1073         (vr_values::adjust_range_with_scev): Likewise.
1074         (vr_values::vrp_visit_assignment_or_call): Likewise.
1075         (vr_values::get_vr_for_comparison): Change API to avoid
1076         assignment and copy construction.
1077         (vr_values::compare_name_with_value): Adjust accordingly.
1078         (vr_values::compare_names): Likewise.
1079         (vr_values::extract_range_from_phi_node): Avoid assignment and
1080         bogus in-place modify of equiv bitmap.
1081         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1082         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1083         for extract_range_from_unary_expr API change.
1084         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1086 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
1088         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1090 2018-11-12  Richard Biener  <rguenther@suse.de>
1092         * tree-vrp.h (value_range_base::symbolic_p,
1093         value_range_base::constant_p, value_range_base::zero_p,
1094         value_range_base::singleton_p): Move from value_range.
1095         (value_range::dump): Add.
1096         * gimple-ssa-evrp-analyze.c
1097         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1098         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1099         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1100         Use set_varying.
1101         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1102         (value_range::constant_p): Likewise.
1103         (value_range::singleton_p): Likewise.
1104         (value_range_base::dump): Add.
1105         (set_value_range_to_undefined): Remove.
1106         (set_value_range_to_varying): Likewise.
1107         (range_int_cst_p): Take value_range_base argument.
1108         (range_int_cst_singleton_p): Likewise.
1109         (value_range_constant_singleton): Likewise.
1110         (vrp_set_zero_nonzero_bits): Likewise.
1111         (extract_range_from_multiplicative_op): Use set_varying.
1112         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1113         (extract_range_from_unary_expr): Likewise.
1114         (dump_value_range_base): Change to overload of dump_value_range.
1115         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1116         (vrp_prop::visit_stmt): Likewise.
1117         (value_range::intersect_helper): Likewise.
1118         (value_range::union_helper): Likewise.
1119         (determine_value_range_1): Likewise.
1121 2018-11-12  Richard Biener  <rguenther@suse.de>
1123         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1124         (set_value_range_to_null): Likewise.
1125         * vr-values.c (vr_values::extract_range_from_comparison):
1126         Clear equiv for constant singleton ranges.
1128 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1130         * config/i386/sse.md: Combine VFIXUPIMM* patterns
1131         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1132         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1133         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1134         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1135         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1136         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1138 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
1140         PR c/69502
1141         * doc/extend.texi (Common Type Attributes): For the align type
1142         attribute, copy language about decreasing alignment from the
1143         corresponding variable attribute.
1145 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1147         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1148         -frounding-math.
1150 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
1152         PR c++/43105
1153         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1154         -frtti and -fno-rtti code.
1156 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
1158         PR c/26366
1159         * doc/extend.texi (Other Builtins): Document probability associated
1160         with __builtin_expect.
1162 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
1164         PR target/87928
1165         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1166         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1167         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1168         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1170 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1172         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1174 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1176         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1178 2018-11-11  Richard Biener  <rguenther@suse.de>
1180         * tree-vrp.h (class value_range_base): New base class for
1181         value_range containing all but the m_equiv member.
1182         (dump_value_range_base): Add.
1183         (range_includes_zero_p): Work on value_range_base.
1184         * tree-vrp.c (value_range_base::set): Split out base handling
1185         from...
1186         (value_range::set): this.
1187         (value_range::set_equiv): New.
1188         (value_range_base::value_range_base): New constructors.
1189         (value_range_base::check): Split out base handling from...
1190         (value_range::check): this.
1191         (value_range::equal_p): Refactor in terms of
1192         ignore_equivs_equal_p which is now member of the base.
1193         (value_range_base::set_undefined): New.
1194         (value_range_base::set_varying): Likewise.
1195         (value_range_base::dump):Split out base handling from...
1196         (value_range::dump): this.
1197         (value_range_base::set_and_canonicalize): Split out base handling
1198         from...
1199         (value_range::set_and_canonicalize): this.
1200         (value_range_base::union_): New.
1201         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1202         for m_vr.
1203         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1204         instead of value_range everywhere.
1205         (ipcp_vr_lattice::print): Use dump_value_range_base.
1206         (ipcp_vr_lattice::meet_with): Adjust.
1207         (ipcp_vr_lattice::meet_with_1): Likewise.
1208         (ipa_vr_operation_and_type_effects): Likewise.
1209         (propagate_vr_across_jump_function): Likewise.
1210         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1211         (ipa_get_value_range): Likewise.
1212         (ipa_set_jfunc_vr): Likewise.
1213         (ipa_compute_jump_functions_for_edge): Likewise.
1215 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
1217         PR middle-end/65703
1218         * doc/invoke.texi (Optimize Options): Add @opindex entries
1219         for the positive forms of -fno-xxx and -mno-xxx options
1220         that were lacking them.
1222 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
1224         * combine.c (make_more_copies): Only make an intermediate copy if the
1225         dest of a move is a pseudo.
1227 2018-11-09  Maya Rashish  <coypu@sdf.org>
1229         PR target/87221
1230         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1231         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1233 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
1235         PR driver/41179
1236         PR middle-end/65703
1237         * doc/invoke.texi (Optimize Options): Clarify default behavior
1238         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
1240 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1242         PR tree-optimization/87940
1243         * expr.c (string_constant): Don't strip NOPS in subexpressions.
1244         Fold PLUS_EXPR correctly.
1246 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
1248         PR target/87762
1249         * config/s390/s390.c (s390_safe_relative_long_p): New function.
1250         (annotate_constant_pool_refs): Skip insns which support
1251         relative addressing.
1252         (annotate_constant_pool_refs_1): New helper function.
1253         (find_constant_pool_ref): Skip insns which support relative
1254         addression.
1255         (find_constant_pool_ref_1): New helper function.
1256         (replace_constant_pool_ref): Skip insns which support
1257         relative addressing.
1258         (replace_constant_pool_ref_1): New helper function.
1259         (s390_mainpool_start): Adapt to the new signature.
1260         (s390_mainpool_finish): Likewise.
1261         (s390_chunkify_start): Likewise.
1262         (s390_chunkify_finish): Likewise.
1263         (pass_s390_early_mach::execute): Likewise.
1264         (s390_prologue_plus_offset): Likewise.
1265         (s390_emit_prologue): Likewise.
1266         (s390_emit_epilogue): Likewise.
1268 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
1270         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
1271         but unsupported lastprivate with conditional modifier.
1273 2018-11-09  Jeff Law  <law@redhat.com>
1275         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
1276         unused argument better.  Add gcc_unreachable to silence warning.
1278 2018-11-09  Martin Sebor  <msebor@redhat.com>
1280         PR middle-end/81824
1281         * attribs.c (has_attribute): New helper function.
1282         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
1283         * attribs.h (decls_mismatched_attributes): Declare.
1284         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
1285         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
1286         * common.opt (-Wattribute-alias): Take an argument.
1287         (-Wno-attribute-alias): New option.
1288         * doc/extend.texi (Common Function Attributes): Document copy.
1289         (Common Variable Attributes): Same.
1290         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
1291         (-Wattribute-alias): Document new option argument.
1293 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
1295         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
1296         matching criteria.  Remove unused array initializer.
1298 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
1299             Jinsong Ji  <jji@us.ibm.com>
1301         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
1302         constraints by introducing a new temporary.
1303         (_mm_cvtss_si64): Likewise.
1305 2018-11-09  Martin Liska  <mliska@suse.cz>
1307         * common.opt: Add -fipa-stack-alignment flag.
1308         * doc/invoke.texi: Document it.
1309         * final.c (rest_of_clean_state): Guard stack
1310         shrinking with flag.
1312 2018-11-09  Martin Liska  <mliska@suse.cz>
1314         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
1315         to ...
1316         (ipa_discover_variable_flags): ... this.
1317         * common.opt: Come up with new flag -fipa-reference-addressable.
1318         * doc/invoke.texi: Document it.
1319         * ipa-reference.c (propagate): Call the renamed fn.
1320         * ipa-visibility.c (whole_program_function_and_variable_visibility):
1321         Likewise.
1322         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
1323         ...
1324         (ipa_discover_variable_flags): ... this.  Discover
1325         non-addressable variables only with the newly added flag.
1326         * opts.c: Enable the newly added flag with -O1 and higher
1327         optimization level.
1329 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
1331         * json.cc (selftest::test_writing_literals): Fix comment.
1333 2018-11-09  Martin Liska  <mliska@suse.cz>
1335         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
1336         string to a stack buffer.
1337         (aarch64_parse_cpu): Likewise.
1338         (aarch64_parse_tune): Likewise.
1340 2018-11-09  Richard Biener  <rguenther@suse.de>
1342         PR tree-optimization/87953
1343         * tree-vect-loop.c (vectorizable_reduction): For analysis
1344         always pass ops[0] to vectorizable_condition.
1346 2018-11-09  Stafford Horne  <shorne@gmail.com>
1347             Richard Henderson  <rth@twiddle.net>
1348             Joel Sherrill  <joel@rtems.org>
1350         * common/config/or1k/or1k-common.c: New file.
1351         * config/or1k/*: New.
1352         * config.gcc (or1k*-*-*): New.
1353         * configure.ac (or1k*-*-*): New test for openrisc tls.
1354         * configure: Regenerated.
1355         * doc/install.texi: Document OpenRISC triplets.
1356         * doc/invoke.texi: Document OpenRISC arguments.
1357         * doc/md.texi: Document OpenRISC.
1359 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
1361         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
1362         (arm7tdmi-s): Delete CPU.
1363         (arm710t): Add aliases for arm720t and arm740t.
1364         (arm720t, arm740t): Delete CPUs.
1365         (arm920t): Add aliases for arm920, arm922t and arm940t.
1366         (arm920, arm922t, arm940t): Delete CPUs.
1367         (arm10tdmi): Add alias for arm1020t.
1368         (arm1020t): Delete CPU.
1369         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
1370         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
1371         (arm10e): Add aliases for arm1020e and arm1022e.
1372         (arm1020e, arm1022e): Delete CPU.
1373         * config/arm/arm.md (generic_sched): Remove entries that are now
1374         handled by aliases.
1375         (generic_vfp): Likewise.
1376         * config/arm/arm1020e.md: Simplify tuning selection based on alias
1377         changes.
1378         * config/arm/arm-tune.md: Regenerated.
1379         * config/arm/arm-tables.opt: Regenerated.
1381 2018-11-09  Richard Biener  <rguenther@suse.de>
1383         PR tree-optimization/87621
1384         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
1385         op with only phi inputs.
1386         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
1387         (ch_base::copy_headers): Run CSE on copied loop headers.
1388         (pass_ch_vect::process_loop_p): Simplify.
1390 2018-11-09  Alexandre Oliva <oliva@adacore.com>
1392         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
1393         for non-w64 x86_64 biarch.
1395 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
1397         PR rtl-optimization/86438
1398         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
1399         of in_b for the compare if in_b is SET_DEST.
1401         PR target/87793
1402         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
1403         non-toplevel UNSPEC.
1405 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1407         * tree-vrp.c (value_range::check): Do not access internals
1408         directly.
1409         (value_range::singleton_p): Same.
1410         (value_range::type): Same.
1411         (vrp_finalize): Use value_range API.
1413 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1415         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
1417 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1419         * vr-values.c (vr_values::get_value_range): Use value_range API
1420         instead of piecing together ranges.
1421         (vr_values::update_value_range): Same.
1423 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
1425         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
1426         of performing ad-hoc calculations.
1427         * tree-ssanames.c (set_range_info): New overloaded function
1428         accepting value_range &.
1429         (get_range_info): Same.
1430         * tree-ssanames.h (set_range_info_raw): Remove.
1431         (set_range_info): New prototype.
1432         (get_range_info): Same.
1433         * tree-vrp.h (value_range::null_p): Rename to zero_p.
1434         * tree-vrp.c (value_range::null_p): Same.
1436 2018-11-09  Jan Hubicka  <jh@suse.cz>
1438         * tree.c (fld_type_variant_equal_p): Test user align flag.
1439         (flt_type_variant): Copy user align flag.
1440         (fld_incomplete_type_of): Clear it.
1442 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1444         * config/arm/neon.md (div<mode>3): New pattern.
1446 2018-11-08  Andi Kleen  <ak@linux.intel.com>
1448         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
1449         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
1450         (ix86_handle_option): Handle OPT_mptwrite.
1451         * config/i386/cpuid.h (bit_PTWRITE): Add.
1452         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
1453         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
1454         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
1455         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
1456         (ix86_option_override_internal): Handle PTA_PTWRITE.
1457         (ix86_valid_target_attribute_inner_p): Define ptwrite.
1458         (def_builtin2): Force UINT64 to be 64bit only.
1459         * config/i386/i386.h (TARGET_PTWRITE): Add.
1460         (TARGET_PTWRITE_P): Add.
1461         (PTA_PTWRITE): Add.
1462         * config/i386/i386.md: Define ptwrite.
1463         * config/i386/i386.opt: Add -mptwrite.
1464         * config/i386/immintrin.h (_ptwrite64): Add.
1465         (_ptwrite32): Add
1466         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
1467         * doc/invoke.texi: Document -mptwrite.
1469 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
1471         PR rtl-optimization/87600
1472         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
1473         * lra-constraints.c (process_alt_operands): Skip illegal hard
1474         register usage.  Prefer reloading non hard register operands.
1476 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
1478         PR other/36572
1479         * doc/invoke.texi (Optimize Options): Clarify default behavior
1480         for -fno-sched-interblock and -fno-sched-spec.
1482 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
1484         * collect2.c (linker_select):  Add USE_LLD_LD.
1485         (ld_suffixes): Add ld.lld.
1486         (main): Handle -fuse-ld=lld.
1487         * common.opt (-fuse-ld=lld): New option.
1488         * doc/invoke.texi (-fuse-ld=lld): Document.
1489         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1491 2018-11-08  Paul Koning  <ni1d@arrl.net>
1493         * config/pdp11/constraints.md: Add "Z" series constraints for use
1494         with pre-dec and post-inc addressing.
1495         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1496         (pdp11_expand_operands): Add int argument (word count).
1497         (pdp11_sp_frame_offset): Delete.
1498         (pdp11_cmp_length): New function.
1499         (pushpop_regeq): New function.
1500         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1501         Add hook.
1502         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1503         frame layout.
1504         (pdp11_initial_elimination_offset): Ditto.
1505         (pdp11_expand_operands): Add word count argument.  Bugfixes.
1506         (output_move_multiple): Change how pointer adjustment is done.
1507         (pdp11_gen_int_label): Correct format.
1508         (output_ascii): Ditto.
1509         (pdp11_asm_output_var): Add code for DEC assembler case.
1510         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1511         value.
1512         (legitimate_const_double_p): Ditto.
1513         (pdp11_register_move_cost): Adjust for new register classes.
1514         (pdp11_regno_reg_class): Ditto.
1515         (expand_block_move): Delete.
1516         (pushpop_regeq): New function.
1517         (pdp11_legitimate_address_p): Bugfix in check for constant
1518         offset.
1519         (pdp11_sp_frame_offset): Delete.
1520         (pdp11_reg_save_size): New helper function for new frame layout.
1521         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1522         (pdp11_expand_shift): Bugfix in check for constant shift count.
1523         (pdp11_shift_length): Ditto.
1524         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1525         (pdp11_cmp_length): New function.
1526         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1527         some compile options.
1528         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1529         (CALL_USED_REGISTERS): Ditto.
1530         (ELIMINABLE_REGS): Ditto.
1531         (REGISTER_NAMES): Ditto.
1532         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1533         constraints.
1534         (REG_CLASS_NAMES): Ditto.
1535         (REG_CLASS_CONTENTS): Ditto.  Also remove
1536         HARD_FRAME_POINTER_REGNUM.
1537         (CPU_REG_CLASS): New macro.
1538         (CLASS_MAX_NREGS): Adjust for new register classes.
1539         (FUNCTION_PROFILER): Make no-op.
1540         (may_call_alloca): Remove unused declaration.
1541         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1542         (ASM_OUTPUT_SKIP): Fix format.
1543         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1544         (HARD_FRAME_POINTER_REGNUM): Remove.
1545         (return): Delete.
1546         (*rts): Rename.  Remove epilogue related checks.
1547         (cmpsi, cmpdi): New insn.
1548         (cbranch<mode>4): Change to apply to SI and DI modes as well.
1549         (mov<mode>): Change constraints to enforce that push/pop
1550         destination cannot use the same register as source.
1551         (*mov<mode><cc_cc>): Ditto.
1552         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1553         at assembly output rather than as RTL expander.
1554         (zero_extendqihi2): Bugfix in check for same registers.
1555         (adddi3_nocc): Bugfix in check for constant operand.
1556         (addsi3_nocc): Ditto.
1557         (subdi3_nocc): Ditto.
1558         (subsi3_nocc): Ditto.
1559         (negdi2_nocc): Copy input to pdp11_expand_operands.
1560         (negsi2_nocc): Ditto.
1561         (bswap2_nocc): Ditto.
1562         * config/pdp11/pdp11.opt (mlra): Fix documentation.
1563         * config/pdp11/t-pdp11: Use -Os.
1565 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
1567         * config/arm/parsecpu.awk (/alias/): New parsing rule.
1568         (/begin cpu/): Check that the cpu name hasn't been previously defined.
1569         (gen_comm_data): Print out CPU alias tables.
1570         (check_cpu): Match aliases when checking the CPU name.
1571         * config/arm/arm-protos.h (cpu_alias): New structure.
1572         (cpu_option): Add entry for aliases.
1573         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1574         strongarm1100 and strongarm1110.
1575         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1576         (config/arm/arm-generic.md): Remove redundant references to
1577         strongarm110, strongarm1100 and strongarm1110.
1578         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1579         Scan aliases for additional hints.
1580         (arm_parse_cpu_option_name): Also match a cpu name against the list
1581         of aliases.
1582         * config/arm/arm-tables.opt: Regenerated.
1583         * config/arm/arm-tune.md: Regenerated.
1585 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
1587         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1588         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1589         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1590         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1591         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1592         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1593         * gengtype.c (open_base_files): Add omp-general.h.
1594         * gimple.c (gimple_build_omp_critical):
1595         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
1596         gimple_omp_taskgroup_set_clauses.
1597         (gimple_build_omp_atomic_load): Add mo argument, call
1598         gimple_omp_atomic_set_memory_order.
1599         (gimple_build_omp_atomic_store): Likewise.
1600         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1601         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1602         instead of GSS_OMP.
1603         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1604         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1605         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1606         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
1607         different value for GF_OMP_ATOMIC_NEED_VALUE.
1608         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1609         comments.
1610         (struct gimple_statement_omp_single_layout): And remove here.
1611         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1612         than gimple_statement_omp_single_layout.
1613         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1614         GIMPLE_OMP_TEAMS.
1615         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1616         (gimple_omp_subcode): Formatting fix.
1617         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1618         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1619         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1620         gimple_omp_teams_host, gimple_omp_teams_set_host,
1621         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1622         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1623         gimple_omp_taskgroup_set_clauses): New inline functions.
1624         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1625         (gimple_build_omp_atomic_store): Likewise.
1626         (gimple_omp_atomic_seq_cst_p): Remove.
1627         (gimple_omp_atomic_memory_order): New function.
1628         (gimple_omp_atomic_set_seq_cst): Remove.
1629         (gimple_omp_atomic_set_memory_order): New function.
1630         (gimple_build_omp_taskgroup): Add clauses argument.
1631         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1632         (dump_gimple_omp_task): Print taskwait with depend clauses.
1633         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1634         dump_omp_atomic_memory_order.
1635         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1636         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1637         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1638         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1639         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1640         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1641         ORT_UNTIED_TASKLOOP enumerators.
1642         (enum gimplify_defaultmap_kind): New.
1643         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1644         target_map_pointers_as_0len_arrays members, add defaultmap.
1645         (new_omp_context): Initialize defaultmap member.
1646         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1647         (maybe_fold_stmt): Don't fold even in host teams regions.
1648         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1649         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
1650         ctx->omp_firstprivatize_variable.
1651         (omp_add_variable): Don't add private/firstprivate for VLAs in
1652         ORT_TASKGROUP.
1653         (omp_default_clause): Print "taskloop" rather than "task" if
1654         ORT_*TASKLOOP.
1655         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1656         Handle new defaultmap clause kinds.
1657         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
1658         iterator to be lastprivate or private.  Fix up diagnostics if linear
1659         is used on collapse>1 simd iterator.
1660         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1661         (gimplify_omp_depend): New function.
1662         (gimplify_scan_omp_clauses): Add shared clause on parallel for
1663         combined parallel master taskloop{, simd} if taskloop has
1664         firstprivate, lastprivate or reduction clause.  Handle
1665         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
1666         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
1667         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
1668         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
1669         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
1670         lastprivate.
1671         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
1672         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1673         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
1674         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1675         (gimplify_omp_task): Handle taskwait with depend clauses.
1676         (gimplify_omp_for): Add shared clause on parallel for combined
1677         parallel master taskloop{, simd} if taskloop has firstprivate,
1678         lastprivate or reduction clause.  Use ORT_TASKLOOP or
1679         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
1680         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
1681         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
1682         __for_end and __for_range temporaries on OMP_PARALLEL for
1683         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
1684         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1685         sandwiched in between two taskloops.
1686         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1687         instead of ctx->omp_firstprivatize_variable.
1688         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1689         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
1690         host teams, use gimplify_and_return_first etc. for body like
1691         for target or target data constructs, and at the end call
1692         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1693         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1694         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1695         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1696         gimple_omp_atomic_set_seq_cst calls.
1697         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1698         case, handle taskgroup clauses.
1699         * lto-streamer-out.c (hash_tree): Handle
1700         OMP_CLAUSE_{TASK,IN}_REDUCTION.
1701         * Makefile.in (GTFILES): Add omp-general.h.
1702         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1703         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1704         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1705         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1706         BUILT_IN_GOMP_LOOP_DOACROSS_START,
1707         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1708         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1709         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1710         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1711         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1712         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1713         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1714         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1715         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1716         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1717         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1718         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1719         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1720         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1721         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1722         * omp-expand.c (workshare_safe_to_combine_p): Return false for
1723         non-worksharing loops.
1724         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1725         (determine_parallel_type): Don't combine parallel with worksharing
1726         which has _reductemp_ clause.
1727         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1728         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1729         if there is nonmonotonic modifier or if there is no modifier and no
1730         ordered clause.  For dynamic and guided schedule without monotonic
1731         and nonmonotonic modifier, default to nonmonotonic.
1732         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
1733         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1734         task reductions.
1735         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1736         there are any reduction clauses.
1737         (expand_taskwait_call): New function.
1738         (expand_teams_call): New function.
1739         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1740         expand_teams_call for it.  Formatting fix.  Handle taskwait with
1741         depend clauses.
1742         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
1743         of worksharing loops with task reductions.
1744         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1745         expansion of worksharing loops with task reductions.
1746         (expand_omp_sections): Handle expansion of sections with task
1747         reductions.
1748         (expand_omp_synch): For host teams call expand_omp_taskreg.
1749         (omp_memory_order_to_memmodel): New function.
1750         (expand_omp_atomic_load, expand_omp_atomic_store,
1751         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1752         instead of gimple_omp_atomic_seq_cst_p.
1753         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1754         depend clauses as a standalone directive.
1755         * omp-general.c (enum omp_requires): New variable.
1756         (omp_extract_for_data): Initialize have_reductemp member.  Allow
1757         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1758         GT_EXPR loops depending on incr sign.  Formatting fixes.
1759         * omp-general.h (struct omp_for_data): Add have_reductemp member.
1760         (enum omp_requires): New enum.
1761         (omp_requires_mask): Declare.
1762         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1763         Fix comment typos.
1764         * omp-low.c (struct omp_context): Add task_reductions and
1765         task_reduction_map fields.
1766         (is_host_teams_ctx): New function.
1767         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1768         (use_pointer_for_field): Use is_global_var instead of
1769         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1770         in outer contexts.
1771         (build_outer_var_ref): Ignore taskgroup outer contexts.
1772         (delete_omp_context): Release task_reductions and task_reduction_map.
1773         (scan_sharing_clauses): Don't add any fields for reduction clause on
1774         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
1775         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1776         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
1777         Handle OMP_CLAUSE_NONTEMPORAL.
1778         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1779         needed.
1780         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1781         clauses with task modifier.
1782         (scan_omp_task): Handle taskwait with depend clauses.
1783         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1784         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1785         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1786         (scan_omp_for): Fix comment formatting.
1787         (scan_omp_teams): Handle host teams constructs.
1788         (check_omp_nesting_restrictions): Allow teams with no outer
1789         OpenMP context.  Adjust diagnostics for teams strictly nested into
1790         some explicit OpenMP construct other than target.  Allow OpenMP atomics
1791         inside of simd regions.
1792         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1793         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1794         taskreg_nesting_level while scanning host teams construct.
1795         (task_reduction_read): New function.
1796         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1797         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1798         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
1799         second argument create_tmp_var if it is NULL.  Don't ignore shared
1800         clauses in is_host_teams_ctx contexts.  Handle
1801         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1802         clauses.
1803         (lower_reduction_clauses): Ignore reduction clauses with task
1804         modifier.  Remove second argument create_tmp_var if it is NULL.
1805         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1806         (lower_send_clauses): Ignore reduction clauses with task modifier.
1807         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
1808         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
1809         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1810         rely that it is the last stmt in body so far.  Ignore outer taskgroup
1811         contexts.
1812         (omp_task_reductions_find_first, omp_task_reduction_iterate,
1813         lower_omp_task_reductions): New functions.
1814         (lower_omp_sections): Handle reduction clauses with taskgroup
1815         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
1816         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1817         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
1818         modifiers.
1819         (lower_omp_taskgroup): Handle taskgroup reductions.
1820         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1821         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1822         (lower_depend_clauses): If there are any
1823         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1824         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
1825         seen, assume lowering is done already and return early.  Set kind
1826         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1827         (lower_omp_taskreg): Handle reduction clauses with task modifier on
1828         parallel construct.  Handle reduction clause on taskloop construct.
1829         Handle taskwait with depend clauses.
1830         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1831         for host teams constructs.
1832         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1833         nontemporal and _reductemp_ clause entries.
1834         (omp_clause_code_name): Likewise.
1835         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1836         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1837         * tree-core.h (enum omp_clause_code): Add
1838         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1839         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1840         (struct tree_base): Add omp_atomic_memory_order field into union.
1841         Remove OMP_ATOMIC_SEQ_CST comment.
1842         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1843         and OMP_CLAUSE_DEPEND_DEPOBJ.
1844         (struct tree_omp_clause): Add subcode.defaultmap_kind.
1845         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1846         OpenMP constructs with body and clauses operands.
1847         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1848         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1849         (OMP_TASKGROUP_CLAUSES): Define.
1850         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1851         OMP_CLAUSE__LOOPTEMP_.
1852         (OMP_ATOMIC_SEQ_CST): Remove.
1853         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1854         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1855         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1856         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1857         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1858         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1859         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1860         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1861         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1862         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1863         Define.
1864         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1865         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1866         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1867         (convert_local_omp_clauses): Likewise.  Remove useless test.
1868         * tree-parloops.c (create_call_for_reduction_1): Pass
1869         OMP_MEMORY_ORDER_RELAXED as new argument to
1870         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1871         * tree-pretty-print.c (dump_omp_iterators): New function.
1872         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1873         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
1874         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1875         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
1876         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
1877         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
1878         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1879         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1880         (dump_omp_atomic_memory_order): New function.
1881         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
1882         taskwait with depend clauses.
1883         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1884         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1885         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1886         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1887         write_ts_omp_clause_tree_pointers): Likewise.
1889 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1891         PR ipa/86395
1892         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1893         "-missed", "-note", and "-all" sub-options.
1894         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1895         API.
1896         (can_early_inline_edge_p): Likewise.
1897         (want_early_inline_function_p): Likewise.
1898         (want_inline_self_recursive_call_p): Likewise.
1899         (recursive_inlining): Likewise.
1900         (inline_small_functions): Likewise.
1901         (flatten_function): Likewise.
1902         (ipa_inline): Likewise.
1903         (inline_always_inline_functions): Likewise.
1904         (early_inline_small_functions): Likewise.
1905         (early_inliner): Likewise.
1906         * tree-inline.c (expand_call_inline): Likewise.
1908 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1910         * pretty-print.c (pp_format): Handle %f.
1911         (selftest::test_pp_format): Add test of %f.
1912         * pretty-print.h (pp_double): New macro.
1914 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1916         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1917         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1918         (dump_pretty_printer::decode_format): Implement "%C" for
1919         cgraph_node *.
1920         (selftest::test_capture_of_dump_calls): Rename "where" to
1921         "stmt_loc".  Convert test_decl to a function decl and set its
1922         location.  Add a symbol_table_test RAII instance and a
1923         cgraph_node, using it to test "%C" and dump_symtab_node.
1925 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
1927         PR middle-end/87916
1928         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1930 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
1932         * cgraph.c: Include "selftest.h".
1933         (saved_symtab): New variable.
1934         (selftest::symbol_table_test::symbol_table_test): New ctor.
1935         (selftest::symbol_table_test::~symbol_table_test): New dtor.
1936         (selftest::test_symbol_table_test): New test.
1937         (selftest::cgraph_c_tests): New.
1938         * cgraph.h (saved_symtab): New decl.
1939         (selftest::symbol_table_test): New class.
1940         * selftest-run-tests.c (selftest::run_tests): Call
1941         selftest::cgraph_c_tests.
1942         * selftest.h (selftest::cgraph_c_tests): New decl.
1944 2018-11-08  Richard Biener  <rguenther@suse.de>
1946         * tree-data-ref.h (lambda_int): New typedef.
1947         (lambda_vector_gcd): Adjust.
1948         (lambda_vector_new): Likewise.
1949         (lambda_matrix_new): Likewise.
1950         * tree-data-ref.c  (print_lambda_vector): Adjust.
1952 2018-11-08  Richard Biener  <rguenther@suse.de>
1954         PR tree-optimization/87929
1955         * tree-complex.c (expand_complex_comparison): Clean EH.
1957 2018-11-08  Martin Liska  <mliska@suse.cz>
1959         * doc/extend.texi: Reword.
1960         * predict.c (expr_expected_value_1): Likewise.
1962 2018-11-08  Richard Biener  <rguenther@suse.de>
1964         PR tree-optimization/87913
1965         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1966         of extreme values to ordered comparisons.
1968 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1970         PR middle-end/42726
1971         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1973 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1975         * doc/invoke.texi: Remove leading dash from @opindex entries
1976         throughout the file.
1978 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
1980         PR driver/80828
1981         * doc/invoke.texi (Option Summary): Add -e and --entry.
1982         (Link Options): Likewise.
1984 2018-11-07  Nathan Sidwell  <nathan@acm.org>
1986         PR 87926
1987         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1988         --disable-checking bootstrap.
1990 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1992         * configure: Regenerated.
1994 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1996         PR c/87691
1997         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1998         to the mode of the widest field iff the widest field has mode class
1999         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
2000         reference.
2002 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
2004         * common.opt: Add -Wattribute-warning.
2005         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
2006         * expr.c (expand_expr_real_1): Add new attribute to warning_at
2007         call to allow user configure behavior of "warning" attribute.
2009 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
2011         * target.def: Put @: after every vs., e.g., and i.e. where it is
2012         followed by whitespace.
2013         * doc/extend.texi: Ditto.
2014         * doc/fragments.texi: Ditto.
2015         * doc/gimple.texi: Ditto.
2016         * doc/implement-c.texi: Ditto.
2017         * doc/install.texi: Ditto.
2018         * doc/invoke.texi: Ditto.
2019         * doc/md.texi: Ditto.
2020         * doc/plugins.texi: Ditto.
2021         * doc/rtl.texi: Ditto.
2022         * doc/sourcebuild.texi: Ditto.
2023         * doc/tm.texi.in: Ditto.
2024         * doc/ux.texi: Ditto.
2025         * doc/tm.texi: Regenerate.
2027 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2029         * config/arm/arm-cpus.in (ares): New entry.
2030         * config/arm/arm-tables.opt: Regenerate.
2031         * config/arm/arm-tune.md: Likewise.
2032         * doc/invoke.texi (ARM Options): Document ares.
2034 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2036         * config/aarch64/aarch64-cores.def (ares): Define.
2037         * config/aarch64/aarch64-tune.md: Regenerate.
2038         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2040 2018-11-07  Jan Hubicka  <jh@suse.cz>
2042         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
2043         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
2044         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
2045         TYPE_DECL.
2047 2018-11-07  Richard Biener  <rguenther@suse.de>
2049         PR tree-optimization/87914
2050         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
2051         of nested cycles.
2052         (vectorizable_reduction): Handle shifts and rotates by dispatching
2053         to vectorizable_shift.
2054         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
2055         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
2056         def cases.
2057         (vectorizable_shift): Export and handle being called as
2058         vect_nested_cycle.
2059         (vect_analyze_stmt): Call vectorizable_shift after
2060         vectorizable_reduction.
2061         * tree-vectorizer.h (vectorizable_shift): Declare.
2063 2018-11-07  Jan Hubicka  <jh@suse.cz>
2065         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2066         than const decls in TREE_VALUE of enum.
2067         (dump_type_inheritance_graph): Improve duplicate dumping.
2068         (free_enum_values): New.
2069         (build_type_inheritance_graph): Use it.
2070         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2071         which are not main variants or not ODR types.
2072         (verify_type_variant): Expect variants to have no TYPE_VALUES.
2074 2018-11-07  Richard Biener  <rguenther@suse.de>
2076         * ipa-inline.c (want_inline_small_function_p): Compute
2077         big_speedup_p lazily and last.
2079 2018-11-07  Jan Hubicka  <jh@suse.cz>
2081         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2082         building incomplete variant of complete type.
2083         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2084         variant of complete type.
2086 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2088         * config/mips/mips.c: Fix typo in documentation of
2089         mips_loongson_ext2_prefetch_cookie.
2090         (mips_option_override): fix brain twister logical.
2091         * config/mips/mips.h: Fix typo in documentation of
2092         ISA_HAS_CTZ_CTO and define pattern.
2093         * config/mips/mips.md (prefetch): Hoist EXT2 above
2094         the 2EF/EXT block.
2095         (prefetch_indexed): Hoist EXT2 above the EXT block.
2097 2018-11-07  Jan Hubicka  <jh@suse.cz>
2099         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2100         return and parameter types of function and method types.
2101         (free_lang_data_in_cgraph): Update.
2103 2018-11-07  Martin Liska  <mliska@suse.cz>
2105         PR rtl-optimization/87868
2106         * postreload-gcse.c (eliminate_partially_redundant_load): Set
2107         threshold to max_count if we would overflow.
2108         * profile-count.h: Make max_count a public constant.
2110 2018-11-07  Martin Liska  <mliska@suse.cz>
2112         * mem-stats.h: Fix GNU coding style.
2114 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2116         * config/mips/gs264e.md: New.
2117         * config/mips/mips-cpus.def: Define gs264e.
2118         * config/mips/mips-tables.opt: Regenerate.
2119         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2120         gs264e.
2121         (mips_issue_rate): Add support for gs264e.
2122         (mips_multipass_dfa_lookahead): Likewise.
2123         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2124         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2125         (MIPS_ASE_MSA_SPEC): New.
2126         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2127         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2128         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2129         * config/mips/mips.md: Include gs264e.md.
2130         (processor): Add gs264e.
2131         * config/mips/mips.opt (MSA): Use Mask instead of Var.
2132         * doc/invoke.texi: Add gs264e to supported architectures.
2134 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2136         * config/mips/gs464e.md: New.
2137         * config/mips/mips-cpus.def: Define gs464e.
2138         * config/mips/mips-tables.opt: Regenerate.
2139         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2140         gs464e.
2141         (mips_issue_rate): Add support for gs464e.
2142         (mips_multipass_dfa_lookahead): Likewise.
2143         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2144         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2145         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2146         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2147         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2148         * config/mips/mips.md: Include gs464e.md.
2149         (processor): Add gs464e.
2150         * doc/invoke.texi: Add gs464e to supported architectures.
2152 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2154         * config/mips/loongson3a.md: Rename to ...
2155         * config/mips/gs464.md: ... here.
2156         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2157         as an alias of gs464 processor.
2158         * config/mips/mips-tables.opt: Regenerate.
2159         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2160         instead of PROCESSOR_LOONGSON_3A.
2161         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2162         TUNE_LOONGSON_3A.
2163         (mips_option_override): Enable MMI and EXT for gs464.
2164         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2165         Rename TUNE_LOONGSON_3A to TUNE_GS464.
2166         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2167         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2168         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2169         TARGET_LOONGSON_3A.
2170         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2171         (processor): Add gs464;
2172         * doc/invoke.texi: Add gs464 to supported architectures.
2174 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2176         * config/mips/mips-protos.h
2177         (mips_loongson_ext2_prefetch_cookie): New prototype.
2178         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2179         (mips_option_override): Enable TARGET_LOONGSON_EXT when
2180         TARGET_LOONGSON_EXT2 is true.
2181         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2182         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2183         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2184         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2185         TARGET_LOONGSON_EXT2.
2186         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2187         (define_insn "ctz<mode>2"): New insn pattern.
2188         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2189         (define_insn "prefetch_indexed_<mode>"): Include
2190         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2191         * config/mips/mips.opt (-mloongson-ext2): Add option.
2192         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2194 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2196         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2197         __mips_loongson_ext.
2198         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2199         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2200         -mloongson-ext.
2201         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2202         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2203         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2204         instead of TARGET_LOONGSON_3A.
2205         * config/mips/mips.opt (-mloongson-ext): Add option.
2206         * gcc/doc/invoke.texi (-mloongson-ext): Document.
2208 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2210         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2211         * config/mips/loongson.md: Move to ...
2212         * config/mips/loongson-mmi.md: here; Adjustment.
2213         * config/mips/loongson.h: Move to ...
2214         State as deprecated. Include loongson-mmiintrin.h for back
2215         compatibility and warning.
2216         * config/mips/loongson-mmiintrin.h: ... here.
2217         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2218         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2219         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2220         (mips_option_override): Make sure MMI use hard float;
2221         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2222         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2223         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2224         TARGET_LOONGSON_VECTORS.
2225         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2226         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2227         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2228         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2229         -mloongson-mmi.
2230         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2231         TARGET_LOONGSON_VECTORS.
2232         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2233         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2234         (Loongson MMI patterns): Include loongson-mmi.md instead of
2235         loongson.md.
2236         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
2237         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
2239 2018-11-07  Richard Biener  <rguenther@suse.de>
2241         PR lto/87906
2242         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
2243         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2245 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
2247         PR rtl-optimization/87874
2248         * lra.c (lra_substitute_pseudo): Do not create a subreg for
2249         const wide ints.
2251 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
2253         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
2254         if not in indexed or indirect form.
2255         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
2256         (bswap<mode>2_store): Ditto.
2258 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
2260         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
2261         the UNSPEC.
2263 2018-11-06  Richard Biener  <rguenther@suse.de>
2265         PR tree-optimization/86850
2266         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
2267         instead of src.m_vec.
2269 2018-11-06  Jan Hubicka  <jh@suse.cz>
2271         * tree.c (fld_simplified_type_name): Break out form ...
2272         (free_lang_data_in_type): ... here.
2273         (fld_type_variant_equal_p): Use it.
2275 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2277         * config/default-d.c: Include memmodel.h.
2279         * config/sol2-d.c: New file.
2280         * config/t-sol2 (sol2-d.o): New rule.
2281         * config.gcc <*-*-solaris2*>: Set d_target_objs,
2282         target_has_targetdm.
2284 2018-11-06  Jan Hubicka  <jh@suse.cz>
2286         * tree.c (fld_type_variant): Also copy alignment; be sure that
2287         new variant is equal.
2289 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
2291         PR target/87762
2292         * config/s390/s390.md: Add relative_long attribute.
2294 2018-11-06  Jan Hubicka  <jh@suse.cz>
2296         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
2297         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
2298         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
2299         stream TYPE_NEEDS_CONSTRUCTING.
2300         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
2301         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2303 2018-11-06  Richard Biener  <rguenther@suse.de>
2305         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
2306         dump-scope ...
2307         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2309 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2311         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
2312         REG_CLASS_CONTENTS[GEN_REGS].
2313         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2315 2018-11-06  Jan Hubicka  <jh@suse.cz>
2317          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2319 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2321         PR sanitizer/80953
2322         * config/sol2.h (ASAN_CC1_SPEC): Define.
2323         (LD_WHOLE_ARCHIVE_OPTION): Define.
2324         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
2325         (ASAN_REJECT_SPEC): Provide default.
2326         (LIBASAN_EARLY_SPEC): Define.
2327         (LIBTSAN_EARLY_SPEC): Define.
2328         (LIBLSAN_EARLY_SPEC): Define.
2329         * config/i386/sol2.h (CC1_SPEC): Redefine.
2330         (ASAN_REJECT_SPEC): Define.
2332         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
2333         (TARGET_ASAN_SHADOW_OFFSET): Define.
2334         (sparc_asan_shadow_offset): New function.
2335         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
2336         (ASAN_REJECT_SPEC): Define.
2338 2018-11-06  Jan Hubicka  <jh@suse.cz>
2340         * tree.c (fld_type_variant): Copy canonical type.
2341         (fld_incomplete_type_of): Check that canonical types looks sane;
2342         copy canonical type.
2343         (verify_type): Accept when incomplete type has complete canonical type.
2345 2018-11-06  Jan Hubicka  <jh@suse.cz>
2347         * tree.c (free_lang_data): Reset overwite_assembler_name,
2348         print_xnode, print_decl, print_type and print_identifier of
2349         langhooks.
2351 2018-11-06  Richard Biener  <rguenther@suse.de>
2353         PR tree-optimization/87889
2354         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2355         Do nothing if old and new arg are the same
2357 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
2359         PR target/87723
2360         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
2361         attributes for operands 3 and 4.
2363 2018-11-06  Richard Biener  <rguenther@suse.de>
2365         PR middle-end/18041
2366         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
2367         matching bitfield insertion.
2369 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
2371         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
2372         (reg_next_debug_use): New.
2373         (attempt_change): Propagate adjusted expression into affected
2374         debug insns.
2375         (merge_in_block): Track uses in debug insns.
2376         (pass_inc_dec::execute): Allocate and release
2377         reg_next_debug_use.
2379 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
2381         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
2382         (_mm512_fixupimm_round_pd): Update parameters and builtin.
2383         (_mm512_maskz_fixupimm_round_pd): Ditto.
2384         (_mm512_fixupimm_round_ps): Ditto.
2385         (_mm512_maskz_fixupimm_round_ps): Ditto.
2386         (_mm_fixupimm_round_sd): Ditto.
2387         (_mm_maskz_fixupimm_round_sd): Ditto.
2388         (_mm_fixupimm_round_ss): Ditto.
2389         (_mm_maskz_fixupimm_round_ss): Ditto.
2390         (_mm512_fixupimm_pd): Ditto.
2391         (_mm512_maskz_fixupimm_pd): Ditto.
2392         (_mm512_fixupimm_ps): Ditto.
2393         (_mm512_maskz_fixupimm_ps): Ditto.
2394         (_mm_fixupimm_sd): Ditto.
2395         (_mm_maskz_fixupimm_sd): Ditto.
2396         (_mm_fixupimm_ss): Ditto.
2397         (_mm_maskz_fixupimm_ss): Ditto.
2398         (_mm512_mask_fixupimm_round_pd): Update builtin.
2399         (_mm512_mask_fixupimm_round_ps): Ditto.
2400         (_mm_mask_fixupimm_round_sd): Ditto.
2401         (_mm_mask_fixupimm_round_ss): Ditto.
2402         (_mm512_mask_fixupimm_pd): Ditto.
2403         (_mm512_mask_fixupimm_ps): Ditto.
2404         (_mm_mask_fixupimm_sd): Ditto.
2405         (_mm_mask_fixupimm_ss): Ditto.
2406         * config/i386/avx512vlintrin.h:
2407         (_mm256_fixupimm_pd): Update parameters and builtin.
2408         (_mm256_maskz_fixupimm_pd): Ditto.
2409         (_mm256_fixupimm_ps): Ditto.
2410         (_mm256_maskz_fixupimm_ps): Ditto.
2411         (_mm_fixupimm_pd): Ditto.
2412         (_mm_maskz_fixupimm_pd): Ditto.
2413         (_mm_fixupimm_ps): Ditto.
2414         (_mm_maskz_fixupimm_ps): Ditto.
2415         (_mm256_mask_fixupimm_pd): Update builtin.
2416         (_mm256_mask_fixupimm_ps): Ditto.
2417         (_mm_mask_fixupimm_pd): Ditto.
2418         (_mm_mask_fixupimm_ps): Ditto.
2419         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
2420         * config/i386/i386-builtin.def: Update builtin definitions.
2421         * config/i386/i386.c: Handle new builtin types and remove useless ones.
2422         * config/i386/sse.md: Update VFIXUPIMM* patterns.
2423         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2424         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2425         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
2426         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2427         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2428         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
2429         * config/i386/subst.md:
2430         (round_saeonly_sd_mask_operand4): Add new subst_attr.
2431         (round_saeonly_sd_mask_op4): Ditto.
2432         (round_saeonly_expand_operand5): Ditto.
2433         (round_saeonly_expand): Update.
2435 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
2437         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2439 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
2441         PR rtl-optimization/87871
2442         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2444 2018-11-05  Paul Koning  <ni1d@arrl.net>
2446         * doc/sourcebuild.texi (target attributes): Document new "inf"
2447         effective target keyword.
2449 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
2451         * config/s390/s390.c (s390_register_move_cost): Increase costs for
2452         moves involving the CC reg.
2454 2018-11-05  Richard Biener  <rguenther@suse.de>
2456         PR tree-optimization/87873
2457         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
2458         argument.
2459         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
2460         * tree-vect-loop.c (vect_transform_loop): When splitting the
2461         loop exit also create forwarder PHIs for constants.
2462         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
2463         Handle constant to_arg, add extra checking we match up the correct
2464         PHIs.
2466 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
2468         * config/s390/s390.md: QImode and HImode for load on condition.
2470 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
2472         * config/s390/predicates.md: Fix typo.
2473         * config/s390/s390.md: Allow immediates for load on condition.
2475 2018-11-05  Martin Liska  <mliska@suse.cz>
2477         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
2478         * bitmap.h (struct bitmap_usage): Likewise.
2479         * ggc-common.c (SCALE): Remove.
2480         (LABEL): Likewise.
2481         (struct ggc_usage): Use SIZE_AMOUNT. And update
2482         compare method.
2483         * ggc-page.c (SCALE): Remove.
2484         (STAT_LABEL): Remove.
2485         (ggc_print_statistics): Use SIZE_AMOUNT.
2486         * gimple.h (SCALE): Remove.
2487         (LABEL): Likewise.
2488         * input.c (ONE_K): Remove.
2489         (ONE_M): Likewise.
2490         (SCALE): Likewise.
2491         (STAT_LABEL): Likewise.
2492         (FORMAT_AMOUNT): Likewise.
2493         (dump_line_table_statistics): Use SIZE_AMOUNT.
2494         * mem-stats.h (struct mem_usage): Likewise.
2495         * rtl.c (dump_rtx_statistics): Likewise.
2496         (rtx_alloc_counts): Change type to size_t.
2497         (rtx_alloc_sizes): Likewise.
2498         (rtx_count_cmp): New.
2499         (dump_rtx_statistics): Sort first based on counts.
2500         * tree.c (tree_nodes_cmp): New.
2501         (tree_codes_cmp): New.
2502         (dump_tree_statistics): Sort first based on counts.
2503         * system.h (ONE_K): New.
2504         (ONE_M): Likewise.
2505         (SIZE_SCALE): Likewise.
2506         (SIZE_LABEL): Likewise.
2507         (SIZE_AMOUNT): Likewise.
2508         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2509         * tree-dfa.c (dump_dfa_stats): Likewise.
2510         * tree-phinodes.c (phinodes_print_statistics): Likewise.
2511         * tree-ssanames.c (ssanames_print_statistics): Likewise.
2512         * tree.c (dump_tree_statistics): Likewise.
2513         * vec.c (struct vec_usage): Likewise.
2514         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2515         trigger a -Werror=format-overflow with
2516         --enable-gather-detailed-stats.
2518 2018-11-05  Martin Liska  <mliska@suse.cz>
2520         * mem-stats.h (mem_alloc_description::release_instance_overhead):
2521         Return T *.
2522         * vec.c (struct vec_usage): Register m_element_size.
2523         (vec_prefix::register_overhead): New arguments: elements and
2524         element_size.
2525         (vec_prefix::release_overhead): Subtract elements.
2526         * vec.h (struct vec_prefix): Change signature.
2527         (va_heap::reserve): Pass proper arguments.
2528         (va_heap::release): Likewise.
2530 2018-11-05  Martin Liska  <mliska@suse.cz>
2532         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2533         style.
2534         * vec.c: Likewise.
2536 2018-11-05  Richard Biener  <rguenther@suse.de>
2538         * tree-scalar-evolution.h (final_value_replacement_loop): Update
2539         prototype.
2540         * tree-scalar-evolution.c (final_value_replacement_loop): Return
2541         whether anything was done.
2542         (scev_const_prop): Remove constant propagation part, fold
2543         remains into ...
2544         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2545         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2546         conditionally.
2548 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
2550         PR tree-optimization/87859
2551         * gimple-ssa-store-merging.c (struct merged_store_group): Add
2552         only_constants and first_nonmergeable_order members.
2553         (merged_store_group::merged_store_group): Initialize them.
2554         (merged_store_group::do_merge): Clear only_constants member if
2555         adding something other than INTEGER_CST store.
2556         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2557         stores with order >= first_nonmergeable_order.  Use
2558         merged_store->only_constants instead of always recomputing it.
2559         Set merged_store->first_nonmergeable_order if we've skipped any
2560         stores.  Attempt to merge overlapping INTEGER_CST stores that
2561         we would otherwise skip.
2563         PR sanitizer/87837
2564         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2566 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
2568         PR target/87853
2569         * config/i386/emmintrin.h (__v16qs): New to cope with option
2570         -funsigned-char.
2571         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2572         (_mm_cmplt_epi8): Likewise.
2573         (_mm_cmpgt_epi8): Likewise.
2575 2018-11-05  Richard Biener  <rguenther@suse.de>
2577         PR rtl-optimization/87852
2578         * fwprop.c (use_killed_between): Only consider single-defs of the
2579         use whose definition statement dominates the use.
2581 2018-11-05  Martin Liska  <mliska@suse.cz>
2583         PR web/87829
2584         * doc/invoke.texi: Remove options that are
2585         not disabled with -Os.
2587 2018-11-05  Martin Liska  <mliska@suse.cz>
2589         PR c/87811
2590         * doc/extend.texi: Update constrain about the last argument
2591         of __builtin_expect_with_probability.
2593 2018-11-05  Martin Liska  <mliska@suse.cz>
2595         PR c/87811
2596         * predict.c (expr_expected_value_1): Verify
2597         that last argument is a real constants and emit
2598         error.
2600 2018-11-05  Martin Liska  <mliska@suse.cz>
2602         PR gcov-profile/77698
2603         * ipa-profile.c (ipa_profile): Adjust hotness threshold
2604         only in LTO mode.
2606 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2608         PR tree-optimization/86572
2609         * builtins.c (c_strlen): Handle negative offsets in a safe way.
2611 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2613         PR tree-optimization/87672
2614         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2615         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2617 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
2619         PR middle-end/58372
2620         * cfgexpand.c (pass_expand::execute): Move the call to
2621         finish_eh_generation in front of the call to expand_stack_alignment.
2623 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2625         * common/config/i386/i386-common.c (processor_alias_table): Add
2626         znver2 entry.
2627         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2628         (case ${target}): Add znver2.
2629         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2630         -march=native recognize znver2 processors.
2631         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2632         * config/i386/i386.c (m_znver2): New definition.
2633         (m_ZNVER): New definition.
2634         (m_AMD_MULTIPLE): Includes m_znver2.
2635         (processor_cost_table): Add znver2 entry.
2636         (processor_target_table): Add znver2 entry.
2637         (get_builtin_code_for_version): Set priority for
2638         PROCESSOR_ZNVER2.
2639         (processor_model): Add M_AMDFAM17H_ZNVER2.
2640         (arch_names_table): Ditto.
2641         (ix86_reassociation_width): Include znver2.
2642         * config/i386/i386.h (TARGET_znver2): New definition.
2643         (struct ix86_size_cost): Add TARGET_ZNVER2.
2644         (enum processor_type): Add PROCESSOR_ZNVER2.
2645         * config/i386/i386.md (define_attr "cpu"): Add znver2.
2646         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2647         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2648         (ix86_adjust_cost): Add znver2.
2649         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
2650         * gcc/doc/extend.texi: Add details about znver2.
2651         * gcc/doc/invoke.texi: Add details about znver2.
2653 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
2655         PR target/87079
2657         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2658         pattern.
2660 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
2662         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2663         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2665 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
2667         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2668         shrink-wrapping when -mtrack-speculation.
2670 2018-11-02  Richard Biener  <rguenther@suse.de>
2672         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2673         (pop_cost_one_pair): Do not free pair.
2674         (pop_best_coalesce): Likewise.
2675         (create_coalesce_list): Initialize obstack.
2676         (delete_coalesce_list): Free obstack.
2677         (find_coalesce_pair): Obstack-allocate coalesce pairs.
2678         (add_cost_one_coalesce): Likewise.
2679         (struct live_track): Remove bitmap pointer indirections.
2680         (new_live_track): Adjust.
2681         (delete_live_track): Likewise.
2682         (live_track_remove_partition): Likewise.
2683         (live_track_add_partition): Likewise.
2684         (live_track_live_p): Likewise.
2685         (live_track_process_def): Likewise.
2686         (live_track_clear_base_vars): Likewise.
2688 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2690         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2691         * configure: Regenerate.
2692         * config.in: Regenerate.
2693         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2694         HAVE_AS_REGISTER_PSEUDO_OP guard.
2695         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2696         !HAVE_AS_REGISTER_PSEUDO_OP support.
2697         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2698         guard.
2700 2018-11-02  Richard Biener  <rguenther@suse.de>
2702         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2703         with is_type_die.
2705 2018-11-02  Richard Biener  <rguenther@suse.de>
2707         PR tree-optimization/87776
2708         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2709         executable when iterating but running into rpo-vn-max-loop-depth
2710         and not eliding the iteration.
2712 2018-11-30  Jan Hubicka  <jh@suse.cz>
2714         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2715         TYPE_DECL.
2717 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
2719         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2720         prototype.
2721         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2722         Combine with rs6000_address_for_fpconvert.
2723         (rs6000_address_for_fpconvert): Combine with
2724         rs6000_force_indexed_or_indirect_mem.
2725         (rs6000_expand_vector_init): Change function call from
2726         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2727         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2728         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2729         (floatsi<mode>2_lfiwax_mem): Ditto.
2730         (floatunssi<mode>2_lfiwzx): Ditto.
2731         (floatunssi<mode>2_lfiwzx_mem): Ditto.
2732         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2733         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2734         (fix_trunc<mode>si2_stfiwx): Ditto.
2735         (fixuns_trunc<mode>si2_stfiwx): Ditto.
2736         (float_<mode>si2_hw): Ditto.
2737         (floatuns_<mode>si2_hw): Ditto.
2738         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2739         (vsx_splat_<mode>): Ditto.
2741 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
2743         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2744         at end of assembler input text.
2745         * configure: Regenerate.
2747 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
2749         PR tree-optimization/87826
2750         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2751         negative or larger or equal to type's precision.
2753 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
2755         * opts.c (default_options_table): Do not enable
2756         OPT_fdelayed_branch at -Og.
2757         * doc/invoke.texi (-fdelayed-branch): Document it.
2759 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2761         * optabs-libfuncs.c (build_libfunc_function_visibility):
2762         New, split out from...
2763         (build_libfunc_function): ... here.
2764         (init_one_libfunc_visibility): New, split out from ...
2765         (init_one_libfunc): ... here.
2767         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2768         scratch register need not be early-clobber.  Document the reason
2769         why we cannot use ST<OP>.
2771 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
2773         PR bootstrap/82856
2774         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
2775         line for second argument of AC_DEFINE_UNQUOTED.
2776         * doc/install.texi (Tools/packages necessary for modifying GCC):
2777         Update to autoconf 2.69 and automake 1.15.1.
2778         * aclocal.m4, config.in, configure: Regenerate.
2780 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
2782         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2783         initialization.
2785 2018-10-31  Martin Liska  <mliska@suse.cz>
2787         PR driver/83193
2788         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2789         Add new argument invalid_extension.
2790         (aarch64_get_all_extension_candidates): New function.
2791         (aarch64_rewrite_selected_cpu): Add NULL to function call.
2792         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2793         new argument.
2794         (aarch64_get_all_extension_candidates): New function.
2795         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2796         argument invalid_extension.
2797         (aarch64_parse_cpu): Likewise.
2798         (aarch64_print_hint_for_extensions): New function.
2799         (aarch64_validate_mcpu): Provide hint about invalid extension.
2800         (aarch64_validate_march): Likewise.
2801         (aarch64_handle_attr_arch): Pass new argument.
2802         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2803         (aarch64_handle_attr_isa_flags): Likewise.
2805 2018-10-31  Richard Biener  <rguenther@suse.de>
2807         PR middle-end/70359
2808         PR middle-end/86270
2809         * tree-outof-ssa.c (insert_backedge_copies): Restrict
2810         copy generation to useful cases.  Place the copy before
2811         the definition of the backedge value when possible.
2813 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2815         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2816         * config/arc/arc.c (arc_active_insn): New function.
2817         (check_store_cacheline_hazard): Likewise.
2818         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2819         (arc_override_options): Disable delay slot scheduler for older
2820         A7.
2821         (arc_store_addr_hazard_p): New implementation, old one renamed to
2822         ...
2823         (arc_store_addr_hazard_internal_p): Renamed.
2824         (arc_reorg): Don't combine into brcc instructions which are part
2825         of hardware hazard solution.
2826         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2827         (tune_arc700): Likewise.
2828         * config/arc/arc.opt (arc7xx): New tune value.
2829         * config/arc/arc700.md: Improve A7 scheduler.
2831 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2833         * config/arc/arc.c (arc_override_options): Remove
2834         TARGET_COMPACT_CASESI.
2835         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2836         (CASE_VECTOR_MODE): Likewise.
2837         (CASE_VECTOR_PC_RELATIVE): Likewise.
2838         (CASE_VECTOR_SHORTEN_MODE): Likewise.
2839         (CASE_VECTOR_SHORTEN_MODE1): Delete.
2840         (ADDR_VEC_ALIGN): Update.
2841         (ASM_OUTPUT_CASE_LABEL): Undefine.
2842         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2843         (TARGET_BI_BIH): Define.
2844         (DEFAULT_BRANCH_INDEX): Likewise.
2845         * config/arc/arc.md (casesi): Rework to accept BI/BIH
2846         instructions, remove compact_casesi use case.
2847         (casesi_compact_jump): Remove.
2848         (casesi_dispatch): New pattern.
2849         * config/arc/arc.opt: Add mbranch-index option. Deprecate
2850         compact_casesi option.
2851         * doc/invoke.texi: Document mbranch-index option.
2853 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2855         * config/arc/arc.c (arc_get_tp): Remove function.
2856         (arc_emit_call_tls_get_addr): Likewise.
2857         (arc_call_tls_get_addr): New function.
2858         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2859         * config/arc/arc.md (tls_load_tp_soft): Remove.
2860         (tls_gd_get_addr): Likewise.
2862 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
2864         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2865         (mulsi3_600_lib): Remove pattern.
2866         (umulsi3_highpart_600_lib_le): Likewise.
2867         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2868         (umulsidi3): Remove call to umulsidi3_600_lib.
2869         (umulsidi3_600_lib): Remove pattern.
2870         (peephole2): Remove peephole using the above deprecated patterns.
2872 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
2874         PR target/87374
2875         * config/arm/arm.c (arm_option_check_internal): Disable the combined
2876         use of -mslow-flash-data and -mword-relocations.
2877         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2878         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2879         flag_pic.
2880         * doc/invoke.texi (-mword-relocations): Mention conflict with
2881         -mslow-flash-data.
2882         (-mslow-flash-data): Reciprocally.
2884 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
2886         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2887         16-byte modes held in GP registers to use an even regno.
2889         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2890         (aarch64_atomic_ldop_supported_p): Remove.
2891         (aarch64_gen_atomic_ldop): Remove.
2892         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2893         Fully expand LSE operations here.
2894         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2895         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2896         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2897         and use ATOMIC_LDOP instead; use register_operand for the input;
2898         drop the split and emit insns directly.
2899         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2900         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2901         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2903         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2904         (aarch64_gen_atomic_ldop): Don't call it.
2905         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2906         Use aarch64_reg_or_zero.
2907         (aarch64_atomic_exchange<ALLI>): Likewise.
2908         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2909         operand 0; use aarch64_reg_or_zero for input; merge ...
2910         (@aarch64_atomic_swp<ALLI>): ... this and remove.
2912         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2913         (aarch64_split_compare_and_swap): Use it.
2914         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
2915         test oldval against the proper predicate.
2916         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2917         Use nonmemory_operand for expected.
2918         (cas_short_expected_pred): New.
2919         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2920         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2921         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2922         (aarch64_plushi_operand): New.
2924         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2925         Force oldval into the rval register for TARGET_LSE; emit the compare
2926         during initial expansion so that it may be deleted if unused.
2927         (aarch64_gen_atomic_cas): Remove.
2928         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2929         Change =&r to +r for operand 0; use match_dup for operand 2;
2930         remove is_weak and mod_f operands as unused.  Drop the split
2931         and merge with...
2932         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2933         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2934         (@aarch64_atomic_cas<GPI>): Similarly.
2936 2018-10-31  Richard Biener  <rguenther@suse.de>
2938         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2939         using ABSU_EXPR.
2941 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2943         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2944         * config/aarch64/aarch64.md: Include saphira.md
2945         * config/aarch64/saphira.md: New file for pipeline description.
2947 2018-10-30  Martin Sebor  <msebor@redhat.com>
2949         PR middle-end/87041
2950         * gimple-ssa-sprintf.c (format_directive): Use %G to include
2951         inlining context.
2952         (sprintf_dom_walker::compute_format_length):
2953         Avoid setting POSUNDER4K here.
2954         (get_destination_size): Handle null argument values.
2955         (get_user_idx_format): New function.
2956         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2957         functions, including user-defined with attribute format printf.
2958         Use %G to include inlining context.
2959         Set POSUNDER4K here.
2961 2018-10-30  Jan Hubicka  <jh@suse.cz>
2963         * params.def (lto-partitions): Bump from 32 to 128.
2965 2018-10-30  Jan Hubicka  <jh@suse.cz>
2967         * tree.c
2968         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2969         head in file.
2970         (free_lang_data_in_type): Forward declare.
2971         (fld_type_variant_equal_p): New function.
2972         (fld_type_variant): New function
2973         (fld_incomplete_types): New hash.
2974         (fld_incomplete_type_of): New function
2975         (fld_simplfied-type): New function.
2976         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2977         (free_lang_data): Allocate and free fld_incomplete_type; update call
2978         of free_lang_data_in_decl.
2980 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
2982         * gcov.c (output_lines): Remove duplicate line.
2984 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
2986         * config/rs6000/rs6000.md (bswapdi2): Force address into register
2987         if not in indexed or indirect form.
2988         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2989         (bswapdi2_store): Ditto.
2990         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2991         helper function.
2992         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2993         Prototype for helper function.
2995 2018-10-30  Martin Sebor  <msebor@redhat.com>
2997         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2998         (target, pragma GCC optimize, pragma GCC target): Ditto.
3000 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
3002         * doc/extend.texi: Fix prototype and description of
3003         __builtin_expect_with_probability.
3005 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
3007         * cgraph.h (clone_function_name_1): Replaced by new
3008           clone_function_name_numbered that takes name as string; for
3009           privatize_symbol_name_1 use only.
3010           (clone_function_name): Renamed to
3011           clone_function_name_numbered to be explicit about numbering.
3012           (clone_function_name): New two-argument function that does
3013           not number its output.
3014           (clone_function_name): New three-argument function that
3015           takes a number to append to its output.
3016         * cgraphclones.c (duplicate_thunk_for_node):
3017           (clone_function_name_1): Renamed.
3018           (clone_function_name_numbered): Two new functions.
3019           (clone_function_name): Improved documentation.
3020           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
3021         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
3022         * final.c (final_scan_insn_1): Use the new clone_function_name
3023           without numbering.
3024         * multiple_target.c (create_dispatcher_calls): Ditto.
3025           (create_target_clone): Ditto.
3026         * omp-expand.c (grid_expand_target_grid_body): Ditto.
3027         * omp-low.c (create_omp_child_function_name): Ditto.
3028         * omp-simd-clone.c (simd_clone_create): Ditto.
3029         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
3030           new clone_function_name without numbering.
3032 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
3034         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
3035         Assert that the allocation size is not zero.
3037 2018-10-30  Richard Biener  <rguenther@suse.de>
3039         PR tree-optimization/87800
3040         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
3041         non-induction or reduction PHIs.
3043 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3045         * config/aarch64/falkor-tag-collision-avoidance.c
3046         (execute_tag_collision_avoidance): Call df_note_add_problem.
3048 2018-10-30  Martin Liska  <mliska@suse.cz>
3050         * doc/extend.texi: Fix typo in documentation
3051         of __builtin_expect_with_probability.
3053 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3055         PR c++/87721
3056         * input.c (get_substring_ranges_for_loc): Detect if
3057         linemap_resolve_location gives us a NULL map, and reject
3058         this case.
3060 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
3062         * config.gcc (xstormy16-*-elf): Set tm_d_file.
3064 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3065             Martin Sebor  <msebor@redhat.com>
3066             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3068         * doc/ux.texi (Quoting): New subsection, adapted from material at
3069         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3070         MartinSebor and ManuelLopezIbanez.
3071         (Fix-it hints): Note that fix-it hints shouldn't be marked for
3072         translation.
3074 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
3076         PR middle-end/87469
3077         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3078         max value.
3080 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
3082         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3084 2018-10-29  Paul Koning  <ni1d@arrl.net>
3086         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3088 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
3090         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3091         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3092         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3093         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3094         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3095         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3096         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3097         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3098         Change 'vector' to '__vector'.
3099         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3100         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3101         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3102         _mm_avg_pu16): Likewise.  And, whitespace corrections.
3104 2018-10-29  Richard Biener  <rguenther@suse.de>
3106         PR tree-optimization/87785
3107         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3108         internal defs.
3110 2018-10-29  Olivier Hainque  <hainque@adacore.com>
3112         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3114 2018-10-29  Olivier Hainque  <hainque@adacore.com>
3116         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3117         ports configuration macro, defaults to "gnu".
3118         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3119         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3121 2018-10-29  Olivier Hainque  <hainque@adacore.com>
3123         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3125 2018-10-29  Richard Biener  <rguenther@suse.de>
3127         PR tree-optimization/87790
3128         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3129         (vect_make_slp_decision): Adjust.
3130         (vect_slp_analyze_bb_1): Likewise.
3131         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3132         edges.
3134 2018-10-29  Richard Biener  <rguenther@suse.de>
3136         PR tree-optimization/87785
3137         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3138         and processing.
3139         (vect_build_slp_tree): Likewise.
3140         (vect_gather_slp_loads): New function.
3141         (vect_analyze_slp_instance): Gather loads separately from the
3142         SLP tree build.
3144 2018-10-29  Martin Liska  <mliska@suse.cz>
3146         * Makefile.in: Make dependency to json.o.
3147         * doc/gcov.texi: Document new JSON format, remove
3148         old intermediate format documentation.
3149         * gcov.c (struct function_info): Come up with m_name and
3150         m_demangled_name.
3151         (function_info::function_info): Initialize it.
3152         (function_info::~function_info): Release it.
3153         (main): Rename flag_intermediate_format to flag_json_format.
3154         (print_usage): Describe --json-format.
3155         (process_args): Set flag_json_format.
3156         (output_intermediate_line): Remove.
3157         (output_intermediate_json_line): Likewise.
3158         (get_gcov_intermediate_filename): Return new extension
3159         ".gcov.json.gz".
3160         (output_intermediate_file): Implement JSON emission.
3161         (output_json_intermediate_file): Implement JSON emission.
3162         (generate_results): Use ::get_name for function name.
3163         Handle JSON output file.
3164         (read_graph_file): Use ::get_name instead of cplus_demangle.
3165         (read_count_file): Likewise.
3166         (solve_flow_graph): Likewise.
3167         (add_line_counts): Likewise.
3168         (accumulate_line_counts): Use new flag_json_format.
3169         (output_function_details): Use ::get_name instead of cplus_demangle.
3170         (output_lines): Likewise.
3171         * json.cc (test_writing_literals): Add new tests.
3172         * json.h (class literal): Add new boolean constructor.
3174 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
3176         PR rtl-optimization/87701
3177         PR rtl-optimization/87780
3178         * combine.c (make_more_copies): Rewrite.
3180 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
3182         * doc/generic.texi (ABSU_EXPR): Document.
3183         * match.pd (absu(x)*absu(x) -> x*x): Handle.
3184         (absu(absu(X)) -> absu(X)): Likewise.
3185         (absu(-X) -> absu(X)): Likewise.
3186         (absu(X)  where X is nonnegative -> X): Likewise.
3188 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
3190         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3191         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3192         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3193         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3194         (s-tm-texi): Also check timestamp on d-target.def.
3195         (generated_files): Add TM_D_H and d-target-hooks-def.h.
3196         (build/genhooks.o): Also depend on D_TARGET_DEF.
3197         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3198         variables.
3199         * config/aarch64/aarch64-d.c: New file.
3200         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3201         Define.
3202         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3203         prototype.
3204         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3205         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3206         * config/arm/arm-d.c: New file.
3207         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3208         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3209         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3210         * config/arm/t-arm (arm-d.o): New rule.
3211         * config/default-d.c: New file.
3212         * config/glibc-d.c: New file.
3213         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3214         * config/i386/i386-d.c: New file.
3215         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3216         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3217         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3218         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3219         * config/i386/t-i386 (i386-d.o): New rule.
3220         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3221         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3222         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3223         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3224         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3225         * config/mips/mips-d.c: New file.
3226         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3227         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3228         * config/mips/t-mips (mips-d.o): New rule.
3229         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3230         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3231         * config/powerpcspe/powerpcspe-d.c: New file.
3232         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3233         New prototype.
3234         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3235         Support GNU D by using 0 as the language type.
3236         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
3237         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
3238         * config/riscv/riscv-d.c: New file.
3239         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
3240         prototype.
3241         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
3242         * config/riscv/t-riscv (riscv-d.o): New rule.
3243         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3244         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3245         * config/rs6000/rs6000-d.c: New file.
3246         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
3247         prototype.
3248         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3249         Support GNU D by using 0 as the language type.
3250         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
3251         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
3252         * config/s390/s390-d.c: New file.
3253         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
3254         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
3255         * config/s390/t-s390 (s390-d.o): New rule.
3256         * config/sparc/sparc-d.c: New file.
3257         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
3258         prototype.
3259         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
3260         * config/sparc/t-sparc (sparc-d.o): New rule.
3261         * config/t-glibc (glibc-d.o): New rule.
3262         * configure: Regenerated.
3263         * configure.ac (tm_d_file): New variable.
3264         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
3265         * doc/contrib.texi (Contributors): Add self for the D frontend.
3266         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
3267         * doc/install.texi (Configuration): Mention libphobos as an option for
3268         --enable-shared.  Mention d as an option for --enable-languages.
3269         (Testing): Mention check-d as a target.
3270         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
3271         name suffixes.  Mention d as a -x option.
3272         * doc/sourcebuild.texi (Top Level): Mention libphobos.
3273         * doc/standards.texi (Standards): Add section on D language.
3274         * doc/tm.texi: Regenerated.
3275         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
3276         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
3277         * dwarf2out.c (is_dlang): New function.
3278         (gen_compile_unit_die): Use DW_LANG_D for D.
3279         (declare_in_namespace): Return module die for D, instead of adding
3280         extra declarations into the namespace.
3281         (gen_namespace_die): Generate DW_TAG_module for D.
3282         (gen_decl_die): Handle CONST_DECLSs for D.
3283         (dwarf2out_decl): Likewise.
3284         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
3285         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
3286         kinds of aggregates.
3287         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
3288         * genhooks.c: Include d/d-target.def.
3290 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
3292         PR target/85669
3293         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
3294         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
3295         (STACK_DYNAMIC_OFFSET): Likewise.
3297 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
3299         PR target/80024
3300         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
3301         error message.
3303 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
3305         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
3306         return type and other typos.
3308 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
3310         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
3311         a shorter sequence with fewer branches.
3312         (emit_final_str_compare_gpr): Ditto.
3314 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
3316         * config/rs6000/tmmintrin.h: New file.
3317         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
3319 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
3321         * config/rs6000/mmintrin.h: Enable 32bit compilation.
3322         * config/rs6000/xmmintrin.h: Likewise.
3324 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
3326         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
3328 2018-10-26  Richard Biener  <rguenther@suse.de>
3330         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
3331         and wrapper.
3332         (vect_mark_slp_stmts_relevant): Likewise.
3333         (vect_detect_hybrid_slp_stmts): Likewise.
3334         (vect_bb_slp_scalar_cost): Likewise.
3335         (vect_remove_slp_scalar_calls): Likewise.
3337 2018-10-26  Jan Hubicka  <jh@suse.cz>
3339         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
3340         (warn_types_mismatch): Fix walk of DECL_NAME.
3341         (odr_types_equivalent_p): Fix overactive assert.
3343 2018-10-26  Richard Biener  <rguenther@suse.de>
3345         PR tree-optimization/87105
3346         * tree-vectorizer.h (_slp_tree::refcnt): New member.
3347         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
3348         refcnt.
3349         (vect_create_new_slp_node): Initialize refcnt to one.
3350         (bst_traits): Move.
3351         (scalar_stmts_set_t, bst_fail): Remove.
3352         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
3353         (vect_build_slp_tree): Add bst_map argument and lookup
3354         already created SLP nodes.
3355         (vect_print_slp_tree): Handle a SLP graph, print SLP node
3356         addresses.
3357         (vect_slp_rearrange_stmts): Handle a SLP graph.
3358         (vect_analyze_slp_instance): Adjust and free SLP nodes from
3359         the CSE map.  Fix indenting.
3360         (vect_schedule_slp_instance): Add short-cut.
3362 2018-10-26  Martin Liska  <mliska@suse.cz>
3364         PR testsuite/86158
3365         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
3366         addr_expr and not with pointers.
3368 2018-10-26  Jan Hubicka  <jh@suse.cz>
3370         * tree.c (free_lang_data_in_type): Only check main variants.
3371         * ipa-devirt.c (warn_odr): Make static.
3372         (types_same_for_odr): Drop strict variant.
3373         (types_odr_comparable): Likewise.
3374         (odr_or_derived_type_p): Look for main variants.
3375         (odr_name_hasher::equal): Cleanup comment.
3376         (odr_subtypes_equivalent): Add warn and warned arguments; check main
3377         variants.
3378         (type_variants_equivalent_p): break out from ...
3379         (odr_types_equivalent): ... here; go for main variants where needed.
3380         (warn_odr): ... here; turn static.
3381         (warn_types_mismatch): Compare mangled names of main variants.
3382         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
3383         (type_with_linkage_p): Sanity check that we look at main variant.
3384         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
3385         * tree.h (types_same_for_odr): Drop strict argument.
3387 2018-10-26  Richard Biener  <rguenther@suse.de>
3389         PR tree-optimization/87746
3390         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
3391         Simplify and fix WRT strided store groups with size not
3392         equal to step in element count.
3393         (vect_analyze_group_access_1): Dump the whole group.
3395 2018-10-25  Carl Love  <cel@us.ibm.com>
3397         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
3398         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
3399         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
3400         precicion entry for each overloaded builtin.
3401         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
3402         VSCEDPUO): Rename overloaded name.
3403         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
3404         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
3405         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
3406         define_expand for xscmpexqp instruction.
3407         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
3409 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3410             Jinsong Ji <jji@us.ibm.com>
3412         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
3413         function with vec_sl.
3414         (_mm_slli_epi32): Likewise.
3415         (_mm_slli_epi64): Likewise.
3416         (_mm_srai_epi16): Replace deprecated function with vec_sra.
3417         (_mm_srai_epi32): Likewise.
3418         (_mm_srli_epi16): Replace deprecated function with vec_sr.
3419         (_mm_srli_epi32): Likewise.
3420         (_mm_srli_epi64): Likewise.
3421         (_mm_sll_epi16): Replace deprecated function with vec_sl.
3422         (_mm_sll_epi32): Likewise.
3423         (_mm_sll_epi64): Likewise.
3424         (_mm_sra_epi16): Replace deprecated function with vec_sra.
3425         (_mm_sra_epi32): Likewise.
3426         (_mm_srl_epi16): Replace deprecated function with vec_sr.
3427         (_mm_srl_epi32): Likewise.
3428         (_mm_srl_epi64): Likewise.
3430 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3431             Jinsong Ji <jji@us.ibm.com>
3433         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
3434         comparison operators with vec_cmp* for compatibility due to
3435         unfortunate history; clean up formatting and use types more
3436         appropriately.
3437         (_mm_sll_epi32): Likewise.
3438         (_mm_sll_epi64): Likewise.
3439         (_mm_srl_epi16): Likewise.
3440         (_mm_srl_epi32): Likewise.
3441         (_mm_srl_epi64): Likewise.
3443 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3444             Jinsong Ji <jji@us.ibm.com>
3446         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
3447         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
3448         __vector __bool int.  Use vec_cmpgt in preference to deprecated
3449         function vec_vcmpgtfp.
3450         (_mm_max_ps): Likewise.
3452 2018-10-25  Jeff Law  <law@redhat.com>
3454         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
3455         if returning false.
3457 2018-10-25  Martin Sebor  <msebor@redhat.com>
3459         * doc/extend.texi (aligned): Expand attribute description.
3460         (Alignment): Rename section.  Discuss function arguments.
3462 2018-10-25  Jan Hubicka  <jh@suse.cz>
3464         * ipa-devirt.c (main_odr_variant): Remove.
3465         (hash_odr_name, types_same_for_odr, types_odr_comparable,
3466         odr_name_hasher::equal, odr_subtypes_equivalent_p):
3467         Drop use of main_odr_variant.
3468         (add_type_duplicate): Silence confused warnings on integer types.
3469         (get_odr_type): Always look for main variant.
3470         (register_odr_type): Simplify.
3472 2018-10-25  Richard Biener  <rguenther@suse.de>
3474         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
3475         Initialize ng to silence error with release checking bootstrap.
3477 2018-10-25  Richard Biener  <rguenther@suse.de>
3479         * tree-if-conv.c: Include tree-ssa-sccvn.h.
3480         (tree_if_conversion): Run CSE on the if-converted loop body.
3482 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3484         * config/s390/constraints.md (ZL): New constraint.
3485         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
3486         operands.
3487         * config/s390/s390.md (movdi_larl): Remove.
3488         (movdi_64): Add the LARL alternative.
3490 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
3492         PR bootstrap/87747
3493         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3494         (RTX_CODE_HWINT_P): New macro.
3495         (rtx_code_size): Use RTX_CODE_HWINT_P ().
3497 2018-10-25  Jan Hubicka  <jh@suse.cz>
3499         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3500         is anonymous.
3502 2018-10-25  Richard Biener  <rguenther@suse.de>
3504         PR tree-optimization/87665
3505         PR tree-optimization/87745
3506         * tree-vectorizer.h (get_earlier_stmt): Remove.
3507         (get_later_stmt): Pick up UID from the original non-pattern stmt.
3509 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
3511         * options.texi (Deprecated): Move list to Var section.
3513 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
3514             Jinsong Ji <jji@us.ibm.com>
3516         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3517         __vector long to __vector long long.
3518         (_mm_cvtpd_ps): Likewise.
3519         (_mm_cvttpd_epi32): Likewise.
3520         (_mm_cvtpi32_pd): Likewise.
3521         (_mm_unpackhi_epi64): Likewise.
3522         (_mm_unpacklo_epi64): Likewise.
3524 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
3526         PR rtl-optimization/87720
3527         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3529 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
3531         * gimple-ssa-isolate-paths.c
3532         (find_implicit_erroneous_behavior): Do not change code if the
3533         pass is running for warnings only.
3534         (find_explicit_erroneous_behavior): Likewise.
3536 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
3538         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3539         Define as rs6000_mangle_decl_assembler_name.
3540         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3541         long double to IEEE long double, switch the names of the long
3542         double built-in functions to be <func>f128 instead of <func>l.
3544 2018-10-24  Martin Sebor  <msebor@redhat.com>
3546         * doc/extend.texi (nonnull): List no-argument form.  Reference
3547         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3549 2018-10-24  Richard Biener  <rguenther@suse.de>
3551         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3553 2018-10-24  Martin Liska  <mliska@suse.cz>
3555         PR tree-optimization/84436
3556         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3557         Remove.
3558         (switch_conversion::contains_linear_function_p): New.
3559         (switch_conversion::build_one_array): Support linear
3560         transformation on input.
3561         * tree-switch-conversion.h (struct switch_conversion): Add
3562         contains_linear_function_p declaration.
3564 2018-10-24  Richard Biener  <rguenther@suse.de>
3566         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3567         if its argument is CONSTANT_CLASS_P.
3569 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
3571         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3572         it is wrong for forward declarations.
3574 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
3576         * config/s390/s390.c (s390_check_qrst_address): Add the missing
3577         SYMBOL_REF_P () check.
3579 2018-10-24  Richard Biener  <rguenther@suse.de>
3581         PR tree-optimization/87105
3582         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3583         dump classification.
3584         (vect_analyze_data_ref_accesses): Handle duplicate loads and
3585         stores by splitting the affected group after the fact.
3586         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3587         fail the SLP build because of size constraints.
3589 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3591         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3592         * configure: Regenerate.
3593         * config.in: Regenerate.
3594         * varasm.c (mergeable_string_section): Use readonly_data_section
3595         if linker doesn't support SHF_MERGE with alignment > 8.
3596         (mergeable_constant_section): Likewise.
3598 2018-10-24  Richard Biener  <rguenther@suse.de>
3600         PR tree-optimization/84013
3601         * tree-ssa-structalias.c (struct msdi_data): New struct for
3602         marshalling data to walk_stmt_load_store_ops.
3603         (maybe_set_dependence_info): Refactor as callback for
3604         walk_stmt_load_store_ops.
3605         (compute_dependence_clique): Set restrict info on all stmt kinds.
3607 2018-10-24  Martin Liska  <mliska@suse.cz>
3609         * cgraph.c (cgraph_node::dump):
3610         Remove reduntant dumps and make tp_first_run dump more compact.
3612 2018-10-24  Richard Biener  <rguenther@suse.de>
3614         PR tree-optimization/87665
3615         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3616         to reflect reality.
3618 2018-10-12  Jeff Law  <law@redhat.com>
3620         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3621         for H8/S.
3623 2018-10-23  Richard Biener  <rguenther@suse.de>
3625         * tree-vrp.c (add_assert_info): Guard dump_printf with
3626         dump_enabled_p.
3627         * gimple-ssa-evrp-analyze.c
3628         (evrp_range_analyzer::record_ranges_from_incoming_edge):
3629         Use value_range::ignore_equivs_equal_p.
3631 2018-10-23  Richard Biener  <rguenther@suse.de>
3633         PR tree-optimization/87105
3634         PR tree-optimization/87608
3635         * passes.def (pass_all_early_optimizations): Add early phi-opt
3636         after dce.
3637         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3638         addition to debug stmts.
3639         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3640         and abs replacement early.
3641         * tree-cfg.c (gimple_empty_block_p): Likewise.
3643 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
3645         PR target/86383
3646         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3647         specified to configure.
3648         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3650 2018-10-23  Richard Biener  <rguenther@suse.de>
3652         PR tree-optimization/87700
3653         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3655 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
3657         PR target/87674
3658         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3659         second argument from __mmask16 to __mmask8.
3660         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3661         _mm_mask_packs_epi32): Likewise.
3662         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3663         Likewise.
3664         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
3666 2018-10-23  Richard Biener  <rguenther@suse.de>
3668         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3670 2018-10-23  Richard Biener  <rguenther@suse.de>
3672         PR tree-optimization/86144
3673         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3674         over simd attribute.
3676 2018-10-23  Richard Biener  <rguenther@suse.de>
3678         PR tree-optimization/87693
3679         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3680         the case we do not find the taken edge.
3682 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
3683             Jinsong Ji  <jji@us.ibm.com>
3685         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3686         (_mm_store_pd): Use unaligned vector type for pointer cast.
3687         (_mm_maskmoveu_si128): Likewise.
3688         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3689         (_mm_store_ps): Use unaligned vector type for pointer cast.
3691 2018-10-22  Paul Koning  <ni1d@arrl.net>
3693         * symtab.c (symtab_node::increase_alignment): Correct max
3694         alignment check.
3696 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
3698         PR tree-optimization/87633
3699         * match.pd: Do not generate unordered integer comparisons.
3701 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3703         PR rtl-optimization/87600
3704         * combine.c: Add include of expr.h.
3705         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3706         register to a pseudo.
3707         (make_more_copies): New function, add a copy to a new pseudo after
3708         the moves from hard registers into pseudos.
3709         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3710         later.  Call make_more_copies.
3712 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
3714         * lra-constraints.c (process_alt_operands): New local array,
3715         matching_early_clobber.  Check matching_early_clobber before
3716         decrementing reject, and set matching_early_clobber after.
3718 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
3720         PR target/87598
3721         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3722         call output_addr_const and hope for the best.
3724 2018-10-22  Richard Biener  <rguenther@suse.de>
3726         * gimple-ssa-evrp-analyze.c
3727         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3728         smarter about what ranges to use.
3729         * tree-vrp.c (add_assert_info): Dump here.
3730         (register_edge_assert_for_2): Instead of here at multiple but
3731         not all places.
3733         * gcc.dg/tree-ssa/evrp12.c: New testcase.
3734         * gcc.dg/predict-6.c: Adjust.
3735         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3736         * gcc.dg/tree-ssa/vrp02.c: Likewise.
3737         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3739 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
3740         Richard Biener  <rguenther@suse.de>
3742         * bitmap.h: Update data structure documentation, including a
3743         description of bitmap views as either linked-lists or splay trees.
3744         (struct bitmap_element_def): Update comments for splay tree bitmaps.
3745         (struct bitmap_head_def): Likewise.
3746         (bitmap_list_view, bitmap_tree_view): New prototypes.
3747         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3748         tree_form fields.
3749         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3750         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3751         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3752         released bitmap element here.
3753         (bitmap_element_free): Remove.
3754         (bitmap_elt_clear_from): Work on splay tree bitmaps.
3755         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
3756         this function similar ones such that linked-list bitmap implementation
3757         functions are grouped.
3758         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3759         and moved for grouping.
3760         (bitmap_list_insert_element_after): Renamed from
3761         bitmap_elt_insert_after, and moved for grouping.
3762         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3763         (bitmap_tree_link_left, bitmap_tree_link_right,
3764         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3765         bitmap_tree_link_element, bitmap_tree_unlink_element,
3766         bitmap_tree_find_element): New functions for splay-tree bitmap
3767         implementation.
3768         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3769         Renamed and moved, see above entries.
3770         (bitmap_tree_listify_from): New function to convert part of a splay
3771         tree bitmap to a linked-list bitmap.
3772         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3773         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3774         (bitmap_find_bit): Remove.
3775         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3776         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3777         Handle splay tree bitmaps.
3778         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3779         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3780         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3781         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3782         bitmap_intersect_compl_p, bitmap_ior_and_compl,
3783         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3784         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
3785         corresponding changes to use linked-list specific bitmap_element
3786         manipulation functions as applicable for efficiency.
3787         (bitmap_tree_to_vec): New function.
3788         (debug_bitmap_elt_file): New function split out from ...
3789         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
3790         (bitmap_print): Likewise.
3792         PR tree-optimization/63155
3793         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3794         SSA edge worklists.
3795         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3796         in tree-view.
3798 2018-10-22  Martin Liska  <mliska@suse.cz>
3800         PR tree-optimization/87686
3801         Revert
3802         2018-08-29  Martin Liska  <mliska@suse.cz>
3804         * tree-switch-conversion.c (switch_conversion::expand):
3805         Strenghten assumption about gswitch statements.
3807 2018-10-22  Martin Liska  <mliska@suse.cz>
3809         * ipa-icf.c (sem_item::compare_attributes): Remove.
3810         (sem_item::compare_referenced_symbol_properties): Use
3811         attribute_list_equal instead.
3812         (sem_function::equals_wpa): Likewise.
3813         * ipa-icf.h: Remove compare_attributes.
3815 2018-10-22  Richard Biener  <rguenther@suse.de>
3817         PR middle-end/87682
3818         * mem-stats.h (mem_usage::operator==): Fix pasto.
3820 2018-10-22  Richard Biener  <rguenther@suse.de>
3822         PR tree-optimization/87640
3823         * tree-vrp.c (set_value_range_with_overflow): Decompose
3824         incomplete result.
3825         (extract_range_from_binary_expr_1): Adjust.
3827 2018-10-22  Martin Jambor  <mjambor@suse.cz>
3829         * tree-eh.h (stmt_could_throw_p): Add function parameter.
3830         (stmt_can_throw_external): Likewise.
3831         (stmt_can_throw_internal): Likewise.
3832         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3833         (lower_eh_constructs_2): Likewise.
3834         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3835         (stmt_can_throw_external): Likewise.
3836         (stmt_can_throw_internal): Likewise.
3837         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3838         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3839         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3840         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3841         (pass_lower_eh_dispatch::execute): Pass cfun to
3842         stmt_can_throw_external.
3843         (cleanup_empty_eh): Likewise.
3844         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3845         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3846         stmt_can_throw_external instead of pushing it to cfun.
3847         (symbol_table::create_edge): Likewise.
3848         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3849         stmt_can_throw_internal.
3850         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3851         to stmt_could_throw_p.
3852         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3853         stmt_can_throw_internal.
3854         (pass_store_merging::execute): Likewise.
3855         * gimple-ssa-strength-reduction.c
3856         (find_candidates_dom_walker::before_dom_children): Pass cfun to
3857         stmt_could_throw_p.
3858         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3859         stmt_can_throw_internal.
3860         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3861         to stmt_can_throw_external.
3862         (check_stmt): Pass cfun to stmt_could_throw_p.
3863         (check_stmt): Pass cfun to stmt_can_throw_external.
3864         (pass_nothrow::execute): Likewise.
3865         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3866         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3867         stmt_can_throw_internal.
3868         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3869         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3870         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3871         * tree-complex.c (expand_complex_libcall): Pass cfun to
3872         stmt_could_throw_p and to stmt_can_throw_internal.
3873         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3874         * tree-inline.c (copy_edges_for_bb): Likewise.
3875         (maybe_move_debug_stmts_to_successors): Likewise.
3876         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3877         stmt_could_throw_p.
3878         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3879         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3880         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3881         stmt_can_throw_internal.
3882         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3883         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3884         stmt_could_throw_p.
3885         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3886         stmt_can_throw_internal.
3887         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3888         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3889         stmt_could_throw_p.
3890         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3891         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3892         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3893         (convert_mult_to_fma_1): Likewise.
3894         (convert_to_divmod): Likewise.
3895         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3896         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3897         * tree-ssa-propagate.c
3898         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3899         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3900         (maybe_optimize_range_tests): Likewise.
3901         (linearize_expr_tree): Likewise.
3902         (reassociate_bb): Likewise.
3903         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3904         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3905         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3906         (handle_char_store): Likewise.
3907         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3908         stmt_can_throw_internal.
3909         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3910         stmt_could_throw_p.
3911         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3912         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3913         (vectorizable_simd_clone_call): Likewise.
3914         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3915         (gimple_stringop_fixed_value): Likewise.
3917 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
3919         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3920         literal pool references.
3921         (s390_check_qrst_address): Adapt to the new behavior of
3922         s390_loadrelative_operand_p ().
3924 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3926         PR target/72782
3927         * config/i386/sse.md (*andnot<mode>3_bcst): New.
3929 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3931         PR target/72782
3932         * config/i386/sse.md (*<code><mode>3_bcst): New.
3934 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
3936         PR target/72782
3937         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3938         V4DI, V16SI and V8DI.
3939         (*sub<mode>3<mask_name>_bcst): New.
3940         (*add<mode>3<mask_name>_bcst): Likewise.
3942 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
3943             Jinsong Ji  <jji@us.ibm.com>
3945         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3946         __m64 with __vector unsigned long long for compatibility.
3947         (_mm_movemask_epi8): Likewise.
3948         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3949         (_mm_cvttps_pi32): Likewise.
3950         (_mm_cvtpi32_ps): Likewise.
3951         (_mm_cvtps_pi16): Likewise.
3952         (_mm_loadh_pi): Likewise.
3953         (_mm_storeh_pi): Likewise.
3954         (_mm_movehl_ps): Likewise.
3955         (_mm_movelh_ps): Likewise.
3956         (_mm_loadl_pi): Likewise.
3957         (_mm_storel_pi): Likewise.
3958         (_mm_movemask_ps): Likewise.
3959         (_mm_shuffle_pi16): Likewise.
3961 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3963         PR target/72782
3964         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3965         __builtin_ia32_vfnmsubpd512_mask.
3966         (_mm512_mask_fnmsub_round_pd): Likewise.
3967         (_mm512_fnmsub_pd): Likewise.
3968         (_mm512_mask_fnmsub_pd): Likewise.
3969         (_mm512_maskz_fnmsub_round_pd): Use
3970         __builtin_ia32_vfnmsubpd512_maskz.
3971         (_mm512_maskz_fnmsub_pd): Likewise.
3972         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3973         (_mm512_mask_fnmsub_round_ps): Likewise.
3974         (_mm512_fnmsub_ps): Likewise.
3975         (_mm512_mask_fnmsub_ps): Likewise.
3976         (_mm512_maskz_fnmsub_round_ps): Use
3977         __builtin_ia32_vfnmsubps512_maskz.
3978         (_mm512_maskz_fnmsub_ps): Likewise.
3979         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3980         __builtin_ia32_vfnmsubpd256_mask.
3981         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3982         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3983         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3984         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3985         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3986         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3987         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3988         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3989         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3990         __builtin_ia32_vfnmsubpd.
3991         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3992         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3993         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3994         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3995         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3996         * config/i386/i386-builtin.def: Add
3997         __builtin_ia32_vfnmsubpd256_mask,
3998         __builtin_ia32_vfnmsubpd256_maskz,
3999         __builtin_ia32_vfnmsubpd128_mask,
4000         __builtin_ia32_vfnmsubpd128_maskz,
4001         __builtin_ia32_vfnmsubps256_mask,
4002         __builtin_ia32_vfnmsubps256_maskz,
4003         __builtin_ia32_vfnmsubps128_mask,
4004         __builtin_ia32_vfnmsubps128_maskz,
4005         __builtin_ia32_vfnmsubpd512_mask,
4006         __builtin_ia32_vfnmsubpd512_maskz,
4007         __builtin_ia32_vfnmsubps512_mask,
4008         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
4009         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
4010         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
4011         __builtin_ia32_vfnmsubpd256.
4012         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
4013         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
4014         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
4015         Likewise.
4016         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
4017         Likewise.
4018         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
4019         Likewise.
4020         (fmai_vmfnmsub_<mode><round_name>): Likewise.
4022 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4024         PR target/72782
4025         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
4026         __builtin_ia32_vfnmaddpd512_mask.
4027         (_mm512_mask_fnmadd_round_pd): Likewise.
4028         (_mm512_fnmadd_pd): Likewise.
4029         (_mm512_mask_fnmadd_pd): Likewise.
4030         (_mm512_maskz_fnmadd_round_pd): Use
4031         __builtin_ia32_vfnmaddpd512_maskz.
4032         (_mm512_maskz_fnmadd_pd): Likewise.
4033         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
4034         (_mm512_mask_fnmadd_round_ps): Likewise.
4035         (_mm512_fnmadd_ps): Likewise.
4036         (_mm512_mask_fnmadd_ps): Likewise.
4037         (_mm512_maskz_fnmadd_round_ps): Use
4038         __builtin_ia32_vfnmaddps512_maskz.
4039         (_mm512_maskz_fnmadd_ps): Likewise.
4040         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
4041         __builtin_ia32_vfnmaddpd256_mask.
4042         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
4043         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
4044         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
4045         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4046         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4047         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
4048         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
4049         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
4050         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
4051         __builtin_ia32_vfnmaddpd.
4052         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
4053         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
4054         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
4055         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
4056         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
4057         * config/i386/i386-builtin.def: Add
4058         __builtin_ia32_vfnmaddpd256_mask,
4059         __builtin_ia32_vfnmaddpd256_maskz,
4060         __builtin_ia32_vfnmaddpd128_mask,
4061         __builtin_ia32_vfnmaddpd128_maskz,
4062         __builtin_ia32_vfnmaddps256_mask,
4063         __builtin_ia32_vfnmaddps256_maskz,
4064         __builtin_ia32_vfnmaddps128_mask,
4065         __builtin_ia32_vfnmaddps128_maskz,
4066         __builtin_ia32_vfnmaddpd512_mask,
4067         __builtin_ia32_vfnmaddpd512_maskz,
4068         __builtin_ia32_vfnmaddps512_mask,
4069         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4070         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4071         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4072         __builtin_ia32_vfnmaddpd256.
4073         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4074         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4075         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4076         Likewise.
4077         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4078         Likewise.
4079         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4080         Likewise.
4081         (fmai_vmfnmadd_<mode><round_name>): Likewise.
4083 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4085         PR target/72782
4086         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4087         __builtin_ia32_vfmsubpd512_mask.
4088         (_mm512_mask_fmsub_round_pd): Likewise.
4089         (_mm512_fmsub_pd): Likewise.
4090         (_mm512_mask_fmsub_pd): Likewise.
4091         (_mm512_maskz_fmsub_round_pd): Use
4092         __builtin_ia32_vfmsubpd512_maskz.
4093         (_mm512_maskz_fmsub_pd): Likewise.
4094         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4095         (_mm512_mask_fmsub_round_ps): Likewise.
4096         (_mm512_fmsub_ps): Likewise.
4097         (_mm512_mask_fmsub_ps): Likewise.
4098         (_mm512_maskz_fmsub_round_ps): Use
4099         __builtin_ia32_vfmsubps512_maskz.
4100         (_mm512_maskz_fmsub_ps): Likewise.
4101         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4102         __builtin_ia32_vfmsubpd256_mask.
4103         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4104         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4105         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4106         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4107         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4108         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4109         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4110         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4111         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4112         __builtin_ia32_vfmsubpd.
4113         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4114         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4115         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4116         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4117         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4118         * config/i386/i386-builtin.def: Add
4119         __builtin_ia32_vfmsubpd256_mask,
4120         __builtin_ia32_vfmsubpd256_maskz,
4121         __builtin_ia32_vfmsubpd128_mask,
4122         __builtin_ia32_vfmsubpd128_maskz,
4123         __builtin_ia32_vfmsubps256_mask,
4124         __builtin_ia32_vfmsubps256_maskz,
4125         __builtin_ia32_vfmsubps128_mask,
4126         __builtin_ia32_vfmsubps128_maskz,
4127         __builtin_ia32_vfmsubpd512_mask,
4128         __builtin_ia32_vfmsubpd512_maskz,
4129         __builtin_ia32_vfmsubps512_mask,
4130         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4131         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4132         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4133         __builtin_ia32_vfmsubpd256.
4134         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4135         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4136         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4137         Likewise.
4138         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4139         Likewise.
4140         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4141         Likewise.
4142         (fmai_vmfmsub_<mode><round_name>): Likewise.
4144 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4146         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4147         Remove plus.  Renamed to ...
4148         (*sub<mode>3<mask_name>_bcst): This.
4149         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4150         (*add<mode>3<mask_name>_bcst): This.
4152 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4154         PR target/72782
4155         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4157 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4159         PR target/87662
4160         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4161         (_mm_or_epi32): Likewise.
4162         (_mm256_xor_epi32): Likewise.
4163         (_mm_xor_epi32): Likewise.
4164         (_mm256_or_epi64): Likewise.
4165         (_mm_or_epi64): Likewise.
4166         (_mm256_xor_epi64): Likewise.
4167         (_mm_xor_epi64): Likewise.
4169 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
4171         PR target/72782
4172         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4174 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
4176         PR middle-end/87647
4177         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4179 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
4181         * doc/ux.texi: Move @section directly after @node.
4183 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
4185         PR middle-end/85488
4186         PR middle-end/87649
4187         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4188         depend closely nested inside of loop with ordered clause with
4189         a parameter.
4191 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
4193         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4194         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4195         * doc/ux.texi: New file.
4197 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
4199         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4200         be the first CR field allocated.
4202 2018-10-19  Richard Biener  <rguenther@suse.de>
4204         PR target/87657
4205         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4206         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4208 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
4210         PR target/72782
4211         * config/i386/sse.md
4212         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4213         (*add<mode>3<mask_name>_bcst_2): Likewise.
4215 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
4217         * config/i386/sse.md
4218         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4219         Replace nonimmediate_operand with register_operand.
4220         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4221         Likewise.
4222         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4223         Likewise.
4225 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
4227         PR rtl-optimization/87596
4228         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4229         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4230         for instructions in FROM..TO range.
4232 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
4234         * cfgexpand.c (expand_one_var): Use specific wording in error message
4235         for non-local frame variables.
4236         * stor-layout.c (layout_decl): Do not issue a warning for them.
4238 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
4240         * haifa-sched.c (priority): Add force_recompute parameter.
4241         (apply_replacement): Call priority () with force_recompute = true.
4242         (restore_pattern): Likewise.
4244 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
4246         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
4247         HOST_BITS_PER_WIDE_INT.
4248         (test_vector_ops_duplicate): Likewise.
4250 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
4252         PR target/72782
4253         * config/i386/sse.md (VF_AVX512): New.
4254         (avx512bcst): Likewise.
4255         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4256         Likewise.
4257         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4258         Likewise.
4259         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4260         Likewise.
4262 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
4264         * doc/invoke.texi (-dumpversion): Improve grammar.
4265         (-dumpfullversion): Make more consistent with -dumpversion.
4267 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
4269         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
4270         Set JUMP_LABEL to the jump insn.
4271         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
4272         Predict emitted jump and add label to jump insn.
4274 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
4276         PR tree-optimization/87562
4277         * input.c (get_substring_ranges_for_loc): Use
4278         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
4279         getting the linemap for the endpoint.  Verify that it's either
4280         in the same linemap as the start point's spelling location, or
4281         at least in the same file.
4283 2018-10-18  Richard Biener  <rguenther@suse.de>
4285         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
4286         feed width-specific load/store costs through ix86_vec_cost.
4287         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
4288         (k8_cost): Likewise.
4289         (bdver_cost): Likewise.
4290         (znver1_cost): Likewise.
4291         (btver1_cost): Likewise.
4292         (btver2_cost): Likewise.
4294 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
4296         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
4297         to simplify subreg of vec_merge.
4299 2018-10-18  Richard Biener  <rguenther@suse.de>
4301         * config/i386/i386.c: Fix costing of vector FMA.
4303 2018-10-18  Richard Biener  <rguenther@suse.de>
4305         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
4306         and argument.
4307         (ix86_builtin_vectorization_cost): For vec_construct properly
4308         cost insertion into SSE regs.
4309         (...): Adjust calls to ix86_vec_cost.
4311 2018-10-18  Richard Biener  <rguenther@suse.de>
4313         PR middle-end/87087
4314         Revert
4315         2018-02-07  Richard Biener  <rguenther@suse.de>
4317         PR tree-optimization/84204
4318         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
4319         this place.
4321 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
4323         PR target/87537
4324         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
4325         of vec_duplicate.
4326         (test_vector_ops_duplicate): Add test for a scalar subreg of a
4327         VEC_MERGE of a VEC_DUPLICATE.
4329 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
4331         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
4332         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
4333         * doc/standards.texi (C Language): Document C2X.
4334         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
4335         (rl78_option_override): Handle "GNU C2X" language name.
4337 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
4339         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
4340         Document C17 as published in 2018.
4342 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
4344         PR middle-end/87623
4345         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
4346         bail out if both sides do not have the same storage order.
4348 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4350         * bitmap.c (bitmap_head::dump): New.
4351         * bitmap.h (bitmap_head): Add dump().
4352         * gimple-ssa-evrp-analyze.c
4353         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
4354         (evrp_range_analyzer::set_ssa_range_info): Same.
4355         (evrp_range_analyzer::record_ranges_from_phis): Same.
4356         (evrp_range_analyzer::record_ranges_from_stmt): Same.
4357         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
4358         * gimple-ssa-sprintf.c (get_int_range): Same.
4359         (format_integer): Same.
4360         (sprintf_dom_walker::handle_gimple_call): Same.
4361         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
4362         (ipcp_vr_lattice::top_p): Same.
4363         (ipcp_vr_lattice::bottom_p): Same.
4364         (ipcp_vr_lattice::set_to_bottom): Same.
4365         (ipa_vr_operation_and_type_effects): Same.
4366         (propagate_vr_across_jump_function): Same.
4367         (ipcp_store_vr_results): Same.
4368         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
4369         (ipa_print_node_jump_functions_for_edge): Same.
4370         (ipa_get_value_range): Same.
4371         (ipa_compute_jump_functions_for_edge): Same.
4372         (ipa_write_jump_function): Same.
4373         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
4374         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
4375         Same.
4376         * vr-values.c (set_value_range_to_nonnegative): Same.
4377         (set_value_range_to_truthvalue): Same.
4378         (vr_values::get_value_range): Same.
4379         (vr_values::set_defs_to_varying): Same.
4380         (vr_values::update_value_range): Same.
4381         (symbolic_range_based_on_p): Same.
4382         (vr_values::op_with_boolean_value_range_p): Same.
4383         (vr_values::extract_range_for_var_from_comparison_expr): Same.
4384         (vr_values::extract_range_from_ssa_name): Same.
4385         (vr_values::extract_range_from_binary_expr): Same.
4386         (vr_values::extract_range_from_unary_expr): Same.
4387         (vr_values::extract_range_from_cond_expr): Same.
4388         (vr_values::extract_range_from_comparison): Same.
4389         (vr_values::check_for_binary_op_overflow): Same.
4390         (vr_values::extract_range_basic): Same.
4391         (vr_values::extract_range_from_assignment): Same.
4392         (compare_ranges): Same.
4393         (compare_range_with_value): Same.
4394         (vr_values::adjust_range_with_scev): Same.
4395         (vrp_valueize): Same.
4396         (vrp_valueize_1): Same.
4397         (vr_values::get_vr_for_comparison): Same.
4398         (vr_values::compare_name_with_value): Same.
4399         (vr_values::compare_names): Same.
4400         (vr_values::vrp_evaluate_conditional): Same.
4401         (find_case_label_ranges): Same.
4402         (vr_values::vrp_visit_switch_stmt): Same.
4403         (vr_values::extract_range_from_phi_node): Same.
4404         (vr_values::simplify_div_or_mod_using_ranges): Same.
4405         (vr_values::simplify_bit_ops_using_ranges): Same.
4406         (test_for_singularity): Same.
4407         (range_fits_type_p): Same.
4408         (vr_values::simplify_cond_using_ranges_1): Same.
4409         (vr_values::simplify_switch_using_ranges): Same.
4410         (vr_values::simplify_float_conversion_using_ranges): Same.
4411         (vr_values::two_valued_val_range_p): Same.
4412         (vr_values::add_equivalence): Move to value_range::equiv_add.
4413         * vr-values.h (vr_values::add_equivalence): Remove.
4414         (VR_INITIALIZER): Remove.
4415         * tree-vrp.c (value_range::set): New.
4416         (value_range::equiv_add): New.
4417         (value_range::value_range): New.
4418         (value_range::deep_copy): New.
4419         (value_range::check): New.
4420         (value_range::equal_p): New.
4421         (value_range::ignore_equivs_equal_p): New.
4422         (value_range::operator==): New.
4423         (value_range::operator!=): New.
4424         (value_range::symbolic_p): New.
4425         (value_range::numeric_p): New.
4426         (value_range::set_undefined): New.
4427         (value_range::set_varying): New.
4428         (value_range::may_contain_p): New.
4429         (value_range::equiv_clear): New.
4430         (value_range::singleton_p): New.
4431         (value_range::intersect): New.
4432         (value_range::dump): New.
4433         (value_range::set_and_canonicalize): New.
4434         (set_value_range): Adjust for value_range API.
4435         (set_value_range_to_undefined): Same.
4436         (set_value_range_to_varying): Same.
4437         (set_and_canonicalize_value_range): Same.
4438         (set_value_range_to_nonnull): Same.
4439         (set_value_range_to_null): Same.
4440         (range_is_null): Same.
4441         (range_is_nonnull): Same.
4442         (range_int_cst_p): Same.
4443         (range_int_cst_singleton_p): Same.
4444         (symbolic_range_p): Same.
4445         (range_includes_zero_p): Same.
4446         (value_range_constant_singleton): Same.
4447         (vrp_set_zero_nonzero_bits): Same.
4448         (ranges_from_anti_range): Same.
4449         (extract_range_into_wide_ints): Same.
4450         (extract_range_from_multiplicative_op): Same.
4451         (set_value_range_with_overflow): Same.
4452         (extract_range_from_binary_expr_1): Same.
4453         (extract_range_from_unary_expr): Same.
4454         (dump_value_range): Same.
4455         (debug_value_range): Same.
4456         (vrp_prop::check_array_ref): Same.
4457         (vrp_prop::check_mem_ref): Same.
4458         (vrp_prop::vrp_initialize): Same.
4459         (vrp_prop::visit_stmt): Same.
4460         (intersect_ranges): Same.
4461         (vrp_prop::visit_phi): Same.
4462         (vrp_prop::vrp_finalize): Same.
4463         (determine_value_range_1): Same.
4464         (determine_value_range): Same.
4465         (vrp_intersect_ranges_1): Rename to...
4466         (vrp_intersect_1): this.
4467         (vrp_intersect_ranges): Rename to...
4468         (value_range::intersect_helper): ...this.
4469         (vrp_meet_1): Rename to...
4470         (value_range::union_helper): ...this.
4471         (vrp_meet): Rename to...
4472         (value_range::union_): ...this.
4473         (copy_value_range): Remove.
4474         * tree-vrp.h (struct value_range): Rewrite into a proper class.
4475         (value_range::vrtype): New.
4476         (value_range::type): New.
4477         (value_range::equiv): New.
4478         (value_range::min): New.
4479         (value_range::max): New.
4480         (value_range::varying_p): New.
4481         (value_range::undefined_p): New.
4482         (value_range::null_p): New.
4483         (value_range::equiv_add): New.
4484         (copy_value_range): Remove.
4486 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
4488         * Makefile.in (SELFTEST_TARGETS): New.
4489         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
4490         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4491         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4492         c/Make-lang.in.
4493         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4494         (selftest-c++-gdb, selftest-c++-valgrind): Move to
4495         cp/Make-lang.in.
4496         * configure: Regenerate.
4497         * configure.ac (selftest_languages): New.
4499 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4501         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4502         overflow wraps argument.
4503         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4504         wide_int_range_multiplicative_op.
4505         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4506         overflow wraps argument.
4507         (wide_int_range_multiplicative_op): Same.
4508         (wide_int_range_lshift): Same.
4509         (wide_int_range_div): Same.
4510         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4511         (wide_int_range_lshift): Same.
4512         (wide_int_range_div): Same.
4514 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
4516         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4517         use sign as argument.
4518         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4519         wide_int_range_shift_undefined_p.
4521 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4523         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4524         Rename to...
4525         (@despeculate_copy<ALLI_TI:mode>): ... This.
4526         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4527         switch statement.
4529 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4531         * config.gcc: Obsolete *-*-solaris2.10*.
4532         * doc/install.texi (Specific, *-*-solaris2*): Document it.
4534 2018-10-12  Jeff Law  <law@redhat.com>
4536         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4537         reg + sym +- const_int addressing modes.
4539 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
4541         * common.opt (fdiagnostics-minimum-margin-width=): New option.
4542         * diagnostic-show-locus.c (layout::layout): Apply the minimum
4543         margin width.
4544         (layout::start_annotation_line): Only print up to 3 of the
4545         margin character, to avoid touching the left-hand side.
4546         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4547         minimum margin width, as set by test_diagnostic_context's ctor.
4548         (selftest::test_fixit_insert_containing_newline): Likewise.
4549         (selftest::test_fixit_insert_containing_newline_2): Likewise.
4550         (selftest::test_line_numbers_multiline_range): Clear
4551         dc.min_margin_width.
4552         * diagnostic.c (diagnostic_initialize): Initialize
4553         min_margin_width.
4554         * diagnostic.h (struct diagnostic_context): Add field
4555         "min_margin_width".
4556         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4557         * opts.c (common_handle_option): Handle
4558         OPT_fdiagnostics_minimum_margin_width_.
4559         * selftest-diagnostic.c
4560         (selftest::test_diagnostic_context::test_diagnostic_context):
4561         Initialize min_margin_width to 6.
4562         * toplev.c (general_init): Initialize global_dc->min_margin_width.
4564 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
4566         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4567         Fix usage of "error_at_rich_loc" in the comment.
4569 2018-10-15  Renlin Li  <renlin.li@arm.com>
4571         PR target/87563
4572         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4573         if-conversioned loop when it contains ifn with types not
4574         supported by backend.
4575         * internal-fn.c (expand_direct_optab_fn): Add an assert.
4576         (direct_internal_fn_supported_p): New helper function.
4577         * internal-fn.h (direct_internal_fn_supported_p): Declare.
4579 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
4581         PR target/87572
4582         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4583         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4584         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4586 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
4588         PR tree-optimization/87022
4589         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4590         bits in dist vector rather than the first one.
4592 2018-10-15  Richard Biener  <rguenther@suse.de>
4594         PR middle-end/87610
4595         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4596         (visit_loadstore): When a used restrict tag escaped verify that
4597         the points-to solution of "other" pointers do not include
4598         escaped.
4599         (compute_dependence_clique): If a used restrict tag escaped
4600         communicated that down to visit_loadstore.
4602 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
4604         * config/s390/s390.c (s390_expand_vec_init): Force vector element
4605         into reg if it isn't a general operand.
4607 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4609         PR target/87599
4610         * config/i386/sse.md (*vec_dupv2di): Add register source to
4611         movddup.
4613 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
4615         PR target/87572
4616         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4617         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4618         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4619         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4621 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
4623         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4624         (notice_args_size): Set it in the current trace if no insn that can
4625         throw internally has been seen yet.
4626         (connect_traces): When connecting args_size between traces, allow the
4627         incoming values not to match if there is an insn setting it before the
4628         first insn that can throw internally; in that case, force the creation
4629         of a CFI note on this latter insn.
4631 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
4633         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4634         the base class, because using the injected-class-name was not clearly
4635         specified until DR 176.
4637 2018-10-12  Paul Koning  <ni1d@arrl.net>
4639         * config/pdp11/pdp11.md (doloop_end): New expander.
4640         (doloop_end_insn): renamed from "doloop_end".
4641         (addqi3): New pattern.
4642         (subqi3): New pattern.
4643         * config/pdp11/predicates.md (incdec_operand): New predicate.
4645 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
4647         PR middle-end/81376
4648         * real.c (format_helper::can_represent_integral_type_p): New function
4649         * real.h (format_helper::can_represent_integral_type_p): Ditto.
4650         * match.pd: New pattern.
4652 2018-10-12  Alexandre Oliva <oliva@adacore.com>
4654         * configure.ac: Introduce --enable-large-address-aware
4655         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4656         * doc/install.texi: Document it.
4657         * configure, config.in: Rebuilt.
4658         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4659         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4660         (LINK_SPEC): Insert it.
4661         * config/i386/mingw-w64.h: Likewise.
4663         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4665 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
4667         PR rtl-optimization/87600
4668         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4670 2018-10-12  Paul Koning  <ni1d@arrl.net>
4672         * doc/md.texi (doloop_end): Document that the pattern code may
4673         need to check operand mode.
4675 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
4677         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4678         to zero-extend between int and floating-point registers.
4679         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4680         ldp into floating-point registers.  Add type and arch attributes.
4681         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4682         Use f_loads for type attribute.
4684 2018-10-11  Martin Sebor  <msebor@redhat.com>
4686         * doc/extend.texi (attribute packed): Correct typos.
4688 2018-10-11  Martin Sebor  <msebor@redhat.com>
4690         * doc/extend.texi (attribute flatten): Mention interaction with
4691         noinline.
4693 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
4695         PR target/87156
4696         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4697         Set new_decl virtual flag to zero.
4699 2018-10-11  Martin Sebor  <msebor@redhat.com>
4701         PR middle-end/87593
4702         * doc/extend.texi (attribute format_arg): Discuss using multiple
4703         attributes on a single function.
4705 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
4707         PR tree-optimization/86829
4708         * match.pd (sin (atan (x))): New simplification rules.
4709         (cos (atan (x))): Likewise.
4710         * real.c (build_sinatan_real): New function.
4711         * real.h (build_sinatan_real): Prototype.
4713 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
4715         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4716         function.
4717         (fold_mergeeo_helper): New helper function.
4718         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4719         intrinsics.  Correct some whitespace indentation issues.
4721 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
4723         PR target/87511
4724         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4725         Use HOST_WIDE_INT_1U for shift.
4727 2018-10-11  Doug Rupp  <rupp@adacore.com>
4728             Olivier Hainque  <hainque@adacore.com>
4730         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4731         Pass --relax to the linker for RTPs.
4732         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4734 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
4735             Jan Hubicka  <jh@suse.cz>
4736             Martin Jambor  <mjambor@suse.cz>
4738         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4739         the same elements are repeated rather than printing all of them.
4740         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4741         "repeated" elements.
4742         * read-rtl-function.c (test_loading_repeat): New function.
4743         (read_rtl_function_c_tests): Call test_loading_repeat.
4744         * rtl-tests.c (test_dumping_repeat): New function.
4745         (rtl_tests_c_tests): Call test_dumping_repeat.
4747 2018-10-11  Richard Biener  <rguenther@suse.de>
4749         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4750         bdver?_cost): Unify to ...
4751         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4752         * config/i386/i386.c (processor_cost_table): Adjust.
4754 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
4756         PR middle-end/87574
4757         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4758         the thunk when expanding to GIMPLE.
4760 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4762         * varasm.c (mergeable_string_section): Don't try to move zero-length
4763         strings to the merge section.
4765 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
4767         PR target/87573
4768         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4770 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
4772         PR target/87550
4773         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4774         to special_args set.
4776 2018-10-10  Richard Biener  <rguenther@suse.de>
4778         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4779         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4780         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4781         and recursing and pattern terminating the recursion on SSE
4782         vector width using ix86_expand_reduc.
4783         (reduc_sminmax_scal_<mode>): Split into part reducing to half
4784         width and recursing and SSE2 vector variant doing the final
4785         reduction with ix86_expand_reduc.
4786         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4787         with terminating the recursion at AVX level, splitting that
4788         to SSE there.
4790 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
4792         * genmatch.c (error_cb): Rename to...
4793         (diagnostic_cb): ...this, converting int params to enums.
4794         (fatal_at): Update for renaming.
4795         (warning_at): Likewise.
4796         (main): Likewise.
4797         * input.c (selftest::ebcdic_execution_charset::apply):
4798         Update for renaming of...
4799         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4800         to...
4801         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4802         converting level and reason to enums.
4803         (class selftest::lexer_error_sink): Rename to...
4804         (class selftest::lexer_test_options): ...this, renaming field
4805         "m_errors" to "m_diagnostics".
4806         (selftest::lexer_test_options::apply): Update for renaming of...
4807         (selftest::lexer_test_options::on_error): ...this, renaming to...
4808         (selftest::lexer_test_options::on_diagnostic): ...this
4809         converting level and reason to enums.
4810         (selftest::test_lexer_string_locations_raw_string_unterminated):
4811         Update for renamings.
4812         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4813         "reason".
4815 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
4817         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4818         * config/rs6000/pmmintrin.h: New file.
4820 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
4822         PR tree-optimization/86659
4823         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4825 2018-10-09  Richard Biener  <rguenther@suse.de>
4827         PR tree-optimization/63155
4828         * tree-ssa-structalias.c: Include tree-ssa.h.
4829         (get_constraint_for_ssa_var): For undefs return nothing_id.
4830         (find_func_aliases): Cleanup PHI handling.
4832 2018-10-09  Richard Biener  <rguenther@suse.de>
4834         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4835         replacements.
4837 2018-10-09  Martin Liska  <mliska@suse.cz>
4839         * asan.c (asan_emit_stack_protection): If a stack variable
4840         is located in a same file as current function, then emit
4841         line info into variable definition string.
4843 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4845         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4846         information.
4848 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4850         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4851         on the thunk.
4853 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
4855         PR tree-optimization/86659
4856         * gimple-match.h (struct gimple_match_op): Add reverse field.
4857         (gimple_match_op::set_op): New overloaded method.
4858         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4859         the REF_REVERSE_STORAGE_ORDER flag on the value.
4860         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4861         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4863 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
4865         PR middle-end/63155
4866         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4867         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4869 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
4871         PR target/87517
4872         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4873         Defined with __builtin_ia32_vfmaddsubpd512_mask.
4875 2018-10-08  Richard Biener  <rguenther@suse.de>
4877         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4878         cost the same as AVX128 ones.
4880 2018-10-08  Paul Koning  <ni1d@arrl.net>
4882         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4883         (expand_block_move): New function.
4884         * config/pdp11/pdp11.c (output_block_move): Remove.
4885         (expand_block_move): New function.
4886         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4887         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4888         (*movmemhi1): Remove.
4890 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
4892         * config/s390/2827.md: Increase latencies for some FP instructions.
4894 2018-10-08  Richard Biener  <rguenther@suse.de>
4896         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4897         Open a dump scope.
4898         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4899         * tree-vectorizer.h (dump_stmt_cost): Adjust.
4900         (add_stmt_cost): Dump return value of the hook.
4902 2018-10-08  Richard Biener  <rguenther@suse.de>
4904         PR tree-optimization/63155
4905         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4906         (ssa_propagation_engine::ssa_propagate): Remove redundant
4907         bitmap bit clearing.
4909 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
4911         PR rtl-optimization/86939
4912         PR rtl-optimization/87479
4913         * ira.h (non_conflicting_reg_copy_p): New prototype.
4914         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4915         (make_hard_regno_dead): Don't add conflicts for register
4916         ignore_reg_for_conflicts.
4917         (make_object_dead): Likewise.
4918         (non_conflicting_reg_copy_p): New function.
4919         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4920         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4921         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4922         (make_hard_regno_dead): Don't add conflicts for register
4923         ignore_reg_for_conflicts.  Remove special conflict handling of
4924         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
4925         check_pic_pseudo_p and update callers.
4926         (mark_pseudo_dead): Don't add conflicts for register
4927         ignore_reg_for_conflicts.
4928         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4930 2018-10-05  Andrew Waterman  <andrew@sifive.com>
4931             Jim Wilson  <jimw@sifive.com>
4933         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4934         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
4935         new pattern using HONOR_SNANS that emits one extra instruction.
4937 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
4939         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4940         patterns): Merge SI and DI patterns to a GPR pattern.
4941         (unnamed define_insn and define_split for record form of that): Merge
4942         to a single define_insn_and_split pattern.
4944 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
4946         PR c++/56856
4947         * input.c (expand_location_to_spelling_point): Add param "aspect"
4948         and use rather than hardcoding LOCATION_ASPECT_CARET.
4949         (get_substring_ranges_for_loc): Handle the case of a single token
4950         within a macro expansion.
4951         * input.h (expand_location_to_spelling_point): Add "aspect" param,
4952         defaulting to LOCATION_ASPECT_CARET.
4954 2018-10-05  Paul Koning  <ni1d@arrl.net>
4956         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4957         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4958         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4959         (pdp11_guard_type): New function.
4961 2018-10-05  Paul Koning  <ni1d@arrl.net>
4963         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4964         * config/pdp11/pdp11.opt (mfloat32): Remove.
4965         (mfloat64): Remove.
4966         * doc/invoke.texi (pdp11 -mfloat32): Remove:
4967         (pdp11 -mfloat64): Remove.
4969 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4971         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4972         (*cmp<mode>_cc_i387): Ditto.
4973         (*cmpu<mode>_cc_i387): Ditto.
4974         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4975         * config/i386/i386.c (ix86_expand_fp_compare): Remove
4976         "scratch" argument.
4977         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4978         Emit x86_sahf_1 pattern.
4979         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4980         (ix86_expand_carry_flag_compare): Ditto.
4982 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4984         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4985         to reg_or_0_operand.  Add "C" constraint.
4986         (*cmpxf_cc_i387): Ditto.
4987         (*cmp<mode>_i387): Change operand 2 predicate
4988         to nonimm_or_0_operand.  Add "C" constraint.
4989         (*cmp<mode>_cc_i387): Ditto.
4990         (*cmp<mode>_0_i387): Remove insn pattern.
4991         (*cmp<mode>_0_cc_i387): Ditto.
4993 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
4995         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4996         * config/i386/predicates.md (nonimm_or_0_operand): Rename
4997         from vector_move_operand.  Update all uses.
4999 2018-10-05  Martin Sebor  <msebor@redhat.com>
5001         PR tree-optimization/87490
5002         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
5003         consistently.
5005 2018-10-05  Richard Biener  <rguenther@suse.de>
5007         PR tree-optimization/63155
5008         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
5009         vertical space in dumpfiles.
5010         * tree-ssa-propagate.h
5011         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
5012         * tree-ssa-propagate.c (cfg_blocks_back): New global.
5013         (ssa_edge_worklist_back): Likewise.
5014         (curr_order): Likewise.
5015         (cfg_blocks_get): Remove abstraction.
5016         (cfg_blocks_add): Likewise.
5017         (cfg_blocks_empty_p): Likewise.
5018         (add_ssa_edge): Add to current or next worklist based on
5019         RPO index.
5020         (add_control_edge): Likewise.
5021         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
5022         into ...
5023         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
5024         iteration from CFG and SSA edge worklist so we process
5025         everything in RPO order, prioritizing forward progress
5026         over iteration.
5027         (ssa_prop_init): Allocate new worklists, do not dump
5028         immediate uses.
5029         (ssa_prop_fini): Free new worklists.
5031 2018-10-05  Richard Biener  <rguenther@suse.de>
5033         * tree-core.h (tree_block::abstract_flag): Remove.
5034         (tree_block::block_num): Make full 32bits.
5035         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
5036         * tree.h (BLOCK_ABSTRACT): Remove.
5037         * dwarf2out.c (gen_lexical_block_die): Remove dead code
5038         resulting from BLOCK_ABSTRACT being always false.
5039         (gen_inlined_subroutine_die): Likewise.
5040         (gen_block_die): Likewise.
5041         * tree.c (block_ultimate_origin): Likewise.
5042         * tree-pretty-print.c (dump_block_node): Remove code dealing
5043         with BLOCK_ABSTRACT.
5044         * tree-ssa-live.c (dump_scope_block): Likewise.
5045         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
5046         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
5048 2018-10-05   Richard Biener  <rguenther@suse.de>
5050         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
5051         is asked for initialize mode to the component mode of the
5052         vector type.
5054 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
5056         PR target/87522
5057         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
5058         assembler for -mavx.
5059         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
5061 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
5063         PR target/87509
5064         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5065         RS6000_BTM_DFP.
5066         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5067         to be DImode.  When using mffscrn, force the operand to a register.
5069 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
5071         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5072         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5073         X87MODEF mode iterator.
5074         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5075         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5076         X87MODEF mode iterator.
5078 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
5080         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5081         -Wno-prio-ctor-dtor.
5083 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
5085         * Makefile.in (OBJS): Add opt-problem.o.
5086         * dump-context.h: Include "selftest.h.
5087         (selftest::temp_dump_context): New forward decl.
5088         (class dump_context): Make friend of class
5089         selftest::temp_dump_context.
5090         (dump_context::dump_loc_immediate): New decl.
5091         (class dump_pretty_printer): Move here from dumpfile.c.
5092         (class temp_dump_context): Move to namespace selftest.
5093         (temp_dump_context::temp_dump_context): Add param
5094         "forcibly_enable_dumping".
5095         (selftest::verify_dumped_text):
5096         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5097         (selftest::verify_item):
5098         (ASSERT_IS_TEXT): Move here from dumpfile.c.
5099         (ASSERT_IS_TREE): Likewise.
5100         (ASSERT_IS_GIMPLE): Likewise.
5101         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5102         to...
5103         (dump_context::dump_loc_immediate): ...this new function.
5104         (class dump_pretty_printer): Move to dump-context.h.
5105         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5106         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5107         (temp_dump_context::temp_dump_context): Move to "selftest"
5108         namespace.  Add param "forcibly_enable_dumping", and use it to
5109         conditionalize the use of m_pp;
5110         (selftest::verify_dumped_text): Make non-static.
5111         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5112         (selftest::verify_item): Make non-static.
5113         (ASSERT_IS_TEXT): Move to dump-context.h.
5114         (ASSERT_IS_TREE): Likewise.
5115         (ASSERT_IS_GIMPLE): Likewise.
5116         (selftest::test_capture_of_dump_calls): Pass "true" for new
5117         param of temp_dump_context.
5118         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5119         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
5120         TDF_COMPARE_DEBUG.
5121         * opt-problem.cc: New file.
5122         * opt-problem.h: New file.
5123         * optinfo-emit-json.cc
5124         (selftest::test_building_json_from_dump_calls): Pass "true" for
5125         new param of temp_dump_context.
5126         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5127         (optinfo::emit_for_opt_problem): New function.
5128         (optinfo::emit): Clarity which emit_item is used.
5129         * optinfo.h (optinfo::get_dump_location): New accessor.
5130         (optinfo::emit_for_opt_problem): New decl.
5131         (optinfo::emit): Make const.
5132         * selftest-run-tests.c (selftest::run_tests): Call
5133         selftest::opt_problem_cc_tests.
5134         * selftest.h (selftest::opt_problem_cc_tests): New decl.
5135         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5136         bool to opt_result, converting fprintf messages to
5137         opt_result::failure_at calls.  Add "stmt" param for use by the
5138         failure_at calls.
5139         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5140         (runtime_alias_check_p): Convert return type from bool to
5141         opt_result, converting dump_printf calls to
5142         opt_result::failure_at, using the statement DDR_A for their
5143         location.
5144         (find_data_references_in_stmt): Convert return type from bool to
5145         opt_result, converting "return false" to opt_result::failure_at
5146         with a new message.
5147         * tree-data-ref.h: Include "opt-problem.h".
5148         (dr_analyze_innermost): Convert return type from bool to opt_result,
5149         and add a const gimple * param.
5150         (find_data_references_in_stmt): Convert return type from bool to
5151         opt_result.
5152         (runtime_alias_check_p): Likewise.
5153         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5154         dr_analyze_innermost.
5155         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5156         Convert return type from bool to opt_result, adding a message for
5157         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5158         (vect_analyze_data_ref_dependence): Convert return type from bool
5159         to opt_result.  Change sense of return type from "false"
5160         effectively meaning "no problems" to "false" meaning a problem,
5161         so that "return false" becomes "return opt_result::success".
5162         Convert "return true" calls to opt_result::failure_at, using
5163         the location of statement A rather than vect_location.
5164         (vect_analyze_data_ref_dependences): Convert return type from bool
5165         to opt_result.
5166         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5167         calls to opt_result::failure_at, using the stmt location rather
5168         than vect_location.
5169         (vect_verify_datarefs_alignment): Convert return type from bool
5170         to opt_result.
5171         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
5172         into multiple more-tightly-scoped copies.
5173         (vect_analyze_data_refs_alignment): Convert return type from bool
5174         to opt_result.
5175         (vect_analyze_data_ref_accesses): Likewise, converting a
5176         "return false" to a "return opt_result::failure_at", adding a
5177         new message.
5178         (vect_prune_runtime_alias_test_list): Convert return type from
5179         bool to opt_result, converting dump_printf_loc to
5180         opt_result::failure_at.  Add a %G to show the pertinent statement,
5181         and use the stmt's location rather than vect_location.
5182         (vect_find_stmt_data_reference): Convert return type from
5183         bool to opt_result, converting dump_printf_loc to
5184         opt_result::failure_at, using stmt's location.
5185         (vect_analyze_data_refs):  Convert return type from bool to
5186         opt_result.  Convert "return false" to "return
5187         opt_result::failure_at", adding messages as needed.
5188         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5189         type from bool to opt_result.
5190         (vect_determine_vf_for_stmt): Likewise.
5191         (vect_determine_vectorization_factor): Likewise, converting
5192         dump_printf_loc to opt_result::failure_at, using location of phi
5193         rather than vect_location.
5194         (vect_analyze_loop_form_1): Convert return type from bool to
5195         opt_result, converting dump_printf_loc calls, retaining the use of
5196         vect_location.
5197         (vect_analyze_loop_form): Convert return type from loop_vec_info
5198         to opt_loop_vec_info.
5199         (vect_analyze_loop_operations): Convert return type from bool to
5200         opt_result, converting dump_printf_loc calls, using the location
5201         of phi/stmt rather than vect_location where available.  Convert
5202         various "return false" to "return opt_result::failure_at" with
5203         "unsupported phi" messages.
5204         (vect_get_datarefs_in_loop): Convert return type from bool to
5205         opt_result.  Add a message for the
5206         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5207         (vect_analyze_loop_2): Convert return type from bool to
5208         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
5209         each "goto again;", adding new messages where needed.
5210         Add "unsupported grouped {store|load}" messages.
5211         (vect_analyze_loop): Convert return type from loop_vec_info to
5212         opt_loop_vec_info.
5213         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5214         bool to opt_result.
5215         * tree-vect-stmts.c (process_use): Likewise, converting
5216         dump_printf_loc call and using stmt location, rather than
5217         vect_location.
5218         (vect_mark_stmts_to_be_vectorized): Likeise.
5219         (vect_analyze_stmt): Likewise, adding a %G.
5220         (vect_get_vector_types_for_stmt): Convert return type from bool to
5221         opt_result, converting dump_printf_loc calls and using stmt
5222         location, rather than vect_location.
5223         (vect_get_mask_type_for_stmt): Convert return type from tree to
5224         opt_tree, converting dump_printf_loc calls and using stmt location.
5225         * tree-vectorizer.c: Include "opt-problem.h.
5226         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5227         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
5228         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
5229         enabled, use it to report at the top level "couldn't vectorize
5230         loop" followed by the problem.
5231         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5232         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5233         to opt_result.
5234         (vect_analyze_stmt): Likewise.
5235         (vect_get_vector_types_for_stmt): Likewise.
5236         (tree vect_get_mask_type_for_stmt): Likewise.
5237         (vect_analyze_data_ref_dependences): Likewise.
5238         (vect_enhance_data_refs_alignment): Likewise.
5239         (vect_analyze_data_refs_alignment): Likewise.
5240         (vect_verify_datarefs_alignment): Likewise.
5241         (vect_analyze_data_ref_accesses): Likewise.
5242         (vect_prune_runtime_alias_test_list): Likewise.
5243         (vect_find_stmt_data_reference): Likewise.
5244         (vect_analyze_data_refs): Likewise.
5245         (vect_analyze_loop): Convert return type from loop_vec_info to
5246         opt_loop_vec_info.
5247         (vect_analyze_loop_form): Likewise.
5248         (vect_analyze_slp): Convert return type from bool to opt_result.
5250 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
5252         * doc/invoke.texi (-fopt-info): Document new "internals"
5253         sub-option.
5254         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
5255         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
5256         MSG_ALL_KINDS.
5257         (optinfo_verbosity_options): Add "internals".
5258         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
5259         (dump_context::apply_dump_filter_p): New member function.
5260         (dump_context::dump_loc): Use apply_dump_filter_p rather than
5261         explicitly masking the dump_kind.
5262         (dump_context::begin_scope): Increment the scope depth first.  Use
5263         apply_dump_filter_p rather than explicitly masking the dump_kind.
5264         (dump_context::emit_item): Use apply_dump_filter_p rather than
5265         explicitly masking the dump_kind.
5266         (dump_dec): Likewise.
5267         (dump_hex): Likewise.
5268         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
5269         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
5270         (opt_info_switch_p): Update handling of default
5271         MSG_OPTIMIZED_LOCATIONS to cope with default of
5272         MSG_PRIORITY_USER_FACING.
5273         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
5274         masking the dump_kind.
5275         (selftest::test_capture_of_dump_calls): Update test_dump_context
5276         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
5277         than MSG_ALL.  Generalize scope test to be run at all four
5278         combinations of with/without MSG_PRIORITY_USER_FACING and
5279         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
5280         for each of the two values.
5281         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
5282         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
5283         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
5284         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
5285         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
5286         with MSG_PRIORITY_*.
5287         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
5288         dump messages as MSG_PRIORITY_USER_FACING.
5289         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
5290         about the interaction with MSG_PRIORITY_*.
5292 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5294         * varasm.c (output_constant): Add new parameter merge_strings.
5295         Make strings properly zero terminated in merge string sections.
5296         (mergeable_string_section): Don't fail if the last char is non-zero.
5297         (assemble_variable_contents): Handle merge string sections.
5298         (assemble_variable): Likewise.
5299         (assemble_constant_contents): Likewise.
5300         (output_constant_def_contents): Likewise.
5301         (output_constructor_array_range,
5302         output_constructor_regular_field): Adjust call to output_constant.
5303         (output_object_block): Adjust call to assemble_constant_contents
5304         and assemble_variable_contents.
5306 2018-10-04  Martin Liska  <mliska@suse.cz>
5308         PR c/87483
5309         * cgraphunit.c (process_function_and_variable_attributes):
5310         Warn about a function with alias attribute and a body.
5312 2018-10-04  Martin Liska  <mliska@suse.cz>
5314         PR ipa/82625
5315         * multiple_target.c (redirect_to_specific_clone): New function.
5316         (ipa_target_clone): Use it.
5317         * tree-inline.c: Fix comment.
5319 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
5321         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
5322         fields.
5323         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
5324         (gcc::dump_manager::register_pass): New member function, adapted
5325         from loop body in gcc::pass_manager::register_pass, adding a
5326         call to update_dfi_for_opt_info.
5327         (gcc::dump_manager::opt_info_enable_passes): Store the
5328         -fopt-info options into the new fields.  Move the loop
5329         bodies into...
5330         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
5331         function.
5332         * dumpfile.h (struct opt_pass): New forward decl.
5333         (gcc::dump_manager::register_pass): New decl.
5334         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
5335         (class gcc::dump_manager): Add fields "m_optgroup_flags",
5336         "m_optinfo_flags", and "m_optinfo_filename".
5337         * passes.c (gcc::pass_manager::register_pass): Move all of the
5338         dump-handling code to gcc::dump_manager::register_pass.
5340 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
5342         PR rtl-optimization/87466
5343         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
5344         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
5345         * doc/tm.texi: Regenerate.
5346         * ira-lives.c (process_bb_node_lives): Use the new target hook.
5347         * lra-lives.c (process_bb_lives): Likewise.
5348         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
5349         Define.
5351 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
5353         * params.c (add_params): Fix initialization.
5355 2018-10-04  Martin Liska  <mliska@suse.cz>
5357         PR gcov-profile/84107
5358         * tree-profile.c (init_ic_make_global_vars):
5359         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
5360         Come up with new ic_tuple* variables.  Emit
5361         __gcov_indirect_call{,_topn} variables.
5362         (gimple_gen_ic_profiler): Access the variable
5363         and emit gimple.
5364         (gimple_gen_ic_func_profiler): Access
5365         __gcov_indirect_call.callee field.
5366         (gimple_init_gcov_profiler): Use ptr_type_node.
5367         * value-prof.c (gimple_ic): Use ptr_type_node.
5369 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5371         PR tree-optimization/85787
5372         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
5373         malloc_candidate_p into this function and add support for
5374         detecting multiple phis.
5375         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
5377 2018-10-04  Martin Liska  <mliska@suse.cz>
5379         PR ipa/87491
5380         * ipa-inline.c (inline_to_all_callers_1):
5381         Call ultimate_alias_target for node being inlined.
5383 2018-10-03  Jeff Law  <law@redhat.com>
5385         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
5386         target's wchar_t.
5387         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
5388         * tree.h (get_typenode_from_name): Prototype.
5390 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
5392         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
5393         Change operand 2 predicate to nonimmediate_operand.
5394         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5396 2018-10-03  Martin Sebor  <msebor@redhat.com>
5397             Jeff Law  <law@redhat.com>
5399         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
5400         initialize it.
5401         (get_string_length): Detect unterminated arrays.
5402         (format_string): Same.
5403         (format_directive): Warn about unterminated arrays.
5404         (handle_gimple_call): Mark statements with no_warning as needed.
5406 2018-10-03  Jim Wilson  <jimw@sifive.com>
5408         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
5409         also define __riscv_abi_rve.  Delete trailing white space.
5411 2018-10-03  Paul Koning  <ni1d@arrl.net>
5413         Enable LRA register allocator for PDP11.
5414         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
5415         (R): Likewise.
5416         (D): Likewise.
5417         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
5418         * config/pdp11/pdp11.opt (-mlra): New option.
5419         * doc/invoke.texi (PDP-11 Options): Document -mlra.
5421 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
5423         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
5424         (*<absneg:code>extend<mode>xf2): Ditto.
5426 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
5428         PR tree-optimization/87415
5429         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
5430         precision fields.
5432 2018-10-02  Jeff Law  <law@redhat.com>
5434         * gimple-fold.c (get_range_strlen): Only set *nonstr when
5435         an unterminated string is discovered.  Bubble up range
5436         even for unterminated strings.
5437         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
5438         indicates the string was not terminated via NONSTR.
5440 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
5442         * tree-vrp.c (extract_range_from_unary_expr): Special case all
5443         pointer conversions.
5444         Do not do anything special for anti-ranges.
5446 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
5448         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
5449         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
5451 2018-10-03  Martin Liska  <mliska@suse.cz>
5453         PR gcov-profile/86109
5454         * coverage.c (coverage_begin_function): Do not
5455         mark lambdas as artificial.
5456         * tree-core.h (struct GTY): Remove tm_clone_flag
5457         and introduce new lambda_function.
5458         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
5460 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
5462         PR target/87474
5463         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
5464         P8_VECTOR and VSX are enabled.
5466 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
5468         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
5469         0x3907 as CPU model number.
5471 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
5473         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
5474         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
5475         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
5476         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
5477         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
5478         * config/s390/s390.md: Likewise. Rename also the cpu attribute
5479         value from arch12 to z14.
5481 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
5483         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
5484         (isinfxf2): Ditto.
5485         (isinf<mode>2): Ditto.
5487 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
5489         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
5490         before emitting fxam.  Perform calculations in XFmode.
5492 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
5494         * match.pd (((X /[ex] A) +- B) * A): New transformation.
5496 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
5498         PR middle-end/87319
5499         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5500         * tree.c (signed_or_unsigned_type_for): Handle complex.
5502 2018-10-02  Jeff Law  <law@redhat.com>
5504         * gimple-fold.c (get_range_strlen): Remove dead code.
5506 2018-10-02  Martin Sebor  <msebor@redhat.com>
5507             Jeff Law  <law@redhat.com>
5509         * builtins.c (unterminated_array): Add new arguments.
5510         If argument is not terminated, bubble up size and exact
5511         state to callers.
5512         (expand_builtin_strnlen): Detect, avoid expanding
5513         and diagnose unterminated arrays.
5514         (c_strlen): Fill in offset of start of unterminated strings.
5515         * builtins.h (unterminated_array): Update prototype.
5517 2018-10-02  Richard Biener  <rguenther@suse.de>
5519         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5520         of haddv4df, first reduce to SSE width and exploit the fact
5521         that we only need element zero with the reduction result.
5522         (reduc_plus_scal_v2df): Likewise.
5524 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5526         * dojump.h (do_jump): Delete.
5527         (do_jump_1): Likewise.
5528         (split_comparison): Move around.
5529         * dojump.c (do_jump): Make static.
5530         (do_jump_1): Likewise.
5531         (jumpifnot): Move around.
5532         (jumpifnot_1): Likewise.
5533         (jumpif): Likewise.
5534         (jumpif_1): Likewise.
5535         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5537 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
5539         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5540         insns in the delay slot and add_insn_after for the jump insn.
5542 2018-10-02  Richard Biener  <rguenther@suse.de>
5544         * tree-inline.c (expand_call_inline): Use the location of
5545         the callee declaration for the inline-entry marker.
5546         * final.c (notice_source_line): Remove special-casing of
5547         NOTE_INSN_INLINE_ENTRY.
5549 2018-10-01  Carl Love  <cel@us.ibm.com>
5551         PR 69431
5552         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5553         (__builtin_mtfsb0): New.
5554         (__builtin_mtfsb1): New.
5555         ( __builtin_set_fpscr_rn): New.
5556         (__builtin_set_fpscr_drn): New.
5557         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5558         (rs6000_expand_set_fpscr_rn_builtin): Add.
5559         (rs6000_expand_set_fpscr_drn_builtin): Add.
5560         (rs6000_expand_builtin): Add case statement entries for
5561         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5562         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5563         RS6000_BUILTIN_MFFSL.
5564         (rs6000_init_builtins): Add ftype initialization and def_builtin
5565         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5566         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5567         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5568         rs6000_mffscdrn): Add define_insn.
5569         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5570         * doc/extend.texi: Add documentation for the builtins.
5572 2018-10-01  Richard Biener  <rguenther@suse.de>
5574         PR tree-optimization/87465
5575         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5576         causing branch miscounts.
5578 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5580         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5581         aarch64_option_default_param):  New.
5582         (params.h): Include.
5583         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5584         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5585         stack-clash protection validation code.
5587 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5589         * params.c (validate_param): New.
5590         (add_params): Use it.
5591         (set_param_value): Refactor param validation into validate_param.
5592         (diagnostic.h): Include.
5593         * diagnostic.h (diagnostic_ready_p): New.
5595 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5597         * params.c (set_param_value):
5598         Add index of parameter being validated.
5599         * common/common-target.def (option_validate_param): New.
5600         * common/common-targhooks.h (default_option_validate_param): New.
5601         * common/common-targhooks.c (default_option_validate_param): New.
5602         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5603         * doc/tm.texi: Regenerate.
5605 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5607         PR target/86486
5608         * config/aarch64/aarch64.c (aarch64_override_options_internal):
5609         Add validation for stack-clash parameters and set defaults.
5611 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5613         PR target/86486
5614         * configure.ac: Add stack-clash-protection-guard-size.
5615         * doc/install.texi: Document it.
5616         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5617         * params.def: Update comment for guard-size.
5618         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5619         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5620         * configure: Regenerate.
5622 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5624         PR target/86486
5625         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5626         STACK_DYNAMIC_OFFSET): New.
5627         * config/aarch64/aarch64.c (aarch64_layout_frame):
5628         Update outgoing args size.
5629         (aarch64_stack_clash_protection_alloca_probe_range,
5630         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5632 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5634         PR target/86486
5635         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5636         probe ranges.
5637         * target.def (stack_clash_protection_alloca_probe_range): New.
5638         (stack_clash_protection_final_dynamic_probe): Remove.
5639         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5640         (default_stack_clash_protection_final_dynamic_probe): Remove.
5641         * targhooks.c: Likewise.
5642         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5643         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5644         * doc/tm.texi: Regenerate.
5646 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5648         PR target/86486
5649         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5650         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5651         aarch64_clamp_to_uimm12_shift): New.
5652         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5653         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5655 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
5657         PR target/86486
5658         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5660 2018-10-01  Jeff Law  <law@redhat.com>
5661             Richard Sandiford <richard.sandiford@linaro.org>
5662             Tamar Christina  <tamar.christina@arm.com>
5664         PR target/86486
5665         * config/aarch64/aarch64.md
5666         (probe_stack_range): Add k (SP) constraint.
5667         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5668         STACK_CLASH_MAX_UNROLL_PAGES): New.
5669         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5670         stack probes for stack clash.
5671         (aarch64_allocate_and_probe_stack_space): New.
5672         (aarch64_expand_prologue): Use it.
5673         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5674         (aarch64_sub_sp): Add emit_move_imm optional param.
5676 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
5678         PR tree-optimization/87261
5679         * match.pd: Remove trailing whitespace.
5680         Add (x & y) | ~(x | y) -> ~(x ^ y),
5681         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5683 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5685         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5686         constraints.
5687         (ashlsi3_insn): Update instruction constraints.
5688         (ashrsi3_insn): Likewise.
5689         (rotrsi3): Likewise.
5690         (add_shift): Likewise.
5691         * config/arc/constraints.md (Csz): New 32 bit constraint. It
5692         avoids placing in the limm field small constants which, otherwise,
5693         could end into a small instruction.
5695 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
5697         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5698         destination register is not odd-even.
5699         (umaddsidi4_split): Likewise.
5701 2018-10-01  Richard Biener  <rguenther@suse.de>
5703         * tree-inline.c (expand_call_inline): Store origin of fn
5704         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5705         * tree.c (block_ultimate_origin): Simplify and do some
5706         checking.
5708 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
5710         * config/i386/mmx.md (EMMS): New int iterator.
5711         (emms): New int attribute.
5712         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5713         EMMS int iterator.  Explicitly declare clobbers.
5714         (mmx_emms): Remove expander.
5715         (mmx_femms): Ditto.
5716         * config/i386/predicates.md (emms_operation): Remove predicate.
5717         (vzeroall_pattern): New predicate.
5718         (vzeroupper_pattern): Rename from vzeroupper_operation.
5719         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5720         vzeroupper_pattern and vzeroall_pattern predicates.
5722 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
5724         PR rtl-optimization/86939
5725         * ira-lives.c (make_hard_regno_born): Rename from this...
5726         (make_hard_regno_live): ... to this.  Remove update to conflict
5727         information.  Update function comment.
5728         (make_hard_regno_dead): Add conflict information update.  Update
5729         function comment.
5730         (make_object_born): Rename from this...
5731         (make_object_live): ... to this.  Remove update to conflict information.
5732         Update function comment.
5733         (make_object_dead):  Add conflict information update.  Update function
5734         comment.
5735         (mark_pseudo_regno_live): Call make_object_live.
5736         (mark_pseudo_regno_subword_live): Likewise.
5737         (mark_hard_reg_dead): Update function comment.
5738         (mark_hard_reg_live): Call make_hard_regno_live.
5739         (process_bb_node_lives): Likewise.
5740         * lra-lives.c (make_hard_regno_born): Rename from this...
5741         (make_hard_regno_live): ... to this.  Remove update to conflict
5742         information.  Remove now uneeded check_pic_pseudo_p argument.
5743         Update function comment.
5744         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5745         to conflict information.  Update function comment.
5746         (mark_pseudo_live): Remove update to conflict information.  Update
5747         function comment.
5748         (mark_pseudo_dead): Add conflict information update.
5749         (mark_regno_live): Call make_hard_regno_live.
5750         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5751         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5753 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
5755         PR target/87370
5756         * config/i386/i386.c (construct_container): Use TImode for
5757         BLKmode values in 2 integer registers.
5759 2018-09-29  Jeff Law  <law@redhat.com>
5761         * builtins.c (unterminated_array): Pass in c_strlen_data * to
5762         c_strlen rather than just a tree *.
5763         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5764         Update recursive calls appropriately.  If caller did not provide a
5765         suitable data pointer, create a local one.  When a non-terminated
5766         string is discovered, bubble up information about the string via the
5767         c_strlen_data object.
5768         * builtins.h (c_strlen): Update prototype.
5769         (c_strlen_data): New structure.
5770         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5771         For a type 2 call, if c_strlen indicates a non-terminated string
5772         use the length of the non-terminated string.
5773         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5775 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
5777         PR target/87467
5778         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5779         __m512d type for __A argument rather than __m512.
5781 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
5783         * match.pd (simple_comparison): Don't optimize if either operand is
5784         a function pointer when target needs function pointer canonicalization.
5786 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5788         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5789         power5 .. power9 to remove indirection.
5790         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5791         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5792         ASM_CPU_476_SPEC): Delete.
5793         (ASM_CPU_SPEC): Adjust.
5794         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5795         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5797 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5799         * config.in: Delete HAVE_AS_DCI.
5800         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5801         * config/rs6000/rs6000.h: Ditto.
5802         * configure.ac: Delete HAVE_AS_DCI.
5803         * configure: Regenerate.
5805 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
5807         * config.in (HAVE_AS_LWSYNC): Delete.
5808         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5809         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5810         do it as a .long .
5811         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5812         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5813         as a .long .
5814         * configure.ac: Delete HAVE_AS_LWSYNC.
5815         * configure: Regenerate.
5817 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5818             Pierre-Marie de Rodat  <derodat@adacore.com>
5820         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5821         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5822         (cgraph_node::create_thunk): Add indirect_offset parameter.
5823         (thunk_adjust): Likewise.
5824         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5825         and initialize the corresponding field with it.
5826         (cgraph_node::dump): Dump indirect_offset field.
5827         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5828         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5829         (thunk_adjust): Add indirect_offset parameter and deal with it.
5830         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5831         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
5832         or if the thunk is external or local.  Fix formatting.  Do not chain
5833         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
5834         if any, in the GIMPLE representation.
5835         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5836         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5837         (input_node): Read indirect_offset field.
5838         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5839         call to thunk_adjust.
5840         * tree-nested.c (struct nesting_info): Add thunk_p field.
5841         (create_nesting_tree): Set it.
5842         (convert_all_function_calls): Copy static chain from targets to thunks.
5843         (finalize_nesting_tree_1): Return early for thunks.
5844         (unnest_nesting_tree_1): Do not finalize thunks.
5845         (gimplify_all_functions): Do not gimplify thunks.
5847 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5849         * opt-suggestions.c (option_proposer::build_option_suggestions):
5850         Release "option_values".
5852 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
5854         * coverage.c (get_coverage_counts): Convert problem-reporting dump
5855         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5856         * dumpfile.c (kind_as_string): New function.
5857         (dump_loc): Rather than a hardcoded prefix of "note: ", use
5858         kind_as_string to vary the prefix based on dump_kind.
5859         (selftest::test_capture_of_dump_calls): Update for above.
5861 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5863         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5864         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
5866 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
5868         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5869         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5870         INVALID_REGNUM instead of FPSR_REG.
5871         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5872         * config/i386/i386.md: Update comment of FP compares.
5873         (fldenv): Do not clobber FPSR_REG.
5875 2018-09-28  Richard Biener  <rguenther@suse.de>
5877         * tree.h (BLOCK_ORIGIN): New.
5878         * omp-expand.c (grid_expand_target_grid_body): Assign
5879         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5880         * tree-inline.c (remap_block): Likewise.
5881         * auto-profile.c (get_function_decl_from_block): Simplify
5882         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5883         * langhooks.c (lhd_print_error_function): Likewise.
5884         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5885         Likewise.
5886         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5887         * tree.c (block_nonartificial_location): Likewise.
5888         (block_ultimate_origin): Likewise.
5889         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
5890         no longer needed LTO case.
5892 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
5893             Jan Hubicka  <jh@suse.cz>
5894             Martin Jambor  <mjambor@suse.cz>
5896         * simplify-rtx.c (simplify_merge_mask): New function.
5897         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5898         same masks are used in op1 or op2.
5899         (test_vec_merge): New function.
5900         (test_vector_ops): Call test_vec_merge.
5902 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
5904         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5905         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5906         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5907         (cypress_costs): Set it.
5908         (supersparc_costs): Likewise.
5909         (hypersparc_costs): Likewise.
5910         (leon_cost): Likewise.
5911         (leon3_costs): Likewise.
5912         (sparclet_costs): Likewise.
5913         (ultrasparc_costs): Likewise.
5914         (ultrasparc_costs): Likewise.
5915         (niagara_costs): Likewise.
5916         (niagara2_costs): Likewise.
5917         (niagara3_costs): Likewise.
5918         (niagara4_costs): Likewise.
5919         (niagara7_costs): Likewise.
5920         (m8_costs): Likewise.
5921         (TARGET_CAN_FOLLOW_JUMP): Define.
5922         (pass_work_around_errata::gate): Minor tweak.
5923         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5924         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5925         Automaitcally clear MASK_FSMULD mask for V7 processors.
5926         (sparc_can_follow_jump): New static function.
5927         (output_ubranch): Deal with CROSSING_JUMP_P.
5928         (sparc_use_sched_lookahead): Rewrite using switch statement.
5929         (sparc_issue_rate): Reorder.
5930         (sparc_branch_cost): New function.
5932 2018-09-27  Martin Sebor  <msebor@redhat.com>
5934         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5935         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5936         (int_fits_type_p): Same.
5938 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
5940         * config/i386/i386.md (FPCR_REG): Remove.
5941         (UNSPEC_FLDCW): Remove.
5942         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5943         (x86_fldcw_1): Remove insn pattern.
5944         (fnstenv): Do not clobber FPCR_REG.
5945         (fldenv): Ditto.
5946         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5947         (CALL_USED_REGISTERS): Ditto.
5948         (REG_ALLOC_ORDER): Ditto.
5949         (REG_CLASS_CONTENTS): Ditto.
5950         (HI_REGISTER_NAMES): Ditto.
5951         (ADDITIONAL_REGISTER_NAMES): Use defines instead
5952         of numerical constants.
5953         * config/i386/i386.c (regclass_map): Remove fpsr register.
5954         (dbx_register_map): Ditto.
5955         (dbx64_register_map): Ditto.
5956         (svr4_dbx_register_map): Ditto.
5957         (print_reg): Do not handle FPCR_REG.
5959 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
5961         PR target/87149
5962         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5963         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5964         Delete, always treat as true.
5965         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5966         Ditto.  Simplify remaining code.
5967         * config/powerpcspe/powerpcspe.h: Ditto.
5968         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5969         Simplify remaining code.
5970         (rs6000_expand_builtin): Ditto.
5971         * config/rs6000/rs6000.h: Ditto.
5972         * configure.ac: Ditto.
5973         * configure: Regenerate.
5975 2018-09-27  Martin Liska  <mliska@suse.cz>
5977         * coverage.c (get_coverage_counts): Revert the formatting
5978         of missing profile opt info.
5980 2018-09-27  Richard Biener  <rguenther@suse.de>
5982         PR debug/37801
5983         PR debug/87440
5984         * dwarf2out.c (set_block_origin_self): Do not mark outermost
5985         block as we do not output that.
5986         (gen_inlined_subroutine_die): Elide the originally outermost
5987         block, matching what we do for concrete instances.
5988         (decls_for_scope): Add parameter specifying whether to recurse
5989         to subblocks.
5991 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
5992             Tom de Vries  <tom@codesourcery.com>
5994         PR 82089
5996         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5997         STORE_FLAG_VALUE == 1.
5999 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
6001         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
6002         constant definitions.
6003         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
6004         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
6005         ("speculation_barrier"): New expander definition.
6007 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
6009         PR gcov-profile/86957
6010         * common.opt: New warning option -Wmissing-profile.
6011         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
6012         * doc/invoke.texi: Document -Wmissing-profile.
6014 2018-09-26  Jim Wilson  <jimw@sifive.com>
6016         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
6017         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
6019 2018-09-26  Martin Sebor  <msebor@redhat.com>
6021         * tree.c (zerop): Change return type to bool.
6022         (integer_zerop, integer_onep, integer_each_onep): Same.
6023         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6024         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6025         (real_onep, real_minus_onep, chain_index): Same.
6026         (print_type_hash_statistics, type_list_equal): Same.
6027         * tree.h (zerop): Same.
6028         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
6029         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6030         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6031         (real_onep, real_minus_onep, chain_index): Same.
6032         (print_type_hash_statistics, type_list_equal): Same.
6034 2018-09-26  Jim Wilson  <jimw@sifive.com>
6036         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
6038 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
6040         PR target/87414
6041         * config/i386/i386.c: Include debug.h and dwarf2out.h.
6042         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
6043         call.
6045 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
6047         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
6049 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
6051         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
6052         and FP_SECOND_SSE_REGS.
6053         (REG_CLASS_NAMES): Ditto.
6054         (REG_CLASS_CONTENTS): Ditto.
6055         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
6056         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
6057         (ix86_preferred_output_reload_class): Ditto.
6058         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
6059         clobber constraint to "=&f".
6060         (fix_truncdi_i387): Ditto.
6061         (lrintxfdi2): Ditto.
6062         (fistdi2_<rounding>): Ditto.
6063         (fpremxf4_i387): Change "=u" constraint to "=f".
6064         (fprem1xf4_i387): Ditto.
6065         (sincosxf3): Ditto.
6066         (fptanxf4_i387): Ditto.
6067         (fxtractxf3_i387): Ditto.
6068         (fscalexf4_i387): Ditto.
6069         (atan2xf3): Change "u" constraint to "f".
6070         (fyl2xxf3_i387): Ditto.
6071         (fyl2xp1xf3_i387): Ditto.
6073 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
6075         PR target/87439
6076         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6077         for removed I387_MASK_PM entity.
6080 2018-09-26  Jeff Law  <law@redhat.com>
6081         Revert
6082         2018-09-26  Alexey Neyman  <stilor@att.net>
6084         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6085         headers are no longer pulled in by <isl/val.h>.
6087 2018-09-26  Richard Biener  <rguenther@suse.de>
6089         PR debug/87443
6090         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6091         or concrete instance DIE to the tree.  Create abstract origin
6092         attributes also for concrete instances.
6094 2018-09-26  Alexey Neyman  <stilor@att.net>
6096         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6097         headers are no longer pulled in by <isl/val.h>.
6099 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
6101         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6102         Use new helper functions.
6103         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6104         Use new helper functions.
6105         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6106         aarch_mm_needs_release): New declarations.
6107         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6108         aarch_mm_needs_release): New.
6110 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
6112         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6113         (arm32_output_mi_thunk): Deal with long calls.
6115 2018-09-26  Richard Biener  <rguenther@suse.de>
6117         PR debug/87428
6118         PR debug/87362
6119         * tree-inline.c (expand_call_inline): When the location
6120         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6121         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6122         the inserted BLOCK to make inlined_function_outer_scope_p
6123         recognize it.
6124         * dwarf2out.c (add_call_src_coords_attributes): Do not add
6125         coords for reserved locations.
6127 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
6129         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6130         (*call_indirect_nonlocal_sysv<mode>): Ditto.
6131         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6132         (*sibcall_nonlocal_sysv<mode>): Ditto.
6133         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6134         (<bd>_<mode>): Ditto.
6135         (<bd>tf_<mode>): Ditto.
6137 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
6139         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6140         control string as a list of templates instead of as C code.
6141         (*altivec_movti): Ditto.
6142         * config/rs6000/darwin.md (movdf_low_di): Ditto.
6144 2018-09-25  Jim Wilson  <jimw@sifive.com>
6146         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6147         when target symbol is weak.
6149 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6151         PR c/87387
6152         * builtins.c (unterminated_array): Simplify.
6153         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
6154         where pointer arithmetic is safe.
6156 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
6158         PR target/86987
6159         * config/rs6000/altivec.md (altivec_vspltb): Use
6160         const_0_to_15_operand instead of u5bit_cint_operand.
6161         (*altivec_vspltb_internal): Ditto.
6162         (altivec_vspltb_direct): Ditto.
6163         (altivec_vsplth): Use const_0_to_7_operand instead of
6164         u5bit_cint_operand.
6165         (*altivec_vsplth_internal): Ditto.
6166         (altivec_vsplth_direct): Ditto.
6167         (altivec_vspltw): Use const_0_to_3_operand instead of
6168         u5bit_cint_operand.
6169         (*altivec_vspltw_internal): Ditto.
6170         (altivec_vspltw_direct): Ditto.
6171         (altivec_vspltsf): Ditto.
6172         (*altivec_vspltsf_internal): Ditto.
6173         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6174         various splats with the proper size immediate.  Reorder the various
6175         cases by ascending size of immediate, and put all such together.
6177 2018-09-25  Richard Biener  <rguenther@suse.de>
6179         PR debug/83941
6180         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6181         GC-ification.
6182         (maybe_create_die_with_external_ref): Do not create
6183         DW_TAG_imported_unit here.
6184         (add_abstract_origin_attribute): Handle external BLOCK refs.
6185         (dwarf2out_abstract_function): Simplify LTO case.
6186         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6187         rather than using maybe_create_die_with_external_ref.
6189 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
6191         PR target/71278
6192         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6193         (frndintxf2_mask_pm_i387): Ditto.
6194         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6195         Enable for !flag_trapping_math.
6196         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6197         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6198         Change operand 1 predicate to nonimmediate_operand.
6199         (attr "i387_cw"): Remove mask_pm.
6200         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6201         (enum ix86_entity): Remove I387_MASK_PM.
6202         * config/i386/i386.c (ix86_i387_mode_needed): Do not
6203         handle I387_MASK_PM.
6204         (ix86_mode_needed): Ditto.
6205         (ix86_mode_after): Ditto.
6206         (ix86_mode_entry): Ditto.
6207         (ix86_mode_exit): Ditto.
6208         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6210 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
6212         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6213         to_update_switch_stmts to vNULL instead of calling create on them
6214         immediately.
6216 2018-09-25  Richard Biener  <rguenther@suse.de>
6218         PR tree-optimization/87402
6219         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6220         (visit_phi): Re-instantiate handling of supposed to be VARYING
6221         but non-VARYING backedge value.
6223 2018-09-25  Richard Biener  <rguenther@suse.de>
6225         PR debug/83941
6226         * dwarf2out.c (struct sym_off_pair): New.
6227         (external_die_map): New global.
6228         (lookup_decl_die): When in LTO create DIEs lazily from the
6229         external_die_map.
6230         (lookup_block_die): New function, create DIEs lazily in LTO.
6231         (equate_block_to_die): New function.
6232         (dwarf2out_die_ref_for_decl): During WPA get the association
6233         from the external DIE map.
6234         (dwarf2out_register_external_die): Record mapping into the
6235         external DIE map.
6236         (maybe_create_die_with_external_ref): New function split out from
6237         DIE generation part of old dwarf2out_register_external_die.
6238         (add_abstract_origin_attribute): Do not return the DIE.  When
6239         in LTO reference externals directly.
6240         (dwarf2out_abstract_function): When in LTO ignore calls for
6241         decls with external DIEs (already present abstract instances).
6242         (gen_call_site_die): Adjust.
6243         (add_high_low_attributes): Likewise.
6244         (gen_lexical_block_die): Likewise.
6245         (gen_inlined_subroutine_die): Likewie.
6246         (gen_block_die): Likewise.
6247         (dwarf2out_inline_entry): Likewise.
6248         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
6249         DIEs.
6251 2018-09-25  Martin Liska  <mliska@suse.cz>
6253         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
6254         integers and not by a float value.
6256 2018-09-25  Martin Liska  <mliska@suse.cz>
6258         PR fortran/87394
6259         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
6260         instead of NULL.
6261         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
6262         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
6263         * godump.c (go_format_type): Remove extra parenthesis.
6265 2018-09-25  Martin Liska  <mliska@suse.cz>
6267         * alias.c (set_dest_equal_p): Remove unused function.
6268         * config/i386/i386.c (def_builtin_pure2): Likewise.
6269         * diagnostic-show-locus.c (class layout): Remove
6270         unused field.
6271         (layout::layout): Likewise here.
6272         * dump-context.h (class temp_dump_context): Likewise.
6273         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
6274         (add_AT_loclistsptr): Likewise.
6275         (add_AT_offset): Likewise.
6276         (get_AT_hi_pc): Likewise.
6277         (is_comdat_die): Likewise.
6278         (type_is_enum): Likewise.
6279         (ceiling): Likewise.
6280         (add_AT_vms_delta): Likewise.
6281         (is_class_die): Likewise.
6282         * edit-context.c (class line_event): Remove unused field.
6283         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
6284         unused function.
6285         * ipa-cp.c (ipa_get_vr_lat): Likewise.
6286         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
6287         (ok_for_base_p_nonstrict): Likewise.
6288         * tree-chrec.c (is_not_constant_evolution): Likewise.
6289         (chrec_fold_poly_cst): Likewise.
6290         * tree-if-conv.c (has_pred_critical_p): Likewise.
6291         * tree-ssa-coalesce.c (print_exprs): Likewise.
6292         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
6293         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
6294         * tree-vrp.c (value_ranges_intersect_p): Likewise.
6295         (value_range_nonnegative_p): Likewise.
6297 2018-09-25  Martin Liska  <mliska@suse.cz>
6299         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
6300         Do not handle "GNU Pascal".
6301         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
6302         Likewise.
6303         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
6304         from documentation. Likewise.
6305         * dbxout.c (dbxout_range_type): Likewise.
6306         * doc/cpp.texi: Likewise.
6307         * doc/extend.texi: Likewise.
6308         * doc/frontends.texi: Likewise.
6309         * doc/invoke.texi: Remove Pascal entry.
6310         * tree.def (CLEANUP_POINT_EXPR): Likewise.
6311         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
6313 2018-09-25  Martin Liska  <mliska@suse.cz>
6315         PR middle-end/86078
6316         * doc/invoke.texi: Document all parameters and remove default
6317         of the parameters.
6319 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
6321         PR bootstrap/87417
6322         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
6323         contains HOST_WIDE_INTs when computing its size.
6325 2018-09-24  Jim Wilson  <jimw@sifive.com>
6327         PR target/87391
6328         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
6329         not TARGET_RVE.
6330         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
6332 2018-09-24  Andrew Pinski  <apinski@marvell.com>
6334         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
6335         access prev before checking it for NULLness in the
6336         AARCH64_FUSE_CMP_BRANCH case.
6338 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
6340         PR target/82699
6341         * config/i386/i386.c (rest_of_insert_endbranch): Set
6342         endbr_queued_at_entrance to true and don't insert ENDBR if
6343         x86_function_profiler will be called.
6344         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
6345         is true.
6346         * config/i386/i386.h (machine_function): Add
6347         endbr_queued_at_entrance.
6349 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
6351         * genattrtab.c (mk_attr_alt): Use alternative_mask.
6352         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
6353         types.
6354         (check_attr_test): Use alternative_mask.
6355         (get_attr_value): Likewise.
6356         (compute_alternative_mask): Use alternative_mask and XWINT.
6357         (make_alternative_compare): Use alternative_mask.
6358         (attr_alt_subset_p): Use XWINT.
6359         (attr_alt_subset_of_compl_p): Likewise.
6360         (attr_alt_intersection): Use alternative_mask and XWINT.
6361         (attr_alt_union): Likewise.
6362         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
6363         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
6364         (simplify_test_exp): Use alternative_mask and XWINT.
6365         (write_test_expr): Use alternative_mask and XWINT, adjust bit
6366         number calculation to support 64 bits.  Generate code that
6367         checks 64-bit masks.
6368         (main): Use alternative_mask.
6369         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
6371 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
6373         PR target/80080
6374         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
6375         RETURN+USE when returning via %r14.
6377 2018-09-24  Martin Liska  <mliska@suse.cz>
6379         * gcov.c (output_lines): Print colorization legend
6380         for both flag_use_colors and flag_use_hotness_colors.
6381         Reword the help.
6383 2018-09-24  Martin Liska  <mliska@suse.cz>
6385         * coverage.c (get_coverage_counts): Use warning_at
6386         with current_function_decl location. Use %qD in warning
6387         message.
6389 2018-09-24  Martin Liska  <mliska@suse.cz>
6391         * memory-block.h (memory_block_pool::release): Annotate with
6392         valgrind that the memory is not accessible.
6394 2018-09-24  Martin Liska  <mliska@suse.cz>
6396         PR sanitizer/85774
6397         * asan.c: Make asan_handled_variables extern.
6398         * asan.h: Likewise.
6399         * cfgexpand.c (expand_stack_vars): Make sure
6400         a representative is unpoison if another
6401         variable in the partition is handled by
6402         use-after-scope sanitization.
6404 2018-09-24  Richard Biener  <rguenther@suse.de>
6406         PR tree-optimization/63155
6407         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
6408         the worklist when the edge of the respective argument isn't
6409         executable.
6411 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
6413         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
6414         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
6415         (MASK_CLASS_P): Update for rename.
6416         (MAYBE_MASK_CLASS_P): Ditto.
6417         (REG_CLASS_NAMES): Update.
6418         (REG_CLASS_CONTENT): Update.
6419         * config/i386/i386.c (regclass_map): Update for MASK_REG
6420         and ALL_MASK_REGS rename.
6421         * config/i386/constraints.md (Yk): Update for rename.
6422         (k): Ditto.
6424 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
6426         * config/i386/i386.h (enum reg_class): Remove
6427         EVEX_SSE_REGS and MOD4_SSE_REGS.
6428         (REG_CLASS_NAMES): Update.
6429         (REG_CLASS_CONTENT): Update.
6430         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
6431         registers as ALL_SSE_REGS.
6432         (ix86_additional_allocno_class_p): Remove.
6433         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
6434         (ix86_register_priority): Lower priority of EVEX SSE registers.
6435         Use IN_RANGE macro where appropriate.
6436         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
6437         AVX-5124VNNIW checks.
6438         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
6439         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
6440         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
6441         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
6442         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
6443         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
6444         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
6445         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
6446         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
6447         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
6448         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
6449         * config/i386/constraints.md (Yh): Remove.
6451 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
6453         * config/i386/i386.c (regclass_map): Declare integer REX registers
6454         as GENERAL_REGS.
6456 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
6458         * doc/service.texi (Service): Switch the fsf.org link to https.
6460 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6462         PR target/86798
6463         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
6464         Define to speculation_safe_value_not_needed.
6466 2018-09-21  Florian Weimer  <fweimer@redhat.com>
6468         PR middle-end/81035
6469         * doc/extend.texi (Common Function Attributes): Mention that
6470         noreturn suppresses tail call optimization.
6472 2018-09-21  Jeff Law  <law@redhat.com>
6474         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
6475         vr_values::cleanup_edges_and_switches.
6476         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
6477         vr_values class.
6478         (identify_jump_threads): Remove EDGE_IGNORE handling.
6479         (execute_vrp): Move handling of to_remove_edges and
6480         to_update_switch_stmts into vr_values class member functions.
6481         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
6482         (to_update_switch_stmts): Likewise.
6483         * vr-values.c: Include cfghooks.h.
6484         (vr_values::vr_values): Initialize to_remove_edges and
6485         to_update_switch_stmts.
6486         (vr_values::~vr_values): Verify to_remove_edges and
6487         to_update_switch_stmts are empty.
6488         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
6489         (vr_values::cleanup_edges_and_switches): New member function.
6490         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
6491         function.  Add new data members.
6493 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
6495         PR tree-optimization/87309
6496         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6497         calls with pflags and alt_flags.
6498         (selftest::test_capture_of_dump_calls): Add test of interaction of
6499         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6501 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6503         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6505 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6507         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6509 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6511         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6512         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6513         (VXWORKS_LIBS_RTP): Minor reordering.
6515 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6517         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6518         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6520 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6522         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6523         (PTRDIFF_TYPE): Likewise.
6525 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6527         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6528         triplet, similar to support for VxWorks7.
6529         * config/vxworks-dummy.h: Provide a default definition
6530         of TARGET_VXWORKS64 to 0.
6532 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6534         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6535         * config/vxworks-dummy.h: here.
6537 2018-09-21  Olivier Hainque  <hainque@adacore.com>
6539         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6541 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
6542             Bo Zhou  <zbo.zhou@hisilicon.com>
6544         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6545         * config/aarch64/aarch64-tune.md: Regenerated.
6546         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6547         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6548         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6550 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
6551             Julian Brown  <julian@codesourcery.com>
6553         * builtins.c (get_builtin_sync_mem): Handle address spaces.
6555 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6557         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6558         if the call takes a static chain.
6560 2018-09-21  Martin Liska  <mliska@suse.cz>
6562         * auto-profile.c (autofdo_source_profile::read): Do not
6563         set sum_all.
6564         (read_profile): Do not add working sets.
6565         (read_autofdo_file): Remove sum_all.
6566         (afdo_callsite_hot_enough_for_early_inline): Remove const
6567         qualifier.
6568         * coverage.c (struct counts_entry): Remove gcov_summary.
6569         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6570         do not support GCOV_TAG_PROGRAM_SUMMARY.
6571         (get_coverage_counts): Remove summary and expected
6572         arguments.
6573         * coverage.h (get_coverage_counts): Likewise.
6574         * doc/gcov-dump.texi: Remove -w option.
6575         * gcov-dump.c (dump_working_sets): Remove.
6576         (main): Do not support '-w' option.
6577         (print_usage): Likewise.
6578         (tag_summary): Likewise.
6579         * gcov-io.c (gcov_write_summary): Do not dump
6580         histogram.
6581         (gcov_read_summary): Likewise.
6582         (gcov_histo_index): Remove.
6583         (gcov_histogram_merge): Likewise.
6584         (compute_working_sets): Likewise.
6585         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6586         it not obsolete.
6587         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6588         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6589         (GCOV_HISTOGRAM_SIZE): Remove.
6590         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6591         (struct gcov_summary): Simplify rapidly just
6592         to runs and sum_max fields.
6593         (gcov_histo_index): Remove.
6594         (NUM_GCOV_WORKING_SETS): Likewise.
6595         (compute_working_sets): Likewise.
6596         * gcov-tool.c (print_overlap_usage_message): Remove
6597         trailing empty line.
6598         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6599         (output_lines): Remove program related line.
6600         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6601         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6602         histogram.
6603         (input_profile_summary): Do not read it.
6604         (merge_profile_summaries): And do not merge it.
6605         (input_symtab): Do not call removed function.
6606         * modulo-sched.c (sms_schedule): Do not print sum_max.
6607         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6608         removed when histogram method was invented.
6609         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6610         mode.
6611         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6612         GCOV coding style.
6613         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6614         and dump selected value.
6615         * profile.c (add_working_set): Remove.
6616         (get_working_sets): Likewise.
6617         (find_working_set): Likewise.
6618         (get_exec_counts): Do not work with working sets.
6619         (read_profile_edge_counts): Do not inform as sum_max is removed.
6620         (compute_branch_probabilities): Likewise.
6621         (compute_value_histograms): Remove argument for call of
6622         get_coverage_counts.
6623         * profile.h: Do not make gcov_summary const.
6625 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
6627         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6629 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
6631         PR tree-optimization/86990
6632         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6633         Check that the entire merged store group is made of constants only for
6634         overlapping stores.
6636 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
6638         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6639         (VTABLE_VERIFICATION_SPEC): Likewise.
6640         (SANITIZER_EARLY_SPEC): Likewise.
6641         (SANITIZER_SPEC): Likewise.
6642         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6643         * doc/invoke.texi (Link Options): Document -r.
6645 2018-09-20  Richard Biener <rguenther@suse.de>
6647         PR middle-end/87054
6648         * gimplify.c (gimplify_expr): Retain alignment of
6649         addressable lvalue in dereference.
6651 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
6653         PR bootstrap/87013
6654         * configure.ac: Check for .loc is_stmt support.
6655         * configure, config.in: Rebuilt.
6656         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6657         if not supported.
6659 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6661         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6662         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6663         -misel=no.
6665 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
6667         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6668         VECTOR_OTHER.
6669         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6670         case VECTOR_OTHER.
6672 2018-09-20  Marek Polacek  <polacek@redhat.com>
6674         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6676 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6678         PR tree-optimization/87288
6679         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6680         into account when determining PEELING_FOR_NITERS.
6682 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
6684         PR tree-optimization/86877
6685         * tree-vect-loop.c (vect_analyze_loop_2): Call
6686         vect_verify_datarefs_alignment.
6688 2018-09-19  Marek Polacek  <polacek@redhat.com>
6690         * doc/invoke.texi: Document -Wclass-conversion.
6692 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
6694         * config/pa/pa.c (pa_adjust_priority): Delete.
6695         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6697         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6698         (atomic_storehi): Likewise.
6699         (atomic_storesi): Likewise.
6700         (atomic_loaddi): Restore compare and swap exchange loop code.
6702 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
6704         PR rtl-optimization/86902
6705         * combine.c (try_combine): When changing the CC mode used, don't change
6706         an unrelated mode in other_insn to that new CC mode.
6708 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
6710         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6711         with %T in place of calls to dump_generic_expr.
6712         (prune_runtime_alias_test_list): Likewise.
6713         (create_runtime_alias_checks): Likewise.
6714         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6715         (vect_analyze_data_ref_dependence): Likewise.
6716         (vect_slp_analyze_data_ref_dependence): Likewise.
6717         (vect_record_base_alignment): Likewise.  Use %G in place of call
6718         to dump_gimple_stmt.
6719         (vect_compute_data_ref_alignment): Likewise.
6720         (verify_data_ref_alignment): Likewise.
6721         (vect_find_same_alignment_drs): Likewise.
6722         (vect_analyze_group_access_1): Likewise.
6723         (vect_analyze_data_ref_accesses): Likewise.
6724         (dependence_distance_ge_vf): Likewise.
6725         (dump_lower_bound): Likewise.
6726         (vect_prune_runtime_alias_test_list): Likewise.
6727         (vect_find_stmt_data_reference): Likewise.
6728         (vect_analyze_data_refs): Likewise.
6729         (vect_create_addr_base_for_vector_ref): Likewise.
6730         (vect_create_data_ref_ptr): Likewise.
6731         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6732         (vect_can_advance_ivs_p): Likewise.
6733         (vect_update_ivs_after_vectorizer): Likewise.
6734         (vect_gen_prolog_loop_niters): Likewise.
6735         (vect_prepare_for_masked_peels): Likewise.
6736         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6737         (vect_determine_vectorization_factor): Likewise.
6738         (vect_is_simple_iv_evolution): Likewise.
6739         (vect_analyze_scalar_cycles_1): Likewise.
6740         (vect_analyze_loop_operations): Likewise.
6741         (report_vect_op): Likewise.
6742         (vect_is_slp_reduction): Likewise.
6743         (check_reduction_path): Likewise.
6744         (vect_is_simple_reduction): Likewise.
6745         (vect_create_epilog_for_reduction): Likewise.
6746         (vect_finalize_reduction:): Likewise.
6747         (vectorizable_induction): Likewise.
6748         (vect_transform_loop_stmt): Likewise.
6749         (vect_transform_loop): Likewise.
6750         (optimize_mask_stores): Likewise.
6751         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6752         (vect_split_statement): Likewise.
6753         (vect_recog_over_widening_pattern): Likewise.
6754         (vect_recog_average_pattern): Likewise.
6755         (vect_determine_min_output_precision_1): Likewise.
6756         (vect_determine_precisions_from_range): Likewise.
6757         (vect_determine_precisions_from_users): Likewise.
6758         (vect_mark_pattern_stmts): Likewise.
6759         (vect_pattern_recog_1): Likewise.
6760         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6761         (vect_record_max_nunits): Likewise.
6762         (vect_build_slp_tree_1): Likewise.
6763         (vect_build_slp_tree_2): Likewise.
6764         (vect_print_slp_tree): Likewise.
6765         (vect_analyze_slp_instance): Likewise.
6766         (vect_detect_hybrid_slp_stmts): Likewise.
6767         (vect_detect_hybrid_slp_1): Likewise.
6768         (vect_slp_analyze_operations): Likewise.
6769         (vect_slp_analyze_bb_1): Likewise.
6770         (vect_transform_slp_perm_load): Likewise.
6771         (vect_schedule_slp_instance): Likewise.
6772         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6773         (vect_mark_stmts_to_be_vectorized): Likewise.
6774         (vect_init_vector_1): Likewise.
6775         (vect_get_vec_def_for_operand): Likewise.
6776         (vect_finish_stmt_generation_1): Likewise.
6777         (vect_check_load_store_mask): Likewise.
6778         (vectorizable_call): Likewise.
6779         (vectorizable_conversion): Likewise.
6780         (vectorizable_operation): Likewise.
6781         (vectorizable_load): Likewise.
6782         (vect_analyze_stmt): Likewise.
6783         (vect_is_simple_use): Likewise.
6784         (vect_get_vector_types_for_stmt): Likewise.
6785         (vect_get_mask_type_for_stmt): Likewise.
6786         * tree-vectorizer.c (increase_alignment): Likewise.
6788 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
6790         * doc/rtl.texi: Adjust vec_select description.
6791         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6792         non-constant selectors.
6794 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
6796         * config/aarch64/aarch64-protos.h
6797         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6798         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6799         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6800         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6801         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6802         (AARCH64_FL_PROFILE): Move index so flags are ordered.
6803         (AARCH64_ISA_RCPC8_4): New flag.
6804         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6805         to aarch64_offset_9bit_signed_unscaled_p.
6806         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6807         and use stlur.
6808         * config/aarch64/constraints.md (Ust): New constraint.
6809         * config/aarch64/predicates.md.
6810         (aarch64_9bit_offset_memory_operand): New predicate.
6811         (aarch64_rcpc_memory_operand): New predicate.
6813 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
6815         PR rtl-optimization/87361
6816         * rtlanal.c (nonzero_bits1): Revert accidental change.
6818 2018-09-19  Richard Biener  <rguenther@suse.de>
6820         PR tree-optimization/87349
6821         PR tree-optimization/87342
6822         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6824 2018-09-18  Marek Polacek  <polacek@redhat.com>
6826         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6827         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6829 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6831         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6833 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
6835         PR rtl-optimization/86882
6836         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6838 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
6840         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6841         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6843 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
6845         PR other/87353
6846         * doc/invoke.texi (Link Options): Fix formatting and grammar.
6848 2018-09-18  Richard Biener  <rguenther@suse.de>
6850         PR middle-end/63155
6851         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6852         (compute_samebase_partition_bases): Likewise.
6853         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6854         (gimple_can_coalesce_p): Simplify.
6856 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
6858         Handle a library implementation of ffs calling __builtin_ffs.
6859         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6860         (mmix_init_libfuncs): New function: make __builtin_ffs expand
6861         to __ffsdi2.
6863 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6865         * diagnostic-show-locus.c (class layout_range): Add field
6866         "m_original_idx".
6867         (layout_range::layout_range): Add "original_idx" param and use it
6868         to initialize new field.
6869         (make_range): Use 0 for original_idx.
6870         (layout::layout): Pass in index to calls to
6871         maybe_add_location_range.
6872         (layout::maybe_add_location_range): Add param "original_idx" and
6873         pass it on to layout_range.
6874         (layout::print_any_labels): Pass on range->m_original_idx to
6875         get_text call.
6876         (gcc_rich_location::add_location_if_nearby): Use 0 for
6877         original_idx.
6878         * gcc-rich-location.h (text_range_label::get_text): Update for new
6879         param.
6880         (range_label_for_type_mismatch::get_text): Likewise.
6882 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6884         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6886 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
6888         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6889         format_string_diagnostic_t.
6890         (fmtwarn_n): Likewise.
6891         * substring-locations.c
6892         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6893         (format_warning_n_va): Convert to...
6894         (format_string_diagnostic_t::emit_warning_n_va): ...this.
6895         (format_warning_va): Convert to...
6896         (format_string_diagnostic_t::emit_warning_va): ...this.
6897         (format_warning_at_substring): Convert to...
6898         (format_string_diagnostic_t::emit_warning): ...this.
6899         (format_warning_at_substring_n): Convert to...
6900         (format_string_diagnostic_t::emit_warning_n): ...this.
6901         * substring-locations.h (class format_string_diagnostic_t): New
6902         class.
6903         (format_warning_va): Convert to
6904         format_string_diagnostic_t::emit_warning_va.
6905         (format_warning_n_va): Convert to
6906         format_string_diagnostic_t::emit_warning_n_va.
6907         (format_warning_at_substring): Convert to
6908         format_string_diagnostic_t::emit_warning.
6909         (format_warning_at_substring_n): Convert to
6910         format_string_diagnostic_t::emit_warning_n.
6912 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
6913             Bernd Schmidt <bernds_cb1@t-online.de>
6915         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6916         SImode args.
6918 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
6920         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6921         operand 0 predicate to nonimmediate operand.
6922         (rint<mode>2_frndint): Remove insn pattern.
6923         (rint<mode>2): Change operand 1 predicate to general_operand.
6924         Extend operand 1 to XFmode and generate rintxf2 insn.
6925         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6926         Do not use X87MODEF mode macro.
6927         (frndintxf2_<rounding>_i387): Rename from
6928         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
6929         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6930         to XFmode and generate significandxf3 insn.
6932 2018-09-17  Richard Biener  <rguenther@suse.de>
6934         PR tree-optimization/87328
6935         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6936         visiting unexecutable backedges when not iterating.
6937         (do_rpo_vn): Mark all edges not executable even when not
6938         iterating.
6940 2018-09-17  Martin Jambor  <mjambor@suse.cz>
6942         PR c/63886
6943         * doc/invoke.texi (Warning Options): Likewise.
6945 2018-09-17  Richard Biener  <rguenther@suse.de>
6947         PR tree-optimization/87301
6948         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6949         clean EH info from leftover copy assignments.
6951 2018-09-17  Martin Liska  <mliska@suse.cz>
6953         PR gcov-profile/85871
6954         * gcov.c (output_intermediate_file): Fix out of bounds
6955         access.
6957 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
6959         * config/arc/arc.c: Object attributes for core4 not reflected
6960         correctly.
6961         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6962         core3).
6964 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
6966         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6968 2018-09-17  Martin Liska  <mliska@suse.cz>
6970         * doc/gcov.texi: Document new option --use-hotness-colors.
6971         * gcov.c (struct source_info): Declare new field.
6972         (source_info::source_info): Set default for maximum_count.
6973         (print_usage): Add new -q option.
6974         (process_args): Process it.
6975         (accumulate_line_info): Save src->maximum_count.
6976         (output_line_beginning): Make color line number if
6977         flag_use_hotness_colors is set.
6978         (output_line_details): Pass default argument value.
6979         (output_lines): Pass src->maximum_count.
6981 2018-09-17  Martin Liska  <mliska@suse.cz>
6983         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6984         Use processor_names table.
6985         * config/i386/i386.c (ix86_default_align): Use
6986         processor_cost_table for alignment values.
6987         (ix86_option_override_internal): Use processor_names.
6988         (ix86_function_specific_print): Likewise.
6989         * config/i386/i386.h (struct processor_costs):
6990         Add alignment values.
6991         (struct ptt): Remove and replace with const char *.
6992         * config/i386/x86-tune-costs.h (struct processor_costs):
6993         Declare default alignments for all costs.
6995 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
6997         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6998         symbolics or VR_VARYING ranges for ABS_EXPR.
6999         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
7000         when range will wrap.
7002 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
7004         PR middle-end/86864
7005         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
7006         before and after a JUMP_TABLE_DATA.
7008 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
7010         PR middle-end/87188
7011         * dojump.c (do_compare_and_jump): Canonicalize function pointers
7012         when one operand is a function pointer.  Use POINTER_TYPE_P and
7013         FUNC_OR_METHOD_TYPE_P.
7014         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
7015         * fold-const.c (build_range_check): Likewise.
7016         * match.pd (simple_comparison): Likewise.
7018 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
7020         PR c/82967
7021         * spellcheck.c (get_edit_distance_cutoff): New function.
7022         (selftest::test_edit_distance_unit_test_oneway): Rename to...
7023         (selftest::test_get_edit_distance_one_way): ...this.
7024         (selftest::test_get_edit_distance_unit): Rename to...
7025         (selftest::test_get_edit_distance_both_ways): ...this.
7026         (selftest::test_edit_distances): Move tests to this new function,
7027         and test some more pairs of strings.  Update for above renaming.
7028         (selftest::get_old_cutoff): New function.
7029         (selftest::test_get_edit_distance_cutoff): New function.
7030         (selftest::assert_suggested_for): New function.
7031         (ASSERT_SUGGESTED_FOR): New macro.
7032         (selftest::assert_not_suggested_for): New function.
7033         (ASSERT_NOT_SUGGESTED_FOR): New macro.
7034         (selftest::test_suggestions): New function.
7035         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
7036         tests to selftest::test_edit_distances and call it.  Add calls to
7037         selftest::test_get_edit_distance_cutoff and
7038         selftest::test_suggestions.
7039         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
7040         (best_match::consider): Replace hard-coded cutoff calculation with
7041         a call to...
7042         (best_match::get_cutoff): New declaration.
7043         (best_match::get_best_meaningful_candidate): Likewise.
7045 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7047         * builtins.c (fold_builtin_strlen): Remove TODO comment.
7049 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7051         revert:
7052         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7054         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7055         terminated string literal.
7057 2018-09-14  Martin Sebor  <msebor@redhat.com>
7059         * builtins.c (unterminated_array): Handle ARRAY_REF.
7060         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
7061         * builtins.h (unterminated_array): Declare extern.
7062         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7063         arrays.
7064         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7065         calls.
7067 2018-09-14  Martin Sebor  <msebor@redhat.com>
7068             Jeff Law  <law@redhat.com>
7070         * builtins.c (unterminated_array): New.
7071         (expand_builtin_strcpy): Adjust.
7072         (expand_builtin_strcpy_args): Detect unterminated arrays.
7073         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
7074         unterminated arrays.
7075         * gimple-fold.h (get_maxval_strlen): Add argument.
7076         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7078         * gimple-fold.c (get_range_strlen): Add argument.
7079         (get_maxval_strlen): Adjust.
7080         * gimple-fold.h (get_range_strlen): Add argument.
7082 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
7084         * config/i386/movdirintrin.h: Fix copyright year.
7086 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
7088         * reg-stack.c: Include regs.h.
7089         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7090         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7091         FIRST_STACK_REG, not DFmode.
7092         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7093         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
7094         (change stack): Default register mode to the reg_raw_mode of
7095         FIRST_STACK_REG, not DFmode.
7096         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7097         (*swapxf): Rename from swapxf.
7099 2018-09-14  Carl Love  <cel@us.ibm.com>
7101         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7102         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7104 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
7106         PR target/87224
7107         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7108         alternatives.
7110 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
7112         PR target/85628
7113         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7115 2018-09-14  Jason Merrill  <jason@redhat.com>
7117         Fix --enable-gather-detailed-mem-stats.
7118         * hash-table.c (hash_table_usage): Change from variable to function.
7119         * hash-table.h: Adjust.
7120         * Makefile.in: Add missing dependencies on hash-table.h.
7122 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7124         PR tree-optimization/87259
7125         PR lto/87283
7126         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7127         execute_cse_reciprocals_1 has tried transforming.
7129 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
7131         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7132         VR_VARYING for PLUS/MINUS_EXPR.
7134 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
7136         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7137         formatting.
7139 2018-09-14  Richard Biener  <rguenther@suse.de>
7141         PR middle-end/63155
7142         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7143         bits for the merged partition.
7145 2018-09-13  Martin Sebor  <msebor@redhat.com>
7146             Bernd Edlinger  <bernd.edlinger@hotmail.de>
7148         * builtins.h (c_srlen): Add argument.
7149         * builtins.c (warn_string_no_nul): New function.
7150         (c_strlen): Add argument and use it.  Update recursive calls.
7151         Pass DECL argument to string_constant to get info on non
7152         terminated strings.  Update *NONSTR as needed.
7153         (fold_builtin_strlen): Add argument to calls to c_strlen.
7154         Warn for unterminated arrays.
7155         (warn_string_no_null): Add prototype.
7156         * expr.c (string_constant): Update arguments.  Update recursive
7157         calls appropriately.  Detect missing NUL terminator and outermost
7158         declaration its missing in.
7159         Improve checks for arrays with nonzero lower bound or elements
7160         that are not a single byte.  Simplify offset computation.
7161         Simplify checks for non-NUL terminated strings.
7162         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7163         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7165 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7167         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7168         correctly.
7169         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
7170         argument.  Fix range checks.
7171         * fold-const.h (c_getstr): Adjust protoype.
7172         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7173         string is constant but contains no NUL byte.
7175         * expr.c (string_constant): Adjust function comment.
7176         Remove bogus check for zero termination.
7178         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7180         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7181         (get_constant_size): Don't make STRING_CSTs larger than they are.
7182         (check_string_literal): New check function for STRING_CSTs.
7183         (output_constant): Use it.
7185 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
7187         PR target/86812
7188         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7190 2018-09-13  Richard Biener  <rguenther@suse.de>
7192         PR tree-optimization/87263
7193         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7194         (struct unwind_state): Add max_rpo field.
7195         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7196         Compute max_rpo, the max RPO number a block can be backwards reached
7197         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
7198         separating it from the iterating mode.
7200 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
7202         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7203         (rfs_decision): New scheduling decision.
7205 2018-09-13  Richard Biener  <rguenther@suse.de>
7207         PR bootstrap/87134
7208         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7209         (vn_nary_op_insert_pieces_predicated): Do not write useless
7210         valid_dominated_by_p entry outside of the allocated storage.
7212 2018-09-13  Omar Sandoval  <osandov@osandov.com>
7213             Tom de Vries  <tdevries@suse.de>
7215         PR debug/86985
7216         * dwarf2out.c (is_c): New function.
7217         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7219 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
7221         PR target/85628
7222         * config/aarch64/aarch64.md (*aarch64_bfxil):
7223         Define.
7224         * config/aarch64/constraints.md (Ulc): Define.
7225         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7226         Define.
7227         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7228         New function.
7230 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
7232         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7233         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7234         aarch64_layout_frame call.
7235         (aarch64_expand_epilogue): Likewise.
7236         (aarch64_initial_elimination_offset): Likewise.
7237         (aarch64_get_separate_components): Likewise.
7238         (aarch64_use_return_insn_p): Likewise.
7239         (aarch64_layout_frame): Remove unneeded check.
7241 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
7243         * configure.ac: Only append
7244         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
7245         gcc_config_arguments if it was never reconfigured or last reconfigure
7246         was with different arguments.
7247         * configure: Regenerated.
7249 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
7250             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7252         PR middle-end/87290
7253         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
7254         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
7256 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
7258         PR tree-optimization/87287
7259         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
7260         X % C == 0 to X % (unsigned) C == 0 optimization to ...
7261         * match.pd (X % C == 0): ... here.  New optimization.
7263 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
7265         PR middle-end/82853
7266         * expr.h (maybe_optimize_mod_cmp): Declare.
7267         * expr.c (mod_inv): New function.
7268         (maybe_optimize_mod_cmp): New function.
7269         (do_store_flag): Use it.
7270         * cfgexpand.c (expand_gimple_cond): Likewise.
7272 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
7273             Julian Brown  <julian@codesourcery.com>
7275         PR middle-end/86336
7276         * gimplify.c (gimplify_scan_omp_clauses): Set
7277         target_firstprivatize_array_bases in OpenACC parallel and kernels
7278         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
7279         OpenACC data regions.
7281 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
7283         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
7284         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
7286 2018-09-12  Richard Biener  <rguenther@suse.de>
7288         PR tree-optimization/87280
7289         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
7290         edge but unreachable target.
7291         (do_rpo_vn): For conservatively handling a PHI only mark
7292         the backedge executable but not the block reachable.
7294 2018-09-12  Richard Biener  <rguenther@suse.de>
7296         PR tree-optimization/87266
7297         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
7298         visited blocks.
7300 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
7302         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
7303         constants.
7304         ("trunc<BFP:mode><DFP_ALL:mode>2")
7305         ("trunc<DFP_ALL:mode><BFP:mode>2")
7306         ("extend<BFP:mode><DFP_ALL:mode>2")
7307         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
7308         according to the target operand type.
7310 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
7311             Andreas Krebbel  <krebbel@linux.ibm.com>
7313         PR tree-optimization/86844
7314         * gimple-ssa-store-merging.c
7315         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
7316         there are any overlapping stores in between them, make sure they are
7317         also coalesced or we give up completely.
7319 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
7321         PR middle-end/87248
7322         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
7323         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
7325 2018-09-12  Tom de Vries  <tdevries@suse.de>
7327         * common.opt (gdescribe-dies): Add option.
7328         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
7329         attribute for artifical and nameless decls.
7330         (dwarf2out_register_external_die): Add description attribute to
7331         external reference die.
7332         (add_desc_attribute): New functions.
7333         (gen_subprogram_die): Add description attribute to
7334         DW_TAG_call_site_parameter.
7335         * tree-pretty-print.c (print_generic_expr_to_str): New function.
7336         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
7337         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
7338         -gno-describe-dies.
7339         (@item -gdescribe-dies): Add.
7341 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
7343         * tree-vrp.c (vrp_shift_undefined_p): Remove.
7344         (extract_range_from_binary_expr_1: Call
7345         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
7346         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
7347         depend on sign.
7349 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
7351         * gimple-ssa-warn-alloca.c
7352         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
7353         field for ALLOCA_BOUND_*_LARGE.
7355 2018-09-11  Nathan Sidwell  <nathan@acm.org>
7357         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
7359 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
7361         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
7362         for clobbers.  Remove obsolete comment.
7364 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
7366         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
7367         mpxchk, mpxld and mpxst types.
7368         (define_attr length_immediate): Remove all processing of mpx types.
7369         (define_attr prefix_0f): Ditto.
7370         (define_attr memory): Ditto.
7372 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
7374         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
7375         (log<mode>2): Change operand 1 predicate to general_operand.
7376         Extend operand 1 to XFmode and generate logxf3 insn.
7377         (log10<mode>2): Change operand 1 predicate to general_operand.
7378         Extend operand 1 to XFmode and generate log10xf3 insn.
7379         (log2<mode>2): Change operand 1 predicate to general_operand.
7380         Extend operand 1 to XFmode and generate log2xf3 insn.
7381         (fyl2xp1_extend<mode>xf3_i387): Remove.
7382         (log1p<mode>2): Change operand 1 predicate to general_operand.
7383         Extend operand 1 to XFmode and generate log1pxf3 insn.
7384         (fxtract_extend<mode>xf3_i387): Remove.
7385         (logb<mode>2): Change operand 1 predicate to general_operand.
7386         Extend operand 1 to XFmode and generate logbxf3 insn.
7387         (ilogb<mode>2): Change operand 1 predicate to general_operand.
7388         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
7389         (significand<mode>2): Change operand 1 predicate to general_operand.
7390         Extend operand 1 to XFmode and generate significandxf3 insn.
7392 2018-09-11  Nathan Sidwell  <nathan@acm.org>
7394         * gcc.c (perror_with_name, pfatal_with_name): Delete.
7395         (load_specs): Use fatal_error.
7396         (DELETE_IF_ORDINARY, process_command): Use error.
7397         (execute, run_attempt): Use fatal_error.
7399 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
7401         * diagnostic-core.h (sorry_at): New prototype.
7402         * diagnostic.c (sorry_at): New function.
7404 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
7406         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
7407         by zero as VR_UNDEFINED.
7409 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
7411         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
7412         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
7413         (<sincos>mode2): New expander.
7414         (sincos_extend<mode>xf3_i387): Remove insn pattern.
7415         (sincos -> sin, cos splitters): Remove splitter patterns.
7416         (sincos<mode>3): Change operand 2 predicate to general_operand.
7417         Extend operand 2 to XFmode and generate sincosxf3 insn.
7418         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
7419         Change operand 3 predicate to const1_operand.
7420         (fptan_extend<mode>xf4_i387): Remove insn pattern.
7421         (tanxf2): Update operands in the call to fptanxf4_i387.
7422         (tan<mode>2): Change operand 1 predicate to general_operand.
7423         Extend operand 1 to XFmode and generate tanxf3 insn.
7424         (atan2xf3): Rename from *fpatanxf3_i387.
7425         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
7426         (atan2xf3): Remove expander.
7427         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
7428         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
7429         (atan<mode>2): Change operand 1 predicate to general_operand.
7430         Extend operand 1 to XFmode and generate atanxf3 insn.
7432 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
7434         * config/i386/i386.md (x87/SSE constant load splitter): Use
7435         memory_operand instead of nonimmediate_operand for input operand
7436         predicate.
7438 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
7440         * config/i386/i386.md (float partial SSE register stall splitter): Move
7441         splitter near its instruction pattern.
7442         (float_extend partial SSE register stall splitter): Ditto.
7443         (float_truncate partial SSE register stall splitter): Ditto.
7445 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
7447         PR target/86794
7448         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7449         to speculation_safe_value_not_needed.
7451         PR target/85666
7452         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
7453         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
7454         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
7455         leaf_function_p, instead use has_hard_reg_initial_val.
7457 2018-09-09  Nathan Sidwell  <nathan@acm.org>
7459         * gcc.h (pfatal_with_name): Don't declare here.
7460         * gcc.c (pfatal_with_name): Make static.
7462 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
7464         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
7465         earlyclobber.
7467 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
7469         PR rtl-optimization/85458
7470         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
7471         priority hook to reduce the priority of EXPR.
7473 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
7475         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
7476         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
7477         with X87_ENABLE_FLOAT.  Remove preparation code.
7478         (*float<SWI48:mode><MODEF:mode>2): Rename from
7479         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
7480         math using "enabled" attribute.
7481         (*floatdi<MODEF:mode>2_i387): Rename from
7482         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
7483         enable for 32bit targets only.
7484         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
7485         splitter.
7486         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
7487         as operand 1 predicate.  Rewrite as define_insn_and_split.
7488         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
7490 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
7492         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7493         to fallthru to FLOAT case.
7495 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7497         PR target/86731
7498         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7499         around folding of vec_sl to handle out of range shift values.
7501 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
7503         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7504         Update callers to gen_fix_trunc<mode>_i387_fisttp
7505         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7506         nonimmediate_operand.
7507         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7508         and corresponding splitters.
7509         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7510         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7511         (fix_truncdi_i387_with_temp): Remove insn pattern
7512         and corresponding splitters.
7513         (fix_trunc<mode>_i387): Change operand 0 predicate to
7514         nonimmediate_operand.
7515         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7516         and corresponding splitters.
7517         (*fistdi2_1): Remove.
7518         (fistdi2): Ditto.
7519         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7520         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
7521         (*fist<mode>2_1): Remove.
7522         (fist<mode>2): Ditto.
7523         (fist<mode>2_with_temp): Remove insn pattern and corresponding
7524         splitters.
7525         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
7526         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7527         (fistdi2_<rounding>): Change operand 0 predicate to
7528         nonimmediate_operand.
7529         (fistdi2_<rounding>_with_temp): Remove insn pattern
7530         and corresponding splitters.
7531         (fist<mode>2_<rounding>): Change operand 0 predicate to
7532         nonimmediate_operand.
7533         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7534         and corresponding splitters.
7536         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7538 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7540         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7541         the init value.
7543 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7545         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7546         early gimple folding of vec_splat().
7547         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7548         * gimple-fold.h: Add an extern define for tree_vec_extract().
7550 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
7552         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7553         wrappers around TREE_TYPE comparisons.
7555 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7557         PR target/80080
7558         * config/s390/predicates.md: Add nonsym_memory_operand.
7559         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7560         contains a SYMBOL_REF, load it into an intermediate pseudo.
7561         (s390_emit_compare_and_swap): Legitimize operand.
7562         * config/s390/s390.md: Use the new nonsym_memory_operand
7563         with UNSPECV_CAS patterns.
7565 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7567         PR target/80080
7568         * config/s390/s390-passes.def: New file.
7569         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7570         declaration.
7571         (make_pass_s390_early_mach): Add declaration.
7572         * config/s390/s390.c (make_pass_s390_early_mach):
7573         (s390_option_override): Remove dynamic registration.
7574         * config/s390/t-s390: Add s390-passes.def.
7576 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
7578         * config/s390/s390.c (s390_decompose_constant_pool_ref):
7579         Remove UNSPEC_LTREL_BASE check.
7580         (annotate_constant_pool_refs): Likewise.
7581         (find_constant_pool_ref): Likewise.
7582         (find_ltrel_base): Removed.
7583         (replace_ltrel_base): Removed.
7584         (s390_mainpool_finish): Remove replace_ltrel_base call.
7585         (s390_chunkify_start): Remove pending LTREL_BASE logic.
7586         (s390_chunkify_finish): Remove replace_ltrel_base call.
7587         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7589 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
7591         PR target/86779
7592         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7593         to speculation_safe_value_not_needed.
7595 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
7596             Bernd Schmidt  <bernds_cb1@t-online.de>
7598         * config/nvptx/nvptx-opts.h: New file.
7599         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7600         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7601         (ASM_SPEC): Define.
7602         (TARGET_SM35): New macro.
7603         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7604         correct predicate.
7605         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7606         values.
7607         (misa=): New option.
7608         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7610 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
7612         * config/i386/i386.md (truncdfsf2): Remove expander.
7613         (truncdfsf2_with_temp): Ditto.
7614         (truncxf<mode>2): Ditto.
7615         (*truncdfsf_fast_mixed): Remove insn pattern.
7616         (*truncdfsf_fast_i387): Ditto.
7617         (*truncdfsf_mixed): Ditto.
7618         (*truncdfsf_i387): Ditto.
7619         (*truncdfsf2_i387_1): Ditto.
7620         (*truncxfsf2_mixed): Ditto.
7621         (*truncxfdf2_mixed): Ditto.
7622         (*truncxf<mode>2_i387_noop): Ditto. Update callers
7623         to call gen_truncxf<mode>2 instead.
7624         (*truncxf<mode>2_i387): Remove.
7625         (reg->reg splitters): Remove splitter pattern.
7626         (reg->mem splitters): Ditto.
7628         (truncdfsf2): New insn pattern.
7629         (truncxf<mode>2): Ditto.
7631 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7633         * tree-ssa-math-opts.c (is_mult_by): New function.
7634         (is_square_of): Use the above.
7635         (optimize_recip_sqrt): New function.
7636         (pass_cse_reciprocals::execute): Use the above.
7638 2018-09-05  Richard Biener  <rguenther@suse.de>
7640         PR bootstrap/87134
7641         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7642         to zero-init the emplaced vec.
7644 2018-09-05  Martin Liska  <mliska@suse.cz>
7646         PR tree-optimization/87205
7647         * tree-switch-conversion.c (pass_lower_switch::execute):
7648         Group cases for switch statements.
7650 2018-09-05  Richard Biener  <rguenther@suse.de>
7652         PR tree-optimization/87217
7653         * tree-ssa-sccvn.c (vuse_valueize): New.
7654         (vn_reference_lookup_pieces): Use it.
7655         (vn_reference_lookup): Likewise.
7657 2018-09-05  Nathan Sidwell  <nathan@acm.org>
7659         PR c++/87137
7660         * stor-layout.c (place_field): Scan forwards to check last
7661         bitfield when ms_bitfield_placement is in effect.
7663 2018-09-05  Richard Biener  <rguenther@suse.de>
7665         PR bootstrap/87225
7666         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7667         return.
7669 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
7670             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
7672         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7673         * config.gcc (extra_objs): Build it.
7674         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7675         Likewise.
7676         * config/aarch64/aarch64-passes.def
7677         (pass_tag_collision_avoidance): New pass.
7678         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7679         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7680         (aarch64_classify_address): Remove static qualifier.
7681         (aarch64_address_info, aarch64_address_type): Move to...
7682         * config/aarch64/aarch64-protos.h: ... here.
7683         (make_pass_tag_collision_avoidance): New function.
7684         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7685         New tuning flag.
7687 2018-09-05  Martin Liska  <mliska@suse.cz>
7689         * doc/gcov.texi: Update documentation of humar
7690         readable mode.
7691         * gcov.c (format_count): Print one decimal place, it provides
7692         more fine number of situations like '1G' vs. '1.4G'.
7694 2018-09-05  Martin Liska  <mliska@suse.cz>
7696         PR target/87164
7697         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7698         * optc-gen.awk: Allow 'Var' for Deprecated options in order
7699         to generate a MASK value.
7701 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
7703         PR debug/86593
7704         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7705         if frame pointer isn't used.
7706         (compute_frame_pointer_to_fb_displacement): Likewise.
7708 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
7710         PR target/87198
7711         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7712         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7713         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7714         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7715         and OPTION_MASK_ISA_XSAVEC_UNSET.
7717 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
7719         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7720         XOR operations in NAND case.
7722 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7724         * wide-int-range.cc (wide_int_range_convert): New.
7725         * wide-int-range.h (wide_int_range_convert): New.
7726         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7727         code into wide_int_range_convert.
7728         (extract_range_into_wide_ints): Do not munge anti range constants
7729         into the entire domain.  Just return the range back.
7731 2018-09-04  Martin Liska  <mliska@suse.cz>
7733         * genmatch.c (output_line_directive): Add new argument
7734         fnargs.
7735         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7737 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7739         * doc/invoke.texi (Option Summary): Add whitespace.
7741         * doc/invoke.texi (Option Summary): Add -Waligned-new.
7743 2018-09-04  Richard Biener  <rguenther@suse.de>
7745         PR tree-optimization/87211
7746         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7747         backedge value we're supposed to treat as VARYING also number
7748         the PHI to VARYING in case it got a different value-number already.
7750 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
7752         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7753         (extract_range_from_binary_expr_1): Do not call
7754         vrp_can_optimize_bit_op.
7755         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7756         static.
7757         (wide_int_range_get_mask_and_bounds): New.
7758         (wide_int_range_optimize_bit_op): New.
7759         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7760         (wide_int_range_bit_and): Same.
7761         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7762         (wide_int_range_optimize_bit_op): New.
7763         (wide_int_range_get_mask_and_bounds): New.
7765 2018-09-04  Richard Biener  <rguenther@suse.de>
7767         PR tree-optimization/87176
7768         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7769         variable.  When value-numbering a virtual PHI node make sure
7770         to not value-number to the backedge value.
7772 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
7774         * doc/extend.texi (Long Long, Hex Floats): Document support for
7775         long long and hex floats in more recent versions of ISO C++.
7777 2018-09-03  Richard Biener  <rguenther@suse.de>
7779         PR tree-optimization/87177
7780         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7781         cleanup.
7783 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7785         * bb-reorder.c (edge_order): Convert to C-qsort-style
7786         tri-state comparator.
7787         (reorder_basic_blocks_simple): Change std::stable_sort to
7788         gcc_stablesort.
7790 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7792         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7793         tri-state comparator.
7794         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7796 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7798         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
7799         (mergesort): ... here as maximum count for using netsort.
7800         (gcc_qsort): Set nlim to 3 if stable sort is requested.
7801         (gcc_stablesort): New.
7802         * system.h (gcc_stablesort): Declare.
7804 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
7806         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7807         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
7808         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
7810 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
7812         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7813         lxsdx and stxsdx alternatives.
7814         (*mov<mode>_hardfloat64): Ditto.
7815         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7817 2018-09-03  Richard Biener  <rguenther@suse.de>
7819         PR tree-optimization/87200
7820         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7821         simplify result.
7823 2018-09-03  Martin Liska  <mliska@suse.cz>
7825         PR tree-optimization/87201
7826         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7827         Fix parenthesis in an expression.
7829 2018-09-03  Richard Biener  <rguenther@suse.de>
7831         PR tree-optimization/87197
7832         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7833         visited.  CSE the VN_INFO hashtable lookup.
7835         PR tree-optimization/87169
7836         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7837         iterating make sure there's no extra backedges from irreducible
7838         regions feeding the header.  Mark the destination block
7839         executable.
7841 2018-09-03  Martin Liska  <mliska@suse.cz>
7843         PR driver/83193
7844         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7845         * common/common-targhooks.c (default_get_valid_option_values):
7846         New function.
7847         * common/common-targhooks.h (default_get_valid_option_values):
7848         Likewise.
7849         * common/config/i386/i386-common.c: Move processor_target_table
7850         from i386.c.
7851         (ix86_get_valid_option_values): New function.
7852         (TARGET_GET_VALID_OPTION_VALUES): New macro.
7853         * config/i386/i386.c (struct ptt): Move to i386-common.c.
7854         (PTA_*): Move all defined masks into i386-common.c.
7855         (ix86_function_specific_restore): Use new processor_cost_table.
7856         * config/i386/i386.h (struct ptt): Moved from i386.c.
7857         (struct pta): Likewise.
7858         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7859         * doc/tm.texi.in: Likewise.
7860         * opt-suggestions.c (option_proposer::suggest_option):
7861         Pass prefix to build_option_suggestions.
7862         (option_proposer::get_completions): Likewise.
7863         (option_proposer::build_option_suggestions): Use the new target
7864         hook.
7865         * opts.c (struct option_help_tuple): New struct.
7866         (print_filtered_help): Use the new target hook.
7868 2018-09-03  Martin Liska  <mliska@suse.cz>
7870         PR middle-end/59521
7871         * predict.c (set_even_probabilities): Add likely_edges
7872         argument and handle cases where we have precisely one
7873         likely edge.
7874         (combine_predictions_for_bb): Catch also likely_edges.
7875         (tree_predict_by_opcode): Handle gswitch statements.
7876         * tree-cfg.h (find_case_label_for_value): New declaration.
7877         (find_taken_edge_switch_expr): Likewise.
7878         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7879         Find pivot in decision tree based on probabily, not by number of
7880         nodes.
7882 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
7884         * doc/standards.texi (Standards): Update Objective-C reference.
7886 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7888         * doc/install.texi (Prerequisites): Update link for MPC.
7890 2018-09-01  Michael Matz  <matz@suse.de>
7892         PR tree-optimization/87074
7893         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7894         PHIs for outer-loop uses.
7896 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7898         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7899         * doc/invoke.texi (C Dialect Options): Ditto.
7901 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
7903         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7905 2018-08-31  Richard Biener  <rguenther@suse.de>
7907         PR tree-optimization/87168
7908         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7909         (rpo_elim::eliminate_avail): When OP was not visited it must
7910         be available.
7912 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
7914         * tree-vrp.c (copy_value_range): Convert param "from" from
7915         "value_range *" to "const value_range *".
7916         (range_is_null): Likewise for param "vr".
7917         (range_int_cst_p): Likewise.
7918         (range_int_cst_singleton_p): Likewise.
7919         (symbolic_range_p): Likewise.
7920         (value_ranges_intersect_p): Likewise for both params.
7921         (value_range_nonnegative_p): Likewise for param "vr".
7922         (value_range_constant_singleton): Likewise.
7923         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7924         (extract_range_into_wide_ints): Likewise for param "vr".
7925         (extract_range_from_multiplicative_op): Likewise for params "vr0"
7926         and "vr1".
7927         (vrp_can_optimize_bit_op): Likewise.
7928         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7929         "vr1_".
7930         (extract_range_from_unary_expr): Likewise.
7931         (debug_value_range): Likewise for param "vr".
7932         (value_range::dump): Add "const" qualifier.
7933         (vrp_prop::check_array_ref): Convert local "vr" from
7934         "value_range *" to "const value_range *".
7935         (vrp_prop::check_mem_ref): Likewise.
7936         (vrp_prop::visit_stmt): Likewise for local "old_vr".
7937         (vrp_intersect_ranges_1): Likewise for param "vr_1".
7938         (vrp_intersect_ranges): Likewise.
7939         (simplify_stmt_for_jump_threading): Likewise for local "vr".
7940         (vrp_prop::vrp_finalize): Likewise.
7941         * tree-vrp.h (value_range::dump): Add "const" qualifier.
7942         (vrp_intersect_ranges): Add "const" qualifier to params as above.
7943         (extract_range_from_unary_expr): Likewise.
7944         (value_range_constant_singleton): Likewise.
7945         (symbolic_range_p): Likewise.
7946         (copy_value_range): Likewise.
7947         (extract_range_from_binary_expr_1): Likewise.
7948         (range_int_cst_p): Likewise.
7949         (vrp_set_zero_nonzero_bits): Likewise.
7950         (range_int_cst_singleton_p): Likewise.
7952 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
7954         * config/aarch64/arm_neon.h (vabsd_s64): New.
7955         (vnegd_s64): Likewise.
7957 2018-08-31  Martin Jambor  <mjambor@suse.cz>
7959         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7961 2018-08-31  Martin Liska  <mliska@suse.cz>
7963         * ipa-icf.c (sem_item::add_type): Use
7964         sem_item::m_type_hash_cache.
7965         * ipa-icf.h: Move the cache from sem_item_optimizer
7966         to sem_item.
7968 2018-08-31  Nathan Sidwell  <nathan@acm.org>
7970         * doc/extend.texi (Backwards Compatibility): Remove implicit
7971         extern C leeway of () being (...).
7973 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7975         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7977 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
7979         PR target/86684
7980         PR target/87149
7981         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7983 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
7985         PR middle-end/87138
7986         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7987         gen_int_mode.  Formatting fixes.
7989 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
7991         * target.def (custom_function_descriptors): Improve documentation.
7992         * doc/tm.texi.in (Trampolines): Expand discussion of function
7993         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7994         beginning of the section.
7995         * doc/tm.texi: Regenerated.
7997 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
7999         * cfg.h (class auto_edge_flag): Spell out the template-id of the
8000         base class in the initializer list.  This is a workaround for
8001         building with older GCC.
8002         (class auto_bb_flag): Likewise.
8004 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
8006         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
8007         (altivec_vcmpequ<VI_char>_p): Remove star.
8008         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
8009         vector load modes.
8010         (expand_strncmp_vec_sequence): New function.
8011         (emit_final_str_compare_vec): New function.
8012         (expand_strn_compare): Add support for vector strncmp.
8013         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
8014         length specification to bytes.
8015         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
8016         (vcmpnezb_p): New pattern.
8017         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
8018         for option -mstring-compare-inline-limit.
8020 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
8022         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
8023         (PTA_SKYLAKE): Add PTA_AES.
8024         (PTA_GOLDMONT): Likewise.
8026 2018-08-29  Jan Hubicka  <jh@suse.cz>
8028         PR lto/86517
8029         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
8030         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
8032 2018-08-29  Jan Hubicka  <jh@suse.cz>
8034         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
8035         TYPE_STUB_DECL.
8036         (hash_tree): Do not visit TYPE_STUB_DECL.
8037         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
8038         stream TYPE_STUB_DECL.
8039         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
8040         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
8041         after free_lang_data.
8042         (type_in_anonymous_namespace_p): Likewise.
8044 2018-08-29  Jan Hubicka  <jh@suse.cz>
8046         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8047         comment that it has to be even number.
8048         (class sreal): Change m_sig type to int32_t.
8049         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8050         int64_t for temporary calculations.
8051         (sreal_verify_basics): Drop one bit from minimum and maximum.
8053 2018-08-30  Richard Biener  <rguenther@suse.de>
8055         PR tree-optimization/87147
8056         * tree-ssa-sccvn.c (SSA_VISITED): New function.
8057         (visit_phi): When the degenerate result is from the backedge and
8058         we didn't visit its definition yet drop to VARYING.
8059         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
8061 2018-08-29  Jan Hubicka  <jh@suse.cz>
8063         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8064         DECL_VINDEX.
8065         (hash_tree): Likewise.
8067 2018-08-29  Jan Hubicka  <jh@suse.cz>
8069         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8070         and TYPE_NEXT_REF_TO.
8072 2018-08-29  Jan Hubicka  <jh@suse.cz>
8074         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8075         comment that it has to be even number.
8076         (class sreal): Change m_sig type to int32_t.
8077         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8078         int64_t for temporary calculations.
8079         (sreal_verify_basics): Drop one bit from minimum and maximum.
8081 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
8083         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8085 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
8087         PR middle-end/86995
8088         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8089         if to_add is negative.
8091 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8093         PR middle-end/87053
8094         * builtins.c (c_strlen): Improve range checks.
8096 2018-08-29  Martin Sebor  <msebor@redhat.com>
8097             Jeff Law  <law@redhat.com>
8099         PR tree-optimization/86714
8100         PR tree-optimization/86711
8101         * builtins.c (c_strlen): Add arguments to call to string_constant.
8102         * expr.c (string_constant): Add argument.  Detect missing nul
8103         terminator and outermost declaration it's missing in.
8104         * expr.h (string_constant): Add argument.
8105         * fold-const.c (read_from_constant_string): Add arguments to call to
8106         string_constant.
8107         (c_getstr): Likewise.
8108         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8109         to string_constant.
8110         * tree-ssa-strlen.c (get_stridx): Likewise.
8112 2018-08-29  Jan Hubicka  <jh@suse.cz>
8114         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8115         Do not stream DECL_VINDEX.
8116         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8117         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8118         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8120 2018-08-29  Richard Biener  <rguenther@suse.de>
8122         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8123         virtual operands that are not default defs to honor region
8124         boundaries.
8125         (rpo_vn_valueize): Remove ineffective code here.
8127 2018-08-29  Richard Biener  <rguenther@suse.de>
8129         PR tree-optimization/87132
8130         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8131         when skipping defs reachable over backedges.
8133 2018-08-29  Richard Biener  <rguenther@suse.de>
8135         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8136         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8137         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8138         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8139         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8140         (vn_reference_lookup_3): Remove use of const_parms.
8141         (free_rpo_vn): Do not free const_parms.
8142         (do_rpo_vn): Do not call init_const_parms.
8143         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8144         SSA_NAME_POINTS_TO_READONLY_MEMORY.
8145         (call_may_clobber_ref_p_1): Likewise.
8147 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
8149         PR other/86726
8150         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8151         (-O): Ditto.
8152         (-ftree-scev-cprop): Document.
8154 2018-08-29  Jan Hubicka  <jh@suse.cz>
8156         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8157         parameters.
8158         (sreal constructor): Update.
8159         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8160         sreal:operator/): Update.
8162 2018-08-29  Martin Liska  <mliska@suse.cz>
8164         * tree-switch-conversion.c (switch_conversion::expand):
8165         Strenghten assumption about gswitch statements.
8167 2018-08-29  Richard Biener  <rguenther@suse.de>
8169         PR tree-optimization/87117
8170         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8171         re-value-number released SSA VDEFs.
8173 2018-08-29  Richard Biener  <rguenther@suse.de>
8175         PR tree-optimization/87126
8176         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8178 2018-08-28  Jim Wilson  <jimw@sifive.com>
8180         * config/riscv/pic.md: Rewrite.
8181         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8182         invalid address.
8183         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8184         (SOFTF, default_load, softload, softstore): New.
8186 2018-08-28  Jeff Law  <law@redhat.com>
8188         * fold-const.c (fold_binary_loc): Remove recently added assert.
8190 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
8192         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8193         to OP parmeter of generated function.
8195 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
8197         PR tree-optimization/87009
8198         * match.pd: Add boolean optimizations.
8200 2018-08-28  Martin Sebor  <msebor@redhat.com>
8202         PR middle-end/86631
8203         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8204         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8205         (pass_walloca::gate): Use it.
8206         (alloca_call_type): Same.
8207         (pass_walloca::execute): Same.
8208         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8210 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
8212         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8213         GCC_VERSION for usage of "__gcc_dump_printf__" format from
8214         >= 3005 to >= 9000.
8216 2018-08-28  Richard Biener  <rguenther@suse.de>
8218         PR tree-optimization/87124
8219         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8220         constants before looking up avail.
8222 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
8224         PR middle-end/87099
8225         * calls.c (maybe_warn_nonstring_arg): Punt early if
8226         warn_stringop_overflow is zero.  Don't call get_range_strlen
8227         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8228         Swap comparison operands to have constants on rhs.  Only use
8229         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
8230         increment lenrng[0].
8232 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
8234         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8235         use of tree_to_shwi.  Remove duplicated test for the size being
8236         a whole number of bytes.
8238 2018-08-28  Richard Biener  <rguenther@suse.de>
8240         PR tree-optimization/87117
8241         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
8242         Handle removed stmt without LHS (GIMPLE_NOP).
8244 2018-08-28  Richard Biener  <rguenther@suse.de>
8246         PR tree-optimization/87117
8247         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
8248         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
8250 2018-08-28  Richard Biener  <rguenther@suse.de>
8252         PR tree-optimization/87117
8253         * tree-ssa-pre.c (compute_avail): Do not make expressions
8254         with predicated values available.
8255         (get_expr_value_id): Assert we do not run into predicated value
8256         expressions.
8258 2018-08-28  Richard Biener  <rguenther@suse.de>
8260         PR tree-optimization/87117
8261         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
8262         get virtual operands.
8263         (get_expr_operands): Handle STRING_CST like other decls.
8265 2018-08-28  Martin Liska  <mliska@suse.cz>
8267         * tree.h: Update documentation of fndecl_built_in_p
8268         functions.
8271 2018-08-27  Jeff Law  <law@redhat.com>
8272         PR tree-optimization/87110
8273         * tree-ssa-dse.c (compute_trims): Handle non-constant
8274         TYPE_SIZE_UNIT.
8276 2018-08-27  Martin Sebor  <msebor@redhat.com>
8278         PR tree-optimization/86914
8279         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
8281 2018-08-27  Martin Sebor  <msebor@redhat.com>
8283         PR tree-optimization/87112
8284         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
8285         the type of the bound argument.
8287 2018-08-27  Jeff Law  <law@redhat.com>
8289         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
8290         type does not have a TYPE_SIZE_UNIT.
8292 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
8294         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
8295         with include of backend.h.
8297 2018-08-27  Richard Biener  <rguenther@suse.de>
8299         PR tree-optimization/86927
8300         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
8301         use const cond reduction code.
8303 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
8305         PR tree-optimization/85758
8306         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
8308 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
8310         PR c++/87091
8311         * diagnostic-show-locus.c (class layout_range): Update for
8312         conversion of show_caret_p to a tri-state.
8313         (layout_range::layout_range): Likewise.
8314         (make_range): Likewise.
8315         (layout::maybe_add_location_range): Likewise.
8316         (layout::should_print_annotation_line_p): Don't show annotation
8317         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
8318         (layout::get_state_at_point): Update for conversion of
8319         show_caret_p to a tri-state.  Bail out early for
8320         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
8321         underlining or source colorization.
8322         (gcc_rich_location::add_location_if_nearby): Update for conversion
8323         of show_caret_p to a tri-state.
8324         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
8325         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
8326         Likewise.
8327         (selftest::test_one_liner_labels): Likewise.
8328         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
8329         conversion of show_caret_p to a tri-state.
8330         * pretty-print.c (text_info::set_location): Likewise.
8331         * pretty-print.h (text_info::set_location): Likewise.
8332         * substring-locations.c (format_warning_n_va): Likewise.
8333         * tree-diagnostic.c (default_tree_printer): Likewise.
8334         * tree-pretty-print.c (newline_and_indent): Likewise.
8336 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
8338         PR c++/87091
8339         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
8340         line above for line-insertion fix-it hints.
8341         (selftest::test_fixit_insert_containing_newline): Update the
8342         expected results, and add a test with line-numbering enabled.
8344 2018-08-27  Martin Liska  <mliska@suse.cz>
8346         PR sanitizer/86962
8347         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
8348         params with DECL_HAS_VALUE_EXPR_P.
8350 2018-08-27  Martin Liska  <mliska@suse.cz>
8352         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
8353         selected expansion strategy.
8355 2018-08-27  Martin Liska  <mliska@suse.cz>
8357         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
8358         * builtins.c (is_builtin_fn): Likewise.
8359         * attribs.c (diag_attr_exclusions): Use new function
8360         fndecl_built_in_p and remove check for FUNCTION_DECL if
8361         possible.
8362         (builtin_mathfn_code): Likewise.
8363         (fold_builtin_expect): Likewise.
8364         (fold_call_expr): Likewise.
8365         (fold_builtin_call_array): Likewise.
8366         (fold_call_stmt): Likewise.
8367         (set_builtin_user_assembler_name): Likewise.
8368         (is_simple_builtin): Likewise.
8369         * calls.c (gimple_alloca_call_p): Likewise.
8370         (maybe_warn_nonstring_arg): Likewise.
8371         * cfgexpand.c (expand_call_stmt): Likewise.
8372         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
8373         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
8374         (cgraph_node::verify_node): Likewise.
8375         * cgraphclones.c (build_function_decl_skip_args): Likewise.
8376         (cgraph_node::create_clone): Likewise.
8377         * config/arm/arm.c (arm_insert_attributes): Likewise.
8378         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
8379         * dse.c (scan_insn): Likewise.
8380         * expr.c (expand_expr_real_1): Likewise.
8381         * fold-const.c (operand_equal_p): Likewise.
8382         (fold_binary_loc): Likewise.
8383         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
8384         * gimple-low.c (lower_stmt): Likewise.
8385         * gimple-pretty-print.c (dump_gimple_call): Likewise.
8386         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
8387         Likewise.
8388         * gimple.c (gimple_build_call_from_tree): Likewise.
8389         (gimple_call_builtin_p): Likewise.
8390         (gimple_call_combined_fn): Likewise.
8391         * gimplify.c (gimplify_call_expr): Likewise.
8392         (gimple_boolify): Likewise.
8393         (gimplify_modify_expr): Likewise.
8394         (gimplify_addr_expr): Likewise.
8395         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
8396         * ipa-cp.c (determine_versionability): Likewise.
8397         * ipa-fnsummary.c (compute_fn_summary): Likewise.
8398         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
8399         * ipa-split.c (visit_bb): Likewise.
8400         (split_function): Likewise.
8401         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
8402         * lto-cgraph.c (input_node): Likewise.
8403         * lto-streamer-out.c (write_symbol): Likewise.
8404         * omp-low.c (setjmp_or_longjmp_p): Likewise.
8405         (lower_omp_1): Likewise.
8406         * predict.c (strip_predict_hints): Likewise.
8407         * print-tree.c (print_node): Likewise.
8408         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
8409         * trans-mem.c (is_tm_irrevocable): Likewise.
8410         (is_tm_load): Likewise.
8411         (is_tm_simple_load): Likewise.
8412         (is_tm_store): Likewise.
8413         (is_tm_simple_store): Likewise.
8414         (is_tm_abort): Likewise.
8415         (tm_region_init_1): Likewise.
8416         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
8417         * tree-cfg.c (verify_gimple_call): Likewise.
8418         (move_stmt_r): Likewise.
8419         (stmt_can_terminate_bb_p): Likewise.
8420         * tree-eh.c (lower_eh_constructs_2): Likewise.
8421         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
8422         * tree-inline.c (remap_gimple_stmt): Likewise.
8423         (copy_bb): Likewise.
8424         (estimate_num_insns): Likewise.
8425         (fold_marked_statements): Likewise.
8426         * tree-sra.c (scan_function): Likewise.
8427         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
8428         (optimize_stack_restore): Likewise.
8429         (pass_fold_builtins::execute): Likewise.
8430         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
8431         (mark_all_reaching_defs_necessary_1): Likewise.
8432         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
8433         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8434         (pass_forwprop::execute): Likewise.
8435         * tree-ssa-loop-im.c (stmt_cost): Likewise.
8436         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
8437         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
8438         * tree-ssa-strlen.c (get_string_length): Likewise.
8439         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
8440         (find_func_aliases_for_call): Likewise.
8441         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
8442         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
8443         * tree-tailcall.c (find_tail_calls): Likewise.
8444         * tree.c (need_assembler_name_p): Likewise.
8445         (free_lang_data_in_decl): Likewise.
8446         (get_call_combined_fn): Likewise.
8447         * ubsan.c (is_ubsan_builtin_p): Likewise.
8448         * varasm.c (incorporeal_function_p): Likewise.
8449         * tree.h (DECL_BUILT_IN): Remove and replace with
8450         fndecl_built_in_p.
8451         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
8452         (fndecl_built_in_p): New.
8454 2018-08-27  Martin Liska  <mliska@suse.cz>
8456         PR tree-optimization/86847
8457         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
8458         Dump also subtree probability.
8459         (switch_decision_tree::do_jump_if_equal): New function.
8460         (switch_decision_tree::emit_case_nodes): Handle special
8461         situations in balanced tree that can be emitted much simpler.
8462         Fix calculation of probabilities that happen in tree expansion.
8463         * tree-switch-conversion.h (struct cluster): Add
8464         is_single_value_p.
8465         (struct simple_cluster): Likewise.
8466         (struct case_tree_node): Add new function has_child.
8467         (do_jump_if_equal): New.
8469 2018-08-27  Martin Liska  <mliska@suse.cz>
8471         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
8472         Add new argument to bit_test_cluster constructor.
8473         (bit_test_cluster::emit): Set bits really number of values
8474         handlel by a test.
8475         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
8476         probability argument.
8477         * tree-switch-conversion.h (struct bit_test_cluster):
8478         Add m_handles_entire_switch.
8480 2018-08-27  Martin Liska  <mliska@suse.cz>
8482         PR tree-optimization/86702
8483         * tree-switch-conversion.c (jump_table_cluster::emit):
8484         Make probabilities even for values in jump table
8485         according to number of cases handled.
8486         (switch_decision_tree::compute_cases_per_edge): Pass
8487         argument to reset_out_edges_aux function.
8488         (switch_decision_tree::analyze_switch_statement): Likewise.
8489         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8490         Make it static.
8492 2018-08-27  Martin Liska  <mliska@suse.cz>
8494         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8495         cfun argument explicitly.
8496         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8497         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8498         function gimple_switch_default_bb.
8499         (convert_switch_statements):
8500         (expand_builtins):
8501         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8502         * stmt.c (label_to_block_fn): Use label_to_block and pass
8503         cfun argument explicitly and use gimple_switch_label_bb.
8504         (expand_case): Likewise.
8505         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8506         cfun argument explicitly. Likewise.
8507         (make_edges_bb): Likewise.
8508         (make_cond_expr_edges): Likewise.
8509         (get_cases_for_edge): Likewise.
8510         (make_gimple_switch_edges): Likewise.
8511         (label_to_block_fn): Likewise.
8512         (label_to_block): Likewise.
8513         (make_goto_expr_edges): Likewise.
8514         (make_gimple_asm_edges): Likewise.
8515         (main_block_label): Likewise.
8516         (group_case_labels_stmt): Likewise.
8517         (find_taken_edge_computed_goto): Likewise.
8518         (find_taken_edge_switch_expr): Likewise.
8519         (gimple_verify_flow_info): Likewise.
8520         (gimple_redirect_edge_and_branch): Likewise.
8521         (gimple_switch_label_bb): New function.
8522         (gimple_switch_default_bb): Likewise.
8523         (gimple_switch_edge): Likewise.
8524         (gimple_switch_default_edge): Likewise.
8525         * tree-cfg.h (label_to_block_fn): Remove and replace ...
8526         (label_to_block): ... with this.
8527         (gimple_switch_label_bb): New.
8528         (gimple_switch_default_bb): Likewise.
8529         (gimple_switch_edge): Likewise.
8530         (gimple_switch_default_edge): Likewise.
8531         * tree-cfgcleanup.c (convert_single_case_switch): Use
8532         new gimple functions and pass new argument to label_to_block.
8533         (cleanup_control_flow_bb):
8534         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8535         cfun argument explicitly.
8536         (make_eh_edges): Likewise.
8537         (redirect_eh_dispatch_edge): Likewise.
8538         (lower_resx): Likewise.
8539         (lower_eh_dispatch): Likewise.
8540         (maybe_remove_unreachable_handlers): Likewise.
8541         (unsplit_eh): Likewise.
8542         (cleanup_empty_eh): Likewise.
8543         (verify_eh_edges): Likewise.
8544         (verify_eh_dispatch_edge): Likewise.
8545         * tree-ssa-dom.c (record_edge_info): Likewise.
8546         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8547         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8548         (thread_through_normal_block): Likewise.
8549         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8550         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8551         * tree-switch-conversion.c (switch_conversion::collect): Use new
8552         gimple functions.
8553         (switch_conversion::check_final_bb): Likewise.
8554         (switch_conversion::gather_default_values): Pass new argument
8555         to label_to_block.
8556         (switch_conversion::build_constructors): Likewise.
8557         (switch_decision_tree::compute_cases_per_edge): Use new
8558         gimple_switch_edge function.
8559         (switch_decision_tree::analyze_switch_statement): Pass new argument
8560         to label_to_block.
8561         (switch_decision_tree::try_switch_expansion): Use
8562         gimple_switch_default_edge.
8563         * tree-vrp.c (find_switch_asserts): Pass new argument
8564         to label_to_block.
8565         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8566         (vr_values::simplify_switch_using_ranges): Likewise.
8568 2018-08-27  Richard Biener  <rguenther@suse.de>
8570         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8571         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8573         * tree-ssa-sccvn.h (struct vn_pval): New structure.
8574         (struct vn_nary_op_s): Add unwind_to member.  Add
8575         predicated_values flag and put result into a union together
8576         with a linked list of vn_pval.
8577         (struct vn_ssa_aux): Add name member to make maintaining
8578         a map of SSA name to vn_ssa_aux possible.  Remove no longer
8579         needed info, dfsnum, low, visited, on_sccstack, use_processed
8580         and range_info_anti_range_p members.
8581         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8582         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8583         New functions.
8584         (vn_valueize): New global.
8585         (vn_context_bb): Likewise.
8586         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8587         VN_INFO_PTR_INFO): Remove.
8588         * tree-ssa-sccvn.c: ... (rewrite)
8589         (pass_fre::execute): For -O2+ initialize loops and run
8590         RPO VN in optimistic mode (iterating).  For -O1 and -Og
8591         run RPO VN in non-optimistic mode.
8592         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8593         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8594         * doc/invoke.texi (sccvn-max-scc-size): Remove.
8595         (rpo-vn-max-loop-depth): Document.
8596         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8597         when valuezing the VUSE signals we walked out of the region.
8598         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8599         (phi_translate): Set VN context block to use for availability
8600         lookup.
8601         (compute_avail): Likewise.
8602         (pre_valueize): New function.
8603         (pass_pre::execute): Adjust to the RPO VN API.
8605         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8606         (propagate_constants_for_unrolling): Remove.
8607         (tree_unroll_loops_completely): Perform value-numbering
8608         on the unrolled bodies loop parent.
8610 2018-08-27  Richard Biener  <rguenther@suse.de>
8612         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8613         for partial antic compute.
8615 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
8617         PR rtl-optimization/87065
8618         * combine.c (simplify_if_then_else): Formatting fix.
8619         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8620         check.
8621         (known_cond): Don't return const_true_rtx for vector modes.  Use
8622         CONST0_RTX instead of const0_rtx.  Formatting fixes.
8624 2018-08-27  Martin Liska  <mliska@suse.cz>
8626         PR gcov-profile/87069
8627         * gcov.c (process_file): Record files already processed
8628         and warn about a file being processed multiple times.
8630 2018-08-27  Martin Liska  <mliska@suse.cz>
8632         PR driver/83193
8633         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8634         Set default values for x_aarch64_*_string strings.
8635         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8636         prefix.  For -mabi do not print '=ABI' in help and use
8637         <option_value> format for -msve-vector-bits and -moverride
8638         options.
8640 2018-08-26  Jeff Law  <law@redhat.com>
8642         * config/mips/frame-header-opt.c: Include "backend.h" rather than
8643         "cfg.h"
8645 2018-08-26  Marek Polacek  <polacek@redhat.com>
8647         PR c++/87029, Implement -Wredundant-move.
8648         * doc/invoke.texi: Document -Wredundant-move.
8650 2018-08-25  Martin Sebor  <msebor@redhat.com>
8652         PR tree-optimization/87059
8653         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8654         to the same type as the other.
8655         * fold-const.c (fold_binary_loc): Assert expectation.
8657 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
8659         * config/darwin.c (machopic_legitimize_pic_address): Clean up
8660         extraneous parentheses, dead code section and formatting.
8662 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
8664         PR c++/87091
8665         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8666         wide enough for jumps in the line-numbering to be visible.
8667         (layout::print_gap_in_line_numbering): New member function.
8668         (layout::calculate_line_spans): When using line numbering, merge
8669         line spans that are only 1 line apart.
8670         (diagnostic_show_locus): When printing line numbers, show gaps in
8671         line numbering directly, rather than printing headers.
8672         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8673         line-numbering with multiple line spans.
8674         (selftest::test_fixit_insert_containing_newline_2): Add test of
8675         line-numbering, in which the spans are close enough to be merged.
8677 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8679         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8680         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
8681         * tree-vrp.c (range_is_nonnull): Remove.
8682         (range_includes_zero_p): Accept value_range instead of min/max.
8683         (extract_range_from_binary_expr_1): Do not early bail on
8684         POINTER_PLUS_EXPR.
8685         Use range_includes_zero_p instead of range_is_nonnull.
8686         (extract_range_from_unary_expr): Use range_includes_zero_p instead
8687         of range_is_nonnull.
8688         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
8689         special case VR_ANTI_RANGE.
8690         (vrp_finalize): Same.
8691         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8692         instead of min/max.
8693         (range_is_nonnull): Remove.
8694         * vr-values.c (vrp_stmt_computes_nonzero): Use
8695         range_includes_zero_p instead of range_is_nonnull.
8696         (extract_range_basic): Pass value_range to range_includes_zero_p
8697         instead of range_is_nonnull.
8699 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
8701         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8702         * emit-rtl.h (rtl_data): Remove return_bnd.
8703         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8704         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8705         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8706         (POINTER_BOUNDS_MODE): Remove definition.
8707         (make_pointer_bounds_mode): Remove.
8708         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8709         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8710         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8711         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8712         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8713         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8714         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8716         * config/i386/i386-modes.def (BND32, BND64): Remove.
8717         * config/i386/i386.c (dbx_register_map): Remove bound registers.
8718         (dbx64_register_map): Ditto.
8719         (svr4_dbx_register_map): Ditto.
8720         (indirect_thunk_bnd_needed): Remove.
8721         (indirect_thunks_bnd_used): Ditto.
8722         (indirect_return_bnd_needed): Ditto.
8723         (indirect_return_via_cx_bnd): Ditto.
8724         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8725         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8726         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
8727         (output_indirect_thunk_function): Remove handling of
8728         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8729         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8730         (ix86_save_reg): Remove handling of crtl->return_bnd.
8731         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8732         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8733         and UNSPEC_BNDLX_ADDR.
8734         (ix86_output_indirect_branch_via_reg): Remove handling of
8735         indirect_thunk_prefix_bnd.
8736         (ix86_output_indirect_branch_via_push): Ditto.
8737         (ix86_output_function_return): Ditto.
8738         (ix86_output_indirect_function_return): Ditto.
8739         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8740         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8741         (CALL_USED_REGISTERS): Ditto.
8742         (REG_ALLOC_ORDER): Update for removal of bound registers.
8743         (HI_REGISTER_NAMES): Ditto.
8744         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8745         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8746         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8747         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8748         (FIRST_PSEUDO_REG): Update.
8749         (BND): Remove mode iterator.
8750         * config/i386/predicates.md (bnd_mem_operator): Remove.
8752 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8754         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8755         vectors.
8757 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
8759         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8760         the case in which the permute needs only a single element and
8761         repeats for every vector of the result.  Extend that case to
8762         handle variable-length vectors.
8763         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8765 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
8767         PR debug/79342
8768         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8769         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8771 2018-08-24  Richard Biener  <rguenther@suse.de>
8773         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8774         bb_flags_allocated members.
8775         (auto_flag): New RAII class for allocating flags.
8776         (auto_edge_flag): New RAII class for allocating edge flags.
8777         (auto_bb_flag): New RAII class for allocating bb flags.
8778         * cfgloop.c (verify_loop_structure): Allocate temporary edge
8779         flag dynamically.
8780         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8781         in favor of temporarily allocated BB flag.
8782         * hsa-brig.c: Re-order includes.
8783         * hsa-dump.c: Likewise.
8784         * hsa-regalloc.c: Likewise.
8785         * print-rtl.c: Likewise.
8786         * profile-count.c: Likewise.
8788 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
8790         PR target/86989
8791         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8792         the TOC register.
8794 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
8796         PR 87073/bootstrap
8797         * wide-int-range.cc (wide_int_range_div): Do not ignore result
8798         from wide_int_range_multiplicative_op.
8800 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
8802         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8803         "permutaion".
8805 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
8807         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8808         to 'expanded'.
8810 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
8812         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8813         full GENERIC expression used for replacement.
8815 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
8817         * tree-vrp.c (abs_extent_range): Remove.
8818         (extract_range_into_wide_ints): Pass wide ints by reference.
8819         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8820         Pass wide ints by reference in all calls to
8821         extract_range_into_wide_ints.
8822         * wide-int-range.cc (wide_int_range_div): New.
8823         * wide-int-range.h (wide_int_range_div): New.
8824         (wide_int_range_includes_zero_p): New.
8825         (wide_int_range_zero_p): New.
8827 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
8829         * config/aarch64/aarch64.md (arches): New enum.
8830         (arch): New enum attr.
8831         (arch_enabled): New attr.
8832         (enabled): Now uses arch_enabled only.
8833         (simd, sve, fp16): Removed attribute.
8834         (fp): Attr now defined in terms of 'arch'.
8835         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8836         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8837         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8838         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8839         attributes into 'arch'.
8840         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8841         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8842         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8843         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8844         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8845         'simd' attribute into 'arch'.
8846         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8847         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8848         Convert use of 'fp' attribute to 'arch'.
8849         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8850         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8851         into 'arch'.
8852         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8853         (different modes) Merge 'fp' and 'simd' into 'arch'.
8854         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8855         'simd' into 'arch'.
8857 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
8859         PR rtl-optimization/87026
8860         * expmed.c (canonicalize_comparison): If we can no longer create
8861         pseudoregisters, don't.
8863 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
8865         PR target/86951
8866         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8867         prototype.
8868         * config/arm/arm.c (speculation_barrier_libfunc): New static
8869         variable.
8870         (arm_init_libfuncs): Initialize it.
8871         (arm_emit_speculation_barrier): New function.
8872         * config/arm/arm.md (speculation_barrier): Call
8873         arm_emit_speculation_barrier for architectures that do not have
8874         DSB or ISB.
8875         (speculation_barrier_insn): Only match on Armv7 or later.
8877 2018-08-23  Richard Biener  <rguenther@suse.de>
8879         PR middle-end/87024
8880         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8881         calls.
8883 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8885         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8886         of single-vector TBLs.
8887         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8888         one input is given.
8890 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
8892         PR target/85910
8893         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8894         aarch64_evpc_tbl guard.
8896 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8898         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8899         behaviour.
8901 2018-08-22  Martin Sebor  <msebor@redhat.com>
8903         PR middle-end/87052
8904         * tree-pretty-print.c (pretty_print_string): Add argument.
8905         (dump_generic_node): Call to pretty_print_string with string size.
8907 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
8909         PR rtl-optimization/86771
8910         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8911         of two SETs into those two SETs, one to be placed at i2, if that SETs
8912         destination is modified between i2 and i3.
8914 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8916         PR tree-optimization/86725
8917         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8918         function.
8919         (vect_analyze_scalar_cycles_1): Check it.
8921 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8923         PR tree-optimization/86725
8924         * tree-vect-loop.c (vect_is_simple_reduction): When treating
8925         an outer loop phi as a double reduction, make sure that the
8926         single user of the phi result is an inner loop phi.
8928 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8930         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8931         grouped stores with gaps to a strided group.
8933 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
8935         * tree-vect-stmts.c (get_group_load_store_type)
8936         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8937         first statement in a group.
8939 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8941         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8942         the sequence used in gcc/gcc.c.
8944 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8946         PR other/704
8947         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8948         building it.
8950 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8952         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8953         Darwin10-specific unwinder-shim.
8954         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8955         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8956         New to cater for Darwin10 Rosetta.
8958 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8960         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8961         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8963 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
8965         PR bootstrap/81033
8966         PR target/81733
8967         PR target/52795
8968         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8969         (dwarf2out_switch_text_section): Generate a local label for the
8970         second function sub-section and apply it as the second FDE start
8971         label.
8972         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8973         second sub-section start.
8975 2018-08-22  Richard Biener  <rguenther@suse.de>
8977         PR tree-optimization/86988
8978         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8980 2018-08-22  Richard Biener  <rguenther@suse.de>
8982         PR tree-optimization/86945
8983         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8985 2018-08-22  Alexandre Oliva <oliva@adacore.com>
8987         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8988         a comment about how uses of r2 for .sdata2 come about.
8990 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
8992         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8994 2018-08-21  Marek Polacek  <polacek@redhat.com>
8996         PR c++/86981, Implement -Wpessimizing-move.
8997         * doc/invoke.texi: Document -Wpessimizing-move.
8999 2018-08-21  Jan Hubicka  <jh@suse.cz>
9001         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
9002         * tree.h (is_redundant_typedef): Remove.
9003         * dwarf2out.c (is_redundant_typedef): Turn into static function.
9005 2018-08-21  Jan Hubicka  <jh@suse.cz>
9007         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
9008         when possible.
9010 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
9012         * expmed.c (extract_low_bits): Reject invalid subregs early.
9014 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9016         PR middle-end/86121
9017         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
9018         behaviour.
9020 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9022         * config/vxworks.h: Guard vxworks_asm_out_constructor and
9023         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
9024         * config/vxworks.c: Likewise.
9026 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9028         * config/vxworks.c: Set targetm.have_ctors_dtors
9029         if HAVE_INITFINI_ARRAY_SUPPORT.
9030         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
9031         if HAVE_INITFINI_ARRAY_SUPPORT.
9033 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9035         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
9036         default search path for VxWorks < 7.
9038 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9040         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
9041         (get_format_string): Refer to c_getstr.
9043 2018-08-21  Tom de Vries  <tdevries@suse.de>
9045         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9046         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9047         (debuginfo_early_stop): Declare.
9048         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9049         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9050         (debuginfo_early_stop): New function.
9051         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
9052         and debuginfo_early_stop.
9053         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
9054         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
9055         (general_init): Call debuginfo_early_init.
9056         (finalize): Call debuginfo_fini.
9057         (do_compile): Call debuginfo_init.
9058         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
9059         -fdump-early-debug.
9060         (@item -fdump-debug, @item -fdump-earlydebug): Add.
9062 2018-08-21  Tom de Vries  <tdevries@suse.de>
9064         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9065         flag_dump_noaddr and flag_dump_unnumbered.
9067 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
9069         * wide-int-range.cc (wide_int_range_abs): New.
9070         (wide_int_range_order_set): Rename from wide_int_range_min_max.
9071         * wide-int-range.h (wide_int_range_abs): New.
9072         (wide_int_range_min_max): New.
9073         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9074         case to call wide_int_range_abs.
9075         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9076         (extract_range_from_abs_expr): Delete.
9078 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
9080         PR target/87033
9081         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9082         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9083         for indexed loads.
9085 2018-08-20  Nathan Sidwell  <nathan@acm.org>
9086             Jeff Law <law@redhat.com>
9088         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9089         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9091 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
9093         PR other/84889
9094         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9095         (decl_attributes): Likewise.
9096         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9097         instance.
9098         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9099         * diagnostic-core.h (class auto_diagnostic_group): New class.
9100         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9101         (diagnostic_report_diagnostic): Handle the first diagnostics within
9102         a group.
9103         (emit_diagnostic): Add auto_diagnostic_group instance.
9104         (inform): Likewise.
9105         (inform_n): Likewise.
9106         (warning): Likewise.
9107         (warning_at): Likewise.
9108         (warning_n): Likewise.
9109         (pedwarn): Likewise.
9110         (permerror): Likewise.
9111         (error): Likewise.
9112         (error_n): Likewise.
9113         (error_at): Likewise.
9114         (sorry): Likewise.
9115         (fatal_error): Likewise.
9116         (internal_error): Likewise.
9117         (internal_error_no_backtrace): Likewise.
9118         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9119         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9120         * diagnostic.h (struct diagnostic_context): Add fields
9121         "diagnostic_group_nesting_depth",
9122         "diagnostic_group_emission_count", "begin_group_cb",
9123         "end_group_cb".
9124         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9125         Add auto_diagnostic_group instance(s).
9126         (find_explicit_erroneous_behavior): Likewise.
9127         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9128         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9129         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9130         (gimplify_va_arg_expr): Likewise.
9131         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9132         (HSA_SORRY_AT): Likewise.
9133         * ipa-devirt.c (compare_virtual_tables): Likewise.
9134         (warn_odr): Likewise.
9135         * multiple_target.c (expand_target_clones): Likewise.
9136         * opts-common.c (cmdline_handle_error): Likewise.
9137         * reginfo.c (globalize_reg): Likewise.
9138         * substring-locations.c (format_warning_n_va): Likewise.
9139         * tree-inline.c (expand_call_inline): Likewise.
9140         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9141         * tree-ssa-loop-niter.c
9142         (do_warn_aggressive_loop_optimizations): Likewise.
9143         * tree-ssa-uninit.c (warn_uninit): Likewise.
9144         * tree.c (warn_deprecated_use): Likewise.
9146 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
9148         PR target/87014
9149         * config/i386/i386.md (eh_return): Always update EH return
9150         address in word_mode.
9152 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
9154         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9155         TARGET_SPLIT_COMPLEX_ARG is defined.
9157 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9159         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9161 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9163         PR target/86984
9164         * expr.c (expand_assignment): Assert that bitpos is positive.
9165         (store_field): Likewise
9166         (expand_expr_real_1): Make sure that bitpos is positive.
9167         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9168         integer overflow.
9170 2018-08-20  Nathan Sidwell  <nathan@acm.org>
9172         * Makefile.in (CPP_ID_DATA_H): Delete.
9173         (CPP_INTERNAL_H): Don't add it.
9174         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9175         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9177 2018-08-20  Richard Biener  <rguenther@suse.de>
9179         PR tree-optimization/78655
9180         * tree-vrp.c (extract_range_from_binary_expr_1): Make
9181         pointer + offset nonnull if either operand is nonnull work.
9183 2018-08-20  Tom de Vries  <tdevries@suse.de>
9185         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9186         unless the referenced die describes the added property using
9187         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
9188         Otherwise, add a DW_AT_location to the referenced die.
9190 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
9192         PR target/86994
9193         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9194         register_operand when calling ix86_set_reg_reg_cost.
9195         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9196         Set *total to 0 for operands that satisfy x86_64_immediate_operand
9197         predicate and to 1 otherwise.
9199 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
9201         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9202         emit a diagnostic that it is not supported and reset the option.
9203         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9204         supported and consume the option.  (ASM_FINAL_SPEC): New.
9206 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
9208         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9209         a sentence.
9211 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
9213         C-SKY port: Documentation
9215         * doc/extend.texi (C-SKY Function Attributes): New section.
9216         * doc/invoke.texi (Option Summary): Add C-SKY options.
9217         (C-SKY Options): New section.
9218         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9220 2018-08-17  Jojo  <jijie_rong@c-sky.com>
9221             Huibin Wang  <huibin_wang@c-sky.com>
9222             Sandra Loosemore  <sandra@codesourcery.com>
9223             Chung-Lin Tang  <cltang@codesourcery.com>
9225         C-SKY port: Backend implementation
9227         * config/csky/*: New.
9228         * common/config/csky/*: New.
9230 2018-08-17  Jojo  <jijie_rong@c-sky.com>
9231             Huibin Wang  <huibin_wang@c-sky.com>
9232             Sandra Loosemore  <sandra@codesourcery.com>
9233             Chung-Lin Tang  <cltang@codesourcery.com>
9234             Andrew Jenner  <andrew@codesourcery.com>
9236         C-SKY port: Configury
9238         * config.gcc (csky-*-*): New.
9239         * configure.ac: Add csky to targets for dwarf2 debug_line support.
9240         * configure: Regenerated.
9242 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
9244         * dump-context.h: Include "dumpfile.h".
9245         (dump_context::dump_printf_va): Convert final param from va_list
9246         to va_list *.  Convert from ATTRIBUTE_PRINTF to
9247         ATTRIBUTE_GCC_DUMP_PRINTF.
9248         (dump_context::dump_printf_loc_va): Likewise.
9249         * dumpfile.c: Include "stringpool.h".
9250         (make_item_for_dump_printf_va): Delete.
9251         (make_item_for_dump_printf): Delete.
9252         (class dump_pretty_printer): New class.
9253         (dump_pretty_printer::dump_pretty_printer): New ctor.
9254         (dump_pretty_printer::emit_items): New member function.
9255         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
9256         function.
9257         (dump_pretty_printer::emit_item): New member function.
9258         (dump_pretty_printer::stash_item): New member function.
9259         (dump_pretty_printer::format_decoder_cb): New member function.
9260         (dump_pretty_printer::decode_format): New member function.
9261         (dump_context::dump_printf_va): Reimplement in terms of
9262         dump_pretty_printer.
9263         (dump_context::dump_printf_loc_va): Convert final param from va_list
9264         to va_list *.
9265         (dump_context::begin_scope): Reimplement call to
9266         make_item_for_dump_printf.
9267         (dump_printf): Update for change to dump_printf_va.
9268         (dump_printf_loc): Likewise.
9269         (selftest::test_capture_of_dump_calls): Convert "stmt" from
9270         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
9271         with %T, %E, and %G.
9272         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
9273         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
9274         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
9275         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
9276         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
9277         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
9278         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
9279         within a dump_printf_loc call to "%wu".
9280         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
9281         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
9282         missing space after "=".
9283         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
9284         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
9285         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
9286         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
9287         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
9288         duplicate "vectorized" from message.
9290 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
9292         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
9293         polyNxK_t element's TYPE_STRING_FLAG.
9295 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
9297         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
9298         (they were unnamed before).  Fix comments.
9300 2018-08-17  Nathan Sidwell  <nathan@acm.org>
9302         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
9304 2018-08-17  Richard Biener  <rguenther@suse.de>
9306         PR tree-optimization/86841
9307         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
9309 2018-08-17  Martin Liska  <mliska@suse.cz>
9311         * common.opt: Remove Warn, Init and Report for options with
9312         Ignore/Deprecated flag. Warning is done automatically for
9313         Deprecated flags.
9314         * config/i386/i386.opt: Likewise.
9315         * config/ia64/ia64.opt: Likewise.
9316         * config/rs6000/rs6000.opt: Likewise.
9317         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
9318         Remove usage of flag_check_pointer_bounds.
9319         * lto-wrapper.c (merge_and_complain): Do not handle
9320         OPT_fcheck_pointer_bounds.
9321         (append_compiler_options): Likewise.
9322         * opt-functions.awk: Do not handle Deprecated.
9323         * optc-gen.awk: Check that Var, Report and Init are not
9324         used for an option with Ignore/Deprecated flag.
9325         * opts-common.c (decode_cmdline_option): Do not report
9326         CL_ERR_DEPRECATED.
9327         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
9328         options.
9329         * opts.h (struct cl_option): Remove cl_deprecated flag.
9330         (CL_ERR_DEPRECATED): Remove error enum value.
9332 2018-08-17  Richard Biener  <rguenther@suse.de>
9334         PR middle-end/86505
9335         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
9336         across a va-arg-pack using call adjust its return value accordingly.
9338 2018-08-16  Martin Sebor  <msebor@redhat.com>
9340         PR tree-optimization/86853
9341         * gimple-ssa-sprintf.c (struct format_result): Rename member.
9342         (struct fmtresult): Add member and initialize it in ctors.
9343         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
9344         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
9345         (format_directive): Set POSUNDER4K when MAYFAIL is set.
9346         (parse_directive): Handle %C same as %c.
9347         (sprintf_dom_walker::compute_format_length): Adjust.
9348         (is_call_safe): Adjust.
9350 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9352         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
9353         for determining how to count the elements.
9354         * builtins.h (c_strlen): Adjust prototype.
9355         * expr.c (string_constant): Add new parameter mem_size.
9356         Set *mem_size appropriately.
9357         * expr.h (string_constant): Adjust protoype.
9358         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
9359         * gimple-fold.h (get_range_strlen): Adjust prototype.
9360         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
9361         (format_string): Call get_string_length with eltsize.
9363 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
9365         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
9366         to emit the span, rather than setting it as the prefix.
9368 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
9370         * diagnostic-show-locus.c (layout::start_annotation_line): Add
9371         "margin_char" parameter, defaulting to space.  Use it in place
9372         of pp_space for the initial part of the margin.
9373         (layout::print_leading_fixits): Use '+' when filling the margin
9374         of line-insertion fix-it hints.
9376 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9378         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
9379         Delete.
9381 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9383         * config/rs6000/altivec.md: Don't set length attribute to the default
9384         value.
9385         * config/rs6000/darwin.md: Ditto.
9386         * config/rs6000/dfp.md: Ditto.
9387         * config/rs6000/htm.md: Ditto.
9388         * config/rs6000/rs6000.md: Ditto.
9389         * config/rs6000/sync.md: Ditto.
9390         * config/rs6000/vsx.md: Ditto.
9392 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9394         * config/rs6000/altivec.md: Don't set length attribute to the default
9395         value, for branch instructions.
9396         * config/rs6000/darwin.md: Ditto.
9397         * config/rs6000/rs6000.md: Ditto.
9399 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
9401         * config/rs6000/rs6000.md (length): Always define as const_int 4.
9402         (unnamed conditional branch define_insn): Set length to 4 or 8
9403         depending on offset.
9404         (<bd>_<mode>): Similar, for alternative 0.
9405         (<bd>tf_<mode>): Ditto.
9407 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
9409         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
9411 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
9413         * doc/rtl.texi: Replace old RTX class names with new names.
9416 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
9418         * expmed.h (canonicalize_comparison): New declaration.
9419         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
9420         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
9421         * optabs.c (prepare_cmp_insn): Likewise.
9422         * rtl.h (unsigned_condition_p): New function which checks if a
9423         comparison operator is unsigned.
9425 2018-08-16  Nathan Sidwell  <nathan@acm.org>
9427         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
9428         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
9430 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
9432         PR target/84711
9433         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
9434         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
9435         (mov<mov>): ..this and enable unconditionally.
9437 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
9439         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
9441 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
9443         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
9444         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
9445         "Common" with "Target".
9447 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
9449         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
9450         * doc/invoke.texi (mmitigate-rop): Remove.
9451         * config/i386/i386.c: Do not include "regrename.h".
9452         (ix86_rop_should_change_byte_p, reg_encoded_number)
9453         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
9454         Remove.
9455         (ix86_reorg): Remove call to ix86_mitigate_rop.
9456         * config/i386/i386.md (attr "modrm_class"): Remove.
9457         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
9458         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
9459         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
9461 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
9463         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
9464         allow folding of mergeh() and mergel() for the float and double types.
9465         (fold_mergehl_helper): Rework to handle building a permute tree
9466         for float vectors.
9468 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
9470         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
9471         for TARGET_SSE.
9473 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
9475         * common.opt (fdiagnostics-show-labels): New option.
9476         * diagnostic-show-locus.c (class layout_range): Add field
9477         "m_label".
9478         (class layout): Add field "m_show_labels_p".
9479         (layout_range::layout_range): Add param "label" and use it to
9480         initialize m_label.
9481         (make_range): Pass in NULL for new "label" param of layout_range's
9482         ctor.
9483         (layout::layout): Initialize m_show_labels_p.
9484         (layout::maybe_add_location_range): Pass in loc_range->m_label
9485         when constructing layout_range instances.
9486         (struct line_label): New struct.
9487         (layout::print_any_labels): New member function.
9488         (layout::print_line): Call it if label-printing is enabled.
9489         (selftest::test_one_liner_labels): New test.
9490         (selftest::test_diagnostic_show_locus_one_liner): Call it.
9491         * diagnostic.c (diagnostic_initialize): Initialize
9492         context->show_labels_p.
9493         * diagnostic.h (struct diagnostic_context): Add field
9494         "show_labels_p".
9495         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9496         -fno-diagnostics-show-labels.
9497         * dwarf2out.c (gen_producer_string): Add
9498         OPT_fdiagnostics_show_labels to the ignored options.
9499         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9500         param.
9501         (gcc_rich_location::maybe_add_expr): Likewise.
9502         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9503         label" param, defaulting to NULL.
9504         (gcc_rich_location::add_expr): Add "label" param.
9505         (gcc_rich_location::maybe_add_expr): Likewise.
9506         (class text_range_label): New class.
9507         (class range_label_for_type_mismatch): New class.
9508         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9509         of format_warning_va.
9510         (fmtwarn_n): Likewise for new params of format_warning_n_va.
9511         * lto-wrapper.c (merge_and_complain): Add
9512         OPT_fdiagnostics_show_labels to the "pick one setting" options.
9513         (append_compiler_options): Likewise to the dropped options.
9514         (append_diag_options): Likewise to the passed-on options.
9515         * opts.c (common_handle_option): Handle the new option.
9516         * selftest-diagnostic.c
9517         (test_diagnostic_context::test_diagnostic_context): Enable
9518         show_labels_p.
9519         * substring-locations.c: Include "gcc-rich-location.h".
9520         (format_warning_n_va): Add "fmt_label" and "param_label" params
9521         and use them as appropriate.
9522         (format_warning_va): Add "fmt_label" and "param_label" params,
9523         passing them on to format_warning_n_va.
9524         (format_warning_at_substring): Likewise.
9525         (format_warning_at_substring_n): Likewise.
9526         * substring-locations.h (format_warning_va): Add "fmt_label" and
9527         "param_label" params.
9528         (format_warning_n_va): Likewise.
9529         (format_warning_at_substring): Likewise.
9530         (format_warning_at_substring_n): Likewise.
9531         * toplev.c (general_init): Initialize global_dc->show_labels_p.
9533 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
9535         PR testsuite/86519
9536         * builtins.c (expand_builtin_memcmp): Do not expand the call
9537         when overflow is detected.
9539 2018-08-15  Martin Sebor  <msebor@redhat.com>
9541         PR tree-optimization/71625
9542         * config/aarch64/aarch64-builtins.c
9543         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9545 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
9547         * config/s390/s390.c (s390_reorg): Remove loop.
9549 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
9551         * config/darwin.c
9552          (darwin_function_switched_text_sections): Delete.
9553         * gcc/config/darwin.h
9554          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9556 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
9558         PR target/81685
9559         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9560         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
9561         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9563 2018-08-15  Martin Liska  <mliska@suse.cz>
9565         PR tree-optimization/86925
9566         * predict.c (expr_expected_value_1): When taking
9567         later predictor, assign also probability.
9568         Use fold_build2_initializer_loc in order to fold
9569         the expression in -frounding-math.
9571 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
9573         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9574         patterns.
9575         (expand_vec_perm_1): Try the new method.
9577 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
9579         PR target/86547
9580         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9581         Check whether lra_live_max_point is 0 before dividing.
9583 2018-08-14  Martin Sebor  <msebor@redhat.com>
9585         PR tree-optimization/86650
9586         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9587         (vrp_prop::check_mem_ref): Same.
9589 2018-08-13  Liu Hao <lh_mouse@126.com>
9591         * pretty-print.c (eat_esc_sequence): Swap the foreground and
9592         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9593         and clear it thereafter, as it only works for DBCS.
9595 2018-08-13  Liu Hao <lh_mouse@126.com>
9597         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9598         handle returned by _get_osf_handle().
9600 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
9602         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9603         for folding vec_perm.
9605 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
9607         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9608         Add support for gimple-folding of vec_pack() and vec_unpack()
9609         intrinsics.
9611 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
9613         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9614         vec_xst variants to the list.
9615         (rs6000_gimple_fold_builtin): Add support for folding unaligned
9616         vector loads and stores.
9618 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
9620         * config.gcc (rs6000-ibm-aix4.x): Delete.
9621         (rs6000-ibm-aix5.1): Delete.
9622         (rs6000-ibm-aix5.2): Delete.
9623         (rs6000-ibm-aix5.3): Delete.
9624         * config/rs6000/aix43.h: Delete.
9625         * config/rs6000/aix51.h: Delete.
9626         * config/rs6000/aix52.h: Delete.
9627         * config/rs6000/t-aix43: Delete.
9629 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
9631         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9632         New function.
9633         (s390_decompose_address): Factor out constant pool ref
9634         decomposition.
9636 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9638         * config/nds32/nds32-predicates.c
9639         (nds32_can_use_bclr_p): Change return type as bool.
9640         (nds32_can_use_bset_p): Ditto.
9641         (nds32_can_use_btgl_p): Ditto.
9642         (nds32_can_use_bitci_p): Ditto.
9643         * config/nds32/nds32-protos.h
9644         (nds32_can_use_bclr_p): Change declaration.
9645         (nds32_can_use_bset_p): Ditto.
9646         (nds32_can_use_btgl_p): Ditto.
9647         (nds32_can_use_bitci_p): Ditto.
9649 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9651         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9652         Support -msched-prolog-epilog option.
9653         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9655 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9657         * common/config/nds32/nds32-common.c
9658         (nds32_option_optimization_table): Enalbe -malways-align.
9660 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9662         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9663         extra_headers.
9664         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9665         OPT_misr_secure_ case.
9666         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9667         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9668         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9669         secure attribute.
9670         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9671         (nds32_isr_info): New field security_level.
9672         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9673         * config/nds32/nds32.md (return_internal): Consider critical attribute.
9674         * config/nds32/nds32.opt (misr-secure): New option.
9675         * config/nds32/nds32_init.inc: New file.
9676         * config/nds32/nds32_isr.h: New file.
9678 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
9680         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9681         Update comment for atomic instructions.
9682         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9683         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9684         Remove.
9685         (atomic_loaddi): Revise fence expansion to only emit fence prior to
9686         load for __ATOMIC_SEQ_CST model.
9687         (atomic_loaddi_1): Remove float register target.
9688         (atomic_storedi): Handle CONST_INT values.
9689         (atomic_storedi_1): Remove float register source.  Add special case
9690         for zero value.
9691         (memory_barrier): New expander and insn.
9693 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
9695         PR tree-optimization/86835
9696         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9697         new_stmt after def_gsi, make sure to insert new_square_stmt after
9698         that stmt, not 2 stmts before it.
9700 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
9702         PR target/82418
9703         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9704         instead of SWI48.
9706 2018-08-10  Martin Liska  <mliska@suse.cz>
9708         PR target/83610
9709         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9710         function type.
9711         * builtins.c (expand_builtin_expect_with_probability):
9712         New function.
9713         (expand_builtin_expect_with_probability): New function.
9714         (build_builtin_expect_predicate): Add new argumnet probability
9715         for BUILT_IN_EXPECT_WITH_PROBABILITY.
9716         (fold_builtin_expect):
9717         (fold_builtin_2):
9718         (fold_builtin_3):
9719         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9720         * builtins.h (fold_builtin_expect): Set new argument.
9721         * doc/extend.texi: Document __builtin_expect_with_probability.
9722         * doc/invoke.texi: Likewise.
9723         * gimple-fold.c (gimple_fold_call): Pass new argument.
9724         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9725         also BUILT_IN_EXPECT_WITH_PROBABILITY.
9726         * predict.c (get_predictor_value): New function.
9727         (expr_expected_value): Add new argument probability. Assume
9728         that predictor and probability are always non-null.
9729         (expr_expected_value_1): Likewise.  For __builtin_expect and
9730         __builtin_expect_with_probability set probability.  Handle
9731         combination in binary expressions.
9732         (tree_predict_by_opcode): Simplify code by simply calling
9733         get_predictor_value.
9734         (pass_strip_predict_hints::execute): Add handling of
9735         BUILT_IN_EXPECT_WITH_PROBABILITY.
9736         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9737         new predictor.
9738         * tree.h (DECL_BUILT_IN_P): New function.
9740 2018-08-10  Martin Liska  <mliska@suse.cz>
9742         PR tree-optimization/85799
9743         * passes.def: Add argument for pass_strip_predict_hints.
9744         * predict.c (class pass_strip_predict_hints): Add new argument
9745         early_p.
9746         (strip_predictor_early): New function.
9747         (pass_strip_predict_hints::execute): Call the function to
9748         strip predictors.
9749         (strip_predict_hints): New function.
9750         * predict.def: Fix comment.
9752 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
9754         * Makefile.in: Clarify which tm.texi to copy over to assert the
9755         right to grant a GFDL license for all.
9757 2018-08-09  Jeff Law  <law@redhat.com>
9759         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9760         unused variable.
9762 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
9764         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9765         prototype.
9767 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9769         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9770         reductions for variable-length vectors.
9772 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
9774         PR other/84889
9775         * common.opt (fdiagnostics-show-line-numbers): New option.
9776         * diagnostic-show-locus.c (class layout): Add fields
9777         "m_show_line_numbers_p" and "m_linenum_width";
9778         (num_digits): New function.
9779         (test_num_digits): New function.
9780         (layout::layout): Initialize new fields.  Update m_x_offset
9781         logic to handle any left margin.
9782         (layout::print_source_line): Print line number when requested.
9783         (layout::start_annotation_line): New member function.
9784         (layout::print_annotation_line): Call it.
9785         (layout::print_leading_fixits): Likewise.
9786         (layout::print_trailing_fixits): Likewise.  Update calls to
9787         move_to_column for new parameter.
9788         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9789         it to potentially call start_annotation_line.
9790         (layout::show_ruler): Call start_annotation_line.
9791         (selftest::test_line_numbers_multiline_range): New selftest.
9792         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9793         and selftest::test_line_numbers_multiline_range.
9794         * diagnostic.c (diagnostic_initialize): Initialize
9795         show_line_numbers_p.
9796         * diagnostic.h (struct diagnostic_context): Add field
9797         "show_line_numbers_p".
9798         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9799         -fno-diagnostics-show-line-numbers.
9800         * dwarf2out.c (gen_producer_string): Add
9801         OPT_fdiagnostics_show_line_numbers to the ignored options.
9802         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9803         one setting" options.
9804         (append_compiler_options): Likewise to the dropped options.
9805         (append_diag_options): Likewise to the passed-on options.
9806         * opts.c (common_handle_option): Handle the new option.
9807         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9809 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
9811         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9812         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
9813         third argument of type "const signed char" to descriptions of
9814         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9815         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9816         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9817         __builtin_bcdsub_ov functions.
9819 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9821         PR tree-optimization/86858
9822         * tree-vect-loop.c (vect_is_simple_reduction): Restore
9823         flow_bb_inside_loop_p calls.
9825 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
9827         PR tree-optimization/86871
9828         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9829         instead of gimple_assign_lhs.
9831 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
9833         PR target/86887
9834         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9835         register constraint to operand 0.
9836         (add<mode>3_carryinC): Likewise.
9837         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9839 2018-08-09  Martin Liska  <mliska@suse.cz>
9841         PR c/86895
9842         * common.opt: Remove extra line.
9844 2018-08-09  Martin Liska  <mliska@suse.cz>
9846         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9847         at the end of a line, make first letter capital and end up
9848         a sentence with a dot.
9849         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9850         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9851         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9852         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9853         (PARAM_MAX_ISL_OPERATIONS): Likewise.
9854         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9855         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9856         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9857         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9858         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9859         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9860         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9861         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9862         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9863         (PARAM_TREE_REASSOC_WIDTH): Likewise.
9864         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9865         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9866         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9868 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
9870         PR target/84332
9871         * config/s390/s390.c (s390_option_override_internal): Reduce the
9872         stack-clash-protection-probe-interval param if it would be too big
9873         for z900.
9875 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
9877         PR target/46179
9878         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9879         * config/m68k/m68k.c (handle_move_double): Don't call
9880         m68k_final_prescan_insn.
9881         (m68k_adjust_decorated_operand): Renamed from
9882         m68k_final_prescan_insn, remove first and third operand and
9883         simplify.
9884         (print_operand): Call it.
9885         (print_operand_address): Call it.
9887 2018-08-08  Nathan Sidwell  <nathan@acm.org>
9889         * diagnostic.c (diagnostic_report_current_module): Use
9890         linemap_included_from & linemap_included_from_linemap.
9892 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
9894         * config/aarch64/aarch64-cores.def: Add phecda core.
9895         * config/aarch64/aarch64-tune.md: Regenerate.
9896         * doc/invoke.texi: Add phecda core.
9898 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9900         PR target/85295
9901         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9902         definitions.
9903         * config/s390/s390.md ("movti"): Add more alternatives for
9904         constant to GPR copies.
9906 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
9908         * config/s390/s390.c: Fix whitespace damage throughout the file.
9909         * config/s390/s390.h: Likewise.
9910         * config/s390/tpf.h: Likewise.
9912 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9914         * config/s390/s390.c (s390_loadrelative_operand_p):
9915         Remove TARGET_CPU_ZARCH usages.
9916         (s390_rtx_costs): Likewise.
9917         (s390_legitimate_constant_p): Likewise.
9918         (s390_cannot_force_const_mem): Likewise.
9919         (legitimate_reload_constant_p): Likewise.
9920         (s390_preferred_reload_class): Likewise.
9921         (legitimize_pic_address): Likewise.
9922         (legitimize_tls_address): Likewise.
9923         (s390_split_branches): Removed.
9924         (s390_add_execute): Removed.
9925         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9926         (s390_mainpool_start): Likewise.
9927         (s390_mainpool_finish): Likewise.
9928         (s390_mainpool_cancel): Removed.
9929         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9930         (s390_chunkify_cancel): Likewise.
9931         (s390_return_addr_rtx): Likewise.
9932         (s390_register_info): Remove split_branches_pending_p uages.
9933         (s390_optimize_register_info): Likewise.
9934         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9935         split_branches_pending_p usages.
9936         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9937         (s390_load_got): Likewise.
9938         (s390_expand_split_stack_prologue): Likewise.
9939         (output_asm_nops): Likewise.
9940         (s390_function_profiler): Likewise.
9941         (s390_emit_call): Likewise.
9942         (s390_conditional_register_usage): Likewise.
9943         (s390_optimize_prologue): Likewise.
9944         (s390_reorg): Remove TARGET_CPU_ZARCH and
9945         split_branches_pending_p usages.
9946         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9947         usages.
9948         (s390_output_indirect_thunk_function): Likewise.
9949         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9950         (TARGET_CPU_ZARCH_P): Removed.
9951         (struct machine_function): Remove split_branches_pending_p.
9952         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9954 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
9956         * common/config/s390/s390-common.c (processor_flags_table):
9957         Remove flags.
9958         * config.gcc: Remove with_arch/with_tune support.
9959         * config/s390/2064.md: Remove cpu attribute comparisons.
9960         * config/s390/driver-native.c (s390_host_detect_local_cpu):
9961         Remove MTN.
9962         * config/s390/linux.h (ASM_SPEC):
9963         Remove -march support.
9964         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9965         Use a table to get an arch level.
9966         * config/s390/s390-opts.h (enum processor_type):
9967         Remove enum values.
9968         * config/s390/s390.c
9969         (processor_table): Remove entries, add arch_level values.
9970         (s390_issue_rate): Remove cases.
9971         (s390_option_override): Adjust
9972         s390_option_override_internal() call.
9973         (s390_option_override_internal): Remove deprecation warning.
9974         (s390_valid_target_attribute_tree): Adjust
9975         s390_option_override_internal() call.
9976         * config/s390/s390.h (struct s390_processor):
9977         Share with s390-c.c, add arch_level field.
9978         * config/s390/s390.md:
9979         Remove occurrences in cpu attribute.
9980         * config/s390/s390.opt: Remove -march/-mtune support.
9981         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9982         * doc/invoke.texi: Remove deprecation warning.
9984 2018-08-08  Luis Machado  <luis.machado@linaro.org>
9986         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9987         global.
9988         (qdf24xx_tunings): Set vector cost structure to
9989         qdf24xx_vector_cost.
9991         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9992         <register_sextend>: Set to 3.
9994 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
9996         PR target/86838
9997         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9998         * config/aarch64/aarch64-simd.md
9999         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
10000         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
10001         (aarch64_frecpx<mode>): ...this new pattern.
10002         * config/aarch64/aarch64-simd-builtins.def: Remove comment
10003         about aarch64_frecp<FRECP:frecp_suffix><mode>.
10005 2018-08-07  Martin Liska  <mliska@suse.cz>
10007         PR middle-end/83023
10008         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
10009         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
10010         * predict.def (PRED_MALLOC_NONNULL): New predictor.
10011         * doc/extend.texi: Document that malloc attribute adds
10012         hit to compiler.
10014 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
10016         PR target/86785
10017         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10018         Define to speculation_safe_value_not_needed.
10020 2018-08-06  Jeff Law  <law@redhat.com>
10022         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
10023         the vr_values instance to cprop_into_stmt.
10024         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
10025         (cprop_operand): Also query EVRP to determine if OP is a constant.
10027 2018-08-06  Nathan Sidwell  <nathan@acm.org>
10029         * diagnostic.c (diagnostic_report_current_module): Reroll
10030         included-at loop.  Translate text.
10032 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
10034         * function-tests.c (selftest::test_expansion_to_rtl): Call
10035         free_after_compilation.
10037 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10039         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
10041 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
10043         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
10044         loops with memory block operations from getting unrolled.
10046 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
10048         PR target/86807
10049         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10050         Define to speculation_safe_value_not_needed.
10052 2018-08-06  Jeff Law  <law@redhat.com>
10054         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
10055         assert.
10057 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10059         PR target/86662
10060         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
10061         with all enabled __intN types.
10063         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10065 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10067         * alias.c (record_set): Check for clobber high.
10068         * cfgexpand.c (expand_gimple_stmt): Likewise.
10069         * combine-stack-adj.c (single_set_for_csa): Likewise.
10070         * combine.c (find_single_use_1): Likewise.
10071         (set_nonzero_bits_and_sign_copies): Likewise.
10072         (get_combine_src_dest): Likewise.
10073         (is_parallel_of_n_reg_sets): Likewise.
10074         (try_combine): Likewise.
10075         (record_dead_and_set_regs_1): Likewise.
10076         (reg_dead_at_p_1): Likewise.
10077         (reg_dead_at_p): Likewise.
10078         * dce.c (deletable_insn_p): Likewise.
10079         (mark_nonreg_stores_1): Likewise.
10080         (mark_nonreg_stores_2): Likewise.
10081         * df-scan.c (df_find_hard_reg_defs): Likewise.
10082         (df_uses_record): Likewise.
10083         (df_get_call_refs): Likewise.
10084         * dwarf2out.c (mem_loc_descriptor): Likewise.
10085         * haifa-sched.c (haifa_classify_rtx): Likewise.
10086         * ira-build.c (create_insn_allocnos): Likewise.
10087         * ira-costs.c (scan_one_insn): Likewise.
10088         * ira.c (equiv_init_movable_p): Likewise.
10089         (rtx_moveable_p): Likewise.
10090         (interesting_dest_for_shprep): Likewise.
10091         * jump.c (mark_jump_label_1): Likewise.
10092         * postreload-gcse.c (record_opr_changes): Likewise.
10093         * postreload.c (reload_cse_simplify): Likewise.
10094         (struct reg_use): Add source expr.
10095         (reload_combine): Check for clobber high.
10096         (reload_combine_note_use): Likewise.
10097         (reload_cse_move2add): Likewise.
10098         (move2add_note_store): Likewise.
10099         * print-rtl.c (print_pattern): Likewise.
10100         * recog.c (decode_asm_operands): Likewise.
10101         (store_data_bypass_p): Likewise.
10102         (if_test_bypass_p): Likewise.
10103         * regcprop.c (kill_clobbered_value): Likewise.
10104         (kill_set_value): Likewise.
10105         * reginfo.c (reg_scan_mark_refs): Likewise.
10106         * reload1.c (maybe_fix_stack_asms): Likewise.
10107         (eliminate_regs_1): Likewise.
10108         (elimination_effects): Likewise.
10109         (mark_not_eliminable): Likewise.
10110         (scan_paradoxical_subregs): Likewise.
10111         (forget_old_reloads_1): Likewise.
10112         * reorg.c (find_end_label): Likewise.
10113         (try_merge_delay_insns): Likewise.
10114         (redundant_insn): Likewise.
10115         (own_thread_p): Likewise.
10116         (fill_simple_delay_slots): Likewise.
10117         (fill_slots_from_thread): Likewise.
10118         (dbr_schedule): Likewise.
10119         * resource.c (update_live_status): Likewise.
10120         (mark_referenced_resources): Likewise.
10121         (mark_set_resources): Likewise.
10122         * rtl.c (copy_rtx): Likewise.
10123         * rtlanal.c (reg_referenced_p): Likewise.
10124         (single_set_2): Likewise.
10125         (noop_move_p): Likewise.
10126         (note_stores): Likewise.
10127         * sched-deps.c (sched_analyze_reg): Likewise.
10128         (sched_analyze_insn): Likewise.
10130 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10132         * cse.c (invalidate_reg): New function extracted from...
10133         (invalidate): ...here.
10134         (canonicalize_insn): Check for clobber high.
10135         (invalidate_from_clobbers): invalidate clobber highs.
10136         (invalidate_from_sets_and_clobbers): Likewise.
10137         (count_reg_usage): Check for clobber high.
10138         (insn_live_p): Likewise.
10139         * cselib.c (cselib_expand_value_rtx_1):Likewise.
10140         (cselib_invalidate_regno): Check for clobber in setter.
10141         (cselib_invalidate_rtx): Pass through setter.
10142         (cselib_invalidate_rtx_note_stores):
10143         (cselib_process_insn): Check for clobber high.
10144         * cselib.h (cselib_invalidate_rtx): Add operand.
10146 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10148         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10149         (mark_not_eliminable): Likewise.
10150         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10151         * lra-lives.c (process_bb_lives): Check for clobber high.
10152         * lra.c (new_insn_reg): Remember clobber highs.
10153         (collect_non_operand_hard_regs): Check for clobber high.
10154         (lra_set_insn_recog_data): Likewise.
10155         (add_regs_to_insn_regno_info): Likewise.
10156         (lra_update_insn_regno_info): Likewise.
10158 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10160         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10161         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10163 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10165         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10166         (copy_insn_1): Likewise.
10167         (gen_hard_reg_clobber_high): New gen function.
10168         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10169         * genemit.c (gen_exp): Likewise.
10170         (gen_emit_seq): Pass through info.
10171         (gen_insn): Check for CLOBBER_HIGH.
10172         (gen_expand): Pass through info.
10173         (gen_split): Likewise.
10174         (output_add_clobbers): Likewise.
10175         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10176         (remove_clobbers): Likewise.
10177         * rtl.h (gen_hard_reg_clobber_high): New declaration.
10179 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10181         * doc/rtl.texi (clobber_high): Add.
10182         (parallel): Add in clobber high
10183         * rtl.c (rtl_check_failed_code3): Add function.
10184         * rtl.def (CLOBBER_HIGH): Add expression.
10185         * rtl.h (RTL_CHECKC3): Add macro.
10186         (rtl_check_failed_code3): Add declaration.
10187         (XC3EXP): Add macro.
10189 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
10191         PR target/86386
10192         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10193         cfun->machine->max_used_stack_alignment if needed.
10195 2018-08-04  Martin Sebor  <msebor@redhat.com>
10197         PR tree-optimization/86571
10198         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10199         NaN output to 4.
10201 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
10203         PR target/86799
10204         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10205         Define.
10207 2018-08-03  Jeff Law  <law@redhat.com>
10209         PR target/86795
10210         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10211         Define to speculation_safe_value_not_needed.
10213 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
10215         * doc/gcov.texi (-x): Remove duplicate "to".
10216         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10217         (-Wif-not-aligned): Remove duplicate "is".
10218         (-flto): Remove duplicate "the".
10219         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10220         duplicate "v5.00.b".
10221         (MSP430 Options): Remove duplicate "and" from the description
10222         of "-mgprel-sec=regexp".
10223         (x86 Options): Remove duplicate copies of "vmldLog102" and
10224         vmlsLog104 from description of "-mveclibabi=type".
10226 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
10228         * internal-fn.h (first_commutative_argument): Declare.
10229         * internal-fn.c (first_commutative_argument): New function.
10230         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10231         restrictions for pattern statements.  Use first_commutative_argument
10232         to look for commutative operands in calls to internal functions.
10234 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
10236         * Makefile.in (wide-int-range.o): New.
10237         * tree-vrp.c: Move all the wide_int_* functions to...
10238         * wide-int-range.cc: ...here.
10239         * tree-vrp.h: Move all the wide_int_* prototypes to...
10240         * wide-int-range.h: ...here.
10242 2018-08-03  Tom de Vries  <tdevries@suse.de>
10244         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
10245         UI_NONE.
10246         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
10247         * except.c (output_function_exception_table): Do early exit if
10248         targetm_common.except_unwind_info (&global_options) == UI_NONE.
10250 2018-08-03  Martin Liska  <mliska@suse.cz>
10252         * predict.c (dump_prediction): Change to 2 digits
10253         in fraction part.
10255 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
10257         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
10258         neon_dup_q to...
10259         (falkor_am_1_gtov_gtov): ... a new insn reservation.
10261 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
10263         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
10264         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
10265         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
10266         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
10267         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
10269 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
10271         * diagnostic-show-locus.c (diagnostic_show_locus): Use
10272         pp_take_prefix when saving the existing prefix.
10273         * diagnostic.c (diagnostic_append_note): Likewise.
10274         * langhooks.c (lhd_print_error_function): Likewise.
10275         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
10276         param's type.  Free the existing prefix.
10277         (pp_take_prefix): New function.
10278         (pretty_printer::pretty_printer): Drop the prefix parameter.
10279         Rename the length parameter to match the comment.
10280         (pretty_printer::~pretty_printer): Free the prefix.
10281         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
10282         parameter.
10283         (struct pretty_printer): Drop the "const" from "prefix" field's
10284         type and clarify memory management.
10285         (pp_set_prefix): Drop the "const" from the 2nd param.
10286         (pp_take_prefix): New decl.
10288 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
10290         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
10291         for word_mode_ok here instead of passing as argument.
10292         (expand_block_compare): Change select_block_compare_mode() call.
10293         (expand_strncmp_gpr_sequence): New function.
10294         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
10296 2018-08-02  Jeff Law  <law@redhat.com>
10298         PR target/86790
10299         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10300         Define to speculation_safe_value_not_needed.
10302         PR target/86784
10303         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10304         Define to speculation_safe_value_not_needed.
10306 2018-08-02  Tom de Vries  <tdevries@suse.de>
10308         PR target/86660
10309         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
10310         function.  Return UI_TARGET unconditionally.
10311         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
10312         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
10314 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
10316         * genemit.c (print_overload_test): Fix typo.
10318 2018-08-02  Richard Biener  <rguenther@suse.de>
10320         PR tree-optimization/86816
10321         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
10322         which checks for value availability before querying it.
10323         (gvn_uses_equal): Use it.
10324         (same_succ_hash): Likewise.
10325         (gimple_equal_p): Likewise.
10327 2018-08-02  Nick Clifton  <nickc@redhat.com>
10329         PR target/86813
10330         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10331         Define to speculation_safe_value_not_needed.
10333         PR target/86810
10334         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10335         Define to speculation_safe_value_not_needed.
10337         PR target/86810
10338         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10339         Define to speculation_safe_value_not_needed.
10341         PR target/86803
10342         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10343         Define to speculation_safe_value_not_needed.
10345         PR target/86797
10346         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10347         Define to speculation_safe_value_not_needed.
10349         PR target/86791
10350         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10351         Define to speculation_safe_value_not_needed.
10353         PR target/86789
10354         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10355         Define to speculation_safe_value_not_needed.
10357         PR target/86787
10358         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10359         Define to speculation_safe_value_not_needed.
10361         PR target/86782
10362         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10363         speculation_safe_value_not_needed.
10365         PR target/86781
10366         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
10367         to speculation_safe_value_not_needed.
10369 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
10371         * doc/md.texi: Expand the documentation of instruction names
10372         to mention port-local uses.  Document '@' in pattern names.
10373         * read-md.h (overloaded_instance, overloaded_name): New structs.
10374         (mapping): Declare.
10375         (md_reader::handle_overloaded_name): New member function.
10376         (md_reader::get_overloads): Likewise.
10377         (md_reader::m_first_overload): New member variable.
10378         (md_reader::m_next_overload_ptr): Likewise.
10379         (md_reader::m_overloads_htab): Likewise.
10380         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
10381         m_next_overload_ptr and m_overloads_htab.
10382         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
10383         (get_mode_token, get_code_token, get_int_token): New functions.
10384         (map_attr_string): Add an optional argument that passes back
10385         the associated iterator.
10386         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
10387         (md_reader::handle_overloaded_name, add_overload_instance): New
10388         functions.
10389         (apply_iterators): Handle '@' names.  Report an error if '@'
10390         is used without iterators.
10391         (initialize_iterators): Initialize the new iterator_group fields.
10392         * genopinit.c (handle_overloaded_code_for)
10393         (handle_overloaded_gen): New functions.
10394         (main): Use them to print declarations of maybe_code_for_* and
10395         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
10396         * genemit.c (print_overload_arguments, print_overload_test)
10397         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
10398         (main): Use it to print definitions of maybe_code_for_* and
10399         maybe_gen_* functions.
10400         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
10401         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
10402         instead of explicit mode checks.
10403         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
10404         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
10405         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
10406         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
10407         (aarch64_expand_compare_and_swap): Likewise
10408         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
10409         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
10410         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
10411         (aarch64_constant_pool_reload_icode): Delete.
10412         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
10413         instead of aarch64_constant_pool_reload_icode.  Use
10414         code_for_aarch64_reload_mov instead of explicit mode checks.
10415         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
10416         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
10417         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
10418         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
10419         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
10420         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
10421         (aarch64_atomic_load_op_code): Delete.
10422         (aarch64_emit_atomic_load_op): Likewise.
10423         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
10424         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
10425         instead of aarch64_emit_atomic_load_op.
10426         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
10427         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
10428         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
10429         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
10430         character before the pattern name.
10431         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
10432         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
10433         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
10434         (aarch64_frecps<mode>): Likewise.
10435         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
10436         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
10437         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
10438         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
10439         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
10441 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
10443         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
10444         Allow HFmode constants if TARGET_FP_F16INST.
10446 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
10448         PR target/86014
10449         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
10450         No longer check last store for clobber of address register.
10452 2018-08-02  Martin Liska  <mliska@suse.cz>
10454         PR gcov-profile/86817
10455         * gcov.c (process_all_functions): New function.
10456         (main): Call it.
10457         (process_file): Move functions processing to
10458         process_all_functions.
10460 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
10462         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
10463         "const" to the "gimple *" and "rtx_insn *" parameters.
10464         * dumpfile.h (dump_user_location_t::dump_user_location_t):
10465         Likewise.
10466         (dump_location_t::dump_location_t): Likewise.
10468 2018-08-01  Martin Sebor  <msebor@redhat.com>
10470         PR tree-optimization/86650
10471         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
10472         rather than a "gcall *".  Directly pass the data of interest
10473         to percent_K_format, rather than building a temporary CALL_EXPR
10474         to hold it.
10475         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
10476         (gimple_fold_builtin_strncat): Adjust.
10477         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
10478         gcall* argument with gimple*.
10479         * gimple-ssa-warn-restrict.c (check_call): Same.
10480         (wrestrict_dom_walker::before_dom_children): Same.
10481         (builtin_access::builtin_access): Same.
10482         (check_bounds_or_overlap): Same
10483         (maybe_diag_overlap): Same.
10484         (maybe_diag_offset_bounds): Same.
10485         * tree-diagnostic.c (default_tree_printer): Move usage of
10486         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
10487         to this callsite.
10488         * tree-pretty-print.c (percent_K_format): Add argument.
10489         * tree-pretty-print.h: Add argument.
10490         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
10491         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10492         (maybe_diag_stxncpy_trunc): Same.
10493         (handle_builtin_stxncpy): Same.
10494         (handle_builtin_strcat): Same.
10496 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10498         * match.pd: Optimise pointer range checks.
10500 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10502         PR tree-optimization/86758
10503         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10504         to remove pattern statements.
10506 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10508         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10509         result of dfs_enumerate_from when constructing stmt_vec_infos,
10510         instead of additionally calling get_loop_body.
10512 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10514         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10515         parameter.
10516         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10517         When creating an iv, assert that the step is not known to be zero.
10518         (vect_setup_realignment): Update call accordingly.
10519         * tree-vect-stmts.c (vectorizable_store): Likewise.
10520         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
10522 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10524         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10525         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10526         (vectorizable_reduction): Likewise.
10527         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10528         (vect_detect_hybrid_slp_stmts): Likewise.
10529         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10531 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
10533         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10534         (wide_int_set_zero_nonzero_bits): ...this.
10535         (zero_nonzero_bits_from_vr): Rename to...
10536         (vrp_set_zero_nonzero_bits): ...this.
10537         (extract_range_from_multiplicative_op_1): Abstract wide int
10538         code...
10539         (wide_int_range_multiplicative_op): ...here.
10540         (extract_range_from_binary_expr_1): Extract wide int binary
10541         operations into their own functions.
10542         (wide_int_range_lshift): New.
10543         (wide_int_range_can_optimize_bit_op): New.
10544         (wide_int_range_shift_undefined_p): New.
10545         (wide_int_range_bit_xor): New.
10546         (wide_int_range_bit_ior): New.
10547         (wide_int_range_bit_and): New.
10548         (wide_int_range_trunc_mod): New.
10549         (extract_range_into_wide_ints): New.
10550         (vrp_shift_undefined_p): New.
10551         (extract_range_from_multiplicative_op): New.
10552         (vrp_can_optimize_bit_op): New.
10553         * tree-vrp.h (value_range::dump): New.
10554         (wide_int_range_multiplicative_op): New.
10555         (wide_int_range_lshift):New.
10556         (wide_int_range_shift_undefined_p): New.
10557         (wide_int_range_bit_xor): New.
10558         (wide_int_range_bit_ior): New.
10559         (wide_int_range_bit_and): New.
10560         (wide_int_range_trunc_mod): New.
10561         (zero_nonzero_bits_from_bounds): Rename to...
10562         (wide_int_set_zero_nonzero_bits): ...this.
10563         (zero_nonzero_bits_from_vr): Rename to...
10564         (vrp_set_zero_nonzero_bits): ...this.
10565         (range_easy_mask_min_max): Rename to...
10566         (wide_int_range_can_optimize_bit_op): this.
10567         * vr-values.c (simplify_bit_ops_using_ranges): Rename
10568         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10570 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10572         * tree-vectorizer.h (vect_orig_stmt): New function.
10573         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10574         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10575         (vect_create_epilog_for_reduction): Likewise.
10576         (vectorizable_live_operation): Likewise.
10577         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10578         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10579         * tree-vect-stmts.c (vectorizable_call): Likewise.
10580         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10582 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10584         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10585         argument.
10586         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10587         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10588         (vect_transform_loop): Likewise.
10589         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10591 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10593         * tree-vectorizer.h (vect_schedule_slp): Return void.
10594         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10595         (vect_schedule_slp): Likewise.
10597 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10599         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10600         argument.
10601         (vect_transform_loop): Update calls accordingly.  Schedule SLP
10602         instances before the main loop, if any exist.
10604 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
10606         PR tree-optimization/86749
10607         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10608         If the lhs is used in a COND_EXPR, check that it is being used
10609         as the "then" or "else" value.
10611 2018-08-01  Tom de Vries  <tdevries@suse.de>
10613         PR target/86800
10614         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10615         speculation_safe_value_not_needed.
10617 2018-08-01  Richard Biener  <rguenther@suse.de>
10619         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10620         as base and offset.
10622 2018-08-01  Martin Liska  <mliska@suse.cz>
10624         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10625         format how successful transformation is dumped.
10626         (gimple_mod_pow2_value_transform): Likewise.
10627         (gimple_mod_subtract_transform): Likewise.
10628         (gimple_stringops_transform): Likewise.
10630 2018-08-01  Martin Liska  <mliska@suse.cz>
10632         PR value-prof/35543
10633         * value-prof.c (interesting_stringop_to_profile_p):
10634         Simplify the code and add BUILT_IN_MEMMOVE.
10635         (gimple_stringops_transform): Likewise.
10637 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
10639         * config/aarch64/aarch64-simd.md
10640         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10641         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10642         use GPI iterator instead of SI mode.
10644 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10646         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10647         rs6000_speculation_barrier.
10648         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10649         new barrier pattern name.
10651 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
10653         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10654         (speculation_barrier): New insn.
10656 2018-08-01  Richard Biener  <rguenther@suse.de>
10658         PR bootstrap/86724
10659         * graphite.h: Include isl/id.h and isl/space.h to allow build
10660         with ISL 0.20.
10662 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
10664         PR target/86651
10665         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10666         mode for COFF targets.
10667         * defaults.h (TARGET_COFF): Define.
10668         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10669         TARGET_COFF): Define.
10670         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10671         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10672         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10674 2018-07-31  Alexandre Oliva <oliva@adacore.com>
10676         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10677         * gimple-streamer-out.c (output_bb): Save it.
10678         * lto-streamer-in.c (input_struct_function_base): Restore
10679         instance discriminator if available.  Create map on demand.
10680         * lto-streamer-out.c (output_struct_function_base): Save it if
10681         available.
10682         * final.c (decl_to_instance_map): Document LTO strategy.
10684 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
10685             Olivier Hainque  <hainque@adacore.com>
10687         * debug.h (decl_to_instance_map_t): New type.
10688         (decl_to_instance_map): Declare.
10689         (maybe_create_decl_to_instance_map): New inline function.
10690         * final.c (bb_discriminator, last_bb_discriminator): New statics,
10691         to track basic block discriminators.
10692         (final_start_function_1): Initialize them.
10693         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10694         bb_discriminator.
10695         (decl_to_instance_map): New variable.
10696         (map_decl_to_instance, maybe_set_discriminator): New functions.
10697         (notice_source_line): Set discriminator.
10699 2018-07-31  Ian Lance Taylor  <iant@golang.org>
10701         * targhooks.c (default_have_speculation_safe_value): Add
10702         ATTRIBUTE_UNUSED.
10704 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10706         * dump-context.h: Include "pretty-print.h".
10707         (dump_context::refresh_dumps_are_enabled): New decl.
10708         (dump_context::emit_item): New decl.
10709         (class dump_context): Add fields "m_test_pp" and
10710         "m_test_pp_flags".
10711         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10712         (temp_dump_context::get_dumped_text): New decl.
10713         (class temp_dump_context): Add field "m_pp".
10714         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10715         (dump_context::refresh_dumps_are_enabled): ...and add a test for
10716         m_test_pp.
10717         (set_dump_file): Update for above change.
10718         (set_alt_dump_file): Likewise.
10719         (dump_loc): New overload, taking a pretty_printer *.
10720         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
10721         to any test pretty-printer.
10722         (make_item_for_dump_gimple_stmt): New function, adapted from
10723         optinfo::add_gimple_stmt.
10724         (dump_context::dump_gimple_stmt): Call it, and use the result,
10725         eliminating the direct usage of dump_file and alt_dump_file in
10726         favor of indirectly using them via emit_item.
10727         (make_item_for_dump_gimple_expr): New function, adapted from
10728         optinfo::add_gimple_expr.
10729         (dump_context::dump_gimple_expr): Call it, and use the result,
10730         eliminating the direct usage of dump_file and alt_dump_file in
10731         favor of indirectly using them via emit_item.
10732         (make_item_for_dump_generic_expr): New function, adapted from
10733         optinfo::add_tree.
10734         (dump_context::dump_generic_expr): Call it, and use the result,
10735         eliminating the direct usage of dump_file and alt_dump_file in
10736         favor of indirectly using them via emit_item.
10737         (make_item_for_dump_printf_va): New function, adapted from
10738         optinfo::add_printf_va.
10739         (make_item_for_dump_printf): New function.
10740         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10741         and use the result, eliminating the direct usage of dump_file and
10742         alt_dump_file in favor of indirectly using them via emit_item.
10743         (make_item_for_dump_dec): New function.
10744         (dump_context::dump_dec): Call it, and use the result,
10745         eliminating the direct usage of dump_file and alt_dump_file in
10746         favor of indirectly using them via emit_item.
10747         (make_item_for_dump_symtab_node): New function, adapted from
10748         optinfo::add_symtab_node.
10749         (dump_context::dump_symtab_node): Call it, and use the result,
10750         eliminating the direct usage of dump_file and alt_dump_file in
10751         favor of indirectly using them via emit_item.
10752         (dump_context::begin_scope): Reimplement, avoiding direct usage
10753         of dump_file and alt_dump_file in favor of indirectly using them
10754         via emit_item.
10755         (dump_context::emit_item): New member function.
10756         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10757         Set up test pretty-printer on the underlying context.  Call
10758         refresh_dumps_are_enabled.
10759         (temp_dump_context::~temp_dump_context): Call
10760         refresh_dumps_are_enabled.
10761         (temp_dump_context::get_dumped_text): New member function.
10762         (selftest::verify_dumped_text): New function.
10763         (ASSERT_DUMPED_TEXT_EQ): New macro.
10764         (selftest::test_capture_of_dump_calls): Run all tests twice, with
10765         and then without optinfo enabled.  Add uses of
10766         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
10767         * dumpfile.h: Update comment for the dump_* API.
10768         * optinfo-emit-json.cc
10769         (selftest::test_building_json_from_dump_calls): Update for new
10770         param for temp_dump_context ctor.
10771         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10772         and "m_owned" field.
10773         (optinfo_item::~optinfo_item): Likewise.
10774         (optinfo::add_item): New member function.
10775         (optinfo::emit): Update comment.
10776         (optinfo::add_string): Delete.
10777         (optinfo::add_printf): Delete.
10778         (optinfo::add_printf_va): Delete.
10779         (optinfo::add_gimple_stmt): Delete.
10780         (optinfo::add_gimple_expr): Delete.
10781         (optinfo::add_tree): Delete.
10782         (optinfo::add_symtab_node): Delete.
10783         (optinfo::add_dec): Delete.
10784         * optinfo.h (class dump_context): New forward decl.
10785         (optinfo::add_item): New decl.
10786         (optinfo::add_string): Delete.
10787         (optinfo::add_printf): Delete.
10788         (optinfo::add_printf_va): Delete.
10789         (optinfo::add_gimple_stmt): Delete.
10790         (optinfo::add_gimple_expr): Delete.
10791         (optinfo::add_tree): Delete.
10792         (optinfo::add_symtab_node): Delete.
10793         (optinfo::add_dec): Delete.
10794         (optinfo::add_poly_int): Delete.
10795         (optinfo_item::optinfo_item): Remove "owned" param.
10796         (class optinfo_item): Remove field "m_owned".
10798 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10800         PR middle-end/86705
10801         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10802         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10803         requested variable alignment.
10804         (expand_one_ssa_partition): Likewise.
10805         (expand_one_var): Likewise.
10807 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10809         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10810         to speculation_safe_value_not_needed.
10812 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10814         * targhooks.h (speculation_safe_value_not_needed): New prototype.
10815         * targhooks.c (speculation_safe_value_not_needed): New function.
10816         * target.def (have_speculation_safe_value): Update documentation.
10817         * doc/tm.texi: Regenerated.
10819 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10821         * config/aarch64/iterators.md (ALLI_TI): New iterator.
10822         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10823         expand.
10824         (despeculate_copy<ALLI:mode>_insn): New insn.
10825         (despeculate_copyti_insn): New insn.
10826         (despeculate_simple<ALLI:mode>): New insn
10827         (despeculate_simpleti): New insn.
10828         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10829         function.
10830         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10831         aarch64_speculation_safe_value.
10832         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10834 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10836         * config/aarch64/aarch64-speculation.cc: New file.
10837         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10838         before pass_reorder_blocks.
10839         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10840         prototype.
10841         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10842         X14 and X15 when tracking speculation.
10843         * config/aarch64/aarch64.md (register name constants): Add
10844         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10845         (unspec): Add UNSPEC_SPECULATION_TRACKER.
10846         (speculation_barrier): New insn attribute.
10847         (cmp<mode>): Allow SP in comparisons.
10848         (speculation_tracker): New insn.
10849         (speculation_barrier): Add speculation_barrier attribute.
10850         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10851         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10852         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10854 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10856         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10857         aarch64_track_speculation is true.
10858         (tb<optab><mode>1): Likewise.
10859         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10860         generate CB[N]Z when tracking speculation.
10861         (aarch64_split_compare_and_swap): Likewise.
10862         (aarch64_split_atomic_op): Likewise.
10864 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10866         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10868 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10870         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10871         (speculation_barrier): New insn.
10873 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10875         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10876         * config/arm/arm.md (speculation_barrier): New expand.
10877         (speculation_barrier_insn): New pattern.
10879 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
10881         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10882         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10883         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10884         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10885         list.
10886         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10887         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10888         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10889         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10890         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10891         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10892         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10893         * builtins.c (expand_speculation_safe_value): New function.
10894         (expand_builtin): Call it.
10895         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10896         * doc/extend.texi: Document __builtin_speculation_safe_value.
10897         * doc/md.texi: Document "speculation_barrier" pattern.
10898         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10899         TARGET_HAVE_SPECULATION_SAFE_VALUE.
10900         * doc/tm.texi: Regenerated.
10901         * target.def (have_speculation_safe_value, speculation_safe_value): New
10902         hooks.
10903         * targhooks.c (default_have_speculation_safe_value): New function.
10904         (default_speculation_safe_value): New function.
10905         * targhooks.h (default_have_speculation_safe_value): Add prototype.
10906         (default_speculation_safe_value): Add prototype.
10908 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
10910         * dump-context.h (dump_context::dump_loc): New decl.
10911         * dumpfile.c (dump_context::dump_loc): New member function.
10912         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10913         and dump_gimple_stmt.
10914         (dump_context::dump_gimple_expr_loc): Likewise, using
10915         dump_gimple_expr.
10916         (dump_context::dump_generic_expr_loc): Likewise, using
10917         dump_generic_expr.
10918         (dump_context::dump_printf_loc_va): Likewise, using
10919         dump_printf_va.
10920         (dump_context::begin_scope): Explicitly using the global function
10921         "dump_loc", rather than the member function.
10923 2018-07-31  Martin Sebor  <msebor@redhat.com>
10925         PR tree-optimization/86741
10926         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10928 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
10930         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10931         depend on whether prefetch instructions will be emitted or not.
10932         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10933         will be emitted or not.
10934         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10935         (TARGET_SETMEM_PFD): New macros.
10937 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10939         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10940         (NULL_STMT_VEC_INFO): Delete.
10941         (stmt_vec_info::operator*): Likewise.
10942         (stmt_vec_info::operator gimple *): Likewise.
10943         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10944         of NULL_STMT_VEC_INFO.
10945         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10946         (vect_reassociating_reduction_p): Likewise.
10947         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10948         (vectorizable_store): Likewise.
10949         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10950         (vec_info::free_stmt_vec_infos): Likewise.
10952 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10954         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10955         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10957 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10959         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10960         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10961         (vec_info::free_stmt_vec_info): New private member functions.
10962         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10963         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10964         * tree-parloops.c (gather_scalar_reductions): Remove calls to
10965         set_stmt_vec_info_vec and free_stmt_vec_infos.
10966         * tree-vect-loop.c (_loop_vec_info): Remove call to
10967         set_stmt_vec_info_vec.
10968         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10969         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10970         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10971         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10972         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
10973         assignments in {vec_info::,}new_stmt_vec_info that are redundant
10974         with the clearing in the xcalloc.
10975         (stmt_vec_info_vec): Delete.
10976         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10977         (vectorize_loops): Likewise.
10978         (vec_info::~vec_info): Remove argument from call to
10979         free_stmt_vec_infos.
10980         (vec_info::add_stmt): Remove vinfo argument from call to
10981         new_stmt_vec_info.
10983 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10985         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10986         rather than a gimple stmt.
10987         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
10988         information for pattern statements when passed the original
10989         statement; instead wait to be passed the pattern statement itself.
10990         Don't call set_vinfo_for_stmt here.
10991         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10992         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10993         stmt_vec_infos here.
10994         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10995         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10996         stmt_vec_infos entry.
10998 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11000         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
11001         * tree-vectorizer.c (vec_info::replace_stmt): New function.
11002         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
11003         * tree-vect-stmts.c (vectorizable_call): Likewise.
11004         (vectorizable_simd_clone_call): Likewise.
11006 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11008         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
11009         * tree-vectorizer.c (vec_info::remove_stmt): New function.
11010         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
11011         * tree-vect-loop.c (vect_transform_loop): Likewise.
11012         * tree-vect-slp.c (vect_schedule_slp): Likewise.
11013         * tree-vect-stmts.c (vect_remove_stores): Likewise.
11015 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11017         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
11018         (vect_dr_stmt): Delete.
11019         * tree-vectorizer.c (vec_info::lookup_dr): New function.
11020         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
11021         of DR_VECT_AUX.
11022         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
11023         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
11024         (vect_verify_datarefs_alignment, vect_peeling_supportable)
11025         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11026         (vect_analyze_data_refs): Likewise.
11027         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
11028         argument.
11029         (vect_find_same_alignment_drs): Likewise.
11030         (vect_slp_analyze_node_dependences): Update calls accordingly.
11031         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
11032         instead of DR_VECT_AUX.
11033         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
11034         of a vector data references.  Use vec_info::lookup_dr instead of
11035         DR_VECT_AUX.
11036         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
11037         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
11038         instead of DR_VECT_AUX.
11040 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11042         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
11043         dr_vec_info.
11044         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11045         accordingly.
11046         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11047         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11048         (vect_gen_prolog_loop_niters): Likewise.
11050 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11052         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
11053         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
11054         (vect_known_alignment_in_bytes, vect_dr_behavior)
11055         (vect_get_scalar_dr_size): Take references as dr_vec_infos
11056         instead of data_references.  Update calls to other routines for
11057         which the same change has been made.
11058         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
11059         dr_vec_infos instead of stmt_vec_infos.
11060         (vect_analyze_data_ref_dependence): Update call accordingly.
11061         (vect_slp_analyze_data_ref_dependence)
11062         (vect_record_base_alignments): Use DR_VECT_AUX.
11063         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11064         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11065         (vector_alignment_reachable_p, vect_get_data_access_cost)
11066         (vect_peeling_supportable, vect_analyze_group_access_1)
11067         (vect_analyze_group_access, vect_analyze_data_ref_access)
11068         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11069         (vect_compile_time_alias, vect_small_gap_p)
11070         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11071         (vect_supportable_dr_alignment): Take references as dr_vec_infos
11072         instead of data_references.  Update calls to other routines for
11073         which the same change has been made.
11074         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11075         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11076         (vect_slp_analyze_and_verify_node_alignment)
11077         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11078         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11079         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
11080         above changes.
11081         (_vect_peel_info::dr): Replace with...
11082         (_vect_peel_info::dr_info): ...this new field.
11083         (vect_peeling_hash_get_most_frequent)
11084         (vect_peeling_hash_choose_best_peeling): Update accordingly.
11085         (vect_peeling_hash_get_lowest_cost):
11086         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
11087         routines for which the same change has been made.
11088         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
11089         data_reference.
11090         * tree-vect-loop-manip.c (get_misalign_in_elems)
11091         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
11092         above changes.
11093         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11094         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11095         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11096         (get_group_load_store_type, get_negative_load_store_type)
11097         (vect_get_data_ptr_increment, vectorizable_store)
11098         (vectorizable_load): Likewise.
11099         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11100         Update calls to other routines for which the same change has been made.
11102 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11104         * tree-vectorizer.h (vec_info::move_dr): New member function.
11105         (dataref_aux): Rename to...
11106         (dr_vec_info): ...this and add "dr" and "stmt" fields.
11107         (_stmt_vec_info::dr_aux): Update accordingly.
11108         (_stmt_vec_info::data_ref_info): Delete.
11109         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11110         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11111         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11112         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11113         of data_ref.
11114         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
11115         (STMT_VINFO_DR_INFO): New macro.
11116         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11117         (set_dr_misalignment): Update after rename of dataref_aux.
11118         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
11119         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11120         initialization of STMT_VINFO_DATA_REF.
11121         * tree-vectorizer.c (vec_info::move_dr): New function.
11122         * tree-vect-patterns.c (vect_recog_bool_pattern)
11123         (vect_recog_mask_conversion_pattern)
11124         (vect_recog_gather_scatter_pattern): Use it.
11125         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11126         the "dr" and "stmt" fields of dr_vec_info instead of
11127         STMT_VINFO_DATA_REF.
11129 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11131         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11132         (is_pattern_stmt_p): Use it.
11133         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11134         on pattern statements.
11136 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11138         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11139         original stmt as a stmt_vec_info rather than a gimple stmt.
11140         (vect_pattern_recog_1): Take the statement directly as a
11141         stmt_vec_info, rather than via a gimple_stmt_iterator.
11142         Update call to vect_mark_pattern_stmts.
11143         (vect_pattern_recog): Update calls accordingly.
11145 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11147         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11148         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11149         a vect_def_type for the first argument.
11150         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11151         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
11152         operand if it isn't defined by a vectorized statement.
11153         (vect_build_gather_load_calls): Remove the mask_dt argument and
11154         update calls to vect_get_vec_def_for_stmt_copy.
11155         (vectorizable_bswap): Likewise the dt argument.
11156         (vectorizable_call): Update calls to vectorizable_bswap and
11157         vect_get_vec_def_for_stmt_copy.
11158         (vectorizable_simd_clone_call, vectorizable_assignment)
11159         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11160         (vectorizable_comparison): Update calls to
11161         vect_get_vec_def_for_stmt_copy.
11162         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
11163         vect_is_simple_use.
11164         (vect_get_loop_based_defs): Remove dt argument and update call
11165         to vect_get_vec_def_for_stmt_copy.
11166         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11167         and vect_get_vec_def_for_stmt_copy.
11168         (vectorizable_load): Update calls to vect_build_gather_load_calls
11169         and vect_get_vec_def_for_stmt_copy.
11170         * tree-vect-loop.c (vect_create_epilog_for_reduction)
11171         (vectorizable_reduction, vectorizable_live_operation): Update calls
11172         to vect_get_vec_def_for_stmt_copy.
11174 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11176         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11177         and gimple stmt arguments with a stmt_vec_info.
11178         (vect_record_base_alignments): Update calls accordingly.
11179         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11180         and gimple stmt arguments with a stmt_vec_info.
11181         (vect_build_slp_tree_1): Remove vinfo argument and update call
11182         to vect_record_max_nunits.
11183         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11184         and vect_record_max_nunits.
11186 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11188         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11189         file and take a stmt_vec_info instead of a gimple stmt.
11190         (supportable_widening_operation, vect_finish_replace_stmt)
11191         (vect_finish_stmt_generation, vect_get_store_rhs)
11192         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11193         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11194         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11195         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11196         (vect_create_data_ref_ptr, bump_vector_ptr)
11197         (vect_permute_store_chain, vect_setup_realignment)
11198         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11199         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11200         (vectorizable_reduction, vectorizable_induction)
11201         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11202         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11203         than gimple stmts as arguments.
11204         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11205         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11206         (can_group_stmts_p, vect_check_gather_scatter)
11207         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11208         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11209         (vect_permute_load_chain, vect_shift_permute_load_chain)
11210         (vect_transform_grouped_load)
11211         (vect_record_grouped_load_vectors): Likewise.
11212         * tree-vect-loop.c (vect_fixup_reduc_chain)
11213         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11214         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11215         (vectorizable_reduction, vectorizable_induction)
11216         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11217         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11218         (vect_get_load_store_mask): Likewise.
11219         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11220         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11221         * tree-vect-stmts.c (vect_mark_relevant)
11222         (is_simple_and_all_uses_invariant)
11223         (exist_non_indexing_operands_for_use_p, process_use)
11224         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11225         (vect_get_vec_def_for_operand, vect_get_vec_defs)
11226         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11227         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11228         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11229         (get_negative_load_store_type, get_load_store_type)
11230         (vect_check_load_store_mask, vect_check_store_rhs)
11231         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11232         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11233         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11234         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11235         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11236         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
11237         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
11238         (supportable_widening_operation): Likewise.
11240 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11242         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
11243         a stmt_vec_info instead of a gcall.
11244         (vect_check_gather_scatter): Update call accordingly.
11245         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
11246         of a gphi.
11247         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
11248         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
11249         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
11250         instead of a gimple stmt.
11251         (vect_transform_loop): Update calls accordingly.
11252         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
11253         stmt_vec_infos instead of gimple stmts.
11254         (vect_analyze_slp_instance): Update use accordingly.
11255         * tree-vect-stmts.c (read_vector_array, write_vector_array)
11256         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
11257         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
11258         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
11259         (vect_gen_widened_results_half, vect_get_loop_based_defs)
11260         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
11261         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
11262         down to subroutines.
11264 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11266         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
11267         of the worklist from a vector of gimple stmts to a vector of
11268         stmt_vec_infos.
11269         * tree-vect-stmts.c (vect_mark_relevant, process_use)
11270         (vect_mark_stmts_to_be_vectorized): Likewise
11272 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11274         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
11275         statement before passing it to vect_analyze_stmt.
11276         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
11277         the chain of phi vector definitions.  Track the exit phi via its
11278         stmt_vec_info.
11279         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
11280         STMT_VINFO_REDUC_DEF.
11281         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
11282         stmt_vec_infos to handle the statement chains.
11283         (vect_get_slp_defs): Record the first statement in the node
11284         using a stmt_vec_info.
11285         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
11286         statements here and pass their stmt_vec_info down to subroutines.
11287         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
11288         down to vect_finish_stmt_generation.
11289         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
11290         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
11291         stmt_vec_infos to subroutines.
11292         (vect_remove_stores): Use stmt_vec_infos to handle the statement
11293         chains.
11295 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11297         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
11298         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
11299         (vect_permute_store_chain, vect_setup_realignment)
11300         (vect_permute_load_chain, vect_shift_permute_load_chain)
11301         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
11302         stmts internally, and when passing values to other vectorizer routines.
11303         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11304         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
11305         (vect_analyze_loop_operations, get_initial_def_for_reduction)
11306         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
11307         (vectorizable_reduction, vectorizable_induction)
11308         (vectorizable_live_operation, vect_transform_loop_stmt)
11309         (vect_transform_loop): Likewise.
11310         * tree-vect-patterns.c (vect_reassociating_reduction_p)
11311         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
11312         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
11313         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11314         (vect_slp_analyze_node_operations_1): Likewise.
11315         * tree-vect-stmts.c (vect_mark_relevant, process_use)
11316         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
11317         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
11318         (vect_finish_stmt_generation_1, get_group_load_store_type)
11319         (get_load_store_type, vect_build_gather_load_calls)
11320         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11321         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11322         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11323         (vectorizable_store, vectorizable_load, vectorizable_condition)
11324         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
11325         (supportable_widening_operation): Likewise.
11326         (vect_get_vector_types_for_stmt): Likewise.
11327         * tree-vectorizer.h (vect_dr_behavior): Likewise.
11329 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11331         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11332         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
11333         (vect_permute_store_chain, vect_permute_load_chain)
11334         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
11335         repeated stmt_vec_info lookups.
11336         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
11337         (vect_update_ivs_after_vectorizer): Likewise.
11338         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
11339         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11340         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
11341         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11342         (vect_bb_slp_scalar_cost): Likewise.
11343         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
11345 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11347         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
11348         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
11349         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
11350         to get gassigns and gcalls, rather than operating on generc gimple
11351         stmts.
11352         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
11353         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
11354         (vectorizable_load, vect_analyze_stmt): Likewise.
11355         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
11357 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11359         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
11360         return stmt_vec_infos rather than gimple stmts.  Do not accept
11361         null arguments.
11362         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
11363         of a gimple stmt.
11364         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11365         Update use of get_later_stmt.
11366         (vect_get_constant_vectors): Update call accordingly.
11367         (vect_schedule_slp_instance): Likewise
11368         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
11369         (vect_slp_analyze_instance_dependence): Likewise.
11370         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
11372 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11374         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
11375         (stmt_info_for_cost::stmt_info): ...this new field.
11376         (add_stmt_costs): Update accordingly.
11377         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11378         (vect_get_known_peeling_cost): Likewise.
11379         (vect_estimate_min_profitable_iters): Likewise.
11380         * tree-vect-stmts.c (record_stmt_cost): Likewise.
11382 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11384         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
11385         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11386         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11387         accordingly.
11388         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
11390 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11392         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
11393         a gimple stmt to a stmt_vec_info.
11394         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
11396 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11398         * tree-vectorizer.h (vec_info::grouped_stores): Change from
11399         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11400         (_loop_vec_info::reduction_chains): Likewise.
11401         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
11402         accordingly.
11403         * tree-vect-slp.c (vect_analyze_slp): Likewise.
11405 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11407         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
11408         a gimple stmt to a stmt_vec_info.
11409         (_stmt_vec_info::next_element): Likewise.
11410         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
11411         (vect_slp_analyze_and_verify_node_alignment)
11412         (vect_analyze_group_access_1, vect_analyze_group_access)
11413         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
11414         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
11415         (vect_supportable_dr_alignment): Update accordingly.
11416         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
11417         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
11418         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
11419         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
11420         * tree-vect-slp.c (vect_build_slp_tree_1)
11421         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
11422         (vect_split_slp_store_group, vect_analyze_slp_instance)
11423         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
11424         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
11425         (get_group_load_store_type, get_load_store_type)
11426         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
11427         (vect_transform_stmt, vect_remove_stores): Likewise.
11429 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11431         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
11432         than a gimple stmt.
11433         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11434         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
11435         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
11436         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
11437         (vector_alignment_reachable_p, vect_get_data_access_cost)
11438         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
11439         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
11440         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11441         (vect_analyze_group_access_1, vect_analyze_group_access)
11442         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
11443         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
11444         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
11445         result of vect_dr_stmt and use the stmt_vec_info instead of
11446         the associated gimple stmt.
11447         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11448         (vect_gen_prolog_loop_niters): Likewise.
11449         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11451 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11453         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
11454         to a vec<stmt_vec_info>.
11455         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
11456         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
11457         vec<stmt_vec_info>.
11458         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
11459         to a vec<stmt_vec_info>.
11460         (bst_traits::value_type, bst_traits::value_type): Likewise.
11461         (bst_traits::hash): Update accordingly.
11462         (vect_get_and_check_slp_defs): Change the stmts parameter from
11463         a vec<gimple *> to a vec<stmt_vec_info>.
11464         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
11465         (vect_build_slp_tree): Likewise.
11466         (vect_build_slp_tree_2): Likewise.  Update uses of
11467         SLP_TREE_SCALAR_STMTS.
11468         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
11469         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
11470         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
11471         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
11472         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
11473         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
11474         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
11475         (vect_get_constant_vectors, vect_get_slp_defs)
11476         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
11477         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
11478         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
11479         instead of gimple stmts.
11480         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
11481         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
11482         (vect_slp_analyze_instance_dependence): Update uses of
11483         SLP_TREE_SCALAR_STMTS.
11484         (vect_slp_analyze_and_verify_node_alignment): Likewise.
11485         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
11486         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
11487         (get_initial_defs_for_reduction): Likewise.
11488         (vect_create_epilog_for_reduction): Likewise.
11489         (vectorize_fold_left_reduction): Likewise.
11490         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
11491         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11492         (can_vectorize_live_stmts): Likewise.
11494 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11496         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11497         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11498         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11499         than gimple stmts.
11500         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11501         of a gimple stmt.
11502         (gather_scalar_reductions): Update after above interface changes.
11503         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11504         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11505         than gimple stmts.
11506         (vect_force_simple_reduction): Likewise.
11507         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11508         LOOP_VINFO_REDUCTIONS.
11509         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11511 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11513         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11514         a gimple stmt to a stmt_vec_info.
11515         * tree-vect-loop.c (vect_active_double_reduction_p)
11516         (vect_force_simple_reduction, vectorizable_reduction): Update
11517         accordingly.
11519 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11521         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11522         vec<gimple *> to a vec<stmt_vec_info>.
11523         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11524         the reduction_phis argument from a vec<gimple *> to a
11525         vec<stmt_vec_info>.
11526         (vectorizable_reduction): Likewise the phis local variable that
11527         is passed to vect_create_epilog_for_reduction.  Update for new type
11528         of SLP_TREE_VEC_STMTS.
11529         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11530         (vectorizable_live_operation): Likewise.
11531         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11532         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11534 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11536         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11537         a gimple stmt to a stmt_vec_info.
11538         (vectorizable_condition, vectorizable_live_operation)
11539         (vectorizable_reduction, vectorizable_induction): Pass back the
11540         vectorized statement as a stmt_vec_info.
11541         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11542         use of STMT_VINFO_VEC_STMT.
11543         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11544         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11545         as stmt_vec_infos rather than gimple stmts.
11546         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11547         to a stmt_vec_info.
11548         (vectorizable_live_operation): Likewise.
11549         (vectorizable_reduction, vectorizable_induction): Likewise,
11550         updating use of STMT_VINFO_VEC_STMT.
11551         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11552         of STMT_VINFO_VEC_STMT.
11553         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11554         (vectorizable_simd_clone_call, vectorizable_conversion)
11555         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11556         (vectorizable_store, vectorizable_load, vectorizable_condition)
11557         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11558         from a gimple stmt to a stmt_vec_info.
11559         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
11560         pointer to a stmt_vec_info to the vectorizable_* routines.
11562 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11564         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11565         a gimple stmt to a stmt_vec_info.
11566         (is_pattern_stmt_p): Update accordingly.
11567         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11568         (vect_record_grouped_load_vectors): Likewise.
11569         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11570         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11571         (vect_model_reduction_cost): Likewise.
11572         (vect_create_epilog_for_reduction): Likewise.
11573         (vectorizable_reduction, vectorizable_induction): Likewise.
11574         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11575         Return the stmt_vec_info for the pattern statement.
11576         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11577         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11578         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11579         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11580         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11581         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11582         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11583         (free_stmt_vec_info, vect_is_simple_use): Likewise.
11585 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11587         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11588         (vect_finish_stmt_generation): Likewise.
11589         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11590         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11591         (vect_build_gather_load_calls): Use the return value of the above
11592         functions instead of a separate call to vinfo_for_stmt.  Use narrow
11593         scopes for the input gimple stmt and wider scopes for the associated
11594         stmt_vec_info.  Use vec_info::lookup_def when setting these
11595         stmt_vec_infos from an SSA_NAME definition.
11596         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11597         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11598         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11599         (vectorizable_store, vectorizable_load, vectorizable_condition)
11600         (vectorizable_comparison): Likewise.
11601         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11602         (vectorizable_reduction): Likewise.
11604 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11606         * tree-vectorizer.h (vect_is_simple_use): Add an optional
11607         stmt_vec_info * parameter before the optional gimple **.
11608         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11609         (process_use, vect_get_vec_def_for_operand_1): Update callers.
11610         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11611         * tree-vect-loop.c (vectorizable_reduction): Likewise.
11612         (vectorizable_live_operation): Likewise.
11613         * tree-vect-patterns.c (type_conversion_p): Likewise.
11614         (vect_look_through_possible_promotion): Likewise.
11615         (vect_recog_rotate_pattern): Likewise.
11616         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11618 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11620         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11621         a typedef to a wrapper class.
11622         (NULL_STMT_VEC_INFO): New macro.
11623         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11624         (stmt_vec_info::operator*): New function.
11625         (stmt_vec_info::operator gimple *): Likewise.
11626         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11627         (add_stmt_costs): Likewise.
11628         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11629         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11630         (vect_get_known_peeling_cost): Likewise.
11631         (vect_estimate_min_profitable_iters): Likewise.
11632         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11633         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11634         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11635         (vectorizable_store, free_stmt_vec_infos): Likewise.
11636         (new_stmt_vec_info): Change return type of xcalloc to
11637         _stmt_vec_info *.
11639 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11641         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11642         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11643         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11644         a single_imm_use-based sequence.
11645         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11647 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11649         * tree-vectorizer.h (vec_info::lookup_def): Declare.
11650         * tree-vectorizer.c (vec_info::lookup_def): New function.
11651         * tree-vect-patterns.c (vect_get_internal_def): Use it.
11652         (vect_widened_op_tree): Likewise.
11653         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11654         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11655         (vectorizable_reduction): Likewise.
11656         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11657         of a gimple *.
11658         (vect_is_slp_reduction): Update calls accordingly.  Use
11659         vec_info::lookup_def.
11660         (vect_is_simple_reduction): Likewise
11661         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11663 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11665         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11666         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11667         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11668         of vinfo_for_stmt.
11669         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11670         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11671         (vect_update_vf_for_slp, vect_analyze_loop_operations)
11672         (vect_is_slp_reduction, vectorizable_induction)
11673         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11674         * tree-vect-patterns.c (vect_init_pattern_stmt):
11675         (vect_determine_min_output_precision_1, vect_determine_precisions)
11676         (vect_pattern_recog): Likewise.
11677         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11678         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11679         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11680         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11681         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11682         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
11683         info field from a loop to a loop_vec_info.
11685 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11687         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11688         (vec_info::add_stmt): Declare.
11689         * tree-vectorizer.c (vec_info::add_stmt): New function.
11690         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11691         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11692         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11693         (vectorizable_induction): Likewise.
11694         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11695         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11696         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11697         (vectorizable_load): Likewise.
11698         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11699         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11700         (vect_recog_gather_scatter_pattern): Likewise.
11701         (append_pattern_def_seq): Likewise.  Remove a check that is
11702         performed by add_stmt itself.
11704 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11706         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11707         which make_ssa_name was called with new_stmt before new_stmt
11708         had been created.
11710 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11712         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11713         split out from...
11714         (vect_is_slp_reduction): ...here...
11715         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
11716         that are already known to be false.
11718 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11720         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11721         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
11722         STMT_VINFO_NUM_SLP_USES when it's true.
11723         (vect_free_slp_instance): Add a final_p parameter and pass it to
11724         vect_free_slp_tree.
11725         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11726         (vect_analyze_slp_instance): Likewise.
11727         (vect_slp_analyze_operations): Likewise.
11728         (vect_slp_analyze_bb_1): Likewise.
11729         * tree-vectorizer.c (vec_info): Likewise.
11730         * tree-vect-loop.c (vect_transform_loop): Likewise.
11732 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11734         * tree-vect-loop.c (vectorizable_reduction): Assert that the
11735         function is not called for second and subsequent members of
11736         a reduction group.
11738 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11740         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11741         cases for nested loops from here to ...
11742         (vect_create_epilog_for_reduction): ...here.  Only call
11743         vect_is_simple_use for inner-loop reductions.
11745 2018-07-31  Martin Liska  <mliska@suse.cz>
11747         PR gcov-profile/85338
11748         PR gcov-profile/85350
11749         PR gcov-profile/85372
11750         * profile.c (struct location_triplet): New.
11751         (struct location_triplet_hash): Likewise.
11752         (output_location): Do not output a BB that
11753         is already recorded for a line.
11754         (branch_prob): Use streamed_locations.
11756 2018-07-31  Martin Liska  <mliska@suse.cz>
11758         PR gcov-profile/85370
11759         * coverage.c (coverage_begin_function): Do not mark target
11760         clones as artificial functions.
11762 2018-07-31  Martin Liska  <mliska@suse.cz>
11764         PR gcov-profile/83813
11765         PR gcov-profile/84758
11766         PR gcov-profile/85217
11767         PR gcov-profile/85332
11768         * profile.c (branch_prob): Do not record GOTO expressions
11769         for GIMPLE statements which locations are already streamed.
11771 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11773         * gcc.c (handle_spec_function): Accept a soft_matched_part
11774         argument, as do_spec_1.  Pass it down to ...
11775         (eval_spec_function): Accept a soft_matched_part argument,
11776         and pass it down to ...
11777         (do_spec_2): Accept a soft_matched_part argument, and pass
11778         it down to do_spec_1.
11779         (do_spec_1): Pass soft_matched_part to handle_spec_function.
11780         (handle_braces): Update call to handle_spec_function.
11781         (driver::set_up_specs): Update calls to do_spec_2.
11782         (compare_debug_dump_opt_spec_function): Likewise.
11783         (compare_debug_self_opt_spec_function): Likewise.
11785 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11787         * common.opt (nolibc): New option.
11788         * doc/invoke.texi (Link Options): Document it.
11789         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11790         * config/alpha/linux.h: Likewise.
11791         * config/arc/elf.h: Likewise.
11792         * config/arm/uclinux-elf.h: Likewise.
11793         * config/arm/unknown-elf.h: Likewise.
11794         * config/avr/avrlibc.h: Likewise.
11795         * config/bfin/bfin.h: Likewise.
11796         * config/bfin/linux.h: Likewise.
11797         * config/bfin/uclinux.h: Likewise.
11798         * config/darwin.h: Likewise.
11799         * config/darwin10.h: Likewise.
11800         * config/darwin12.h: Likewise.
11801         * config/gnu-user.h: Likewise.
11802         * config/lm32/uclinux-elf.h: Likewise.
11803         * config/pa/pa-hpux11.h: Likewise.
11804         * config/pa/pa64-hpux.h: Likewise.
11805         * config/sparc/sparc.h: Likewise.
11807 2018-07-31  Olivier Hainque  <hainque@adacore.com>
11809         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11810         undefined variables.
11812 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11814         PR target/86640
11815         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11816         instead of GEN_INT.
11818 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11820         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11821         terminated string literal.
11823 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
11825         PR rtl-optimization/85160
11826         * combine.c (is_just_move): New function.
11827         (try_combine): Allow combining two instructions into two if neither of
11828         the original instructions was a move.
11830 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
11832         PR target/86673
11833         * doc/extend.texi (Global Register Variables): Discourage use of type
11834         qualifiers.
11835         (Local Register Variables): Likewise.
11837 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
11839         PR tree-optimization/86506
11840         * hwint.h (ceil_log2): Resync with hwint.c implementation.
11842 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
11844         PR target/86547
11845         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11846         hard_regno, make sure no insn between `from` and `to` clobbers it.
11848 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
11849             Tom de Vries  <tdevries@suse.de>
11851         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11852         (PTX_DEFAULT_RUNTIME_DIM): ... this.
11853         (nvptx_goacc_validate_dims): Set default worker and gang dims to
11854         PTX_DEFAULT_RUNTIME_DIM.
11855         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11857 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
11859         * config/pa/pa.c (pa_output_addr_vec): Align address table.
11860         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11861         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11863 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
11865         * config/rs6000/constraints.md (wG constraint): Delete, no longer
11866         used.
11867         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11868         predicate to reflect toc fusion has been deleted.
11869         (toc_fusion_mem_raw): Delete, no longer used.
11870         (toc_fusion_mem_wrapped): Likewise.
11871         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11872         fusion mask bit.
11873         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11874         Delete, no longer used.
11875         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11876         meant to be used for toc fusion.
11877         (rs6000_debug_print_mode): Delete toc fusion debugging.
11878         (rs6000_debug_reg_global): Likewise.
11879         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11880         fusion and secondary reload support that were never used.
11881         (rs6000_option_override_internal): Delete TOC fusion, that was only
11882         partially defined, and it did not work unless you also used the
11883         -mcmodel= switch.
11884         (rs6000_legitimate_address_p): Delete TOC fusion support.
11885         (rs6000_opt_masks): Likewise.
11886         (fusion_wrap_memory_address): Delete function, no longer used.
11887         (fusion_split_address); Delete TOC fusion support.
11888         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11889         longer used with toc fusion being deleted.
11890         (TARGET_TOC_FUSION_FP): Likewise.
11891         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11892         UNSPEC.
11893         (toc fusion spliter): Delete TOC fusion support.
11894         (toc_fusionload_<mode>): Likewise.
11895         (toc_fusionload_di): Likewise.
11896         (fusion_gpr_load_<mode>): Delete generator function, this insn no
11897         longer needs to be named.  Rename predicate to delete TOC fusion.
11898         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11899         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11900         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11901         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11902         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11904 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11906         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11907         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
11908         __int128 in built-in function prototypes.
11909         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11910         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11912 2018-07-27  Martin Sebor  <msebor@redhat.com>
11914         PR tree-optimization/86696
11915         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11916         types, including enums.
11917         (handle_char_store): Be prepared for the above function to fail.
11919 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
11921         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11922         when optimization level is lower than 2 or optimize for size.
11924 2018-07-26  Martin Sebor  <msebor@redhat.com>
11926         PR tree-optimization/86043
11927         PR tree-optimization/86042
11928         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11929         (get_string_cst_length): Rename...
11930         (get_min_string_length): ...to this.  Add argument.
11931         (handle_char_store): Extend to handle multi-character stores by
11932         MEM_REF.
11933         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
11934         * tree.h (initializer_zerop): Add argument.
11936 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
11938         PR middle-end/86660
11939         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11940         declare target to variables if they have always,{to,from,tofrom} map
11941         kinds.
11943 2018-07-26  Martin Liska  <mliska@suse.cz>
11945         PR lto/86548
11946         * lto-wrapper.c: Add linker_output as prefix
11947         for ltrans_output_file.
11949 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
11951         PR rtl-optimization/85805
11952         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11953         value for hard registers if that was written in the same mode.
11955 2018-07-26  Martin Liska  <mliska@suse.cz>
11957         PR gcov-profile/86536
11958         * gcov.c (format_gcov): Use printf format %.*f directly
11959         and do not handle special values.
11961 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11963         * common/config/arc/arc-common.c (arc_option_optimization_table):
11964         Update default optimizations for size.
11966 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11968         * config/arc/arc.md (movsf_insn): Add short instruction selection.
11969         * config/arc/constraints.md (CfZ): New constraint.
11970         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11971         (subsf3_fpu): Likewise.
11972         (cmpsf_fpu): Likewise.
11973         (cmpsf_fpu_uneq): Likewise.
11975 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11977         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11978         accesses as well.
11979         (arc_is_uncached_mem_p): uncached applies to both the variable and
11980         the pointer.
11982 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
11984         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11985         register names.
11987 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
11989         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11990         field "m_scopes" from vec to auto_vec.
11992 2018-07-25  Martin Liska  <mliska@suse.cz>
11994         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11995         return type.
11997 2018-07-25  Richard Biener  <rguenther@suse.de>
11999         PR debug/86654
12000         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
12001         special wrt context_die late.
12002         (gen_subprogram_die): Re-use DIEs in local scope.
12004 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
12006         PR tree-optimization/86644
12007         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
12009 2018-07-25  Martin Liska  <mliska@suse.cz>
12011         PR middle-end/86645
12012         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
12013         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
12015 2018-07-25  Martin Liska  <mliska@suse.cz>
12017         PR sanitizer/79635
12018         * params.def: Explain ASan abbreviation and provide
12019         a documentation link.
12021 2018-07-24  Martin Sebor  <msebor@redhat.com>
12023         PR tree-optimization/86622
12024         PR tree-optimization/86532
12025         * builtins.h (string_length): Declare.
12026         * builtins.c (c_strlen): Correct handling of non-constant offsets.
12027         (check_access): Be prepared for non-constant length ranges.
12028         (string_length): Make extern.
12029         * expr.c (string_constant): Only handle the minor non-constant
12030         array index.  Use string_constant to compute the length of
12031         a generic string constant.
12033 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
12035         PR tree-optimization/86618
12036         * tree-vect-stmts.c (vectorizable_call): Don't take the address
12037         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
12039 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
12041         PR tree-optimization/86636
12042         * json.cc (json::object::set): Fix comment.  Add assertions.
12043         (json::array::append): Move here from json.h.  Add comment and an
12044         assertion.
12045         (json::string::string): Likewise.
12046         * json.h (json::array::append): Move to json.cc.
12047         (json::string::string): Likewise.
12048         * optinfo-emit-json.cc
12049         (optrecord_json_writer::impl_location_to_json): Assert that we
12050         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
12051         wrapper around it.  Expand the location once, rather than three
12052         times.
12053         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
12054         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
12055         wrappers.
12056         (optrecord_json_writer::optinfo_to_json): Likewise, in four
12057         places.  Fix some overlong lines.
12059 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
12061         * config/aarch64/aarch64-simd.md
12062         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
12063         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12064         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12065         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12066         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12067         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12068         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12069         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12070         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12072 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
12074         PR middle-end/86627
12075         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12076         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
12077         and abs_d == d, do the power of two handling if profitable.
12079 2018-07-24  Richard Biener  <rguenther@suse.de>
12081         * match.pd: Add BIT_FIELD_REF canonicalizations.
12083 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12085         PR c/86617
12086         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12088 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12090         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12091         terminated STRING_CST object.
12093 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12095         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12097 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
12099         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12100         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12101         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12102         the elements into a register.
12103         (rs6000_split_v4si_init_di_reg): Delete.
12104         (rs6000_split_v4si_init): Delete.
12105         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12106         (vsx_init_v4si): Rewrite as a define_expand.
12108 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
12110         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12111         zero_extend argument from memory): New.
12113 2018-07-22  Martin Sebor  <msebor@redhat.com>
12115         PR bootstrap/86621
12116         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12117         diagnosing calls with unknown arguments unless -Walloca-larger-than
12118         is restricted to less than PTRDIFF_MAX bytes.
12120 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
12122         * doc/gcov.texi (Invoking Gcov): Editorial changes.
12124 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
12126         * pretty-print.c (text_info::set_location): Remove redundant
12127         "line_table" parameter from call to rich_location::set_range.
12129 2018-07-20  Martin Sebor  <msebor@redhat.com>
12131         PR middle-end/82063
12132         * builtins.c (expand_builtin_alloca): Adjust.
12133         * calls.c (alloc_max_size): Simplify.
12134         * cgraphunit.c (cgraph_node::expand): Adjust.
12135         * common.opt (larger_than_size, warn_frame_larger_than): Remove
12136         variables.
12137         (frame_larger_than_size): Same.
12138         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12139         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12140         Initialize.
12141         * doc/invoke.texi (GCC Command Options): Document option arguments.
12142         Explain byte-size arguments and suffixes.
12143         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12144         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12145         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12146         * doc/options.texi (UInteger): Expand.
12147         (Host_Wide_Int, ByteSize): Document new properties.
12148         * final.c (final_start_function_1): Include sizes in an error message.
12149         * function.c (frame_offset_overflow): Same.
12150         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12151         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12152         Diagnose unbounded alloca calls only for limits of less than
12153         PTRDIFF_MAX.
12154         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
12155         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
12156         for alloca(0).
12157         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
12158         only for limits of less than PTRDIFF_MAX.
12159         * langhooks-def.h (lhd_handle_option): Change function argument
12160         to HOST_WIDE_INT.
12161         * langhooks.c (lhd_handle_option): Same.
12162         * langhooks.h (handle_option): Same.
12163         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12164         ByteSize flags.
12165         (var_type, var_type_struct): Same.
12166         (var_set): Handle ByteSize flag.
12167         * optc-gen.awk: Add comments to output to ease debugging.  Make
12168         use of HOST_WIDE_INT where appropriate.
12169         * opts-gen-save.awk:  Use %lx to format unsigned long.
12170         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12171         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12172         arguments.  Parse bytes-size suffixes.
12173         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12174         (enum_value_to_arg): Same.
12175         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
12176         (handle_option): Adjust.
12177         (generate_option): Change function argument to HOST_WIDE_INT.
12178         (cmdline_handle_error): Adjust.
12179         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12180         (set_option): Change function argument to HOST_WIDE_INT.
12181         (option_enabled): Handle cl_host_wide_int.
12182         (get_option_state): Handle CLVC_SIZE.
12183         (control_warning_option): Same.
12184         * opts.c (common_handle_option): Change function argument to
12185         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
12186         OPT_Wvla_larger_than_.
12187         * opts.h (enum cl_var_type): Add an enumerator.
12188         * stor-layout.c (layout_decl): Print a more meaningful warning.
12189         * toplev.c (output_stack_usage): Adjust.
12191 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
12193         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12194         call to inline_expand_builtin_string_cmp.
12195         (expand_builtin_strcmp): Likewise.
12196         (expand_builtin_strncmp): Likewise.
12197         (inline_string_cmp): Delete the last parameter, change char_type_node
12198         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12199         two operands.
12200         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12201         the inlining expansion on target where the type of the call has same or
12202         narrower precision than unsigned char.
12204 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
12206         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12207         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12208         * common.opt (fsave-optimization-record): New option.
12209         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12210         * doc/invoke.texi (-fsave-optimization-record): New option.
12211         * dumpfile.c: Include "optinfo-emit-json.h".
12212         (struct kv_pair): Move to coretypes.h.
12213         (optgroup_options): Make non-static.
12214         (dump_context::end_scope): Call
12215         optimization_records_maybe_pop_dump_scope.
12216         * dumpfile.h (optgroup_options): New decl.
12217         * json.cc: New file.
12218         * json.h: New file.
12219         * optinfo-emit-json.cc: New file.
12220         * optinfo-emit-json.h: New file.
12221         * optinfo.cc: Include "optinfo-emit-json.h".
12222         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12223         (optinfo_enabled_p): Check optimization_records_enabled_p.
12224         (optinfo_wants_inlining_info_p): Likewise.
12225         * optinfo.h: Update comment.
12226         * profile-count.c (profile_quality_as_string): New function.
12227         * profile-count.h (profile_quality_as_string): New decl.
12228         (profile_count::quality): New accessor.
12229         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12230         and optinfo_emit_json_cc_tests.
12231         * selftest.h (selftest::json_cc_tests): New decl.
12232         (selftest::optinfo_emit_json_cc_tests): New decl.
12233         * toplev.c: Include "optinfo-emit-json.h".
12234         (compile_file): Call optimization_records_finish.
12235         (do_compile): Call optimization_records_start.
12236         * tree-ssa-live.c: Include optinfo.h.
12237         (remove_unused_scope_block_p): Retain inlining information if
12238         optinfo_wants_inlining_info_p returns true.
12240 2018-07-20  Richard Biener  <rguenther@suse.de>
12242         PR debug/86585
12243         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
12244         to cover -flto-partition=none.
12246 2018-07-20  Martin Liska  <mliska@suse.cz>
12248         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
12249         (get_decl_source_range): Remove unused function.
12251 2018-07-20  Richard Biener  <rguenther@suse.de>
12253         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
12254         (struct vn_phi_s): Likewise.
12255         (struct vn_reference_s): Likewise.
12256         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
12257         for searching the slot of an entry known to be in the hash itself.
12258         (vn_phi_hasher::equal): Likewise.
12259         (vn_reference_hasher::equal): Likewise.
12260         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
12261         globals.
12262         (optimistic_info, current_info): Remove, keeping only valid_info.
12263         (vn_reference_lookup_1): Remove fallback lookup.
12264         (vn_reference_lookup_2): Likewise.
12265         (vn_nary_op_lookup_1): Likewise.
12266         (vn_phi_lookup): Likewise.
12267         (vn_nary_build_or_lookup_1): Make sure to not chain the built
12268         hash element.
12269         (vn_reference_insert): Adjust, chain the inserted hash element
12270         at last_inserted_ref.
12271         (vn_reference_insert_pieces): Likewise.
12272         (visit_reference_op_call): Likewise.
12273         (vn_nary_op_insert_into): Chain the inserted hash element at
12274         last_inserted_nary.
12275         (vn_nary_op_insert_pieces): Adjust.
12276         (vn_nary_op_insert): Likewise.
12277         (vn_nary_op_insert_stmt): Likewise.
12278         (vn_phi_insert): Adjust, chain the inserted hash element at
12279         last_inserted_phi.
12280         (process_scc): Remove clearing and copying the optimistic
12281         table.  Instead remove elements inserted during an optimistic
12282         iteration from the single table we maintain.
12283         (init_scc_vn): Adjust.
12284         (free_scc_vn): Likewise.
12285         (sccvn_dom_walker::record_cond): Likewise.
12286         (sccvn_dom_walker::after_dom_children): Likewise.
12288 2018-07-19  Martin Sebor  <msebor@redhat.com>
12290         PR tree-optimization/84047
12291         PR tree-optimization/83776
12292         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
12293         (check_array_bounds): Call it.
12295 2018-07-19  Martin Sebor  <msebor@redhat.com>
12297         * align.h (align_flags): Use member initialization.
12299 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
12301         * Makefile.in (OBJS): Add optinfo.o.
12302         * coretypes.h (class symtab_node): New forward decl.
12303         (struct cgraph_node): New forward decl.
12304         (class varpool_node): New forward decl.
12305         * dump-context.h: New file.
12306         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
12307         "tree-pass.h".
12308         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
12309         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
12310         (set_alt_dump_file): Likewise.
12311         (dump_context::~dump_context): New dtor.
12312         (dump_gimple_stmt): Move implementation to...
12313         (dump_context::dump_gimple_stmt): ...this new member function.
12314         Add the stmt to any pending optinfo, creating one if need be.
12315         (dump_gimple_stmt_loc): Move implementation to...
12316         (dump_context::dump_gimple_stmt_loc): ...this new member function.
12317         Start a new optinfo and add the stmt to it.
12318         (dump_gimple_expr): Move implementation to...
12319         (dump_context::dump_gimple_expr): ...this new member function.
12320         Add the stmt to any pending optinfo, creating one if need be.
12321         (dump_gimple_expr_loc): Move implementation to...
12322         (dump_context::dump_gimple_expr_loc): ...this new member function.
12323         Start a new optinfo and add the stmt to it.
12324         (dump_generic_expr): Move implementation to...
12325         (dump_context::dump_generic_expr): ...this new member function.
12326         Add the tree to any pending optinfo, creating one if need be.
12327         (dump_generic_expr_loc): Move implementation to...
12328         (dump_context::dump_generic_expr_loc): ...this new member
12329         function.  Add the tree to any pending optinfo, creating one if
12330         need be.
12331         (dump_printf): Move implementation to...
12332         (dump_context::dump_printf_va): ...this new member function.  Add
12333         the text to any pending optinfo, creating one if need be.
12334         (dump_printf_loc): Move implementation to...
12335         (dump_context::dump_printf_loc_va): ...this new member function.
12336         Start a new optinfo and add the stmt to it.
12337         (dump_dec): Move implementation to...
12338         (dump_context::dump_dec): ...this new member function.  Add the
12339         value to any pending optinfo, creating one if need be.
12340         (dump_context::dump_symtab_node): New member function.
12341         (dump_context::get_scope_depth): New member function.
12342         (dump_context::begin_scope): New member function.
12343         (dump_context::end_scope): New member function.
12344         (dump_context::ensure_pending_optinfo): New member function.
12345         (dump_context::begin_next_optinfo): New member function.
12346         (dump_context::end_any_optinfo): New member function.
12347         (dump_context::s_current): New global.
12348         (dump_context::s_default): New global.
12349         (dump_scope_depth): Delete global.
12350         (dumpfile_ensure_any_optinfo_are_flushed): New function.
12351         (dump_symtab_node): New function.
12352         (get_dump_scope_depth): Reimplement in terms of dump_context.
12353         (dump_begin_scope): Likewise.
12354         (dump_end_scope): Likewise.
12355         (selftest::temp_dump_context::temp_dump_context): New ctor.
12356         (selftest::temp_dump_context::~temp_dump_context): New dtor.
12357         (selftest::verify_item): New function.
12358         (ASSERT_IS_TEXT): New macro.
12359         (ASSERT_IS_TREE): New macro.
12360         (ASSERT_IS_GIMPLE): New macro.
12361         (selftest::test_capture_of_dump_calls): New test.
12362         (selftest::dumpfile_c_tests): Call it.
12363         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
12364         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
12365         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
12366         descriptive comment.
12367         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
12368         (dump_node, dump_bb): Move these unrelated decls.
12369         (class dump_manager): Add leading comment.
12370         * optinfo.cc: New file.
12371         * optinfo.h: New file.
12373 2018-07-19  Michael Collison  <michael.collison@arm.com>
12374             Richard Henderson <rth@redhat.com>
12376         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
12377         (subti): Handle op1 zero.
12378         (subvti4, usub4ti4): New.
12379         (*sub<GPI>3_compare1_imm): New.
12380         (sub<GPI>3_carryinCV): New.
12381         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
12382         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
12384 2018-07-19  Michael Collison  <michael.collison@arm.com>
12385             Richard Henderson <rth@redhat.com>
12387         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
12388         (addti3): Create simpler code if low part is already known to be 0.
12389         (addvti4, uaddvti4): New.
12390         (*add<GPI>3_compareC_cconly_imm): New.
12391         (*add<GPI>3_compareC_cconly): New.
12392         (*add<GPI>3_compareC_imm): New.
12393         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
12394         handle constants within this pattern..
12395         (*add<GPI>3_compareV_cconly_imm): New.
12396         (*add<GPI>3_compareV_cconly): New.
12397         (*add<GPI>3_compareV_imm): New.
12398         (add<GPI>3_compareV): New.
12399         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
12400         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
12401         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
12402         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
12403         with 'comparison' operator.
12404         (*add<GPI>3_compareV_cconly_imm): Ditto.
12405         (*add<GPI>3_compareV_cconly): Ditto.
12406         (*add<GPI>3_compareV_imm): Ditto.
12407         (add<GPI>3_compareV): Ditto.
12408         (add<mode>3_carryinC): Ditto.
12409         (*add<mode>3_carryinC_zero): Ditto.
12410         (*add<mode>3_carryinC): Ditto.
12411         (add<mode>3_carryinV): Ditto.
12412         (*add<mode>3_carryinV_zero): Ditto.
12413         (*add<mode>3_carryinV): Ditto.
12415 2018-07-19  Michael Collison  <michael.collison@arm.com>
12416             Richard Henderson <rth@redhat.com>
12418         * config/aarch64/aarch64-modes.def (CC_V): New.
12419         * config/aarch64/aarch64-protos.h
12420         (aarch64_addti_scratch_regs): Declare
12421         (aarch64_subvti_scratch_regs): Declare.
12422         (aarch64_expand_subvti): Declare.
12423         (aarch64_gen_unlikely_cbranch): Declare
12424         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
12425         for signed overflow using CC_Vmode.
12426         (aarch64_get_condition_code_1): Handle CC_Vmode.
12427         (aarch64_gen_unlikely_cbranch): New function.
12428         (aarch64_addti_scratch_regs): New function.
12429         (aarch64_subvti_scratch_regs): New function.
12430         (aarch64_expand_subvti): New function.
12432 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12434         * config/aarch64/aarch64-option-extensions.def: New entry for profile
12435         extension.
12436         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
12437         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
12438         extension.
12440 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12442         PR target/83009
12443         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
12444         address check not strict.
12446 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
12448         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
12449         Umq with Umn.
12450         (store_pair_lanes<mode>): Likewise.
12451         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
12452         enum value 'ADDR_QUERY_LDP_STP_N'.
12453         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
12454         (aarch64_print_address_internal): Add declaration.
12455         (aarch64_print_ldpstp_address): Remove.
12456         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
12457         (aarch64_print_operand): Change printing of 'y'.
12458         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
12459         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
12460         'true' rather than '1'.
12461         * config/aarch64/constraints.md (Uml): Likewise.
12462         (Uml): Rename to Umn.
12463         (Umq): Remove.
12465 2018-07-19  Richard Biener  <rguenther@suse.de>
12467         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
12468         a trailing array.
12469         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
12470         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
12471         (vn_reference_hasher): Likewise.
12472         (struct vn_tables_s): Remove obstack and alloc-pool members.
12473         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
12474         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
12475         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
12476         (vn_reference_insert_pieces): Likewise.
12477         (alloc_vn_nary_op_noinit): Adjust.
12478         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
12479         (vn_phi_eq): Adjust.
12480         (shared_lookup_phiargs): Remove.
12481         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
12482         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
12483         (visit_reference_op_call): Likewise.
12484         (copy_nary, copy_phi, copy_reference): Remove.
12485         (process_scc): Rewind the obstack when iterating.  Do not
12486         copy the elements to valid_info but just move them from one
12487         hashtable to the other.
12488         (allocate_vn_table): Adjust.
12489         (free_vn_table): Likewise.
12490         (init_scc_vn): Likewise.
12491         (free_scc_vn): Likewise.
12493 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
12495         PR target/86560
12496         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12497         indirect_return as function type attribute.
12498         (ix86_attribute_table): Change indirect_return to function
12499         type attribute.
12500         * doc/extend.texi: Update indirect_return attribute.
12502 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
12504         * wide-int.h (widest2_int): New.
12505         * gimple-fold.c (arith_overflowed_p): Use it.
12506         * tree.h (widest2_int_cst): New.
12507         * tree-vrp.c (wide_int_binop_overflow): Rename from
12508         vrp_int_const_binop.
12509         Rewrite to work on trees.
12510         (extract_range_from_multiplicative_op_1): Abstract code to...
12511         (wide_int_range_min_max): ...here.
12512         (wide_int_range_cross_product): ...and here.
12513         (extract_range_from_binary_expr_1): Abstract overflow code to...
12514         (wide_int_range_mult_wrapping): ...here.
12515         * tree-vrp.h (wide_int_range_cross_product): New.
12516         (wide_int_range_mult_wrapping): New.
12518 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
12519             Julia Koval  <julia.koval@intel.com>
12521         * config/i386/x86-tune-costs.h (skylake_memcpy,
12522         skylake_memset): Replace rep_prefix with unrolling for size 512.
12524 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
12526         PR middle-end/86544
12527         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12528         comparision with EQ_EXPR in last stmt.
12530 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12532         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12533         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12534         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12535         previously known as "PowerPC AltiVec Built-in Functions".  Move
12536         some material to new subsubsections "PowerPC AltiVec Built-in
12537         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12538         ISA 2.07".
12539         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12540         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12541         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12542         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12544 2018-07-18  Richard Biener  <rguenther@suse.de>
12546         PR tree-optimization/86557
12547         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12548         EXACT_DIV_EXPR.
12550 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
12552         * config/s390/s390.c (s390_function_profiler): Generate CFI.
12554 2018-07-17  Jeff Law  <law@redhat.com>
12556         * config/arm/arm.c (get_label_padding): Update for recent
12557         changes to label_to_alignment.
12559         PR tree-optimization/86010
12560         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12562         * config/mips/mips.c (vr4130_align_insns): Update for recent
12563         changes to label_to_alignment.
12565         * config/frv/frv.c (frv_label_align): Update for recent changes
12566         to label_to_alignment.
12568         * config/nios2/nios2.c (nios2_label_align): Update for recent
12569         changes which dropped ALIGN_LABELS_LOG.
12571 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
12573         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12574         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12576 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
12578         * config/arc/arc.c (arc_label_align): Use align_labels instead of
12579         deprecated align_labels_log.
12581 2018-07-17  Richard Biener  <rguenther@suse.de>
12583         PR lto/86456
12584         * dwarf2out.c (init_sections_and_labels): Always generate
12585         a debug_line_str_section for early LTO debug.
12586         (dwarf2out_finish): Reset debug_line_str_hash output early.
12587         Bump counter for extra dwarf5 .debug_loc labels to not conflict
12588         with fat LTO part.
12589         (dwarf2out_early_finish): Output debug_line_str.
12591 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
12593         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12594         index register on z196 or later.
12596 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
12598         * config/s390/s390.c (s390_default_align): Set default function
12599         alignment to 16.
12600         (s390_override_options_after_change): Call s390_default align.
12601         (s390_option_override_internal): Call s390_default_align.
12602         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12604 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12606         PR middle-end/86542
12607         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12608         to _looptemp_ clauses, other than the first two.
12610 2018-07-17  Martin Liska  <mliska@suse.cz>
12612         * opts.c: Do not enable OPT_falign_* for -Os.
12614 2018-07-17  Martin Liska  <mliska@suse.cz>
12616         * align.h (MAX_CODE_ALIGN): New.
12617         (MAX_CODE_ALIGN_VALUE): New.
12618         * common/config/i386/i386-common.c (ix86_handle_option):
12619         (MAX_CODE_ALIGN): Moved to align.h.
12620         * final.c (MAX_CODE_ALIGN): Likewise.
12621         * opts.c (parse_and_check_align_values):
12622         (MAX_CODE_ALIGN): Likewise.
12623         (MAX_CODE_ALIGN_VALUE): Likewise.
12625 2018-07-17  Martin Liska  <mliska@suse.cz>
12627         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12628         in order to fulfil coding style.
12629         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12630         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12631         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12632         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12633         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12634         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12635         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12636         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12637         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12639 2018-07-17  Martin Liska  <mliska@suse.cz>
12641         * align.h: New file.
12642         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12643         directly.
12644         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12645         align_flags of label_to_alignment.
12646         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12647         align_flags class.
12648         * config/m68k/m68k.c: Do not use removed align_labels_value and
12649         align_loops_value.
12650         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12651         (LOOP_ALIGN): Likewise.
12652         (LABEL_ALIGN): Likewise.
12653         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12654         Remove not used macro.
12655         (rs6000_loop_align): Change return type to align_flags.
12656         (rs6000_loop_align_max_skip): Remove.
12657         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12658         Change return type to align_flags.
12659         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12660         Remove not used macro.
12661         (rs6000_loop_align):  Change return type to align_flags.
12662         (rs6000_loop_align_max_skip): Remove.
12663         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12664         * config/rx/rx-protos.h (rx_align_for_label): Make it
12665         static function.
12666         * config/rx/rx.c (rx_align_for_label): Change return type
12667         to align_flags.
12668         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12669         macro definitions.
12670         into align_flags class.
12671         (LABEL_ALIGN): Likewise.
12672         (LOOP_ALIGN): Likewise.
12673         * config/s390/s390.c (s390_label_align): Use align_flags
12674         class member.
12675         (s390_asm_output_function_label): Likewise.
12676         * config/sh/sh.c (sh_override_options_after_change):
12677         Use align_flags class directly without macros.
12678         (find_barrier): Likewise.
12679         (barrier_align): Likewise.
12680         (sh_loop_align): Likewise.
12681         * config/spu/spu.c (spu_option_override):
12682         Use align_flags_tuple::get_value instead of removed macros.
12683         (spu_sched_init): Likewise.
12684         * config/spu/spu.h (GTY): Likewise.
12685         * config/visium/visium.c (visium_option_override):
12686         Set "8" as default secondary alignment.
12687         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12688         in order to guarantee secondary alignment of 8.
12689         * coretypes.h: Include align.h header file.
12690         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12691         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12692         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12693         * doc/tm.texi.in: Likewise.
12694         * final.c (struct label_alignment): Remove not used structure.
12695         (LABEL_ALIGN): Change type to align_flags.
12696         (LOOP_ALIGN): Likewise.
12697         (JUMP_ALIGN): Likewise.
12698         (default_loop_align_max_skip): Remove.
12699         (default_label_align_max_skip): Likewise.
12700         (default_jump_align_max_skip): Likewise.
12701         (default_label_align_after_barrier_max_skip):
12702         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12703         (LABEL_TO_MAX_SKIP): Remove.
12704         (label_to_alignment): Return align_flags type instead of integer.
12705         (label_to_max_skip): Remove.
12706         (align_fuzz): Use align_flags type.
12707         (compute_alignments): Use align_flags type and use align_flags::max
12708         to combine multiple alignments.
12709         (grow_label_align): Grow vec instead of C array.
12710         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12711         (shorten_branches):  Use align_flags type and use align_flags::max
12712         to combine multiple alignments.
12713         (final_scan_insn_1): Remove usage of secondary alignment that comes
12714         from label alignment, but instead use proper secondary alignment
12715         which is computed in grow_label_align.
12716         * flags.h (struct align_flags_tuple): Move to align.h.
12717         (struct align_flags): Likewise.
12718         (state_align_loops): Rename to align_loops.
12719         (state_align_jumps): Rename to align_jumps.
12720         (state_align_labels): Rename to align_labels.
12721         (state_align_functions): Rename to align_functions.
12722         (align_loops_log): Remove.
12723         (align_jumps_log): Remove.
12724         (align_labels_log): Remove.
12725         (align_functions_log): Remove.
12726         (align_loops_max_skip): Remove.
12727         (align_jumps_max_skip): Remove.
12728         (align_labels_max_skip): Remove.
12729         (align_functions_max_skip): Remove.
12730         (align_loops_value): Remove.
12731         (align_jumps_value): Remove.
12732         (align_labels_value): Remove.
12733         (align_functions_value): Remove.
12734         * output.h (label_to_alignment): Change return type to align_flags.
12735         (label_to_max_skip): Remove.
12736         * target.def: Remove loop_align_max_skip, label_align_max_skip,
12737         jump_align_max_skip macros.
12738         * targhooks.h (default_loop_align_max_skip): Remove.
12739         (default_label_align_max_skip): Likewise.
12740         (default_jump_align_max_skip): Likewise.
12741         (default_label_align_after_barrier_max_skip): Remove.
12742         * toplev.c (read_log_maxskip): Use ::normalize function.
12743         (parse_N_M): Remove not used argument and also call ::normalize.
12744         (parse_alignment_opts): Do not pass unused arguments.
12745         * varasm.c (assemble_start_function): Use directly align_functions
12746         instead of removed macros.
12747         * system.h: Do not poison removed macros.
12749 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
12751         PR middle-end/86539
12752         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12753         and cond temporaries don't have reference type if iterator has
12754         pointer type.  For init use &for_pre_body instead of pre_p if
12755         for_pre_body is non-empty.
12757 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12759         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12760         double-double modes to SFmode directly directly.
12761         (trunc<mode>sf2_fprs): Delete.
12763 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12765         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12766         for conversions between IFmode and the decimal floating point modes.
12767         (init_float128_ieee): Use the correct names for conversions between
12768         KFmode and the decimal floating point modes.
12770 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
12772         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12773         for the conversions between TDmode and IFmode.
12774         (init_float128_ieee): Use more correct names for the conversions
12775         between TDmode and KFmode.
12777 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
12779         PR tree-optimization/86526
12780         * builtins.c (expand_builtin_memcmp): Formatting fixes.
12781         (inline_expand_builtin_string_cmp): Likewise.
12782         (inline_string_cmp): Likewise.  Use c_readstr instead of
12783         builtin_memcpy_read_str.  Add unit_mode temporary.
12785 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12787         PR middle-end/86528
12788         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12789         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12791 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12793         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12794         Alphabetize prototypes of built-in functions, separating out
12795         built-in functions that are listed in this section but should be
12796         described elsewhere.
12798 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
12800         PR target/86511
12801         * expmed.c (emit_store_flag): Do not emit setcc followed by a
12802         conditional move when trapping comparison was split to a
12803         non-trapping one (and vice versa).
12805 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12807         * config/s390/s390.c (s390_function_profiler): Generate nops
12808         instead of profiler call sequences.
12809         * config/s390/s390.opt: Add the new option.
12811 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12813         * config/s390/s390.c (s390_function_profiler): Generate
12814         __mcount_loc section.
12815         * config/s390/s390.opt: Add the new option.
12817 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
12819         * common.opt: Add the new warning.
12820         * config/s390/s390.c (s390_function_profiler): Emit "brasl
12821         %r0,__fentry__" when -mfentry is specified.
12822         (s390_option_override_internal): Disallow -mfentry for 31-bit
12823         CPUs.
12824         * config/s390/s390.opt: Add the new option.
12826 2018-07-16  Richard Biener  <rguenther@suse.de>
12828         PR lto/86523
12829         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12830         for function-local FUNCTION_DECL and RESULT_DECL immediately.
12832 2018-07-16  Martin Liska  <mliska@suse.cz>
12834         PR ipa/86529
12835         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12836         to ::get_create.
12838 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12840         * config/arc/arcHS.md: Update ARCHS scheduling rules.
12842 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
12844         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12845         for ARCHS4x.
12846         * config/arc/arc-cpus.def (hs4x): New cpu.
12847         (hs4xd): Likewise.
12848         * config/arc/arc-tables.opt: Regenerate.
12849         * config/arc/arc.c (arc_sched_issue_rate): New function.
12850         (TARGET_SCHED_ISSUE_RATE): Define.
12851         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12852         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12853         fpu_cvt.
12854         (attr tune): Add ARCHS4x tune values.
12855         (attr tune_dspmpy): Define.
12856         (*tst): Correct instruction type.
12857         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12858         * config/arc/arcHS4x.md: New file.
12859         * config/arc/fpu.md: Update instruction type attributes.
12860         * config/arc/t-multilib: Regenerate.
12862 2018-07-16  Tom de Vries  <tdevries@suse.de>
12864         PR debug/86455
12865         * var-tracking.c (vt_initialize): Fix pre_dec handling.
12867 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
12869         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12870         early clobber.
12872 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
12874         PR tree-optimization/86514
12875         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12876         conversion to a boolean type from a type with greater precision.
12878 2018-07-16  Tom de Vries  <tdevries@suse.de>
12880         * var-tracking.c (vt_initialize): Print adjusted insn slim if
12881         dump_flags request TDF_SLIM.
12883 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
12885         * fold-const.c (int_const_binop_1): Abstract...
12886         (wide_int_binop): ...wide int code here.
12887         (poly_int_binop): ...poly int code here.
12888         Abstract the rest of int_const_binop_1 into int_const_binop.
12889         * fold-const.h (wide_int_binop): New.
12890         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12891         Remove useless PLUS/MINUS_EXPR case.
12892         (zero_nonzero_bits_from_vr): Move wide int code...
12893         (zero_nonzero_bits_from_bounds): ...here.
12894         (extract_range_from_binary_expr_1): Move mask optimization code...
12895         (range_easy_mask_min_max): ...here.
12896         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12897         (range_easy_mask_min_max): New.
12899 2018-07-15  Jeff Law  <law@redhat.com>
12901         PR target/85993
12902         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12903         block.
12905 2018-07-14  Jim Wilson  <jimw@sifive.com>
12907         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12909 2018-07-14  Paul Koning  <ni1d@arrl.net>
12911         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12913 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
12915         * lto-streamer-out.c (copy_function_or_variable): Dump info about
12916         copying section.
12918 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
12919             Steve Munroe  <munroesj52@gmail.com>
12921         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12922         (_mm_andnot_si128): Likewise.
12923         (_mm_or_si128): Likewise.
12924         (_mm_xor_si128): Likewise.
12926 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
12928         PR middle-end/78809
12929         * builtins.c (expand_builtin_memcmp): Inline the calls first
12930         when result_eq is false.
12931         (expand_builtin_strcmp): Inline the calls first.
12932         (expand_builtin_strncmp): Likewise.
12933         (inline_string_cmp): New routine. Expand a string compare
12934         call by using a sequence of char comparison.
12935         (inline_expand_builtin_string_cmp): New routine. Inline expansion
12936         a call to str(n)cmp/memcmp.
12937         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12938         New option.
12939         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12941 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
12943         * config/arm/driver-arm.c: Include arm-native.h.
12944         (host_detect_local_cpu): Use auto-generated data tables.
12945         (vendors, arm_cpu_table): Delete.  Move part information to ...
12946         * config/arm/arm-cpus.in: ... here.
12947         * config/arm/parsecpu.awk (gen_native): New function.
12948         (vendor, part): New CPU fields.
12949         (END): Add support for building the native CPU detection tables.
12950         * config/arm/t-arm (arm-native.h): Add build rule.
12951         (driver-arm.o): Add dependency on arm-native.h.
12953 2018-07-13  Richard Biener  <rguenther@suse.de>
12955         PR middle-end/85974
12956         * match.pd (addr1 - addr2): Allow either of the operand to
12957         have a conversion.
12959 2018-07-13  Tom de Vries  <tdevries@suse.de>
12961         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12962         in remap_ssa_name.
12964 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
12966         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12967         arrays instead of numbered variables.
12969 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
12971         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12972         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12974 2018-07-13  Richard Biener  <rguenther@suse.de>
12976         PR debug/86452
12977         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12978         instead of get_context_die.
12980 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
12981             Richard Biener  <rguenther@suse.de>
12983         PR middle-end/86489
12984         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12985         that the loop latch destination where phi is defined.
12987 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
12989         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12990         (riscv_expand_epilogue): Add assertion to check interrupt mode.
12991         (riscv_set_current_function): Extract getting interrupt type to new
12992         function.
12993         (riscv_get_interrupt_type): New function.
12994         (riscv_merge_decl_attributes): New function, checking interrupt type is
12995         same.
12996         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12998 2018-07-12  Paul Koning  <ni1d@arrl.net>
13000         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
13001         directive.
13003 2018-07-12  Paul Koning  <ni1d@arrl.net>
13005         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
13006         zero reference, add doloop_end instead.
13007         * doc/md.texi (decrement_and_branch_until_zero): Remove.
13008         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
13009         detail for doloop_end.
13011 2018-07-12  Martin Sebor  <msebor@redhat.com>
13013         PR c/86453
13014         * attribs.c (decl_attributes): Reject conflicting attributes before
13015         calling attribute handlers.
13017 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
13019         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
13020          parameter.
13021         (gcc::dump_manager::get_dump_file_name): likewise.
13022         (dump_begin): Likewise.
13023         * dumpfile.h (dump_begin): Update prototype.
13024         (gcc::dump_manager::get_dump_file_name,
13025         gcc::dump_manager::get_dump_file_name): Update prototype.
13027 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13029         * internal-fn.h (vectorizable_internal_fn_p): New function.
13030         * tree-vect-slp.c (compatible_calls_p): Likewise.
13031         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
13032         to internal functions.
13033         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
13035 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13037         * fold-const.h (inverse_conditions_p): Declare.
13038         * fold-const.c (inverse_conditions_p): New function.
13039         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
13040         that test the inverse condition of a conditional internal function.
13041         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
13042         * internal-fn.c (internal_fn_mask_index): Handle conditional
13043         internal functions.
13044         (vectorized_internal_fn_supported_p): New function.
13045         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
13046         (any_pred_load_store): Replace with...
13047         (need_to_predicate): ...this new variable.
13048         (redundant_ssa_names): New variable.
13049         (ifcvt_can_use_mask_load_store): Move initial checks to...
13050         (ifcvt_can_predicate): ...this new function.  Handle tree codes
13051         for which a conditional internal function exists.
13052         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
13053         instead of ifcvt_can_use_mask_load_store.  Update after variable
13054         name change.
13055         (predicate_load_or_store): New function, split out from
13056         predicate_mem_writes.
13057         (check_redundant_cond_expr): New function.
13058         (value_available_p): Likewise.
13059         (predicate_rhs_code): Likewise.
13060         (predicate_mem_writes): Rename to...
13061         (predicate_statements): ...this.  Use predicate_load_or_store
13062         and predicate_rhs_code.
13063         (combine_blocks, tree_if_conversion): Update after above name changes.
13064         (ifcvt_local_dce): Handle redundant_ssa_names.
13065         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13066         general conditional functions.
13067         * tree-vect-stmts.c (vectorizable_call): Likewise.
13069 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13070             Alan Hayward  <alan.hayward@arm.com>
13071             David Sherwood  <david.sherwood@arm.com>
13073         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13074         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13075         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13076         plus and minus and convert them into IFN_COND_FMA-based sequences.
13077         (convert_mult_to_fma): Handle conditional plus and minus.
13079 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13081         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13082         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13083         (cond_fnms_optab): New optabs.
13084         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13085         internal functions.
13086         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13087         * internal-fn.h (get_conditional_internal_fn): Declare.
13088         (get_unconditional_internal_fn): Likewise.
13089         * internal-fn.c (cond_ternary_direct): New macro.
13090         (expand_cond_ternary_optab_fn): Likewise.
13091         (direct_cond_ternary_optab_supported_p): Likewise.
13092         (FOR_EACH_COND_FN_PAIR): Likewise.
13093         (get_conditional_internal_fn): New function.
13094         (get_unconditional_internal_fn): Likewise.
13095         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13096         (gimple_match_op::gimple_match_op): Add a new overload for 5
13097         operands.
13098         (gimple_match_op::set_op): Likewise.
13099         (gimple_resimplify5): Declare.
13100         * genmatch.c (decision_tree::gen): Generate simplifications for
13101         5 operands.
13102         * gimple-match-head.c (gimple_simplify): Define an overload for
13103         5 operands.  Handle calls with 5 arguments in the top-level overload.
13104         (convert_conditional_op): Handle conversions from unconditional
13105         internal functions to conditional ones.
13106         (gimple_resimplify5): New function.
13107         (build_call_internal): Pass a fifth operand.
13108         (maybe_push_res_to_seq): Likewise.
13109         (try_conditional_simplification): Try converting conditional
13110         internal functions to unconditional internal functions.
13111         Handle 3-operand unconditional forms.
13112         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13113         Define ternary equivalents of the current rules for binary conditional
13114         internal functions.
13115         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13116         ternary operations.
13117         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13118         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13119         (optab): Handle them.
13120         (SVE_COND_FP_TERNARY): New int iterator.
13121         (sve_fmla_op, sve_fmad_op): New int attributes.
13122         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13123         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13124         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13126 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13128         * target.def (preferred_else_value): New target hook.
13129         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13130         * doc/tm.texi: Regenerate.
13131         * targhooks.h (default_preferred_else_value): Declare.
13132         * targhooks.c (default_preferred_else_value): New function.
13133         * internal-fn.h (conditional_internal_fn_code): Declare.
13134         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13135         (get_conditional_internal_fn): Use it.
13136         (conditional_internal_fn_code): New function.
13137         * gimple-match.h (gimple_match_cond): New struct.
13138         (gimple_match_op): Add a cond member function.
13139         (gimple_match_op::gimple_match_op): Update all forms to take a
13140         gimple_match_cond.
13141         * genmatch.c (expr::gen_transform): Use the same condition as res_op
13142         for the suboperation, but don't specify a particular else_value.
13143         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13144         (visit_nary_op, visit_reference_op_load): Pass
13145         gimple_match_cond::UNCOND to the gimple_match_op constructor.
13146         * gimple-match-head.c: Include tree-eh.h
13147         (convert_conditional_op): New function.
13148         (maybe_resimplify_conditional_op): Likewise.
13149         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13150         (gimple_resimplify2): Likewise.
13151         (gimple_resimplify3): Likewise.
13152         (gimple_resimplify4): Likewise.
13153         (maybe_push_res_to_seq): Return null for conditional operations.
13154         (try_conditional_simplification): New function.
13155         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
13156         constructor.
13157         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13158         IFN_COND_* call.
13159         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13160         function.
13161         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13163 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
13165         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13166         DECL_FCONTEXT
13167         (hash_tree): Do not hash DECL_FCONTEXT
13168         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13169         Do not stream DECL_FCONTEXT.
13170         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13171         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13173 2018-07-12  Richard Biener  <rguenther@suse.de>
13175         PR debug/86462
13176         * dwarf2out.c (gen_block_die): Only output blocks when they have
13177         at least one !DECL_IGNORED_P variable.
13179 2018-07-12  Richard Biener  <rguenther@suse.de>
13181         PR target/84829
13182         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13183         Remove -mieee-fp handling.
13185 2018-07-12  Richard Biener  <rguenther@suse.de>
13187         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13188         left-over from last patch.
13190 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
13192         PR tree-optimization/86492
13193         * gimple-ssa-store-merging.c
13194         (imm_store_chain_info::coalesce_immediate_stores): Call
13195         check_no_overlap even for the merge_overlapping case.  Formatting fix.
13197 2018-07-12  Richard Biener  <rguenther@suse.de>
13199         PR middle-end/86479
13200         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13201         move possibly trapping operations into the conditional.
13203 2018-07-12  Richard Biener  <rguenther@suse.de>
13205         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13206         (vn_lookup_simplify_result): Remove recursion limit applied
13207         here.
13208         (vn_nary_build_or_lookup_1): Adjust.
13209         (try_to_simplify): Likewise.
13210         * gimple-match-head.c (gimple_resimplify1): Instead apply one
13211         here.
13212         (gimple_resimplify2): Likewise.
13213         (gimple_resimplify3): Likewise.
13214         (gimple_resimplify4): Likewise.
13216 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
13218         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13219         Use __mmask64 type instead of __mmask8 for __M argument.
13220         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13221         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13222         __U argument.
13223         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13224         __mmask16 for __M argument.
13225         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13226         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13227         to __mmask16 instead of __mmask8.
13228         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13229         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13230         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13231         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13232         instead of __mmask16 for __U argument.
13233         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13234         __mmask16 instead of __mmask8 for __U argument.
13235         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13236         __U argument.
13237         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
13238         __mmask16.
13239         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
13240         argument.
13241         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
13242         __U argument.
13243         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
13244         __mmask16.
13245         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
13246         of __mmask16.
13247         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
13248         __U argument.
13249         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
13250         __U argument.
13251         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
13252         __U argument.
13253         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
13254         __U argument.
13255         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
13256         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
13257         return type as well as __M argument type and all casts from __mmask8
13258         to __mmask32.
13259         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
13260         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
13261         return type as well as __M argument type and all casts from __mmask8
13262         to __mmask16.
13263         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
13264         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
13265         return type as well as __M argument type and all casts from __mmask8
13266         to __mmask32.
13267         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
13268         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
13269         return type as well as __M argument type and all casts from __mmask8
13270         to __mmask16.
13271         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
13272         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
13273         __mmask16.
13275 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
13277         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
13278         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
13279         for __U argument.
13281 2018-07-11  Paul Koning  <ni1d@arrl.net>
13283         * doc/md.texi (define_subst): Document how multiple occurrences of
13284         the same argument in the replacement pattern are handled.
13286 2018-07-11  Paul Koning  <ni1d@arrl.net>
13288         * doc/extend.texi (Common Variable Attributes): Move "mode" into
13289         alphabetical order.
13290         (Common Type Attributes): Add "mode" attribute.
13292 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
13294         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
13295         stream DECL_ORIGINAL_TYPE.
13296         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
13297         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
13298         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
13299         Do not walk original type.
13300         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
13301         external decls.
13302         (write_ts_decl_non_common_tree_pointers): Do not stream
13303         DECL_ORIGINAL_TYPE
13304         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
13305         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
13307 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
13309         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
13310         thread twice from the same starting edge.
13312 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
13314         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
13315         * gimple.c (gimple_call_nonnull_result_p): ...here...
13316         (gimple_call_nonnull_arg): ...and here.
13317         * gimple.h (gimple_call_nonnull_result_p): New.
13318         (gimple_call_nonnull_arg): New.
13320 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
13322         * config/arm/arm-cpus.in: Move information from fpu field of each
13323         cpu definition to the isa field.
13324         * config/arm/parsecpu.awk (fpu): Delete match rule.
13325         (gen_comm_data): Don't add bits from the CPU's FPU entry.
13327 2018-07-11  Richard Biener  <rguenther@suse.de>
13329         PR debug/86457
13330         * dwarf2out.c (init_sections_and_labels): Use
13331         output_asm_line_debug_info consistently.
13332         (dwarf2out_early_finish): Likewise.
13333         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
13334         type units.
13336 2018-07-11  Richard Biener  <rguenther@suse.de>
13338         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
13339         Rework father_bb setting in a way to avoid propagating constants
13340         multiple times on a loop body.
13342 2018-07-10  Mark Wielaard  <mark@klomp.org>
13344         PR debug/86459
13345         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
13347 2018-07-10  Richard Biener  <rguenther@suse.de>
13349         * hash-map.h (hash_map::iterator::operator*): Return
13350         references to key and value.
13352 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
13354         PR c++/86443
13355         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
13356         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
13357         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
13358         (gimplify_omp_for): For composite loops, move outer
13359         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
13360         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
13361         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
13362         TREE_LIST for both the original class iterator and the "last" helper
13363         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
13364         loop, remember has_decl_expr from outer composite loops for the
13365         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
13367 2018-07-09  Martin Sebor  <msebor@redhat.com>
13369         PR middle-end/77357
13370         PR middle-end/86428
13371         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
13372         accessing implicitly initialized array elements.
13373         * expr.c (string_constant): Handle string initializers of
13374         character arrays within aggregates.
13375         * gimple-fold.c (fold_array_ctor_reference): Add argument.
13376         Store element offset.  As a special case, handle zero size.
13377         (fold_nonarray_ctor_reference): Same.
13378         (fold_ctor_reference): Add argument.  Store subobject offset.
13379         * gimple-fold.h (fold_ctor_reference): Add argument.
13381 2018-07-09  Paul Koning  <ni1d@arrl.net>
13383         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
13384         (pdp11_insn_cost): New function.
13385         (pdp11_md_asm_adjust): New function.
13386         (TARGET_INVALID_WITHIN_DOLOOP): Define.
13387         (pdp11_rtx_costs): Update to match machine better.
13388         (output_addr_const_pdp11): Correct format mismatch warnings.
13389         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
13390         * config/pdp11/pdp11.md: General change to add base_cost and/or
13391         length attributes for use by new pdp11_insn_cost function.
13392         (MIN_BRANCH): Correct definition.
13393         (MIN_SOB): Ditto.
13394         (doloop_end): Use standard pattern name for looping pattern.
13395         (doloop_end_nocc): New.
13396         (movsf): Add another constraint alternative.
13397         (zero_extendqihi2): Add constraint alternatives for not in place
13398         extend.
13399         (zero_extendhisi2): Remove.
13400         (shift patterns): Add CC handling variants.
13401         (bswaphi2): New.
13402         (bswapsi2): New.
13403         (rothi3): New.
13404         (define_peephole2): New peephole to recognize mov that sets CC for
13405         subsequent test.
13407 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13409         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
13410         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
13411         wi::add.
13413 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
13415         PR c/86420
13416         * real.c (real_nextafter): Return true if result is denormal.
13418 2018-07-09  Martin Liska  <mliska@suse.cz>
13420         * common.opt: Add back wrongly removed attribute.
13422 2018-07-09  Richard Biener  <rguenther@suse.de>
13424         PR debug/86413
13425         * dwarf2out.c (gen_block_die): For an early generated DIE
13426         always output high/low PC attributes.
13428 2018-07-09  Tom de Vries  <tdevries@suse.de>
13430         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
13431         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
13432         onto VAR_DECL with abstract origin.
13434 2018-07-07  Jim Wilson  <jimw@sifive.com>
13436         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
13438 2018-07-07  Tom de Vries  <tdevries@suse.de>
13440         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
13442 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
13444         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
13445         overflow_type.
13446         (combine_bound): Use wide-int overflow calculation instead of
13447         rolling our own.
13448         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
13449         overflow_type.
13450         * fold-const.c (int_const_binop_2): Same.
13451         (extract_muldiv_1): Same.
13452         (fold_div_compare): Same.
13453         (fold_abs_const): Same.
13454         * match.pd: Same.
13455         * poly-int.h (add): Same.
13456         (sub): Same.
13457         (neg): Same.
13458         (mul): Same.
13459         * predict.c (predict_iv_comparison): Same.
13460         * profile-count.c (slow_safe_scale_64bit): Same.
13461         * simplify-rtx.c (simplify_const_binary_operation): Same.
13462         * tree-chrec.c (tree_fold_binomial): Same.
13463         * tree-data-ref.c (split_constant_offset_1): Same.
13464         * tree-if-conv.c (idx_within_array_bound): Same.
13465         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
13466         * tree-ssa-phiopt.c (minmax_replacement): Same.
13467         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
13468         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
13469         * vr-values.c (vr_values::adjust_range_with_scev): Same.
13470         * wide-int.cc (wi::add_large): Same.
13471         (wi::mul_internal): Same.
13472         (wi::sub_large): Same.
13473         (wi::divmod_internal): Same.
13474         * wide-int.h: Change overflow type to overflow_type for neg, add,
13475         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
13476         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
13477         mul_internal, divmod_internal.
13478         (overflow_type): New enum.
13479         (accumulate_overflow): New.
13481 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
13483         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
13484         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
13486 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
13488         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
13489         argument is checked for zero before entering loop, avoid checking again.
13491 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
13493         * gimplify.h (generic_expr_could_trap_p): Set as global function.
13494         * gimplify.h (generic_expr_could_trap_p): Likwise.
13495         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13497 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
13499         PR tree-optimization/86401
13500         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13501         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13502         (fold_bit_and_mask): ... here.  New helper function for match.pd.
13503         * fold-const.h (fold_bit_and_mask): Declare.
13504         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13506 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
13508         PR target/86324
13509         * target.def (translate_mode_attribute): New hook.
13510         * targhooks.h (default_translate_mode_attribute): Declare.
13511         * targhooks.c (default_translate_mode_attribute): New function.
13512         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13513         * doc/tm.texi: Regenerate.
13514         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13515         (rs6000_translate_mode_attribute): New function.
13517 2018-07-06  Paul Koning  <ni1d@arrl.net>
13519         * doc/md.texi (define_split): Document DONE and FAIL.
13520         (define_peephole2): Ditto.
13522 2018-07-05  Jeff Law  <law@redhat.com>
13524         PR tree-optimization/86010
13525         * tree-ssa-dse.c (compute_trims): More aggressively trim at
13526         both the head and tail of mem* and str* calls.
13528 2018-07-05  Jim Wilson  <jimw@sifive.com>
13530         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13532 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
13534         * config/aarch64/aarch64-simd.md: correct flags text for
13535         MIN_EXPR replacement.
13537 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
13539         * configure: Regenerated.
13541 2018-07-05  Carl Love  <cel@us.ibm.com>
13543         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13544         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13545         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13546         VSX_BUILTIN_DOUBLEL_V4SF.
13548 2018-07-05  Martin Sebor  <msebor@redhat.com>
13550         PR c++/86400
13551         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13552         than its domain to compute its the upper bound of a char array.
13554 2018-07-05  Nathan Sidwell  <nathan@acm.org>
13556         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13557         * doc/cpp.texi: Update comment.
13558         * doc/tm.texi: Rebuilt.
13559         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13560         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13561         * doc/extend.texi (Backwards Compatibility): Clarify it is system
13562         headers affected by extern "C".
13563         * system.h: Poison NO_IMPLICIT_EXTERN_C.
13564         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13565         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13566         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13567         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13568         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13569         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13570         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13571         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13572         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13573         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13574         config/sparc/sp64-elf.h, config/spu/spu.h,
13575         config/stormy16/stormy16.h, config/v850/v850.h,
13576         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13577         define NO_IMPLICIT_EXTERN_C.
13578         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13580 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13582         PR target/84711
13583         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13584         instead of GET_MODE_SIZE when comparing Units.
13586 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13588         PR target/84711
13589         * rtlanal.c (set_noop_p): Constrain on mode change,
13590         include hard-reg-set.h
13592 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
13594         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13596 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
13598         Revert
13599         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
13601         PR sanitizer/84250
13602         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13603         libasan.
13604         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13606 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
13608         PR sanitizer/84250
13609         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13610         libasan.
13611         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13613 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
13615         PR middle-end/86380
13616         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13618 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
13620         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13621         neg_*_op* variables.
13623 2018-07-04  Martin Liska  <mliska@suse.cz>
13625         * tree-switch-conversion.c: Define
13626         max_ratio_for_speed and max_ratio_for_size constants.
13628 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13629             Martin Liska  <mliska@suse.cz>
13631         PR middle-end/66240
13632         PR target/45996
13633         PR c/84100
13634         * common.opt: Rename align options with 'str_' prefix.
13635         * common/config/i386/i386-common.c (set_malign_value): New
13636         function.
13637         (ix86_handle_option): Use it to set -falign-* options/
13638         * config/aarch64/aarch64-protos.h (struct tune_params): Change
13639         type from int to string.
13640         * config/aarch64/aarch64.c: Update default values from int
13641         to string.
13642         * config/alpha/alpha.c (alpha_override_options_after_change):
13643         Likewise.
13644         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13645         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13646         max skip conditionally.
13647         * config/i386/freebsd.h (SUBALIGN_LOG): New.
13648         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13649         max skip conditionally.
13650         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13651         max skip conditionally.
13652         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13653         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13654         max skip conditionally.
13655         * config/i386/i386.c (struct ptt): Change type from int to
13656         string.
13657         (ix86_default_align): Set default values.
13658         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13659         max skip conditionally.
13660         * config/i386/iamcu.h (SUBALIGN_LOG): New.
13661         (ASM_OUTPUT_MAX_SKIP_ALIGN):
13662         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13663         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13664         max skip conditionally.
13665         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13666         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13667         * config/i386/x86-64.h (SUBALIGN_LOG): New.
13668         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13669         max skip conditionally.
13670         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13671         * config/ia64/ia64.c (ia64_option_override): Set default values
13672         for alignment options.
13673         * config/m68k/m68k.c: Handle new str_align_* options.
13674         * config/mips/mips.c (mips_set_compression_mode): Change
13675         type of constants.
13676         (mips_option_override): Set default values for options.
13677         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13678         Likewise.
13679         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13680         Likewise.
13681         * config/rx/rx.c (rx_option_override): Likewise.
13682         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13683         (LABEL_ALIGN): Use align_labels_log.
13684         (LOOP_ALIGN): Use align_loops_align.
13685         * config/s390/s390.c (s390_asm_output_function_label): Use new
13686         macros.
13687         * config/sh/sh.c (sh_override_options_after_change):
13688         Change type of constants.
13689         * config/spu/spu.c (spu_sched_init): Likewise.
13690         * config/sparc/sparc.c (sparc_option_override): Set default
13691         values for options.
13692         * config/visium/visium.c (visium_option_override): Likewise.
13693         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13694         emit p2align format with last argument if it's not needed.
13695         * doc/invoke.texi: Document extended format of -falign-*.
13696         * final.c: Use align_labels alignment.
13697         * flags.h (struct target_flag_state): Change type to use
13698         align_flags.
13699         (struct align_flags_tuple): New.
13700         (struct align_flags): Likewise.
13701         (align_loops_log): Redefine macro to use new types.
13702         (align_loops_max_skip): Redefine macro to use new types.
13703         (align_jumps_log): Redefine macro to use new types.
13704         (align_jumps_max_skip): Redefine macro to use new types.
13705         (align_labels_log): Redefine macro to use new types.
13706         (align_labels_max_skip): Redefine macro to use new types.
13707         (align_functions_log): Redefine macro to use new types.
13708         (align_loops): Redefine macro to use new types.
13709         (align_jumps): Redefine macro to use new types.
13710         (align_labels): Redefine macro to use new types.
13711         (align_functions): Redefine macro to use new types.
13712         (align_functions_max_skip): Redefine macro to use new types.
13713         (align_loops_value): New macro.
13714         (align_jumps_value): New macro.
13715         (align_labels_value): New macro.
13716         (align_functions_value): New macro.
13717         * function.c (invoke_set_current_function_hook): Propagate
13718         alignment values from flags to global variables default in
13719         topleev.h.
13720         * ipa-icf.c (sem_function::equals_wpa): Use
13721         cl_optimization_option_eq instead of memcmp.
13722         * lto-streamer.h (cl_optimization_stream_out): Support streaming
13723         of string types.
13724         (cl_optimization_stream_in): Likewise.
13725         * optc-save-gen.awk: Support strings in cl_optimization.
13726         * opth-gen.awk: Likewise.
13727         * opts.c (finish_options): Remove error checking of invalid
13728         value ranges.
13729         (MAX_CODE_ALIGN): Remove.
13730         (MAX_CODE_ALIGN_VALUE): Likewise.
13731         (parse_and_check_align_values): New function.
13732         (check_alignment_argument): Likewise.
13733         (common_handle_option): Use check_alignment_argument.
13734         * opts.h (parse_and_check_align_values): Declare.
13735         * toplev.c (init_alignments): Remove.
13736         (read_log_maxskip): New.
13737         (parse_N_M): Likewise.
13738         (parse_alignment_opts): Likewise.
13739         (backend_init_target): Remove usage of init_alignments.
13740         * toplev.h (parse_alignment_opts): Declare.
13741         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13742         argument.
13743         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13744         * tree.c (cl_option_hasher::equal): New.
13745         * varasm.c: Use new global macros.
13747 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
13749         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13750         Use a simpler align directive also if MAXSKIP = ALIGN-1.
13751         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13752         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13753         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13754         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13755         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13756         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13757         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13758         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13759         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13760         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13761         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13763 2018-07-04  Martin Liska  <mliska@suse.cz>
13764             Jonathan Wakely  <jwakely@redhat.com>
13766         * coverage.c: Use correct type.
13767         * doc/invoke.texi: Language correction.
13769 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
13771         PR target/85620
13772         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13773         ENDBRANCH for non-tail call which may return via indirect branch.
13774         * doc/extend.texi: Document indirect_return attribute.
13776 2018-07-03  Martin Sebor  <msebor@redhat.com>
13778         PR tree-optimization/86274
13779         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13780         precondition.
13781         (format_floating): Correct handling of infinities and NaNs.
13783 2018-07-03  Martin Sebor  <msebor@redhat.com>
13785         * print-tree.c (print_real_cst): New function.
13786         (print_node_brief): Call it.
13787         (print_node): Ditto.
13789 2018-07-03  Jeff Law  <law@redhat.com>
13791         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13792         into a single pattern.
13794         * config/h8300/h8300.md (ors code_iterator): New.
13795         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13796         a single pattern and single splitter.
13797         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13798         (iorqi3_1, xorqi3_1): Likewise.
13799         (iorqi3, xorqi3 expanders): Similarly.
13801         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13802         (movmd_internal) into a single pattern using the P mode iterator.
13803         (movmd splitters): Similarly.
13804         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13805         (movsd splitters): Similarly.
13807         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13808         ADDB, ADDW and ADDL into a single ADD attribute which selects the
13809         right table based on the size of the operand.
13810         * config/h8300/h8300.md (length_table): Corresponding changes. All
13811         references to "addb", "addw" and "addl" changed to "add".
13812         (btst patterns): Merge two variants into a single pattern.
13813         (tstqi, tsthi): Likewise.
13814         (addhi3_incdec, addsi3_incdec): Likewise.
13815         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13816         (mulhi3, mulsi3): Likewise.
13817         (udivhi3, udivsi3): Likewise.
13818         (divhi3, divsi3): Likewise.
13819         (andorqi3, andorhi3, andorsi3): Likewise.
13821 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
13823         PR target/85694
13824         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13825         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13827 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13829         PR tree-optimization/85694
13830         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13831         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13832         UNSPEC_URHADD.
13833         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13834         (<u>avg<mode>3_ceil): New patterns.
13836 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
13838         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13839         scan-tree-dump directive.
13840         * gcc.dg/vect/slp-perm-2.c: Likewise.
13841         * gcc.dg/vect/slp-perm-3.c: Likewise.
13842         * gcc.dg/vect/slp-perm-5.c: Likewise.
13843         * gcc.dg/vect/slp-perm-6.c: Likewise.
13844         * gcc.dg/vect/slp-perm-7.c: Likewise.
13845         * gcc.dg/vect/slp-perm-8.c: Likewise.
13847 2018-07-03  Marek Polacek  <polacek@redhat.com>
13849         PR middle-end/86202
13850         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13852 2018-07-03  Richard Biener  <rguenther@suse.de>
13854         PR ipa/86389
13855         * tree-ssa-structalias.c (find_func_clobbers): Properly
13856         handle indirect calls.
13858 2018-07-03  Jeff Law  <law@redhat.com>
13860         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13861         (shifts): New code iterator.
13862         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13863         expander.  Fix HImode handling on H8/SX.
13864         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13865         (subqi3, subhi3, subsi3 expanders): Likewise.
13866         (andqi3, andhi3, andsi3 expanders): Likewise.
13867         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13868         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13869         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13870         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13871         (zero_extendqihi2, zero_extendqisi2): Likewise.
13872         (extendqihi2, extendqisi2): Likewise.
13873         (rotlqi3, rotlhi3, rotlsi3): Likewise.
13874         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13875         (rotlqi3_1, rotlhi3_1): Likewise.
13876         (logicalhi3_sn, logicalsi3_sn): Likewise.
13877         (logicalhi3, logicalsi3): Likewise.
13879 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13881         * tree-vect-patterns.c (vect_recog_rotate_pattern)
13882         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13883         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13884         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13885         type to append_pattern_def_seq instead of creating a stmt_vec_info
13886         directly.
13887         (build_mask_conversion): Likewise.  Remove vinfo argument.
13888         (vect_add_conversion_to_patterm): Likewise, renaming to...
13889         (vect_add_conversion_to_pattern): ...this.
13890         (vect_recog_mask_conversion_pattern): Update call to
13891         build_mask_conversion.  Pass the vector type to
13892         append_pattern_def_seq here too.
13893         (vect_recog_gather_scatter_pattern): Update call to
13894         vect_add_conversion_to_pattern.
13896 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13898         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13899         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13900         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13901         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13902         STMT_VINFO_PATTERN_DEF_SEQ to null here.
13903         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13904         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13905         append_pattern_def_seq instead of new_pattern_def_seq.
13906         (vect_recog_divmod_pattern): Do both of the above.
13907         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13908         is null.
13910 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13912         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13913         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13914         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13915         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13916         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13917         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13918         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13919         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13920         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13921         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13922         parameter with a single stmt_vec_info.
13923         (vect_recog_func_ptr): Likewise.
13924         (vect_recog_gather_scatter_pattern): Likewise, folding in...
13925         (vect_try_gather_scatter_pattern): ...this.
13926         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13927         the stmt_vec_info of the statement to be matched.  Don't clear
13928         STMT_VINFO_RELATED_STMT.
13929         (vect_pattern_recog): Update call accordingly.
13931 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13933         PR tree-optimization/85694
13934         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13935         (uavgM3_ceil): Document new optabs.
13936         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13937         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13938         functions.
13939         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13940         (savg_ceil_optab): New optabs.
13941         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13942         (vect_vect_recog_func_ptrs): Add it.
13943         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13944         constant directly from the associated lhs.
13946 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13948         * tree-vect-patterns.c (vect_split_statement): New function.
13949         (vect_convert_input): Use it to try to split an existing cast.
13951 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13953         * poly-int.h (print_hex): New function.
13954         * dumpfile.h (dump_dec, dump_hex): Declare.
13955         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13956         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13957         min_input_precision, operation_precision and operation_sign.
13958         * tree-vect-patterns.c (vect_get_range_info): New function.
13959         (vect_same_loop_or_bb_p, vect_single_imm_use)
13960         (vect_operation_fits_smaller_type): Delete.
13961         (vect_look_through_possible_promotion): Add an optional
13962         single_use_p parameter.
13963         (vect_recog_over_widening_pattern): Rewrite to use new
13964         stmt_vec_info infomration.  Handle one operation at a time.
13965         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13966         (vect_truncatable_operation_p, vect_set_operation_type)
13967         (vect_set_min_input_precision): New functions.
13968         (vect_determine_min_output_precision_1): Likewise.
13969         (vect_determine_min_output_precision): Likewise.
13970         (vect_determine_precisions_from_range): Likewise.
13971         (vect_determine_precisions_from_users): Likewise.
13972         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13973         (vect_vect_recog_func_ptrs): Put over_widening first.
13974         Add cast_forwprop.
13975         (vect_pattern_recog): Call vect_determine_precisions.
13977 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
13979         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13980         statements that have been replaced by further pattern statements.
13981         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13983 2018-07-03  Richard Biener  <rguenther@suse.de>
13985         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13986         always set *dt.  Dump vectype in vectype overload.
13987         * dumpfile.h (dump_gimple_expr): New function.
13988         (dump_gimple_expr_loc): Likewise.
13989         * dumpfile.c (dump_gimple_expr): New function.
13990         (dump_gimple_expr_loc): Likewise.
13992 2018-07-02  Jeff Law  <law@redhat.com>
13994         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13995         the H8/300, H8/300H and H8/S variants into a single pattern.
13996         (movhi_h8300, movqi_h8300hs): Similarly.
13997         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13998         (QHI mode iterator): New.
14000         * config/h8300/h8300.md: Remove trailing whitespace.
14002 2018-07-02  Jim Wilson  <jimw@sifive.com>
14004         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
14005         instead of emit_insn for interrupt returns.
14006         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
14007         (riscv_sret, riscv_uret): Likewise.
14009 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
14011         * pretty-print.c (selftest::test_pp_format): Move save and restore
14012         of quotes to class auto_fix_quotes, and add an instance.
14013         * selftest.c: Include "intl.h".
14014         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
14015         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
14016         * selftest.h (selftest::auto_fix_quotes): New class.
14018 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
14020         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
14021         (aarch64_sve_prepare_conditional_op): Remove.
14022         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
14023         Allow aarch64_simd_reg_or_zero as select operand; remove
14024         the aarch64_sve_prepare_conditional_op call.
14025         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
14026         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14027         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
14028         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
14029         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
14030         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
14031         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
14032         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
14033         and a splitters to match all of the *_any patterns.
14034         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
14036         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
14037         (SVE_COND_FP_BINARY_REV): Remove.
14038         (sve_int_op_rev, sve_fp_op_rev): New.
14039         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
14040         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
14041         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
14042         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
14043         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
14044         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
14045         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
14046         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
14047         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
14049         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
14050         Remove match_dup 1 from the inner unspec.
14051         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14053         * config/aarch64/aarch64.md (movprfx): New attr.
14054         (length): Default movprfx to 8.
14055         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
14056         (*madd<SVE_I>, *msub<SVE_I): Likewise.
14057         (*<su>mul<SVE_I>3_highpart): Likewise.
14058         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
14059         (*v<ASHIFT><SVE_I>3): Likewise.
14060         (*<su><MAXMIN><SVE_I>3): Likewise.
14061         (*<su><MAXMIN><SVE_F>3): Likewise.
14062         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
14063         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14064         (*div<SVE_F>4): Likewise.
14066 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
14068         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14069         in dump string.
14071 2018-07-02  Richard Biener  <rguenther@suse.de>
14073         PR tree-optimization/86363
14074         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14075         memset argument refers to a non-variable address.
14077 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
14079         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14080         {PLUS,MINUS}_EXPR code to...
14081         (adjust_symbolic_bound): ...here,
14082         (combine_bound): ...here,
14083         (set_value_range_with_overflow): ...and here.
14085 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
14087         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14088         code...
14089         (extract_range_from_abs_expr): ...here.
14091 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
14093         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14094         -fno-omit-frame-pointer when not optimizing.
14096 2018-07-02  Martin Liska  <mliska@suse.cz>
14098         PR ipa/86279
14099         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14100         (propagate_nothrow): Likewise.
14102 2018-07-02  Martin Liska  <mliska@suse.cz>
14104         PR ipa/86323
14105         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14107 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
14109         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14110         function in r262149, changing "loc" param from source_location to
14111         const dump_location_t &.
14112         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14113         declaration, as above.
14115 2018-07-01  Paul Koning  <ni1d@arrl.net>
14117         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14118         -munit-asm, -mgnu-asm, -mdec-asm.
14119         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14120         (pdp11_output_labelref): New.
14121         (pdp11_output_def): New.
14122         (pdp11_output_addr_vec_elt): New.
14123         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
14124         %# and %@ format codes.
14125         (pdp11_option_override): New.
14126         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14127         (pdp11_output_ident): New.
14128         (pdp11_asm_named_section): New.
14129         (pdp11_asm_init_sections): New.
14130         (pdp11_file_start): New.
14131         (pdp11_file_end): New.
14132         (output_ascii): Use .ascii/.asciz for -mdec-asm.
14133         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
14134         %o, like %c but octal.
14135         (pdp11_option_override): New.
14136         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14137         -mdec-asm.
14138         (DATA_SECTION_ASM_OP): Ditto.
14139         (READONLY_DATA_SECTION_ASM_OP): New.
14140         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14141         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14142         (ASM_OUTPUT_LABELREF): Ditto.
14143         (ASM_OUTPUT_DEF): Ditto.
14144         (ASM_OUTPUT_EXTERNAL): New.
14145         (ASM_OUTPUT_SOURCE_FILENAME): New.
14146         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14147         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14148         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
14149         %# and %@ format codes.
14150         * config/pdp11/pdp11.opt (mgnu-asm): New.
14151         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14152         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14153         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14155 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
14157         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14158         dereferencing path[] beyond its length.
14159         (debug_path): New.
14160         (debug_all_paths): New.
14161         (rewire_first_differing_edge): New.
14162         (adjust_paths_after_duplication): New.
14163         (duplicate_thread_path): Call adjust_paths_after_duplication.
14164         Add new argument.
14165         (thread_through_all_blocks): Add new argument to
14166         duplicate_thread_path.
14168 2018-06-30  Jim Wilson  <jimw@sifive.com>
14170         * config/riscv/predicates.md (p2m1_shift_operand): New.
14171         (high_mask_shift_operand): New.
14172         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14173         pattern using p2m1_shift_operand.
14174         (lshsi3_zero_extend_3+2): New combiner pattern using
14175         high_mask_shift_operand.
14177 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14179         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14180         split out from...
14181         (vect_recog_rotate_pattern): ...here.
14182         (vect_convert_input): Try to insert casts of invariants in the
14183         preheader.
14184         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14185         preheader to be empty.
14187 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14189         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14190         vector type.  If given, install it in the new statement's
14191         STMT_VINFO_VECTYPE.
14192         (vect_element_precision): New function.
14193         (vect_unpromoted_value): New struct.
14194         (vect_unpromoted_value::vect_unpromoted_value): New function.
14195         (vect_unpromoted_value::set_op): Likewise.
14196         (vect_look_through_possible_promotion): Likewise.
14197         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14198         (vect_widened_op_tree, vect_convert_input): Likewise.
14199         (vect_convert_inputs, vect_convert_output): Likewise.
14200         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14201         to handle the optional cast of the multiplication result and
14202         vect_widened_op_tree to detect the widened multiplication itself.
14203         Do not require the input and output of promotion casts to have
14204         the same sign, but base the signedness of the operation on the
14205         input rather than the result.  If the pattern includes two
14206         promotions, check that those promotions have the same sign.
14207         Do not restrict the MULT_EXPR handling to a double-width result;
14208         handle quadruple-width results and wider.  Use vect_convert_inputs
14209         to convert the inputs to the common type.
14210         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
14211         to handle the optional cast of the ABS result.  Also allow a sign
14212         change or a sign extension between the ABS and MINUS.
14213         Use vect_widened_op_tree to detect the widened subtraction and use
14214         vect_convert_inputs to convert the inputs to the common type.
14215         (vect_handle_widen_op_by_const): Delete.
14216         (vect_recog_widen_op_pattern): New function.
14217         (vect_recog_widen_mult_pattern): Use it.
14218         (vect_recog_widen_shift_pattern): Likewise.
14219         (vect_recog_widen_sum_pattern): Use
14220         vect_look_through_possible_promotion to handle the promoted
14221         PLUS_EXPR operand.
14223 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14225         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14226         the containing gimple_seq *.
14227         * gimple-iterator.h (gsi_for_stmt): Declare it.
14228         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14229         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14230         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14231         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14232         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14233         checks.
14234         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14235         split out from...
14236         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
14237         statement being replaced is part of an existing pattern
14238         definition sequence, inserting the new pattern statements before
14239         the original one.
14240         (vect_pattern_recog_1): Don't return a bool.  If the statement
14241         is already part of a pattern, instead apply pattern matching
14242         to the pattern definition statements.  Don't clear the
14243         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
14244         (vect_pattern_recog): Don't break after the first match;
14245         continue processing the pattern definition statements instead.
14246         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
14248 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14250         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14251         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14252         (vect_recog_widen_sum_pattern): Use it.
14254 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14256         * tree-vect-loop.c (vectorizable_reduction): Assert that the
14257         phi is not a pattern statement and has not been replaced by
14258         a pattern statement.
14259         * tree-vect-patterns.c (type_conversion_p): Don't check
14260         STMT_VINFO_IN_PATTERN_P.
14261         (vect_recog_vector_vector_shift_pattern): Likewise.
14262         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
14263         the pattern statement rather than the original statement; check
14264         directly for a WIDEN_MULT_EXPR here.
14265         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
14266         vect_is_simple_use to return the pattern statement rather
14267         than the original statement; use is_pattern_stmt_p to check
14268         for such a pattern statement.
14269         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
14270         to return the pattern statement rather than the original statement;
14271         don't do the same transformation here.
14272         (vect_is_simple_use): If the defining statement has been replaced
14273         by a pattern statement, return the pattern statement instead.
14274         Remove the corresponding (local) transformation from the vectype
14275         overload.
14277 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14279         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
14280         end and default to null.
14281         * tree-vect-loop.c (vect_create_epilog_for_reduction)
14282         (vectorizable_reduction): Update calls accordingly, dropping the
14283         gimple ** argument if the passed-back statement isn't needed.
14284         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
14285         (vect_recog_rotate_pattern): Likewise.
14286         (vect_recog_mask_conversion_pattern): Likewise.
14287         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
14288         (vect_mask_constant_operand_p): Likewise.
14289         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
14290         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
14291         (get_group_load_store_type, get_load_store_type): Likewise.
14292         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
14293         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
14294         (vectorizable_conversion, vectorizable_assignment): Likewise.
14295         (vectorizable_shift, vectorizable_operation): Likewise.
14296         (vectorizable_store, vect_is_simple_cond): Likewise.
14297         (vectorizable_condition, vectorizable_comparison): Likewise.
14298         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
14299         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
14300         and move it to the end.  Cope with null def_stmt_outs.
14302 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14304         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
14306 2018-06-29  Jeff Law  <law@redhat.com>
14308         * config/v850/v850.c (v850_legitimate_address_p): Handle large
14309         displacements for TARGET_V850E2V3 and newer.
14310         (TARGET_LRA_P): Remove.  Defaults to LRA now.
14311         * config/v850/v850.md (sign23byte_load): Remove.
14312         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
14313         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
14315 2018-06-29  Martin Liska  <mliska@suse.cz>
14317         PR lto/85759
14318         * coverage.c (coverage_init): Mangle full path name.
14319         * doc/invoke.texi: Document the change.
14320         * gcov-io.c (mangle_path): New.
14321         * gcov-io.h (mangle_path): Likewise.
14322         * gcov.c (mangle_name): Use mangle_path for path mangling.
14324 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14326         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
14327         if starting source register is not even.
14329 2018-06-29  Martin Liska  <mliska@suse.cz>
14331         PR tree-optimization/86263
14332         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
14333         Make edge redirection.
14335 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
14337         * dumpfile.c (dump_loc): Add indentation based on scope depth.
14338         (dump_scope_depth): New variable.
14339         (get_dump_scope_depth): New function.
14340         (dump_begin_scope): New function.
14341         (dump_end_scope): New function.
14342         * dumpfile.h (get_dump_scope_depth): New declaration.
14343         (dump_begin_scope): New declaration.
14344         (dump_end_scope): New declaration.
14345         (class auto_dump_scope): New class.
14346         (AUTO_DUMP_SCOPE): New macro.
14347         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
14348         AUTO_DUMP_SCOPE.
14350 2018-06-29  Richard Biener  <rguenther@suse.de>
14352         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
14353         compute_all_dependences succeeds.
14354         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
14355         exceed --param loop-max-datarefs-for-datadeps.
14357 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
14359         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
14361 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
14363         PR target/86348
14364         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
14365         alternative 0 in preferred_for_speed attribute.
14367 2018-06-28  Paul Koning  <ni1d@arrl.net>
14369         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
14370         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
14371         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
14372         * config/pdp11/pdp11.md: Correct "length" attribute calculation
14373         for shift insn patterns.
14375 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
14377         * cgraph.c (cgraph_node::get_body): Replace assignments to
14378         "dump_file" with calls to set_dump_file.
14379         * dumpfile.c (alt_dump_file): Make static, and group with...
14380         (alt_flags): ...this definition.
14381         (dumps_are_enabled): New variable.
14382         (refresh_dumps_are_enabled): New function.
14383         (set_dump_file): New function.
14384         (set_alt_dump_file): New function.
14385         (gcc::dump_manager::dump_start): Replace assignments to
14386         "dump_file" and "alt_dump_file" with calls to set_dump_file and
14387         set_alt_dump_file.
14388         (gcc::dump_manager::dump_finish): Likewise.
14389         * dumpfile.h (alt_dump_file): Delete decl.
14390         (dumps_are_enabled): New variable decl.
14391         (set_dump_file): New function decl.
14392         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
14393         global.
14394         * tree-nested.c (lower_nested_functions): Replace assignments to
14395         "dump_file" with calls to set_dump_file.
14397 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
14399         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
14400         goto_locus of each outgoing edge of each basic block.
14402 2018-06-28  Richard Biener  <rguenther@suse.de>
14404         * dwarf2out.c (decl_scope_table): Remove.
14405         (push_decl_scope): Likewise.
14406         (pop_decl_scope): Likewise.
14407         (gen_type_die_for_member): Do not call push/pop_decl_scope.
14408         (gen_struct_or_union_type_die): Likewise.
14409         (gen_tagged_type_die): Likewise.
14410         (dwarf2out_init): Do not initialize decl_scope_table.
14411         (dwarf2out_c_finalize): Do not free it.
14413 2018-06-28  Richard Biener  <rguenther@suse.de>
14415         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
14416         deciding whether to not re-use a DIE.
14418 2018-06-28  Richard Biener  <rguenther@suse.de>
14420         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
14421         DW_AT_abstract_origin attribute.
14423 2018-06-28  Martin Liska  <mliska@suse.cz>
14425         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14426         Use newly introduced constants.
14427         * tree-switch-conversion.h (struct jump_table_cluster):
14428         Define max_ratio_for_size and max_ratio_for_speed.
14430 2018-06-28  Martin Liska  <mliska@suse.cz>
14432         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14433         Add new checking assert to catch invalid state.
14434         (jump_table_cluster::can_be_handled): Handle single case
14435         clusters.
14436         (jump_table_cluster::is_beneficial): Bail out for such case.
14437         (bit_test_cluster::find_bit_tests):
14438         Add new checking assert to catch invalid state.
14439         (bit_test_cluster::can_be_handled): Handle single case
14440         clusters.
14441         (bit_test_cluster::is_beneficial): Bail out for such case.
14442         (switch_decision_tree::analyze_switch_statement):
14443         Fix comment.
14445 2018-06-28  Martin Liska  <mliska@suse.cz>
14447         * common.opt: Introduce -completion option.
14448         * gcc.c (driver_handle_option): Handle it.
14449         (driver::main): Print completions if completion
14450         is set.
14451         * opt-suggestions.c (option_proposer::get_completions):
14452         New function.
14453         (option_proposer::suggest_completion): Likewise.
14454         (option_proposer::find_param_completions): Likewise.
14455         (verify_autocompletions): Likewise.
14456         (test_completion_valid_options): Likewise.
14457         (test_completion_valid_params): Likewise.
14458         (in_completion_p): Likewise.
14459         (empty_completion_p): Likewise.
14460         (test_completion_partial_match): Likewise.
14461         (test_completion_garbage): Likewise.
14462         (opt_proposer_c_tests): Likewise.
14463         * opt-suggestions.h: Declare new functions.
14464         * opts.c (common_handle_option): Handle OPT__completion_.
14465         * selftest-run-tests.c (selftest::run_tests): Add
14466         opt_proposer_c_tests.
14467         * selftest.c (assert_str_startswith): New.
14468         * selftest.h (assert_str_startswith): Likewise.
14469         (opt_proposer_c_tests): New.
14470         (ASSERT_STR_STARTSWITH): Likewise.
14472 2018-06-28  Martin Liska  <mliska@suse.cz>
14474         * Makefile.in: Add opt-suggestions.o.
14475         * gcc-main.c: Include opt-suggestions.h.
14476         * gcc.c (driver::driver): Likewise.
14477         (driver::~driver): Remove m_option_suggestions.
14478         (driver::build_option_suggestions): Moved to option_proposer.
14479         (driver::suggest_option): Likewise.
14480         (driver::handle_unrecognized_options): Use option_proposer.
14481         * gcc.h (class driver): Add new memver m_option_proposer.
14482         * opt-suggestions.c: New file.
14483         * opt-suggestions.h: New file.
14485 2018-06-28  Martin Liska  <mliska@suse.cz>
14487         * vec.h (class auto_string_vec): New (moved from auto_argvec).
14488         (auto_string_vec::~auto_string_vec): Likewise.
14490 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
14492         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14493         prevent_decl_creation_for_types fields up and add reset_location field.
14494         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14495         statement if id->reset_location is true.
14496         (copy_edges_for_bb): Do not set goto_locus on the new edges if
14497         id->reset_location is true.
14498         (copy_phis_for_bb): Force input_location on the arguments if
14499         id->reset_location is true.
14500         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14501         is set on the function to be inlined.
14503 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
14505         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14507 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
14509         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14510         registers for Pmode.
14511         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14512         hard registers for the clobbered pseudo.
14514 2018-06-27  Paul Koning  <ni1d@arrl.net>
14516         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14517         mutually exclusive options.
14518         * config/pdp11/constraints.md (h): New constraint.
14519         (O): Update definition to match shift code generation.
14520         (D): New constraint.
14521         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14522         (CCFP): Remove.
14523         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14524         function.
14525         (output_jump): Change arguments.
14526         (pdp11_fixed_cc_regs): New function.
14527         (pdp11_cc_mode): Ditto.
14528         (pdp11_expand_shift): Ditto.
14529         (pdp11_assemble_shift): Ditto.
14530         (pdp11_small_shift): Ditto.
14531         (pdp11_branch_cost): Remove.
14532         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14533         from output.
14534         (pdp11_register_move_cost): Update for CC registers.
14535         (pdp11_rtx_costs): Add case for LSHIFTRT.
14536         (pdp11_output_jump): Add CCNZ mode conditional branches.
14537         (notice_update_cc_on_set): Remove.
14538         (pdp11_cc_mode): New function.
14539         (simple_memory_operand): Correct pre/post decrement case.
14540         (no_side_effect_operand): New function.
14541         (pdp11_regno_reg_class): Add CC_REGS class.
14542         (pdp11_fixed_cc_regs): New function.
14543         (pdp11_small_shift): New function.
14544         (pdp11_expand_shift): New function to expand shift insns.
14545         (pdp11_assemble_shift): New function to output shifts.
14546         (pdp11_branch_cost): Remove.
14547         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14548         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14549         (WCHAR_TYPE): Ditto.
14550         (PTRDIFF_TYPE): Ditto.
14551         (ADJUST_INSN_LENGTH): New macro.
14552         (FIXED_REGISTERS): Add CC registers.
14553         (CALL_USED_REGISTERS): Ditto.
14554         (reg_class): Ditto.
14555         (REG_CLASS_NAMES): Ditto.
14556         (REG_CLASS_CONTENTS): Ditto.
14557         (SELECT_CC_MODE): Use new function.
14558         (TARGET_FLAGS_REGNUM): New macro.
14559         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14560         (cc0_reg_rtx): Remove.
14561         (CC_STATUS_MDEP): Remove.
14562         (CC_STATUS_MDEFP_INIT): Remove.
14563         (CC_IN_FPU): Remove.
14564         (NOTICE_UPDATE_CC): Remove.
14565         (REGISTER_NAMES): Add CC registers.
14566         (BRANCH_COST): Change to constant 1.
14567         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14568         handling.
14569         * config/pdp11/pdp11.opt (mbcopy): Remove.
14570         (mbcopy-builtin): Remove.
14571         (mbranch-cheap): Remove.
14572         (mbranch-expensive): Remove.
14573         * config/pdp11/predicates.md (expand_shift_operand): Update to
14574         match shift code generation.
14575         (ccnz_operator): New predicate.
14576         * doc/invoke.texi (PDP-11 Options): Remove deleted options
14577         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14578         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
14579         exclusive options.
14580         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
14581         description of O constraint.
14583 2018-06-27  Jeff Law  <law@redhat.com>
14584             Austin Law  <austinklaw@gmail.com>
14586         * config/v850/v850.md (addsi3_set_flags): New pattern.
14587         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14588         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14589         (zero_extendhisi2_v850_set_flags): Likewise.
14590         (zero_extendqisi2_v850_set_flags): Likewise.
14591         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14592         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14593         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14595         * config/v850/v850-protos.h (notice_update_cc): Remove.
14596         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14597         (v850_print_operand): Handle 'D' and "d".
14598         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14599         Add handling of arithmetic/logical operations compared against zero.
14600         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14601         Do not look at v850_compare_op, instead get mode from last argument.
14602         (v850_gen_compare): Remove
14603         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14604         after reload for prologue insns.
14605         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14606         patterns.
14607         (construct_save_jarl): Likewise.
14608         (TARGET_FLAGS_REGNUM): Define.
14609         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14610         (NOTICE_UPDATE_CC): Remove.
14611         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14612         than cc0.  Conditionalize on reload_completed.
14613         (cmpsi_insn, setfcc_insn): Likewise.
14614         (tst1 splitter): Turn into define_and_split which sets the flags
14615         after reload.
14616         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14617         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14618         (cstoresf4, cstoredf4): Clobber the flags.
14619         (cmpsi, cmpsf, cmpdf): Remove expanders.
14620         (setf_insn): Remove pattern.
14621         (addsi3): Turn into define_and_split which clobbers the flags after
14622         reload and a suitable pattern (addsi3_clobber_flags) for use after
14623         reload.
14624         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14625         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14626         (ashrsi3, ashrsi3_v850e2): Likewise.
14627         (bins): Clobber the flags.
14628         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14629         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14630         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14631         (call_value_internal_short, call_value_internal_long): Likewise.
14632         (callt_save_interrupt, callt_return_interrupt): Likewise.
14633         (save_interrupt, return_interrupt): Likewise.
14634         (callt_save_all_interrupt, save_all_interrupt): Likewise.
14635         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14636         (restore_all_interrupt, _restore_all_interrupt): Likewise.
14637         (All FP comparisons): Only allow after reload has completed.
14638         (trfsr): Likewise.
14639         (divh, divhu): Tweak output template.
14640         (branch_z_normal, branch_z_invert): Remove
14641         (branch_nz_normal, branch_nz_invert): Likewise.
14642         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14644         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14645         * config/v850/v850.c (notice_update_cc): Remove.
14646         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
14647         (CC_NO_CARRY): Likewise.
14648         (NOTICE_UPDATE_CC): Define to nothing.
14649         * config/v850/v850.md: Remove block comment on cc0 handling
14650         Remove "cc" attribute from all patterns.  Remove cc_status handling
14651         from all patterns.  Minor formatting fixes.
14653 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14655         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14656         (cortex-a76.cortex-a55): Likewise.
14657         * config/aarch64/aarch64-tune.md: Regenerate.
14658         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14659         cortex-a76.cortex-a55.
14661 2018-06-27  Jeff Law  <law@redhat.com>
14663         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14664         (MULTILIB_DIRNAMES): Similarly.
14666 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
14668         * gimple.h (gimple_return_retbnd): Delete.
14669         (gimple_return_set_retbnd): Likewise.
14670         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14671         gimple_return_set_retbnd.
14672         * gimple-pretty-print.c (dump_gimple_return): Remove call to
14673         gimple_return_retbnd and adjust.
14674         * tree-inline.h (struct copy_body_data): Remove retbnd field.
14675         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14676         Explicitly return NULL in a couple more cases.  Move assertion
14677         on debug statements and remove unreachable code.
14678         (reset_debug_binding): Do not test id->retbnd.
14679         (expand_call_inline): Do not set it.
14681 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
14683         * configure.ac: Add --disable-gcov option.
14684         * configure: Regenerate.
14685         * Makefile.in: Honour @enable_gcov@.
14686         * doc/install.texi: Document --disable-gcov.
14688 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14690         * config/arm/arm-cpus.in (cortex-a76): New entry.
14691         (cortex-a76.cortex-a55): Likewise.
14692         * config/arm/arm-tables.opt: Regenerate.
14693         * config/arm/arm-tune.md: Likewise.
14694         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14695         * doc/invoke.texi (ARM Options): Document cortex-a76 and
14696         cortex-a76.cortex-a55.
14698 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
14700         PR target/85769
14701         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14703 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
14705         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14706         comment.
14707         (EPILOGUE_USES): Likewise.
14709 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
14711         * tree-inline.c (remap_location): New function extracted from...
14712         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
14713         (copy_phis_for_bb): ...here.  Call remap_location.
14714         (copy_cfg_body): Adjust call to copy_edges_for_bb.
14716 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
14718         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14719         unaligned vsx for 16B memset.
14721 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
14723         PR target/86285
14724         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14725         ieee128_float_type_node to long_double_type_node unless
14726         TARGET_LONG_DOUBLE_128 is set.
14728 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
14730         * cfgloop.c (get_loop_location): Convert return type from
14731         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14732         by implicit construction from rtx_insn *, and using
14733         dump_user_location_t::from_function_decl for the fallback case.
14734         * cfgloop.h (get_loop_location): Convert return type from
14735         location_t to dump_user_location_t.
14736         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14737         dump_printf_loc to pass in a dump_location_t rather than a
14738         location_t, via the gimple stmt.
14739         * coverage.c (get_coverage_counts): Update calls to
14740         dump_printf_loc to pass in dump_location_t rather than a
14741         location_t.
14742         * doc/optinfo.texi (Dump types): Convert example of
14743         dump_printf_loc from taking "locus" to taking "insn".  Update
14744         description of the "_loc" calls to cover dump_location_t.
14745         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14746         "selftest.h".
14747         (dump_user_location_t::dump_user_location_t): New constructors,
14748         from gimple *stmt and rtx_insn *.
14749         (dump_user_location_t::from_function_decl): New function.
14750         (dump_loc): Make static.
14751         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14752         const dump_location_t &.
14753         (dump_generic_expr_loc): Delete.
14754         (dump_printf_loc): Convert param "loc" from location_t to
14755         const dump_location_t &.
14756         (selftest::test_impl_location): New function.
14757         (selftest::dumpfile_c_tests): New function.
14758         * dumpfile.h: Include "profile-count.h".
14759         (class dump_user_location_t): New class.
14760         (struct dump_impl_location_t): New struct.
14761         (class dump_location_t): New class.
14762         (dump_printf_loc): Convert 2nd param from source_location to
14763         const dump_location_t &.
14764         (dump_generic_expr_loc): Delete.
14765         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14766         const dump_location_t &.
14767         * gimple-fold.c (fold_gimple_assign): Update call to
14768         dump_printf_loc to pass in a dump_location_t rather than a
14769         location_t, via the gimple stmt.
14770         (gimple_fold_call): Likewise.
14771         * gimple-loop-interchange.cc
14772         (loop_cand::analyze_iloop_reduction_var): Update for change to
14773         check_reduction_path.
14774         (tree_loop_interchange::interchange): Update for change to
14775         find_loop_location.
14776         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14777         change in return-type of find_loop_location.
14778         (graphite_regenerate_ast_isl): Likewise.
14779         * graphite-optimize-isl.c (optimize_isl): Likewise.
14780         * graphite.c (graphite_transform_loops): Likewise.
14781         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14782         pass in a dump_location_t rather than a location_t, via the
14783         gimple stmt.
14784         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14785         * ipa.c (walk_polymorphic_call_targets): Likewise.
14786         * loop-unroll.c (report_unroll): Convert "locus" param from
14787         location_t to dump_location_t.
14788         (decide_unrolling): Update for change to get_loop_location's
14789         return type.
14790         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14791         location_t to dump_user_location_t.
14792         (grid_find_single_omp_among_assignments_1): Updates calls to
14793         dump_printf_loc to pass in a dump_location_t rather than a
14794         location_t, via the gimple stmt.
14795         (grid_parallel_clauses_gridifiable): Convert "tloc" from
14796         location_t to dump_location_t.  Updates calls to dump_printf_loc
14797         to pass in a dump_location_t rather than a location_t, via the
14798         gimple stmt.
14799         (grid_inner_loop_gridifiable_p): Likewise.
14800         (grid_dist_follows_simple_pattern): Likewise.
14801         (grid_gfor_follows_tiling_pattern): Likewise.
14802         (grid_target_follows_gridifiable_pattern): Likewise.
14803         (grid_attempt_target_gridification): Convert initialization
14804         of local "grid" from memset to zero-initialization; FIXME: does
14805         this require C++11?  Update call to dump_printf_loc to pass in a
14806         optinfo_location rather than a location_t, via the gimple stmt.
14807         * profile.c (read_profile_edge_counts): Updates call to
14808         dump_printf_loc to pass in a dump_location_t rather than a
14809         location_t
14810         (compute_branch_probabilities): Likewise.
14811         * selftest-run-tests.c (selftest::run_tests): Call
14812         dumpfile_c_tests.
14813         * selftest.h (dumpfile_c_tests): New decl.
14814         * tree-loop-distribution.c (pass_loop_distribution::execute):
14815         Update for change in return type of find_loop_location.
14816         * tree-parloops.c (parallelize_loops): Likewise.
14817         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14818         "locus" from location_t to dump_user_location_t.
14819         (canonicalize_loop_induction_variables): Likewise.
14820         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14821         for change in return type of find_loop_location.
14822         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14823         to dump_printf_loc to pass in a dump_location_t rather than a
14824         location_t, via the stmt.
14825         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14826         Likewise.
14827         * tree-vect-loop-manip.c (find_loop_location): Convert return
14828         type from source_location to dump_user_location_t.
14829         (vect_do_peeling): Update for above change.
14830         (vect_loop_versioning): Update for change in type of
14831         vect_location.
14832         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14833         from location_t to dump_user_location_t.
14834         (vect_estimate_min_profitable_iters): Update for change in type
14835         of vect_location.
14836         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14837         location_t to dump_location_t.
14838         (vect_slp_bb): Update for change in type of vect_location.
14839         * tree-vectorizer.c (vect_location): Convert from source_location
14840         to dump_user_location_t.
14841         (try_vectorize_loop_1): Update for change in vect_location's type.
14842         (vectorize_loops): Likewise.
14843         (increase_alignment): Likewise.
14844         * tree-vectorizer.h (vect_location): Convert from source_location
14845         to dump_user_location_t.
14846         (find_loop_location): Convert return type from source_location to
14847         dump_user_location_t.
14848         (check_reduction_path): Convert 1st param from location_t to
14849         dump_user_location_t.
14850         * value-prof.c (check_counter): Update call to dump_printf_loc to
14851         pass in a dump_user_location_t rather than a location_t; update
14852         call to error_at for change in type of "locus".
14853         (check_ic_target): Update call to dump_printf_loc to
14854         pass in a dump_user_location_t rather than a location_t, via the
14855         call_stmt.
14857 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
14859         * config/s390/s390.h (enum processor_flags): Do not use
14860         default tune parameter when -march was specified.
14862 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
14864         PR target/86314
14865         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14866         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14867         operands.
14869 2018-06-26  Richard Biener  <rguenther@suse.de>
14871         PR tree-optimization/86287
14872         PR bootstrap/86316
14873         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14874         (vect_analyze_loop): Initialize n_stmts.
14876 2018-06-26  Richard Biener  <rguenther@suse.de>
14878         PR middle-end/86271
14879         * fold-const.c (fold_convertible_p): Pointer extension
14880         isn't valid.
14882 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
14884         PR debug/86064
14885         * dwarf2out.c (loc_list_has_views): Adjust comments.
14886         (dw_loc_list): Split single cross-partition range with
14887         nonzero locview.
14889 2018-06-25  Jeff Law  <law@redhat.com>
14891         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14892         on -mbig-switch by default.
14894         * config/v850/predicates.md (const_float_1_operand): Fix match_code
14895         test.
14896         (const_float_0_operand): Remove unused predicate.
14897         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14898         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14899         (recipsf2): New expander.  Original pattern now called
14900         (recipsf2_insn).
14901         (recipdf2, recipdf2_insn): Similarly.
14902         (rsqrtsf2, rsqrtsf2_insn): Similarly
14903         (rsqrtdf2, rsqrtdf2_insn): Similarly
14905 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
14907         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14908         Simplify logic for FreeBSD (twice).
14910 2018-06-25  Martin Sebor  <msebor@redhat.com>
14912         PR tree-optimization/86204
14913         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14914         a strnlen result if it's less than the length of the string.
14916 2018-06-25  Martin Sebor  <msebor@redhat.com>
14918         PR tree-optimization/85700
14919         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14920         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14921         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14923 2018-06-25  Martin Sebor  <msebor@redhat.com>
14925         * doc/extend.texi (Zero-length arrays): Update and clarify.
14927 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
14929         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14930         added IEEE/IBM long double multilib support on PowerPC little
14931         endian Linux systems.
14932         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14933         (MULTILIB_DEFAULTS): Likewise.
14934         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14935         Likewise.
14936         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14937         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14938         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14940 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
14942         PR middle-end/86311
14943         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14944         (REORDER_45): Likewise.
14946 2018-06-25  Jeff Law  <law@redhat.com>
14948         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14949         dividend to 32 bits.  Adjust length.
14950         (udivmodhi4): Cleanup output template.  Fix length.
14952 2018-06-25  Carl Love  <cel@us.ibm.com>
14954         * config/rs6000/vsx.md: Change word selector to prefered location.
14956 2018-06-25  Richard Biener  <rguenther@suse.de>
14958         PR tree-optimization/86304
14959         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14960         epilogue-if-converted loops as well.
14962 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
14964         * lto-section-out.c (lto_begin_section): Do not print section
14965         name for noaddr and unnumbered dumps.
14967 2018-06-25  Richard Biener  <rguenther@suse.de>
14969         * tree-vectorizer.h (struct vec_info_shared): New structure
14970         with parts split out from struct vec_info and loop_nest from
14971         struct _loop_vec_info.
14972         (struct vec_info): Adjust accordingly.
14973         (struct _loop_vec_info): Likewise.
14974         (LOOP_VINFO_LOOP_NEST): Adjust.
14975         (LOOP_VINFO_DATAREFS): Likewise.
14976         (LOOP_VINFO_DDRS): Likewise.
14977         (struct _bb_vec_info): Likewise.
14978         (BB_VINFO_DATAREFS): Likewise.
14979         (BB_VINFO_DDRS): Likewise.
14980         (struct _stmt_vec_info): Add dr_aux member.
14981         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14982         (DR_MISALIGNMENT_UNINITIALIZED): New.
14983         (set_dr_misalignment): Adjust.
14984         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14985         (vect_analyze_loop): Adjust prototype.
14986         (vect_analyze_loop_form): Likewise.
14987         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14988         Compute dependences lazily.
14989         (vect_record_base_alignments): Use shared datarefs/ddrs.
14990         (vect_verify_datarefs_alignment): Likewise.
14991         (vect_analyze_data_refs_alignment): Likewise.
14992         (vect_analyze_data_ref_accesses): Likewise.
14993         (vect_analyze_data_refs): Likewise.
14994         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14995         constructor parameter for shared part.
14996         (vect_analyze_loop_form): Pass in shared part and adjust.
14997         (vect_analyze_loop_2): Pass in storage for the number of
14998         stmts.  Move loop nest finding to the caller.  Compute
14999         datarefs lazily.
15000         (vect_analyze_loop): Pass in shared part.
15001         (vect_transform_loop): Verify shared datarefs are unchanged.
15002         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
15003         constructor parameter for shared part.
15004         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
15005         (vect_slp_bb): Verify shared datarefs are unchanged before
15006         transform.
15007         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
15008         change.
15009         (new_stmt_vec_info): Initialize DR_AUX misalignment to
15010         DR_MISALIGNMENT_UNINITIALIZED.
15011         * tree-vectorizer.c (vec_info::vec_info): Add constructor
15012         parameter for shared part.
15013         (vec_info::~vec_info): Adjust.
15014         (vec_info_shared::vec_info_shared): New.
15015         (vec_info_shared::~vec_info_shared): Likewise.
15016         (vec_info_shared::save_datarefs): Likewise.
15017         (vec_info_shared::check_datarefs): Likewise.
15018         (try_vectorize_loop_1): Construct shared part live for analyses
15019         of a single loop for multiple vector sizes.
15020         * tree-parloops.c (gather_scalar_reductions): Adjust.
15022 2018-06-25  Richard Biener  <rguenther@suse.de>
15024         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
15025         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
15026         (vect_analyze_data_refs): Remove similar code from here and
15027         simplify accordingly.
15029 2018-06-25  Richard Biener  <rguenther@suse.de>
15031         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
15032         for reverse storage order accesses rather than asserting
15033         they cannot happen here.
15035 2018-06-25  Tom de Vries  <tdevries@suse.de>
15037         PR debug/86257
15038         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
15039         Use data16 instead of .byte for insn prefix.
15041 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
15043         PR C++/86082
15044         * parser.c (make_char_string_pack): Pass this literal chars
15045         through cpp_interpret_string.
15046         (cp_parser_userdef_numeric_literal): Check the result of
15047         make_char_string_pack.
15049 2018-06-24  Maya Rashish  <coypu@sdf.org>
15051         * ginclude/stddef.h: Simplify conditions around avoiding
15052         re-definition of __size_t.
15054 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
15056         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
15057         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
15059 2018-06-22  Maya Rashish  <coypu@sdf.org>
15061         * doc/invoke.texi (mno-fancy-math-387): Update for changes
15062         made to OpenBSD and NetBSD through the years.
15064 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15066         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15067         behavior of vec_pack (vector double, vector double) to match
15068         behavior of vec_float2 (vector double, vector double).
15070 2018-06-22  Olivier Hainque  <hainque@adacore.com>
15072         * gimplify.c (gimplify_function_tree): Prevent creation
15073         of a trampoline for the address of the current function
15074         passed to entry/exit instrumentation hooks.
15076 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
15078         PR target/86222
15079         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15080         correctly.
15082 2018-06-22  Martin Liska  <mliska@suse.cz>
15084         PR tree-optimization/86263
15085         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15086         Bail out if is_enabled is false.
15087         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15088         New declaration.
15089         (jump_table_cluster::is_enabled): New function.
15091 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
15093         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15094         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15095         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15096         (lto_input_ts_binfo_tree_pointers): Likewise.
15097         * tree-streamer-out.c (streamer_write_tree_bitfields,
15098         write_ts_binfo_tree_pointers): Likewise.
15099         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15101 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
15103         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15105 2018-06-22  Martin Liska  <mliska@suse.cz>
15107         * symbol-summary.h (get): Make it pure and inline move
15108         functionality from ::get function.
15109         (get): Remove and inline into ::get and ::get_create.
15110         (get_create): Move code from ::get function.
15112 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15114         PR target/85994
15115         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15116         -x assembler-with-cpp.
15118 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15120         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15121         _FILE_OFFSET_BITS=64 for C++.
15123 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
15125         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15126         conversion insn that shows up when pr85657-3.c is compiled using
15127         IEEE 128-bit long double.
15128         (neg<mode>2_internal): Use the correct mode to check whether the
15129         mode is IBM extended.
15130         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15131         multiply and divide external functions from being created more
15132         than once.
15134 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15136         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15137         functions.
15138         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
15139         the edge can be forwarded.
15140         (cfg_layout_merge_blocks): Likewise.
15142 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15144         * except.c (finish_eh_generation): Commit edge insertions only after
15145         the EH edges have been redirected from post-landing to landing pads.
15147 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15149         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15150         create_tmp_var_for to create the FRAME decl.
15151         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15153 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15155         * tree-inline.c (copy_edges_for_bb): Minor tweak.
15156         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15157         debug statement when resetting its value.
15158         (expand_call_inline): Copy the locus of the call onto the assignment
15159         of the return value, if any.  Use local variable in more cases.
15161 2018-06-21  Martin Liska  <mliska@suse.cz>
15163         * ipa-pure-const.c (propagate_nothrow): Use
15164         funct_state_summaries->get.
15165         (dump_malloc_lattice): Likewise.
15166         (propagate_malloc): Likewise.
15168 2018-06-21  Richard Biener  <rguenther@suse.de>
15170         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15171         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15172         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15173         comment.
15174         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15175         BLOCK_ABSTRACT_ORIGIN unconditionally.
15177 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
15179         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15180         deleting it.
15181         * ipa-reference.c (ipa_reference_c_finalize): Delete
15182         ipa_ref_opt_sum_summaries and set it to NULL.
15184 2018-06-21  Tom de Vries  <tdevries@suse.de>
15186         PR tree-optimization/85859
15187         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15188         test with comment from bb_no_side_effects_p.
15190 2018-06-21  Richard Biener  <rguenther@suse.de>
15192         PR tree-optimization/86232
15193         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15194         max for constant niter.
15196 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15198         * config/aarch64/aarch64-simd.md
15199         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15201 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15203         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15204         Make opernads of the unspec commutative.
15206 2018-06-21  Richard Biener  <rguenther@suse.de>
15208         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15209         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15210         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15211         (vect_analyze_data_ref_dependence): Re-order checks to deal with
15212         NULL DR_STEP.
15213         (vect_record_base_alignments): Do not record base alignment
15214         for gathers or scatters.
15215         (vect_compute_data_ref_alignment): Drop return value that is always
15216         true.  Bail out early for gathers or scatters.
15217         (vect_enhance_data_refs_alignment): Bail out early for gathers
15218         or scatters.
15219         (vect_find_same_alignment_drs): Likewise.
15220         (vect_analyze_data_refs_alignment): Remove dead code.
15221         (vect_slp_analyze_and_verify_node_alignment): Likewise.
15222         (vect_analyze_data_refs): For possible gathers or scatters do
15223         not create an alternate DR, just check their possible validity
15224         and mark them.  Adjust DECL_NONALIASED handling to not rely
15225         on DR_BASE_ADDRESS.
15226         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15227         update inits of gathers or scatters.
15228         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15229         Also copy gather/scatter flag to pattern vinfo.
15231 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15233         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15234         behavior of vec_packsu (vector unsigned long long, vector unsigned
15235         long long) to match behavior of vec_packs with same signature.
15237 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
15238             Thomas Schwinge <thomas@codesourcery.com>
15239             Cesar Philippidis  <cesar@codesourcery.com>
15241         * gimplify.c (gimplify_scan_omp_clauses): Add support for
15242         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15243         (gimplify_adjust_omp_clauses): Likewise.
15244         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
15245         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
15246         (gimplify_omp_target_update): Update handling of acc update and
15247         enter/exit data.
15248         * omp-low.c (install_var_field): Remove unused parameter
15249         base_pointers_restrict.
15250         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
15251         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
15252         FINALIZE}
15253         (omp_target_base_pointers_restrict_p): Delete.
15254         (scan_omp_target): Update call to scan_sharing_clauses.
15255         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
15256         FINALIZE}.
15257         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
15258         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
15259         (convert_local_omp_clauses): Likewise.
15260         * tree-pretty-print.c (dump_omp_clause): Likewise.
15261         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
15262         FINALIZE}.
15263         (omp_clause_code_name): Likewise.
15265 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
15267         PR debug/86194
15268         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
15269         be narrowed.
15271         PR tree-optimization/86231
15272         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
15273         anti-range don't overwrite *vr0min before using it to compute *vr0max.
15275 2018-06-20  Tom de Vries  <tdevries@suse.de>
15277         PR tree-optimization/86097
15278         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
15279         iv type if signedness of iv type is not the same as that of *nit.
15281 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
15283         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
15284         EDGE_EH edges, verify they are all EDGE_EH.
15286 2018-06-20  Maya Rashish  <coypu@sdf.org>
15288         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
15290 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15292         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
15293         * config/aarch64/aarch64.c (xgene1_tunings): Add
15294         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
15295         (aarch64_mode_valid_for_sched_fusion_p):
15296         Allow 16-byte modes.
15297         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
15298         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
15299         128-bit modes.
15300         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
15301         New pattern.
15302         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
15303         * config/aarch64/iterators.md (VQ2): New mode iterator.
15305 2018-06-20  Martin Liska  <mliska@suse.cz>
15307         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15308         Change default ratio from 10 to 8.
15310 2018-06-20  Martin Liska  <mliska@suse.cz>
15312         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15313         New.
15314         (bit_test_cluster::find_bit_tests): Likewise.
15315         (switch_decision_tree::analyze_switch_statement): Find clusters.
15316         * tree-switch-conversion.h (struct jump_table_cluster): Document
15317         hierarchy.
15319 2018-06-20  Martin Liska  <mliska@suse.cz>
15321         * tree-switch-conversion.c (switch_conversion::collect):
15322         Record m_uniq property.
15323         (switch_conversion::expand): Bail out for special conditions.
15324         (group_cluster::~group_cluster): New.
15325         (group_cluster::group_cluster): Likewise.
15326         (group_cluster::dump): Likewise.
15327         (jump_table_cluster::emit): New.
15328         (switch_decision_tree::fix_phi_operands_for_edges): New.
15329         (struct case_node): Remove struct.
15330         (jump_table_cluster::can_be_handled): New.
15331         (case_values_threshold): Moved to header.
15332         (reset_out_edges_aux): Likewise.
15333         (jump_table_cluster::is_beneficial): New.
15334         (bit_test_cluster::can_be_handled): Likewise.
15335         (add_case_node): Remove.
15336         (bit_test_cluster::is_beneficial): New.
15337         (case_bit_test::cmp): New.
15338         (bit_test_cluster::emit): New.
15339         (expand_switch_as_decision_tree_p): Remove.
15340         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
15341         (fix_phi_operands_for_edge): Likewise.
15342         (switch_decision_tree::analyze_switch_statement): New.
15343         (compute_cases_per_edge): Move ...
15344         (switch_decision_tree::compute_cases_per_edge): ... here.
15345         (try_switch_expansion): Likewise.
15346         (switch_decision_tree::try_switch_expansion): Likewise.
15347         (record_phi_operand_mapping): Likewise.
15348         (switch_decision_tree::record_phi_operand_mapping): Likewise.
15349         (emit_case_decision_tree): Likewise.
15350         (switch_decision_tree::emit): Likewise.
15351         (balance_case_nodes): Likewise.
15352         (switch_decision_tree::balance_case_nodes): Likewise.
15353         (dump_case_nodes): Likewise.
15354         (switch_decision_tree::dump_case_nodes): Likewise.
15355         (emit_jump): Likewise.
15356         (switch_decision_tree::emit_jump): Likewise.
15357         (emit_cmp_and_jump_insns): Likewise.
15358         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
15359         (emit_case_nodes): Likewise.
15360         (switch_decision_tree::emit_case_nodes): Likewise.
15361         (conditional_probability): Remove.
15362         * tree-switch-conversion.h (enum cluster_type): New.
15363         (PRINT_CASE): New.
15364         (struct cluster): Likewise.
15365         (cluster::cluster): Likewise.
15366         (struct simple_cluster): Likewise.
15367         (simple_cluster::simple_cluster): Likewise.
15368         (struct group_cluster): Likewise.
15369         (struct jump_table_cluster): Likewise.
15370         (struct bit_test_cluster): Likewise.
15371         (struct min_cluster_item): Likewise.
15372         (struct case_tree_node): Likewise.
15373         (case_tree_node::case_tree_node): Likewise.
15374         (jump_table_cluster::case_values_threshold): Likewise.
15375         (struct case_bit_test): Likewise.
15376         (struct switch_decision_tree): Likewise.
15377         (struct switch_conversion): Likewise.
15378         (switch_decision_tree::reset_out_edges_aux): Likewise.
15380 2018-06-20  Martin Liska  <mliska@suse.cz>
15382         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
15383         (hoist_edge_and_branch_if_true): Likewise.
15384         (expand_switch_using_bit_tests_p): Likewise.
15385         (struct case_bit_test): Likewise.
15386         (case_bit_test_cmp): Likewise.
15387         (emit_case_bit_tests): Likewise.
15388         (switch_conversion::switch_conversion): New class.
15389         (struct switch_conv_info): Remove old struct.
15390         (collect_switch_conv_info): More to ...
15391         (switch_conversion::collect): ... this.
15392         (check_range): Likewise.
15393         (switch_conversion::check_range): Likewise.
15394         (check_all_empty_except_final): Likewise.
15395         (switch_conversion::check_all_empty_except_final): Likewise.
15396         (check_final_bb): Likewise.
15397         (switch_conversion::check_final_bb): Likewise.
15398         (create_temp_arrays): Likewise.
15399         (switch_conversion::create_temp_arrays): Likewise.
15400         (free_temp_arrays): Likewise.
15401         (gather_default_values): Likewise.
15402         (switch_conversion::gather_default_values): Likewise.
15403         (build_constructors): Likewise.
15404         (switch_conversion::build_constructors): Likewise.
15405         (constructor_contains_same_values_p): Likewise.
15406         (switch_conversion::contains_same_values_p): Likewise.
15407         (array_value_type): Likewise.
15408         (switch_conversion::array_value_type): Likewise.
15409         (build_one_array): Likewise.
15410         (switch_conversion::build_one_array): Likewise.
15411         (build_arrays): Likewise.
15412         (switch_conversion::build_arrays): Likewise.
15413         (gen_def_assigns): Likewise.
15414         (switch_conversion::gen_def_assigns): Likewise.
15415         (prune_bbs): Likewise.
15416         (switch_conversion::prune_bbs): Likewise.
15417         (fix_phi_nodes): Likewise.
15418         (switch_conversion::fix_phi_nodes): Likewise.
15419         (gen_inbound_check): Likewise.
15420         (switch_conversion::gen_inbound_check): Likewise.
15421         (process_switch): Use the newly created class.
15422         (switch_conversion::expand): New.
15423         (switch_conversion::~switch_conversion): New.
15424         * tree-switch-conversion.h: New file.
15426 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15428         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
15429         tree-vect-patterns.c.
15430         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
15431         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
15432         (vect_recog_sad_pattern): Likewise.
15433         (vect_recog_widen_sum_pattern): Likewise.
15434         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
15435         (vect_recog_widen_shift_pattern): Remove the type_in argument.
15436         (vect_recog_rotate_pattern): Likewise.
15437         (vect_recog_mult_pattern): Likewise.
15438         (vect_recog_vector_vector_shift_pattern): Likewise.
15439         (vect_recog_divmod_pattern): Likewise.
15440         (vect_recog_mixed_size_cond_pattern): Likewise.
15441         (vect_recog_bool_pattern): Likewise.
15442         (vect_recog_mask_conversion_pattern): Likewise.
15443         (vect_try_gather_scatter_pattern): Likewise.
15444         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
15445         (vect_recog_over_widening_pattern): Likewise.
15446         (vect_recog_gather_scatter_pattern): Likewise.
15447         (vect_recog_func_ptr): Move from tree-vectorizer.h
15448         (vect_vect_recog_func_ptrs): Move further down the file.
15449         (vect_recog_func): Likewise.  Remove the third argument.
15450         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
15451         (vect_pattern_recog_1): Expect the pattern function to do any
15452         necessary target tests.  Also expect it to provide a vector type.
15453         Remove the type_in handling.
15455 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15457         * tree-vect-patterns.c (vect_pattern_detected): New function.
15458         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
15459         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
15460         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
15461         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
15462         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15463         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15464         (vect_recog_mask_conversion_pattern)
15465         (vect_try_gather_scatter_pattern): Likewise.
15467 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15469         * tree-vect-patterns.c (vect_get_internal_def): New function.
15470         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15471         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
15472         (search_type_for_mask_1): Use it.
15474 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15476         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15477         redundant WIDEN_SUM_EXPR handling.
15478         (vect_recog_sad_pattern): Likewise.
15480 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15482         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
15483         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
15484         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
15485         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
15486         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
15488 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15490         * tree-vect-stmts.c (vectorizable_call): Make sure that we
15491         use the stmt_vec_info of the original bb statement for the
15492         new zero assignment, even if the call is part of a pattern.
15494 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15496         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15497         that the sequence is attached to the original statement rather
15498         than the pattern statement.
15499         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15500         PATTERN_DEF_SEQ from the original statement rather than
15501         the main pattern statement.
15502         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15503         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15504         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15506 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
15508         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15509         definition statements before the early exit for statements that aren't
15510         live or relevant.
15511         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15512         split out from...
15513         (vect_transform_loop): ...here.  Process pattern definition
15514         statements without first checking whether the main pattern
15515         statement is live or relevant.
15517 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15519         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15520         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15522 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
15524         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15525         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15526         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15527         (expand_block_compare): Change select_block_compare_mode call.
15528         (expand_strncmp_align_check): Use new functions, fix comment.
15529         (emit_final_str_compare_gpr): New function.
15530         (expand_strn_compare): Refactor and clean up code.
15531         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15533 2018-06-19  Tony Reix  <tony.reix@atos.com>
15534             Damien Bergamini  <damien.bergamini@atos.com>
15535             David Edelsohn  <dje.gcc@gmail.com>
15537         * collect2.c (static_obj): New variable.
15538         (static_libs): New variable.
15539         (is_in_list): Uncomment declaration.
15540         (main): Track AIX libraries linked statically.
15541         (is_in_list): Uncomment definition.
15542         (scan_prog_file): Don't add AIX shared libraries initializer
15543         to constructor list if linking statically.
15545 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
15547         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15548         constant.
15549         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15551 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
15553         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15554         blocks.
15556 2018-06-19  Martin Liska  <mliska@suse.cz>
15558         * config/i386/i386.c (ix86_can_inline_p): Do not use
15559         ipa_fn_summaries::get_create.
15560         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15561         get.
15562         (devirtualization_time_bonus): Likewise.
15563         (ipcp_propagate_stage): Likewise.
15564         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15565         (edge_set_predicate): Likewise.
15566         (evaluate_conditions_for_known_args): Likewise.
15567         (evaluate_properties_for_edge): Likewise.
15568         (ipa_call_summary::reset): Tranform to ...
15569         (ipa_call_summary::~ipa_call_summary): ... this.
15570         (ipa_fn_summary::reset): Transform to ...
15571         (ipa_fn_summary::~ipa_fn_summary): ... this.
15572         (ipa_fn_summary_t::remove): Rename to ...
15573         (ipa_fn_summary_t::remove_callees): ... this.
15574         (ipa_fn_summary_t::duplicate): Use placement new
15575         instead of memory copy.
15576         (ipa_call_summary_t::duplicate): Likewise.
15577         (ipa_call_summary_t::remove): Remove.
15578         (dump_ipa_call_summary): Change get_create to get.
15579         (ipa_dump_fn_summary): Dump only when summary exists.
15580         (analyze_function_body): Use symbol_summary::get instead
15581         of get_create.
15582         (compute_fn_summary): Likewise.
15583         (estimate_edge_devirt_benefit): Likewise.
15584         (estimate_edge_size_and_time): Likewise.
15585         (inline_update_callee_summaries): Likewise.
15586         (remap_edge_change_prob): Likewise.
15587         (remap_edge_summaries): Likewise.
15588         (ipa_merge_fn_summary_after_inlining): Likewise.
15589         (write_ipa_call_summary): Likewise.
15590         (ipa_fn_summary_write): Likewise.
15591         (ipa_free_fn_summary): Likewise.
15592         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15593         (struct ipa_call_summary): Likewise.
15594         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15595         of get_create.
15596         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15597         (estimate_size_after_inlining): Likewise.
15598         (estimate_growth): Likewise.
15599         (growth_likely_positive): Likewise.
15600         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15601         (inline_call): Likewise.
15602         * ipa-inline.c (caller_growth_limits): Likewise.
15603         (can_inline_edge_p): Likewise.
15604         (can_inline_edge_by_limits_p): Likewise.
15605         (compute_uninlined_call_time): Likewise.
15606         (compute_inlined_call_time): Likewise.
15607         (want_inline_small_function_p): Likewise.
15608         (edge_badness): Likewise.
15609         (update_caller_keys): Likewise.
15610         (update_callee_keys): Likewise.
15611         (inline_small_functions): Likewise.
15612         (inline_to_all_callers_1): Likewise.
15613         (dump_overall_stats): Likewise.
15614         (early_inline_small_functions): Likewise.
15615         (early_inliner): Likewise.
15616         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15617         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15618         * ipa-pure-const.c (malloc_candidate_p): Likewise.
15619         * ipa-split.c (execute_split_functions): Likewise.
15620         * symbol-summary.h: Likewise.
15621         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15623 2018-06-19  Richard Biener  <rguenther@suse.de>
15625         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15626         (vectorize_loops): ... here.  Fix dbgcnt handling.
15627         (try_vectorize_loop): Wrap try_vectorize_loop_1.
15629 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
15631         PR target/86197
15632         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15633         ieee128 argument takes up only one (vector) register, not two (floating
15634         point) registers.
15636 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
15638         * gimplify.c (gimplify_init_constructor): Really never clear for an
15639         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15641 2018-06-19  Richard Biener  <rguenther@suse.de>
15643         PR tree-optimization/86179
15644         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15645         after failed recognition.
15647 2018-06-18  Martin Sebor  <msebor@redhat.com>
15649         PR middle-end/85602
15650         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15651         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15652         Handle integer subtraction.
15653         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15654         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15656 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15658         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15659         param from rtx to rtx_insn *.
15660         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15661         param.
15662         (frv_ifcvt_modify_insn): Likwise.
15663         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15664         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
15665         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15666         as_a <rtx_insn *> cast to local "unprotected_region" once
15667         it's been established that it's not NULL or pc_rtx.
15668         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15669         param "sethi" from rtx to rtx_insn *.
15670         (nds32_group_float_insns): Likewise for param "insn".
15671         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15672         param.
15673         (vax_output_int_subtract): Likewise.
15674         * config/vax/vax.c (vax_output_int_add): Likewise for param
15675         "insn".
15676         (vax_output_int_subtract): Likewise.
15677         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15678         (emit_pattern_after): Likewise for param "after".
15679         (emit_insn_after): Likewise.
15680         (emit_jump_insn_after): Likewise.
15681         (emit_call_insn_after): Likewise.
15682         (emit_debug_insn_after): Likewise.
15683         (emit_pattern_before): Likewise for param "before".
15684         (emit_insn_before): Likewise.
15685         (emit_jump_insn_before): Likewise.
15686         * final.c (get_insn_template): Likewise for param "insn", removing
15687         a cast.
15688         * output.h (get_insn_template): Likewise for 2nd param.
15689         * rtl.h (emit_insn_before): Likewise.
15690         (emit_jump_insn_before): Likewise.
15691         (emit_debug_insn_before_noloc): Likewise.
15692         (emit_insn_after): Likewise.
15693         (emit_jump_insn_after): Likewise.
15694         (emit_call_insn_after): Likewise.
15695         (emit_debug_insn_after): Likewise.
15696         (set_insn_deleted): Likewise for param.
15698 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
15700         PR target/85358
15701         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15702         floating point modes, so that IFmode is numerically greater than
15703         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15704         to declare the ordering.  This prevents IFmode from being
15705         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15706         machine.  Include rs6000-modes.h to share the fractional values
15707         between genmodes* and the rest of the compiler.
15708         (IFmode): Likewise.
15709         (KFmode): Likewise.
15710         (TFmode): Likewise.
15711         * config/rs6000/rs6000-modes.h: New file.
15712         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15713         meaning of rs6000_long_double_size so that 126..128 selects an
15714         appropriate 128-bit floating point type.
15715         (rs6000_option_override_internal): Likewise.
15716         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15717         (TARGET_LONG_DOUBLE_128): Change the meaning of
15718         rs6000_long_double_size so that 126..128 selects an appropriate
15719         128-bit floating point type.
15720         (LONG_DOUBLE_TYPE_SIZE): Update comment.
15721         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15722         source and destination to match the standard usage.
15723         (truncifkf2): Likewise.
15724         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15725         ISA 2.07 to use an explicit clobber, instead of passing in a
15726         temporary.
15727         (copysign<mode>3_soft): Likewise.
15729 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
15731         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15732         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15733         (vect_slp_analyze_instance_dependence): Likewise.
15734         (vect_enhance_data_refs_alignment): Likewise.
15735         (vect_analyze_data_refs_alignment): Likewise.
15736         (vect_slp_analyze_and_verify_instance_alignment
15737         (vect_analyze_data_ref_accesses): Likewise.
15738         (vect_prune_runtime_alias_test_list): Likewise.
15739         (vect_analyze_data_refs): Likewise.
15740         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15741         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15742         (vect_analyze_scalar_cycles_1): Likewise.
15743         (vect_get_loop_niters): Likewise.
15744         (vect_analyze_loop_form_1): Likewise.
15745         (vect_update_vf_for_slp): Likewise.
15746         (vect_analyze_loop_operations): Likewise.
15747         (vect_analyze_loop): Likewise.
15748         (vectorizable_induction): Likewise.
15749         (vect_transform_loop): Likewise.
15750         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15751         * tree-vect-slp.c (vect_analyze_slp): Likewise.
15752         (vect_make_slp_decision): Likewise.
15753         (vect_detect_hybrid_slp): Likewise.
15754         (vect_slp_analyze_operations): Likewise.
15755         (vect_slp_bb): Likewise.
15756         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15757         (vectorizable_bswap): Likewise.
15758         (vectorizable_call): Likewise.
15759         (vectorizable_simd_clone_call): Likewise.
15760         (vectorizable_conversion): Likewise.
15761         (vectorizable_assignment): Likewise.
15762         (vectorizable_shift): Likewise.
15763         (vectorizable_operation): Likewise.
15764         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15766 2018-06-18  Martin Sebor  <msebor@redhat.com>
15768         PR tree-optimization/81384
15769         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15770         * builtins.c (expand_builtin_strnlen): New function.
15771         (expand_builtin): Call it.
15772         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15773         * builtins.def (BUILT_IN_STRNLEN): New.
15774         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15775         Warn for bounds in excess of maximum object size.
15776         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15777         single-value ranges.  Handle strnlen.
15778         (handle_builtin_strlen): Handle strnlen.
15779         (strlen_check_and_optimize_stmt): Same.
15780         * doc/extend.texi (Other Builtins): Document strnlen.
15782 2018-06-18  Maya Rashish  <coypu@sdf.org>
15784         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15785         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15786         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15788         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15789         here to ...
15790         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15792 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15794         * tree.c (escaped_string::escape): Replace cast to char * by
15795         const_cast<char *> (unescaped).
15797 2018-06-18  Nick Clifton  <nickc@redhat.com>
15799         PR 84195
15800         * tree.c (escaped_string): New class.  Converts an unescaped
15801         string into its escaped equivalent.
15802         (warn_deprecated_use): Use the new class to convert the
15803         deprecation message, if present.
15804         (test_escaped_strings): New self test.
15805         (test_c_tests): Add test_escaped_strings.
15806         * doc/extend.texi (deprecated): Add a note that the
15807         deprecation message is affected by the -fmessage-length
15808         option, and that control characters will be escaped.
15809         (#pragma GCC error): Document this pragma.
15810         (#pragma GCC warning): Likewise.
15811         * doc/invoke.texi (-fmessage-length): Document this option's
15812         effect on the #warning and #error preprocessor directives and
15813         the deprecated attribute.
15815 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
15817         * tree.c (decl_value_expr_lookup): Revert latest change.
15818         (decl_value_expr_insert): Likewise.
15820 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
15822         * gimplify.c (nonlocal_vlas): Delete.
15823         (nonlocal_vla_vars): Likewise.
15824         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15825         referenced VLAs.
15826         (gimplify_body): Do not create and destroy nonlocal_vlas.
15827         * tree-nested.c: Include diagnostic.h.
15828         (use_pointer_in_frame): Tweak.
15829         (lookup_field_for_decl): Add assertion and declare the transformation.
15830         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15831         internal error when the reference is in a wrong context.  Do not
15832         create a debug decl by default.
15833         (note_nonlocal_block_vlas): Delete.
15834         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15835         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
15836         create a debug decl by default.
15837         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15838         call is in a wrong context.
15839         (fixup_vla_decls): New function.
15840         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
15841         debug variables were created.
15842         * tree.c (decl_value_expr_lookup): Add checking assertion.
15843         (decl_value_expr_insert): Likewise.
15845 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15847         PR middle-end/82479
15848         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15849         * tree-scalar-evolution.c (interpret_expr): Likewise.
15850         (expression_expensive_p): Likewise.
15851         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15852         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15853         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15854         (ssa_defined_by_minus_one_stmt_p): New.
15856 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
15858         PR middle-end/64946
15859         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15860         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15861         * dojump.c (do_jump): Likewise.
15862         * expr.c (expand_expr_real_2): Check operand type's sign.
15863         * fold-const.c (const_unop): Handle ABSU_EXPR.
15864         (fold_abs_const): Likewise.
15865         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15866         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15867         (strip_sign_op_1): Likesise.
15868         * match.pd: Add new pattern to generate ABSU_EXPR.
15869         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15870         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15871         * tree-eh.c (operation_could_trap_helper_p): Likewise.
15872         * tree-inline.c (estimate_operator_cost): Likewise.
15873         * tree-pretty-print.c (dump_generic_node): Likewise.
15874         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15875         * tree.def (ABSU_EXPR): New.
15877 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
15879         PR middle-end/86095
15880         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15881         documented as preserved for backward compatibility only.
15882         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15884         PR rtl-optimization/86108
15885         * bb-reorder.c (create_forwarder_block): Renamed to ...
15886         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
15887         jump from new landing pad to the second part.
15888         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15889         Adjust callers.
15891 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
15893         PR middle-end/85878
15894         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15895         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15896         Only call store_expr for halves if the mode is the same.
15898         PR middle-end/86123
15899         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15900         Fix up comment formatting.
15902 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15904         * typed-splay-tree.h (typed_splay_tree::remove): New function.
15905         (typed_splay_tree::closure,
15906         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15907         (typed_splay_tree::typed_splay_tree,
15908         typed_splay_tree::operator =): Declared private.
15909         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15910         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15911         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15912         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15913         typed_splay_tree::splay_tree_splay,
15914         typed_splay_tree::splay_tree_foreach_helper,
15915         typed_splay_tree::splay_tree_insert,
15916         typed_splay_tree::splay_tree_remove,
15917         typed_splay_tree::splay_tree_lookup,
15918         typed_splay_tree::splay_tree_predecessor,
15919         typed_splay_tree::splay_tree_successor,
15920         typed_splay_tree::splay_tree_min,
15921         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15922         (typed_splay_tree::root, typed_splay_tree::comp,
15923         typed_splay_tree::delete_key,
15924         typed_splay_tree::delete_value): New data members.
15925         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15926         typed_splay_tree::remove.
15928 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
15930         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15931         -mginv and -mno-ginv to the assembler.
15932         * config/mips/mips.opt (-mcrc): New option.
15933         (-mginv): Likewise.
15934         * doc/invoke.text (-mcrc): Document.
15935         (-mginv): Likewise.
15937 2018-06-15  Nick Clifton  <nickc@redhat.com>
15939         PR 84195
15940         * tree.c (escaped_string): New class.  Converts an unescaped
15941         string into its escaped equivalent.
15942         (warn_deprecated_use): Use the new class to convert the
15943         deprecation message, if present.
15944         (test_escaped_strings): New self test.
15945         (test_c_tests): Add test_escaped_strings.
15946         * doc/extend.texi (deprecated): Add a note that the
15947         deprecation message is affected by the -fmessage-length
15948         option, and that control characters will be escaped.
15949         (#pragma GCC error): Document this pragma.
15950         (#pragma GCC warning): Likewise.
15951         * doc/invoke.texi (-fmessage-length): Document this option's
15952         effect on the #warning and #error preprocessor directives and
15953         the deprecated attribute.
15955 2018-06-15  Richard Biener  <rguenther@suse.de>
15957         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15958         here, also noting vector size used.
15959         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
15960         size used in MSG_OPTIMIZED_LOCATIONS dump.
15961         (pass_slp_vectorize::execute): Adjust.
15963 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
15965         PR target/85968
15966         * config/arc/arc.c (arc_return_address_register): Fix
15967         if-condition.
15969 2018-06-15  Richard Biener  <rguenther@suse.de>
15971         PR middle-end/86159
15972         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15973         leave useless conversion stripping to force_gimple_operand_gsi.
15974         (gimplify_build2): Likewise.
15975         (gimplify_build1): Likewise.
15977 2018-06-15  Richard Biener  <rguenther@suse.de>
15979         PR middle-end/86076
15980         * tree-cfg.c (move_stmt_op): unshare invariant addresses
15981         before adjusting their block.
15983 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
15985         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15986         multilibs for *-*-rtems*.
15987         * config/riscv/t-rtems: New file.
15989 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
15991         PR middle-end/86122
15992         * match.pd ((A +- CST1) +- CST2): Punt if last resort
15993         unsigned_type_for returns NULL.
15995         PR target/85945
15996         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15997         subregs of multi-word pseudos unless the float mode has word size.
15999 2018-06-14  Richard Biener  <rguenther@suse.de>
16001         PR middle-end/86139
16002         * tree-vect-generic.c (build_word_mode_vector_type): Remove
16003         duplicate and harmful type_hash_canon.
16004         * tree.c (type_hash_canon): Assert we didn't find ourselves.
16006 2018-06-14  Richard Biener  <rguenther@suse.de>
16008         PR ipa/86124
16009         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
16010         NULL cgraph_node.
16012 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16014         * config/rtems.h (STDINT_LONG32): Define.
16016 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
16017             Prachi Godbole  <prachi.godbole@imgtec.com>
16019         * config/mips/mips-cpus.def: Define P6600.
16020         * config/mips/mips-tables.opt: Regenerate.
16021         * config/mips/mips.c (mips_ucbranch_type): New enum.
16022         (mips_rtx_cost_data): Add support for P6600.
16023         (mips_issue_rate): Likewise.
16024         (mips_multipass_dfa_lookahead): Likewise.
16025         (mips_avoid_hazard): Likewise.
16026         (mips_reorg_process_insns): Likewise.
16027         (mips_classify_branch_p6600): New function.
16028         * config/mips/mips.h (TUNE_P6600): New define.
16029         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
16030         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
16031         * config/mips/mips.md: Include p6600.md.
16032         (processor): Add p6600.
16033         * config/mips/p6600.md: New file.
16034         * doc/invoke.texi: Add p6600 to supported architectures.
16036 2018-06-13  Martin Sebor  <msebor@redhat.com>
16038         PR tree-optimization/86114
16039         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
16040         of integer types.
16041         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
16043 2018-06-13  Richard Biener  <rguenther@suse.de>
16045         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
16046         Properly set vector type of the intermediate stmt.
16047         * tree-vect-stmts.c (vectorizable_operation): The destination
16048         var always has vectype_out type.
16050 2018-06-13  Jeff Law  <law@redhat.com>
16052         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
16053         integer 0 for argument to print_rtl_with_bb.
16054         (rl78_reorg): Likewise.
16056 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
16058         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
16059         from rtx to rtx_insn *.
16060         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
16061         "label".
16062         (add_sched_insns_for_speculation): Likewise for local "target",
16063         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16064         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16065         from rtx_insn ** to rtx_code_label **.
16066         (reorg_emit_nops): Likewise.
16067         (c6x_reorg): Likewise for local "call_labels".
16068         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16069         rtx to rtx_insn *.
16070         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16071         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16072         the loops over LABEL_REFS.
16073         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16074         braf_label.
16075         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16076         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16077         (split_branches): Strengthen local "olabel" from rtx to
16078         rtx_insn *, adding a safe_as_a cast.
16079         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16080         to "rtx_insn *".
16081         (add_insn_after): Likewise for first two params.
16082         (add_insn_before): Likewise.
16083         (remove_insn): Likewise for param.
16084         (emit_pattern_before_noloc): Likewise for second and third params.
16085         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16086         (emit_call_insn_before_noloc): Likewise.
16087         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16088         to "rtx_insn *".
16089         (emit_barrier_before): Likewise.
16090         (emit_label_before): Strengthen "label" param from "rtx" to
16091         "rtx_code_label *".  Strengthen "before" param from "rtx" to
16092         "rtx_insn *".
16093         (emit_insn_after_1): Strengthen "after" param from "rtx" to
16094         "rtx_insn *".
16095         (emit_pattern_after_noloc): Likewise.
16096         (emit_insn_after_noloc): Likewise.
16097         (emit_jump_insn_after_noloc): Likewise.
16098         (emit_call_insn_after_noloc): Likewise.
16099         (emit_debug_insn_after_noloc): Likewise.
16100         (emit_barrier_after): Likewise.
16101         (emit_label_after): Likewise for both params.
16102         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
16103         "loc" param from "int" to "location_t".
16104         (emit_insn_after_setloc): Likewise.
16105         (emit_jump_insn_after_setloc): Likewise.
16106         (emit_call_insn_after_setloc): Likewise.
16107         (emit_debug_insn_after_setloc): Likewise.
16108         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
16109         "loc" param from "int" to "location_t".
16110         (emit_pattern_before): Convert NULL_RTX to NULL.
16111         (emit_insn_before_setloc): Convert "loc" param from "int" to
16112         "location_t".
16113         (emit_jump_insn_before_setloc): Likewise.
16114         (emit_call_insn_before_setloc): Likewise.
16115         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16116         rtx_insn *.  Convert "loc" param from "int" to "location_t".
16117         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16118         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16119         Convert 3rd param from "int" to "location_t".
16120         (emit_barrier_before, emit_barrier_after, next_real_insn):
16121         Strengthen param from rtx to rtx_insn *.
16122         (emit_label_before): Strengthen 1st param from "rtx" to
16123         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
16124         "rtx_insn *".
16125         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16126         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16127         Strengthen 2nd param from "rtx" to "rtx_insn *".
16128         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16129         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16130         Likewise. Convert 3rd param from "int" to "location_t".
16131         (emit_label_after): Strengthen 1st param from "rtx" to
16132         "rtx_code_label *".
16133         (next_real_insn, remove_insn): Strengthen param from "rtx" to
16134         "rtx_insn *".
16135         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16136         from "rtx" to "rtx_insn *".
16138 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
16140         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16141         bodies streamed in with -Q.
16142         * dumpfile.c (dump_files): Add lto-stream-out dump file.
16143         * dumpfile.h (tree_dump_index): Add lto_stream_out.
16144         * gimple-streamer-out.c: Include gimple-pretty-print.h
16145         (output_bb): Dump stmts streamed.
16146         * lto-section-out.c: Include print-tree.h
16147         (lto_begin_section): Dump sections created.
16148         (lto_output_decl_index): Dump decl encoded.
16149         * lto-streamer-out.c: Include print-tree.h
16150         (create_output_block): Dump output block created.
16151         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16152         (output_function): Dump function output.
16153         (output_constructor): Dump constructor streamed.
16154         (write_global_stream): Output indexes encoded.
16155         (produce_asm_for_decls): Dump streams encoded.
16156         * lto-streamer.c (streamer_dump_file): New global var.
16157         * lto-streamer.h (streamer_dump_file): Declare.
16158         * passes.c (ipa_write_summaries): Initialize streamer dump.
16159         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16160         in.
16162 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
16164         PR target/86048
16165         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16166         offsets for register save directives.  Emit a second batch of save
16167         directives, if need be, when the function accesses prior frames.
16169 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16171         * config/arc/fpu.md (fmasf4): Force operand to register.
16172         (fnmasf4): Likewise.
16174 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16176         * config/arc/arc-protos.h (arc_pad_return): Remove.
16177         * config/arc/arc.c (machine_function): Remove force_short_suffix
16178         and size_reason.
16179         (arc_print_operand): Adjust printing of '&'.
16180         (arc_verify_short): Remove conditional printing of short suffix.
16181         (arc_final_prescan_insn): Remove reference to size_reason.
16182         (pad_return): New function.
16183         (arc_reorg): Call pad_return.
16184         (arc_pad_return): Remove.
16185         (arc_init_machine_status): Remove reference to force_short_suffix.
16186         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16187         (attr length): When attribute iscompact is true force to 2
16188         regardless; in the case of maybe check if we want to force the
16189         instruction to have 4 bytes length.
16190         (nopv): Change it to generate 4 byte long nop as well.
16191         (blockage): New pattern.
16192         (simple_return): Remove call to arc_pad_return.
16193         (p_return_i): Likewise.
16195 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16197         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16199 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16201         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16202         ARC cores.
16204 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16206         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16207         for ARC700 and ARCv2.
16209 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
16211         PR target/86076
16212         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16213         operands[2] instead of operands[1].
16216 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
16218         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16219         case, check whether the outer register overlaps an unallocatable
16220         register, not just whether it fits the required class.
16222 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
16224         * poly-int.h (can_div_trunc_p): Add new overload in which all values
16225         are poly_ints.
16226         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16227         (memrefs_conflict_p): Likewise.
16228         (init_alias_analysis): Likewise.
16229         * cfgexpand.c (expand_debug_expr): Likewise.
16230         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16231         * cse.c (fold_rtx): Likewise.
16232         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16233         * expr.c (emit_block_move_hints): Likewise.
16234         (clear_storage_hints, push_block, emit_push_insn): Likewise.
16235         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16236         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
16237         (emit_group_store): Likewise.
16238         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
16239         to read the PRE/POST_MODIFY increment.
16240         * calls.c (store_one_arg): Use strip_offset.
16241         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
16242         poly_int_rtx_p.
16243         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
16244         by a VEC_SELECT.
16245         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
16246         (simplify_binary_operation_1): Extend CONST_INT handling to
16247         poly_int_rtx_p.
16248         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
16249         than a HOST_WIDE_INT.
16250         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
16251         poly_int64.
16252         (adjust_mems, add_stores): Update accodingly.
16253         (vt_canonicalize_addr): Track polynomial offsets.
16254         (emit_note_insn_var_location): Likewise.
16255         (vt_add_function_parameter): Likewise.
16256         (vt_initialize): Likewise.
16258 2018-06-12  Jeff Law  <law@redhat.com>
16260         * config.gcc (alpha*-*-freebsd*): Remove.
16261         * config/alpha/freebsd.h: Remove.
16263 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
16265         PR other/69968
16266         * spellcheck-tree.c (levenshtein_distance): Rename to...
16267         (get_edit_distance): ...this, and update for underlying renaming.
16268         * spellcheck-tree.h (levenshtein_distance): Rename to...
16269         (get_edit_distance): ...this.
16270         * spellcheck.c (levenshtein_distance): Rename to...
16271         (get_edit_distance): ...this.  Convert from Levenshtein distance
16272         to Damerau-Levenshtein distance by supporting transpositions of
16273         adjacent characters.  Rename "v1" to "v_next" and "v0" to
16274         "v_one_ago".
16275         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
16276         (selftest::test_edit_distance_unit_test_oneway): ...this, and
16277         update for underlying renaming.
16278         (selftest::levenshtein_distance_unit_test): Rename to...
16279         (selftest::test_get_edit_distance_unit): ...this, and update for
16280         underlying renaming.
16281         (selftest::test_find_closest_string): Add example from PR 69968
16282         where transposition helps
16283         (selftest::test_metric_conditions): Update for renaming.
16284         (selftest::test_metric_conditions): Likewise.
16285         (selftest::spellcheck_c_tests): Likewise.
16286         * spellcheck.h (levenshtein_distance): Rename both overloads to...
16287         (get_edit_distance): ...this.
16288         (best_match::consider): Update for renaming.
16290 2018-06-12  Martin Sebor  <msebor@redhat.com>
16292         PR tree-optimization/85259
16293         * builtins.c (compute_objsize): Handle constant offsets.
16294         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
16295         true iff a warning has been issued.
16296         * gimple.h (gimple_nonartificial_location): New function.
16297         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
16298         gimple_nonartificial_location and handle -Wno-system-headers.
16299         (handle_builtin_stxncpy): Same.
16301 2018-06-12  Martin Sebor  <msebor@redhat.com>
16303         PR c/85931
16304         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
16306 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
16308         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
16309         BUILTIN_VEC_XST entries for pointer to double and long long.
16311 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
16313         PR target/85990
16314         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16315         Update comments.
16316         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
16317         Likewise.
16319 2018-06-12  Martin Liska  <mliska@suse.cz>
16321         * doc/options.texi: Document IntegerRange.
16323 2018-06-12  Martin Liska  <mliska@suse.cz>
16325         * config/i386/i386.opt: Make MPX-related options as Deprecated.
16326         * opt-functions.awk: Handle Deprecated flag.
16327         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
16328         and report error.
16329         (read_cmdline_option): Report warning for a deprecated option.
16330         * opts.h (struct cl_option): Add new field cl_deprecated.
16331         (CL_ERR_DEPRECATED): New.
16333 2018-06-12  Martin Liska  <mliska@suse.cz>
16335         * doc/options.texi: Document Deprecated option flag.
16337 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16339         * config/arc/arc-arch.h (arc_extras): New enum.
16340         (arc_cpu_t):Add field extra.
16341         (arc_cpu_types): Consider the extras.
16342         * config/arc/arc-cpus.def: Add extras info.
16343         * config/arc/arc-opts.h (processor_type): Consider extra field.
16344         * config/arc/arc.c (arc_override_options): Handle extra field.
16346 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16348         * config/arc/arc-arch.h: Update ARC_OPTX macro.
16349         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
16350         field.
16351         * config/arc/arc.c (arc_init): Update pic warning.
16352         (irq_range): Update irq range parsing warnings.
16353         (arc_override_options): Update various warning messages.
16354         (arc_handle_aux_attribute): Likewise.
16356 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
16358         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
16360 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16362         * doc/sourcebuild.texi: Document usage of line number 0 in verify
16363         compiler messages directives.
16365 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
16367         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
16368         * config/mips/mips-tables.opt: Regenerate.
16369         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
16370         mips64r6.
16371         * doc/invoke.texi: Document -march=i6500.
16373 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
16375         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
16376         (i6400_gpmul): Add cpu_unit.
16377         (i6400_gpdiv): Likewise.
16378         (i6400_msa_add_d): Update reservations.
16379         (i6400_msa_int_add) Likewise.
16380         (i6400_msa_short_logic3) Likewise.
16381         (i6400_msa_short_logic2) Likewise.
16382         (i6400_msa_short_logic) Likewise.
16383         (i6400_msa_move) Likewise.
16384         (i6400_msa_cmp) Likewise.
16385         (i6400_msa_short_float2) Likewise.
16386         (i6400_msa_div_d) Likewise.
16387         (i6400_msa_long_logic1) Likewise.
16388         (i6400_msa_long_logic2) Likewise.
16389         (i6400_msa_mult) Likewise.
16390         (i6400_msa_long_float2) Likewise.
16391         (i6400_msa_long_float4) Likewise.
16392         (i6400_msa_long_float5) Likewise.
16393         (i6400_msa_long_float8) Likewise.
16394         (i6400_fpu_fadd): Include frint type.
16395         (i6400_fpu_store): New define_insn_reservation.
16396         (i6400_fpu_load): Likewise.
16397         (i6400_fpu_move): Likewise.
16398         (i6400_fpu_fcmp): Likewise.
16399         (i6400_fpu_fmadd): Likewise.
16400         (i6400_int_mult): Include imul3nc type and update reservation.
16401         (i6400_int_div): Include idiv3 type and update reservation.
16402         (i6400_int_load): Update to check type not move_type.
16403         (i6400_int_store): Likewise.
16404         (i6400_int_prefetch): Set zero latency.
16406 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
16408         * gcc.c: Document new %@{...} sequence.
16409         (LINK_COMMAND_SPEC): Use it for the -L switches.
16410         (cpp_unique_options): Use it for the -I switches.
16411         (at_file_argbuf): New global variable.
16412         (in_at_file): Likewise.
16413         (alloc_args): Create at_file_argbuf.
16414         (clear_args): Truncate at_file_argbuf.
16415         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
16416         (open_at_file): New function.
16417         (close_at_file): Likewise.
16418         (create_at_file): Delete.
16419         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
16420         <'o'>: Likewise.
16421         <'@'>: New case.
16422         (validate_switches_from_spec): Deal with %@{...} sequence.
16423         (validate_switches): Likewise.
16424         (driver::finalize): Call clear_args.
16426 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
16428         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
16430 2018-06-11  Martin Sebor  <msebor@redhat.com>
16432         * doc/invoke.texi (-Wall): List -Wc++17-compat.
16433         (Wno-class-memaccess): Add @opindex.
16434         (Wno-templates, Wno-multiple-inheritance): Same.
16435         (Wno-virtual-inheritance, Wno-namespaces): Same.
16436         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
16437         (Wno-format-overflow, Wno-format-truncation): Same.
16438         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
16439         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
16440         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
16441         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
16442         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
16443         (Wno-misspelled-isr): Same.
16445 2018-06-11  Martin Sebor  <msebor@redhat.com>
16447         * PR tree-optimization/86083
16448         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
16450 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
16452         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
16454 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
16456         PR target/85755
16457         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
16458         on the correct operand.
16459         (*movdi_internal64): Ditto.
16461 2018-06-11  Martin Liska  <mliska@suse.cz>
16463         PR tree-optimization/86089
16464         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
16466 2018-06-11  Julia Koval  <julia.koval@intel.com>
16468         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
16469         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
16470         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
16472 2018-06-11  Olivier Hainque  <hainque@adacore.com>
16474         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
16475         for Ada with strict dwarf2.
16477 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
16479         PR target/85755
16480         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
16481         addresses.
16483 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
16485         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
16487 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
16489         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16490         TARGET_ELF.
16492 2018-06-08  Martin Liska  <mliska@suse.cz>
16494         * tree-cfg.h (debug_function): Fix argument type to match
16495         implementation.
16497 2018-06-08  Martin Liska  <mliska@suse.cz>
16499         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16500         Remove usage of MPX-related (and removed) fields.
16501         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16503 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
16505         * cfg.c (debug): Use TDF_NONE rather than 0.
16506         * cfghooks.c (debug): Likewise.
16507         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16508         (struct dump_option_value_info): Convert to...
16509         (struct kv_pair): ...this template type.
16510         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16511         rather than 0.
16512         (optinfo_verbosity_options): Likewise.
16513         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16514         OPTGROUP_NONE.
16515         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16516         than int for "optgroup_flags" param.
16517         (dump_generic_expr_loc): Use dump_flags_t rather than int for
16518         "dump_kind" param.
16519         (dump_dec): Likewise.
16520         (dump_finish): Use TDF_NONE rather than 0.
16521         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16522         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
16523         than 0.  Update for change to option_ptr.
16524         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16525         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
16526         0.  Update for changes to optinfo_verbosity_options and
16527         optgroup_options.
16528         (opt_info_switch_p): Convert optgroup_flags from int to
16529         optgroup_flags_t.
16530         (dump_basic_block): Use dump_flags_t rather than int
16531         for "dump_kind" param.
16532         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16533         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16534         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16535         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16536         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16537         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16538         TDF_NONE): Convert from macros to...
16539         (enum dump_flag): ...this new enum.
16540         (dump_flags_t): Update to use enum.
16541         (operator|, operator&, operator~, operator|=, operator&=):
16542         Implement for dump_flags_t.
16543         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16544         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16545         Convert from macros to...
16546         (enum optgroup_flag): ...this new enum.
16547         (optgroup_flags_t): New typedef.
16548         (operator|, operator|=): Implement for optgroup_flags_t.
16549         (struct dump_file_info): Convert field "alt_flags" to
16550         dump_flags_t.  Convert field "optgroup_flags" to
16551         optgroup_flags_t.
16552         (dump_basic_block): Use dump_flags_t rather than int for param.
16553         (dump_generic_expr_loc): Likewise.
16554         (dump_dec): Likewise.
16555         (dump_register): Convert param "optgroup_flags" to
16556         optgroup_flags_t.
16557         (opt_info_enable_passes): Likewise.
16558         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16559         than 0.
16560         * gimple-pretty-print.c (debug): Likewise.
16561         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16562         (merged_store_group::apply_stores): Likewise.
16563         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16564         * gimple.c (verify_gimple_pp): Likewise.
16565         * graphite-poly.c (print_pbb_body): Likewise.
16566         * passes.c (pass_manager::register_one_dump_file): Convert
16567         local "optgroup_flags" to optgroup_flags_t.
16568         * print-tree.c (print_node): Use TDF_NONE rather than 0.
16569         (debug): Likewise.
16570         (debug_body): Likewise.
16571         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16572         to optgroup_flags_t.
16573         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16574         than 0.
16575         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16576         (convert_mult_to_fma): Likewise.
16577         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16578         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16579         * tree-vect-data-refs.c (dump_lower_bound): Convert param
16580         "dump_kind" to dump_flags_t.
16582 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
16584         * config/rs6000/rs6000.c (min, max): Delete.
16586 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
16588         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16589         -mabi=spe and -mabi=no-spe.
16591 2018-06-08  Martin Liska  <mliska@suse.cz>
16593         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16594         where we expect an existing summary.
16596 2018-06-08  Martin Liska  <mliska@suse.cz>
16598         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16599         * ipa-inline.h (estimate_edge_growth): Likewise.
16601 2018-06-08  Martin Liska  <mliska@suse.cz>
16603         * cgraph.c (function_version_hasher::hash): Use
16604         cgraph_node::get_uid ().
16605         (function_version_hasher::equal):
16606         * cgraph.h (cgraph_node::get_uid): New method.
16607         * ipa-inline.c (update_caller_keys): Use
16608         cgraph_node::get_uid ().
16609         (update_callee_keys): Likewise.
16610         * ipa-utils.c (searchc): Likewise.
16611         (ipa_reduced_postorder): Likewise.
16612         * lto-cgraph.c (input_node): Likewise.
16613         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16614         * symbol-summary.h (symtab_insertion): Likewise.
16615         (symtab_removal): Likewise.
16616         (symtab_duplication): Likewise.
16617         * tree-pretty-print.c (dump_function_header): Likewise.
16618         * tree-sra.c (convert_callers_for_node): Likewise.
16620 2018-06-08  Martin Liska  <mliska@suse.cz>
16622         * cgraph.c (symbol_table::create_edge): Always assign a new
16623         unique number.
16624         (symbol_table::free_edge): Do not recycle numbers.
16625         * cgraph.h (cgraph_edge::get): New method.
16626         * symbol-summary.h (symtab_removal): Use it.
16627         (symtab_duplication): Likewise.
16628         (call_summary::hashable_uid): Remove.
16630 2018-06-08  Martin Liska  <mliska@suse.cz>
16632         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16633         (initialize_growth_caches): Remove.
16634         (free_growth_caches): Likewise.
16635         (do_estimate_edge_time): Use edge_growth_cache.
16636         (do_estimate_edge_size): Likewise.
16637         (do_estimate_edge_hints): Likewise.
16638         * ipa-inline.c (reset_edge_caches): Likewise.
16639         (recursive_inlining): Likewise.
16640         (inline_small_functions): Likewise.
16641         * ipa-inline.h (initialize_growth_caches): Remove.
16642         (estimate_edge_size): Likewise.
16643         (estimate_edge_time): Likewise.
16644         (estimate_edge_hints): Likewise.
16645         (reset_edge_growth_cache): Likewise.
16646         * symbol-summary.h (call_summary::remove): New method.
16648 2018-06-08  Martin Liska  <mliska@suse.cz>
16650         * ipa-cp.c (class edge_clone_summary): New summary.
16651         (grow_edge_clone_vectors): Remove.
16652         (ipcp_edge_duplication_hook): Remove.
16653         (class edge_clone_summary_t): New call_summary class.
16654         (ipcp_edge_removal_hook): Remove.
16655         (edge_clone_summary_t::duplicate): New function.
16656         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16657         (create_specialized_node): Likewise.
16658         (ipcp_driver): Initialize edge_clone_summaries and do not
16659         register hooks.
16661 2018-06-08  Martin Liska  <mliska@suse.cz>
16663         * symbol-summary.h (get): New function.
16664         (call_summary::m_initialize_when_cloning): New class member.
16666 2018-06-08  Martin Liska  <mliska@suse.cz>
16668         * cgraph.c (cgraph_node::remove): Do not recycle uid.
16669         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16670         (symbol_table::allocate_cgraph_symbol): Do not set uid.
16671         * passes.c (uid_hash_t): Record removed_nodes by their uids.
16672         (remove_cgraph_node_from_order): Use the removed_nodes set.
16673         (do_per_function_toporder): Likwise.
16674         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16675         instead of summary_uid.
16676         (symtab_removal): Likewise.
16677         (symtab_duplication): Likewise.
16679 2018-06-08  Martin Liska  <mliska@suse.cz>
16681         * ipa-cp.c (ipcp_store_bits_results): Use
16682         ipcp_transformation_sum.
16683         (ipcp_store_vr_results): Likewise.
16684         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16685         to ...
16686         (ipcp_transformation_initialize): ... this.
16687         (ipa_set_node_agg_value_chain):
16688         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16689         (write_ipcp_transformation_info): Likewise.
16690         (read_ipcp_transformation_info): Likewise.
16691         (ipcp_update_bits): Likewise.
16692         (ipcp_update_vr): Likewise.
16693         (ipcp_transform_function): Likewise.
16694         * ipa-prop.h: Rename ipcp_transformation_summary to
16695         ipcp_transformation.
16696         (class ipcp_transformation_t): New function summary.
16697         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16698         (ipa_get_agg_replacements_for_node): Likewise.
16700 2018-06-08  Martin Liska  <mliska@suse.cz>
16702         * ipa-pure-const.c (struct funct_state_d): Do it class instead
16703         of struct.
16704         (class funct_state_summary_t): New function_summary class.
16705         (has_function_state): Remove.
16706         (get_function_state): Likewise.
16707         (set_function_state): Likewise.
16708         (add_new_function): Likewise.
16709         (funct_state_summary_t::insert): New function.
16710         (duplicate_node_data): Remove.
16711         (remove_node_data): Remove.
16712         (funct_state_summary_t::duplicate): New function.
16713         (register_hooks): Create new funct_state_summaries.
16714         (pure_const_generate_summary): Use it.
16715         (pure_const_write_summary): Likewise.
16716         (pure_const_read_summary): Likewise.
16717         (propagate_pure_const): Likewise.
16718         (propagate_nothrow): Likewise.
16719         (dump_malloc_lattice): Likewise.
16720         (propagate_malloc): Likewise.
16721         (execute): Do not register hooks, just remove summary
16722         instead.
16723         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16724         constructor.
16726 2018-06-08  Martin Liska  <mliska@suse.cz>
16728         * ipa-reference.c (remove_node_data): Remove.
16729         (duplicate_node_data): Likewise.
16730         (class ipa_ref_var_info_summary_t): New class.
16731         (class ipa_ref_opt_summary_t): Likewise.
16732         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16733         (get_reference_optimization_summary): Use
16734         ipa_ref_opt_sum_summaries.
16735         (set_reference_vars_info): Remove.
16736         (set_reference_optimization_summary): Likewise.
16737         (ipa_init): Create summaries.
16738         (init_function_info): Use function summary.
16739         (ipa_ref_opt_summary_t::duplicate): New function.
16740         (ipa_ref_opt_summary_t::remove): New function.
16741         (get_read_write_all_from_node): Fix GNU coding style.
16742         (propagate): Use function summary.
16743         (write_node_summary_p): Fix GNU coding style.
16744         (stream_out_bitmap): Likewise.
16745         (ipa_reference_read_optimization_summary): Use function summary.
16746         (ipa_reference_c_finalize): Do not release hooks.
16748 2018-06-08  Martin Liska  <mliska@suse.cz>
16750         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16751         (analyze_function_body): Extract multiple calls of get_create.
16752         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16753         * ipa-inline.c (recursive_inlining): Use ::get method.
16754         * ipa-inline.h (estimate_edge_growth): Likewise.
16756 2018-06-08  Martin Liska  <mliska@suse.cz>
16758         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16759         HSA_INVALID.
16760         (hsa_function_summary::hsa_function_summary): Use the new enum
16761         value.
16762         (hsa_gpu_implementation_p): Use hsa_summaries::get.
16763         * hsa-gen.c (hsa_get_host_function): Likewise.
16764         (get_brig_function_name): Likewise.
16765         * ipa-hsa.c (process_hsa_functions): Likewise.
16766         (ipa_hsa_write_summary): Likewise.
16767         * symbol-summary.h (symtab_duplication): Use ::get function/
16768         (get): New function.
16770 2018-06-08  Martin Liska  <mliska@suse.cz>
16772         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16773         of get.
16774         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16775         (hsa_register_kernel): Likewise.
16776         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16777         * hsa-gen.c (hsa_get_host_function): Likewise.
16778         (get_brig_function_name): Likewise.
16779         (generate_hsa): Likewise.
16780         (pass_gen_hsail::execute): Likewise.
16781         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16782         (devirtualization_time_bonus): Likewise.
16783         (ipcp_propagate_stage): Likewise.
16784         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16785         (edge_set_predicate): Likewise.
16786         (evaluate_conditions_for_known_args): Likewise.
16787         (evaluate_properties_for_edge): Likewise.
16788         (ipa_fn_summary::reset): Likewise.
16789         (ipa_fn_summary_t::duplicate): Likewise.
16790         (dump_ipa_call_summary): Likewise.
16791         (ipa_dump_fn_summary): Likewise.
16792         (analyze_function_body): Likewise.
16793         (compute_fn_summary): Likewise.
16794         (estimate_edge_devirt_benefit): Likewise.
16795         (estimate_edge_size_and_time): Likewise.
16796         (estimate_calls_size_and_time): Likewise.
16797         (estimate_node_size_and_time): Likewise.
16798         (inline_update_callee_summaries): Likewise.
16799         (remap_edge_change_prob): Likewise.
16800         (remap_edge_summaries): Likewise.
16801         (ipa_merge_fn_summary_after_inlining): Likewise.
16802         (ipa_update_overall_fn_summary): Likewise.
16803         (read_ipa_call_summary): Likewise.
16804         (inline_read_section): Likewise.
16805         (write_ipa_call_summary): Likewise.
16806         (ipa_fn_summary_write): Likewise.
16807         (ipa_free_fn_summary): Likewise.
16808         * ipa-hsa.c (process_hsa_functions): Likewise.
16809         (ipa_hsa_write_summary): Likewise.
16810         (ipa_hsa_read_section): Likewise.
16811         * ipa-icf.c (sem_function::merge): Likewise.
16812         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16813         (do_estimate_edge_time): Likewise.
16814         (estimate_size_after_inlining): Likewise.
16815         (estimate_growth): Likewise.
16816         (growth_likely_positive): Likewise.
16817         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16818         (inline_call): Likewise.
16819         * ipa-inline.c (caller_growth_limits): Likewise.
16820         (can_inline_edge_p): Likewise.
16821         (can_inline_edge_by_limits_p): Likewise.
16822         (compute_uninlined_call_time): Likewise.
16823         (compute_inlined_call_time): Likewise.
16824         (want_inline_small_function_p): Likewise.
16825         (edge_badness): Likewise.
16826         (update_caller_keys): Likewise.
16827         (update_callee_keys): Likewise.
16828         (recursive_inlining): Likewise.
16829         (inline_small_functions): Likewise.
16830         (inline_to_all_callers_1): Likewise.
16831         (dump_overall_stats): Likewise.
16832         (early_inline_small_functions): Likewise.
16833         (early_inliner): Likewise.
16834         * ipa-inline.h (estimate_edge_growth): Likewise.
16835         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16836         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16837         * ipa-prop.h (IPA_NODE_REF): Likewise.
16838         (IPA_EDGE_REF): Likewise.
16839         * ipa-pure-const.c (malloc_candidate_p): Likewise.
16840         (propagate_malloc): Likewise.
16841         * ipa-split.c (execute_split_functions): Likewise.
16842         * symbol-summary.h: Rename get to get_create.
16843         (get): Likewise.
16844         (get_create): Likewise.
16845         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16847 2018-06-08  Martin Liska  <mliska@suse.cz>
16849         * symbol-summary.h (release): Move definition out of class
16850         declaration.
16851         (symtab_removal): Likewise.
16852         (symtab_duplication): Likewise.
16854 2018-06-08  Martin Liska  <mliska@suse.cz>
16856         * symbol-summary.h (function_summary): Move constructor
16857         implementation out of class declaration.
16858         (release): Likewise.
16859         (symtab_insertion): Likewise.
16860         (symtab_removal): Likewise.
16861         (symtab_duplication): Likewise.
16862         (get): Likewise.
16864 2018-06-08  Martin Liska  <mliska@suse.cz>
16866         * Makefile.in: Remove support for MPX (macros, related functions,
16867         fields in cgraph_node, ...).
16868         * builtin-types.def (BT_BND): Likewise.
16869         (BT_FN_BND_CONST_PTR): Likewise.
16870         (BT_FN_CONST_PTR_BND): Likewise.
16871         (BT_FN_VOID_PTR_BND): Likewise.
16872         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16873         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16874         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16875         (expand_builtin_mempcpy_with_bounds): Likewise.
16876         (expand_builtin_memset_with_bounds): Likewise.
16877         (expand_builtin_memset_args): Likewise.
16878         (std_expand_builtin_va_start): Likewise.
16879         (expand_builtin): Likewise.
16880         (expand_builtin_with_bounds): Likewise.
16881         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16882         (DEF_LIB_BUILTIN_CHKP): Likewise.
16883         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16884         (DEF_CHKP_BUILTIN): Likewise.
16885         (BUILT_IN_MEMCPY): Likewise.
16886         (BUILT_IN_MEMMOVE): Likewise.
16887         (BUILT_IN_MEMPCPY): Likewise.
16888         (BUILT_IN_MEMSET): Likewise.
16889         (BUILT_IN_STPCPY): Likewise.
16890         (BUILT_IN_STRCAT): Likewise.
16891         (BUILT_IN_STRCHR): Likewise.
16892         (BUILT_IN_STRCPY): Likewise.
16893         (BUILT_IN_STRLEN): Likewise.
16894         (BUILT_IN_MEMCPY_CHK): Likewise.
16895         (BUILT_IN_MEMMOVE_CHK): Likewise.
16896         (BUILT_IN_MEMPCPY_CHK): Likewise.
16897         (BUILT_IN_MEMSET_CHK): Likewise.
16898         (BUILT_IN_STPCPY_CHK): Likewise.
16899         (BUILT_IN_STRCAT_CHK): Likewise.
16900         (BUILT_IN_STRCPY_CHK): Likewise.
16901         * calls.c (store_bounds): Likewise.
16902         (emit_call_1): Likewise.
16903         (special_function_p): Likewise.
16904         (maybe_warn_nonstring_arg): Likewise.
16905         (initialize_argument_information): Likewise.
16906         (finalize_must_preallocate): Likewise.
16907         (compute_argument_addresses): Likewise.
16908         (expand_call): Likewise.
16909         * cfgexpand.c (expand_call_stmt): Likewise.
16910         (expand_return): Likewise.
16911         (expand_gimple_stmt_1): Likewise.
16912         (pass_expand::execute): Likewise.
16913         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16914         (cgraph_node::remove): Likewise.
16915         (cgraph_node::dump): Likewise.
16916         (cgraph_node::verify_node): Likewise.
16917         * cgraph.h (chkp_function_instrumented_p): Likewise.
16918         (symtab_node::get_alias_target): Likewise.
16919         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16920         (cgraph_local_p): Likewise.
16921         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16922         (cgraph_edge::rebuild_references): Likewise.
16923         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16924         (walk_polymorphic_call_targets): Likewise.
16925         (cgraph_node::expand_thunk): Likewise.
16926         (symbol_table::output_weakrefs): Likewise.
16927         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16928         (ix86_handle_option): Likewise.
16929         * config/i386/constraints.md: Likewise.
16930         * config/i386/i386-builtin-types.def (BND): Likewise.
16931         (VOID): Likewise.
16932         (PVOID): Likewise.
16933         (ULONG): Likewise.
16934         * config/i386/i386-builtin.def (BDESC_END): Likewise.
16935         (BDESC_FIRST): Likewise.
16936         (BDESC): Likewise.
16937         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16938         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16939         * config/i386/i386.c (enum reg_class): Likewise.
16940         (ix86_target_string): Likewise.
16941         (ix86_option_override_internal): Likewise.
16942         (ix86_conditional_register_usage): Likewise.
16943         (ix86_valid_target_attribute_inner_p): Likewise.
16944         (ix86_set_indirect_branch_type): Likewise.
16945         (ix86_set_current_function): Likewise.
16946         (ix86_function_arg_regno_p): Likewise.
16947         (init_cumulative_args): Likewise.
16948         (ix86_function_arg_advance): Likewise.
16949         (ix86_function_arg): Likewise.
16950         (ix86_pass_by_reference): Likewise.
16951         (ix86_function_value_regno_p): Likewise.
16952         (ix86_function_value_1): Likewise.
16953         (ix86_function_value_bounds): Likewise.
16954         (ix86_return_in_memory): Likewise.
16955         (ix86_setup_incoming_vararg_bounds): Likewise.
16956         (ix86_va_start): Likewise.
16957         (indirect_thunk_need_prefix): Likewise.
16958         (print_reg): Likewise.
16959         (ix86_print_operand): Likewise.
16960         (ix86_expand_call): Likewise.
16961         (ix86_output_function_return): Likewise.
16962         (reg_encoded_number): Likewise.
16963         (BDESC_VERIFYS): Likewise.
16964         (ix86_init_mpx_builtins): Likewise.
16965         (ix86_init_builtins): Likewise.
16966         (ix86_emit_cmove): Likewise.
16967         (ix86_emit_move_max): Likewise.
16968         (ix86_expand_builtin): Likewise.
16969         (ix86_builtin_mpx_function): Likewise.
16970         (ix86_get_arg_address_for_bt): Likewise.
16971         (ix86_load_bounds): Likewise.
16972         (ix86_store_bounds): Likewise.
16973         (ix86_load_returned_bounds): Likewise.
16974         (ix86_store_returned_bounds): Likewise.
16975         (ix86_class_likely_spilled_p): Likewise.
16976         (ix86_hard_regno_mode_ok): Likewise.
16977         (x86_order_regs_for_local_alloc): Likewise.
16978         (ix86_mitigate_rop): Likewise.
16979         (ix86_bnd_prefixed_insn_p): Likewise.
16980         (ix86_mpx_bound_mode): Likewise.
16981         (ix86_make_bounds_constant): Likewise.
16982         (ix86_initialize_bounds): Likewise.
16983         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16984         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16985         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16986         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16987         (TARGET_CHKP_BOUND_MODE): Likewise.
16988         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16989         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16990         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16991         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16992         * config/i386/i386.h (TARGET_MPX): Likewise.
16993         (TARGET_MPX_P): Likewise.
16994         (VALID_BND_REG_MODE): Likewise.
16995         (FIRST_BND_REG): Likewise.
16996         (LAST_BND_REG): Likewise.
16997         (enum reg_class): Likewise.
16998         (BND_REG_P): Likewise.
16999         (BND_REGNO_P): Likewise.
17000         (BNDmode): Likewise.
17001         (ADJUST_INSN_LENGTH): Likewise.
17002         * config/i386/i386.md: Likewise.
17003         * config/i386/i386.opt: Likewise.
17004         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
17005         (defined): Likewise.
17006         (LINK_MPX): Likewise.
17007         (MPX_SPEC): Likewise.
17008         (LIBMPX_SPEC): Likewise.
17009         (LIBMPXWRAPPERS_SPEC): Likewise.
17010         (CHKP_SPEC): Likewise.
17011         * config/i386/predicates.md: Likewise.
17012         * dbxout.c (dbxout_type): Likewise.
17013         * doc/extend.texi: Likewise.
17014         * doc/invoke.texi: Likewise.
17015         * doc/md.texi: Likewise.
17016         * doc/tm.texi: Likewise.
17017         * doc/tm.texi.in: Likewise.
17018         * dwarf2out.c (is_base_type): Likewise.
17019         (gen_formal_types_die): Likewise.
17020         (gen_subprogram_die): Likewise.
17021         (gen_type_die_with_usage): Likewise.
17022         (gen_decl_die): Likewise.
17023         (dwarf2out_late_global_decl): Likewise.
17024         * expr.c (expand_assignment): Likewise.
17025         (emit_storent_insn): Likewise.
17026         (store_expr_with_bounds): Likewise.
17027         (store_expr): Likewise.
17028         (expand_expr_real_1): Likewise.
17029         * expr.h (store_expr_with_bounds): Likewise.
17030         * function.c (use_register_for_decl): Likewise.
17031         (struct bounds_parm_data): Likewise.
17032         (assign_parms_augmented_arg_list): Likewise.
17033         (assign_parm_find_entry_rtl): Likewise.
17034         (assign_parm_is_stack_parm): Likewise.
17035         (assign_parm_load_bounds): Likewise.
17036         (assign_bounds): Likewise.
17037         (assign_parms): Likewise.
17038         (expand_function_start): Likewise.
17039         * gcc.c (CHKP_SPEC): Likewise.
17040         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
17041         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
17042         (wrestrict_dom_walker::check_call): Likewise.
17043         * gimple.c (gimple_build_call_from_tree): Likewise.
17044         * gimple.h (enum gf_mask): Likewise.
17045         (gimple_call_with_bounds_p): Likewise.
17046         (gimple_call_set_with_bounds): Likewise.
17047         * gimplify.c (gimplify_init_constructor): Likewise.
17048         * ipa-cp.c (initialize_node_lattices): Likewise.
17049         (propagate_constants_across_call): Likewise.
17050         (find_more_scalar_values_for_callers_subset): Likewise.
17051         * ipa-hsa.c (process_hsa_functions): Likewise.
17052         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
17053         * ipa-icf.c (sem_function::merge): Likewise.
17054         * ipa-inline.c (early_inliner): Likewise.
17055         * ipa-pure-const.c (warn_function_noreturn): Likewise.
17056         (warn_function_cold): Likewise.
17057         (propagate_pure_const): Likewise.
17058         * ipa-ref.h (enum GTY): Likewise.
17059         * ipa-split.c (find_retbnd): Likewise.
17060         (consider_split): Likewise.
17061         (split_function): Likewise.
17062         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
17063         * ipa.c (walk_polymorphic_call_targets): Likewise.
17064         (symbol_table::remove_unreachable_nodes): Likewise.
17065         (process_references): Likewise.
17066         (cgraph_build_static_cdtor_1): Likewise.
17067         * lto-cgraph.c (lto_output_node): Likewise.
17068         (output_refs): Likewise.
17069         (compute_ltrans_boundary): Likewise.
17070         (input_overwrite_node): Likewise.
17071         (input_node): Likewise.
17072         (input_cgraph_1): Likewise.
17073         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17074         * passes.c (pass_manager::execute_early_local_passes): Likewise.
17075         (class pass_chkp_instrumentation_passes): Likewise.
17076         (make_pass_chkp_instrumentation_passes): Likewise.
17077         * passes.def: Likewise.
17078         * rtl.h (struct GTY): Likewise.
17079         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17080         * stor-layout.c (layout_type): Likewise.
17081         * symtab.c: Likewise.
17082         * target.def: Likewise.
17083         * targhooks.c (default_chkp_bound_type): Likewise.
17084         (default_chkp_bound_mode): Likewise.
17085         (default_builtin_chkp_function): Likewise.
17086         (default_chkp_function_value_bounds): Likewise.
17087         (default_chkp_make_bounds_constant): Likewise.
17088         (default_chkp_initialize_bounds): Likewise.
17089         * targhooks.h (default_chkp_bound_type): Likewise.
17090         (default_chkp_bound_mode): Likewise.
17091         (default_builtin_chkp_function): Likewise.
17092         (default_chkp_function_value_bounds): Likewise.
17093         (default_chkp_make_bounds_constant): Likewise.
17094         (default_chkp_initialize_bounds): Likewise.
17095         * toplev.c (compile_file): Likewise.
17096         (process_options): Likewise.
17097         * tree-core.h (DEF_BUILTIN): Likewise.
17098         (DEF_BUILTIN_CHKP): Likewise.
17099         * tree-inline.c (declare_return_variable): Likewise.
17100         (remap_gimple_stmt): Likewise.
17101         (copy_bb): Likewise.
17102         (initialize_inlined_parameters): Likewise.
17103         (expand_call_inline): Likewise.
17104         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17105         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17106         (make_pass_ipa_chkp_produce_thunks): Likewise.
17107         (make_pass_chkp): Likewise.
17108         (make_pass_chkp_opt): Likewise.
17109         (make_pass_chkp_instrumentation_passes): Likewise.
17110         * tree-pretty-print.c (dump_generic_node): Likewise.
17111         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17112         * tree-ssa-dce.c (propagate_necessity): Likewise.
17113         (eliminate_unnecessary_stmts): Likewise.
17114         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17115         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17116         * tree-ssa-sccvn.h: Likewise.
17117         * tree-ssa-strlen.c (get_string_length): Likewise.
17118         (valid_builtin_call): Likewise.
17119         (adjust_last_stmt): Likewise.
17120         (handle_builtin_strchr): Likewise.
17121         (handle_builtin_strcpy): Likewise.
17122         (handle_builtin_stxncpy): Likewise.
17123         (handle_builtin_memcpy): Likewise.
17124         (handle_builtin_strcat): Likewise.
17125         (strlen_check_and_optimize_stmt): Likewise.
17126         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17127         * tree-streamer-in.c: Likewise.
17128         * tree-streamer.c (record_common_node): Likewise.
17129         * tree.c (tree_code_size): Likewise.
17130         (wide_int_to_tree_1): Likewise.
17131         (type_contains_placeholder_1): Likewise.
17132         (build_common_tree_nodes): Likewise.
17133         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17134         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17135         (POINTER_BOUNDS_P): Likewise.
17136         (BOUNDED_TYPE_P): Likewise.
17137         (BOUNDED_P): Likewise.
17138         (CALL_WITH_BOUNDS_P): Likewise.
17139         (pointer_bounds_type_node): Likewise.
17140         * value-prof.c (gimple_ic): Likewise.
17141         * var-tracking.c (vt_add_function_parameters): Likewise.
17142         * varasm.c (make_decl_rtl): Likewise.
17143         (assemble_start_function): Likewise.
17144         (output_constant): Likewise.
17145         (maybe_assemble_visibility): Likewise.
17146         * varpool.c (ctor_for_folding): Likewise.
17147         * chkp-builtins.def: Remove.
17148         * ipa-chkp.c: Remove.
17149         * ipa-chkp.h: Remove.
17150         * rtl-chkp.c: Remove.
17151         * rtl-chkp.h: Remove.
17152         * tree-chkp-opt.c: Remove.
17153         * tree-chkp.c: Remove.
17154         * tree-chkp.h: Remove.
17156 2018-06-07  Carl Love  <cel@us.ibm.com>
17158         * config/rs6000/vsx.md (vextract_fp_from_shorth,
17159         vextract_fp_from_shortl): Add BE support.
17161 2018-06-07  Paul Koning  <ni1d@arrl.net>
17163         * compare-elim.c (try_merge_compare): Don't merge compare if
17164         address contains a side effect.
17165         (try_eliminate_compare): Likewise.
17167 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
17169         * config.gcc: Support "tremont".
17170         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17171         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17172         PROCESSOR_TREMONT.
17173         * config/i386/i386.c (m_TREMONT): Define.
17174         (processor_target_table): Add "tremont".
17175         (PTA_TREMONT): Define.
17176         (ix86_lea_outperforms): Add TARGET_TREMONT.
17177         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17178         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17179         and M_INTEL_GOLDMONT_PLUS.
17180         (fold_builtin_cpu): Add "tremont".
17181         (ix86_add_stmt_cost): Add TARGET_TREMONT.
17182         (ix86_option_override_internal): Add "tremont".
17183         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17184         (processor_type): Add PROCESSOR_TREMONT.
17185         * config/i386/x86-tune.def: Add m_TREMONT.
17186         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17188 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17190         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17191         symbol defined for msp430i* devices to be lower case.
17193 2018-06-07  Richard Biener  <rguenther@suse.de>
17195         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17196         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
17197         Properly wrap signed arithmetic if overflow wraps.
17199 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
17201         PR tree-optimization/69615
17202         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17203         of a cast from a same precision integral SSA_NAME in a bb dominated
17204         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
17205         cast to utype if rhs2 has already a compatible type.
17207 2018-06-07  Richard Biener  <rguenther@suse.de>
17209         PR tree-optimization/85935
17210         * graphite-scop-detection.c (find_params_in_bb): Analyze
17211         condition operands with respect to the correct loop.  Assert
17212         the analysis doesn't fail.
17214 2018-06-04  Carl Love  <cel@us.ibm.com>
17216         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17217         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
17218         as it is slightly cheaper.
17219         (first_match_or_eos_index_<mode>):
17220         Calculate index using natural element order.
17221         (first_match_index_<mode>):
17222         Calculate index using natural element order.
17223         (first_match_or_eos_index_<mode>):
17224         Calculate index using natural order.
17225         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17226         for BE and LE modes.
17227         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17228         P9V_BUILTIN_VCLZLSBB_V16QI.
17229         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17230         specific.
17232 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17234         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17235         indentation and line wrap for many prototypes.  Add missing
17236         @smallexample directives around block of prototypes for vec_xl and
17237         vec_xst.
17239 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
17241         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
17242         track if we pass or return IEEE 128-bit floating point.
17243         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
17244         C++ mangling that is compatible with GCC 8.1.
17245         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
17246         (init_cumulative_args): Note if we pass or return IEEE 128-bit
17247         floating point types.
17248         (rs6000_function_arg_advance_1): Likewise.
17249         (rs6000_mangle_type): Optionally generate mangled names that match
17250         what GCC 8.1 generated for IEEE 128-bit floating point types.
17251         (rs6000_globalize_decl_name): If we have an external function that
17252         passes or returns IEEE 128-bit types, generate a weak reference
17253         from the mangled name used in GCC 8.1 to the current mangled
17254         name.
17255         (rs6000_init_builtins): Make __ibm128 use the long double type if
17256         long double is IBM extended double.  Make __float128 use the long
17257         double type if long double is IEEE 128-bit.
17259         PR target/85657
17260         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
17261         macro for __ibm128 built-in functions.
17262         (PACK_IF): Add __ibm128 pack/unpack functions.
17263         (UNPACK_IF): Likewise.
17264         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
17265         enable long double built-in functions if long double is IEEE
17266         128-bit floating point.
17267         (rs6000_invalid_builtin): Update long double built-in function
17268         error message.
17269         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
17270         functions, adjust the built-in function to use the long double
17271         built-in function if __ibm128 and long double are the same type.
17272         * doc/extend.texi (PowerPC builtins): Update documention for
17273         __builtin_{,un}pack_longdouble.  Add documentation for
17274         __builtin_{,un}pack_ibm128.
17276 2018-06-06  Jim Wilson  <jimw@sifive.com>
17278         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
17279         (struct machine_function): New field interrupt_mode.
17280         (riscv_handle_type_attribute): New function.  Add forward declaration.
17281         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
17282         (riscv_expand_epilogue): Check interrupt_mode field.
17283         (riscv_set_current_function): Check interrupt attribute args and
17284         set interrupt_mode field.
17285         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
17286         (riscv_sret, riscv_uret): New.
17287         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
17288         new arguments to interrupt attribute.
17290 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
17292         PR target/63177
17293         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
17294         Don't handle -mcpu=power8 if -mpower9-vector is also used.
17296 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17298         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
17299         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
17300         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17301         several redundant entries.
17303 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
17305         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
17306         type from "rtx" to "rtx_insn *".
17307         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
17308         for local "call_insn", removing cast.
17309         (ix86_expand_call): Likewise, introducing a "call_insn" local.
17311 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
17313         PR tree-optimization/86066
17314         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
17315         for BIT_INSERT_EXPR stores.
17317 2018-06-06  Richard Biener  <rguenther@suse.de>
17319         PR tree-optimization/86062
17320         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17321         component refs ontop
17322         of to be offsetted base.
17324 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17326         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
17327         to be static and remove check on interrupt attribute name.
17329 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17331         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17332         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
17334 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
17336         PR target/79924
17337         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
17338         second argument.
17339         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
17340         Remove second argument, change how error is called.
17341         (aarch64_layout_arg): Remove second argument from
17342         aarch64_err_no_fpadvsimd call.
17343         (aarch64_init_cumulative_args): Ditto.
17344         (aarch64_gimplify_va_arg_expr): Ditto.
17345         * config/aarch64/aarch64.md (mov<mode>): Ditto.
17347 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
17349         * config/i386/i386.md (simple_return_indirect_internal): New expander.
17350         (*simple_return_indirect_internal<mode>): Rename from
17351         simple_return_indirect_internal.  Use W mode iterator.
17352         (rstorssp): New expander.
17353         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
17354         (clrssbsy): New expander.
17355         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
17357 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17359         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
17360         __typeof__.
17361         (cmse_check_pointed_object): Likewise.
17363 2018-06-05  Martin Liska  <mliska@suse.cz>
17365         PR gcov-profile/47618
17366         * doc/invoke.texi: Document how -fprofile-dir format
17367         is extended.
17369 2018-06-05  Richard Biener  <rguenther@suse.de>
17371         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
17372         removal pretend DOM info isn't available so we do not update
17373         it and only remove edges, not dominated blocks.  Actually free
17374         DOM info in case we removed something.  Remove unreachable blocks.
17375         (mfb_keep_latches): Work with either DOM info or marked backedges.
17376         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
17377         first.  Mark backedges if DOM info isn't available.
17378         (Re-)compute DOM info after cleanup_control_flow_pre.
17380 2018-06-05  Richard Biener  <rguenther@suse.de>
17382         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
17383         (locus_discrim_hasher::hash): Adjust.
17384         (locus_discrim_hasher::equal): Likewise.
17385         (next_discriminator_for_locus): Work on line directly.
17386         (same_line_p): Pass in expanded locus1 as well.
17387         (assign_discriminators): Avoid redundant location expansions.
17389 2018-06-05  Richard Biener  <rguenther@suse.de>
17391         PR tree-optimization/86046
17392         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
17393         if required after clearing TREE_ADDRESSABLE.
17395 2018-06-05  Richard Biener  <rguenther@suse.de>
17397         PR tree-optimization/86047
17398         * tree-ssa-loop.c (for_each_index): Glob handling of all
17399         decls and constants and really handle all of them.
17401 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17403         PR target/81497
17404         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
17405         qualifier_void_pointer and qualifier_const_void_pointer.
17406         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
17407         (arm_init_builtins): Handle the above.
17408         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
17409         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
17410         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
17411         void intrinsics.
17413 2018-06-05  Martin Liska  <mliska@suse.cz>
17415         * auto-profile.c (read_autofdo_file): Do not use
17416         gcov_ctr_summary struct.
17417         (afdo_callsite_hot_enough_for_early_inline): Likewise.
17418         * coverage.c (struct counts_entry): Likewise.
17419         (read_counts_file): Read just single summary entry.
17420         (get_coverage_counts): Use gcov_summary struct.
17421         * coverage.h (get_coverage_counts): Likewise.
17422         * gcov-dump.c (dump_working_sets): Likewise.
17423         (tag_summary): Dump just single summary.
17424         * gcov-io.c (gcov_write_summary): Write just histogram
17425         summary.
17426         (gcov_read_summary): Read just single summary.
17427         (compute_working_sets): Use gcov_summary struct.
17428         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
17429         of GCOV_COUNTERS_SUMMABLE.
17430         (GCOV_COUNTERS_SUMMABLE): Remove.
17431         (GCOV_FIRST_VALUE_COUNTER): Replace with
17432         GCOV_COUNTER_V_INTERVAL.
17433         (struct gcov_ctr_summary): Remove.
17434         (struct gcov_summary): Directly use fields of former
17435         gcov_ctr_summary.
17436         (compute_working_sets): Use gcov_summary struct.
17437         * gcov.c (read_count_file): Do not use ctrs fields.
17438         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
17439         struct.
17440         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
17441         struct.
17442         * profile.c: Likewise.
17443         * profile.h: Likewise.
17445 2018-06-05  Martin Liska  <mliska@suse.cz>
17447         PR gcov-profile/84846
17448         * gcov.c (output_lines): Print working directory only
17449         in intermediate format.
17451 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
17453         * config/s390/s390-builtin-types.def: Add void function type.
17454         * config/s390/s390-builtins.def: Use the function type for the
17455         tbeginc builtin.
17457 2018-06-04  Jim Wilson  <jimw@sifive.com>
17459         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
17460         to int.
17461         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
17462         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
17463         handle EH_RETURN_DATA_REGNO registers properly.
17464         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
17465         (riscv_expand_epilogue): Update comment.  Change argument name and
17466         type.  Update code to use new name and type.  Pass new args to
17467         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
17468         EXCEPTION_RETURN.
17469         * config/riscv/riscv.md (NORMAL_RETURN): New.
17470         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
17471         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
17472         (eh_return): Call gen_eh_return_internal and emit barrier.
17473         (eh_return_internal): Call riscv_expand_epilogue.
17475 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
17477         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
17478         bit_insertion field and declare can_be_merged_into method.
17479         (merged_store_group::can_be_merged_into): New method.
17480         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
17481         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
17482         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
17484 2018-06-04  Richard Biener  <rguenther@suse.de>
17486         PR tree-optimization/85955
17487         * builtins.c (fold_builtin_sincos): Convert pointers to
17488         destination to appropriate type before dereferencing.
17490 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
17492         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17494 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
17496         * expr.c (expand_expr_real_1): Force the operand into memory if
17497         its TYPE_MODE is BLKmode and if there is no integer mode for
17498         the number of bits being extracted.
17500 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
17502         PR target/85832
17503         PR target/86036
17504         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17505         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17507 2018-06-04  Richard Biener  <rguenther@suse.de>
17509         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17510         (cleanup_tree_cfg_noloop): ... single caller.  Do
17511         start_recording_case_labels later.
17513 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
17515         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17516         to _IMMINTRIN_H_INCLUDED.
17517         * config/i386/pconfigintrin.h: Ditto.
17518         * config/i386/waitpkgintrin.h: Ditto.
17519         * config/i386/immintrin.h: Add includes for sgxintrin.h,
17520         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17521         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17522         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17523         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17524         waitpkgintrin.h and cldemoteintrin.h.
17526 2018-06-04  Richard Biener  <rguenther@suse.de>
17528         PR tree-optimization/86038
17529         * tracer.c (find_best_successor): Check probability for
17530         being initialized, bail out if not.
17532 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
17534         PR target/86003
17535         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17536         of bits to ignore when comparing architectures.
17538 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
17540         PR tree-optimization/69615
17541         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17542         maximum or minimum of the type, try to merge it also as if
17543         range1 is + [-, x - 1] or + [x + 1, -].
17545         PR c++/86025
17546         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17548 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
17550         PR tree-optimization/86034
17551         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17552         the unsigned bitfield type in a bit insertion sequence if it does not
17553         have a larger precision than the bitfield size.
17554         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17556 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
17558         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17560 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17562         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17563         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17564         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17565         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17567 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
17569         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17570         Disable -fdelete-null-pointer-checks for ELF toolchain.
17572 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17573             Kito Cheng  <kito.cheng@gmail.com>
17575         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17576         (nds32le-*-*, nds32be-*-*): Integrate checking process.
17577         (nds32*-*-*): Add glibc and uclibc conditions.
17578         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17579         (TARGET_EXCEPT_UNWIND_INFO): Define.
17580         * config/nds32/elf.h: New file.
17581         * config/nds32/linux.h: New file.
17582         * config/nds32/nds32-elf.opt: New file.
17583         * config/nds32/nds32-linux.opt: New file.
17584         * config/nds32/nds32-fp-as-gp.c
17585         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17586         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17587         TARGET_LINUX_ABI.
17588         (nds32_asm_file_end): Ditto.
17589         (nds32_print_operand): Ditto.
17590         (nds32_insert_attributes): Ditto.
17591         (nds32_init_libfuncs): New function.
17592         (TARGET_HAVE_TLS): Define.
17593         (TARGET_INIT_LIBFUNCS): Define.
17594         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17595         spec content.
17596         (TARGET_ELF): Apply different mcmodel setting.
17597         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17598         been migrated into elf.h and linux.h files.
17599         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17600         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17601         (mcmodel): The content has been migrated into nds32-elf.opt and
17602         nds32-linux.opt files.
17603         * config/nds32/t-elf: New file.
17604         * config/nds32/t-linux: New file.
17606 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
17607             Shiva Chen  <shiva0217@gmail.com>
17609         * config/nds32/constants.md (unspec_volatile_element): Add
17610         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17611         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17612         optimization.
17613         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17614         (make_pass_nds32_fp_as_gp): Declare.
17615         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17616         optmization pass.
17617         (nds32_asm_function_end_prologue): Remove unused asm output.
17618         (nds32_asm_function_begin_epilogue): Remove unused asm output.
17619         (nds32_asm_file_start): Output necessary fp_as_gp information.
17620         (nds32_option_override): Adjust register usage.
17621         (nds32_expand_prologue): Consider fp_as_gp situation.
17622         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17623         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17624         (epilogue): Ditto.
17625         (return): Ditto.
17626         (simple_return): Ditto.
17627         (omit_fp_begin): Output special directive for fp_as_gp.
17628         (omit_fp_end): Output special directive for fp_as_gp.
17629         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17630         mforbid-fp-as-gp): New options.
17632 2018-06-01  Mark Wielaard  <mark@klomp.org>
17634         * dwarf2out.c (dwarf2out_finish): Remove generation of
17635         DW_AT_loclists_base.
17637 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
17639         * gimple-ssa-store-merging.c: Include gimple-fold.h.
17640         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17641         (struct merged_store_group): Add bit_insertion field.
17642         (dump_char_array): Use standard hexadecimal format.
17643         (merged_store_group::merged_store_group): Set bit_insertion to false.
17644         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
17645         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
17646         also print the mask in the dump file.
17647         (pass_store_merging::gate): Minor tweak.
17648         (imm_store_chain_info::coalesce_immediate): Fix wrong association
17649         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
17650         stores with INTEGER_CST stores.
17651         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17652         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17653         and use it throughout.  Generate bit insertion sequences if need be.
17654         (pass_store_merging::process_store): Remove redundant condition.
17655         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17657 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
17659         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17660         the 128-bit floating point types.  Fix function comment.
17662 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17664         * config/aarch64/aarch64-simd.md
17665         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17666         mnemonics.
17667         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17668         mnemonics.
17670 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17672         PR tree-optimization/85989
17673         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17674         variable.
17675         (backprop::intersect_uses): Check it when deciding whether this
17676         is a backedge reference.
17677         (backprop::process_block): Add each phi to m_visited_phis
17678         after visiting it, then clear it at the end.
17680 2018-06-01  Richard Biener  <rguenther@suse.de>
17682         * tree-vectorizer.h (vect_dr_stmt): New function.
17683         (vect_get_load_cost): Adjust.
17684         (vect_get_store_cost): Likewise.
17685         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17686         Use vect_dr_stmt instead of DR_SMTT.
17687         (vect_record_base_alignments): Likewise.
17688         (vect_calculate_target_alignment): Likewise.
17689         (vect_compute_data_ref_alignment): Likewise and make static.
17690         (vect_update_misalignment_for_peel): Likewise.
17691         (vect_verify_datarefs_alignment): Likewise.
17692         (vector_alignment_reachable_p): Likewise.
17693         (vect_get_data_access_cost): Likewise.  Pass down
17694         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17695         (vect_get_peeling_costs_all_drs): Likewise.
17696         (vect_peeling_hash_get_lowest_cost): Likewise.
17697         (vect_enhance_data_refs_alignment): Likewise.
17698         (vect_find_same_alignment_drs): Likewise.
17699         (vect_analyze_data_refs_alignment): Likewise.
17700         (vect_analyze_group_access_1): Likewise.
17701         (vect_analyze_group_access): Likewise.
17702         (vect_analyze_data_ref_access): Likewise.
17703         (vect_analyze_data_ref_accesses): Likewise.
17704         (vect_vfa_segment_size): Likewise.
17705         (vect_small_gap_p): Likewise.
17706         (vectorizable_with_step_bound_p): Likewise.
17707         (vect_prune_runtime_alias_test_list): Likewise.
17708         (vect_analyze_data_refs): Likewise.
17709         (vect_supportable_dr_alignment): Likewise.
17710         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17711         (vect_gen_prolog_loop_niters): Likewise.
17712         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17713         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17714         modify DR_STMT.
17715         (vect_recog_mask_conversion_pattern): Likewise.
17716         (vect_try_gather_scatter_pattern): Likewise.
17717         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17718         to vect_get_store_cost.
17719         (vect_get_store_cost): Get stmt_info instead of DR.
17720         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17721         (vect_get_load_cost): Get stmt_info instead of DR.
17723 2018-06-01  Richard Biener  <rguenther@suse.de>
17725         PR middle-end/86017
17726         * gimple-fold.c (var_decl_component_p): Also allow offsetted
17727         vars wrapped in MEM_REFs.
17729 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
17731         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17732         Fix subreg tests so that we only return a choice between
17733         GENERAL_REGS and FP_REGS if the original classes included both.
17735 2018-06-01  Richard Biener  <rguenther@suse.de>
17737         PR ipa/85960
17738         * tree-ssa-structalias.c (get_function_part_constraint):
17739         Handle NULL fi->decl.
17740         (find_func_aliases_for_call): Properly handle indirect
17741         fi from direct call.
17742         (find_func_clobbers): Likewise.
17743         (ipa_pta_execute): Likewise.
17744         (create_variable_info_for): For functions that are ifunc_resolver
17745         resolve to a varinfo that contains the result of the resolver call.
17746         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17747         aliases.
17749 2018-05-31  Michael Collison  <michael.collison@arm.com>
17751         * config/aarch64/aarch64.md:
17752         (*fix_to_zero_extenddfdi2): New pattern.
17753         * gcc.target/aarch64/fix_extend1.c: New testcase.
17755 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
17757         PR middle-end/78809
17758         PR middle-end/83026
17759         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17760         and BUILT_IN_STRNCMP_EQ.
17761         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17762         BUILT_IN_STRNCMP_EQ.
17763         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17764         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17765         (gimple_fold_builtin): Likewise.
17766         * tree-ssa-strlen.c (compute_string_length): New function.
17767         (determine_min_obsize): New function.
17768         (handle_builtin_string_cmp): New function to handle calls to
17769         string compare functions.
17770         (strlen_optimize_stmt): Add handling to builtin string compare
17771         calls.
17772         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17773         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17774         * tree.c (build_common_builtin_nodes): Add new defines of
17775         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17777 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
17779         PR target/85984
17780         * bb-reorder.c (pass_partition_blocks::gate): Return false for
17781         functions with naked attribute.
17783 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
17785         * config/i386/sse.md (avx_vec_concat<mode>):
17786         Substitute concat_tg_mode mode attribute with xtg_mode.
17787         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17788         (concat_tg_mode): Remove mode attribute.
17790 2018-05-31  Martin Sebor  <msebor@redhat.com>
17792         PR c/82063
17793         * calls.c (alloc_max_size): Correct a logic error/typo.
17794         Treat excessive arguments as infinite.  Warn for invalid arguments.
17795         * doc/invoke.texi (-Walloc-size-larger-than): Update.
17797 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
17799         PR target/85829
17800         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17801         and movx for Haswell.
17803 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
17804             Cesar Philippidis  <cesar@codesourcery.com>
17806         PR middle-end/85879
17807         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17808         when emitting error on private/firstprivate reductions.
17809         * omp-low.c (lower_omp_target): Avoid reference-type processing
17810         on pointers for firstprivate clause.
17812 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17814         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17815         (st1x2): Likewise.
17816         (st1x3): Likewise.
17817         * config/aarch64/aarch64-simd.md
17818         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17819         (aarch64_ld1_x3_<mode>): Likewise
17820         (aarch64_st1x2<VALLDIF:mode>): Likewise
17821         (aarch64_st1_x2_<mode>): Likewise
17822         (aarch64_st1x3<VALLDIF:mode>): Likewise
17823         (aarch64_st1_x3_<mode>): Likewise
17824         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17825         (vld1_s8_x3): Likewise.
17826         (vld1_u16_x3): Likewise.
17827         (vld1_s16_x3): Likewise.
17828         (vld1_u32_x3): Likewise.
17829         (vld1_s32_x3): Likewise.
17830         (vld1_u64_x3): Likewise.
17831         (vld1_s64_x3): Likewise.
17832         (vld1_f16_x3): Likewise.
17833         (vld1_f32_x3): Likewise.
17834         (vld1_f64_x3): Likewise.
17835         (vld1_p8_x3): Likewise.
17836         (vld1_p16_x3): Likewise.
17837         (vld1_p64_x3): Likewise.
17838         (vld1q_u8_x3): Likewise.
17839         (vld1q_s8_x3): Likewise.
17840         (vld1q_u16_x3): Likewise.
17841         (vld1q_s16_x3): Likewise.
17842         (vld1q_u32_x3): Likewise.
17843         (vld1q_s32_x3): Likewise.
17844         (vld1q_u64_x3): Likewise.
17845         (vld1q_s64_x3): Likewise.
17846         (vld1q_f16_x3): Likewise.
17847         (vld1q_f32_x3): Likewise.
17848         (vld1q_f64_x3): Likewise.
17849         (vld1q_p8_x3): Likewise.
17850         (vld1q_p16_x3): Likewise.
17851         (vld1q_p64_x3): Likewise.
17852         (vst1_s64_x2): Likewise.
17853         (vst1_u64_x2): Likewise.
17854         (vst1_f64_x2): Likewise.
17855         (vst1_s8_x2): Likewise.
17856         (vst1_p8_x2): Likewise.
17857         (vst1_s16_x2): Likewise.
17858         (vst1_p16_x2): Likewise.
17859         (vst1_s32_x2): Likewise.
17860         (vst1_u8_x2): Likewise.
17861         (vst1_u16_x2): Likewise.
17862         (vst1_u32_x2): Likewise.
17863         (vst1_f16_x2): Likewise.
17864         (vst1_f32_x2): Likewise.
17865         (vst1_p64_x2): Likewise.
17866         (vst1q_s8_x2): Likewise.
17867         (vst1q_p8_x2): Likewise.
17868         (vst1q_s16_x2): Likewise.
17869         (vst1q_p16_x2): Likewise.
17870         (vst1q_s32_x2): Likewise.
17871         (vst1q_s64_x2): Likewise.
17872         (vst1q_u8_x2): Likewise.
17873         (vst1q_u16_x2): Likewise.
17874         (vst1q_u32_x2): Likewise.
17875         (vst1q_u64_x2): Likewise.
17876         (vst1q_f16_x2): Likewise.
17877         (vst1q_f32_x2): Likewise.
17878         (vst1q_f64_x2): Likewise.
17879         (vst1q_p64_x2): Likewise.
17880         (vst1_s64_x3): Likewise.
17881         (vst1_u64_x3): Likewise.
17882         (vst1_f64_x3): Likewise.
17883         (vst1_s8_x3): Likewise.
17884         (vst1_p8_x3): Likewise.
17885         (vst1_s16_x3): Likewise.
17886         (vst1_p16_x3): Likewise.
17887         (vst1_s32_x3): Likewise.
17888         (vst1_u8_x3): Likewise.
17889         (vst1_u16_x3): Likewise.
17890         (vst1_u32_x3): Likewise.
17891         (vst1_f16_x3): Likewise.
17892         (vst1_f32_x3): Likewise.
17893         (vst1_p64_x3): Likewise.
17894         (vst1q_s8_x3): Likewise.
17895         (vst1q_p8_x3): Likewise.
17896         (vst1q_s16_x3): Likewise.
17897         (vst1q_p16_x3): Likewise.
17898         (vst1q_s32_x3): Likewise.
17899         (vst1q_s64_x3): Likewise.
17900         (vst1q_u8_x3): Likewise.
17901         (vst1q_u16_x3): Likewise.
17902         (vst1q_u32_x3): Likewise.
17903         (vst1q_u64_x3): Likewise.
17904         (vst1q_f16_x3): Likewise.
17905         (vst1q_f32_x3): Likewise.
17906         (vst1q_f64_x3): Likewise.
17907         (vst1q_p64_x3): Likewise.
17909 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17911         * config/msp430/msp430.c (msp430_output_labelref): Prepend
17912         user_label_prefix to name.
17914         * tree-core.h: Update comment about the format of NAME string
17915         passed to handler in attribute_spec.
17917         * config/msp430/msp430.md: Remove erroneous subreg expression from
17918         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17919         zero_extend{q,h}isi2.
17921 2018-05-30  Borislav Petkov  <bp@suse.de>
17923         * doc/extend.texi: Document some architecture specific
17924         constraints and sort entries.
17926 2018-05-30  Martin Sebor  <msebor@redhat.com>
17928         PR middle-end/85369
17929         * builtins.c (expand_builtin_stpcpy_1): New function.
17930         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17931         only if the former succeeds.
17933 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
17935         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17936         in saphira.
17938 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17940         * doc/invoke.texi (-flinker-output): Document
17942 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17944         * passes.c (ipa_write_summaries): Only modify statements if body
17945         is in memory.
17946         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17947         incrementally linking.
17948         (ipa_passes): Likewise.
17949         * lto-cgraph.c (lto_output_node): When incrementally linking do not
17950         pass down resolution info.
17951         * common.opt (flag_incremental_link): Update info.
17952         * gcc.c (plugin specs): Turn flinker-output=* to
17953         -plugin-opt=-linker-output-known
17954         * toplev.c (compile_file): Also cut compilation when doing incremental
17955         link.
17956         * flag-types. (enum lto_partition_model): Add
17957         LTO_LINKER_OUTPUT_NOLTOREL.
17958         (invoke.texi): Add -flinker-output docs.
17959         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17960         link same way as WPA; do not stream in dead initializers.
17962         * dwarf2out.c (dwarf2out_die_ref_for_decl,
17963         darf2out_register_external_decl): Support incremental link.
17965 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17967         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17969 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
17971         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17972         it down to simple_object_copy_lto_debug_sections.
17973         (run_gcc): Determine incremental LTO link time and configure
17974         lto1 into non-wpa mode, disable renaming of debug sections.
17976 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17978         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17979         descriptions of various incorrectly documented functions.
17981 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17983         Revert:
17984         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17985         address check not strict.
17987 2018-05-30  Richard Biener  <rguenther@suse.de>
17989         PR tree-optimization/85964
17990         * tracer.c (better_p): Drop initialized count check, we only
17991         call the function with initialized counts now.
17992         (find_best_successor): Do find a best edge if one
17993         has uninitialized count.
17994         (find_best_predecessor): Likewise.  Do BB frequency check only
17995         if count is initialized.
17997 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
17999         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
18000         (aarch64_ldrstr_offset_compare): New.
18001         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
18002         load/store orderings.
18003         (aarch64_gen_adjusted_ldpstp): Likewise.
18005 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
18007         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18008         Check for subset of GENERAL_REGS and FP_REGS.
18009         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
18010         r=w alternative.
18012 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
18014         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
18015         and wi::to_poly_offset.  Add the current offset and then check
18016         whether the sum fits, rather than using an unchecked addition of
18017         a checked term.  Check for a shwi rather than a uhwi.
18018         * expr.c (get_bit_range): Use tree_to_poly_uint64.
18019         (store_constructor): Use poly_int_tree_p.
18020         (expand_expr_real_1): Likewise.
18021         * function.c (assign_temp): Likewise.
18022         * fold-const.c (const_binop): Use poly_int_tree_p and
18023         wi::to_poly_offset.
18024         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
18025         division.
18026         * ipa-icf-gimple.c (func_checker::compare_operand): Use
18027         to_poly_offset for MEM offsets.
18028         * ipa-icf.c (sem_variable::equals): Likewise.
18029         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
18030         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
18031         wi::to_poly_offset for BIT_FIELD_REF offsets.
18032         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
18033         wi::to_poly_offset.
18034         * var-tracking.c (emit_note_insn_var_location): Use
18035         tree_to_poly_uint64.
18037 2018-05-29  Jim Wilson  <jimw@sifive.com>
18039         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
18041 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
18043         PR target/85950
18044         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
18045         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
18046         sequence.
18047         (sse4_1_round<mode>2): Use nonimmediate_operand
18048         for operand 1 predicate.
18050 2018-05-29  Martin Sebor  <msebor@redhat.com>
18051             Richard Biener  <rguenther@suse.de>
18053         PR testsuite/85888
18054         * calls.c (get_size_range): Call determine_value_range instead
18055         of get_value_range..
18056         * tree-vrp.h (determine_value_range): Declared new function.
18057         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
18059 2018-05-29  Richard Biener  <rguenther@suse.de>
18061         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
18062         sure to use non-pattern stmts for get_earlier_stmt arguments.
18063         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18064         called on pattern stmts.
18065         (get_later_stmt): Likewise.
18067 2018-05-29  Martin Liska  <mliska@suse.cz>
18069         PR gcov-profile/85759
18070         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18071         env variables.
18073 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
18075         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18076         VEC_UNPACK_*_EXPR.
18077         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18078         VEC_PACK_*_EXPR.
18080         PR target/85918
18081         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18082         VEC_PACK_FLOAT_EXPR): New tree codes.
18083         * tree-pretty-print.c (op_code_prio): Handle
18084         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18085         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18086         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18087         * tree-inline.c (estimate_operator_cost): Likewise.
18088         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18089         * fold-const.c (const_binop): Likewise.
18090         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18091         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18092         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18093         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18094         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18095         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18096         * expr.c (expand_expr_real_2): Likewise.
18097         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18098         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18099         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18100         optabs.
18101         * optabs.c (expand_widen_pattern_expr): For
18102         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18103         sign from result type rather than operand's type.
18104         (expand_binop_directly): For vec_packu_float_optab and
18105         vec_packs_float_optab allow result type to be different from operand's
18106         type.
18107         * optabs-tree.c (optab_for_tree_code): Handle
18108         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18109         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
18110         * tree-vect-generic.c (expand_vector_operations_1):  Handle
18111         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18112         VEC_PACK_FLOAT_EXPR.
18113         * tree-vect-stmts.c (supportable_widening_operation): Handle
18114         FIX_TRUNC_EXPR.
18115         (supportable_narrowing_operation): Handle FLOAT_EXPR.
18116         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18117         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18118         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
18119         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18120         mode attributes.
18121         (vec_pack<floatprefix>_float_<mode>): New expander.
18122         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18123         attributes.
18124         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18125         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18126         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18127         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18128         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18129         Document.
18130         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18131         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18132         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18133         VEC_PACK_FLOAT_EXPR): Document.
18135 2018-05-29  Richard Biener  <rguenther@suse.de>
18137         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18138         member.
18139         (stmt_vec_info_vec): Make pointer.
18140         (init_stmt_vec_info_vec): Remove.
18141         (free_stmt_vec_info_vec): Likewise.
18142         (set_stmt_vec_info_vec): New function.
18143         (free_stmt_vec_infos): Likewise.
18144         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18145         (set_vinfo_for_stmt): Likewise.
18146         (get_earlier_stmt): Likewise.
18147         (get_later_stmt): Likewise.
18148         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18149         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18150         (vec_info::~vec_info): Free stmt_vec_infos.
18151         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18152         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18153         (pass_slp_vectorize::execute): Likewise.
18154         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18155         (free_stmt_vec_info_vec): Likewise.
18156         (set_stmt_vec_info_vec): New function.
18157         (free_stmt_vec_infos): Likewise.
18158         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18159         the global stmt_vec_info_vec.
18160         * tree-parloops.c (gather_scalar_reductions): Use
18161         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18162         vector.
18164 2018-05-29  Richard Biener  <rguenther@suse.de>
18166         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18168 2018-05-29  Martin Liska  <mliska@suse.cz>
18169             David Malcolm  <dmalcolm@redhat.com>
18171         * vec.c (test_reverse): New.
18172         (vec_c_tests): Add new test.
18173         * vec.h (vl_ptr>::reverse): New function.
18175 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
18177         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18179         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18180         and later.
18182 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18184         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18186 2018-05-28  Richard Biener  <rguenther@suse.de>
18188         PR tree-optimization/85933
18189         * tree-vect-data-refs.c (vect_record_base_alignments): Only
18190         look at stmts marked as vectorizable.
18192 2018-05-28  Richard Biener  <rguenther@suse.de>
18194         PR tree-optimization/85934
18195         * tree-vect-generic.c (expand_vector_operations_1): Hoist
18196         vector boolean check before scalar optimization.
18198 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
18200         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18201         for armv5te.
18203 2018-05-28  Mark Wielaard  <mark@klomp.org>
18205         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18206         if it is an expression containing a minus sign.
18208 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
18210         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18212 2018-05-27  Paul Koning  <ni1d@arrl.net>
18214         * config/pdp11/pdp11.md (truncsihi2): Remove.
18216 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
18217             Chung-Ju Wu  <jasonwucj@gmail.com>
18219         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18220         implementation.
18221         (unaligned_store_dw): Ditto.
18222         * config/nds32/nds32-memory-manipulation.c
18223         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18224         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18225         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18226         (emit_setmem_word_loop): Rename to ...
18227         (emit_setmem_doubleword_loop): ... this.
18228         (nds32_gen_dup_4_byte_to_word_value): New function.
18229         (nds32_gen_dup_8_byte_to_double_word_value): New function.
18230         (nds32_expand_setmem_loop): Refine implementation.
18231         (nds32_expand_setmem_loop_v3m): Ditto.
18232         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18233         pattern.
18235 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18237         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
18239 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
18241         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
18242         (nds32_init_machine_status): Initialize machine->attr_naked_p and
18243         machine->attr_no_prologue_p.
18244         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
18245         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
18246         (nds32_expand_epilogue): Consider attr_naked_p.
18247         (nds32_expand_epilogue_v3pop): Likewise.
18248         (nds32_can_use_return_insn): Likewise.
18249         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
18250         attr_no_prologue_p fields.
18251         * config/nds32/nds32.opt (mret-in-naked-func): New option.
18253 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
18255         PR target/85918
18256         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
18257         attributes.
18258         * config/i386/sse.md
18259         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
18260         Rename to ...
18261         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
18262         ... this.
18263         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
18264         Rename to ...
18265         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
18266         ... this.
18267         (*<floatsuffix>floatv2div2sf2): Rename to ...
18268         (*float<floatunssuffix>v2div2sf2): ... this.
18269         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
18270         (float<floatunssuffix>v2div2sf2_mask): ... this.
18271         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
18272         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
18273         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
18274         to ...
18275         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
18276         ... this.
18277         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18278         Rename to ...
18279         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
18280         ... this.
18281         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18282         Rename to ...
18283         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
18284         ... this.
18285         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
18286         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
18287         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
18288         gen_ufix_truncv8dfv8si2.
18289         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
18290         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
18291         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
18292         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
18293         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
18294         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
18295         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
18296         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
18298 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
18300         PR target/85900
18301         PR target/85345
18302         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
18304 2018-05-25  Jim Wilson  <jimw@sifive.com>
18306         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
18307         * config/riscv/riscv.c (struct machine_function): Add
18308         interrupt_handler_p and attribute_checked_p fields.
18309         (riscv_attribute_table): Add interrupt.
18310         (riscv_interrupt_type_p): New.
18311         (riscv_save_reg_p): Save extra regs for interrupt handler.
18312         (riscv_use_save_libcall): Return false  for interrupt handler.
18313         (riscv_first_stack_step): Add forward declaration.
18314         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
18315         for interrupt handler with large frame.  Use it for saved reg list.
18316         (riscv_expand_prologue): Move flag_stack_usage_info support to
18317         eliminate duplication.
18318         (riscv_expand_epilogue): Generate mret for interrupt handler.
18319         (riscv_epilogue_uses): New.
18320         (riscv_can_use_return_insn): Return false for interrupt handler.
18321         (riscv_function_ok_for_sibcall): Likewise.
18322         (riscv_set_current_function): Add interrupt handler support.
18323         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
18324         * config/riscv/riscv.md (UNSPECV_MRET): New.
18325         (GP_REGNUM): New.
18326         (riscv_frflags, riscv_fsflags): Use tab after opcode.
18327         (riscv_mret): New.
18328         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
18330 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
18332         PR tree-optimization/85712
18333         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
18334         this candidate has already been replaced in-situ by a copy.
18336 2018-05-25  Jason Merrill  <jason@redhat.com>
18338         PR c++/80485 - inline function non-zero address.
18339         * symtab.c (nonzero_address): Check DECL_COMDAT.
18341 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
18343         PR target/83628
18344         * config/alpha/alpha.md (ashlsi3): New insn pattern.
18345         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
18346         extension of SImode operation.  Use const123_operand predicate.
18347         (*saddsi_1): Remove.
18348         (*saddl_se_1): Ditto.
18349         (*ssubsi_1): Ditto.
18350         (*ssubl_se_1): Ditto.
18351         * config/alpha/predicates.md (const123_operand): New predicate.
18352         * config/alpha/constraints.md (P): Use IN_RANGE.
18354 2018-05-25  Richard Biener  <rguenther@suse.de>
18356         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
18357         defaulted to true.
18358         (ref_maybe_used_by_stmt_p): Likewise.
18359         (stmt_may_clobber_ref_p): Likewise.
18360         (stmt_may_clobber_ref_p_1): Likewise.
18361         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
18362         and pass it along.
18363         (ref_maybe_used_by_stmt_p): Likewise.
18364         (stmt_may_clobber_ref_p): Likewise.
18365         (stmt_may_clobber_ref_p_1): Likewise.
18366         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
18367         the alias oracle to disambiguate DRs with stmts DR analysis
18368         couldn't handle.
18369         (vect_analyze_data_refs): Do not give up on not analyzable
18370         DRs for BB vectorization.  Remove code truncating the dataref
18371         vector.
18373 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
18375         PR target/85832
18376         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18377         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
18378         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
18380 2018-05-25  Richard Biener  <rguenther@suse.de>
18382         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
18383         function, combining stmt data ref gathering and fatal analysis
18384         parts.
18385         (vect_analyze_data_refs): Remove now redudnant code and simplify.
18386         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
18387         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
18388         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
18389         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
18391 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
18393         PR tree-optimization/85720
18394         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
18395         SCC if all partitions are builtins.
18396         (version_loop_by_alias_check): New parameter.  Generate cancelable
18397         runtime alias check if all partitions are builtins.
18398         (distribute_loop): Update call to above function.
18400 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
18402         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
18403         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
18404         (parm_default_def_partition_arg): Ditto.
18405         (set_parm_default_def_partition): Ditto.
18406         (get_parm_default_def_partitions): Ditto and make it static.
18407         (get_undefined_value_partitions): Ditto and make it static.
18408         (remove_ssa_form): Refactor call to init_var_map here.
18409         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
18410         computation for loop region.
18411         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
18412         (register_default_def): Delete.
18413         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
18414         (parm_default_def_partition_arg): Ditto.
18415         (set_parm_default_def_partition): Ditto.
18416         (get_parm_default_def_partitions): Ditto and make it static.
18417         (get_undefined_value_partitions): Ditto and make it static.
18418         (coalesce_with_default, coalesce_with_default): Update comment.
18419         (create_coalesce_list_for_region): New func factored out from
18420         create_outofssa_var_map.
18421         (populate_coalesce_list_for_outofssa): New func factored out from
18422         create_outofssa_var_map and coalesce_ssa_name.
18423         (create_outofssa_var_map): Delete.
18424         (coalesce_ssa_name): Refactor to support live range computation.
18425         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
18426         (get_parm_default_def_partitions): Delete.
18427         (get_undefined_value_partitions): Ditto.
18428         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
18429         computation for loop region.
18430         (new_tree_live_info, loe_visit_block): Ditto.
18431         (live_worklist, set_var_live_on_entry): Ditto.
18432         (calculate_live_on_exit, verify_live_on_entry): Ditto.
18433         * tree-ssa-live.h (struct _var_map): New fields.
18434         (init_var_map): Change decl.
18435         (region_contains_p): New.
18437 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
18439         * tree-ssa-live.h (live_merge_and_clear): Delete.
18441 2018-05-25  Richard Biener  <rguenther@suse.de>
18443         PR c++/85912
18444         * tree-dump.c (dequeue_and_dump): Remove access to removed
18445         operand 2 of a SWITCH_EXPR.
18447 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18449         * doc/sourcebuild.texi (vect_double_cond_arith): Include
18450         multiplication and division.
18451         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
18452         (cond_udiv@var{m}, cond_umod@var{m}): Document.
18453         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
18454         (cond_udiv_optab, cond_umod_optab): New optabs.
18455         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
18456         (IFN_COND_RDIV): New internal functions.
18457         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
18458         TRUNC_MOD_EXPR and RDIV_EXPR.
18459         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
18460         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
18461         New unspecs.
18462         (SVE_INT_BINARY): Include mult.
18463         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
18464         (optab, sve_int_op): Handle mult.
18465         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
18466         UNSPEC_COND_DIV.
18467         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
18468         for SVE_INT_BINARY_SD.
18470 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18472         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
18473         (optab, sve_int_op): Handle div and udiv.
18474         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
18475         for SVE_INT_BINARY_SD.
18476         (*<optab><mode>3): New insn for the same.
18478 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18480         * tree-vect-patterns.c: Include predict.h.
18481         (vect_recog_divmod_pattern): Restrict check for division support
18482         to when optimizing for size.
18484 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18486         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
18487         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
18488         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
18489         (gimple_match_op::set_op): Likewise.
18490         (gimple_resimplify4): Declare.
18491         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18492         (expr::gen_transform): Likewise.
18493         (decision_tree::gen): Generate a simplification routine for 4 operands.
18494         * gimple-match-head.c (gimple_simplify): Add an overload for
18495         4 operands.  In the top-level function, handle up to 4 call
18496         arguments and call gimple_resimplify4.
18497         (gimple_resimplify4): New function.
18498         (build_call_internal): Pass a fourth operand.
18499         (maybe_push_to_seq): Likewise.
18500         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18501         Fold VEC_COND_EXPRs of an operation and a default value into
18502         an IFN_COND_* function if possible.
18503         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18504         New unspecs.
18505         (SVE_COND_FP_BINARY): Include them.
18506         (optab, sve_fp_op): Handle them.
18507         (SVE_INT_BINARY_REV): New code iterator.
18508         (SVE_COND_FP_BINARY_REV): New int iterator.
18509         (commutative): New int attribute.
18510         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18511         Declare.
18512         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18513         function.
18514         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18515         (*cond_<optab><mode>): New patterns for reversed operands.
18517 2018-05-25  Richard Biener  <rguenther@suse.de>
18519         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18520         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18521         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18522         (STMT_VINFO_GROUPED_ACCESS): Adjust.
18523         * tree-vect-data-refs.c (everywhere): Adjust users.
18524         * tree-vect-loop.c (everywhere): Likewise.
18525         * tree-vect-slp.c (everywhere): Likewise.
18526         * tree-vect-stmts.c (everywhere): Likewise.
18527         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18529 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
18531         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18532         Rename to...
18533         (gcc_cv_as_section_exclude): ... this.
18534         Try Solaris as #exclude syntax.
18535         * configure: Regenerate.
18536         * config.in: Regenerate.
18537         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18538         SECTION_EXCLUDE.
18539         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18540         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18542         * varasm.c (default_elf_asm_named_section): Don't check if
18543         HAVE_GAS_SECTION_EXCLUDE is defined.
18545 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18547         * doc/md.texi: Update the documentation of the cond_* optabs
18548         to mention the new final operand.  Fix GET_MODE_NUNITS call.
18549         Describe the scalar case too.
18550         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18551         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18552         instead of 2.
18553         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18554         (get_conditional_internal_fn): Update comment.
18555         * tree-vect-loop.c (vectorizable_reduction): Pass the original
18556         accumulator value as a final argument to conditional functions.
18557         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18558         a define_expand and add an "else" operand.  Assert for now that
18559         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
18560         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18561         (*cond_<optab><mode>): New patterns.
18562         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18563         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18564         (UNSPEC_COND_EOR): Delete.
18565         (optab): Remove associated mappings.
18566         (SVE_INT_BINARY): New code iterator.
18567         (sve_int_op): Remove int attribute and add "minus" to the code
18568         attribute.
18569         (SVE_COND_INT_OP): Delete.
18570         (SVE_COND_FP_OP): Rename to...
18571         (SVE_COND_FP_BINARY): ...this.
18573 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
18575         * optabs.c (can_reuse_operands_p): New function.
18576         (maybe_legitimize_operands): Try to reuse the results for
18577         earlier operands.
18579 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
18581         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18582         Add {q} suffix to insn mnemonic.
18584 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18586         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18587         (msp430_warn_func_return): New.
18589 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
18591         * fold-const.c (tree_nonzero_bits): New function.
18592         * fold-const.h (tree_nonzero_bits): Likewise.
18593         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18594         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18596 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
18598         PR target/85900
18599         PR target/85345
18600         * varasm.c (assemble_alias): Check ifunc_resolver only on
18601         FUNCTION_DECL.
18603 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
18605         PR target/85903
18606         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18607         when memory input operand is handled.
18609 2018-05-24  Luis Machado  <luis.machado@linaro.org>
18611         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18612         global.
18613         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18615 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18617         * match.pd: Delay FMA folds until after vectorization.
18619 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18621         PR target/83009
18622         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18623         address check not strict.
18625 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
18627         * gimple-match.h (gimple_match_op): New class.
18628         (mprts_hook): Replace parameters with a gimple_match_op *.
18629         (maybe_build_generic_op): Likewise.
18630         (gimple_simplified_result_is_gimple_val): Replace parameters with
18631         a const gimple_match_op *.
18632         (gimple_simplify): Replace code_helper * and tree * parameters with
18633         a gimple_match_op * parameter.
18634         (gimple_resimplify1): Replace code_helper *, tree and tree *
18635         parameters with a gimple_match_op * parameter.
18636         (gimple_resimplify2): Likewise.
18637         (gimple_resimplify3): Likewise.
18638         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18639         parameters with a gimple_match_op * parameter.
18640         * gimple-match-head.c (gimple_simplify): Change prototypes of
18641         auto-generated functions to take a gimple_match_op * instead of
18642         separate code_helper * and tree * parameters.  Make the same
18643         change in the top-level overload and update calls to the
18644         gimple_resimplify routines.  Update calls to the auto-generated
18645         functions and to maybe_push_res_to_seq in the publicly-facing
18646         operation-specific gimple_simplify overloads.
18647         (gimple_match_op::MAX_NUM_OPS): Define.
18648         (gimple_resimplify1): Replace rcode and ops with a single res_op
18649         parameter.  Update call to gimple_simplify.
18650         (gimple_resimplify2): Likewise.
18651         (gimple_resimplify3): Likewise.
18652         (mprts_hook): Replace parameters with a gimple_match_op *.
18653         (maybe_build_generic_op): Likewise.
18654         (build_call_internal): Replace type, nargs and ops with
18655         a gimple_match_op *.
18656         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18657         with a single gimple_match_op *.  Update calls to mprts_hook,
18658         build_call_internal and gimple_simplified_result_is_gimple_val.
18659         Factor out code that is common to the tree_code and combined_fn cases.
18660         * genmatch.c (expr::gen_transform): Replace tem_code and
18661         tem_ops with a gimple_match_op called tem_op.  Update calls
18662         to the gimple_resimplify functions and maybe_push_res_to_seq.
18663         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18664         res_ops.  Update call to the gimple_resimplify functions.
18665         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18666         (decision_tree::gen): Make the functions take a gimple_match_op *
18667         called res_op instead of separate res_code and res_ops parameters.
18668         Update call accordingly.
18669         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18670         and ops with a single res_op parameter.  Update calls to
18671         maybe_build_generic_op and maybe_push_res_to_seq.
18672         (fold_stmt_1): Update calls to gimple_simplify and
18673         replace_stmt_with_simplification.
18674         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18675         and gimple_simplified_result_is_gimple_val.
18676         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18677         gimple_simplify.
18678         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18679         with a gimple_match_op *.
18680         (vn_nary_build_or_lookup): Likewise.  Update call to
18681         vn_nary_build_or_lookup_1.
18682         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18683         gimple_match_op *.  Update calls to the gimple_resimplify routines
18684         and to gimple_simplified_result_is_gimple_val.
18685         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18686         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18687         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18688         (visit_nary_op): Likewise.
18689         (visit_reference_op_load): Likewise.
18691 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18693         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18694         modifier for printing the step amount.
18696 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
18698         PR target/78849
18699         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18700         types.
18702 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
18704         * doc/sourcebuild.texi (Endianness): New subsubsection.
18706 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18708         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18709         <prefetch_dynamic_strides>: New const bool field.
18710         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18711         prefetch_dynamic_strides.
18712         (exynosm1_prefetch_tune): Likewise.
18713         (thunderxt88_prefetch_tune): Likewise.
18714         (thunderx_prefetch_tune): Likewise.
18715         (thunderx2t99_prefetch_tune): Likewise.
18716         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18717         false.
18718         (aarch64_override_options_internal): Update to set
18719         PARAM_PREFETCH_DYNAMIC_STRIDES.
18720         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18721         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18722         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18723         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18724         prefetch-dynamic-strides setting.
18726 2018-05-23  Luis Machado  <luis.machado@linaro.org>
18728         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18729         <minimum_stride>: New const int field.
18730         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18731         minimum_stride field defaulting to -1.
18732         (exynosm1_prefetch_tune): Likewise.
18733         (thunderxt88_prefetch_tune): Likewise.
18734         (thunderx_prefetch_tune): Likewise.
18735         (thunderx2t99_prefetch_tune): Likewise.
18736         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18737         <default_opt_level>: Set to 3.
18738         (aarch64_override_options_internal): Update to set
18739         PARAM_PREFETCH_MINIMUM_STRIDE.
18740         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18741         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18742         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18743         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18744         stride is constant and is below the minimum stride threshold.
18746 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18748         * config/arm/arm-cpus.in (mode26): Delete.
18749         (armv4): Delete mode26 reference.
18750         * config/arm/arm.c (arm_configure_build_target): Delete use of
18751         isa_bit_mode26.
18753 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18755         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18756         New insn pattern.
18757         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18758         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
18759         for non-SSE modes.
18760         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
18761         (floatunsdidf2): Ditto.
18763 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
18765         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18766         (fixuns_trunc<mode>si2_avx512f): Ditto.
18767         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18768         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18769         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18771 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18773         PR rtl-optimization/79985
18774         * df-scan.c (df_insn_refs_collect): Remove special case for
18775         global registers and asm statements.
18777 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
18779         * extend.texi (Global Register Variables): Rewrite the bullet list.
18780         Note that the register is available for allocation. Note that access
18781         via inline asm must use constraints. Add note about async-signal
18782         handlers. Remove paragraph about automagic register selection.
18784 2018-05-23  Richard Biener  <rguenther@suse.de>
18786         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18787         of fixed offset from memset VN.
18789 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
18791         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18792         first_interp field.
18793         (alloc_cand_and_find_basis): Initialize first_interp field.
18794         (slsr_process_mul): Modify first_interp field.
18795         (slsr_process_add): Likewise.
18796         (slsr_process_cast): Modify first_interp field for each new
18797         interpretation.
18798         (slsr_process_copy): Likewise.
18799         (dump_candidate): Dump first_interp field.
18800         (replace_mult_candidate): Process all interpretations, not just
18801         subsequent ones.
18802         (replace_rhs_if_not_dup): Likewise.
18803         (replace_one_candidate): Likewise.
18805 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
18807         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18808         Add new boolean.
18809         (aarch64_needs_frame_chain): New function.
18810         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18812 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
18814         PR target/84882
18815         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18816         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18817         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18818         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18819         as true for strict-align.
18820         (aarch64_can_inline_p): Perform checks even when callee has no
18821         attributes to check for strict alignment.
18822         * doc/extend.texi (AArch64 Function Attributes): Document
18823         no-strict-align.
18824         * doc/invoke.texi: (AArch64 Options): Likewise.
18826 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
18828         PR tree-optimization/85853
18829         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18830         the handling of the root of the node to...
18831         (vect_slp_analyze_node_operations_1): ...this new function,
18832         and run the whole thing with the child nodes' def types
18833         set according to their SLP node's def type.
18835 2018-05-23  Richard Biener  <rguenther@suse.de>
18837         PR middle-end/85874
18838         * tree-data-ref.c (create_runtime_alias_checks): Defer
18839         and ignore overflow warnings.
18841 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
18843         PR tree-optimization/85822
18844         * tree-vrp.c (is_masked_range_test): Fix handling of negative
18845         constants.
18847 2018-05-23  Richard Biener  <rguenther@suse.de>
18849         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18850         memset constants via native_interpret_expr.
18852 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
18854         PR target/85345
18855         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18856         attribute.
18857         (cgraph_node::create_alias): Likewise.
18858         (cgraph_node::get_availability): Check ifunc_resolver instead
18859         of looking up ifunc attribute.
18860         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18861         * varasm.c (do_assemble_alias): Likewise.
18862         (assemble_alias): Likewise.
18863         (default_binds_local_p_3): Likewise.
18864         * cgraph.h (cgraph_node): Add ifunc_resolver.
18865         (cgraph_node::only_called_directly_or_aliased_p): Return false
18866         for IFUNC resolver.
18867         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18868         attribute.
18869         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18870         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18871         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18872         instead of looking up ifunc attribute.
18874 2018-05-22  Luis Machado  <luis.machado@linaro.org>
18876         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18878 2018-05-22  Martin Sebor  <msebor@redhat.com>
18880         PR middle-end/85359
18881         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18882         only when expasion succeeds.
18883         (expand_builtin_strcmp): Same.
18884         (expand_builtin_strncmp): Same.
18886 2018-05-22  Martin Sebor  <msebor@redhat.com>
18888         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18890 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18891             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18893         * config/aarch64/aarch64-ldpstp.md: Replace uses of
18894         aarch64_mem_pair_operand with memory_operand and delete operand swapping
18895         code.
18896         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18897         Add check for legitimate_address.
18898         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18899         (aarch64_swap_ldrstr_operands): New.
18900         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18901         Define prototype.
18903 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
18904             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18906         * config/aarch64/aarch64.md: New patterns to generate stp
18907         and ldp.
18908         (store_pair_sw, store_pair_dw): New patterns to generate stp for
18909         single words and double words.
18910         (load_pair_sw, load_pair_dw): Likewise.
18911         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18912         Delete.
18913         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18914         Delete.
18915         * config/aarch64/aarch64-ldpstp.md: Modify peephole
18916         for different mode ldpstp and add peephole for merged zero stores.
18917         Likewise for loads.
18918         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18919         Add size check.
18920         (aarch64_gen_store_pair): Rename calls to match new patterns.
18921         (aarch64_gen_load_pair): Rename calls to match new patterns.
18922         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18923         (load_pair<DREG:mode><DREG2:mode>): ... This.
18924         (store_pair<mode>): Rename to...
18925         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18926         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18927         New mode iterators.
18928         (V_INT_EQUIV): Handle SImode.
18929         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18930         New predicate.
18932 2018-05-22  Martin Sebor  <msebor@redhat.com>
18934         PR c/85623
18935         * calls.c (maybe_warn_nonstring_arg): Use string length to set
18936         or ajust the presumed bound on an operation to avoid unnecessary
18937         warnings.
18939 2018-05-22  Martin Sebor  <msebor@redhat.com>
18941         PR tree-optimization/85826
18942         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18943         assuming that a DECL necesarily has a constant size.
18945 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
18947         PR middle-end/85862
18948         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18950 2018-05-22  Richard Biener  <rguenther@suse.de>
18952         PR tree-optimization/85834
18953         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18954         non-constant and non-zero memset arguments.
18956 2018-05-22  Martin Liska  <mliska@suse.cz>
18958         PR ipa/85607
18959         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18961 2018-05-22  Richard Biener  <rguenther@suse.de>
18963         PR tree-optimization/85863
18964         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18965         comparisons when vectype is specified.
18966         (vectorizable_condition): Do not specify vectype for
18967         vect_is_simple_cond when SLP vectorizing.
18969 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
18971         PR target/85657
18972         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18973         define __ibm128 as long double.
18974         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18975         as a distinct type when IEEE 128-bit support is enabled.
18976         (init_float128_ieee): Fix up conversions between IFmode and IEEE
18977         128-bit types to use the correct functions.
18978         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18979         convert between 128-bit floating point types that have different
18980         modes but the same representation, instead of using gen_lowpart to
18981         makean alias.
18982         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18983         KFmode.
18984         (IFKF_reg): New attributes to give the register constraints for
18985         IFmode and KFmode.
18986         (extend<mode>tf2_internal): New insns to mark an explicit
18987         conversion between 128-bit floating point types that have a
18988         different mode but share the same representation.
18990 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
18992         PR tree-optimization/85814
18993         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18994         a null return from get_strinfo when unsharing the next
18995         strinfo in the chain.
18997 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
18999         PR gcc/84923
19000         * varasm.c (weak_finish): Clean up weak_decls.
19002 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19004         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
19005         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
19006         UNSPEC_UADALP values.
19007         * config/aarch64/iterators.md (ABAL): New int iterator.
19008         (ABDL2): Likewise.
19009         (ADALP): Likewise.
19010         (sur): Add mappings for the above.
19011         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
19012         New define_insn.
19013         (aarch64_<sur>abal<mode>_4): Likewise.
19014         (aarch64_<sur>adalp<mode>_3): Likewise.
19015         (<sur>sadv16qi): New define_expand.
19017 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
19019         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
19020         (*movdf_internal): Ditto.
19021         (*rcpsf2_sse): Ditto.
19022         (*rsqrtsf2_sse): Ditto.
19023         (*sqrt<mode>2_sse): Ditto.
19025 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
19027         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
19028         eor3q<mode>4.
19029         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
19030         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
19031         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
19032         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
19033         vbcaxq_s64): New.
19034         * config/aarch64/arm_neon.h: Likewise.
19035         * config/aarch64/iterators.md (VQ_I): New.
19037 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
19039         * config.gcc: Add arc/t-multilib-linux to tmake_file for
19040         arc*-*-linux*.
19041         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
19042         MULTILIB_DIRNAMES
19044 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
19046         * config/nds32/constraints.md (S): New constraint.
19047         * config/nds32/nds32.md (call_internal): Use constraint S.
19048         (call_value_internal): Likewise.
19049         (sibcall_internal): Likewise.
19050         (sibcall_value_internal): Likewise.
19052 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
19053             Chung-Ju Wu  <jasonwucj@gmail.com>
19055         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
19056         into consideration.
19058 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
19059             Chung-Ju Wu  <jasonwucj@gmail.com>
19061         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19062         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
19063         (nds32_rtx_costs_impl): Simplify.
19064         (nds32_address_cost_impl): Simplify.
19065         (nds32_init_rtx_costs): New function.
19066         (nds32_rtx_costs_speed_prefer): Likewise.
19067         (nds32_rtx_costs_size_prefer): Likewise.
19068         (nds32_address_cost_speed_prefer): Likewise.
19069         (nds32_address_cost_speed_fwprop): Likewise.
19070         (nds32_address_cost_size_prefer): Likewise.
19071         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19072         * config/nds32/nds32.c (nds32_option_override): Use
19073         nds32_init_rtx_costs function.
19075 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
19077         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19078         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19079         (TARGET_PIPELINE_N8): Likewise.
19080         (TARGET_PIPELINE_N10): Likewise.
19081         (TARGET_PIPELINE_N13): Likewise.
19082         (TARGET_PIPELINE_GRAYWOLF): Likewise.
19084 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
19086         * config/nds32/nds32-fpu.md: Update copyright year.
19088 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19090         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19092 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19094         * config/nds32/nds32.c
19095         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19096         * config/nds32/nds32.opt (minline-asm-r15): New option.
19098 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19100         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19101         MASK_HW_ABS.
19102         * config/nds32/nds32.md (abssi2): New pattern.
19104 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
19106         * config/i386/i386.md (rex64namesuffix): New mode attribute.
19107         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19108         Merge insn pattern from sse_cvtsi2ss<round_name> and
19109         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19110         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19111         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19112         using SWI48 mode iterator.
19113         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19114         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19115         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19116         pattern from sse_cvttss2si<round_saeonly_name>
19117         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19118         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19119         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19120         using SWI48 mode iterator.
19121         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19122         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19123         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19124         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19125         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19126         using SWI48 mode iterator.
19127         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19128         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19129         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19130         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19131         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19132         SWI48 mode iterator.
19133         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19134         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19135         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19136         pattern from sse_cvttsd2si<round_saeonly_name>
19137         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19139 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19141         * config/nds32/nds32-md-auxiliary.c
19142         (nds32_valid_smw_lwm_base_p): Refine.
19143         (nds32_output_smw_single_word): Refine.
19144         (nds32_output_smw_double_word): New.
19145         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19147 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19149         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19150         (nds32_output_stack_pop): Refine.
19151         (nds32_expand_unaligned_load): Refine.
19152         (nds32_expand_unaligned_store): Refine.
19154 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
19155             Chung-Ju Wu  <jasonwucj@gmail.com>
19157         * config/nds32/constants.md: Add TP_REGNUM constant.
19158         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19159         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19160         UNSPEC_ADD32.
19161         * config/nds32/nds32-doubleword.md: Consider flag_pic.
19162         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19163         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19164         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19165         and PIC code generation.
19166         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19167         code generation.
19168         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19169         optimization.
19170         * config/nds32/nds32.md: Support TLS and PIC.
19171         * config/nds32/nds32.c: Support TLS and PIC.
19172         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19173         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19174         predicate.
19176 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19178         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19179         mode with E_ prefix.
19181 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
19182             Chung-Ju Wu  <jasonwucj@gmail.com>
19184         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19185         * config/nds32/nds32-md-auxiliary.c
19186         (symbolic_reference_mentioned_p): New.
19187         (nds32_legitimize_ict_address): New.
19188         (nds32_expand_ict_move): New.
19189         (nds32_indirect_call_referenced_p): New.
19190         (nds32_symbol_binds_local_p): Delete.
19191         (nds32_long_call_p): Modify.
19192         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19193         * config/nds32/nds32-protos.h
19194         (symbolic_reference_mentioned_p): Declare.
19195         (nds32_legitimize_ict_address): Declare.
19196         (nds32_expand_ict_move): Declare.
19197         (nds32_indirect_call_referenced_p): Declare.
19198         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19199         (nds32_relax_group): Use nds32_ict_const_p as condition.
19200         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19201         (nds32_asm_file_start): Output ict_model directive in asm code.
19202         (nds32_legitimate_address_p): Consider indirect call.
19203         (nds32_print_operand): Consider indirect call.
19204         (nds32_print_operand_address): Consider indirect call.
19205         (nds32_insert_attributes): Handle "indirect_call" attribute.
19206         (TARGET_LEGITIMATE_ADDRESS_P): Define.
19207         (TARGET_LEGITIMATE_CONSTANT_P): Define.
19208         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19209         (TARGET_DELEGITIMIZE_ADDRESS): Define.
19210         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19211         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19212         (TARGET_ICT_MODEL_SMALL): Define.
19213         (TARGET_ICT_MODEL_LARGE): Define.
19214         * config/nds32/nds32.md (movsi): Consider ict model.
19215         (call, call_value): Consider ict model.
19216         (sibcall, sibcall_value): Consider ict model.
19217         * config/nds32/nds32.opt (mict-model): New option.
19218         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19219         model.
19221 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
19222             Monk Chiang  <sh.chiang04@gmail.com>
19223             Jim Wilson <jimw@sifive.com>
19225         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19226         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
19227         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19228         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19229         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
19230         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19231         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19232         compute save_libcall_adjustment properly.
19233         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19234         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19235         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19236         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
19237         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
19238         (ABI_SPEC): Handle mabi=ilp32e.
19239         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
19240         (RVE): Add RVE mask.
19241         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
19242         <-march>: Add rv32e as an example.
19244 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
19246         PR c++/82899
19247         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
19248         (intra_create_variable_infos): Handle C++ constructors.
19250 2018-05-18  Martin Liska  <mliska@suse.cz>
19252         * passes.def: Remove a redundant pass.
19254 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
19256         PR bootstrap/85838
19257         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
19259 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19261         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
19262         (ARMv4): Update.
19263         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
19264         (ARMv6m): Update.
19265         (armv2, armv2a, armv3, armv3m): Delete architectures.
19266         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
19267         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
19268         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
19269         Delete cpus.
19270         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
19271         (*mulsidi3adddi): Likewise.
19272         (mulsidi3): Likewise.
19273         (*mulsidi3_nov6): Likewise.
19274         (umulsidi3): Likewise.
19275         (umulsidi3_nov6): Likewise.
19276         (umaddsidi4): Likewise.
19277         (*umulsidi3adddi): Likewise.
19278         (smulsi3_highpart): Likewise.
19279         (*smulsi3_highpart_nov6): Likewise.
19280         (umulsi3_highpart): Likewise.
19281         (*umulsi3_highpart_nov6): Likewise.
19282         * config/arm/arm.h (arm_arch3m): Delete.
19283         * config/arm/arm.c (arm_arch3m): Delete.
19284         (arm_option_override_internal): Update armv3-related comment.
19285         (arm_configure_build_target): Delete use of isa_bit_mode32.
19286         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
19287         (arm_rtx_costs_internal): Delete check of arm_arch3m.
19288         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
19289         (mulsa3): Likewise.
19290         (mulusa3): Likewise.
19291         * config/arm/arm-protos.h (arm_arch3m): Delete.
19292         * config/arm/arm-tables.opt: Regenerate.
19293         * config/arm/arm-tune.md: Likewise.
19294         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
19295         deleted architectures.
19297 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19299         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
19300         (armv5t, armv5te): New features.
19301         (ARMv5, ARMv5e): Delete fgroups.
19302         (ARMv5t, ARMv5te): Adjust for above changes.
19303         (ARMv6m): Likewise.
19304         (armv5, armv5e): Delete arches.
19305         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
19306         arm_arch5.
19307         (*call_reg_arm): Likewise.
19308         (*call_value_reg_armv5): Likewise.
19309         (*call_value_reg_arm): Likewise.
19310         (*call_symbol): Likewise.
19311         (*call_value_symbol): Likewise.
19312         (*sibcall_insn): Likewise.
19313         (*sibcall_value_insn): Likewise.
19314         (clzsi2): Likewise.
19315         (prefetch): Likewise.
19316         (define_split and define_peephole2 dependent on arm_arch5):
19317         Likewise.
19318         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
19319         arm_arch5e.
19320         (TARGET_ARM_QBIT): Likewise.
19321         (TARGET_DSP_MULTIPLY): Likewise.
19322         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
19323         (arm_arch5, arm_arch5e): Delete.
19324         (arm_arch5t, arm_arch5te): Declare.
19325         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
19326         (arm_arch5t): Declare.
19327         (arm_option_reconfigure_globals): Update for the above.
19328         (arm_options_perform_arch_sanity_checks): Update comment, replace
19329         use of arm_arch5 with arm_arch5t.
19330         (use_return_insn): Likewise.
19331         (arm_emit_call_insn): Likewise.
19332         (output_return_instruction): Likewise.
19333         (arm_final_prescan_insn): Likewise.
19334         (arm_coproc_builtin_available): Likewise.
19335         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
19336         arm_arch5e with arm_arch5t and arm_arch5te.
19337         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
19338         (arm_arch5t, arm_arch5te): Declare.
19339         * config/arm/arm-tables.opt: Regenerate.
19340         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
19341         * config/arm/t-multilib: Likewise.
19342         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
19343         instead of arm_arch5.
19344         (*call_reg_thumb1): Likewise.
19345         (*call_value_reg_thumb1_v5): Likewise.
19346         (*call_value_reg_thumb1): Likewise.
19347         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
19348         unreachable path.
19349         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
19351 2018-05-18  Martin Liska  <mliska@suse.cz>
19353         PR gcov-profile/84846
19354         * doc/gcov.texi: Document -t option of gcov tool.
19356 2018-05-18  Martin Liska  <mliska@suse.cz>
19358         PR gcov-profile/84846
19359         * gcov.c (print_usage): Add new -t option.
19360         (process_args): Handle the option.
19361         (generate_results): Use stdout as output when requested by
19362         the option.
19364 2018-05-18  Martin Liska  <mliska@suse.cz>
19366         PR gcov-profile/84846
19367         * coverage.c (coverage_init): Write PWD to .gcno file.
19368         * doc/gcov.texi: Document how working directory is printed.
19369         * gcov-dump.c (dump_gcov_file): Print PWD.
19370         * gcov.c (output_intermediate_file): Likewise.
19371         (read_graph_file): Read PWD string.
19372         (output_lines): Print PWD.
19374 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19376         PR middle-end/85817
19377         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
19378         for retval and return false if all args to phi are zero.
19380 2018-05-18  Richard Biener  <rguenther@suse.de>
19382         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
19383         method.
19384         (evrp_dom_walker::before_dom_children): Call it.
19386 2018-05-18  Richard Biener  <rguenther@suse.de>
19388         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
19389         results when processing array refs with variable index.
19391 2018-05-18  Toon Moene  <toon@moene.org>
19393         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
19394         directly after that of -floop-interchange. Indicate that both
19395         options are enabled by default when specifying -O3.
19397 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19399         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
19400         iterator.  Delete separate integer-mode vec_set<mode> expander.
19401         (aarch64_simd_vec_setv2di): Delete.
19402         (vec_setv2di): Delete.
19403         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
19404         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
19405         the "w, r" alternative.
19407 2018-05-18  Martin Liska  <mliska@suse.cz>
19409         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
19410         * tree-pass.h (make_pass_lower_switch_O0): New function.
19411         * tree-switch-conversion.c (node_has_low_bound): Remove.
19412         (node_has_high_bound): Likewise.
19413         (node_is_bounded): Likewise.
19414         (class pass_lower_switch): Make it a template type and create
19415         two instances.
19416         (pass_lower_switch::execute): Add template argument.
19417         (make_pass_lower_switch): New function.
19418         (make_pass_lower_switch_O0): New function.
19419         (do_jump_if_equal): Remove.
19420         (emit_case_nodes): Simplify to just handle all 3 cases and leave
19421         all the hard work to tree optimization passes.
19423 2018-05-18  Martin Liska  <mliska@suse.cz>
19425         * dbgcnt.c (limit_low): Renamed from limit.
19426         (limit_high): New variable.
19427         (dbg_cnt_is_enabled): Check for upper limit.
19428         (dbg_cnt): Adjust dumping.
19429         (dbg_cnt_set_limit_by_index): Add new argument for high
19430         value.
19431         (dbg_cnt_set_limit_by_name): Likewise.
19432         (dbg_cnt_process_single_pair): Parse new format.
19433         (dbg_cnt_process_opt): Use strtok.
19434         (dbg_cnt_list_all_counters): Remove 'value' and add
19435         'limit_high'.
19436         * doc/invoke.texi: Document changes.
19438 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
19440         * doc/sourcebuild.texi (scalar_all_fma): Document.
19441         * tree.def (FMA_EXPR): Delete.
19442         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
19443         * internal-fn.c (ternary_direct): New macro.
19444         (expand_ternary_optab_fn): Likewise.
19445         (direct_ternary_optab_supported_p): Likewise.
19446         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
19447         * builtins.c (fold_builtin_fma): Delete.
19448         (fold_builtin_3): Don't call it.
19449         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
19450         * expr.c (expand_expr_real_2): Likewise.
19451         * fold-const.c (operand_equal_p): Likewise.
19452         (fold_ternary_loc): Likewise.
19453         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
19454         * gimple.c (DEFTREECODE): Likewise.
19455         * gimplify.c (gimplify_expr): Likewise.
19456         * optabs-tree.c (optab_for_tree_code): Likewise.
19457         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
19458         * tree-eh.c (operation_could_trap_p): Likewise.
19459         (stmt_could_throw_1_p): Likewise.
19460         * tree-inline.c (estimate_operator_cost): Likewise.
19461         * tree-pretty-print.c (dump_generic_node): Likewise.
19462         (op_code_prio): Likewise.
19463         * tree-ssa-loop-im.c (stmt_cost): Likewise.
19464         * tree-ssa-operands.c (get_expr_operands): Likewise.
19465         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
19466         * fold-const-call.h (fold_fma): Delete.
19467         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
19468         CFN_FNMA and CFN_FNMS.
19469         (fold_fma): Delete.
19470         * genmatch.c (combined_fn): New enum.
19471         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
19472         (commutative_op): New function.
19473         (commutate): Use it.  Handle more than 2 operands.
19474         (dt_operand::gen_gimple_expr): Use commutative_op.
19475         (parser::parse_expr): Allow :c to be used with non-binary
19476         operators if the commutative operand is known.
19477         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
19478         CFN_FMS, CFN_FNMA and CFN_FNMS.
19479         (backprop::process_assign_use): Remove FMA_EXPR handling.
19480         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
19481         (gen_hsa_fma): New function.
19482         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
19483         IFN_FNMA and IFN_FNMS.
19484         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
19485         * gimple-fold.h (follow_all_ssa_edges): Declare.
19486         * gimple-fold.c (follow_all_ssa_edges): New function.
19487         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
19488         gimple_build interface and use follow_all_ssa_edges to fold the result.
19489         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
19490         instead of checking for optabs directly.
19491         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19492         rather than FMA_EXPRs.
19493         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19494         call to IFN_FMA instead of an FMA_EXPR.
19496 2018-05-17  Jim Wilson  <jimw@sifive.com>
19498         * expr.c (do_tablejump): When converting index to Pmode, if we have a
19499         sign extended promoted subreg, and the range does not have the sign bit
19500         set, then do a sign extend.
19502         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19503         test, check for sign extended subreg and/or constant operands, and
19504         do a sign extend in that case.
19506 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
19508         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19509         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19510         Add untyped.
19511         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19512         Change logics_shift_reg to logics_shift_imm.
19513         (thunderx2t99_fp_loadpair_basic): Delete.
19514         (thunderx2t99_fp_storepair_basic): Delete.
19515         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19516         (thunderx2t99_asimd_polynomial): Delete.
19517         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19518         and neon_fp_mul_d_scalar_q.
19519         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19520         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19521         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19522         (thunderx2t99_asimd_lut): Add missing tbl types.
19523         (thunderx2t99_asimd_ext): Delete.
19524         (thunderx2t99_asimd_load1_1_mult): Delete.
19525         (thunderx2t99_asimd_load1_2_mult): Delete.
19526         (thunderx2t99_asimd_load1_ldp): New.
19527         (thunderx2t99_asimd_load1): New.
19528         (thunderx2t99_asimd_load2): Add missing *load2* types.
19529         (thunderx2t99_asimd_load3): New.
19530         (thunderx2t99_asimd_load4): New.
19531         (thunderx2t99_asimd_store1_1_mult): Delete.
19532         (thunderx2t99_asimd_store1_2_mult): Delete.
19533         (thunderx2t99_asimd_store2_mult): Delete.
19534         (thunderx2t99_asimd_store2_onelane): Delete.
19535         (thunderx2t99_asimd_store_stp): New.
19536         (thunderx2t99_asimd_store1): New.
19537         (thunderx2t99_asimd_store2): New.
19538         (thunderx2t99_asimd_store3): New.
19539         (thunderx2t99_asimd_store4): New.
19541 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
19543         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19544         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
19546 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
19547             Segher Boessenkool  <segher@kernel.crashing.org>
19549         PR target/85698
19550         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19551         operand.
19553 2018-05-17  Richard Biener  <rguenther@suse.de>
19555         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19556         for pruning loop and prune defs feeding only already visited PHIs.
19558 2018-05-17  Richard Biener  <rguenther@suse.de>
19560         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19562 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
19563             Richard Biener  <rguenther@suse.de>
19565         PR tree-optimization/85793
19566         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19567         for VMAT_ELEMENTWISE.
19569 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
19571         * internal-fn.h (lookup_internal_fn): Declare
19572         * internal-fn.c (lookup_internal_fn): New function.
19573         * gimple.c (gimple_build_call_from_tree): Handle calls to
19574         internal functions.
19575         * gimple-pretty-print.c (dump_gimple_call): Print "." before
19576         internal function names.
19577         * tree-pretty-print.c (dump_generic_node): Likewise.
19578         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19580 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
19582         * gimple-fold.h (gimple_build): Make the function forms take
19583         combined_fn rather than built_in_function.
19584         (gimple_simplify): Likewise.
19585         * gimple-match-head.c (gimple_simplify): Likewise.
19586         * gimple-fold.c (gimple_build): Likewise.
19587         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19588         rather than gimple_build_call_internal.
19589         (get_initial_defs_for_reduction): Likewise.
19590         (vect_create_epilog_for_reduction): Likewise.
19591         (vectorizable_live_operation): Likewise.
19593 2018-05-17  Martin Liska  <mliska@suse.cz>
19595         * gimple-ssa-sprintf.c (format_directive): Do not use
19596         space in between 'G_' and '('.
19598 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
19600         PR target/85323
19601         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19602         even if the mask is not all ones.
19604         PR target/85323
19605         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19606         vector.
19607         (ix86_gimple_fold_builtin): Likewise.
19609         PR target/85323
19610         * config/i386/i386.c: Include tree-vector-builder.h.
19611         (ix86_vector_shift_count): New function.
19612         (ix86_fold_builtin): Fold shift builtins by scalar count.
19613         (ix86_gimple_fold_builtin): Likewise.
19615         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19616         _mm512_setzero): New intrinsics.
19618 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
19619             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19621         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19622         code generation for cases where splatting a value is not useful.
19623         * simplify-rtx.c (simplify_ternary_operation): Simplify
19624         vec_merge across a vec_duplicate and a paradoxical subreg forming
19625         a vector mode to a vec_concat.
19627 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
19629         * config.gcc: Support "goldmont-plus".
19630         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19631         "goldmont-plus".
19632         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19633         PROCESSOR_GOLDMONT_PLUS.
19634         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19635         (processor_target_table): Add "goldmont-plus".
19636         (PTA_GOLDMONT_PLUS): Define.
19637         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19638         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19639         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19640         (fold_builtin_cpu): Add "goldmont-plus".
19641         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19642         (ix86_option_override_internal): Add "goldmont-plus".
19643         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19644         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19645         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19646         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19648 2018-05-17  Richard Biener  <rguenther@suse.de>
19650         PR tree-optimization/85757
19651         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19652         remove defs that only feed that PHI from further processing.
19654 2018-05-16  Jim Wilson  <jimw@sifive.com>
19656         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19657         asterisk to name.
19658         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19660 2018-05-16  Mark Wielaard  <mark@klomp.org>
19662         * dwarf2out.c (count_index_strings): New function.
19663         (output_indirect_strings): Call count_index_strings and generate
19664         header for dwarf_version >= 5.
19666 2018-05-16  Mark Wielaard  <mark@klomp.org>
19668         * dwarf2out.c (dwarf_FORM): New function.
19669         (set_indirect_string): Use dwarf_FORM.
19670         (reset_indirect_string): Likewise.
19671         (size_of_die): Likewise.
19672         (value_format): Likewise.
19673         (output_die): Likewise.
19674         (add_skeleton_AT_string): Likewise.
19675         (output_macinfo_op): Likewise.
19676         (index_string): Likewise.
19677         (output_index_string_offset): Likewise.
19678         (output_index_string): Likewise.
19679         (count_index_strings): Likewise.
19681 2018-05-16  Carl Love  <cel@us.ibm.com>
19683         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19684         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19686 2018-05-16  Martin Jambor  <mjambor@suse.cz>
19688         * ipa-prop.c (ipa_free_all_edge_args): Remove.
19689         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19691 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
19693         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19694         (fnma<mode>4): Likewise.
19695         (fms<mode>4): Likewise.
19696         (fnms<mode>4): Likewise.
19697         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19698         (aarch64_fnma<mode>4): Likewise.
19699         (aarch64_fms<mode>4): Likewise.
19700         (aarch64_fnms<mode>4): Likewise.
19701         (aarch64_fnmadd<mode>4): Likewise.
19703 2018-05-16  Jason Merrill  <jason@redhat.com>
19705         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
19707 2018-05-16  Richard Biener  <rguenther@suse.de>
19709         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19710         (dump_stmt_cost): Declare.
19711         (add_stmt_cost): Dump cost we add.
19712         (add_stmt_costs): New function.
19713         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19714         No longer exported.
19715         (vect_analyze_stmt): Adjust prototype.
19716         (vectorizable_condition): Likewise.
19717         (vectorizable_live_operation): Likewise.
19718         (vectorizable_reduction): Likewise.
19719         (vectorizable_induction): Likewise.
19720         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19721         cost vector to pass to vectorizable_ and record afterwards.
19722         (vect_model_reduction_cost): Take cost vector argument and adjust.
19723         (vect_model_induction_cost): Likewise.
19724         (vectorizable_reduction): Likewise.
19725         (vectorizable_induction): Likewise.
19726         (vectorizable_live_operation): Likewise.
19727         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19728         SLP_TREE_NUMBER_OF_VEC_STMTS.
19729         (vect_analyze_slp_cost_1): Remove.
19730         (vect_analyze_slp_cost): Likewise.
19731         (vect_slp_analyze_node_operations): Take visited args and
19732         a target cost vector.  Avoid processing already visited stmt sets.
19733         (vect_slp_analyze_operations): Use a local cost vector to gather
19734         costs and register those of non-discarded instances.
19735         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19736         (vect_schedule_slp_instance): Remove copying of
19737         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
19738         zero.
19739         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19740         adding cost.  Record cost entry location.
19741         (vect_prologue_cost_for_slp_op): Function to compute cost of
19742         a constant or invariant generated for SLP vect in the prologue,
19743         split out from vect_analyze_slp_cost_1.
19744         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
19745         (vect_model_promotion_demotion_cost): Likewise.
19746         (vect_model_store_cost): Likewise, make static.
19747         (vect_model_load_cost): Likewise.
19748         (vectorizable_bswap): Add cost vector arg and adjust.
19749         (vectorizable_call): Likewise.
19750         (vectorizable_simd_clone_call): Likewise.
19751         (vectorizable_conversion): Likewise.
19752         (vectorizable_assignment): Likewise.
19753         (vectorizable_shift): Likewise.
19754         (vectorizable_operation): Likewise.
19755         (vectorizable_store): Likewise.
19756         (vectorizable_load): Likewise.
19757         (vectorizable_condition): Likewise.
19758         (vectorizable_comparison): Likewise.
19759         (can_vectorize_live_stmts): Likewise.
19760         (vect_analyze_stmt): Likewise.
19761         (vect_transform_stmt): Adjust calls to vectorizable_*.
19762         * tree-vectorizer.c: Include gimple-pretty-print.h.
19763         (dump_stmt_cost): New function.
19765 2018-05-16  Richard Biener  <rguenther@suse.de>
19767         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19768         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19769         * tree-ssa-dse.c: Include tree-ssa-loop.h.
19770         (check_name): New callback.
19771         (dse_classify_store): Track cycles via a visited bitmap of PHI
19772         defs and simplify handling of in-loop and across loop dead stores
19773         and properly fail for loop-variant refs.  Handle byte-tracking with
19774         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19775         limiting the walk.
19777 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
19779         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19780         (vect_get_mask_type_for_stmt): Likewise.
19781         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19782         split out from...
19783         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
19784         to determine the statement's vector type and the vector type that
19785         should be used for calculating nunits.  Deal with cases in which
19786         the type has to be deferred.
19787         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19788         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19789         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19790         (vect_determine_vf_for_stmt): New functions, split out from...
19791         (vect_determine_vectorization_factor): ...here.
19792         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19793         (vect_get_mask_type_for_stmt): New functions, split out from
19794         vect_determine_vectorization_factor.
19796 2018-05-16  Richard Biener  <rguenther@suse.de>
19798         * tree-cfg.c (verify_gimple_assign_ternary): Properly
19799         verify the [VEC_]COND_EXPR embedded comparison.
19801 2018-05-15  Martin Sebor  <msebor@redhat.com>
19803         PR tree-optimization/85753
19804         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19805         RECORD_TYPE in addition to ARRAY_TYPE.
19807 2018-05-15  Martin Sebor  <msebor@redhat.com>
19809         PR middle-end/85643
19810         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19812 2018-05-15  Richard Biener  <rguenther@suse.de>
19814         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19815         add by_clobber_p one.  Change algorithm to collect all defs
19816         representing uses we need to walk and try reducing them to
19817         a single one before failing.
19818         (dse_dom_walker::dse_optimize_stmt): Adjust.
19820 2018-05-13  Mark Wielaard  <mark@klomp.org>
19822         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19823         (size_of_loc_descr): Likewise.
19824         (output_loc_operands): Likewise.
19825         (output_loc_operands_raw): Likewise.
19826         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19827         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19828         (hash_loc_operands): Likewise.
19829         (compare_loc_operands): Likewise.
19831 2018-05-14  Mark Wielaard  <mark@klomp.org>
19833         * dwarf2out.c (count_index_addrs): New function.
19834         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19836 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19838         PR tree-optimization/83648
19839         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19840         return value as malloc candidate.
19842 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19844         PR ipa/85734
19845         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19846         param as true in call to suggest_attribute.
19848 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
19850         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19851         -mreadonly-in-sdata.
19853 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19855         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19856         New pattern.
19857         (aarch64_crypto_aesd_fused): Likewise.
19859 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
19861         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19862         (movsi_aarch64): Likewise.
19863         (load_pairsi): Likewise.
19864         (load_pairdi): Likewise.
19865         (store_pairsi): Likewise.
19866         (store_pairdi): Likewise.
19867         (load_pairsf): Likewise.
19868         (load_pairdf): Likewise.
19869         (store_pairsf): Likewise.
19870         (store_pairdf): Likewise.
19871         (zero_extend): Likewise.
19872         (trunc): Swap alternatives.
19873         (fcvt_target): Add '?' to prefer w over r.
19875 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
19877         PR target/85756
19878         * config/i386/i386.md: Disallow non-commutative arithmetics in
19879         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19880         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
19881         in the peephole2 before it.
19883 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
19885         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19886         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19887         (ix86_handle_option): Handle -mcldemote.
19888         * config.gcc: New header.
19889         * config/i386/cldemoteintrin.h: New file.
19890         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19891         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19892         -mcldemote.
19893         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19894         OPTION_MASK_ISA_CLDEMOTE.
19895         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19896         (ix86_valid_target_attribute_inner_p): Ditto.
19897         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19898         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19899         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19900         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19901         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19902         (cldemote): New.
19903         * config/i386/i386.opt: Add -mcldemote.
19904         * config/i386/x86intrin.h: New header.
19905         * doc/invoke.texi: Add -mcldemote.
19907 2018-05-14  Richard Biener  <rguenther@suse.de>
19909         * doc/match-and-simplify.texi: Adjust :s documentation.
19911 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
19913         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19914         intended memcpy size.
19915         (REORDER_45): Likewise.
19917 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
19919         * sort.cc: New file.
19920         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19921         * vec.c (qsort_chk): Use gcc_qsort.
19922         * Makefile.in (OBJS-libcommon): Add sort.o.
19923         (build/sort.o): New target.  Use it...
19924         (BUILD_RTL): ... here, and...
19925         (build/gencfn-macros): ... here, and...
19926         (build/genmatch): ... here.
19928 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19929             Chung-Ju Wu  <jasonwucj@gmail.com>
19931         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19932         * config/nds32/nds32-graywolf.md: New file.
19933         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19934         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19935         pipeline.
19936         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19937         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19938         * config/nds32/nds32.md (pipeline_model): Add graywolf.
19939         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19940         * config/nds32/pipelines.md: Include n15 settings.
19942 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19943             Chung-Ju Wu  <jasonwucj@gmail.com>
19945         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19946         * config/nds32/nds32-n13.md: New file.
19947         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19948         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19949         pipeline.
19950         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19951         * config/nds32/nds32.md (pipeline_model): Add n13.
19952         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19953         * config/nds32/pipelines.md: Include n13 settings.
19955 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
19956             Chung-Ju Wu  <jasonwucj@gmail.com>
19958         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19959         * config/nds32/nds32-n10.md: New file.
19960         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19961         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19962         pipeline.
19963         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19964         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19965         * config/nds32/nds32.md (pipeline_model): Add n10.
19966         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19967         * config/nds32/pipelines.md: Include n10 settings.
19969 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
19970             Kito Cheng  <kito.cheng@gmail.com>
19971             Chung-Ju Wu  <jasonwucj@gmail.com>
19973         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19974         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19975         Add enum values for DSP extension instructions.
19976         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19977         New constraints.
19978         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19979         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19980         New code iterators.
19981         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19982         * config/nds32/nds32-dspext.md: New file for DSP implementation.
19983         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19984         * config/nds32/nds32-intrinsic.md: Likewise.
19985         * config/nds32/nds32_intrinsic.h: Likewise.
19986         * config/nds32/nds32-md-auxiliary.c: Likewise.
19987         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19988         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19989         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19990         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19991         * config/nds32/nds32-protos.h: New declarations for DSP extension.
19992         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19993         TYPE_DMAC in switch statement.
19994         * config/nds32/nds32.c: New checking and implementation for DSP
19995         extension instructions.
19996         * config/nds32/nds32.h: Likewise.
19997         * config/nds32/nds32.md: Likewise.
19998         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19999         * config/nds32/predicates.md: Implement new predicates for DSP
20000         extension.
20002 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20004         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
20005         Reformat alternatives and attributes so it is easier to identify
20006         which constraints/attributes go with which instruction.
20007         (mov<mode>_hardfloat32, FMOVE64): Likewise.
20008         (mov<mode>_softfloat32, FMOVE64): Likewise.
20009         (mov<mode>_hardfloat64, FMOVE64): Likewise.
20010         (mov<mode>_softfloat64, FMOVE64): Likewise.
20012 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20014         * doc/extend.texi (PowerPC Built-in Functions): Rename this
20015         subsection.
20016         (Basic PowerPC Built-in Functions): The new name of the
20017         subsection previously known as "PowerPC Built-in Functions".
20018         (Basic PowerPC Built-in Functions Available on all Configurations):
20019         New subsubsection.
20020         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
20021         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
20022         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
20023         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
20025 2018-05-11  Martin Jambor  <mjambor@suse.cz>
20027         PR ipa/85655
20028         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
20029         single const.
20031 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
20033         PR target/85733
20034         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
20036 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
20038         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
20039         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
20040         (ix86_handle_option): Handle -mwaitpkg.
20041         * config.gcc: New header.
20042         * config/i386/cpuid.h (bit_WAITPKG): New bit.
20043         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
20044         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
20045         function type.
20046         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20047         OPTION_MASK_ISA_WAITPKG.
20048         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
20049         (ix86_option_override_internal): Add PTA_WAITPKG.
20050         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
20051         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
20052         IX86_BUILTIN_TPAUSE.
20053         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
20054         __builtin_ia32_umwait and __builtin_ia32_tpause.
20055         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
20056         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
20057         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
20058         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
20059         UNSPECV_TPAUSE): New.
20060         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
20061         * config/i386/i386.opt: Add -mwaitpkg.
20062         * config/i386/waitpkgintrin.h: New file.
20063         * config/i386/x86intrin.h: New header.
20064         * doc/invoke.texi: Add -mwaitpkg.
20066 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
20068         PR target/85606
20069         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20070         equivalent.
20071         (cortex-m0): Use armv6s-m isa.
20072         (cortex-m0plus): Likewise.
20073         (cortex-m1): Likewise.
20074         (cortex-m0.small-multiply): Likewise.
20075         (cortex-m0plus.small-multiply): Likewise.
20076         (cortex-m1.small-multiply): Likewise.
20078 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
20079             Jakub Jelinek  <jakub@redhat.com>
20081         PR tree-optimization/85692
20082         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20083         source permute as well.
20085 2018-05-11  Martin Liska  <mliska@suse.cz>
20087         PR sanitizer/85556
20088         * doc/extend.texi: Document LLVM style format for no_sanitize
20089         attribute.
20091 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20093         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20094         mode_supports_vsx_dform_quad to mode_supports_dq_form.
20095         (mode_supports_vsx_dform_quad): Likewise.
20096         (mode_supports_vmx_dform): Move these functions to be next to the
20097         other mode_supports functions.
20098         (mode_supports_dq_form): Likewise.
20099         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20100         mode_supports_dq_form.
20101         (reg_offset_addressing_ok_p): Likewise.
20102         (offsettable_ok_by_alignment): Likewise.
20103         (rs6000_legitimate_offset_address_p): Likewise.
20104         (legitimate_lo_sum_address_p): Likewise.
20105         (rs6000_legitimize_address): Likewise.
20106         (rs6000_legitimize_reload_address): Likewise.
20107         (rs6000_secondary_reload_inner): Likewise.
20108         (rs6000_preferred_reload_class): Likewise.
20109         (rs6000_output_move_128bit): Likewise.
20111 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
20113         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20114         Generate SImode target register for null target.
20115         <case IX86_BUILTIN_XGETBV>: Ditto.
20116         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20117         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20119 2018-05-10  Carl Love  <cel@us.ibm.com>
20121         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20122         dcbtt and dcbtstt if operands[2] is 0.
20124 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
20126         PR target/85693
20127         * config/i386/sse.md (usadv64qi): New expander.
20129 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
20131         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20132         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20133         -maltivec=be support.
20134         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20135         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20136         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20137         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20138         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20139         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20140         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20141         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20142         altivec_vsumsws): Adjust.
20143         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20144         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20145         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20146         support.
20147         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20148         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20149         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20150         (altivec_lve<VI_char>x): Delete expand.
20151         (*altivec_lve<VI_char>x_internal): Rename to...
20152         (altivec_lve<VI_char>x): ... this.
20153         (altivec_lvxl_<mode>): Delete expand.
20154         (*altivec_lvxl_<mode>_internal): Rename to ...
20155         (altivec_lvxl_<mode>): ... this.
20156         (altivec_stvxl_<mode>): Delete expand.
20157         (*altivec_stvxl_<mode>_internal): Rename to ...
20158         (altivec_stvxl_<mode>): ... this.
20159         (altivec_stve<VI_char>x): Delete expand.
20160         (*altivec_stve<VI_char>x_internal): Rename to ...
20161         (altivec_stve<VI_char>x): ... this.
20162         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20163         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20164         reduc_plus_scal_<mode>): Adjust.
20165         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20166         comment.
20167         (rs6000_cpu_cpp_builtins): Adjust.
20168         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20169         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20170         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20171         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20172         -maltivec=be support.
20173         (rs6000_split_vec_extract_var): Adjust.
20174         (rs6000_split_v4si_init): Adjust.
20175         (swap_selector_for_mode): Delete.
20176         (altivec_expand_lvx_be, altivec_expand_stvx_be,
20177         altivec_expand_stvex_be): Delete.
20178         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20179         -maltivec=be support.
20180         (rs6000_gimple_fold_builtin): Ditto.
20181         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20182         Adjust.
20183         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20184         (TARGET_DIRECT_MOVE_64BIT): Adjust.
20185         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20186         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20187         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20188         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20189         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20190         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20191         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20192         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20193         anonymous split): Adjust.
20194         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20195         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20197 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
20199         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20200         when --with-gxx-include-dir is also specified.
20201         * configure: Regenerate.
20203 2018-05-09  Jim Wilson  <jimw@sifive.com>
20205         PR target/84797
20206         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20207         * config/riscv/t-withmultilib: New.
20208         * config/riscv/withmultilib.h: New.
20209         * doc/install.texi: Document RISC-V --with-multilib-list support.
20211 2018-05-09  Richard Biener  <rguenther@suse.de>
20213         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20214         vector.
20215         (vect_bb_vectorization_profitable_p): Adjust.  Compute
20216         actual scalar cost using the cost vector and the add_stmt_cost
20217         machinery.
20219 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20221         PR rtl-optimization/85645
20222         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20223         in the REG_CFA_REGISTER note for LR, don't leave it empty.
20225 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20227         PR rtl-optimization/85645
20228         * shrink-wrap.c (spread_components): Return a boolean saying if
20229         anything was changed.
20230         (try_shrink_wrapping_separate): Iterate spread_components until
20231         nothing changes anymore.
20233 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20235         PR rtl-optimization/85645
20236         * regrename.c (build_def_use): Also kill the chains that include the
20237         destination of a REG_CFA_REGISTER note.
20239 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20241         PR rtl-optimization/85645
20242         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
20243         insn that has a REG_CFA_REGISTER note.
20245 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
20247         * cfgexpand.c (expand_clobber): New function.
20248         (expand_gimple_stmt_1): Use it.
20249         * tree-vect-stmts.c (vect_clobber_variable): New function,
20250         split out from...
20251         (vectorizable_simd_clone_call): ...here.
20252         (vectorizable_store): Emit a clobber either side of an
20253         IFN_STORE_LANES sequence.
20254         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
20256 2018-05-09  Tom de Vries  <tom@codesourcery.com>
20258         PR target/85626
20259         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
20260         (define_insn "trap_if_false"): Add exit after trap.
20262 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
20264         PR rtl-optimization/85638
20265         * bb-reorder.c: Include common/common-target.h.
20266         (create_forwarder_block): New function extracted from...
20267         (fix_up_crossing_landing_pad): ...here.  Rename into...
20268         (dw2_fix_up_crossing_landing_pad): ...this.
20269         (sjlj_fix_up_crossing_landing_pad): New function.
20270         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
20271         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
20272         from both partitions and exit the loop after one iteration.
20274 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20276         Revert:
20277         * doc/extend.texi (PowerPC Built-in Functions): Rename this
20278         subsection.
20279         (Basic PowerPC Built-in Functions): The new name of the
20280         subsection previously known as "PowerPC Built-in Functions".
20281         (Basic PowerPC Built-in Functions Available on all Configurations):
20282         New subsubsection.
20283         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20284         subsubsection.
20285         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20286         subsubsection.
20287         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20288         subsubsection.
20289         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20290         subsubsection.
20292 2018-05-08  Jim Wilson  <jimw@sifive.com>
20294         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
20295         (LD_EMUL_SUFFIX): New.
20296         (LINK_SPEC): Use it.
20298 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20300         * doc/extend.texi (PowerPC Built-in Functions): Rename this
20301         subsection.
20302         (Basic PowerPC Built-in Functions): The new name of the
20303         subsection previously known as "PowerPC Built-in Functions".
20304         (Basic PowerPC Built-in Functions Available on all Configurations):
20305         New subsubsection.
20306         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
20307         subsubsection.
20308         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
20309         subsubsection.
20310         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
20311         subsubsection.
20312         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
20313         subsubsection.
20315 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
20317         PR target/85683
20318         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
20319         after cmpelim optimization.
20321 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
20323         * config.gcc: Support "goldmont".
20324         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
20325         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20326         PROCESSOR_GOLDMONT.
20327         * config/i386/i386.c (m_GOLDMONT): Define.
20328         (processor_target_table): Add "goldmont".
20329         (PTA_GOLDMONT): Define.
20330         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
20331         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
20332         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
20333         (fold_builtin_cpu): Add "goldmont".
20334         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
20335         (ix86_option_override_internal): Add "goldmont".
20336         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
20337         (processor_type): Add PROCESSOR_GOLDMONT.
20338         * config/i386/i386.md: Add CPU "glm".
20339         * config/i386/glm.md: New file.
20340         * config/i386/x86-tune.def: Add m_GOLDMONT.
20341         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
20343 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
20345         PR target/85572
20346         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
20347         E_V4DImode.
20348         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
20349         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
20350         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
20352         PR target/85317
20353         * config/i386/i386.c (ix86_fold_builtin): Handle
20354         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
20356         PR target/85480
20357         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
20358         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
20360 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
20362         PR target/85658
20363         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
20364         (check_arch): Likewise.
20365         (check_fpu): Return the result rather than printing it.
20366         (end arch): Fix operator precedence.
20367         (end cpu): Likewise.
20368         (END): Print the result from check_fpu.
20370 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
20371             Alan Hayward  <alan.hayward@arm.com>
20372             David Sherwood  <david.sherwood@arm.com>
20374         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
20375         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
20376         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
20377         (*fcmuo<mode>_and): New patterns.
20379 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
20381         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
20382         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
20383         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
20384         (cmp_op, sve_imm_con): New code attributes.
20385         (SVE_COND_INT_CMP, imm_con): Delete.
20386         (cmp_op): Remove above unspecs from int attribute.
20387         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
20388         to...
20389         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
20390         comparison-specific unspecs.
20391         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
20392         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
20393         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
20394         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
20395         (*vec_fcm<cmp_op><mode>): Rename to...
20396         (*fcm<cmp_op><mode>): ...this and adjust likewise.
20397         (*vec_fcmuo<mode>): Rename to...
20398         (*fcmuo<mode>): ...this and adjust likewise.
20399         (*pred_fcm<cmp_op><mode>): New pattern.
20400         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
20401         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
20402         functions.
20403         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
20404         and UNORDERED.
20405         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
20406         (aarch64_emit_sve_predicated_cond): New function.
20407         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
20408         (aarch64_emit_unspec_cond_or): Replace with...
20409         (aarch64_emit_sve_or_conds): ...this new function.  Use
20410         aarch64_emit_sve_ptrue_op for the individual comparisons and
20411         aarch64_emit_binop to OR them together.
20412         (aarch64_emit_inverted_unspec_cond): Replace with...
20413         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
20414         aarch64_emit_sve_ptrue_op for the comparison and
20415         aarch64_emit_unop to invert the result.
20416         (aarch64_expand_sve_vec_cmp_float): Update after the above
20417         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
20419 2018-05-07  Nathan Sidwell  <nathan@acm.org>
20421         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
20422         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
20423         (Backwards Compatibility): Likewise.
20425 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20427         PR bootstrap/85681
20428         Revert:
20429         2018-05-07  Luis Machado  <luis.machado@linaro.org>
20431         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20432         <prefetch_dynamic_strides>: New const bool field.
20433         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20434         prefetch_dynamic_strides.
20435         (exynosm1_prefetch_tune): Likewise.
20436         (thunderxt88_prefetch_tune): Likewise.
20437         (thunderx_prefetch_tune): Likewise.
20438         (thunderx2t99_prefetch_tune): Likewise.
20439         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20440         to false.
20441         (aarch64_override_options_internal): Update to set
20442         PARAM_PREFETCH_DYNAMIC_STRIDES.
20443         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20444         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20445         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20446         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20447         prefetch-dynamic-strides setting.
20449         2018-05-07  Luis Machado  <luis.machado@linaro.org>
20451         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20452         <minimum_stride>: New const int field.
20453         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20454         minimum_stride field.
20455         (exynosm1_prefetch_tune): Likewise.
20456         (thunderxt88_prefetch_tune): Likewise.
20457         (thunderx_prefetch_tune): Likewise.
20458         (thunderx2t99_prefetch_tune): Likewise.
20459         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20460         (aarch64_override_options_internal): Update to set
20461         PARAM_PREFETCH_MINIMUM_STRIDE.
20462         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20463         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20464         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20465         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20466         stride is constant and is below the minimum stride threshold.
20468 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20470         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
20471         to 512.
20473 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20475         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20476         <prefetch_dynamic_strides>: New const bool field.
20477         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20478         prefetch_dynamic_strides.
20479         (exynosm1_prefetch_tune): Likewise.
20480         (thunderxt88_prefetch_tune): Likewise.
20481         (thunderx_prefetch_tune): Likewise.
20482         (thunderx2t99_prefetch_tune): Likewise.
20483         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
20484         to false.
20485         (aarch64_override_options_internal): Update to set
20486         PARAM_PREFETCH_DYNAMIC_STRIDES.
20487         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20488         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20489         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20490         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20491         prefetch-dynamic-strides setting.
20493 2018-05-07  Luis Machado  <luis.machado@linaro.org>
20495         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20496         <minimum_stride>: New const int field.
20497         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20498         minimum_stride field.
20499         (exynosm1_prefetch_tune): Likewise.
20500         (thunderxt88_prefetch_tune): Likewise.
20501         (thunderx_prefetch_tune): Likewise.
20502         (thunderx2t99_prefetch_tune): Likewise.
20503         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20504         (aarch64_override_options_internal): Update to set
20505         PARAM_PREFETCH_MINIMUM_STRIDE.
20506         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20507         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20508         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20509         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20510         stride is constant and is below the minimum stride threshold.
20512 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
20514         PR c++/85659
20515         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20516         the type is addressable.  Don't force op into register if it has
20517         BLKmode.
20519 2018-05-05  Roland McGrath  <mcgrathr@google.com>
20521         PR other/77609
20522         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20523         any section for which we don't know a specific type it should have,
20524         regardless of name.  Previously this was done only for the exact
20525         names ".init_array", ".fini_array", and ".preinit_array".
20526         (default_elf_asm_named_section): Add comment about
20527         relationship with default_section_type_flags and SECTION_NOTYPE.
20528         (get_section): Don't consider it a type conflict if one side has
20529         SECTION_NOTYPE and the other doesn't, as long as neither has the
20530         SECTION_BSS et al used in the default_section_type_flags logic.
20532 2018-05-05  Tom de Vries  <tom@codesourcery.com>
20534         PR target/85653
20535         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20536         (workaround_barsyncs): New function.
20537         (nvptx_reorg): Use workaround_barsyncs.
20538         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20539         (define_expand "nvptx_membar_cta"): New define_expand.
20540         (define_insn "*nvptx_membar_cta"): New insn.
20542 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
20544         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20545         To improve optimization opportunities.
20546         * builtin-types.def: The new needed builtin types for the above.
20548 2018-05-04  Richard Biener  <rguenther@suse.de>
20550         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20551         * gimple-ssa-store-merging.c
20552         (imm_store_chain_info::output_merged_store): Remove redundant create,
20553         release split_store vector contents on failure.
20554         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20555         scalar stmt vector on cache hit.
20557 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
20559         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20560         Xilinx FP support.
20561         * config.gcc (powerpc-xilinx-eabi*): Remove.
20562         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20563         support.
20564         (fusion_addis_mem_combo_load): Ditto.
20565         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20566         FP support.
20567         (rs6000_cpu_cpp_builtins): Ditto.
20568         * config/rs6000/rs6000-linux.c
20569         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20570         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20571         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20572         support.
20573         (rs6000_setup_reg_addr_masks): Ditto.
20574         (rs6000_init_hard_regno_mode_ok): Ditto.
20575         (rs6000_option_override_internal): Ditto.
20576         (legitimate_lo_sum_address_p): Ditto.
20577         (rs6000_legitimize_address): Ditto.
20578         (rs6000_legitimize_reload_address): Ditto.
20579         (rs6000_legitimate_address_p): Ditto.
20580         (abi_v4_pass_in_fpr): Ditto.
20581         (setup_incoming_varargs): Ditto.
20582         (rs6000_gimplify_va_arg): Ditto.
20583         (rs6000_split_multireg_move): Ditto.
20584         (rs6000_savres_strategy): Ditto.
20585         (rs6000_emit_prologue_components): Ditto.
20586         (rs6000_emit_epilogue_components): Ditto.
20587         (rs6000_emit_prologue): Ditto.
20588         (rs6000_emit_epilogue): Ditto.
20589         (rs6000_elf_file_end): Ditto.
20590         (rs6000_function_value): Ditto.
20591         (rs6000_libcall_value): Ditto.
20592         * config/rs6000/rs6000.h: Ditto.
20593         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20594         (TARGET_MINMAX): ... this.  New.
20595         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20596         * config/rs6000/rs6000.md: Remove Xilinx FP support.
20597         (*movsi_internal1_single): Delete.
20598         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20599         mfpu=, mxilinx-fpu): Delete.
20600         * config/rs6000/singlefp.h: Delete.
20601         * config/rs6000/sysv4.h: Remove Xilinx FP support.
20602         * config/rs6000/t-rs6000: Ditto.
20603         * config/rs6000/t-xilinx: Delete.
20604         * config/rs6000/titan.md: Adjust for fp_type removal.
20605         * config/rs6000/vsx.md: Remove Xilinx FP support.
20606         (VStype_simple): Delete.
20607         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20608         * config/rs6000/xfpu.h: Delete.
20609         * config/rs6000/xfpu.md: Delete.
20610         * config/rs6000/xilinx.h: Delete.
20611         * config/rs6000/xilinx.opt: Delete.
20612         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20613         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20615 2018-05-04  Tom de Vries  <tom@codesourcery.com>
20617         PR libgomp/85639
20618         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20619         if ignore == 0.
20621 2018-05-04  Richard Biener  <rguenther@suse.de>
20623         PR middle-end/85627
20624         * tree-complex.c (update_complex_assignment): We are always in SSA form.
20625         (expand_complex_div_wide): Likewise.
20626         (expand_complex_operations_1): Likewise.
20627         (expand_complex_libcall): Preserve EH info of the original stmt.
20628         (tree_lower_complex): Handle removed blocks.
20629         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20630         on complex multiplication and division libcall builtins.
20632 2018-05-04  Richard Biener  <rguenther@suse.de>
20634         PR middle-end/85574
20635         * fold-const.c (negate_expr_p): Restrict negation of operand
20636         zero of a division to when we know that can happen without
20637         overflow.
20638         (fold_negate_expr_1): Likewise.
20640 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
20642         PR libstdc++/85466
20643         * real.h (real_nextafter): Declare.
20644         * real.c (real_nextafter): New function.
20645         * fold-const-call.c (fold_const_nextafter): New function.
20646         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20647         CASE_CFN_NEXTTOWARD.
20648         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20649         even when arg1_mode is different from arg0_mode.
20651 2018-05-03  Nathan Sidwell  <nathan@acm.org>
20653         * doc/extend.texi (Deprecated Features): Remove
20654         -ffriend-injection.
20655         (Backwards Compatibility): Likewise.
20656         * doc/invoke.texi (C++ Language Options): Likewise.
20657         (C++ Dialect Options): Likewise.
20659 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
20661         PR target/85530
20662         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20663         _mm512_mask_mullox_epi64): New intrinsics.
20665 2018-05-03  Tom de Vries  <tom@codesourcery.com>
20667         PR testsuite/85106
20668         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20669         dump files): Add offload-tree.
20671 2018-05-03  Richard Biener  <rguenther@suse.de>
20673         PR tree-optimization/85615
20674         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20675         to loops not nested in BBs loop father to avoid creating multi-entry
20676         loops.
20678 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20680         PR tree-optimization/70291
20681         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20682         arguments.  Change return type to tree.  Emit libcall as a new
20683         statement rather than replacing existing one when inplace_p is true.
20684         (expand_complex_multiplication_components): New function.
20685         (expand_complex_multiplication): Expand floating-point complex
20686         multiplication using the above.
20687         (expand_complex_division): Rename inner_type parameter to type.
20688         Update expand_complex_libcall call-site.
20689         (expand_complex_operations_1): Update expand_complex_multiplication
20690         and expand_complex_division call-sites.
20692 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20694         PR target/85582
20695         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20696         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20697         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20698         the highest significant bit of the shift count mask is clear.  In
20699         check whether and[sq]i3 is needed verify that all significant bits
20700         of the shift count other than the highest are set.
20702 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20704         PR libgomp/82428
20705         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20706         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20707         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20708         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20709         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20710         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20711         __builtin_goacc_parlevel_size.
20713 2018-05-02  Richard Biener  <rguenther@suse.de>
20715         PR tree-optimization/85597
20716         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20717         do not use split vect_get_vec_defs call but call vect_get_slp_defs
20718         directly.
20720 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20722         PR testsuite/85106
20723         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20724         dump files): Add ltrans-tree.
20726 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20728         PR testsuite/85106
20729         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20730         dump files): Add wpa-ipa.
20732 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
20734         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
20735         powerpc*-*-linux*paired* target.
20736         * config/rs6000/750cl.h: Delete.
20737         * config/rs6000/paired.h: Delete.
20738         * config/rs6000/paired.md: Delete.
20739         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20740         float support.
20741         * config/rs6000/rs6000-builtin.def: Remove paired float support.
20742         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20743         comment.  Remove paired float support.
20744         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20745         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20746         VECTOR_PAIRED.
20747         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20748         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20749         declarations.
20750         * config/rs6000/rs6000.c: Remove paired float support.
20751         (paired_expand_vector_init, paired_expand_vector_move,
20752         paired_emit_vector_compare, paired_emit_vector_cond_expr,
20753         (paired_expand_lv_builtin, paired_expand_stv_builtin,
20754         paired_expand_builtin, paired_expand_predicate_builtin,
20755         paired_init_builtins): Delete.
20756         * config/rs6000/rs6000.h: Remove paired float support.
20757         * config/rs6000/rs6000.md: Remove paired float support.
20758         (move_from_CR_ov_bit): Delete.
20759         * config/rs6000/rs6000.opt (mpaired): Delete.
20760         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20761         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20763 2018-05-02  Richard Biener  <rguenther@suse.de>
20765         PR middle-end/85567
20766         * gimplify.c (gimplify_save_expr): When in SSA form allow
20767         SAVE_EXPRs to compute to SSA vars.
20769 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
20771         PR target/85582
20772         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20773         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20774         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20775         clobber operands[2], instead use a new pseudo.  Formatting fixes.
20777 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
20779         PR tree-optimization/85586
20780         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20781         exit early for statements in the same group if the accesses are
20782         not strided.
20784 2018-05-02  Tom de Vries  <tom@codesourcery.com>
20786         PR lto/85451
20787         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20788         error message.
20790 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
20792         PR tree-optimization/85143
20793         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20795 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20797         PR lto/85451
20798         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20799         not found" error message.
20801 2018-05-01  Tom de Vries  <tom@codesourcery.com>
20803         PR other/83786
20804         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20805         * vec.c (test_ordered_remove_if): New function.
20806         (vec_c_tests): Call test_ordered_remove_if.
20807         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20808         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20809         * tree-vect-patterns.c (vect_pattern_recog_1): Use
20810         VEC_ORDERED_REMOVE_IF.
20812 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20814         PR tree-optimization/82665
20815         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20816         pointer subtraction where arguments come from a memchr call.
20818 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
20820         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20821         --push-state --as-needed and --pop-state instead of --as-needed and
20822         --no-as-needed if ld supports it.
20823         * configure: Regenerated.
20825         PR web/85578
20826         * doc/install.texi2html: Replace _002d with - and _002a with * in
20827         generated html files using sed.
20829 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20831         PR c++/85523
20832         * gcc-rich-location.c (blank_line_before_p): New function.
20833         (use_new_line): New function.
20834         (gcc_rich_location::add_fixit_insert_formatted): New function.
20835         * gcc-rich-location.h
20836         (gcc_rich_location::add_fixit_insert_formatted): New function.
20838 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20840         * selftest.c (assert_streq): Rename "expected" and "actual" to
20841         "val1" and "val2".  Extend NULL-handling to cover both inputs
20842         symmetrically, while still requiring both to be non-NULL for a pass.
20843         * selftest.h (assert_streq): Rename "expected" and "actual" to
20844         "val1" and "val2".
20845         (ASSERT_EQ): Likewise.
20846         (ASSERT_EQ_AT): Likewise.
20847         (ASSERT_KNOWN_EQ): Likewise.
20848         (ASSERT_KNOWN_EQ_AT): Likewise.
20849         (ASSERT_NE): Likewise.
20850         (ASSERT_MAYBE_NE): Likewise.
20851         (ASSERT_MAYBE_NE_AT): Likewise.
20852         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
20853         the assertion to pass.
20854         (ASSERT_STREQ_AT): Likewise.
20856 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20858         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20859         interaction with -pie.
20861 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20863         * selftest.h: Fix alphabetization of per-source-file selftest
20864         declarations.
20866 2018-04-30  Jason Merrill  <jason@redhat.com>
20868         PR c++/61982 - dead stores to destroyed objects.
20869         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20870         of clobber.
20872 2018-04-30  Jason Merrill  <jason@redhat.com>
20874         * tree.c (build_clobber): New.
20875         * tree.h: Declare it.
20876         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20878 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20880         * diagnostic-show-locus.c (layout::layout): Update for
20881         location_get_source_line returning a char_span.
20882         (struct char_span): Move to input.h.
20883         (struct correction): Update for fields in char_span becoming
20884         private.
20885         (struct source_line): Update for location_get_source_line
20886         returning a char_span.
20887         (layout::print_line): Likewise.
20888         * edit-context.c (edited_file::print_content): Likewise.
20889         (edited_file::print_diff_hunk): Likewise.
20890         (edited_file::print_run_of_changed_lines): Likewise.
20891         (edited_file::get_num_lines): Likewise.
20892         (edited_line::edited_line): Likewise.
20893         * final.c (asm_show_source): Likewise.
20894         * input.c (location_get_source_line): Convert return type
20895         from const char * to char_span, losing the final "line_len"
20896         param.
20897         (dump_location_info): Update for the above.
20898         (get_substring_ranges_for_loc): Likewise.  Use a char_span
20899         when handling the literal within the line.
20900         (test_reading_source_line): Update for location_get_source_line
20901         returning a char_span.
20902         * input.h (class char_span): Move here from
20903         diagnostic-show-locus.c, converting from a struct to a class.
20904         Make data members private.
20905         (char_span::operator bool): New.
20906         (char_span::length): New.
20907         (char_span::get_buffer): New.
20908         (char_span::operator[]): New.
20909         (char_span::subspan): Make const.
20910         (char_span::xstrdup): New.
20911         (location_get_source_line): Convert return type from const char *
20912         to char_span, losing the final "line_size" param.
20914 2018-04-30  Jan Hubicka  <jh@suse.cz>
20916         * lto-wrapper.c (ltrans_priorities): New static var.
20917         (cmp_priority): New.
20918         (run_gcc): Read priorities and if doing parallel build order
20919         the Makefile by them.
20921 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
20923         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20925 2018-04-30  Richard Biener  <rguenther@suse.de>
20927         * tree-cfg.c (verify_address): Remove base argument, add
20928         flag whether to check TREE_ADDRESSABLE and do that.
20929         (verify_expr): Remove.
20930         (verify_types_in_gimple_reference): Add pieces from verify_expr.
20931         (verify_gimple_assign_single): Likewise.
20932         (verify_gimple_switch): Likewise.
20933         (verify_expr_location_1): Dereference tp once.  Add (disabled)
20934         piece from verify_expr.
20935         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20937 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20939         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20941 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20943         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20944         (small_data_pattern): Likewise.
20945         (arc_rewrite_small_data): Likewise.
20946         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20947         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20948         (get_symbol_alignment): New function.
20949         (legitimate_small_data_address_p): Likewise.
20950         (legitimate_scaled_address): Update, call
20951         legitimate_small_data_address_p.
20952         (output_sdata): New static variable.
20953         (arc_print_operand): Update how we handle small data operands.
20954         (arc_print_operand_address): Likewise.
20955         (arc_legitimate_address_p): Update, use
20956         legitimate_small_data_address_p.
20957         (arc_rewrite_small_data_p): Remove.
20958         (arc_rewrite_small_data_1): Likewise.
20959         (arc_rewrite_small_data): Likewise.
20960         (small_data_pattern): Likewise.
20961         (compact_sda_memory_operand): Update to use
20962         legitimate_small_data_address_p and get_symbol_alignment.
20963         (prepare_move_operands): Don't rewite sdata pattern.
20964         (prepare_extend_operands): Remove.
20965         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20966         pattern.
20967         (zero_extendqisi2): Likewise.
20968         (zero_extendhisi2): Likewise.
20969         (extendqihi2): Likewise.
20970         (extendqisi2): Likewise.
20971         (extendhisi2): Likewise.
20972         (addsi3): Likewise.
20973         (subsi3): Likewise.
20974         (andsi3): Likewise.
20975         * config/arc/constraints.md (Usd): Change it to memory constraint.
20977 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
20979         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20980         as source of std instructions.
20981         * config/arc/arc.md (movsi_insn): Update pattern predicate to
20982         allow 6-bit constants as source for store instructions.
20983         (movdi_insn): Update instruction pattern to allow 6-bit constants
20984         as source for store instructions.
20986 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
20988         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20990 2018-04-30  Nathan Sidwell  <nathan@acm.org>
20991             Sandra Loosemore <sandra@codesourcery.com>
20993         * dumpfile.c (dump_open): Allow '-' for stdout.
20994         * doc/invoke.texi (Developer Options): Document dump filename
20995         determination early.  Document stdin/stdout selection.
20997 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
20999         Microblaze Target: PIC data text relative
21001         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
21002         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
21003         Add declaration.
21004         * config/microblaze/microblaze.h (microblaze_constant_address_p):
21005         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
21006         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
21007         New addressing mode for data-text relative position indepenedent code.
21008         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
21009         'ADDRESS_SYMBOLIC_TXT_REL'.
21010         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
21011         (microblaze_legitimate_pic_operand): Exclude function calls from
21012         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
21013         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
21014         addresses cases.
21015         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21016         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21017         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
21018         for 'address + offset'.
21019         (microblaze_expand_prologue): Add new function prologue call for
21020         'r20' assignation.
21021         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
21022         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
21023         table in case of TARGET_PIC_DATA_TEXT_REL.
21024         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
21025         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
21026         Add new macros 'UNSPEC_TEXT',
21027         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
21028         + exclude function calls from 'UNSPEC_PLT' in case of data text
21029         relative mode.
21030         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21031         new target hook for generating address diff vector tables in case of
21032         flag_pic.
21033         * doc/tm.texi : Regenerate.
21034         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
21035         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
21036         of addr diff vector generation.
21037         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21038         target hook definition.
21039         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
21040         Add default function for generate_pic_addr_diff_vec -> flag_pic.
21041         * doc/invoke.texi (Add new pic option): Add new microblaze pic
21042         option for data text relative.
21044 2018-04-30  Richard Biener  <rguenther@suse.de>
21046         * tree-chrec.h (evolution_function_is_constant_p): Remove
21047         redundant check.
21048         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
21050 2018-04-30  Richard Biener  <rguenther@suse.de>
21052         PR bootstrap/85571
21053         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
21055 2018-04-30  Richard Biener  <rguenther@suse.de>
21057         PR tree-optimization/28364
21058         PR tree-optimization/85275
21059         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
21060         copying first exit test.
21062 2018-04-28  Mark Wielaard  <mark@klomp.org>
21064         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21065         dwarf_version >= 5.
21066         (dwarf_AT): Handle DW_AT_addr_base.
21067         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21069 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
21071         PR target/84431
21072         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21073         (*ashl<dwi>3_doubleword_mask_1): Ditto.
21074         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21075         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21077 2018-04-28  Richard Biener  <rguenther@suse.de>
21079         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21080         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21081         to reflect use.  Only add interesting stmts.
21083 2018-04-27  Martin Jambor  <mjambor@suse.cz>
21085         PR ipa/85549
21086         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21087         the jump function allows for passing through aggregate values.
21089 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
21091         * input.h (in_system_header_at): Convert from macro to inline
21092         function.
21093         (from_macro_expansion_at): Likewise.
21094         (from_macro_definition_at): Likewise.
21096 2018-04-27  Jeff Law  <law@redhat.com>
21098         * config.gcc: Mark tile* targets as deprecated/obsolete.
21100 2018-04-27  Richard Biener  <rguenther@suse.de>
21102         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21103         fix for ILP32.
21105 2018-04-27  Richard Biener  <rguenther@suse.de>
21107         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21109 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
21111         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21112         with Yd constraint. Set "preferred_for_speed" attribute from
21113         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21114         with Yd constraint.
21115         (*movdi_internal): Ditto.
21116         (movti_interunit splitters): Remove
21117         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21118         (movdi_interunit splitters): Ditto.
21119         * config/i386/constraints.md (Ye): Remove.
21120         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21122 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21124         PR target/85512
21125         * config/aarch64/constraints.md (Usg): Limit to 31.
21126         (Usj): Limit to 63.
21128 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
21130         PR tree-optimization/85529
21131         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21132         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21133         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21134         zero extension or masking of the MSB bit.
21135         (optimize_range_tests): Add FIRST_BB argument, pass it through
21136         to optimize_range_tests_var_bound.
21137         (maybe_optimize_range_tests, reassociate_bb): Adjust
21138         optimize_range_tests callers.
21140 2018-04-26  Richard Biener  <rguenther@suse.de>
21141             Jakub Jelinek  <jakub@redhat.com>
21143         * cgraph.h (symbol_table): Just declare debug method here.
21144         * symtab.c (symbol_table::debug): Define.
21146 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
21148         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21150 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
21152         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21153         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21154         (*movdi_internal): Substitute Yi and Yj constraint with x
21155         and Ym and Yn constraint with y constraint.  Update "isa"
21156         attribute and set "preferred_for_speed" attribute from
21157         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21158         (*movsi_internal): Ditto.
21159         (*movdf_internal): Ditto.
21160         (*movsf_internal): Ditto.
21161         (*zero_extendsidi2): Ditto.
21162         * config/i386/sse.md (vec_set<mode>_0): Ditto.
21163         (sse2_loadld): Ditto.
21164         (*vec_extract<ssevecmodelower>_0): Ditto.
21165         (*vec_extractv4si_0_zext_sse4): Ditto.
21166         (vec_concatv2di): Ditto.
21167         (*vec_dup<mode>): Ditto.
21168         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21169         * config/i386/constraints.md (Yi): Remove.
21170         (Yj): Remove.
21171         (Ym): Remove.
21172         (Yn): Remove.
21174 2018-04-26  Nathan Sidwell  <nathan@acm.org>
21176         * dumpfile.c (dump_open): New.
21177         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21178         (dump_finish): Detect stdio/stderr by value not name.
21180 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
21182         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21184 2018-04-26  Tom de Vries  <tom@codesourcery.com>
21186         PR target/84952
21187         * config/nvptx/nvptx.c (verify_neutering_jumps)
21188         (verify_neutering_labels): New function
21189         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21191 2018-04-26  Tom de Vries  <tom@codesourcery.com>
21193         PR target/84025
21194         * config/nvptx/nvptx.c (needs_neutering_p): New function.
21195         (nvptx_single): Use needs_neutering_p to skip over insns that do not
21196         need neutering.
21198 2018-04-26  Richard Biener <rguenther@suse.de>
21199             Tom de Vries  <tom@codesourcery.com>
21201         PR lto/85422
21202         * lto-streamer-out.c (output_function): Fixup loops if required to match
21203         discovery done in the reader.
21205 2018-04-26  Richard Biener  <rguenther@suse.de>
21207         PR tree-optimization/85116
21208         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21209         have a loop exit from the single latch predecessor.  Remove
21210         case of header with just condition.
21211         (ch_base::copy_headers): Exclude infinite loops from any
21212         processing.
21213         (pass_ch::execute): Record exits.
21215 2018-04-26  Richard Biener  <rguenther@suse.de>
21217         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21218         prologue cost vector and pass it to vect_get_load_cost.
21219         (vect_get_peeling_costs_all_drs): Likewise.
21220         (vect_peeling_hash_get_lowest_cost): Likewise.
21221         (vect_enhance_data_refs_alignment): Likewise.
21223 2018-04-26  Richard Biener  <rguenther@suse.de>
21225         PR middle-end/85450
21226         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21227         checking of integer<->pointer conversions.
21228         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21229         sign-/zero-extending pointer types.
21230         (expand_omp_for_static_chunk): Likewise.
21232 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
21233             Jean Lee  <xiaoyur347@gmail.com>
21235         * config/mips/mips.c (mips_asan_shadow_offset): New function.
21236         (TARGET_ASAN_SHADOW_OFFSET): Define.
21237         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
21238         true for -fsanitize=address.
21240 2018-04-25  Mark Wielaard  <mark@klomp.org>
21242         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
21243         shorter ones.
21245 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
21247         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
21248         than "alu", remove explicit "memory" and "imm_disp" attributes.
21249         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
21251         PR middle-end/85414
21252         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
21253         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
21254         gen_lowpart_no_emit.
21256 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
21258         PR target/85473
21259         * config/i386/i386.c (ix86_expand_builtin): Change memory
21260         operand to XI, extend p0 to Pmode.
21261         * config/i386/i386.md: Change unspec volatile and operand
21262         1 mode to XI, change operand 0 mode to P.
21264 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21266         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
21267         GET_MODE_MASK before any checking.
21268         (nds32_can_use_bset_p): Likewise.
21269         (nds32_can_use_btgl_p): Likewise.
21271 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21273         * config/nds32/nds32-doubleword.md: New define_split pattern for
21274         illegal register number.
21276 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21278         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
21280 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
21282         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
21284 2018-04-25  Richard Biener  <rguenther@suse.de>
21286         * lto-streamer.h (LTO_major_version): Bump to 8.
21288 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
21290         * BASE-VER: Set to 9.0.0.
21292 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
21294         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
21295         in __abskf2 and __powikf2.
21297 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21299         PR target/85512
21300         * config/aarch64/constraints.md (Usg, Usj): New constraints.
21301         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
21302         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
21303         Use the above on operand 2.  Reindent.
21304         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
21306 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
21308         PR target/85485
21309         * common/config/i386/i386-common.c (ix86_handle_option): Don't
21310         handle OPT_mcet.
21311         * config/i386/i386.opt (mcet): Removed.
21312         * doc/install.texi: Remove -mcet documentation.
21313         * doc/invoke.texi: Likewise.
21315 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
21317         PR target/85485
21318         * doc/install.texi: Remove -mcet from bootstrap-cet.
21320 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
21322         PR target/85511
21323         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
21324         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
21325         if TARGET_64BIT.
21327         PR target/85503
21328         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
21329         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
21330         containing a CONST_VECTOR.
21332 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
21334         * doc/install.texi: Update newlib dependency for nvptx.
21336 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
21338         PR target/85508
21339         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
21340         instead of INTVAL when shifting x left.
21342 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
21344         PR tree-optimization/85478
21345         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
21346         vect_grouped_store_supported for single element vectors.
21348 2018-04-24  Richard Biener  <rguenther@suse.de>
21350         PR target/85491
21351         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
21352         load cost increase to the case of non-constant step.
21354 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
21356         PR target/84828
21357         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
21358         destination if any_malformed_asm.
21360 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
21362         PR middle-end/85496
21363         * expr.c (store_field): In the bitfield case, if the value comes from
21364         a function call and is returned in registers by means of a PARALLEL,
21365         do not change the mode of the temporary unless BLKmode and VOIDmode.
21367 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
21369         PR rtl-optimization/85423
21370         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
21371         dependencies to debug insns when the previous insn is non-debug.
21373 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
21375         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
21376         enums into a single definition.
21377         (fls): Fix predicates and printing.
21378         (seti): Likewise.
21380 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
21382         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
21383         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
21384         and short u6 immediate.
21385         (check_if_valid_sleep_operand): Remove.
21386         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
21388 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21390         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
21391         flag_always_save_lp condition.
21392         * config/nds32/nds32.opt (malways-save-lp): New option.
21394 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
21396         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
21397         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
21398         * config/nds32/nds32.h
21399         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
21400         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
21402 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
21404         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
21405         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
21407 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
21408             Chung-Ju Wu  <jasonwucj@gmail.com>
21410         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
21411         Declare.
21412         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
21413         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
21415 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21417         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
21419 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21421         * config/nds32/nds32-protos.h (nds32_data_alignment,
21422         nds32_local_alignment): Declare.
21423         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
21424         nds32_local_alignment): New functions.
21425         (TARGET_CONSTANT_ALIGNMENT): Define.
21426         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
21428 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21430         * config/nds32/nds32.c
21431         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
21432         (TARGET_MODES_TIEABLE_P): Likewise.
21434 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
21436         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
21437         level Ofast and Og.
21439 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
21440             Chung-Ju Wu  <jasonwucj@gmail.com>
21442         * config/nds32/constants.md (unspec_volatile_element): Add enum values
21443         for unaligned access.
21444         * config/nds32/nds32-intrinsic.c: Implementation of expanding
21445         unaligned access.
21446         * config/nds32/nds32-intrinsic.md: Likewise.
21447         * config/nds32/nds32_intrinsic.h: Likewise.
21448         * config/nds32/nds32.h (nds32_builtins): Likewise.
21449         * config/nds32/nds32.opt (munaligned-access): New option.
21450         * config/nds32/nds32.c (nds32_asm_file_start): Display
21451         flag_unaligned_access status.
21453 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
21455         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
21456         -mno-relax is present.
21457         * config/riscv/linux.h (LINK_SPEC): Ditto.
21459 2018-04-20  Martin Sebor  <msebor@redhat.com>
21461         PR c/85365
21462         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
21463         for null pointers.
21464         (gimple_fold_builtin_stxcpy_chk): Same.
21465         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
21467 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
21469         PR target/85456
21470         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
21471         __powikf2 when long double is IEEE 128-bit.
21473 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
21475         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
21476         step to make sure stack always aligned.
21478 2018-04-20  Carl Love  <cel@us.ibm.com>
21480         PR target/83402
21481         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
21482         size check for arg0.
21484 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
21485             Tom de Vries  <tom@codesourcery.com>
21487         PR target/85445
21488         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
21489         Emit insns for calls too.
21490         (nvptx_find_par): Always look for worker-level predecessor insn.
21491         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
21492         calls.
21493         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21494         (nvptx_process_pars): Propagate frames for calls.
21496 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
21498         PR target/85469
21499         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21500         Removed.
21501         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21502         (ix86_handle_option): Don't handle OPT_mibt.
21503         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21504         __SHSTK__.
21505         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21506         has_ibt and ibt.
21507         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21508         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21509         (ix86_target_macros): Define __CET__ with flag_cf_protection
21510         for -fcf-protection.
21511         * config/i386/i386.c (isa2_opts): Remove -mibt.
21512         * config/i386/i386.h (TARGET_IBT): Removed.
21513         (TARGET_IBT_P): Likewise.
21514         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21515         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21516         * config/i386/i386.opt (mcet): Update help message.
21517         (mshstk): Likewise.
21518         (mibt): Removed.
21519         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
21520         -mcet as an alias for -mshstk.
21522 2018-04-20  Richard Biener <rguenther@suse.de>
21524         PR middle-end/85475
21525         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21526         complexity by forcing a single use of the multiply operand.
21528 2018-04-20  Martin Jambor  <mjambor@suse.cz>
21530         ipa/85449
21531         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21532         recursion dependency to only apply to non-clones.
21534 2018-04-20  Martin Jambor  <mjambor@suse.cz>
21536         ipa/85447
21537         * ipa-cp.c (create_specialized_node): Check that clones of
21538         self-recursive edges exist during IPA-CP.
21540 2018-04-19  Toon Moene  <toon@moene.org>
21542         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21543         by -O3.
21545 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21547         PR tree-optimization/85467
21548         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21549         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
21550         VECTOR_CST element to type.
21552 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21554         PR target/85397
21555         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21556         * config/i386/i386.md (builtin_setjmp_setup): Removed.
21557         (builtin_longjmp): Likewise.
21558         (save_stack_nonlocal): New pattern.
21559         (restore_stack_nonlocal): Likewise.
21561 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21563         PR target/85404
21564         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21565         Replace ASM_OUTPUT_LABEL with fprintf.
21567 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
21569         PR target/85417
21570         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21571         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21572         * config/i386/i386-c.c (ix86_target_macros_internal): Also
21573         define __IBT__ and __SHSTK__ for -fcf-protection.
21574         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21575         TARGET_IBT.
21576         (ix86_trampoline_init): Likewise.
21577         (x86_output_mi_thunk): Likewise.
21578         (ix86_notrack_prefixed_insn_p): Likewise.
21579         (ix86_option_override_internal): Don't disallow -fcf-protection.
21580         * config/i386/i386.md (rdssp<mode>): Also enable for
21581         -fcf-protection.
21582         (incssp<mode>): Likewise.
21583         (nop_endbr): Likewise.
21584         * config/i386/i386.opt (mcet): Change help message to built-in
21585         functions only.
21586         (mibt): Likewise.
21587         (mshstk): Likewise.
21588         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21589         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
21590         enable CET built-in functions.
21592 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
21594         * common/config/i386/i386-common.c
21595         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21596         OPTION_MASK_ISA_MOVDIRI_UNSET,
21597         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21598         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21599         * config.gcc (movdirintrin.h): New header.
21600         * config/i386/cpuid.h (bit_MOVDIRI,
21601         bit_MOVDIR64B): New bits.
21602         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21603         and -mmvodir64b.
21604         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21605         (VOID, PVOID, PCVOID)): New function types.
21606         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21607         __builtin_ia32_directstoreu_u64,
21608         __builtin_ia32_movdir64b): New builtins.
21609         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21610         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21611         and -mmovdiri.
21612         (ix86_valid_target_attribute_inner_p): Ditto.
21613         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21614         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21615         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21616         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21617         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21618         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21619         (movdiri<mode>, movdir64b_<mode>): New.
21620         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21621         * config/i386/immintrin.h: Include movdirintrin.h.
21622         * config/i386/movdirintrin.h: New file.
21623         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21625 2018-04-19  Richard Biener  <rguenther@suse.de>
21627         PR middle-end/85455
21628         * cfg.c (clear_bb_flags): When loop state says we have
21629         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21631 2018-04-19  Richard Biener  <rguenther@suse.de>
21633         PR tree-optimization/84737
21634         * tree-vect-data-refs.c (vect_copy_ref_info): New function
21635         copying restrict info.
21636         (vect_setup_realignment): Use it.
21637         * tree-vectorizer.h (vect_copy_ref_info): Declare.
21638         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21639         the first DR to all generated stores.
21640         (vectorizable_load): Likewise for loads.
21642 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
21644         PR tree-optimization/85446
21645         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21646         the integral and pointer types to have the same precision.
21648         * doc/install.texi: Document --disable-cet being the default and
21649         --enable-cet=auto.
21651 2018-04-18  Martin Liska  <mliska@suse.cz>
21653         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21654         style.
21656 2018-04-18  Martin Liska  <mliska@suse.cz>
21658         Revert
21659         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
21661         PR ipa/83983
21662         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21663         arguments if they are comparable.
21665 2018-04-18  Martin Liska  <mliska@suse.cz>
21667         Revert
21668         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
21670         PR lto/84805
21671         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21672         incomplete types.
21674 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
21676         PR target/85388
21677         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21678         ENDBR after calling __morestack.
21680 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
21682         PR jit/85384
21683         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21684         by using gcc_base_ver to generate a gcc_driver_version, and use
21685         it when generating GCC_DRIVER_NAME.
21686         * configure: Regenerate.
21688 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
21690         PR target/81084
21691         * config.gcc: Obsolete powerpc*-*-*spe*.
21693 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21695         PR debug/84637
21696         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21697         (stabstr_D): Change type of unum from unsigned int to
21698         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
21699         type.
21701 2018-04-17  Jim Wilson  <jimw@sifive.com>
21703         PR 84856
21704         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21705         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21706         Set arg_pointer_offset after using pretend_args_size.
21708 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21710         PR rtl-optimization/85431
21711         * dse.c (record_store): Ignore zero width stores.
21713         PR sanitizer/85230
21714         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
21715         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21716         __builtin_stack_restore rather than after it.
21717         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21718         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21719         argument instead of virtual_dynamic_stack_rtx.
21721 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21723         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21724         New prototype.
21725         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21726         Add note to error message to explain internal mapping of overloaded
21727         built-in function name to non-overloaded built-in function name.
21728         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21729         function.
21731 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
21733         PR target/85424
21734         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21735         where the inputs overlap with the output.
21737 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21739         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21740         (=v, v) alternative and explicit "memory" attribute.
21741         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
21742         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21743         attributes.
21744         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21745         "sselog1" type instead of "sselog".
21746         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21747         "sselog".  Remove explicit "memory" attribute.
21748         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21749         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21750         attributes.
21751         (vec_extract_hi_v32hi): Merge all alternatives into one, use
21752         "sselog1" type instead of "sselog".  Remove explicit "memory"
21753         attribute.
21754         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21755         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21756         attribute.
21757         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21758         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21759         attributes.
21760         (vec_extract_hi_v64qi): Merge all alternatives into one, use
21761         "sselog1" type instead of "sselog".  Remove explicit "memory"
21762         attribute.
21763         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21764         use "sselog1" type instead of "sselog".  Remove explicit "memory"
21765         attribute.
21767         PR target/85430
21768         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21770         PR middle-end/85414
21771         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21772         on a SUBREG.
21774 2018-04-17  Martin Jambor  <mjambor@suse.cz>
21776         PR ipa/85421
21777         * ipa-cp.c (create_specialized_node): Call
21778         expand_all_artificial_thunks if necessary.
21780 2018-04-17  Martin Liska  <mliska@suse.cz>
21782         PR lto/85405
21783         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21784         in message, remote space in between '_G' and '('.
21786 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
21788         PR target/85281
21789         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21790         avx512f_vmcmp<mode>3<round_saeonly_name>,
21791         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21792         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21793         avx512f_rndscale<mode><round_saeonly_name>,
21794         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21795         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21796         Use %<iptr>2 instead of %2 for -masm=intel.
21797         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21798         avx512f_vcvttss2usi<round_saeonly_name>,
21799         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21800         -masm=intel.
21801         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21802         avx512f_vcvttsd2usi<round_saeonly_name>,
21803         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21804         Use %q1 instead of %1 for -masm=intel.
21805         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21806         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21807         of %3 for -masm=intel.
21808         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21809         -masm=intel.
21810         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21811         -masm=intel.
21812         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21813         -masm=intel.
21814         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21815         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21816         %g1.
21817         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21818         -masm=intel.
21819         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21820         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21821         %g1 and one with %0 and %1.
21822         (avx512er_vmrcp28<mode><round_saeonly_name>,
21823         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21824         %1 for -masm=intel.
21825         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21826         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21827         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21828         of %0 and %{%4%} for -masm=intel.
21829         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21830         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21831         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21832         order of %0 and %{%5%}%{z%} for -masm=intel.
21834 2018-04-17  Jan Hubicka  <jh@suse.cz>
21836         PR lto/85405
21837         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21839 2018-04-17  Martin Liska  <mliska@suse.cz>
21841         PR ipa/85329
21842         * multiple_target.c (create_dispatcher_calls): Set apostrophes
21843         for target_clone error message.  Make default implementation
21844         clone to be a local declaration.
21845         (separate_attrs): Add new argument and check for an empty
21846         string.
21847         (expand_target_clones): Handle it.
21848         (ipa_target_clone): Make redirection just for target_clones
21849         functions.
21851 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
21852             Tom de Vries  <tom@codesourcery.com>
21854         PR middle-end/84955
21855         * omp-expand.c (expand_oacc_for): Add dummy false branch for
21856         tiled basic blocks without omp continue statements.
21858 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
21860         PR target/83660
21861         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21862         vec_extract expression as having side effects to make sure it gets
21863         a cleanup point.
21865 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
21867         PR target/85403
21868         * config/i386/i386.c (get_builtin_code_for_version): Check
21869         error_mark_node.
21871 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
21873         PR target/84331
21874         * config.gcc: Support "skylake".
21875         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21876         PROCESSOR_SKYLAKE.
21877         * config/i386/i386.c (m_SKYLAKE): Define.
21878         (processor_target_table): Add "skylake".
21879         (ix86_option_override_internal): Add "skylake".
21880         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21881         PROCESSOR_CANNONLAKE.
21882         (get_builtin_code_for_version): Fix priority for
21883         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21884         PROCESSOR_SKYLAKE-AVX512.
21885         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21886         (processor_type): Add PROCESSOR_SKYLAKE.
21888 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
21889             Jason Merrill  <jason@redhat.com>
21891         PR c++/85112
21892         * convert.c (convert_to_integer_1): Use direct recursion for
21893         enumeral types and types with a precision less than the number
21894         of bits in their mode.
21896 2018-04-16  Julia Koval  <julia.koval@intel.com>
21898         PR target/84413
21899         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21900         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21902 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
21904         PR target/85293
21905         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21906         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21907         and -mno-direct-move.
21909 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
21911         PR target/83402
21912         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21913         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21914         Ensure negative shifts result in {0}.
21916 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
21918         PR rtl-optimization/79916
21919         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21920         regs (if any) to define how to gnerate SD moves when LRA is in
21921         progress.
21923 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
21925         PR rtl-optimization/85393
21926         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21927         * except.c (expand_dw2_landing_pad_for_region): Make static.
21928         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21929         a label and unconditional jump to old_bb, rather than
21930         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21931         basic block.
21933         PR rtl-optimization/85376
21934         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21935         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21936         instead of a specific value.
21938 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21939             Bin Cheng  <bin.cheng@arm.com>
21941         PR tree-optimization/82965
21942         PR tree-optimization/83991
21943         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21944         by_profile_only parameter.
21945         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21946         information if the loop was predicted to iterate too many times.
21947         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21949 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
21951         PR lto/71991
21952         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21953         always inline.
21955 2018-04-13  Martin Liska  <mliska@suse.cz>
21956             Jakub Jelinek  <jakub@redhat.com>
21958         PR middle-end/81657
21959         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21960         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21961         * builtins.c (expand_builtin_memory_copy_args): Use
21962         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21963         handle dest_addr == pc_rtx.
21965 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
21967         PR target/85291
21968         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21969         asked to not generate direct moves.
21970         (fix_trunc<mode>si2_stfiwx): Similar.
21971         (fix_trunc<mode>si2_internal): Similar.
21973 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
21975         PR debug/83157
21976         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21977         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21978         lookup if dest in some wider mode is known to be const0_rtx and
21979         if so, record permanent equivalence for it to be ZERO_EXTEND of
21980         the narrower mode destination.
21982 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
21984         * lto-streamer-out.c (output_function): Revert 259346.
21985         * omp-expand.c (expand_oacc_for): Likewise.
21987 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
21989         PR rtl-optimization/85354
21990         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21991         * sel-sched.c (sel_global_init): ... here.
21993 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
21995         PR target/85238
21996         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21997         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21998         mode for PE-COFF targets.
21999         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
22000         (i386_pe_asm_lto_end): Likewise.
22001         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
22002         (TARGET_ASM_LTO_END): Likewise.
22003         * config/i386/winnt.c (saved_debug_info_level): New static variable.
22004         (i386_pe_asm_lto_start): New function.
22005         (i386_pe_asm_lto_end): Likewise.
22007 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
22008             Richard Biener  <rguenther@suse.de>
22010         PR middle-end/84955
22011         * lto-streamer-out.c (output_function): Fix CFG loop state before
22012         streaming out.
22013         * omp-expand.c (expand_oacc_for): Handle calls to internal
22014         functions like regular functions.
22016 2018-04-12  Richard Biener  <rguenther@suse.de>
22018         PR lto/85371
22019         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
22020         for the early LTO debug to properly generate references to it
22021         during DIE emission.  Do not re-use that for the skeleton for
22022         split-dwarf.
22023         (dwarf2out_early_finish): Likewise.
22025 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
22027         PR target/85328
22028         * config/i386/sse.md
22029         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
22030         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
22031         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
22032         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
22033         and output is a reg, avoid creating invalid lowpart subreg, but
22034         instead split into a 512-bit move.  Don't split if not AVX512VL,
22035         input is xmm16+ reg and output is a mem.
22036         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
22037         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
22038         xmm16+ reg and output is a mem.
22040 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22042         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
22043         also for flag_dwarf2_cfi_asm.
22045 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
22047         PR rtl-optimization/85342
22048         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
22049         a bool scalar var inside of the loop instead.  Don't try to update
22050         recog_data.operand after failed apply_change_group.
22052 2018-04-12  Tom de Vries  <tom@codesourcery.com>
22054         PR target/85296
22055         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
22056         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
22057         array with flexible array member as array without given dimension.
22058         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
22059         argument for undefined param to true.
22061 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
22063         PR target/85321
22064         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22065         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22066         from PowerPC section.
22067         * config/rs6000/sysv4.opt (mcall-): Improve help text.
22068         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22069         help text that is too long.
22070         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22071         help text that is too long.
22072         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22073         help text that is too long.
22075 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
22077         * config/alpha/alpha.md (stack_probe_internal): Rename
22078         from "probe_stack".  Update all callers.
22080 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
22082         PR rtl-optimization/84566
22083         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22084         sched_macro_fuse_insns.
22086 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
22088         PR target/84301
22089         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22090         (compute_block_dependences): ... from here.
22092 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
22094         PR tree-optimization/85331
22095         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22096         from int to HOST_WIDE_INT.
22098 2018-04-11  Martin Jambor  <mjambor@suse.cz>
22100         PR ipa/84149
22101         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22102         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22103         not the same as the source val.
22104         (cgraph_edge_brings_value_p): New parameter.
22105         (gather_edges_for_value): Pass destination value to
22106         cgraph_edge_brings_value_p.
22107         (perhaps_add_new_callers): Likewise.
22108         (get_info_about_necessary_edges): Likewise and exclude values brought
22109         only by self-recursive edges.
22110         (create_specialized_node): Redirect only clones of self-calling edges.
22111         (+self_recursive_pass_through_p): New function.
22112         (find_more_scalar_values_for_callers_subset): Use it.
22113         (find_aggregate_values_for_callers_subset): Likewise.
22114         (known_aggs_to_agg_replacement_list): Removed.
22115         (decide_whether_version_node): Re-calculate known constants for all
22116         remaining context clones.
22118 2018-04-11  Richard Biener  <rguenther@suse.de>
22120         PR lto/85339
22121         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22122         from early DWARF output.
22123         (dwarf2out_early_finish): Output line info unconditionally into
22124         early DWARF and add reference to it.
22126 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
22128         PR target/85281
22129         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22130         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22131         other than V2DFmode using iptr mode attribute.
22132         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22134 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
22136         PR rtl-optimization/84659
22137         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22139 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
22141         PR debug/85302
22142         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22143         SIZEP is NULL.
22144         (output_loc_list): Pass address of a dummy size variable even in the
22145         locview handling loop.
22146         (index_location_lists): Add comment on why skip_loc_list_entry can't
22147         call size_of_locs.
22149 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22151         PR target/85261
22152         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22153         into register.
22155 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
22157         PR target/85321
22158         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22159         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22160         and -mstring-compare-inline-limit.
22162 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
22164         PR target/85287
22165         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22166         for stack clash protection in a register whenever we need it to be in
22167         a register.
22169 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
22171         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22172         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22174 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
22176         PR target/85321
22177         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22178         the help text.
22179         (mlong-double-): Ditto.
22180         * config/rs6000/sysv4.opt (msdata=): Ditto.
22181         (mtls-size=): Ditto.
22183 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22185         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22186         erroneous entries for
22187         "vector int vec_ldl (int, long int *)", and
22188         "vector unsigned int vec_ldl (int, unsigned long int *)".
22189         Add comments and entries for
22190         "vector bool char vec_ldl (int, bool char *)",
22191         "vector bool short vec_ldl (int, bool short *)",
22192         "vector bool int vec_ldl (int, bool int *)",
22193         "vector bool long long vec_ldl (int, bool long long *)",
22194         "vector pixel vec_ldl (int, pixel *)",
22195         "vector long long vec_ldl (int, long long *)",
22196         "vector unsigned long long vec_ldl (int, unsigned long long *)".
22197         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22198         type tree bool_long_long_type_node and correct definition of
22199         bool_V2DI_type_node to make reference to this new type tree.
22200         (rs6000_mangle_type): Replace erroneous reference to
22201         bool_long_type_node with bool_long_long_type_node.
22202         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22203         comments to emphasize sign distinctions for char and int types and
22204         replace RS6000_BTI_bool_long constant with
22205         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
22206         use of RS6000_BTI_pixel.
22207         (bool_long_type_node): Remove this macro definition.
22208         (bool_long_long_type_node): New macro definition
22210 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
22212         PR rtl-optimization/85300
22213         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22214         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22215         simplify_unary_operation fails.
22217 2018-04-10  Martin Liska  <mliska@suse.cz>
22219         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22220         cgraph_edge and ipa_ref.
22222 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
22224         PR target/85177
22225         PR target/85255
22226         * config/i386/sse.md
22227         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22228         computation of the VEC_MERGE selector from mask.
22229         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22230         Fix decoding of the VEC_MERGE selector into mask.
22232 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
22234         PR tree-optimization/85286
22235         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
22237 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
22239         * final.c (final_1): Set insn_last_address as well as
22240         insn_current_address.
22242 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22244         PR target/85173
22245         * explow.c (emit_stack_probe): Call validize_mem on memory location
22246         before passing it to gen_probe_stack.  Create address operand and
22247         legitimize it for the probe_stack_address case.
22249 2018-04-09  Jan Hubicka  <jh@suse.cz>
22251         PR lto/85078
22252         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
22253         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
22254         * tree.c (free_lang_data_in_type): Fix handling of binfos;
22255         walk basetypes.
22256         (free_lang_data): Rebuild type inheritance graph.
22258 2018-04-09  Martin Sebor  <msebor@redhat.com>
22260         * invoke.texi (-finline-small-functions): Mention other optimization
22261         options.
22262         (-findirect-inlining, -fpartial-inlining): Same.
22263         (-finline-functions-called-once): Same.
22264         (-freorder-blocks-and-partition): Same.
22266 2018-04-09  Jan Hubicka  <jh@suse.cz>
22268         PR rtl/84058
22269         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
22270         jumps; choose last target that matches the criteria (i.e.
22271         no partition changes for non-crossing jumps).
22272         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
22273         support for redirecting crossing jumps to non-crossing.
22275 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
22277         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
22278         also for naked functions.
22280 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
22282         * config/arc/arc.md (add_shift): New pattern.
22283         (add_shift2): Likewise.
22284         (sub_shift): Likewise.
22285         (sub_shift_cmp0_noout): Likewise.
22286         (compare_si_ashiftsi): Likewise.
22287         (xbfu_cmp0_noout): New combine pattern.
22288         (xbfu_cmp0"): Likewise.
22289         (movsi_set_cc_insn): Place the predicable variant first.
22290         (commutative_binary_cmp0_noout): Remove clobber.
22291         (commutative_binary_cmp0): New pattern.
22292         (noncommutative_binary_cmp0): Likewise.
22293         (noncommutative_binary_cmp0_noout): Likewise.
22294         (noncommutative_binary_comparison_result_used): Removed.
22295         (rsub_cmp0): New pattern.
22296         (rsub_cmp0_noout): Likewise.
22297         (extzvsi): Changed, keep only meaningful variants.
22298         (SQH, SEZ): New iterators.
22299         (SQH_postfix): New mode attribute.
22300         (SEZ_prefix): New code attribute.
22301         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
22302         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
22303         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
22304         of numerical value.
22305         (noncommutative_operator): Check the availability of barrel
22306         shifter option.
22308 2018-04-09  Richard Biener  <rguenther@suse.de>
22310         PR tree-optimization/85284
22311         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
22312         Only use the niter constraining form of simple_iv when the exit
22313         is always executed.
22315 2018-04-09  Tom de Vries  <tom@codesourcery.com>
22317         PR target/84041
22318         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22319         (define_expand "*memory_barrier"): New define_expand.
22320         (define_insn "memory_barrier"): New insn.
22322 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22324         PR rtl-optimization/80463
22325         PR rtl-optimization/83972
22326         PR rtl-optimization/83480
22328         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
22329         correct producer for the insn.
22330         (tidy_control_flow): Fixup seqnos in case of debug insns.
22332 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22334         PR rtl-optimization/83913
22336         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
22337         different sched-times when merging exprs.
22339 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22341         PR rtl-optimization/83962
22343         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
22344         tidy_fallthru_edge and tidy_control_flow.
22346 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
22348         PR rtl-optimization/83530
22350         * sel-sched.c (force_next_insn): New global variable.
22351         (remove_insn_for_debug): When force_next_insn is true, also leave only
22352         next insn in the ready list.
22353         (sel_sched_region): When the region wasn't scheduled, make another pass
22354         over it with force_next_insn set to 1.
22356 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
22358         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
22359         into tm_file.
22360         * config/nds32/constants.md (unspec_volatile_element): Add enum values
22361         for interrupt control.
22362         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22363         functions for interrupt control.
22364         * config/nds32/nds32-intrinsic.md: Likewise.
22365         * config/nds32/nds32_intrinsic.h: Likewise.
22366         * config/nds32/nds32.h (nds32_builtins): Likewise.
22368 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
22370         * config/nds32/nds32.c (nds32_init_machine_status,
22371         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
22372         strict_aligned_p field.
22373         (nds32_expand_to_rtl_hook): New function.
22374         (TARGET_EXPAND_TO_RTL_HOOK): Define.
22375         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
22377 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22378             Chung-Ju Wu  <jasonwucj@gmail.com>
22380         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
22381         * config/nds32/nds32-n7.md: New file.
22382         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
22383         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
22384         pipeline.
22385         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
22386         * config/nds32/nds32.md (pipeline_model): Add n7.
22387         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
22388         * config/nds32/pipelines.md: Include n7 settings.
22390 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22391             Chung-Ju Wu  <jasonwucj@gmail.com>
22393         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
22394         * config/nds32/nds32-e8.md: New file.
22395         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
22396         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
22397         pipeline.
22398         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
22399         * config/nds32/nds32.md (pipeline_model): Add e8.
22400         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
22401         * config/nds32/pipelines.md: Include e8 settings.
22403 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22404             Chung-Ju Wu  <jasonwucj@gmail.com>
22406         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
22407         * config/nds32/nds32-n8.md: New file.
22408         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
22409         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
22410         pipeline.
22411         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
22412         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
22413         * config/nds32/nds32.md (pipeline_model): Add n8.
22414         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
22415         * config/nds32/pipelines.md: Include n8 settings.
22417 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
22418             Chung-Ju Wu  <jasonwucj@gmail.com>
22420         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
22421         * config/nds32/nds32-n9-2r1w.md: New file.
22422         * config/nds32/nds32-n9-3r2w.md: New file.
22423         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
22424         nds32_register_ports): New or modify for cpu n9.
22425         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
22426         pipeline.
22427         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
22428         * config/nds32/nds32-utils.c: New file.
22429         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
22430         TARGET_MUL_SLOW): Define.
22431         * config/nds32/nds32.md (pipeline_model): New attribute.
22432         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
22433         New options that support cpu n9.
22434         * config/nds32/pipelines.md: Include n9 settings.
22435         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
22437 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
22439         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
22440         information if necessary.
22441         (output_cond_branch_compare_zero): Likewise.
22442         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
22443         (nds32_target_alignment): Refine for alignment.
22444         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
22445         (FUNCTION_BOUNDARY): Modify.
22446         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
22447         align case.
22448         * config/nds32/nds32.opt (malways-align, malign-functions): New.
22450 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
22452         * config/nds32/constants.md (unspec_volatile_element): Add values for
22453         TLB operation and data prefetch.
22454         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
22455         functions for TLB operation and data prefetch.
22456         * config/nds32/nds32-intrinsic.md: Likewise.
22457         * config/nds32/nds32_intrinsic.h: Likewise.
22458         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
22459         (nds32_print_operand): Likewise.
22460         * config/nds32/nds32.h (nds32_builtins): Likewise.
22462 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
22463         Andrew Pinski <pinsika@gcc.gnu.org>
22465         PR middle-end/82976
22466         * match.pd: Use constant_boolean_node of correct type instead of
22467         boolean_true_node or boolean_false_node for simplifying
22468         pointer comparisons to zero.
22470 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
22472         PR tree-optimization/80021
22473         * tree.c (verify_type_variant): Make error call in verify_variant_match
22474         translatable and remove final full stop.
22476 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22478         * config/nds32/constants.md (unspec_volatile_element): Add
22479         UNSPEC_VOLATILE_EH_RETURN.
22480         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
22481         nds32_output_stack_pop): Support dwarf exception handling process.
22482         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
22483         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
22484         exception handling process.
22485         (nds32_compute_stack_frame): Likewise.
22486         (nds32_return_addr_rtx): Likewise.
22487         (nds32_initial_elimination_offset): Likewise.
22488         (nds32_expand_prologue): Likewise.
22489         (nds32_expand_epilogue): Likewise.
22490         (nds32_dynamic_chain_address): New function.
22491         * config/nds32/nds32.h (machine_function): Add fields for dwarf
22492         exception handling.
22493         (DYNAMIC_CHAIN_ADDRESS): Define.
22494         (EH_RETURN_DATA_REGNO): Define.
22495         (EH_RETURN_STACKADJ_RTX): Define.
22496         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22497         patterns for dwarf exception handling.
22499 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22501         * config/nds32/nds32.h: Clean up obsolete macros.
22503 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22505         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22506         Add enum values for particular instructions.
22507         * config/nds32/nds32-intrinsic.c: Implementation of expanding
22508         particular intrinsic functions.
22509         * config/nds32/nds32-intrinsic.md: Likewise.
22510         * config/nds32/nds32_intrinsic.h: Likewise.
22511         * config/nds32/nds32.h (nds32_builtins): Likewise.
22512         * config/nds32/nds32.md (type): Add pbsad and pbsada.
22513         (btst, ave): New patterns for particular instructions.
22515 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22517         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22518         Add enum values for atomic load/store and memory sync.
22519         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22520         and memory sync.
22521         * config/nds32/nds32-intrinsic.md: Likewise.
22522         * config/nds32/nds32_intrinsic.h: Likewise.
22523         * config/nds32/nds32.h (nds32_builtins): Likewise.
22525 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
22527         PR tree-optimization/85257
22528         * fold-const.c (native_encode_vector): If not all elts could fit
22529         and off is -1, return 0 rather than offset.
22530         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22531         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22532         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
22533         adjust buffer in native_interpret_expr call.
22535 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22537         * config/nds32/constants.md (unspec_volatile_element): Add cache
22538         control enum values.
22539         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22540         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22541         * config/nds32/nds32.c (nds32_cctl_names): New.
22542         (nds32_print_operand): Handle cache control register names.
22543         * config/nds32/nds32.h (nds32_builtins): New enum values.
22544         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22545         macros.
22546         * config/nds32/nds32.md (type): Add mmu.
22547         * config/nds32/pipelines.md (simple_insn): Add mmu.
22549 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22551         * config/nds32/nds32.md (type): Remove call.
22552         * config/nds32/pipelines.md (simple_insn): Likewise.
22554 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22556         * config/nds32/constants.md (unspec_volatile_element): Add
22557         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22558         UNSPEC_VOLATILE_FMFCFG.
22559         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22560         description for fmfcfg and fmfcsr.
22561         (bdesc_1arg): Add fmtcsr.
22562         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22563         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22564         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22565         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22566         unspec_fmfcfg): New patterns.
22567         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22568         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22569         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22570         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22571         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22572         __nds32__fmfcfg): Define.
22574 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
22576         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22577         intrinsic register names.
22578         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22579         intrinsic register enum values and macros.
22581 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
22583         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22584         for load/store addressing form.
22585         (nds32_print_operand_address): Likewise.
22587 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
22589         PR target/85196
22590         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22591         based on LABEL_REF.  Remove useless assertion.
22592         (pic_address_needs_scratch): Fix formatting.
22593         (sparc_legitimize_pic_address): Minor tweaks.
22594         (sparc_delegitimize_address): Adjust assertion accordingly.
22595         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22596         into symbolic_operand.
22597         (movsi_high_pic_label_ref): Likewise.
22598         (movsi_lo_sum_pic_label_ref): Likewise.
22599         (movdi_pic_label_ref): Likewise.
22600         (movdi_high_pic_label_ref): Likewise.
22601         (movdi_lo_sum_pic_label_ref): Likewise.
22603 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
22605         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22606         custom LIB_SPEC setup.
22608 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
22609             Kito Cheng  <kito.cheng@gmail.com>
22611         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22612         * config/riscv/freebsd.h: New.
22614 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22616         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22617         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22618         file.
22620 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22621             Kito Cheng  <kito.cheng@gmail.com>
22623         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22624         nds32_output_call, nds32_symbol_binds_local_p): New functions.
22625         * config/nds32/nds32-protos.h (nds32_output_call,
22626         nds32_output_return): Declare.
22627         * config/nds32/nds32.md: Refine all the call and return patterns.
22629 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22631         PR debug/85252
22632         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22633         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22635         PR rtl-optimization/84872
22636         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22637         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22638         EDGE_CROSSING edge.
22640 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
22642         * expr.c (copy_blkmode_to_reg): Revert 254862.
22643         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22645 2018-04-06  Richard Biener  <rguenther@suse.de>
22647         PR middle-end/85244
22648         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22649         after seeing a component reference with an adjacent field.  Treat
22650         refs to arrays at struct end of external decls similar to
22651         refs to unconstrained commons.
22653 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
22655         PR sanitizer/85213
22656         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22657         look through SAVE_EXPRs with non-side-effects argument.  Adjust
22658         recursive calls.
22659         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22660         save_p here.
22662 2018-04-06  Richard Biener  <rguenther@suse.de>
22664         PR middle-end/85180
22665         * alias.c (find_base_term): New wrapper around find_base_term
22666         unwinding CSELIB_VAL_PTR changes.
22667         (find_base_term): Do not restore CSELIB_VAL_PTR during the
22668         recursion.
22670 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22672         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22673         instructions.
22674         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22675         constant definitions.
22676         ("nop"): lr 0,0 -> nopr r0
22677         ("nop_lr0", "nop_lr1"): New insn definitions.
22679 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
22681         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22682         NDS32_V3PUSH_AVAILABLE_P macro.
22684 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
22685             Chung-Ju Wu  <jasonwucj@gmail.com>
22687         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22688         (nds32*-*-*): Add float and fpu_config into supported_defaults.
22689         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22690         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22691         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22692         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22693         * config/nds32/constraints.md: New constraints and checking for hard
22694         float configuration.
22695         * config/nds32/iterators.md: New mode iterator and attribute for hard
22696         float configuration.
22697         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22698         patterns.
22699         * config/nds32/nds32-fpu.md: New file.
22700         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22701         deal with hard float code generation.
22702         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22703         ARCH_V3S.
22704         (abi_type, float_reg_number): New enum type.
22705         * config/nds32/nds32-predicates.c: New predicates for hard float.
22706         * config/nds32/nds32-protos.h: Declare functions for hard float.
22707         * config/nds32/nds32.c: Implementation for hard float configuration.
22708         * config/nds32/nds32.h: Definitions for hard float configuration.
22709         * config/nds32/nds32.md: Include hard float machine description and
22710         modify patterns for hard float configuration.
22711         * config/nds32/nds32.opt: New options for hard float configuration.
22712         * config/nds32/predicates.md: New predicates for hard float
22713         configuration.
22715 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22717         * common/config/nds32/nds32-common.c
22718         (nds32_option_optimization_table): Enable -mreleax-hint by default.
22720 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
22722         PR middle-end/85195
22723         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22724         CONSTRUCTOR_ELT (ctor, ...)->value.
22726 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
22728         PR target/85193
22729         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22731 2018-04-05  Tom de Vries  <tom@codesourcery.com>
22733         PR target/85204
22734         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22735         cond jump.
22737 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22738             Kito Cheng  <kito.cheng@gmail.com>
22740         * config/nds32/constraints.md (U33): Fine-tune checking condition.
22741         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22742         * config/nds32/nds32.h (nds32_16bit_address_type): Add
22743         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22745 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
22746             Kito Cheng  <kito.cheng@gmail.com>
22748         * config/nds32/constraints.md (Ufe): New memory constraint.
22749         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22750         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22751         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22752         operands.
22753         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22754         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22756 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22758         * config/nds32/nds32.md: Use optimize_size in the condition for
22759         alu-shift instructions.
22761 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22763         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22765 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22767         * config/nds32/nds32.md (negsi2): Refine pattern.
22769 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22770             Chung-Ju Wu  <jasonwucj@gmail.com>
22772         * config/nds32/iterators.md (shift_rotate): New code iterator.
22773         (shift): New code attribute.
22774         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22775         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22776         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22777         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22778         bit-wise operations.
22779         (andsi3, *andsi3): Ditto.
22780         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22781         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22782         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22783         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22784         nds32_ior_operand, nds32_xor_operand): New predicates.
22786 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22788         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22789         (addsi3, subsi3): ... this.
22791 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22793         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22795 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22797         * config/nds32/nds32.md: Adjust indention.
22799 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
22801         * config/nds32/nds32.md (feature): New attribute.
22803 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
22805         * config/nds32/nds32.md (subtype): New attribute.
22807 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22809         PR target/85203
22810         * config/arm/arm-builtins.c (arm_expand_builtin): Change
22811         expansion to perform a bitwise AND of the argument followed by a
22812         boolean negation of the result.
22814 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
22816         PR rtl-optimization/84878
22817         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22818         the basic block.  Assert the use reference is not artificial and that
22819         it has an associated insn.
22821 2018-04-04  Michael Matz  <matz@suse.de>
22823         * builtins.c (compute_objsize): Pass correct operand
22824         to array_at_struct_end_p.
22826 2018-04-04  Richard Biener  <rguenther@suse.de>
22828         PR lto/85176
22829         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22830         from contexts for DINFO_LEVEL_TERSE and below.
22832 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22834         * config/nds32/nds32-doubleword.md (move_<mode>): Require
22835         resiter_operand condition.
22836         * config/nds32/nds32.md (*move<mode>): Ditto.
22838 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22839             Monk Chiang  <sh.chiang04@gmail.com>
22841         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22843 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22845         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22847 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22848             Kito Cheng  <kito.cheng@gmail.com>
22850         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22851         nds32_cond_code_str, output_cond_branch,
22852         output_cond_branch_compare_zero, nds32_expand_cbranch,
22853         nds32_expand_cstore, nds32_expand_movcc,
22854         nds32_output_cbranchsi4_equality_zero,
22855         nds32_output_cbranchsi4_equality_reg,
22856         nds32_output_cbranchsi4_equality_reg_or_const_int,
22857         nds32_output_cbranchsi4_greater_less_zero: New functions.
22858         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22859         nds32_expand_cstore, nds32_expand_movcc,
22860         nds32_output_cbranchsi4_equality_zero,
22861         nds32_output_cbranchsi4_equality_reg,
22862         nds32_output_cbranchsi4_equality_reg_or_const_int,
22863         nds32_output_cbranchsi4_greater_less_zero): Declare.
22864         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22865         nds32_rimm11s_operand): New predicates.
22866         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22867         * config/nds32/nds32.md: Rewrite all the branch and conditional move
22868         patterns.
22870 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
22872         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22873         * config/nds32/nds32.md: Ditto.
22874         * config/nds32/pipelines.md: Ditto.
22876 2018-04-04  Richard Biener  <rguenther@suse.de>
22878         PR tree-optimization/85168
22879         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22880         propagating abnormals.
22882 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22884         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22886 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
22887             Kito Cheng  <kito.cheng@gmail.com>
22889         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22890         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22891         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22892         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22893         * config/nds32/nds32.md (sibcall_internal): New.
22894         (sibcall_register): Remove.
22895         (sibcall_immediate): Remove.
22896         (sibcall_value_internal): New.
22897         (sibcall_value_register): Remove.
22898         (sibcall_value_immediate): Remove.
22899         * config/nds32/predicates.md (nds32_general_register_operand): New.
22900         (nds32_call_address_operand): New.
22902 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22904         PR rtl-optimization/85167
22905         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22906         bb_defs if *split_p, instead preinitialize it to NULL.
22908         PR tree-optimization/85156
22909         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22910         evaluating the argument multiple times.
22912 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
22914         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22915         than vector.
22916         (_mm_cvtpd_ps): Likewise.
22917         (_mm_cvttpd_epi32): Likewise.
22918         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22919         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22920         vector, pixel, and bool following altivec.h include.
22922 2018-04-03  Martin Sebor  <msebor@redhat.com>
22924         * doc/extend.texi (Common Function Attributes): Clarify.
22925         (const attribute): Likewise.
22926         (pure attribute): Likewise.
22928 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
22930         PR target/85169
22931         * config/i386/i386.c (ix86_expand_vector_set): Use
22932         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
22934 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
22936         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22937         instructions when changing rounding bits to preserve precision bits
22938         in the x87 control word.
22940 2018-04-03  Martin Liska  <mliska@suse.cz>
22942         PR tree-optimization/82491
22943         * rtl.h (strip_offset_and_add): Replace += suboffset with
22944         poly_uint64 () + suboffset.
22946 2018-03-29  Martin Liska  <mliska@suse.cz>
22947             Martin Jambor  <mjambor@suse.cz>
22949         PR ipa/84947
22950         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22951         param_type is not an integral or pointer type.
22953 2018-04-03  Richard Biener  <rguenther@suse.de>
22955         * sese.h (recompute_all_dominators): Remove.
22957 2018-04-02  Martin Sebor  <msebor@redhat.com>
22959         * doc/invoke.texi (-Wrestrict): Fix typos.
22961 2018-04-02  Jim Wilson  <jimw@sifive.com>
22963         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22964         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22965         (<optab>di3, <optab>si3_extend): Likewise.
22966         (<optab>si3_mask, <optab>si3_mask_1): New.
22967         (<optab>di3_mask, <optab>di3_mask_1): New.
22968         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22969         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22970         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22972 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
22974         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22975         example.
22977 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
22979         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22980         (nds32_canonicalize_comparison): New function.
22982 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
22983             Kito Cheng  <kito.cheng@gmail.com>
22984             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
22986         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22987         * config/nds32/constants.md (unspec_volatile_element): Add
22988         UNSPEC_VOLATILE_RELAX_GROUP.
22989         * config/nds32/nds32-relax-opt.c: New file.
22990         * config/nds32/nds32-predicates.c
22991         (nds32_symbol_load_store_p): New function.
22992         * config/nds32/nds32-protos.h
22993         (nds32_symbol_load_store_p): Declare function.
22994         (make_pass_nds32_relax_opt): Declare new rtl pass function.
22995         * config/nds32/nds32.c
22996         (nds32_register_pass): New function to register pass.
22997         (nds32_register_passes): New function to register passes.
22998         * config/nds32/nds32.md (relax_group): New pattern.
22999         * config/nds32/nds32.opt (mrelax-hint): New option.
23000         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
23002 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
23004         * config/nds32/t-nds32: Modify files dependency.
23006 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
23008         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
23009         (PROFILE_HOOK): Define its implementation.
23011 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
23013         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
23014         type and 32-bit size.
23016 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
23018         PR middle-end/85090
23019         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
23020         (V_128_256): New mode iterator.
23021         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
23022         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
23023         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
23024         of V.
23025         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
23026         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
23028 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
23030         PR target/83315
23031         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
23032         NaN inputs correctly.
23034 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
23036         PR target/80546
23037         * config/rs6000/vsx.md (??r): New mode attribute.
23038         (*vsx_mov<mode>_64bit): Use it.
23039         (*vsx_mov<mode>_32bit): Likewise.
23041 2018-03-30  Martin Sebor  <msebor@redhat.com>
23043         PR tree-optimization/84818
23044         * builtins.c (check_access): Use warning_n.
23046 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23048         PR target/83822
23049         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
23050         condition.
23051         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
23052         condition.
23054 2018-03-30  Julia Koval  <julia.koval@intel.com>
23056         PR target/84413
23057         * x86-tune.def (movx, partial_reg_dependency): Enable for
23058         m_SKYLAKE_AVX512.
23060 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
23062         PR inline-asm/84985
23063         * lra-constraints.c (process_alt_operands): Move setting
23064         this_alternative_matches below.
23066 2018-03-29  Martin Liska  <mliska@suse.cz>
23068         PR lto/84995.
23069         * doc/invoke.texi: Document how LTO works with debug info.
23070         Describe auto-load support of binutils.  Mention 'x86-64'
23071         as valid option value of -march option.
23073 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
23075         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23077         PR c/85094
23078         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23079         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23080         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23081         checking.
23083 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
23085         PR target/84912
23086         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23087         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23088         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23089         for RS6000_BTM_POWERPC64.
23090         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23091         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23092         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23093         definition.
23094         (DIVDE): Use it.
23095         (DIVDEU): Likewise.
23097 2018-03-28  Carl Love  <cel@us.ibm.com>
23099         Revert
23100         2017-09-27  Carl Love  <cel@us.ibm.com>
23102         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23103         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23104         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23105         fctiw instruction.
23107 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23109         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23110         instead of __vector bool.
23111         (_mm_max_pu8): Likewise.
23112         (_mm_min_pi16): Likewise.
23114 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
23116         PR target/84912
23117         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23118         (DIVWEUO): Likewise.
23119         (DIVDEO): Likewise.
23120         (DIVDEUO): Likewise.
23121         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23122         DIVWEUO and DIVDEUO.
23123         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23124         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23125         (div_extend): Likewise.
23126         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23127         builtin function.
23128         (__builtin_divweuo): Likewise.
23129         (__builtin_divdeo): Likewise.
23130         (__builtin_divdeuo): Likewise.
23132 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
23134         PR target/85095
23135         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23136         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23138         PR tree-optimization/82004
23139         * gimple-match-head.c (optimize_pow_to_exp): New function.
23140         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23141         Don't fold to exp if optimize_pow_to_exp is false.
23143 2018-03-28  Martin Liska  <mliska@suse.cz>
23145         PR other/84819
23146         * calls.c (initialize_argument_information): Fix trailing space.
23147         * common.opt: Fix typo and provide better explanation for
23148         -fsanitize-coverage option.
23149         * config/i386/i386.opt: Fix typo.
23151 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
23152             Martin Liska  <mliska@suse.cz>
23154         PR sanitizer/85081
23155         * gimplify.c (asan_poison_variable): Don't do the check for
23156         gimplify_omp_ctxp here.
23157         (gimplify_decl_expr): Do it here.
23158         (gimplify_target_expr): Likewise.
23160 2018-03-28  Martin Liska  <mliska@suse.cz>
23162         PR target/84988
23163         * config/i386/i386.c (ix86_function_arg_advance): Do not call
23164         chkp_type_bounds_count if MPX is not enabled.
23166 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
23168         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23170 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
23172         PR target/84914
23173         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23174         function to create the function decl for complex long double
23175         multiply and divide for -mabi=ieeelongdouble.
23176         (init_float128_ieee): Call it.
23178 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
23180         PR target/85044
23181         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23182         -fcf-protection=branch -mibt.
23183         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23185 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23187         PR target/81863
23188         * config/arm/arm.c (arm_valid_symbolic_address): Handle
23189         arm_word_relocations.
23191 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
23193         PR target/85056
23194         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23195         extern array declarations.
23197 2018-03-27  Richard Biener  <rguenther@suse.de>
23199         PR middle-end/84067
23200         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23201         explicit single_use checks.
23203 2018-03-27  Richard Biener  <rguenther@suse.de>
23205         PR tree-optimization/85082
23206         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23207         Valueize the VUSE.
23209 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23211         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23212         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23213         Turn on fasynchronous-unwind-tables and funwind-tables.
23215 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
23217         PR target/85073
23218         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23219         (*bmi_blsr_<mode>_ccz): Ditto.
23221 2018-03-26  Tom de Vries  <tom@codesourcery.com>
23223         PR tree-optimization/85063
23224         * omp-general.c (offloading_function_p): New function.  Factor out
23225         of ...
23226         * omp-offload.c (pass_omp_target_link::gate): ... here.
23227         * omp-general.h (offloading_function_p): Declare.
23228         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23229         with attribute omp declare target for offloading functions.
23231 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
23233         PR tree-optimization/84005
23234         * tree-data-ref.h (get_base_for_alignment): Declare.
23235         * tree-data-ref.c (get_base_for_alignment_1): New function.
23236         (get_base_for_alignment): Likewise.
23237         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
23238         get_base_for_alignment to find a suitable base object, instead
23239         of always using drb->base_address.
23241 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
23243         PR inline-asm/85022
23244         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
23245         known size by default.
23247 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
23249         PR inline-asm/85030
23250         * lra-constraints.c (process_alt_operands): Don't match BLKmode
23251         and non BLKmode operands.
23253 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23255         PR target/85026
23256         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
23257         Clean up attributes.
23259 2018-03-23  Richard Biener  <rguenther@suse.de>
23261         PR debug/85020
23262         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
23263         we are going to emit early debug for LTO.
23265 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
23267         PR inline-asm/85034
23268         * function.c (match_asm_constraints_1): Don't optimize if input
23269         doesn't satisfy general_operand predicate for output's mode.
23271         PR inline-asm/85022
23272         * alias.c (write_dependence_p): Don't require for x_canonicalized
23273         non-VOIDmode if x has VOIDmode.
23275         PR sanitizer/85029
23276         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
23277         just don't try to optimize it rather than assert it never happens.
23279 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23281         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
23282         macro expansions for definition of ST_INTERNAL_<mode> and
23283         LD_INTERNAL_<mode> builtins.
23284         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
23285         Remove prototype.
23286         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
23287         function.
23288         (altivec_expand_st_builtin): Likewise.
23289         (altivec_expand_builtin): Remove calls to deleted functions.
23290         (rs6000_address_for_altivec): Delete this function.
23291         * config/rs6000/vector.md: Remove expands for
23292         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
23294 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
23296         PR target/84826
23297         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
23298         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
23299         re-computing once computed.
23300         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
23301         (arm_init_machine_status): Initialize
23302         machine->static_chain_stack_bytes.
23304 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23306         PR target/84760
23307         * doc/extend.texi: Add four new prototypes for vec_ld.
23308         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
23309         definitions for more logical presentation.
23310         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
23311         entries for V1TI variants of __builtin_altivec_ld builtin.
23312         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
23313         handling of V1TI variant of LVX icode pattern.
23314         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
23315         (rs6000_gimple_fold_builtin): Likewise.
23316         (altivec_init_builtins): Add code to define
23317         __builtin_altivec_lvx_v1ti function.
23319 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
23321         PR inline-asm/84941
23322         * function.c (match_asm_constraints_1): Don't do the optimization
23323         if input isn't a REG, SUBREG, MEM or constant.
23325 2018-03-22  Tom de Vries  <tom@codesourcery.com>
23327         PR tree-optimization/84956
23328         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
23329         bb_has_abnormal_pred.
23331 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
23333         PR sanitizer/85018
23334         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
23335         DECL_INITIAL (decl) to decl at the end.
23336         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
23337         adjust the comment.
23339 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
23341         * doc/extend.texi (__builtin_tgmath): Document when complex
23342         integer types are treated as _Complex _Float64.
23344 2018-03-21  Tom de Vries  <tom@codesourcery.com>
23346         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
23348 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
23350         PR tree-optimization/84960
23351         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
23352         if it is ENTRY block, move them into single succ of ENTRY in that case.
23354 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
23356         PR tree-optimization/84811
23357         * poly-int.h (poly_span_traits): Remove the T3 parameter and
23358         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
23359         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
23360         (known_subrange_p): Update accordingly.  Cast each value involved
23361         in the size comparison, rather than casting the result of the
23362         subtraction.
23364 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
23366         PR tree-optimization/84982
23367         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
23368         by flipping the least significant bit rather than all bits from
23369         bitpos to bitpos + bitsize - 1.
23371 2018-03-21  Nathan Sidwell  <nathan@acm.org>
23373         * doc/extend.texi (Deprecated Features): Remove mention of
23374         long-deleted deprecations.
23376 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
23378         PR jit/84288
23379         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
23380         * configure: Regenerate.
23382 2018-03-21  Tom de Vries  <tom@codesourcery.com>
23384         PR tree-optimization/83126
23385         * tree-parloops.c (num_phis): New function.
23386         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
23388 2018-03-21  Nathan Sidwell  <nathan@acm.org>
23390         * doc/extend.texi (Deprecated Features): Update deprecated flags,
23391         mention anon-struct/union members and trailing attributes.
23393 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
23395         PR tree-optimization/84969
23396         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
23397         builtin memset partitions if they set different rhs values.
23399 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
23401         PR rtl-optimization/84989
23402         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
23403         VEC_DUPLICATE with scalar result mode.
23405 2018-03-21  Martin Liska  <mliska@suse.cz>
23407         PR ipa/84963
23408         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
23409         not intended return statement.
23411 2018-03-21  Martin Liska  <mliska@suse.cz>
23413         PR target/84988
23414         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
23415         (chkp_find_bound_slots_1): Limit number of iterations.
23417 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
23419         PR target/84838
23420         * Minor grammar fixes for x86 options.
23422 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23424         PR debug/84875
23425         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
23426         holding REG_CFA_RESTORE notes, instead turn them into a USE.
23428 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
23430         PR target/83789
23431         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
23432         (altivec_lvx_<mode>_1op): Likewise.
23433         (altivec_stvx_<mode>_2op): Likewise.
23434         (altivec_stvx_<mode>_1op): Likewise.
23435         (altivec_lvx_<VM2:mode>): New define_expand.
23436         (altivec_stvx_<VM2:mode>): Likewise.
23437         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
23438         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23439         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
23440         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
23441         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
23442         (rs6000_gen_lvx): Likewise.
23443         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
23444         (altivec_expand_stv_builtin): Likewise.
23445         (altivec_expand_builtin): Likewise.
23446         * config/rs6000/vector.md: Likewise.
23448 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23450         PR target/82518
23451         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
23452         BYTES_BIG_ENDIAN.
23454 2018-03-20  Richard Biener  <rguenther@suse.de>
23456         PR target/84986
23457         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
23458         sign-conversions as zero, fall back to standard scalar_stmt
23459         cost for the rest.
23461 2018-03-20  Martin Liska  <mliska@suse.cz>
23463         PR ipa/84825
23464         * predict.c (rebuild_frequencies): Handle case when we have
23465         PROFILE_ABSENT, but flag_guess_branch_prob is false.
23467 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23469         PR target/84990
23470         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
23471         flag_section_anchors.
23472         * varasm.c (use_blocks_for_decl_p): Remove hack for
23473         dw2_force_const_mem.
23475         PR target/84845
23476         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
23477         to ...
23478         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
23479         be created, use lowpart_subreg of operands[0] rather than operands[0]
23480         itself.
23481         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
23482         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
23483         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
23484         and n constraint instead of aarch64_shift_imm_di and Usd.
23485         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
23486         (*aarch64_<optab>_reg_minus<mode>3): ... this.
23488 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
23490         PR target/82989
23491         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23492         to favor GPR over NEON registers.
23493         (<shift>di3_neon): Likewise.
23495 2018-03-20  Tom de Vries  <tom@codesourcery.com>
23497         PR target/84952
23498         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23499         (nvptx_process_pars): Emit bar.sync asap and alap.
23501 2018-03-20  Tom de Vries  <tom@codesourcery.com>
23503         PR target/84954
23504         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23505         seen_label if seen_label is already set.
23507 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
23509         PR target/84945
23510         * config/i386/i386.c (fold_builtin_cpu): For features above 31
23511         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23512         Use 1U instead of 1.  Formatting fixes.
23514         PR c/84953
23515         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23516         instead of TREE_TYPE (s1) for the return value.
23518 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
23520         PR tree-optimization/84946
23521         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23522         bitsize + bitsize in poly_uint64 rather than poly_int64.
23524         PR sanitizer/78651
23525         * dwarf2asm.c: Include fold-const.c.
23526         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23527         of decl rather than decl itself.
23529         PR rtl-optimization/84643
23530         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23532 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
23534         PR sanitizer/78651
23535         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23536         calling assemble_variable.
23538 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
23540         PR target/81647
23541         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23542         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23544 2018-03-19  Jim Wilson  <jimw@sifive.com>
23546         PR bootstrap/84856
23547         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23548         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23549         (riscv_first_stack_step): Likewise.
23550         (riscv_option_override): Use STACK_BOUNDARY instead of
23551         MIN_STACK_BOUNDARY.
23552         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23553         MIN_STACK_BOUNDARY.
23554         (BIGGEST_ALIGNMENT): Set to 128.
23555         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23556         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23557         STACK_BOUNDARY.
23559 2018-03-19  Richard Biener  <rguenther@suse.de>
23561         PR tree-optimization/84933
23562         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23563         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23565 2018-03-19  Richard Biener  <rguenther@suse.de>
23567         PR tree-optimization/84859
23568         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23569         (cond_if_else_store_replacement): Perform sinking operation on
23570         single-store BBs regardless of MAX_STORES_TO_SINK setting.
23571         Generalize what a BB with a single eligible store is.
23573 2018-03-19  Richard Biener  <rguenther@suse.de>
23575         PR tree-optimization/84929
23576         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23577         chrec_is_positive against non-chrec arg.
23579 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
23581         PR target/84711
23582         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23584 2018-03-18  Martin Liska  <mliska@suse.cz>
23586         PR rtl-optimization/84635
23587         * regrename.c (build_def_use): Use matches_mode only when
23588         matches >= 0.
23590 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
23592         PR tree-optimization/84913
23593         * tree-vect-loop.c (vectorizable_reduction): Don't try to
23594         vectorize chains of COND_EXPRs.
23596 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23598         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23600 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23602         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23604 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
23606         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23608 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23609             Kito Cheng  <kito.cheng@gmail.com>
23611         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23612         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23613         (nds32_adjust_reg_alloc_order): New function.
23614         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23616 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
23618         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23619         nds32_print_operand, nds32_print_operand_address): Use
23620         HOST_WIDE_INT_PRINT_DEC instead.
23622 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
23624         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23626 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
23628         PR target/84902
23629         * config/i386/i386.c (initial_ix86_tune_features,
23630         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23631         unsigned long long.
23632         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23633         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23634         rather than 1u << ix86_tune.  Formatting fix.
23635         (ix86_option_override_internal): Change ix86_arch_mask from
23636         unsigned int to unsigned HOST_WIDE_INT, initialize to
23637         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23638         (ix86_function_specific_restore): Likewise.
23640 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23642         PR target/84899
23643         * postreload.c (reload_combine_recognize_pattern): Perform
23644         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23645         truncate_int_for_mode the result for the destination's mode.
23647         PR c/84909
23648         * hsa-gen.c (mem_type_for_type): Fix comment typo.
23649         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23650         Likewise.
23651         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23652         Likewise.
23654 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
23656         PR target/84876
23657         * lra-assigns.c (lra_split_hard_reg_for): Don't use
23658         regno_allocno_class_array and sorted_pseudos.
23659         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23660         insns where regno is used.
23662 2018-03-16  Martin Liska  <mliska@suse.cz>
23664         PR ipa/84833
23665         * multiple_target.c (create_dispatcher_calls): Redirect
23666         reference in the symbol table.
23668 2018-03-16  Martin Liska  <mliska@suse.cz>
23670         PR ipa/84722
23671         * multiple_target.c (create_dispatcher_calls): Redirect also
23672         an alias.
23674 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23676         PR c++/79937
23677         PR c++/82410
23678         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23679         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23680         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23682 2018-03-16  Julia Koval  <julia.koval@intel.com>
23684         * doc/invoke.texi (Skylake Server): Add CLWB.
23685         Cannonlake): Remove CLWB.
23687 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
23689         PR tree-optimization/84841
23690         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23691         1 << 3.
23692         (FLOAT_ONE_CONST_TYPE): Define.
23693         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23694         (sort_by_operand_rank): Put entries with higher constant_type last
23695         rather than first to match comments.
23697 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
23699         * config/nios2/nios2.md (movsi_internal): Fix thinko in
23700         split predicate.
23702 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23704         PR c++/79085
23705         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23706         check and use address of target always.
23708 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
23710         PR target/84574
23711         * config/i386/i386.c (indirect_thunk_needed): Update comments.
23712         (indirect_thunk_bnd_needed): Likewise.
23713         (indirect_thunks_used): Likewise.
23714         (indirect_thunks_bnd_used): Likewise.
23715         (indirect_return_needed): New.
23716         (indirect_return_bnd_needed): Likewise.
23717         (output_indirect_thunk_function): Add a bool argument for
23718         function return.
23719         (output_indirect_thunk_function): Don't generate alias for
23720         function return thunk.
23721         (ix86_code_end): Call output_indirect_thunk_function to generate
23722         function return thunks.
23723         (ix86_output_function_return): Set indirect_return_bnd_needed
23724         and indirect_return_needed instead of indirect_thunk_bnd_needed
23725         and indirect_thunk_needed.
23727 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
23729         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23730         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23731         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23733 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
23734             Paul Hua <paul.hua.gm@gmail.com>
23736         PR c/84852
23737         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23739 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
23741         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23742         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23743         resp. SFmode cases.
23745 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
23747         PR target/84711
23748         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23749         instead of GET_MODE_SIZE when comparing Units.
23751 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
23753         PR target/68256
23754         * varasm.c (hash_section): Return an unchangeble hash value
23755         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23756         Return !aarch64_can_use_per_function_literal_pools_p ().
23758 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
23760         PR target/84860
23761         * optabs.c (emit_conditional_move): Pass address of cmode's copy
23762         rather than address of cmode as last argument to prepare_cmp_insn.
23764 2018-03-15  Julia Koval  <julia.koval@intel.com>
23766         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23767         F_AVX512VNNI, F_AVX512BITALG): New.
23769 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
23771         PR target/83451
23772         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
23773         insn for floating-point loads and stores.
23775 2018-03-14  Carl Love  <cel@us.ibm.com>
23777         * config/rs6000/rs6000-c.c: Add macro definitions for
23778         ALTIVEC_BUILTIN_VEC_PERMXOR.
23779         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23780         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23781         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23782         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23783         UNSPEC_VPERMXOR.
23784         * config/doc/extend.texi: Add prototypes for vec_permxor.
23786 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
23788         PR c/84852
23789         * diagnostic-show-locus.c (class layout_point): Convert m_line
23790         from int to linenum_type.
23791         (line_span::comparator): Use linenum "compare" function when
23792         comparing line numbers.
23793         (test_line_span): New function.
23794         (layout_range::contains_point): Convert param "row" from int to
23795         linenum_type.
23796         (layout_range::intersects_line_p): Likewise.
23797         (layout::will_show_line_p): Likewise.
23798         (layout::print_source_line): Likewise.
23799         (layout::should_print_annotation_line_p): Likewise.
23800         (layout::print_annotation_line): Likewise.
23801         (layout::print_leading_fixits): Likewise.
23802         (layout::annotation_line_showed_range_p): Likewise.
23803         (struct line_corrections): Likewise for field m_row.
23804         (line_corrections::line_corrections): Likewise for param "row".
23805         (layout::print_trailing_fixits): Likewise.
23806         (layout::get_state_at_point): Likewise.
23807         (layout::get_x_bound_for_row): Likewise.
23808         (layout::print_line): Likewise.
23809         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23810         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23811         * input.c (selftest::test_linenum_comparisons): New function.
23812         (selftest::input_c_tests): Call it.
23813         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23814         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23815         * selftest.h (ASSERT_GT): New macro.
23816         (ASSERT_GT_AT): New macro.
23817         (ASSERT_LT): New macro.
23818         (ASSERT_LT_AT): New macro.
23820 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
23822         PR rtl-optimization/84780
23823         * combine.c (distribute_links): Don't make a link based on pc_rtx.
23825 2018-03-14  Martin Liska  <mliska@suse.cz>
23827         * tree.c (record_node_allocation_statistics): Use
23828         get_stats_node_kind.
23829         (get_stats_node_kind): New function extracted from
23830         record_node_allocation_statistics.
23831         (free_node): Use get_stats_node_kind.
23833 2018-03-14  Richard Biener  <rguenther@suse.de>
23835         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23836         that the value-set of ANTIC_IN doesn't grow.
23838         Revert
23839         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23840         member.
23841         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23842         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23844 2018-03-14  Julia Koval  <julia.koval@intel.com>
23846         * config.gcc (icelake-client, icelake-server): New.
23847         (icelake): Remove.
23848         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23849         (initial_ix86_arch_features): Ditto.
23850         (PTA_SKYLAKE): Add SGX.
23851         (PTA_ICELAKE): Remove.
23852         (PTA_ICELAKE_CLIENT): New.
23853         (PTA_ICELAKE_SERVER): New.
23854         (ix86_option_override_internal): Split up icelake on icelake client and
23855         icelake server.
23856         (get_builtin_code_for_version): Ditto.
23857         (fold_builtin_cpu): Ditto.
23858         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23859         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23860         * config/i386/i386.h (processor_type): Ditto.
23861         * doc/invoke.texi: Ditto.
23863 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
23865         PR sanitizer/83392
23866         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23867         INTEGER_CST offset, add it together with bitpos / 8 and
23868         sign extend based on POINTER_SIZE.
23870         PR target/84844
23871         Revert
23872         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
23874         PR target/78090
23875         * config/i386/constraints.md (Yc): New register constraint.
23876         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23877         Use Yc constraint for alternative 2 of operand 0.  Remove
23878         preferred_for_speed attribute.
23880 2018-03-14  Richard Biener  <rguenther@suse.de>
23882         PR tree-optimization/84830
23883         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23884         with the old one to avoid oscillations.
23886 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
23888         PR target/83712
23889         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23890         pseudos.
23891         (assign_by_spills): Return a flag of reload assignment failure.
23892         Do not process the reload assignment failures.  Do not spill other
23893         reload pseudos if they has the same reg class.  Update n if
23894         necessary.
23895         (lra_assign): Add a return arg.  Set up from the result of
23896         assign_by_spills call.
23897         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23898         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23899         usage_insns if it is not NULL.
23900         (spill_hard_reg_in_range): New function.
23901         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23902         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23903         function prototypes.
23904         (lra_assign): Change prototype.
23905         * lra.c (lra): Add code to deal with fails by splitting hard reg
23906         live ranges.
23908 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
23910         * config/riscv/riscv.opt (mrelax): New option.
23911         * config/riscv/riscv.c (riscv_file_start): Emit ".option
23912         "norelax" when riscv_mrelax is disabled.
23913         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23915 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23917         PR target/84743
23918         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23919         reassociation for int modes.
23921 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23923         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23924         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23925         for big-endian.
23926         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23927         * config/aarch64/aarch64-sve.md
23928         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23929         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23930         (*extend<mode><Vwide>2): Rename to...
23931         (aarch64_sve_extend<mode><Vwide>2): ...this.
23932         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23933         renaming the old pattern to...
23934         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
23935         unsigned packs.
23936         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23937         define_expand, renaming the old pattern to...
23938         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23939         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23940         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23941         account when deciding which SVE instruction the optab should use.
23942         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23944 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23946         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23947         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23948         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23949         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23950         (tlsdesc_small_<mode>): Turn a define_expand and use
23951         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
23952         (tlsdesc_small_advsimd_<mode>): ...this.
23953         (tlsdesc_small_sve_<mode>): New pattern.
23955 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
23957         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23958         (UNSPEC_UMUL_HIGHPART): New constants.
23959         (MUL_HIGHPART): New int iteraor.
23960         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23961         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23962         define_expand.
23963         (*<su>mul<mode>3_highpart): New define_insn.
23965 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23967         PR lto/84805
23968         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23969         incomplete types.
23971 2018-03-13  Martin Liska  <mliska@suse.cz>
23973         PR ipa/84658.
23974         * (sem_item_optimizer::sem_item_optimizer): Initialize new
23975         vector.
23976         (sem_item_optimizer::~sem_item_optimizer): Release it.
23977         (sem_item_optimizer::merge_classes): Register variable aliases.
23978         (sem_item_optimizer::fixup_pt_set): New function.
23979         (sem_item_optimizer::fixup_points_to_sets): Likewise.
23980         * ipa-icf.h: Declare new variables and functions.
23982 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
23984         PR middle-end/84834
23985         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23986         integer_pow2p@2 and test integer_pow2p in condition.
23987         (A < 0 ? C : 0): Similarly for @1.
23989         PR middle-end/84831
23990         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23991         characters starting at p contain '\0' character, don't look beyond
23992         that.
23994         PR target/84827
23995         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23996         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23998         PR target/84828
23999         * reg-stack.c (change_stack): Change update_end var from int to
24000         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
24001         also call set_block_for_insn on the newly added insns and rescan.
24003         PR target/84786
24004         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
24005         on the last operand.
24007         PR c++/84704
24008         * tree.c (stabilize_reference_1): Return save_expr (e) for
24009         STATEMENT_LIST even if it doesn't have side-effects.
24011 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
24013         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
24015 2018-03-12  Renlin Li  <renlin.li@arm.com>
24017         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
24018         aarch64_output_scalar_simd_mov_immediate.
24020 2018-03-12  Martin Sebor  <msebor@redhat.com>
24022         PR tree-optimization/83456
24023         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
24024         for perfectly overlapping calls to memcpy.
24025         (gimple_fold_builtin_memory_chk): Same.
24026         (gimple_fold_builtin_strcpy): Handle no-warning.
24027         (gimple_fold_builtin_stxcpy_chk): Same.
24028         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
24030 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
24032         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
24033         parameter.  Use it for SFmode.
24034         (rs6000_function_arg_advance_1): Adjust.
24035         (rs6000_function_arg): Adjust.
24036         (rs6000_gimplify_va_arg): Pass false for that new parameter.
24038 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
24040         PR rtl-optimization/84169
24041         PR rtl-optimization/84780
24042         * combine.c (can_combine_p): Check for a 2-insn combination whether
24043         the destination register is used between the two insns, too.
24045 2018-03-12  Richard Biener  <rguenther@suse.de>
24047         PR tree-optimization/84803
24048         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
24049         for refs DR analysis didn't process.
24051 2018-03-12  Richard Biener  <rguenther@suse.de>
24053         PR tree-optimization/84777
24054         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
24055         force-vectorize loops ignore whether we are optimizing for size.
24057 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
24059         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
24060         (TARGET_MD_ASM_ADJUST): Define.
24062 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
24063             Kito Cheng  <kito.cheng@gmail.com>
24064             Chung-Ju Wu  <jasonwucj@gmail.com>
24066         * config/nds32/nds32.c (nds32_compute_stack_frame,
24067         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24068         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24069         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24070         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24071         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24072         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24073         * config/nds32/nds32.md (prologue, epilogue): Use macro
24074         NDS32_V3PUSH_AVAILABLE_P to do checking.
24076 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
24078         PR debug/58150
24079         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24080         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24081         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
24082         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
24083         addition of most attributes on !orig_type_die or the attribute not
24084         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24086 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
24087             Chung-Ju Wu  <jasonwucj@gmail.com>
24089         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24090         __NDS32_VH__ macro.
24091         * config/nds32/nds32.opt (mvh): New option.
24093 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
24094             Chung-Ju Wu  <jasonwucj@gmail.com>
24096         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24097         function.
24098         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24099         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24100         definition.
24102 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
24103             Chung-Ju Wu  <jasonwucj@gmail.com>
24105         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24106         function.
24107         * config/nds32/nds32-multiple.md (strlensi): New pattern.
24108         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24110 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
24111             Kito Cheng  <kito.cheng@gmail.com>
24112             Chung-Ju Wu  <jasonwucj@gmail.com>
24114         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24115         UNSPEC_FFMISM and UNSPEC_FLMISM.
24116         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24117         for ffb, ffmism and flmism.
24118         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24119         (unspec_ffmism): Ditto.
24120         (unspec_flmism): Ditto.
24121         (nds32_expand_builtin_impl): Check if string extension is available.
24122         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24123         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24125 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
24127         Reverting patch:
24128         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
24130         PR target/83712
24131         * lra-assigns.c (assign_by_spills): Return a flag of reload
24132         assignment failure.  Do not process the reload assignment
24133         failures.  Do not spill other reload pseudos if they has the same
24134         reg class.
24135         (lra_assign): Add a return arg.  Set up from the result of
24136         assign_by_spills call.
24137         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24138         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
24139         usage_insns if it is not NULL.
24140         (spill_hard_reg_in_range): New function.
24141         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24142         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24143         function prototypes.
24144         (lra_assign): Change prototype.
24145         * lra.c (lra): Add code to deal with fails by splitting hard reg
24146         live ranges.
24148 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
24150         PR target/84807
24151         * config/i386/i386.opt: Replace Enforcment with Enforcement.
24153 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
24155         PR debug/84620
24156         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24157         (dw_val_node): Add val_symbolic_view.
24158         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24159         (symview_upper_bound): New.
24160         (new_line_info_table): Initialize symviews_since_reset.
24161         (dwarf2out_source_line): Count symviews_since_reset and set
24162         symview_upper_bound.
24163         (dw_val_equal_p): Handle symview.
24164         (add_AT_symview): New.
24165         (print_dw_val): Handle symview.
24166         (attr_checksum, attr_checksum_ordered): Likewise.
24167         (same_dw_val_p, size_of_die): Likewise.
24168         (value_format, output_die): Likewise.
24169         (add_high_low_attributes): Use add_AT_symview for entry_view.
24170         (dwarf2out_finish): Reset symview_upper_bound, clear
24171         zero_view_p.
24173 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
24175         PR target/83969
24176         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24177         Add strict argument and use it.
24178         (rs6000_split_multireg_move): Update for new strict argument.
24179         (mem_operand_gpr): Disallow all non-offsettable addresses.
24180         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24182 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
24184         PR target/84772
24185         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24186         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24187         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24189         PR c++/84767
24190         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24191         decl, use remap_type if we want to use the type.
24193 2018-03-09  Martin Sebor  <msebor@redhat.com>
24195         PR tree-optimization/84526
24196         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24197         Remove dead code.
24198         (builtin_access::generic_overlap): Be prepared to handle non-array
24199         base objects.
24201 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
24203         PR rtl-optimization/84682
24204         * lra-constraints.c (process_address_1): Check is_address flag
24205         for address constraints.
24206         (process_alt_operands): Likewise.
24207         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24208         preprocess_constraints.
24209         * recog.h (preprocess_constraints): Add oploc parameter.
24210         Adjust callers.
24211         * recog.c (preprocess_constraints): Test address_operand for
24212         CT_ADDRESS constraints.
24214 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
24216         PR target/83712
24217         * lra-assigns.c (assign_by_spills): Return a flag of reload
24218         assignment failure.  Do not process the reload assignment
24219         failures.  Do not spill other reload pseudos if they has the same
24220         reg class.
24221         (lra_assign): Add a return arg.  Set up from the result of
24222         assign_by_spills call.
24223         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24224         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
24225         usage_insns if it is not NULL.
24226         (spill_hard_reg_in_range): New function.
24227         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24228         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24229         function prototypes.
24230         (lra_assign): Change prototype.
24231         * lra.c (lra): Add code to deal with fails by splitting hard reg
24232         live ranges.
24234 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24236         PR target/83193
24237         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
24238         Accept complain bool parameter.  Only emit errors if it is true.
24239         (arm_parse_cpu_option_name): Likewise.
24240         (arm_target_thumb_only): Adjust callers of the above.
24241         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
24242         prototype to take a default true bool parameter.
24243         (arm_parse_arch_option_name): Likewise.
24245 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
24246             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
24248         PR jit/64089
24249         PR jit/84288
24250         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
24251         * configure: Regenerate.
24252         * configure.ac ("linker --version-script option"): New.
24253         ("linker soname option"): New.
24255 2018-03-09  Richard Biener  <rguenther@suse.de>
24257         PR tree-optimization/84775
24258         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
24259         immediate uses of predicate stmts and mark them modified.
24261         Revert
24262         PR tree-optimization/84178
24263         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24264         to caller.
24265         (version_loop_for_if_conversion): Delay update_ssa call.
24266         (tree_if_conversion): Delay update_ssa until after predicate
24267         insertion.
24269 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
24271         PR target/84763
24272         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
24273         when the function accesses prior frames.
24275 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
24277         PR debug/84456
24278         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
24279         gen_llsym, otherwise call maybe_gen_llsym.
24281         PR inline-asm/84742
24282         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
24283         has ',' character inside of it.
24285 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24287         PR target/84748
24288         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
24289         as clobbering CC_REGNUM.
24291 2018-03-08  Richard Biener  <rguenther@suse.de>
24293         PR middle-end/84552
24294         * tree-scalar-evolution.c: Include tree-into-ssa.h.
24295         (follow_copies_to_constant): Do not follow SSA names registered
24296         for update.
24298 2018-03-08  Richard Biener  <rguenther@suse.de>
24300         PR tree-optimization/84178
24301         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
24302         to caller.
24303         (version_loop_for_if_conversion): Delay update_ssa call.
24304         (tree_if_conversion): Delay update_ssa until after predicate
24305         insertion.
24307 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
24309         PR tree-optimization/84178
24310         * tree-if-conv.c (release_bb_predicate): Remove the
24311         the assertion that the stmts have NULL use_ops.
24312         Discard the statements, asserting that they haven't
24313         yet been added to a BB.
24315 2018-03-08  Richard Biener  <rguenther@suse.de>
24317         PR tree-optimization/84746
24318         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
24319         (phi_translate): Pass in destination ANTIC_OUT set.
24320         (phi_translate_1): Likewise.  For a simplified result lookup
24321         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
24322         (phi_translate_set): Adjust.
24323         (do_pre_regular_insertion): Likewise.
24324         (do_pre_partial_partial_insertion): Likewise.
24326 2018-03-08  Martin Liska  <mliska@suse.cz>
24328         PR gcov-profile/84735
24329         * doc/gcov.texi: Document usage of profile files.
24330         * gcov-io.h: Document changes in the format.
24332 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
24334         PR debug/84404
24335         PR debug/84408
24336         * dwarf2out.c (struct dw_line_info_table): Update comments for
24337         view == -1.
24338         (FORCE_RESET_NEXT_VIEW): New.
24339         (FORCE_RESETTING_VIEW_P): New.
24340         (RESETTING_VIEW_P): Check for -1 too.
24341         (ZERO_VIEW_P): Likewise.
24342         (new_line_info_table): Force-reset next view.
24343         (dwarf2out_begin_function): Likewise.
24344         (dwarf2out_source_line): Simplify zero_view_p initialization.
24345         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
24346         view directly.  Omit view when omitting .loc at line 0.
24348 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
24350         PR tree-optimization/84740
24351         * tree-switch-conversion.c (process_switch): Call build_constructors
24352         only if info.phi_count is non-zero.
24354         PR tree-optimization/84739
24355         * tree-tailcall.c (find_tail_calls): Check call arguments against
24356         DECL_ARGUMENTS (current_function_decl) rather than
24357         DECL_ARGUMENTS (func) when checking for tail recursion.
24359 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
24361         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
24362         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
24363         Volker Reichelt's entry and add entries for people that perform
24364         GCC fuzzy testing and report numerous bugs.
24366 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
24368         PR target/82411
24369         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
24370         readonly data in sdata, if that is disabled.
24371         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
24372         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
24373         -mreadonly-in-sdata option.
24375 2018-03-07  Martin Sebor  <msebor@redhat.com>
24377         PR tree-optimization/84468
24378         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
24379         basic block when looking for nul assignment.
24381 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
24383         PR target/84277
24384         * except.h (output_function_exception_table): Adjust prototype.
24385         * except.c (output_function_exception_table): Remove FNNAME parameter
24386         and add SECTION parameter.  Ouput one part of the table at a time.
24387         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
24388         the first part of the exception table and emit unwind directives.
24389         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
24390         (i386_pe_seh_cold_init): Likewise.
24391         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
24392         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
24393         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
24394         (ix86_output_call_insn): Emit a nop in one more case for SEH.
24395         * config/i386/winnt.c: Include except.h.
24396         (struct seh_frame_state): Add reg_offset, after_prologue and
24397         in_cold_section fields.
24398         (i386_pe_seh_end_prologue): Set seh->after_prologue.
24399         (i386_pe_seh_cold_init): New function.
24400         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
24401         to seh->in_cold_section.
24402         (seh_emit_push): Record the offset of the push.
24403         (seh_emit_save): Record the offet of the save.
24404         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
24405         Test seh->after_prologue to disregard the epilogue.
24406         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
24407         (i386_pe_end_cold_function): New function.
24409 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
24411         PR fortran/84565
24412         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
24413         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
24415         PR c++/84704
24416         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
24417         on tmp_var.
24418         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
24419         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
24421         PR middle-end/84723
24422         * multiple_target.c: Include tree-inline.h and intl.h.
24423         (expand_target_clones): Diagnose and fail if node->definition and
24424         !tree_versionable_function_p (node->decl).
24426 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
24428         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
24429         sprint_ul.
24430         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
24431         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
24432         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
24434 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
24436         PR target/84710
24437         * combine.c (try_combine): Use reg_or_subregno instead of handling
24438         just paradoxical SUBREGs and REGs.
24440 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
24442         * config/arc/arc.c (arc_finalize_pic): Remove function.
24443         (arc_must_save_register): We use single base PIC register, remove
24444         checks to save/restore the PIC register.
24445         (arc_expand_prologue): Likewise.
24446         * config/arc/arc-protos.h (arc_set_default_type_attributes):
24447         Remove.
24448         (arc_verify_short): Likewise.
24449         (arc_attr_type): Likewise.
24450         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
24451         (walk_stores): Likewise.
24452         (arc_address_cost): Make it static.
24453         (arc_verify_short): Likewise.
24454         (branch_dest): Likewise.
24455         (arc_attr_type): Likewise.
24456         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
24457         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
24458         (arc_final_prescan_insn): Remove inserting the nops due to
24459         hardware hazards.  It is done in reorg step.
24460         (insn_length_variant_t): Remove.
24461         (insn_length_parameters_t): Likewise.
24462         (arc_insn_length_parameters): Likewise.
24463         (arc_get_insn_variants): Likewise.
24464         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
24466 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
24468         PR inline-asm/84683
24469         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
24470         assertion failure.
24472         PR tree-optimization/84687
24473         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
24474         on new_node->decl.
24475         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
24477 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24479         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
24480         Rename to ppc_speculation_barrier.
24481         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
24482         __builtin_ppc_speculation_barrier.
24484 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
24486         PR target/84700
24487         * combine.c (combine_simplify_rtx): Don't try to simplify if
24488         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
24489         are equal to x.
24491 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
24493         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24494         to 32 bytes when compiling for POWER9.
24496 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
24498         PR target/84564
24499         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24500         regparm >= 3 with no arg reg available also for calls with
24501         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
24503         PR target/84524
24504         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24505         orig,vex.
24506         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
24508 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
24510         PR target/84264
24511         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24513 2018-03-05  Richard Biener  <rguenther@suse.de>
24515         PR tree-optimization/84486
24516         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24517         When inserting a __builtin_assume_aligned call set the LHS
24518         SSA name alignment info accordingly.
24520 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
24522         PR tree-optimization/84114
24523         * config/aarch64/aarch64.c (aarch64_reassociation_width)
24524         Avoid reassociation of FLOAT_MODE addition.
24526 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
24528         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24529         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24530         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24531         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24532         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24533         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24534         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24535         and -mwbnoinvd.
24536         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24537         __builtin_ia32_wbinvd): New builtins.
24538         (SPECIAL_ARGS2): New.
24539         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24540         (SPECIAL_ARGS2): New.
24541         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24542         (ix86_valid_target_attribute_inner_p): Ditto.
24543         (ix86_init_mmx_sse_builtins): Add special_args2.
24544         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24545         TARGET_WBNOINVD_P): New.
24546         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24547         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24548         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24549         * config/i386/immintrin.h (_wbinvd): New intrinsic.
24550         * config/i386/pconfigintrin.h: New file.
24551         * config/i386/wbnoinvdintrin.h: Ditto.
24552         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24553         wbnoinvdintrin.h.
24554         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24556 2018-03-05  Richard Biener  <rguenther@suse.de>
24558         PR tree-optimization/84670
24559         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24560         member.
24561         (BB_VISITED_WITH_VISITED_SUCCS): New define.
24562         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24563         (compute_antic_aux): Only assert the number of values in ANTIC_IN
24564         doesn't grow if all successors (recursively) were visited at least
24565         once.
24567 2018-03-05  Richard Biener  <rguenther@suse.de>
24569         PR tree-optimization/84650
24570         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24571         if executed in the loop pipeline.
24573 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
24575         * doc/configfiles.texi (Configuration Files): Move info about
24576         conditionalizing $target-protos.h to...
24577         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
24578         differs from $target-protos.h.
24580 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
24581             Chung-Ju Wu  <jasonwucj@gmail.com>
24583         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24584         * config/nds32/nds32-multiple.md (setmemsi): Define.
24585         * config/nds32/nds32-memory-manipulation.c
24586         (nds32_gen_dup_4_byte_to_word_value): New.
24587         (emit_setmem_word_loop): New.
24588         (emit_setmem_byte_loop): New.
24589         (nds32_expand_setmem_loop): New.
24590         (nds32_expand_setmem_loop_v3m): New.
24591         (nds32_expand_setmem_unroll): New.
24592         (nds32_expand_setmem): New.
24594 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24595             Chung-Ju Wu  <jasonwucj@gmail.com>
24597         * config/nds32/nds32-memory-manipulation.c
24598         (nds32_emit_load_store): New.
24599         (nds32_emit_post_inc_load_store): New.
24600         (nds32_emit_mem_move): New.
24601         (nds32_emit_mem_move_block): New.
24602         (nds32_expand_movmemsi_loop_unknown_size): New.
24603         (nds32_expand_movmemsi_loop_known_size): New.
24604         (nds32_expand_movmemsi_loop): New.
24605         (nds32_expand_movmemsi_unroll): New.
24606         (nds32_expand_movmemqi): Rename ...
24607         (nds32_expand_movmemsi): ... to this.
24608         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24609         (movmemsi): ... to this.
24610         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24611         (nds32_expand_movmemsi): ... to this.
24613 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24614             Monk Chiang  <sh.chiang04@gmail.com>
24615             Chung-Ju Wu  <jasonwucj@gmail.com>
24617         * config/nds32/nds32-protos.h
24618         (nds32_expand_load_multiple): New arguments.
24619         (nds32_expand_store_multiple): Ditto.
24620         (nds32_valid_multiple_load_store): Rename ...
24621         (nds32_valid_multiple_load_store_p): ... to this.
24622         * config/nds32/nds32-memory-manipulation.c
24623         (nds32_expand_load_multiple): Refine implementation.
24624         (nds32_expand_store_multiple): Ditto.
24625         * config/nds32/nds32-multiple.md
24626         (load_multiple): Update nds32_expand_load_multiple interface.
24627         (store_multiple): Update nds32_expand_store_multiple interface.
24628         * config/nds32/nds32-predicates.c
24629         (nds32_valid_multiple_load_store): Rename ...
24630         (nds32_valid_multiple_load_store_p): ... to this and refine
24631         implementation.
24632         * config/nds32/predicates.md
24633         (nds32_load_multiple_and_update_address_operation): New predicate.
24634         (nds32_store_multiple_and_update_address_operation): New predicate.
24636 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
24637             Chung-Ju Wu  <jasonwucj@gmail.com>
24639         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24640         (combo): New attribute.
24641         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24643 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
24645         * config/nds32/nds32.opt: Change -mcmodel= default value.
24647 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
24648             Monk Chiang  <sh.chiang04@gmail.com>
24649             Chung-Ju Wu  <jasonwucj@gmail.com>
24651         * config/nds32/constants.md (unspec_element): New enum.
24652         * config/nds32/constraints.md (Umw): New constraint.
24653         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24654         * config/nds32/nds32-intrinsic.md: Likewise.
24655         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24656         (nds32_valid_smw_lwm_base_p): New.
24657         (nds32_output_smw_single_word): New.
24658         (nds32_output_lmw_single_word): New.
24659         (nds32_expand_unaligned_load): New.
24660         (nds32_expand_unaligned_store): New.
24661         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24662         (nds32_output_smw_single_word): Declare.
24663         (nds32_output_lmw_single_word): Declare.
24664         (nds32_expand_unaligned_load): Declare.
24665         (nds32_expand_unaligned_store): Declare.
24666         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24667         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24668         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24669         NDS32_BUILTIN_UASTORE_DW.
24670         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24671         predicate.
24673 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
24674             Kito Cheng  <kito.cheng@gmail.com>
24675             Chung-Ju Wu  <jasonwucj@gmail.com>
24677         * config/nds32/nds32-intrinsic.c
24678         (nds32_expand_builtin_null_ftype_reg): Delete.
24679         (nds32_expand_builtin_reg_ftype_imm): Ditto.
24680         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24681         (nds32_read_argument): New.
24682         (nds32_legitimize_target): Ditto.
24683         (nds32_legitimize_argument): Ditto.
24684         (nds32_check_constant_argument): Ditto.
24685         (nds32_expand_unop_builtin): Ditto.
24686         (nds32_expand_unopimm_builtin): Ditto.
24687         (nds32_expand_binop_builtin): Ditto.
24688         (nds32_builtin_decl_impl): Ditto.
24689         (builtin_description): Ditto.
24690         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24691         (nds32_init_builtins_impl): Ditto.
24692         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24693         (nds32_builtin_decl): New.
24694         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24695         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24697 2018-03-02  Jeff Law  <law@redhat.com>
24699         * reorg.c (stop_search_p): Handle DEBUG_INSN.
24700         (redundant_insn, fill_simple_delay_slots): Likewise.
24701         (fill_slots_from_thread): Likewise.
24702         * resource.c (mark_referenced_resources): Likewise.
24703         (mark_set_resources, find_dead_or_set_registers): Likewise.
24705 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24707         * substring-locations.h (format_warning_va): Formatting fix for
24708         ATTRIBUTE_GCC_DIAG.
24709         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24710         argument.
24711         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24712         * substring-locations.c: Include intl.h.
24713         (format_warning_va): Turned into small wrapper around
24714         format_warning_n_va, renamed to ...
24715         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24716         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24717         use ngettext.
24718         (format_warning_at_substring_n): New function.
24719         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24720         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
24721         format_warning_at_substring with just a shorter name instead of
24722         const function pointer.
24723         (fmtwarn_n): New function.
24724         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24725         appropriate, get rid of all the fmtstr temporaries, move conditionals
24726         with G_() wrapped string literals directly into fmtwarn arguments,
24727         cast dir.len to (int), formatting fixes.
24729 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
24731         * doc/invoke.texi: Remove "Cilk Plus" references.
24733 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24734             Richard Biener  <rguenther@suse.de>
24736         PR ipa/84628
24737         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24738         for error or warning attributes if CALL_FROM_THUNK_P is set.
24739         Formatting fixes.
24741 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24743         PR target/56540
24744         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24745         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24747         PR target/56540
24748         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24749         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24751         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24752         instead of -1U in last predictors element's probability member.
24754 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
24756         PR ipa/83983
24757         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24758         arguments if they are comparable.
24760 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24762         PR tree-optimization/84634
24763         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24764         masks and masked_loop_p with a single loop_masks, making sure it's
24765         null for bb vectorization.
24767 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
24769         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24770         (vect_analyze_data_ref_access): Use loop->safe_len rather than
24771         loop->force_vectorize to check whether there is no alias.
24773 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
24775         PR target/84614
24776         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24777         prototypes.
24778         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24779         comments.
24780         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24781         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24782         instead of a loop around prev_real_insn.
24783         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24784         prev_real_insn.
24786         PR inline-asm/84625
24787         * config/i386/i386.c (ix86_print_operand): Use conditional
24788         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24789         zero vector.
24791 2018-03-02  Richard Biener  <rguenther@suse.de>
24793         PR tree-optimization/84427
24794         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24795         (bitmap_set_subtract_values): Rewrite to handle multiple
24796         exprs per value.
24797         (clean): Likewise.
24798         (prune_clobbered_mems): Likewise.
24799         (phi_translate): Take edge instead of pred/phiblock.
24800         (phi_translate_1): Likewise.
24801         (phi_translate_set): Likewise.  Insert all translated
24802         exprs for a value into the set, keeping possibly multiple
24803         expressions per value.
24804         (compute_antic_aux): Adjust for phi_translate changes.
24805         When intersecting union the expressions and prune those
24806         not in the final value set, keeping possibly multiple
24807         expressions per value.  Do not use value-insertion
24808         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24809         all expressions.  Add verification that the value-sets
24810         only shrink during iteration.
24811         (compute_partial_antic_aux): Adjust for the phi_translate changes.
24812         (do_pre_regular_insertion): Likewise.
24813         (do_pre_partial_partial_insertion): Likewise.
24815 2018-03-02  Richard Biener  <rguenther@suse.de>
24817         PR target/82005
24818         * config/darwin.c (saved_debug_info_level): New static global.
24819         (darwin_asm_lto_start): Disable debug info generation for LTO out.
24820         (darwin_asm_lto_end): Restore debug info generation settings.
24822 2018-03-01  Martin Liska  <mliska@suse.cz>
24824         PR sanitizer/82484
24825         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24826         volatile arguments.
24828 2018-03-01  Richard Biener  <rguenther@suse.de>
24830         PR debug/84645
24831         * dwarf2out.c (gen_variable_die): Properly handle late VLA
24832         type annotation with LTO when debug was disabled at compile-time.
24834 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
24836         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24837         XINT with INTVAL.
24838         (mips_final_postscan_insn): Likewise.
24840 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
24842         PR rtl-optimization/84528
24843         * alias.c (init_alias_target): Add commentary.
24844         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24845         a unique base value if the frame pointer is not eliminated
24846         to the stack pointer.
24848 2018-03-01  Tom de Vries  <tom@codesourcery.com>
24850         PR rtl-optimization/83327
24851         * lra-int.h (hard_regs_spilled_into): Declare.
24852         * lra.c (hard_regs_spilled_into): Define.
24853         (init_reg_info): Init hard_regs_spilled_into.
24854         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24855         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24856         (process_bb_lives): Handle hard_regs_spilled_into.
24857         (lra_create_live_ranges_1): Before doing liveness propagation, clear
24858         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24860 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
24862         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24863         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24864         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24865         * config/rs6000/aix72.h: New file.
24867 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
24869         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24870         instead of warning_at with conditional singular and plural messages
24871         where possible.
24873         PR target/52991
24874         * stor-layout.c (update_alignment_for_field): For
24875         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24876         && !DECL_PACKED (field), do the alignment update, just use
24877         only desired_align instead of MAX (type_align, desired_align)
24878         as the alignment.
24879         (place_field): Don't do known_align < desired_align handling
24880         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24881         is non-NULL, instead do it after rli->prev_field handling and
24882         only if not within a bitfield word.  For DECL_PACKED (field)
24883         use type_align of BITS_PER_UNIT.
24885 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
24887         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24888         superfluous parentheses and trailing spaces.
24890 2018-02-28  Richard Biener  <rguenther@suse.de>
24892         PR tree-optimization/84584
24893         * graphite-scop-detection.c (scop_detection::add_scop): Discard
24894         SCoPs with fake exit edge.
24896 2018-02-28  Martin Liska  <mliska@suse.cz>
24898         PR testsuite/84597
24899         * timevar.c (timer::print): Fix format to properly print 100%
24900         values.
24902 2018-02-28  Richard Biener  <rguenther@suse.de>
24904         PR middle-end/84607
24905         * genmatch.c (capture_info::walk_match): Do not mark
24906         captured expressions without operands as expr_p given
24907         they act more like predicates and should be subject to
24908         "lost tail" side-effect preserving.
24910 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
24912         PR rtl-optimization/81611
24913         * auto-inc-dec.c (attempt_change): Move dead note from
24914         mem_insn if it's the next use of regno
24915         (find_address): Take address use of reg holding
24916         non-incremented value.  Add parm to limit search to the named
24917         reg only.
24918         (merge_in_block): Attempt to use a mem insn that is the next
24919         use of the original regno.
24921 2018-02-27  Martin Sebor  <msebor@redhat.com>
24923         PR c++/83871
24924         * doc/invoke.texi (-Wmissing-attributes): New option.
24925         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24927 2018-02-27  Martin Sebor  <msebor@redhat.com>
24929         PR translation/84207
24930         * diagnostic-core.h (warning_n, error_n, inform_n): Change
24931         n argument to unsigned HOST_WIDE_INT.
24932         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24933         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
24934         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24935         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24937 2018-02-27  Richard Biener  <rguenther@suse.de>
24939         PR tree-optimization/84512
24940         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24941         Do not use the estimate returned from record_stmt_cost for
24942         the scalar iteration cost but sum properly using add_stmt_cost.
24944 2018-02-27  Richard Biener  <rguenther@suse.de>
24946         PR tree-optimization/84466
24947         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24948         Adjust last change to less strictly validate use operands.
24950 2018-02-27  Martin Liska  <mliska@suse.cz>
24952         PR gcov-profile/84548
24953         * gcov.c (process_file): Allow partial overlap and consider it
24954         also as group functions.
24955         (output_lines): Properly calculate range of lines for a group.
24957 2018-02-27  Martin Liska  <mliska@suse.cz>
24959         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24960         'ggc' suffixes.  Change first column width.
24961         (timer::print): Fix formatting of the column.
24963 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
24965         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24966         preserve inline entry blocks for the sake of debug inline
24967         entry point markers alone.
24968         (remove_unused_locals): Suggest in comments a better place to
24969         force the preservation of inline entry blocks that are
24970         otherwise unused, but do not preserve them.
24972 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24974         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24976 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
24978         PR target/84039
24979         * config/i386/constraints.md (Bs): Replace
24980         ix86_indirect_branch_register with
24981         TARGET_INDIRECT_BRANCH_REGISTER.
24982         (Bw): Likewise.
24983         * config/i386/i386.md (indirect_jump): Likewise.
24984         (tablejump): Likewise.
24985         (*sibcall_memory): Likewise.
24986         (*sibcall_value_memory): Likewise.
24987         Peepholes of indirect call and jump via memory: Likewise.
24988         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24989         (*sibcall_value_GOT_32): Likewise.
24990         * config/i386/predicates.md (indirect_branch_operand): Likewise.
24991         (GOT_memory_operand): Likewise.
24992         (call_insn_operand): Likewise.
24993         (sibcall_insn_operand): Likewise.
24994         (GOT32_symbol_operand): Likewise.
24995         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24997 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
24999         PR rtl-optimization/83496
25000         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
25001         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
25002         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
25003         redundant insn, if any.
25004         (relax_delay_slots): Likewise.
25005         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
25007 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
25009         PR tree-optimization/83965
25010         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
25011         that grouped statements are part of a reduction chain.  Return
25012         true if the statement is not marked as a reduction itself but
25013         is part of a group.
25014         (vect_recog_dot_prod_pattern): Don't check whether the statement
25015         is part of a group here.
25016         (vect_recog_sad_pattern): Likewise.
25017         (vect_recog_widen_sum_pattern): Likewise.
25019 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
25021         PR debug/84545
25022         * final.c (rest_of_clean_state): Also look for calls inside sequences.
25024 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
25026         PR target/84530
25027         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
25028         the bool argument.
25029         (ix86_output_indirect_function_return): New prototype.
25030         (ix86_split_simple_return_pop_internal): Likewise.
25031         * config/i386/i386.c (indirect_return_via_cx): New.
25032         (indirect_return_via_cx_bnd): Likewise.
25033         (indirect_thunk_name): Handle return va CX_REG.
25034         (output_indirect_thunk_function): Create alias for
25035         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
25036         (ix86_output_indirect_jmp): Remove the bool argument.
25037         (ix86_output_indirect_function_return): New function.
25038         (ix86_split_simple_return_pop_internal): Likewise.
25039         * config/i386/i386.md (*indirect_jump): Don't pass false
25040         to ix86_output_indirect_jmp.
25041         (*tablejump_1): Likewise.
25042         (simple_return_pop_internal): Change it to define_insn_and_split.
25043         Call ix86_split_simple_return_pop_internal to split it for
25044         -mfunction-return=.
25045         (simple_return_indirect_internal): Call
25046         ix86_output_indirect_function_return instead of
25047         ix86_output_indirect_jmp.
25049 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
25051         PR bootstrap/84405
25052         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
25053         memset and value initialization afterwards.
25055 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
25057         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
25059 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25061         PR target/84521
25062         * common/config/aarch64/aarch64-common.c
25063         (aarch_option_optimization_table[]): Switch
25064         off fomit-frame-pointer
25066 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
25067             Chung-Ju Wu  <jasonwucj@gmail.com>
25069         * config/nds32/nds32-multiple.md (load_multiple): Disallow
25070         volatile memory.
25071         (store_multiple): Ditto.
25073 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
25075         * config.gcc: Add --with-cpu support for nds32 target.
25076         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25077         * config/nds32/nds32.opt: Add -mcpu= option.
25079 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
25081         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25082         isel=yes): Warn for these deprecated options.
25084 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
25086         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25087         ISA_2_5_MASKS_EMBEDDED.
25089 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
25091         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25092         p->max as pointers rather than using iterative_hash_expr.
25094 2018-02-23  Carl Love  <cel@us.ibm.com>
25096         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25097         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25098         BU_P8V_OVERLOAD_2.
25099         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25100         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25101         P8V_BUILTIN_VEC_VUNSIGNED2.
25103 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
25105         PR target/81572
25106         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25107         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25108         LRA_UNKNOWN_ALT.
25109         * lra-constraints.c (curr_insn_transform): Set up
25110         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
25111         LRA_UNKNOWN_ALT.
25112         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25113         * lra-eliminations.c (spill_pseudos): Ditto.
25114         (process_insn_for_elimination): Ditto.
25115         * lra-lives.c (reg_early_clobber_p): Use the new macros.
25116         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25117         LRA_NON_CLOBBERED_ALT.
25119 2018-02-22  Martin Sebor  <msebor@redhat.com>
25121         PR tree-optimization/84480
25122         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25123         to maybe_diag_stxncpy_trunc.  Call it.
25124         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25125         from gimple_fold_builtin_strcpy.  Print inlining stack.
25126         (handle_builtin_stxncpy): Print inlining stack.
25127         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25129 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
25131         PR target/84176
25132         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25133         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25134         and -fcheck-pointer-bounds are used together.
25135         (indirect_thunk_prefix): New enum.
25136         (indirect_thunk_need_prefix): New function.
25137         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
25138         "_nt" instead of "_bnd" for NOTRACK prefix.
25139         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25140         (output_indirect_thunk_function): Likewise.
25141         (): Likewise.
25142         (ix86_code_end): Update output_indirect_thunk_function calls.
25143         (ix86_output_indirect_branch_via_reg): Replace
25144         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25145         (ix86_output_indirect_branch_via_push): Likewise.
25146         (ix86_output_function_return): Likewise.
25147         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25148         incompatible with -fcf-protection=branch and
25149         -fcheck-pointer-bounds.
25151 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
25153         PR target/83335
25154         * config/aarch64/aarch64.c (aarch64_print_address_internal):
25155         Change gcc_assert call to output_operand_lossage.
25157 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
25159         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25161 2018-02-22  DJ Delorie  <dj@redhat.com>
25162             Sebastian Perta  <sebastian.perta@renesas.com>
25163             Oleg Endo  <olegendo@gcc.gnu.org>
25165         * config/rx/rx.c (rx_rtx_costs): New function.
25166         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25168 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25170         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25172 2018-02-22  Martin Liska  <mliska@suse.cz>
25174         PR driver/83193
25175         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25176         Add "native" as a possible value.
25178 2018-02-22  Martin Liska  <mliska@suse.cz>
25180         PR driver/83193
25181         * config/i386/i386.c (ix86_option_override_internal):
25182         Add "native" as a possible value for -march and -mtune.
25184 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
25186         PR target/84502
25187         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25188         to all type variants.
25190         PR tree-optimization/84503
25191         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25192         width as info->bitpos + info->bitsize - start.
25193         (merged_store_group::merge_overlapping): Simplify width computation.
25194         (check_no_overlap): New function.
25195         (imm_store_chain_info::try_coalesce_bswap): Compute expected
25196         start + width and last_order of the group, fail if check_no_overlap
25197         fails.
25198         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25199         to group if check_no_overlap fails.
25201 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
25203         * config/rs6000/altivec.md: Delete contraint arguments to
25204         define_expand, define_split, and define_peephole2, and in
25205         define_insn_and_split if always unused.
25206         * config/rs6000/darwin.md: Ditto.
25207         * config/rs6000/dfp.md: Ditto.
25208         * config/rs6000/rs6000.md: Ditto.
25209         * config/rs6000/sync.md: Ditto.
25210         * config/rs6000/vector.md: Ditto.
25211         * config/rs6000/vsx.md: Ditto.
25213 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
25215         * config/rs6000/altivec.md: Write output control strings as braced
25216         blocks instead of double-quoted strings.
25217         * config/rs6000/darwin.md: Ditto.
25218         * config/rs6000/rs6000.md: Ditto.
25219         * config/rs6000/vector.md: Ditto.
25220         * config/rs6000/vsx.md: Ditto.
25222 2018-02-21  Jason Merrill  <jason@redhat.com>
25224         PR c++/84314 - ICE with templates and fastcall attribute.
25225         * attribs.c (build_type_attribute_qual_variant): Remove assert.
25227 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
25229         * ipa-cp.c (determine_versionability): Fix comment typos.
25231 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
25233         PR c/84229
25234         * ipa-cp.c (determine_versionability): Do not version functions caling
25235         va_arg_pack.
25237 2018-02-21  Martin Liska  <mliska@suse.cz>
25239         PR driver/83193
25240         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
25241         Add "native" as a possible value.
25242         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
25243         the macro when native cpu detection is available.
25245 2018-02-21  Martin Liska  <mliska@suse.cz>
25247         PR driver/83193
25248         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
25249         Add "native" as a possible value.
25250         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
25251         when native cpu detection is available.
25253 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
25254             Martin Sebor  <msebor@redhat.com>
25256         PR tree-optimization/84478
25257         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
25258         false.
25259         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
25260         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
25261         support which is conservatively correct, for 2 only stay conservative
25262         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
25263         argument to the 2 argument get_range_strlen, adjust 6 arg
25264         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
25265         false.
25266         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
25267         (gimple_fold_builtin_strlen): Pass true as last argument to
25268         get_range_strlen.
25270 2018-02-20  Martin Sebor  <msebor@redhat.com>
25272         PR middle-end/84095
25273         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
25274         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
25275         (builtin_memref::builtin_memref): Factor out parts into
25276         set_base_and_offset and call it.
25278 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
25280         PR middle-end/84406
25281         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
25282         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
25283         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
25284         search at the associated MODE_INT.
25286 2018-02-20  Jeff Law  <law@redhat.com>
25288         PR middle-end/82123
25289         PR tree-optimization/81592
25290         PR middle-end/79257
25291         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
25292         for range data rather than using global data.
25293         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
25294         range data rather than using global data.
25295         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
25296         pass it to children as needed.
25297         (struct directive::fmtresult): Similarly.
25298         (struct directive::set_width): Similarly.
25299         (struct directive::set_precision): Similarly.
25300         (format_integer, format_directive, parse_directive): Similarly.
25301         (format_none): Accept unnamed vr_values parameter.
25302         (format_percent, format_floating, format_character): Similarly.
25303         (format_string, format_plain): Similarly.
25304         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
25305         the EVRP range analyzer for range data rather than using global data.
25306         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
25307         gimple-ssa-evrp-analyze.h
25308         (class sprintf_dom_walker): Add after_dom_children member function.
25309         Add evrp_range_analyzer member.
25310         (sprintf_dom_walker::before_dom_children): Call into the EVRP
25311         range analyzer as needed.
25312         (sprintf_dom_walker::after_dom_children): New member function.
25313         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
25314         if not optimizing.
25315         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
25316         (evrp_range_analyzer::pop_to_marker): Likewise.
25318 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
25320         PR tree-optimization/84419
25321         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
25322         with the required type if its current type is compatible but
25323         different.
25325 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
25327         PR middle-end/82004
25328         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
25329         after vectorization.
25331 2018-02-20  Martin Liska  <mliska@suse.cz>
25333         PR driver/83193
25334         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
25335         possible values if we don't have a hint.
25337 2018-02-20  Martin Liska  <mliska@suse.cz>
25339         PR c/84310
25340         PR target/79747
25341         * final.c (shorten_branches): Build align_tab array with one
25342         more element.
25343         * opts.c (finish_options): Add alignment option limit check.
25344         (MAX_CODE_ALIGN): Likewise.
25345         (MAX_CODE_ALIGN_VALUE): Likewise.
25346         * doc/invoke.texi: Document maximum allowed option value for
25347         all -falign-* options.
25349 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
25351         PR target/84146
25352         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
25353         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
25354         * var-tracking.c (emit_note_insn_var_location): Remove all references
25355         to NOTE_INSN_CALL_ARG_LOCATION.
25356         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
25357         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
25358         Use copy_rtx_if_shared.
25359         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
25360         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
25361         (dwarf2out_var_location): Remove handling of
25362         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
25363         on call_insn.
25364         * final.c (final_scan_insn): Remove all references to
25365         NOTE_INSN_CALL_ARG_LOCATION.
25366         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
25367         before dumping final insns.
25368         * except.c (emit_note_eh_region_end): Remove all references to
25369         NOTE_INSN_CALL_ARG_LOCATION.
25370         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
25371         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
25372         * config/arc/arc.c (hwloop_optimize): Likewise.
25373         * config/arm/arm.c (create_fix_barrier): Likewise.
25374         * config/s390/s390.c (s390_chunkify_start): Likewise.
25375         * config/sh/sh.c (find_barrier): Likewise.
25376         * config/i386/i386.c (rest_of_insert_endbranch,
25377         ix86_seh_fixup_eh_fallthru): Likewise.
25378         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
25379         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
25380         * config/frv/frv.c (frv_function_prologue): Likewise.
25381         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
25382         reg note.
25383         (note_outside_basic_block_p): Remove all references to
25384         NOTE_INSN_CALL_ARG_LOCATION.
25385         * gengtype.c (adjust_field_rtx_def): Likewise.
25386         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
25387         Likewise.
25388         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
25389         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
25391         PR c++/84444
25392         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
25393         is ADDR_EXPR.
25395         PR tree-optimization/84452
25396         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
25397         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
25398         is NULL.
25400 2018-02-19  Martin Liska  <mliska@suse.cz>
25402         PR sanitizer/82183
25403         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
25405 2018-02-19  Martin Liska  <mliska@suse.cz>
25406             Richard Sandiford  <richard.sandiford@linaro.org>
25408         PR tree-optimization/82491
25409         * gimple-fold.c (get_base_constructor): Make earlier bail out
25410         to prevent ubsan.
25412 2018-02-19  Carl Love  <cel@us.ibm.com>
25414         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
25415         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
25416         BU_P8V_OVERLOAD_1.
25417         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
25418         P8V_BUILTIN_VEC_NEG.
25420 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
25422         * config/rl78/rl78.md (movdf): New define expand.
25424 2018-02-19  Martin Liska  <mliska@suse.cz>
25426         PR other/80589
25427         * doc/invoke.texi: Fix typo.
25428         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
25430 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
25432         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
25433         handle rs6000_single_float and rs6000_double_float specially for
25434         e500 family CPUs.
25436 2018-02-16  Jeff Law  <law@redhat.com>
25438         * config/rx/rx.c (add_pop_cfi_notes): New function.;
25439         (pop_regs): Use it.
25441 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
25443         PR ipa/84425
25444         * ipa-inline.c (inline_small_functions): Fix a typo.
25446 2018-02-16  Nathan Sidwell  <nathan@acm.org>
25448         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
25450 2018-02-16  Carl Love  <cel@us.ibm.com>
25452         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
25453         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
25454         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
25455         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
25456         expansion to P8V_BUILTIN_VEC_FLOAT2.
25458 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
25460         PR rtl-optimization/70023
25461         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
25462         src_regno into account.
25464 2018-02-16  Carl Love  <cel@us.ibm.com>
25466         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
25467         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
25468         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
25469         * config/rs6000/rs6000.c: Remove case statements for
25470         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
25471         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
25472         and P9V_BUILTIN_VEC_VINSERT4B.
25473         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
25474         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
25475         * config/rs6000/vsx.md:
25476         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
25477         vec_insert4b.
25479 2018-02-16  Carl Love  <cel@us.ibm.com>
25481         * config/rs6000/altivec.h: Add builtin names vec_extract4b
25482         vec_insert4b.
25483         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
25484         definitions.
25485         * config/rs6000/rs6000-c.c: Add the definitions for
25486         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
25487         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
25488         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
25489         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
25490         definition for insert4b and define insn *insert3b_internal.
25491         * doc/extend.texi: Add documentation for vec_extract4b.
25493 2018-02-16  Nathan Sidwell  <nathan@acm.org>
25495         * doc/extend.texi (Backwards Compatibility): Mention friend
25496         injection.  Note for-scope is deprecated.
25497         * doc/invoke.texi (-ffriend-injection): Deprecate.
25499 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
25501         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25502         that moved to I2, also allow destinations that are a paradoxical
25503         subreg (instead of a normal reg).
25505 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
25507         PR target/83831
25508         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25509         to QImode.
25511 2018-02-16  Richard Biener  <rguenther@suse.de>
25513         PR tree-optimization/84037
25514         PR tree-optimization/84016
25515         PR target/82862
25516         * config/i386/i386.c (ix86_builtin_vectorization_cost):
25517         Adjust vec_construct for the fact we need additional higher latency
25518         128bit inserts for AVX256 and AVX512 vector builds.
25519         (ix86_add_stmt_cost): Scale vector construction cost for
25520         elementwise loads.
25522 2018-02-16  Richard Biener  <rguenther@suse.de>
25524         PR tree-optimization/84417
25525         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25526         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25527         (non_rewritable_lvalue_p): Likewise, use poly-ints.
25529 2018-02-16  Martin Liska  <mliska@suse.cz>
25531         PR sanitizer/84307
25532         * internal-fn.def (ASAN_CHECK): Set proper flags.
25533         (ASAN_MARK): Likewise.
25535 2018-02-16  Julia Koval  <julia.koval@intel.com>
25537         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25538         from PTA_CANNONLAKE.
25540 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
25542         PR target/84272
25543         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25544         Use ++iter rather than iter++ for std::list iterators.
25545         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
25546         defer deleting them until all nodes in the forest are processed.  Do
25547         free even leaf nodes.  Change to_process into auto_vec.
25549         PR bootstrap/84405
25550         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25551         * vec.h (vec_default_construct): Use memset instead of placement new
25552         if BROKEN_VALUE_INITIALIZATION is defined.
25553         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25554         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25555         is defined.
25557         PR rtl-optimization/83723
25558         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25559         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
25560         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
25561         recursive calls.
25562         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25563         callers.
25564         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25566 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
25568         PR rtl-optimization/81443
25569         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25570         from inner REGs to paradoxical SUBREGs.
25572 2018-02-16  Richard Biener  <rguenther@suse.de>
25574         PR tree-optimization/84399
25575         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25576         For operands we can analyze at their definition make sure we can
25577         analyze them at each use as well.
25579 2018-02-16  Richard Biener  <rguenther@suse.de>
25581         PR tree-optimization/84190
25582         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25583         volatile accesses if the decl isn't volatile.
25585 2018-02-15  Jason Merrill  <jason@redhat.com>
25587         PR c++/84314 - ICE with templates and fastcall attribute.
25588         * attribs.c (build_type_attribute_qual_variant): Don't clobber
25589         TYPE_CANONICAL on an existing type.
25591 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
25593         PR tree-optimization/84383
25594         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25595         dstoff nor call operand_equal_p if dstbase is NULL.
25597         PR tree-optimization/84334
25598         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25599         also a CONSTANT_CLASS_P, punt.
25601 2018-02-14  Jim Wilson  <jimw@sifive.com>
25603         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25604         first SMALL_OPERAND check.  New local min_second_step.  Move assert
25605         to where locals are set.  Add TARGET_RVC support.
25606         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25608 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
25610         * doc/invoke.texi: Correct -Wformat-overflow code sample.
25612 2018-02-14  Martin Sebor  <msebor@redhat.com>
25614         PR tree-optimization/83698
25615         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25616         arrays constrain the offset range to their bounds.
25617         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25618         (builtin_access::overlap): Avoid setting the size of overlap if it's
25619         already been set.
25620         (maybe_diag_overlap): Also consider arrays when deciding what values
25621         of offsets to include in diagnostics.
25623 2018-02-14  Martin Sebor  <msebor@redhat.com>
25625         PR c/84108
25626         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25627         that correspond to the kind of a declaration.
25629 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
25631         PR target/83984
25632         * config/pa/pa.md: Load address of PIC label using the linkage table
25633         if the label is nonlocal.
25635 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
25637         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25638         warning message if user requests -maltivec=be.
25639         * doc/invoke.texi: Document deprecation of -maltivec=be.
25641 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
25643         PR target/84220
25644         * config/rs6000/rs6000-c.c: Update definitions for
25645         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25646         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25648 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25650         PR target/84239
25651         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25652         add _get_ssp intrinsics. Remove argument from
25653         __builtin_ia32_rdssp[d|q].
25654         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25655         * config/i386/i386-builtin.def: Remove argument from
25656         __builtin_ia32_rdssp[d|q].
25657         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25658         ix86_expand_special_args_builtin for _rdssp[d|q].
25659         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25660         Clear register before usage.
25661         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25662         Add documentation for new _get_ssp and _inc_ssp intrinsics.
25664 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
25666         PR tree-optimization/84357
25667         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25668         operand 1 of an ARRAY_REF too.
25670 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
25672         PR target/83831
25673         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25674         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25675         declarations.
25676         (set_of_reg): New struct.
25677         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25678         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25679         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25680         functions.
25681         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25682         Split into bitclr, bitset, bitinvert patterns if appropriate.
25683         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25684         use rx_fuse_in_memory_bitop.
25685         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25686         to named insn, correct maximum insn length.
25688 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
25690         PR target/79242
25691         * machmode.def: Define a complex mode for PARTIAL_INT.
25692         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25693         MODE_PARTIAL_INT.
25694         * doc/rtl.texi: Document CSPImode.
25695         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25696         handling.
25697         (msp430_hard_regno_nregs_with_padding): Likewise.
25699 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
25701         PR target/84279
25702         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25704 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
25706         PR rtl-optimization/84169
25707         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
25708         we generated a parallel as new i3 and we split that to new i2 and i3
25709         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
25710         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
25711         those to i2, not i1.  Partially rewrite this scan code.
25713 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25715         PR c/82210
25716         * stor-layout.c (place_field): For variable length fields, adjust
25717         offset_align afterwards not just based on the field's alignment,
25718         but also on the size.
25720         PR middle-end/84309
25721         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25722         of exps and logs in the use_exp2 case.
25724 2018-02-13  Jeff Law  <law@redhat.com>
25726         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25727         entry for "vector".
25729         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25730         ARGS as unused.
25732 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
25734         PR debug/84342
25735         PR debug/84319
25736         * common.opt (gas-loc-support, gas-locview-support): New.
25737         (ginline-points, ginternal-reset-location-views): New.
25738         * doc/invoke.texi: Document them.  Use @itemx where intended.
25739         (gvariable-location-views): Adjust.
25740         * target.def (reset_location_view): New.
25741         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25742         (TARGET_RESET_LOCATION_VIEW): New.
25743         * doc/tm.texi: Rebuilt.
25744         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25745         (dwarf2out_default_as_locview_support): New.
25746         (output_asm_line_debug_info): Use option variables.
25747         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25748         (output_loc_list): Likewise.
25749         (add_high_low_attributes): Check option variables.
25750         Don't output entry view attribute in strict mode.
25751         (gen_inlined_subroutine_die): Check option variables.
25752         (dwarf2out_inline_entry): Likewise.
25753         (init_sections_and_labels): Likewise.
25754         (dwarf2out_early_finish): Likewise.
25755         (maybe_reset_location_view): New, from...
25756         (dwarf2out_var_location): ... here.  Call it.
25757         * debug.h (dwarf2out_default_as_loc_support): Declare.
25758         (dwarf2out_default_as_locview_support): Declare.
25759         * hooks.c (hook_int_rtx_insn_0): New.
25760         * hooks.h (hook_int_rtx_insn_0): Declare.
25761         * toplev.c (process_options): Take -gas-loc-support and
25762         -gas-locview-support from dwarf2out.  Enable
25763         -gvariable-location-views by default only with locview
25764         assembler support.  Enable -ginternal-reset-location-views by
25765         default only if the target defines the corresponding hook.
25766         Enable -ginline-points by default if location views are
25767         enabled; force it disabled if statement frontiers are
25768         disabled.
25769         * tree-inline.c (expand_call_inline): Check option variables.
25770         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25772 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
25774         PR tree-optimization/84321
25775         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25776         handling.  Also check whether the anti-range contains any values
25777         that satisfy the mask; switch to a VR_RANGE if not.
25779 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
25781         PR sanitizer/84340
25782         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25784 2018-02-13  Martin Jambor  <mjambor@suse.cz>
25786         PR c++/83990
25787         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25788         of call statements, also set location of a load to a temporary.
25790 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
25792         * config/rl78/rl78.c (add_vector_labels): New function.
25793         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25794         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25795         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25796         which checks that no arguments are passed.
25797         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25798         * doc/extend.texi: Documentation for the new attribute.
25800 2018-02-13  Andreas Schwab  <schwab@suse.de>
25802         * config/riscv/linux.h (CPP_SPEC): Define.
25804 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
25806         PR target/84335
25807         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25808         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25809         OPTION_MASK_ISA_AES as first argument to def_builtin_const
25810         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25811         instead of OPTION_MASK_ISA_PCLMUL as first argument to
25812         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25813         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25814         temporarily for AES and PCLMUL builtins.
25816         PR tree-optimization/84339
25817         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25818         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25819         Formatting fixes.
25821         PR middle-end/84309
25822         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25823         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25824         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25825         inline function.
25826         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25827         inline function.
25828         * omp-simd-clone.h: New file.
25829         * omp-simd-clone.c: Include omp-simd-clone.h.
25830         (expand_simd_clones): No longer static.
25831         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25832         cgraph.h and omp-simd-clone.h.
25833         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25834         (vect_recog_widen_shift_pattern): Formatting fix.
25835         (vect_pattern_recog_1): Don't check optab for calls.
25837         PR target/84336
25838         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25839         operands[2] into a REG before using gen_lowpart on it.
25841 2018-02-12  Jeff Law  <law@redhat.com>
25843         PR target/83760
25844         * config/sh/sh.c (find_barrier): Consider a sibling call
25845         a barrier as well.
25847         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25848         successfully back substituting a reg.
25850 2018-02-12  Richard Biener  <rguenther@suse.de>
25852         PR tree-optimization/84037
25853         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25854         parameter, move visited init to caller.
25855         (vect_slp_analyze_operations): Separate cost from validity
25856         check, initialize visited once for all instances.
25857         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25858         for all instances.
25859         * tree-vect-stmts.c (vect_model_simple_cost): Make early
25860         out an assert.
25861         (vect_model_promotion_demotion_cost): Likewise.
25862         (vectorizable_bswap): Guard cost modeling with !slp_node
25863         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25864         SLP stmts.
25865         (vectorizable_call): Likewise.
25866         (vectorizable_conversion): Likewise.
25867         (vectorizable_assignment): Likewise.
25868         (vectorizable_shift): Likewise.
25869         (vectorizable_operation): Likewise.
25870         (vectorizable_store): Likewise.
25871         (vectorizable_load): Likewise.
25872         (vectorizable_condition): Likewise.
25873         (vectorizable_comparison): Likewise.
25875 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
25877         PR sanitizer/84307
25878         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25879         (ASAN_MARK): Fix fnspec to account for return value, change pointer
25880         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25882 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25884         PR middle-end/83665
25885         * params.def (inline-min-speedup): Increase from 8 to 15.
25886         (max-inline-insns-auto): Decrease from 40 to 30.
25887         * ipa-split.c (consider_split): Add some buffer for function to
25888         be considered inlining candidate.
25889         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25890         default values.
25892 2018-02-12  Richard Biener  <rguenther@suse.de>
25894         PR tree-optimization/84037
25895         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25896         matched stmts if we cannot swap the non-matched ones.
25898 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25900         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25901         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25902         _mm_maskz_scalef_round_ss): New intrinsics.
25903         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25904         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25905         __builtin_ia32_scalefss_round): Remove.
25906         (__builtin_ia32_scalefsd_mask_round,
25907         __builtin_ia32_scalefss_mask_round): New intrinsics.
25908         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25909         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25910         ((match_operand:VF_128 2 "<round_nimm_predicate>"
25911         "<round_constraint>")): Changed to ...
25912         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25913         "<round_scalar_constraint>")): ... this.
25914         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25915         %0, %1, %2<round_op3>}"): Changed to ...
25916         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25917         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25918         %2<round_scalar_mask_op3>}"): ... this.
25919         * config/i386/subst.md (round_scalar_nimm_predicate): New.
25921 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
25923         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25924         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25925         (_mm_maskz_sqrt_round_ss): New intrinsics.
25926         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25927         (__builtin_ia32_sqrtsd_mask_round)
25928         (__builtin_ia32_sqrtss_mask_round): New builtins.
25929         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25930         (__builtin_ia32_sqrtss_round): Remove.
25931         (__builtin_ia32_sqrtsd_mask_round)
25932         (__builtin_ia32_sqrtss_mask_round): New builtins.
25933         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25934         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25935         ((match_operand:VF_128 1 "vector_operand"
25936         "xBm,<round_constraint>")): Changed to ...
25937         ((match_operand:VF_128 1 "vector_operand"
25938         "xBm,<round_scalar_constraint>")): ... this.
25939         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25940         %0, %2, %<iptr>1<round_op3>}): Changed to ...
25941         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25942         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25943         %<iptr>1<round_scalar_mask_op3>}): ... this.
25944         ((set_attr "prefix" "<round_prefix>")): Changed to ...
25945         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25947 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
25949         PR target/84266
25950         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25951         Cast vec_cmpeq result to correct type.
25952         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25953         Cast vec_cmpgt result to correct type.
25955 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
25957         * final.c (final_scan_insn_1): Renamed from...
25958         (final_scan_insn): ... this.  New wrapper, to recover
25959         seen from the outermost call in recursive ones.
25960         * config/sparc/sparc.c (output_return): Drop seen from call.
25961         (output_sibcall): Likewise.
25962         * config/visium/visium.c (output_branch): Likewise.
25964 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
25966         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25967         function label.
25969 2018-02-10  Alan Modra  <amodra@gmail.com>
25971         PR target/84300
25972         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25973         Specify LR as an input.
25975 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
25977         PR sanitizer/83987
25978         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25979         remove_member_access_dummy_vars): New functions.
25980         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25981         lower_omp_1, execute_lower_omp): Use them.
25983         PR rtl-optimization/84308
25984         * shrink-wrap.c (spread_components): Release todo vector.
25986 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
25988         PR rtl-optimization/57193
25989         * ira-color.c (struct allocno_color_data): Add member
25990         conflict_allocno_hard_prefs.
25991         (update_conflict_allocno_hard_prefs): New.
25992         (bucket_allocno_compare_func): Add a preference based on
25993         conflict_allocno_hard_prefs.
25994         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25995         (color_allocnos): Remove a dead code.  Initiate
25996         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
25998 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
26000         PR target/84226
26001         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
26002         constraint from =wa to wa.  Avoid a subreg on the output operand,
26003         instead use a pseudo and subreg it in a move.
26004         (p9_xxbrd_<mode>): Changed to ...
26005         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
26006         (p9_xxbrd_v2df): New expander.
26007         (p9_xxbrw_<mode>): Changed to ...
26008         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
26009         (p9_xxbrw_v4sf): New expander.
26011 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
26013         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
26015 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
26017         PR target/83926
26018         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
26019         multiply in 32-bit mode.
26020         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
26021         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
26022         mode.
26024 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
26026         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
26027         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
26028         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
26029         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
26031 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
26033         PR lto/84213
26034         * dwarf2out.c (is_trivial_indirect_ref): New function.
26035         (dwarf2out_late_global_decl): Do not generate a location
26036         attribute for variables that have a non-trivial DECL_VALUE_EXPR
26037         and that are not defined in the current unit.
26039 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
26041         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
26042         instead of a libcall for UNORDERED.
26044 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
26046         PR target/82641
26047         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
26048         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
26050 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26052         PR target/PR84295
26053         * config/s390/s390.c (s390_set_current_function): Invoke
26054         s390_indirect_branch_settings also if fndecl didn't change.
26056 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
26058         * config/rs6000/rs6000.md (blockage): Set length to zero.
26060 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
26062         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26064 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
26066         PR sanitizer/84285
26067         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26068         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26069         -static-lib*san.
26071         PR debug/84252
26072         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26073         PARALLEL incoming that failed vt_get_decl_and_offset check.
26075         PR middle-end/84237
26076         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26077         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26078         TREE_READONLY bit.
26079         (get_variable_section): For decls in named .bss* sections pass true as
26080         second argument to bss_initializer_p.
26082 2018-02-09  Marek Polacek  <polacek@redhat.com>
26083             Jakub Jelinek  <jakub@redhat.com>
26085         PR c++/83659
26086         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26087         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
26088         Sync some changes from cxx_fold_indirect_ref.
26090 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
26092         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26093         markers.
26094         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26095         (BLOCK_INLINE_ENTRY_LABEL): New.
26096         (dwarf2out_var_location): Disregard inline entry markers.
26097         (inline_entry_data): New struct.
26098         (inline_entry_data_hasher): New hashtable type.
26099         (inline_entry_data_hasher::hash): New.
26100         (inline_entry_data_hasher::equal): New.
26101         (inline_entry_data_table): New variable.
26102         (add_high_low_attributes): Add DW_AT_entry_pc and
26103         DW_AT_GNU_entry_view attributes if a pending entry is found
26104         in inline_entry_data_table.  Add old entry_pc attribute only
26105         if debug nonbinding markers are disabled.
26106         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26107         markers are enabled.
26108         (block_within_block_p, dwarf2out_inline_entry): New.
26109         (dwarf2out_finish): Check that no entries remained in
26110         inline_entry_data_table.
26111         * final.c (reemit_insn_block_notes): Handle inline entry notes.
26112         (final_scan_insn, notice_source_line): Likewise.
26113         (rest_of_clean_state): Skip inline entry markers.
26114         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26115         markers.
26116         * gimple.c (gimple_build_debug_inline_entry): New.
26117         * gimple.h (enum gimple_debug_subcode): Add
26118         GIMPLE_DEBUG_INLINE_ENTRY.
26119         (gimple_build_debug_inline_entry): Declare.
26120         (gimple_debug_inline_entry_p): New.
26121         (gimple_debug_nonbind_marker_p): Adjust.
26122         * insn-notes.def (INLINE_ENTRY): New.
26123         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26124         inline entry marker notes.
26125         (print_insn): Likewise.
26126         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26127         (INSN_DEBUG_MARKER_KIND): Likewise.
26128         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26129         * tree-inline.c (expand_call_inline): Build and insert
26130         debug_inline_entry stmt.
26131         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26132         inline entry blocks early, if nonbind markers are enabled.
26133         (dump_scope_block): Dump fragment info.
26134         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26135         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26136         (gimple_build_debug_inline_entry): New.
26137         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26138         Enable/disable inline entry points too.
26139         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26140         (DEBUG_INSN): Describe inline entry markers.
26142         * common.opt (gvariable-location-views): New.
26143         (gvariable-location-views=incompat5): New.
26144         * config.in: Rebuilt.
26145         * configure: Rebuilt.
26146         * configure.ac: Test assembler for view support.
26147         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26148         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26149         * dwarf2out.c (var_loc_view): New typedef.
26150         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26151         (dwarf2out_locviews_in_attribute): New.
26152         (dwarf2out_locviews_in_loclist): New.
26153         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26154         (enum dw_line_info_opcode): Add LI_adv_address.
26155         (struct dw_line_info_table): Add view.
26156         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26157         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26158         (zero_view_p): New variable.
26159         (ZERO_VIEW_P): New macro.
26160         (output_asm_line_debug_info): New.
26161         (struct var_loc_node): Add view.
26162         (add_AT_view_list, AT_loc_list): New.
26163         (add_var_loc_to_decl): Add view param.  Test it against last.
26164         (new_loc_list): Add view params.  Record them.
26165         (AT_loc_list_ptr): Handle loc and view lists.
26166         (view_list_to_loc_list_val_node): New.
26167         (print_dw_val): Handle dw_val_class_view_list.
26168         (size_of_die): Likewise.
26169         (value_format): Likewise.
26170         (loc_list_has_views): New.
26171         (gen_llsym): Set vl_symbol too.
26172         (maybe_gen_llsym, skip_loc_list_entry): New.
26173         (dwarf2out_maybe_output_loclist_view_pair): New.
26174         (output_loc_list): Output view list or entries too.
26175         (output_view_list_offset): New.
26176         (output_die): Handle dw_val_class_view_list.
26177         (output_dwarf_version): New.
26178         (output_compilation_unit_header): Use it.
26179         (output_skeleton_debug_sections): Likewise.
26180         (output_rnglists, output_line_info): Likewise.
26181         (output_pubnames, output_aranges): Update version comments.
26182         (output_one_line_info_table): Output view numbers in asm comments.
26183         (dw_loc_list): Determine current endview, pass it to new_loc_list.
26184         Call maybe_gen_llsym.
26185         (loc_list_from_tree_1): Adjust.
26186         (add_AT_location_description): Create view list attribute if
26187         needed, check it's absent otherwise.
26188         (convert_cfa_to_fb_loc_list): Adjust.
26189         (maybe_emit_file): Call output_asm_line_debug_info for test.
26190         (dwarf2out_var_location): Reset views as needed.  Precompute
26191         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
26192         attribute.  Set view.
26193         (new_line_info_table): Reset next view.
26194         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26195         (dwarf2out_source_line): Likewise.  Output view resets and labels to
26196         the assembler, or select appropriate line info opcodes.
26197         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26198         (optimize_string_length): Catch it.  Adjust.
26199         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
26200         dw_val_class_view_list, and remove it if no longer needed.
26201         (hash_loc_list): Hash view numbers.
26202         (loc_list_hasher::equal): Compare them.
26203         (optimize_location_lists): Check whether a view list symbol is
26204         needed, and whether the locview attribute is present, and
26205         whether they match.  Remove the locview attribute if no longer
26206         needed.
26207         (index_location_lists): Call skip_loc_list_entry for test.
26208         (dwarf2out_finish): Call output_asm_line_debug_info for test.
26209         Use output_dwarf_version.
26210         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26211         (struct dw_val_node): Add val_view_list.
26212         * final.c (SEEN_NEXT_VIEW): New.
26213         (set_next_view_needed): New.
26214         (clear_next_view_needed): New.
26215         (maybe_output_next_view): New.
26216         (final_start_function): Rename to...
26217         (final_start_function_1): ... this.  Take pointer to FIRST,
26218         add SEEN parameter.  Emit param bindings in the initial view.
26219         (final_start_function): Reintroduce SEEN-less interface.
26220         (final): Rename to...
26221         (final_1): ... this.  Take SEEN parameter.  Output final pending
26222         next view at the end.
26223         (final): Reintroduce seen-less interface.
26224         (final_scan_insn): Output pending next view before switching
26225         sections or ending a block.  Mark the next view as needed when
26226         outputting variable locations.  Notify debug backend of section
26227         changes, and of location view changes.
26228         (rest_of_handle_final): Adjust.
26229         * toplev.c (process_options): Autodetect value for debug variable
26230         location views option.  Warn on incompat5 without -gdwarf-5.
26231         * doc/invoke.texi (gvariable-location-views): New.
26232         (gvariable-location-views=incompat5): New.
26233         (gno-variable-location-views): New.
26235 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
26237         PR tree-optimization/84136
26238         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
26239         that the result of find_edge is non-NULL.
26241 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
26243         PR target/83008
26244         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
26245         storing integer register in SImode.  Fix cost of 256 and 512
26246         byte aligned SSE register store.
26248 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
26250         * config/i386/i386.c (ix86_multiplication_cost): Fix
26251         multiplication cost for TARGET_AVX512DQ.
26253 2018-02-08  Marek Polacek  <polacek@redhat.com>
26255         PR tree-optimization/84238
26256         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
26257         get_range_strlen.
26259 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
26261         PR tree-optimization/84265
26262         * tree-vect-stmts.c (vectorizable_store): Don't treat
26263         VMAT_CONTIGUOUS accesses as grouped.
26264         (vectorizable_load): Likewise.
26266 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
26268         PR tree-optimization/81635
26269         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
26270         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
26271         (test_round_for_mask): New functions.
26272         (wide_int_cc_tests): Call test_round_for_mask.
26273         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
26274         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
26275         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
26276         range returned by get_range_info.
26278 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
26280         PR ipa/81360
26281         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
26282         * symtab.c: Include builtins.h
26283         (symtab_node::output_to_lto_symbol_table_p): Move here
26284         from lto-streamer-out.c:output_symbol_p.
26285         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
26286         (output_symbol_p): Move all logic to symtab.c
26287         (produce_symtab): Update.
26289 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26291         * config/s390/s390-opts.h (enum indirect_branch): Define.
26292         * config/s390/s390-protos.h (s390_return_addr_from_memory)
26293         (s390_indirect_branch_via_thunk)
26294         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
26295         (enum s390_indirect_branch_type): Define.
26296         * config/s390/s390.c (struct s390_frame_layout, struct
26297         machine_function): Remove.
26298         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
26299         (indirect_branch_table_label_no, indirect_branch_table_name):
26300         Define variables.
26301         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
26302         (enum s390_indirect_branch_option): Define.
26303         (s390_return_addr_from_memory): New function.
26304         (s390_handle_string_attribute): New function.
26305         (s390_attribute_table): Add new attribute handler.
26306         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
26307         (s390_indirect_branch_via_thunk): New function.
26308         (s390_indirect_branch_via_inline_thunk): New function.
26309         (s390_function_ok_for_sibcall): When jumping via thunk disallow
26310         sibling call optimization for non z10 compiles.
26311         (s390_emit_call): Force indirect branch target to be a single
26312         register.  Add r1 clobber for non-z10 compiles.
26313         (s390_emit_epilogue): Emit return jump via return_use expander.
26314         (s390_reorg): Handle JUMP_INSNs as execute targets.
26315         (s390_option_override_internal): Perform validity checks for the
26316         new command line options.
26317         (s390_indirect_branch_attrvalue): New function.
26318         (s390_indirect_branch_settings): New function.
26319         (s390_set_current_function): Invoke s390_indirect_branch_settings.
26320         (s390_output_indirect_thunk_function):  New function.
26321         (s390_code_end): Implement target hook.
26322         (s390_case_values_threshold): Implement target hook.
26323         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
26324         macros.
26325         * config/s390/s390.h (struct s390_frame_layout)
26326         (struct machine_function): Move here from s390.c.
26327         (TARGET_INDIRECT_BRANCH_NOBP_RET)
26328         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
26329         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
26330         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
26331         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
26332         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
26333         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
26334         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
26335         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
26336         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
26337         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
26338         (mnemonic attribute): Add values which aren't recognized
26339         automatically.
26340         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
26341         pattern for branch conversion.  Fix mnemonic attribute.
26342         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
26343         indirect branch via thunk if requested.
26344         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
26345         ("*indirect_jump"): Disable for branch conversion using out of
26346         line thunks.
26347         ("indirect_jump_via_thunk<mode>_z10")
26348         ("indirect_jump_via_thunk<mode>")
26349         ("indirect_jump_via_inlinethunk<mode>_z10")
26350         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
26351         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
26352         ("casesi_jump_via_inlinethunk<mode>_z10")
26353         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
26354         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
26355         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
26356         ("*indirect2_jump"): Disable for branch conversion.
26357         ("casesi_jump"): Turn into expander and expand patterns for branch
26358         conversion.
26359         ("return_use"): New expander.
26360         ("*return"): Emit return via thunk and rename it to ...
26361         ("*return<mode>"): ... this one.
26362         * config/s390/s390.opt: Add new options and and enum for the
26363         option values.
26365 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
26367         * lra-constraints.c (match_reload): Unconditionally use
26368         gen_lowpart_SUBREG, rather than selecting between that
26369         and equivalent gen_rtx_SUBREG code.
26371 2018-02-08  Richard Biener  <rguenther@suse.de>
26373         PR tree-optimization/84233
26374         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
26375         changed flag instead of boguously re-using phi_inserted.
26377 2018-02-08  Martin Jambor  <mjambor@suse.cz>
26379         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
26380         static local variables.
26382 2018-02-08  Richard Biener  <rguenther@suse.de>
26384         PR tree-optimization/84278
26385         * tree-vect-stmts.c (vectorizable_store): When looking for
26386         smaller vector types to perform grouped strided loads/stores
26387         make sure the mode is supported by the target.
26388         (vectorizable_load): Likewise.
26390 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
26392         * config/aarch64/aarch64.c (aarch64_components_for_bb):
26393         Increase LDP/STP opportunities by adding adjacent callee-saves.
26395 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
26397         PR rtl-optimization/84068
26398         PR rtl-optimization/83459
26399         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
26401 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
26403         PR tree-optimization/84224
26404         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
26405         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
26406         non-zero arguments.
26408 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
26410         PR target/84113
26411         * config/rs6000/altivec.md (*restore_world): Remove LR use.
26412         * config/rs6000/predicates.md (restore_world_operation): Adjust op
26413         count, remove one USE.
26415 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
26417         * doc/install.texi (Configuration): Document the
26418         --with-long-double-format={ibm,ieee} PowerPC configuration
26419         options.
26421         PR target/84154
26422         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
26423         Convert from define_expand to be define_insn_and_split.  Rework
26424         float/double/_Float128 conversions to QI/HI/SImode to work with
26425         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
26426         conversions to QI/HImode types did a store and then a load to
26427         truncate the value.  For conversions to VSX registers, don't split
26428         the insn, instead emit the code directly.  Use the code iterator
26429         any_fix to combine signed and unsigned conversions.
26430         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
26431         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
26432         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26433         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
26434         (fix_<mode>di2_hw): Likewise.
26435         (fixuns_<mode>di2_hw): Likewise.
26436         (fix_<mode>si2_hw): Likewise.
26437         (fixuns_<mode>si2_hw): Likewise.
26438         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
26439         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
26440         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
26441         fix<uns>_trunc<SFDF:mode>si2_p8.
26442         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
26443         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
26444         (fix<uns>_<mode>_mem): Likewise.
26445         (fctiw<u>z_<mode>_mem): Likewise.
26446         (fix<uns>_<mode>_mem): Likewise.
26447         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
26448         the register allocator from doing a direct move to the GPRs to do
26449         a store, and instead use the ISA 3.0 store byte/half-word from
26450         vector register instruction.  For IEEE 128-bit floating point,
26451         also optimize stores of 32-bit ints.
26452         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
26454 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
26456         * genextract.c (push_pathstr_operand): New function to support
26457         [a-zA-Z].
26458         (walk_rtx): Call push_pathstr_operand.
26459         (print_path): Support [a-zA-Z].
26461 2018-02-07  Richard Biener  <rguenther@suse.de>
26463         PR tree-optimization/84037
26464         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
26465         (cse_and_gimplify_to_preheader): Declare.
26466         (vect_get_place_in_interleaving_chain): Likewise.
26467         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26468         ivexpr_map.
26469         (_loop_vec_info::~_loop_vec_info): Delete it.
26470         (cse_and_gimplify_to_preheader): New function.
26471         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
26472         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
26473         (vectorizable_load): Likewise.  For grouped stores always base
26474         the IV on the first element.
26475         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
26476         condition before gimplifying.
26478 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
26480         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
26481         *DIV_EXPR and *MOD_EXPR.
26483 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
26485         PR target/84248
26486         * config/i386/i386.c (ix86_option_override_internal): Mask out
26487         the CF_SET bit when checking -fcf-protection.
26489 2018-02-07  Tom de Vries  <tom@codesourcery.com>
26491         PR libgomp/84217
26492         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26493         enough.
26495 2018-02-07  Richard Biener  <rguenther@suse.de>
26497         PR tree-optimization/84204
26498         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26499         this place.
26501         PR tree-optimization/84205
26502         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26503         special-case isl_ast_op_zdiv_r.
26505         PR tree-optimization/84223
26506         * graphite-scop-detection.c (gather_bbs::before_dom_children):
26507         Only add conditions from within the region.
26508         (gather_bbs::after_dom_children): Adjust.
26510 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
26512         PR target/84209
26513         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26514         * config/avr/avr.md: Only post-reload split REG-REG moves if
26515         either register is GENERAL_REG_P.
26517 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
26519         PR tree-optimization/84235
26520         * tree-ssa-scopedtables.c
26521         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26522         if the subtraction is performed in floating point type where NaNs are
26523         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26524         build 1.  Formatting fix.
26526 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
26528         PR target/84146
26529         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26530         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26531         and skip it regardless of bb boundaries.  Use CALL_P macro,
26532         don't test INSN_P (insn) together with CALL_P or JUMP_P check
26533         unnecessarily, formatting fix.
26535 2018-02-06  Michael Collison  <michael.collison@arm.com>
26537         * config/arm/thumb2.md:
26538         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26539         (*thumb_mov_notscc): Ditto.
26541 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
26543         PR target/84154
26544         * config/rs6000/rs6000.md (su code attribute): Use "u" for
26545         unsigned_fix, not "s".
26547 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26549         * configure.ac (gcc_fn_eh_frame_ro): New function.
26550         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26551         correct .eh_frame permissions.
26552         * configure: Regenerate.
26554 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
26556         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26557         irrelevant options.
26559 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26561         * config/rs6000/rs6000.c (rs6000_option_override_internal):
26562         Display warning message for -mno-speculate-indirect-jumps.
26564 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
26566         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26567         Undocumented.
26568         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26570 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
26572         PR tree-optimization/84225
26573         * tree-eh.c (find_trapping_overflow): Only call
26574         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26576 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26578         PR target/84145
26579         * config/i386/i386.c: Reimplement the check of possible options
26580         -mibt/-mshstk conbination. Change error messages.
26581         * doc/invoke.texi: Fix a typo: remove extra '='.
26583 2018-02-06  Marek Polacek  <polacek@redhat.com>
26585         PR tree-optimization/84228
26586         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26588 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
26590         PR target/82641
26591         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26592         emitted arch directives.
26593         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26594         __ARM_FEATURE_COPROC before changing architectures.
26596 2018-02-06  Richard Biener  <rguenther@suse.de>
26598         * config/i386/i386.c (print_reg): Fix typo.
26599         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26601 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
26603         * configure: Regenerate.
26605 2018-02-05  Martin Sebor  <msebor@redhat.com>
26607         PR tree-optimization/83369
26608         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26609         inlining context.
26611 2018-02-05  Martin Liska  <mliska@suse.cz>
26613         * doc/invoke.texi: Cherry-pick upstream r323995.
26615 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
26617         * ira.c (ira_init_register_move_cost): Adjust comment.
26619 2018-02-05  Martin Liska  <mliska@suse.cz>
26621         PR gcov-profile/84137
26622         * doc/gcov.texi: Fix typo in documentation.
26624 2018-02-05  Martin Liska  <mliska@suse.cz>
26626         PR gcov-profile/83879
26627         * doc/gcov.texi: Document necessity of --dynamic-list-data when
26628         using dlopen functionality.
26630 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
26632         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26633         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26634         _mm_maskz_range_ss, _mm_mask_range_round_ss,
26635         _mm_maskz_range_round_ss): New intrinsics.
26636         (__builtin_ia32_rangesd128_round)
26637         (__builtin_ia32_rangess128_round): Remove.
26638         (__builtin_ia32_rangesd128_mask_round,
26639         __builtin_ia32_rangess128_mask_round): New builtins.
26640         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26641         __builtin_ia32_rangess128_round): Remove.
26642         (__builtin_ia32_rangesd128_mask_round,
26643         __builtin_ia32_rangess128_mask_round): New builtins.
26644         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26645         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26646         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26647         "<round_saeonly_constraint>")): Changed to ...
26648         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26649         "<round_saeonly_scalar_constraint>")): ... this.
26650         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26651         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26652         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26653         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26654         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26656 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
26658         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26659         options.
26660         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26661         Remove all values except native, 8540 and 8548.
26663 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
26665         * config/i386/i386.c (ix86_output_function_return): Pass
26666         INVALID_REGNUM, instead of -1, as invalid register number to
26667         indirect_thunk_name and output_indirect_thunk.
26669 2018-02-02  Julia Koval  <julia.koval@intel.com>
26671         * config.gcc: Add -march=icelake.
26672         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26673         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26674         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26675         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26676         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26677         (processor_target_table): Add icelake.
26678         (ix86_option_override_internal): Handle new PTAs.
26679         (get_builtin_code_for_version): Handle icelake.
26680         (M_INTEL_COREI7_ICELAKE): New.
26681         (fold_builtin_cpu): Handle icelake.
26682         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26683         * doc/invoke.texi: Add -march=icelake.
26685 2018-02-02  Julia Koval  <julia.koval@intel.com>
26687         * config/i386/i386.c (ix86_option_override_internal): Change flags type
26688         to wide_int_bitmask.
26689         * wide-int-bitmask.h: New.
26691 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26693         PR target/84066
26694         * config/i386/i386.md: Replace Pmode with word_mode in
26695         builtin_setjmp_setup and builtin_longjmp to support x32.
26697 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
26699         PR target/56010
26700         PR target/83743
26701         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26702         #include "opts.h".
26703         (rs6000_supported_cpu_names): New static variable.
26704         (linux_cpu_translation_table): Likewise.
26705         (elf_platform) <cpu>: Define new static variable and use it.
26706         Translate kernel AT_PLATFORM name to canonical name if needed.
26707         Error if platform name is unknown.
26709 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
26711         PR target/84089
26712         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26714 2018-02-01  Jeff Law  <law@redhat.com>
26716         PR target/84128
26717         * config/i386/i386.c (release_scratch_register_on_entry): Add new
26718         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
26719         the scratch if RELEASE_VIA_POP is false.
26720         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26721         If we have to save a temporary register, decrement SIZE appropriately.
26722         Pass new arguments to release_scratch_register_on_entry.
26723         (ix86_adjust_stack_and_probe): Likewise.
26724         (ix86_emit_probe_stack_range): Pass new arguments to
26725         release_scratch_register_on_entry.
26727 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
26729         PR rtl-optimization/84157
26730         * combine.c (change_zero_ext): Use REG_P predicate in
26731         front of HARD_REGISTER_P predicate.
26733 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
26735         * config/avr/avr.c (avr_option_override): Move disabling of
26736         -fdelete-null-pointer-checks to...
26737         * common/config/avr/avr-common.c (avr_option_optimization_table):
26738         ...here.
26740 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26742         PR tree-optimization/81635
26743         * tree-data-ref.c (split_constant_offset_1): For types that
26744         wrap on overflow, try to use range info to prove that wrapping
26745         cannot occur.
26747 2018-02-01  Renlin Li  <renlin.li@arm.com>
26749         PR target/83370
26750         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26751         TAILCALL_ADDR_REGS.
26752         (aarch64_register_move_cost): Likewise.
26753         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26754         TAILCALL_ADDR_REGS.
26755         (REG_CLASS_NAMES): Likewise.
26756         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26757         TAILCALL_ADDR_REGS. Remove IP registers.
26758         * config/aarch64/aarch64.md (Ucs): Update register constraint.
26760 2018-02-01  Richard Biener  <rguenther@suse.de>
26762         * domwalk.h (dom_walker::dom_walker): Add additional constructor
26763         for specifying RPO order and allow NULL for that.
26764         * domwalk.c (dom_walker::dom_walker): Likewise.
26765         (dom_walker::walk): Handle NULL RPO order.
26766         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26767         in RPO order.
26768         (rewrite_update_dom_walker): Likewise.
26769         (mark_def_dom_walker): Likewise.
26771 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26773         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26774         (aarch64_maybe_expand_sve_subreg_move): Declare.
26775         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26776         * config/aarch64/predicates.md (aarch64_any_register_operand): New
26777         predicate.
26778         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26779         that are semantically a reverse operation.
26780         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26781         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26782         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26783         functions.
26784         (aarch64_can_change_mode_class): For big-endian, forbid changes
26785         between two SVE modes if they have different element sizes.
26787 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26789         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26790         the TImode handling for big-endian targets.
26792 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26794         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26795         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
26796         not just bytes.
26797         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26798         Remove BSWAP handing for big-endian targets and use the form of
26799         LD1RQ appropariate for the mode.
26801 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26803         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26804         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26805         duplicated element.
26807 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
26809         PR tearget/83845
26810         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26811         check for operands that need to go through aarch64_sve_reload_be.
26813 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
26815         PR tree-optimization/81661
26816         PR tree-optimization/84117
26817         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26818         * tree-eh.c: Include gimplify.h.
26819         (find_trapping_overflow, replace_trapping_overflow,
26820         rewrite_to_non_trapping_overflow): New functions.
26821         * tree-vect-loop.c: Include tree-eh.h.
26822         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26823         * tree-data-ref.c: Include tree-eh.h.
26824         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26826 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
26828         PR rtl-optimization/84123
26829         * combine.c (change_zero_ext): Check if hard register satisfies
26830         can_change_dest_mode before calling gen_lowpart_SUBREG.
26832 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
26834         PR target/82444
26835         * ira.c (ira_init_register_move_cost): Remove assert.
26837 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26839         PR rtl-optimization/84071
26840         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26841         * doc/tm.texi: Regenerate.
26843 2018-01-31  Richard Biener  <rguenther@suse.de>
26845         PR tree-optimization/84132
26846         * tree-data-ref.c (analyze_miv_subscript): Properly
26847         check whether evolution_function_is_affine_multivariate_p
26848         before calling gcd_of_steps_may_divide_p.
26850 2018-01-31  Julia Koval  <julia.koval@intel.com>
26852         PR target/83618
26853         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26854         * config/i386/i386.md (rdpid_rex64) New.
26855         (rdpid): Make 32bit only.
26857 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
26859         PR lto/84105
26860         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26861         an IDENTIFIER_NODE for FUNCTION_TYPE's.
26863 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26865         Revert
26866         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
26868         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26870 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
26872         PR rtl-optimization/84071
26873         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26874         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26876 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26878         * config/arc/arc.c (arc_handle_aux_attribute): New function.
26879         (arc_attribute_table): Add 'aux' attribute.
26880         (arc_in_small_data_p): Consider aux like variables.
26881         (arc_is_aux_reg_p): New function.
26882         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26883         (arc_get_aux_arg): New function.
26884         (prepare_move_operands): Handle aux-register access.
26885         (arc_handle_aux_attribute): New function.
26886         * doc/extend.texi (ARC Variable attributes): Add subsection.
26888 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
26890         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26891         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26892         (arc_attribute_table): Add 'uncached' attribute.
26893         (arc_print_operand): Print '.di' flag for uncached memory
26894         accesses.
26895         (arc_in_small_data_p): Do not consider for small data the uncached
26896         types.
26897         (arc_is_uncached_mem_p): New function.
26898         * config/arc/predicates.md (compact_store_memory_operand): Check
26899         for uncached memory accesses.
26900         (nonvol_nonimm_operand): Likewise.
26901         * doc/extend.texi (ARC Type Attribute): New subsection.
26903 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
26905         PR c/84100
26906         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26907         falign-loops=): Add Optimization flag.
26909 2018-01-30  Jeff Law  <law@redhat.com>
26911         PR target/84064
26912         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26913         INT_REGISTERS_SAVED.  Check it prior to calling
26914         get_scratch_register_on_entry.
26915         (ix86_adjust_stack_and_probe): Similarly.
26916         (ix86_emit_probe_stack_range): Similarly.
26917         (ix86_expand_prologue): Corresponding changes.
26919 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26921         PR target/40411
26922         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26923         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26925 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
26927         PR target/84112
26928         * lra-constraints.c (curr_insn_transform): Process AND in the
26929         address.
26931 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
26933         PR rtl-optimization/83986
26934         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26935         dependence against last_pending_memory_flush in addition to
26936         pending_jump_insns.
26938 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
26940         PR tree-optimization/81611
26941         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26942         copies.
26944 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26946         PR target/83758
26947         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26948         a reg rtx.
26950 2018-01-30  Richard Biener  <rguenther@suse.de>
26951             Jakub Jelinek  <jakub@redhat.com>
26953         PR tree-optimization/84111
26954         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26955         inner loops added during recursion, as they don't have up-to-date
26956         SSA form.
26958 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26960         PR ipa/81360
26961         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26962         (can_inline_edge_by_limits_p): ... here.
26963         (can_early_inline_edge_p, check_callers,
26964         update_caller_keys, update_callee_keys, recursive_inlining,
26965         add_new_edges_to_heap, speculation_useful_p,
26966         inline_small_functions,
26967         inline_small_functions, flatten_function,
26968         inline_to_all_callers_1): Update.
26970 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
26972         * profile-count.c (profile_count::combine_with_ipa_count): Handle
26973         zeros correctly.
26975 2018-01-30  Richard Biener  <rguenther@suse.de>
26977         PR tree-optimization/83008
26978         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26979         invariant and constant vector uses in stmts when they need
26980         more than one stmt.
26982 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26984         PR bootstrap/84017
26985         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26986         * configure: Regenerate.
26988 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26990         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26991         pattern.
26992         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26993         Use gen_rtx_REG rather than gen_lowpart.
26995 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
26997         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26998         rather than 0 when creating partial subregs.
27000 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
27002         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
27003         of usage.
27005 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
27007         PR target/81550
27008         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
27009         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
27010         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
27011         flags.  This restores the settings used before the 2017-07-24.
27012         Turning off pre increment/decrement/modify allows IVOPTS to
27013         optimize DF/SF loops where the index is an int.
27015 2018-01-29  Richard Biener  <rguenther@suse.de>
27016             Kelvin Nilsen  <kelvin@gcc.gnu.org>
27018         PR bootstrap/80867
27019         * tree-vect-stmts.c (vectorizable_call): Don't call
27020         targetm.vectorize_builtin_md_vectorized_function if callee is
27021         NULL.
27023 2018-01-22  Carl Love  <cel@us.ibm.com>
27025         * doc/extend.tex: Fix typo in second arg in
27026         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
27028 2018-01-29  Richard Biener  <rguenther@suse.de>
27030         PR tree-optimization/84086
27031         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
27032         (flush_ssaname_freelist): When SSA names were released reset
27033         the SCEV hash table.
27035 2018-01-29  Richard Biener  <rguenther@suse.de>
27037         PR tree-optimization/84057
27038         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
27039         removed paths when removing edges.
27041 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
27043         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
27044         -mfunction-return=@var{choice}.
27046 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27048         PR diagnostic/84034
27049         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
27050         Handle CR like TAB.
27051         (layout::print_source_line): Likewise.
27052         (test_get_line_width_without_trailing_whitespace): Add test cases.
27054 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
27056         PR middle-end/84040
27057         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
27058         debug insns.
27060 2018-01-26  Jim Wilson  <jimw@sifive.com>
27062         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27064         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27065         specified.
27067 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27069         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27070         and CMP + SUB-immediate -> SUBS.
27072 2018-01-26  Martin Sebor  <msebor@redhat.com>
27074         PR tree-optimization/83896
27075         * tree-ssa-strlen.c (get_string_len): Rename...
27076         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
27077         Avoid assuming length is constant.
27078         (handle_char_store): Use HOST_WIDE_INT for string length.
27080 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
27082         PR target/81763
27083         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27084         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27086 2018-01-26  Richard Biener  <rguenther@suse.de>
27088         PR rtl-optimization/84003
27089         * dse.c (record_store): Only record redundant stores when
27090         the earlier store aliases at least all accesses the later one does.
27092 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
27094         PR rtl-optimization/83985
27095         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27096         REG_CFA_RESTORE insns.
27097         (delete_unmarked_insns): Don't ignore separate shrink wrapping
27098         REG_CFA_RESTORE insns here.
27100         PR c/83989
27101         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27102         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27104 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27106         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27107         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27108         (arc_init): Likewise.
27109         (arc_override_options): Likewise.
27110         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27111         value.
27112         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27113         support.
27114         * config/arc/arc.h (TARGET_DBNZ): Define.
27115         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27116         properly set the tune attribute.
27117         (dbnz): Use TARGET_DBNZ guard.
27118         * config/arc/arc.opt (mtune): Add core3 option.
27120 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27122         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27123         recognize new pic like addresses.
27124         (arc_delegitimize_address): Clean up.
27126 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27128         * config/arc/arc-arches.def: Option mrf16 valid for all
27129         architectures.
27130         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27131         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27132         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27133         * config/arc/arc-tables.opt: Regenerate.
27134         * config/arc/arc.c (arc_conditional_register_usage): Handle
27135         reduced register file case.
27136         (arc_file_start): Set must have build attributes.
27137         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27138         mrf16 option value.
27139         * config/arc/arc.opt (mrf16): Add new option.
27140         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27141         * config/arc/genmultilib.awk: Handle new mrf16 option.
27142         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27143         * config/arc/t-multilib: Regenerate.
27144         * doc/invoke.texi (ARC Options): Document mrf16 option.
27146 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27148         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27149         * config/arc/arc.c (arc_handle_secure_attribute): New function.
27150         (arc_attribute_table): Add 'secure_call' attribute.
27151         (arc_print_operand): Print secure call operand.
27152         (arc_function_ok_for_sibcall): Don't optimize tail calls when
27153         secure.
27154         (arc_is_secure_call_p): New function.  * config/arc/arc.md
27155         (call_i): Add support for sjli instruction.
27156         (call_value_i): Likewise.
27157         * config/arc/constraints.md (Csc): New constraint.
27159 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27160             John Eric Martin  <John.Martin@emmicro-us.com>
27162         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27163         * config/arc/arc.c (_arc_jli_section): New struct.
27164         (arc_jli_section): New type.
27165         (rc_jli_sections): New static variable.
27166         (arc_handle_jli_attribute): New function.
27167         (arc_attribute_table): Add jli_always and jli_fixed attribute.
27168         (arc_file_end): New function.
27169         (TARGET_ASM_FILE_END): Define.
27170         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27171         (arc_add_jli_section): New function.
27172         (jli_call_scan): Likewise.
27173         (arc_reorg): Call jli_call_scan.
27174         (arc_output_addsi): Remove 'S' from printing asm operand.
27175         (arc_is_jli_call_p): New function.
27176         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27177         operand.
27178         (movhi_insn): Likewise.
27179         (movsi_insn): Likewise.
27180         (movsi_set_cc_insn): Likewise.
27181         (loadqi_update): Likewise.
27182         (load_zeroextendqisi_update): Likewise.
27183         (load_signextendqisi_update): Likewise.
27184         (loadhi_update): Likewise.
27185         (load_zeroextendhisi_update): Likewise.
27186         (load_signextendhisi_update): Likewise.
27187         (loadsi_update): Likewise.
27188         (loadsf_update): Likewise.
27189         (movsicc_insn): Likewise.
27190         (bset_insn): Likewise.
27191         (bxor_insn): Likewise.
27192         (bclr_insn): Likewise.
27193         (bmsk_insn): Likewise.
27194         (bicsi3_insn): Likewise.
27195         (cmpsi_cc_c_insn): Likewise.
27196         (movsi_ne): Likewise.
27197         (movsi_cond_exec): Likewise.
27198         (clrsbsi2): Likewise.
27199         (norm_f): Likewise.
27200         (normw): Likewise.
27201         (swap): Likewise.
27202         (divaw): Likewise.
27203         (flag): Likewise.
27204         (sr): Likewise.
27205         (kflag): Likewise.
27206         (ffs): Likewise.
27207         (ffs_f): Likewise.
27208         (fls): Likewise.
27209         (call_i): Remove 'S' asm letter, add jli instruction.
27210         (call_value_i): Likewise.
27211         * config/arc/arc.op (mjli-always): New option.
27212         * config/arc/constraints.md (Cji): New constraint.
27213         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27214         operand.
27215         (subsf3_fpx): Likewise.
27216         (mulsf3_fpx): Likewise.
27217         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27218         asm operand.
27219         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27220         function attrbutes.
27221         * doc/invoke.texi (ARC): Document mjli-always option.
27223 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
27225         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27226         avoid addition with 0 and use incw and decw where possible.
27228 2018-01-26  Richard Biener  <rguenther@suse.de>
27230         PR tree-optimization/81082
27231         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27232         association if it requires casting to unsigned.
27233         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27234         from fold_plusminus_mult_expr to catch important cases late when
27235         range info is available.
27237 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27239         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
27240         * configure.ac (hidden_linkonce): New test.
27241         * configure: Regenerate.
27242         * config.in: Regenerate.
27244 2018-01-26  Julia Koval  <julia.koval@intel.com>
27246         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
27247         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
27248         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
27249         _mm_mask_bitshuffle_epi64_mask): Fix type.
27250         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
27251         USI_FTYPE_V4DI_V4DI_USI): Remove.
27252         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
27253         __builtin_ia32_vpshufbitqmb256_mask,
27254         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
27255         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
27256         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
27258 2018-01-26  Alan Modra  <amodra@gmail.com>
27260         PR target/84033
27261         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
27262         UNSPEC_VBPERMQ.  Sort other unspecs.
27264 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
27266         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
27268 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
27270         PR middle-end/83055
27271         * predict.c (drop_profile): Do not push/pop cfun; update also
27272         node->count.
27273         (handle_missing_profiles): Fix logic looking for zero profiles.
27275 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
27277         PR middle-end/83977
27278         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
27279         on functions with #pragma omp declare simd or functions with simd
27280         attribute.
27281         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
27282         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
27283         Remove trailing \n from warning_at calls.
27285 2018-01-25  Tom de Vries  <tom@codesourcery.com>
27287         PR target/84028
27288         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27289         for neutered workers.
27291 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
27293         PR target/68467
27294         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
27295         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
27297 2018-01-24  Jeff Law  <law@redhat.com>
27299         PR target/83994
27300         * i386.c (get_probe_interval): Move to earlier point.
27301         (ix86_compute_frame_layout): If -fstack-clash-protection and
27302         the frame is larger than the probe interval, then use pushes
27303         to save registers rather than reg->mem moves.
27304         (ix86_expand_prologue): Remove conditional for int_registers_saved
27305         assertion.
27307 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
27309         PR target/84014
27310         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
27311         min/max for never referenced object.
27313 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
27315         PR middle-end/83977
27316         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
27317         here.
27318         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
27319         attributes from DECL_ATTRIBUTES (decl) without affecting
27320         DECL_ATTRIBUTES (current_function_decl).
27321         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
27322         functions with non-NULL DECL_ABSTRACT_ORIGIN.
27324 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
27326         PR tree-optimization/83979
27327         * fold-const.c (fold_comparison): Use constant_boolean_node
27328         instead of boolean_{true,false}_node.
27330 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
27332         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
27333         with zero counts.
27335 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27337         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27338         Simplify the clause that sets the length attribute.
27339         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27340         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
27341         clause that sets the length attribute.
27342         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27344 2018-01-24  Tom de Vries  <tom@codesourcery.com>
27346         PR target/83589
27347         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
27348         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
27349         Add strict parameter.
27350         (prevent_branch_around_nothing): Insert dummy insn between branch to
27351         label and label with no ptx insn inbetween.
27352         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
27354 2018-01-24  Tom de Vries  <tom@codesourcery.com>
27356         PR target/81352
27357         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
27358         for neutered threads in warp.
27359         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
27361 2018-01-24  Richard Biener  <rguenther@suse.de>
27363         PR tree-optimization/83176
27364         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
27365         operands.
27367 2018-01-24  Richard Biener  <rguenther@suse.de>
27369         PR tree-optimization/82819
27370         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
27371         code generating pluses that are no-ops in the target precision.
27373 2018-01-24  Richard Biener  <rguenther@suse.de>
27375         PR middle-end/84000
27376         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
27378 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27380         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
27381         to merge probabilities.
27382         * predict.c (probably_never_executed): Also mark as cold functions
27383         with global 0 profile and guessed local profile.
27384         * profile-count.c (profile_probability::combine_with_count): New
27385         member function.
27386         * profile-count.h (profile_probability::operator*,
27387         profile_probability::operator*=, profile_probability::operator/,
27388         profile_probability::operator/=): Reduce precision to adjusted
27389         and set value to guessed on contradictory divisions.
27390         (profile_probability::combine_with_freq): Remove.
27391         (profile_probability::combine_wiht_count): Declare.
27392         (profile_count::force_nonzero):: Set to adjusted.
27393         (profile_count::probability_in):: Set quality to adjusted.
27394         * tree-ssa-tail-merge.c (replace_block_by): Use
27395         combine_with_count.
27397 2018-01-23  Andrew Waterman  <andrew@sifive.com>
27398             Jim Wilson  <jimw@sifive.com>
27400         * config/riscv/riscv.c (riscv_stack_boundary): New.
27401         (riscv_option_override): Set riscv_stack_boundary.  Handle
27402         riscv_preferred_stack_boundary_arg.
27403         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
27404         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
27405         (STACK_BOUNDARY): Set to riscv_stack_boundary.
27406         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
27407         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
27408         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
27410 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
27412         PR target/83905
27413         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
27414         of struct ix86_frame.
27415         (ix86_expand_epilogue): Likewise.  Add a local variable for
27416         the reg_save_offset field in struct ix86_frame.
27418 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
27420         PR tree-optimization/82604
27421         * tree-loop-distribution.c (enum partition_kind): New enum item
27422         PKIND_PARTIAL_MEMSET.
27423         (partition_builtin_p): Support above new enum item.
27424         (generate_code_for_partition): Ditto.
27425         (compute_access_range): Differentiate cases that equality can be
27426         proven at all loops, the innermost loops or no loops.
27427         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
27428         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
27429         (finalize_partitions, distribute_loop): Don't fuse partition of
27430         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
27431         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
27432         parloop is enabled.
27434 2018-01-23  Martin Liska  <mliska@suse.cz>
27436         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
27437         order to ignore the predictor.
27438         (PRED_POLYMORPHIC_CALL): Likewise.
27439         (PRED_RECURSIVE_CALL): Likewise.
27441 2018-01-23  Martin Liska  <mliska@suse.cz>
27443         * tree-profile.c (tree_profiling): Print function header to
27444         aware reader which function we are working on.
27445         * value-prof.c (gimple_find_values_to_profile): Do not print
27446         not interesting value histograms.
27448 2018-01-23  Martin Liska  <mliska@suse.cz>
27450         * profile-count.h (enum profile_quality): Add
27451         profile_uninitialized as the first value. Do not number values
27452         as they are zero based.
27453         (profile_count::verify): Update sanity check.
27454         (profile_probability::verify): Likewise.
27456 2018-01-23  Nathan Sidwell  <nathan@acm.org>
27458         * doc/invoke.texi (ffor-scope): Deprecate.
27460 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27462         PR tree-optimization/83510
27463         * domwalk.c (set_all_edges_as_executable): New function.
27464         (dom_walker::dom_walker): Convert bool param
27465         "skip_unreachable_blocks" to enum reachability.  Move setup of
27466         edge flags to set_all_edges_as_executable and only do it when
27467         reachability is REACHABLE_BLOCKS.
27468         * domwalk.h (enum dom_walker::reachability): New enum.
27469         (dom_walker::dom_walker): Convert bool param
27470         "skip_unreachable_blocks" to enum reachability.
27471         (set_all_edges_as_executable): New decl.
27472         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
27473         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
27474         "reachability".
27475         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
27476         but converting true to REACHABLE_BLOCKS.
27477         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
27478         * tree-vrp.c
27479         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
27480         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
27481         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
27482         REACHABLE_BLOCKS.
27483         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
27484         if check_all_array_refs will be called.
27486 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27488         * tree.c (selftest::test_location_wrappers): Add more test
27489         coverage.
27491 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
27493         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27494         (selftest::test_bit_in_range): Likewise.
27496 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
27498         PR testsuite/83888
27499         * doc/sourcebuild.texi (vect_float): Say that the selector
27500         only describes the situation when -funsafe-math-optimizations is on.
27501         (vect_float_strict): Document.
27503 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
27505         PR tree-optimization/83965
27506         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27507         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27508         instead of checking only for a reduction.
27509         (vect_recog_widen_sum_pattern): Likewise.
27511 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27513         * predict.c (probably_never_executed): Only use precise profile info.
27514         (compute_function_frequency): Skip after inlining hack since we now
27515         have quality checking.
27517 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
27519         * profile-count.h (profile_probability::very_unlikely,
27520         profile_probability::unlikely, profile_probability::even): Set
27521         precision to guessed.
27523 2018-01-23  Richard Biener  <rguenther@suse.de>
27525         PR tree-optimization/83963
27526         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27527         Properly terminate dominator walk when crossing the exit edge not
27528         when visiting its source block.
27530 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
27532         PR c++/83918
27533         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27534         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27536 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
27538         PR tree-optimization/83957
27539         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
27540         semicolon after for body surrounded by braces.
27542         PR tree-optimization/83081
27543         * profile-count.h (profile_probability::split): New method.
27544         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27545         Use profile_probability::split.
27546         (do_compare_rtx_and_jump): Fix adjustment of probabilities
27547         when splitting a single conditional jump into 2.
27549 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
27551         PR tree-optimization/69452
27552         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27553         decl.
27555 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27557         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27558         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27559         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27561 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27563         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27564         declaration.
27565         * config/rl78/rl78.md (movdi): New define_expand.
27566         * config/rl78/rl78.c (rl78_split_movdi): New function.
27568 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
27570         PR target/83862
27571         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27572         no longer used.
27573         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27574         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27575         128-bit to produce an UNSPEC move to get the double word with the
27576         signbit and then a shift directly to do signbit.
27577         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27578         implementation with a new version that just does either a direct
27579         move or a regular move.  Move memory interface to separate insns.
27580         Move insns so they are next to the expander.
27581         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27582         with signbit move.  Split big and little endian case.
27583         (signbit<mode>2_dm_mem_le): Likewise.
27584         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27585         (signbit<mode>2_dm2): Likewise.
27587 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27589         * config/rl78/rl78.md (anddi3): New define_expand.
27591 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27593         * config/rl78/rl78.md (umindi3): New define_expand.
27595 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27597         * config/rl78/rl78.md (smindi3): New define_expand.
27599 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27601         * config/rl78/rl78.md (smaxdi3): New define_expand.
27603 2018-01-22  Carl Love  <cel@us.ibm.com>
27605         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27606         LVX_V1TI): Add macro expansion.
27607         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27608         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27609         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27610         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27611         Change check to determine if the instruction is a byte reversing
27612         entry.  Fix typo in comment.
27613         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27614         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27615         Add def_builtin calls for new builtins.
27616         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27617         Add define_insn expansion.
27619 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27621         * config/rl78/rl78.md (umaxdi3): New define_expand.
27623 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
27625         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27626         for non-QImode registers.
27628 2018-01-22  Richard Biener  <rguenther@suse.de>
27630         PR tree-optimization/83963
27631         * graphite-scop-detection.c (scop_detection::get_sese): Delay
27632         including the loop exit block.
27633         (scop_detection::merge_sese): Likewise.
27634         (scop_detection::add_scop): Do it here instead.
27636 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27638         * doc/sourcebuild.texi (arm_softfloat): Document.
27640 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
27642         PR gcc/77734
27643         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27644         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27645         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27647 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27648             David Edelsohn  <dje.gcc@gmail.com>
27650         PR target/83946
27651         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27652         Change "crset eq" to "crset 2".
27653         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27654         (*call_indirect_aix<mode>_nospec): Likewise.
27655         (*call_value_indirect_aix<mode>_nospec): Likewise.
27656         (*call_indirect_elfv2<mode>_nospec): Likewise.
27657         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27658         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27659         change assembly output from . to $.
27660         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27661         (indirect_jump<mode>_nospec): Change assembly output from . to $.
27662         (*tablejump<mode>_internal1_nospec): Likewise.
27664 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
27666         PR target/80870
27667         * config/sh/sh_optimize_sett_clrt.cc:
27668         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27670 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
27672         PR tree-optimization/83940
27673         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27674         offset_dt to vect_constant_def rather than vect_unknown_def_type.
27675         (vect_check_load_store_mask): Add a mask_dt_out parameter and
27676         use it to pass back the definition type.
27677         (vect_check_store_rhs): Likewise rhs_dt_out.
27678         (vect_build_gather_load_calls): Add a mask_dt argument and use
27679         it instead of a call to vect_is_simple_use.
27680         (vectorizable_store): Update calls to vect_check_load_store_mask
27681         and vect_check_store_rhs.  Use the dt returned by the latter instead
27682         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
27683         instead of calls to vect_is_simple_use.  Pass the scalar rather
27684         than the vector operand to vect_is_simple_use when handling
27685         second and subsequent copies of an rhs value.
27686         (vectorizable_load): Update calls to vect_check_load_store_mask
27687         and vect_build_gather_load_calls.  Use the cached mask_dt and
27688         gs_info.offset_dt instead of calls to vect_is_simple_use.
27690 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
27692         PR middle-end/83945
27693         * tree-emutls.c: Include gimplify.h.
27694         (lower_emutls_2): New function.
27695         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27696         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27697         it before further processing.
27699         PR target/83930
27700         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27701         UINTVAL (trueop1) instead of INTVAL (op1).
27703 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
27705         PR debug/81570
27706         PR debug/83728
27707         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27708         INCOMING_FRAME_SP_OFFSET if not defined.
27709         (scan_trace): Add ENTRY argument.  If true and
27710         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27711         emit a note to adjust the CFA offset.
27712         (create_cfi_notes): Adjust scan_trace callers.
27713         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27714         INCOMING_FRAME_SP_OFFSET in the CIE.
27715         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27716         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27717         Likewise.
27718         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27719         * doc/tm.texi: Regenerated.
27721 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27723         PR rtl-optimization/83147
27724         * lra-constraints.c (remove_inheritance_pseudos): Use
27725         lra_substitute_pseudo_within_insn.
27727 2018-01-19  Tom de Vries  <tom@codesourcery.com>
27728             Cesar Philippidis  <cesar@codesourcery.com>
27730         PR target/83920
27731         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27733 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
27735         PR target/83790
27736         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27737         spaces for function labels.
27739 2018-01-19  Martin Liska  <mliska@suse.cz>
27741         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27742         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27743         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27744         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27745         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27746         (PRED_CONST_RETURN): Change from 69 to 65.
27747         (PRED_NULL_RETURN): Change from 91 to 71.
27748         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27749         (PRED_LOOP_GUARD): Change from 66 to 73.
27751 2018-01-19  Martin Liska  <mliska@suse.cz>
27753         * predict.c (predict_insn_def): Add new assert.
27754         (struct branch_predictor): Change type to signed integer.
27755         (test_prediction_value_range): Amend test to cover
27756         PROB_UNINITIALIZED.
27757         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27758         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27759         (PRED_LOOP_ITERATIONS_MAX): Likewise.
27760         (PRED_LOOP_IV_COMPARE): Likewise.
27761         * predict.h (PROB_UNINITIALIZED): Define new constant.
27763 2018-01-19  Martin Liska  <mliska@suse.cz>
27765         * predict.c (dump_prediction): Add new format for
27766         analyze_brprob.py script which is enabled with -details
27767         suboption.
27768         * profile-count.h (precise_p): New function.
27770 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27772         PR tree-optimization/83922
27773         * tree-vect-loop.c (vect_verify_full_masking): Return false if
27774         there are no statements that need masking.
27775         (vect_active_double_reduction_p): New function.
27776         (vect_analyze_loop_operations): Use it when handling phis that
27777         are not in the loop header.
27779 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
27781         PR tree-optimization/83914
27782         * tree-vect-loop.c (vectorizable_induction): Don't convert
27783         init_expr or apply the peeling adjustment for inductions
27784         that are nested within the vectorized loop.
27786 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27788         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27789         instead of NEG.
27791 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27793         PR sanitizer/81715
27794         PR testsuite/83882
27795         * function.h (gimplify_parameters): Add gimple_seq * argument.
27796         * function.c: Include gimple.h and options.h.
27797         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27798         for the added local temporaries if needed.
27799         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27800         if there are any parameter cleanups, wrap whole body into a
27801         try/finally with the cleanups.
27803 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
27805         PR target/82964
27806         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27807         Use GET_MODE_CLASS for scalar floating point.
27809 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27811         PR ipa/82256
27812         patch by PaX Team
27813         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27814         Fix call of call_cgraph_insertion_hooks.
27816 2018-01-18  Martin Sebor  <msebor@redhat.com>
27818         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27820 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
27822         PR ipa/83619
27823         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27824         frequencies.
27826 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
27828         PR other/70268
27829         * common.opt: (-ffile-prefix-map): New option.
27830         * opts.c (common_handle_option): Defer it.
27831         * opts-global.c (handle_common_deferred_options): Handle it.
27832         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27833         * file-prefix-map.h: New file.
27834         (remap_debug_filename, add_debug_prefix_map): ...here.
27835         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27836         * final.c (debug_prefix_map, add_debug_prefix_map
27837         remap_debug_filename): Move to...
27838         * file-prefix-map.c: New file.
27839         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27840         generalize, get rid of alloca(), use strrchr() instead of strchr().
27841         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27842         Implement in terms of add_prefix_map().
27843         (remap_macro_filename, remap_debug_filename): Implement in term of
27844         remap_filename().
27845         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27846         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27847         * dbxout.c: Include file-prefix-map.h.
27848         * varasm.c: Likewise.
27849         * vmsdbgout.c: Likewise.
27850         * xcoffout.c: Likewise.
27851         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27852         * doc/cppopts.texi (-fmacro-prefix-map): Document.
27853         * doc/invoke.texi (-ffile-prefix-map): Document.
27854         (-fdebug-prefix-map): Update description.
27856 2018-01-18  Martin Liska  <mliska@suse.cz>
27858         * config/i386/i386.c (indirect_thunk_name): Document that also
27859         lfence is emitted.
27860         (output_indirect_thunk): Document why both instructions
27861         (pause and lfence) are generated.
27863 2018-01-18  Richard Biener  <rguenther@suse.de>
27865         PR tree-optimization/83887
27866         * graphite-scop-detection.c
27867         (scop_detection::get_nearest_dom_with_single_entry): Remove.
27868         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27869         (scop_detection::merge_sese): Re-implement with a flood-fill
27870         algorithm that properly finds a SESE region if it exists.
27872 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
27874         PR c/61240
27875         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27876         pointer_diff optimizations use view_convert instead of convert.
27878 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27880         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27881         Generate different code for -mno-speculate-indirect-jumps.
27882         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27883         (*call_indirect_aix<mode>): Disable for
27884         -mno-speculate-indirect-jumps.
27885         (*call_indirect_aix<mode>_nospec): New define_insn.
27886         (*call_value_indirect_aix<mode>): Disable for
27887         -mno-speculate-indirect-jumps.
27888         (*call_value_indirect_aix<mode>_nospec): New define_insn.
27889         (*sibcall_nonlocal_sysv<mode>): Generate different code for
27890         -mno-speculate-indirect-jumps.
27891         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27893 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
27895         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27896         long double type, set the flags for noting the default long double
27897         type, even if we don't pass or return a long double type.
27899 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
27901         PR ipa/83051
27902         * ipa-inline.c (flatten_function): Do not overwrite final inlining
27903         failure.
27905 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
27907         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27908         support for merge[hl].
27909         (fold_mergehl_helper): New helper function.
27910         (tree-vector-builder.h): New #include for tree_vector_builder usage.
27911         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27912         (altivec_vmrglw_direct): Add xxmrglw insn.
27914 2018-01-17  Andrew Waterman  <andrew@sifive.com>
27916         * config/riscv/riscv.c (riscv_conditional_register_usage): If
27917         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27919 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
27921         PR lto/83121
27922         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27923         call the lto_location_cache before reading the
27924         DECL_SOURCE_LOCATION of the types.
27926 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
27927             Richard Sandiford  <richard.sandiford@linaro.org>
27929         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27930         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27931         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27932         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27933         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27934         Add declaration.
27935         * config/aarch64/constraints.md (aarch64_movti_operand):
27936         Limit immediates.
27937         * config/aarch64/predicates.md (Uti): Add new constraint.
27939 2018-01-17  Carl Love  <cel@us.ibm.com>
27941         * config/rs6000/vsx.md (define_expand xl_len_r,
27942         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27943         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27944         lxvll.
27945         (define_expand, define_insn): Move the shift left from  the
27946         define_insn to the define_expand for lxvl and stxvl instructions.
27947         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27948         and XL_LEN_R definitions to PURE.
27950 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
27952         * config/i386/i386.c (indirect_thunk_name): Declare regno
27953         as unsigned int.  Compare regno with INVALID_REGNUM.
27954         (output_indirect_thunk): Ditto.
27955         (output_indirect_thunk_function): Ditto.
27956         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
27957         in the call to output_indirect_thunk_function.
27959 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
27961         PR middle-end/83884
27962         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27963         rather than the size of inner_type to determine the stack slot size
27964         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27966 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
27968         PR target/83546
27969         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27970         to PTA_SILVERMONT.
27972 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
27974         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27975         endian Linux systems to optionally enable multilibs for selecting
27976         the long double type if the user configured an explicit type.
27977         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27978         have no long double multilibs if not defined.
27979         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27980         warn if the user used -mabi={ieee,ibm}longdouble and we built
27981         multilibs for long double.
27982         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27983         appropriate multilib option.
27984         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27985         multilib options.
27986         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27987         for building long double multilibs.
27988         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27990 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
27992         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27993         copies.
27995         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27996         64 bits.
27997         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27998         128 bits.
28000         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
28001         variables.
28003         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
28004         return value.
28006 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
28008         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
28009         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
28011 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28013         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
28014         different rtl trees depending on TARGET_64BIT.
28015         (rs6000_gen_lvx): Likewise.
28017 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
28019         * config/visium/visium.md (nop): Tweak comment.
28020         (hazard_nop): Likewise.
28022 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28024         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
28025         -mspeculate-indirect-jumps.
28026         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
28027         for -mno-speculate-indirect-jumps.
28028         (*call_indirect_elfv2<mode>_nospec): New define_insn.
28029         (*call_value_indirect_elfv2<mode>): Disable for
28030         -mno-speculate-indirect-jumps.
28031         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
28032         (indirect_jump): Emit different RTL for
28033         -mno-speculate-indirect-jumps.
28034         (*indirect_jump<mode>): Disable for
28035         -mno-speculate-indirect-jumps.
28036         (*indirect_jump<mode>_nospec): New define_insn.
28037         (tablejump): Emit different RTL for
28038         -mno-speculate-indirect-jumps.
28039         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
28040         (tablejumpsi_nospec): New define_expand.
28041         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
28042         (tablejumpdi_nospec): New define_expand.
28043         (*tablejump<mode>_internal1): Disable for
28044         -mno-speculate-indirect-jumps.
28045         (*tablejump<mode>_internal1_nospec): New define_insn.
28046         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
28047         option.
28049 2018-01-16  Artyom Skrobov tyomitch@gmail.com
28051         * caller-save.c (insert_save): Drop unnecessary parameter.  All
28052         callers updated.
28054 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
28055             Richard Biener  <rguenth@suse.de>
28057         PR libgomp/83590
28058         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
28059         return early, inline manually is_gimple_sizepos.  Make sure if we
28060         call gimplify_expr we don't end up with a gimple constant.
28061         * tree.c (variably_modified_type_p): Don't return true for
28062         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
28063         * gimplify.h (is_gimple_sizepos): Remove.
28065 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28067         PR tree-optimization/83857
28068         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28069         vectorizable_live_operation for pure SLP statements.
28070         (vectorizable_live_operation): Handle PHIs.
28072 2018-01-16  Richard Biener  <rguenther@suse.de>
28074         PR tree-optimization/83867
28075         * tree-vect-stmts.c (vect_transform_stmt): Precompute
28076         nested_in_vect_loop_p since the scalar stmt may get invalidated.
28078 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
28080         PR c/83844
28081         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28082         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28083         If off is not INTEGER_CST, issue a may not be aligned warning
28084         rather than isn't aligned.  Use isn%'t rather than isn't.
28085         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28086         into MULT_EXPR.
28087         <case MULT_EXPR>: Improve the case when bottom and one of the
28088         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28089         operand, in that case check if the other operand is multiple of
28090         bottom divided by the INTEGER_CST operand.
28092 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28094         PR target/83858
28095         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28096         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28097         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28098         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28099         * config/pa/pa.c (pa_function_arg_advance): Likewise.
28100         (pa_function_arg, pa_arg_partial_bytes): Likewise.
28101         (pa_function_arg_size): New function.
28103 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28105         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28106         in a separate statement.
28108 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28110         PR tree-optimization/83847
28111         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28112         group gathers and scatters.
28114 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
28116         PR rtl-optimization/86620
28117         * params.def (max-sched-ready-insns): Bump minimum value to 1.
28119         PR rtl-optimization/83213
28120         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28121         to last if both are JUMP_INSNs.
28123         PR tree-optimization/83843
28124         * gimple-ssa-store-merging.c
28125         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28126         store_immediate_info for bswap/nop orig_stores.
28128 2018-01-15  Andrew Waterman  <andrew@sifive.com>
28130         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28131         !TARGET_MUL.
28132         <UDIV>: Increase cost if !TARGET_DIV.
28134 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
28136         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28137         (define_attr "cr_logical_3op"): New.
28138         (cceq_ior_compare): Adjust.
28139         (cceq_ior_compare_complement): Adjust.
28140         (*cceq_rev_compare): Adjust.
28141         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28142         (is_cracked_insn): Adjust.
28143         (insn_must_be_first_in_group): Adjust.
28144         * config/rs6000/40x.md: Adjust.
28145         * config/rs6000/440.md: Adjust.
28146         * config/rs6000/476.md: Adjust.
28147         * config/rs6000/601.md: Adjust.
28148         * config/rs6000/603.md: Adjust.
28149         * config/rs6000/6xx.md: Adjust.
28150         * config/rs6000/7450.md: Adjust.
28151         * config/rs6000/7xx.md: Adjust.
28152         * config/rs6000/8540.md: Adjust.
28153         * config/rs6000/cell.md: Adjust.
28154         * config/rs6000/e300c2c3.md: Adjust.
28155         * config/rs6000/e500mc.md: Adjust.
28156         * config/rs6000/e500mc64.md: Adjust.
28157         * config/rs6000/e5500.md: Adjust.
28158         * config/rs6000/e6500.md: Adjust.
28159         * config/rs6000/mpc.md: Adjust.
28160         * config/rs6000/power4.md: Adjust.
28161         * config/rs6000/power5.md: Adjust.
28162         * config/rs6000/power6.md: Adjust.
28163         * config/rs6000/power7.md: Adjust.
28164         * config/rs6000/power8.md: Adjust.
28165         * config/rs6000/power9.md: Adjust.
28166         * config/rs6000/rs64.md: Adjust.
28167         * config/rs6000/titan.md: Adjust.
28169 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28171         * config/i386/predicates.md (indirect_branch_operand): Rewrite
28172         ix86_indirect_branch_register logic.
28174 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28176         * config/i386/constraints.md (Bs): Update
28177         ix86_indirect_branch_register check.  Don't check
28178         ix86_indirect_branch_register with GOT_memory_operand.
28179         (Bw): Likewise.
28180         * config/i386/predicates.md (GOT_memory_operand): Don't check
28181         ix86_indirect_branch_register here.
28182         (GOT32_symbol_operand): Likewise.
28184 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28186         * config/i386/predicates.md (constant_call_address_operand):
28187         Rewrite ix86_indirect_branch_register logic.
28188         (sibcall_insn_operand): Likewise.
28190 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28192         * config/i386/constraints.md (Bs): Replace
28193         ix86_indirect_branch_thunk_register with
28194         ix86_indirect_branch_register.
28195         (Bw): Likewise.
28196         * config/i386/i386.md (indirect_jump): Likewise.
28197         (tablejump): Likewise.
28198         (*sibcall_memory): Likewise.
28199         (*sibcall_value_memory): Likewise.
28200         Peepholes of indirect call and jump via memory: Likewise.
28201         * config/i386/i386.opt: Likewise.
28202         * config/i386/predicates.md (indirect_branch_operand): Likewise.
28203         (GOT_memory_operand): Likewise.
28204         (call_insn_operand): Likewise.
28205         (sibcall_insn_operand): Likewise.
28206         (GOT32_symbol_operand): Likewise.
28208 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
28210         PR middle-end/83837
28211         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28212         type rather than type addr's type points to.
28213         (expand_omp_atomic_mutex): Likewise.
28214         (expand_omp_atomic): Likewise.
28216 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28218         PR target/83839
28219         * config/i386/i386.c (output_indirect_thunk_function): Use
28220         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28221         for  __x86_return_thunk.
28223 2018-01-15  Richard Biener  <rguenther@suse.de>
28225         PR middle-end/83850
28226         * expmed.c (extract_bit_field_1): Fix typo.
28228 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28230         PR target/83687
28231         * config/arm/iterators.md (VF): New mode iterator.
28232         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28233         Remove integer-related logic from pattern.
28234         (neon_vabd<mode>_3): Likewise.
28236 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
28238         PR middle-end/82694
28239         * common.opt (fstrict-overflow): No longer an alias.
28240         (fwrapv-pointer): New option.
28241         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
28242         also for pointer types based on flag_wrapv_pointer.
28243         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
28244         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
28245         opts->x_flag_wrapv got set.
28246         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
28247         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
28248         POINTER_TYPE_OVERFLOW_UNDEFINED.
28249         * match.pd: Likewise in address comparison pattern.
28250         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
28252 2018-01-15  Richard Biener  <rguenther@suse.de>
28254         PR lto/83804
28255         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
28256         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
28257         Reset type names to their identifier if their TYPE_DECL doesn't
28258         have linkage (and thus is used for ODR and devirt).
28259         (save_debug_info_for_decl): Remove.
28260         (save_debug_info_for_type): Likewise.
28261         (add_tree_to_fld_list): Adjust.
28262         * tree-pretty-print.c (dump_generic_node): Make dumping of
28263         type names more robust.
28265 2018-01-15  Richard Biener  <rguenther@suse.de>
28267         * BASE-VER: Bump to 8.0.1.
28269 2018-01-14  Martin Sebor  <msebor@redhat.com>
28271         PR other/83508
28272         * builtins.c (check_access): Avoid warning when the no-warning bit
28273         is set.
28275 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
28277         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
28278         * ira-color (allocno_hard_regs_compare): Likewise.
28280 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
28282         PR target/83013
28283         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
28284         Use .pushsection/.popsection.
28286 2018-01-14  Martin Sebor  <msebor@redhat.com>
28288         PR c++/81327
28289         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
28291 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
28293         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
28294         entry from extra_headers.
28295         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
28296         extra_headers, make the list bitwise identical to the i?86-*-* one.
28298 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28300         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
28301         -mcmodel=large with -mindirect-branch=thunk,
28302         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
28303         -mfunction-return=thunk-extern.
28304         * doc/invoke.texi: Document -mcmodel=large is incompatible with
28305         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
28306         -mfunction-return=thunk and -mfunction-return=thunk-extern.
28308 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28310         * config/i386/i386.c (print_reg): Print the name of the full
28311         integer register without '%'.
28312         (ix86_print_operand): Handle 'V'.
28313         * doc/extend.texi: Document 'V' modifier.
28315 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28317         * config/i386/constraints.md (Bs): Disallow memory operand for
28318         -mindirect-branch-register.
28319         (Bw): Likewise.
28320         * config/i386/predicates.md (indirect_branch_operand): Likewise.
28321         (GOT_memory_operand): Likewise.
28322         (call_insn_operand): Likewise.
28323         (sibcall_insn_operand): Likewise.
28324         (GOT32_symbol_operand): Likewise.
28325         * config/i386/i386.md (indirect_jump): Call convert_memory_address
28326         for -mindirect-branch-register.
28327         (tablejump): Likewise.
28328         (*sibcall_memory): Likewise.
28329         (*sibcall_value_memory): Likewise.
28330         Disallow peepholes of indirect call and jump via memory for
28331         -mindirect-branch-register.
28332         (*call_pop): Replace m with Bw.
28333         (*call_value_pop): Likewise.
28334         (*sibcall_pop_memory): Replace m with Bs.
28335         * config/i386/i386.opt (mindirect-branch-register): New option.
28336         * doc/invoke.texi: Document -mindirect-branch-register option.
28338 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28340         * config/i386/i386-protos.h (ix86_output_function_return): New.
28341         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
28342         set function_return_type.
28343         (indirect_thunk_name): Add ret_p to indicate thunk for function
28344         return.
28345         (output_indirect_thunk_function): Pass false to
28346         indirect_thunk_name.
28347         (ix86_output_indirect_branch_via_reg): Likewise.
28348         (ix86_output_indirect_branch_via_push): Likewise.
28349         (output_indirect_thunk_function): Create alias for function
28350         return thunk if regno < 0.
28351         (ix86_output_function_return): New function.
28352         (ix86_handle_fndecl_attribute): Handle function_return.
28353         (ix86_attribute_table): Add function_return.
28354         * config/i386/i386.h (machine_function): Add
28355         function_return_type.
28356         * config/i386/i386.md (simple_return_internal): Use
28357         ix86_output_function_return.
28358         (simple_return_internal_long): Likewise.
28359         * config/i386/i386.opt (mfunction-return=): New option.
28360         (indirect_branch): Mention -mfunction-return=.
28361         * doc/extend.texi: Document function_return function attribute.
28362         * doc/invoke.texi: Document -mfunction-return= option.
28364 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
28366         * config/i386/i386-opts.h (indirect_branch): New.
28367         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
28368         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
28369         with local indirect jump when converting indirect call and jump.
28370         (ix86_set_indirect_branch_type): New.
28371         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
28372         (indirectlabelno): New.
28373         (indirect_thunk_needed): Likewise.
28374         (indirect_thunk_bnd_needed): Likewise.
28375         (indirect_thunks_used): Likewise.
28376         (indirect_thunks_bnd_used): Likewise.
28377         (INDIRECT_LABEL): Likewise.
28378         (indirect_thunk_name): Likewise.
28379         (output_indirect_thunk): Likewise.
28380         (output_indirect_thunk_function): Likewise.
28381         (ix86_output_indirect_branch_via_reg): Likewise.
28382         (ix86_output_indirect_branch_via_push): Likewise.
28383         (ix86_output_indirect_branch): Likewise.
28384         (ix86_output_indirect_jmp): Likewise.
28385         (ix86_code_end): Call output_indirect_thunk_function if needed.
28386         (ix86_output_call_insn): Call ix86_output_indirect_branch if
28387         needed.
28388         (ix86_handle_fndecl_attribute): Handle indirect_branch.
28389         (ix86_attribute_table): Add indirect_branch.
28390         * config/i386/i386.h (machine_function): Add indirect_branch_type
28391         and has_local_indirect_jump.
28392         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
28393         to true.
28394         (tablejump): Likewise.
28395         (*indirect_jump): Use ix86_output_indirect_jmp.
28396         (*tablejump_1): Likewise.
28397         (simple_return_indirect_internal): Likewise.
28398         * config/i386/i386.opt (mindirect-branch=): New option.
28399         (indirect_branch): New.
28400         (keep): Likewise.
28401         (thunk): Likewise.
28402         (thunk-inline): Likewise.
28403         (thunk-extern): Likewise.
28404         * doc/extend.texi: Document indirect_branch function attribute.
28405         * doc/invoke.texi: Document -mindirect-branch= option.
28407 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
28409         PR ipa/83051
28410         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
28412 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
28414         * ipa-inline.c (want_inline_small_function_p): Return false if
28415         inlining has already failed with CIF_FINAL_ERROR.
28416         (update_caller_keys): Call want_inline_small_function_p before
28417         can_inline_edge_p.
28418         (update_callee_keys): Likewise.
28420 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28422         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
28423         New function.
28424         (rs6000_quadword_masked_address_p): Likewise.
28425         (quad_aligned_load_p): Likewise.
28426         (quad_aligned_store_p): Likewise.
28427         (const_load_sequence_p): Add comment to describe the outer-most loop.
28428         (mimic_memory_attributes_and_flags): New function.
28429         (rs6000_gen_stvx): Likewise.
28430         (replace_swapped_aligned_store): Likewise.
28431         (rs6000_gen_lvx): Likewise.
28432         (replace_swapped_aligned_load): Likewise.
28433         (replace_swapped_load_constant): Capitalize argument name in
28434         comment describing this function.
28435         (rs6000_analyze_swaps): Add a third pass to search for vector loads
28436         and stores that access quad-word aligned addresses and replace
28437         with stvx or lvx instructions when appropriate.
28438         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
28439         New function prototype.
28440         (rs6000_quadword_masked_address_p): Likewise.
28441         (rs6000_gen_lvx): Likewise.
28442         (rs6000_gen_stvx): Likewise.
28443         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
28444         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
28445         when memory address is aligned.
28446         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
28447         this split to select lvx instruction when memory address is aligned.
28448         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
28449         instruction when memory address is aligned.
28450         (*vsx_le_perm_load_v16qi): Likewise.
28451         (four unnamed splitters): Modify to select the stvx instruction
28452         when memory is aligned.
28454 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
28456         * predict.c (determine_unlikely_bbs): Handle correctly BBs
28457         which appears in the queue multiple times.
28459 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28460             Alan Hayward  <alan.hayward@arm.com>
28461             David Sherwood  <david.sherwood@arm.com>
28463         * tree-vectorizer.h (vec_lower_bound): New structure.
28464         (_loop_vec_info): Add check_nonzero and lower_bounds.
28465         (LOOP_VINFO_CHECK_NONZERO): New macro.
28466         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
28467         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
28468         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
28469         fields.  Make seg_len the distance travelled, not including the
28470         access size.
28471         (dr_direction_indicator): Declare.
28472         (dr_zero_step_indicator): Likewise.
28473         (dr_known_forward_stride_p): Likewise.
28474         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
28475         tree-ssanames.h.
28476         (runtime_alias_check_p): Allow runtime alias checks with
28477         variable strides.
28478         (operator ==): Compare access_size and align.
28479         (prune_runtime_alias_test_list): Rework for new distinction between
28480         the access_size and seg_len.
28481         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
28482         segment lengths.
28483         (get_segment_min_max): New function.
28484         (create_intersect_range_checks): Use it.
28485         (dr_step_indicator): New function.
28486         (dr_direction_indicator): Likewise.
28487         (dr_zero_step_indicator): Likewise.
28488         (dr_known_forward_stride_p): Likewise.
28489         * tree-loop-distribution.c (data_ref_segment_size): Return
28490         DR_STEP * (niters - 1).
28491         (compute_alias_check_pairs): Update call to the dr_with_seg_len
28492         constructor.
28493         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28494         (vect_preserves_scalar_order_p): New function, split out from...
28495         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
28496         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28497         (vect_vfa_access_size): New function.
28498         (vect_vfa_align): Likewise.
28499         (vect_compile_time_alias): Take access_size_a and access_b arguments.
28500         (dump_lower_bound): New function.
28501         (vect_check_lower_bound): Likewise.
28502         (vect_small_gap_p): Likewise.
28503         (vectorizable_with_step_bound_p): Likewise.
28504         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28505         depencies if the vectorization factor is 1.  Convert the checks
28506         for nonzero steps into checks on the bounds of DR_STEP.  Try using
28507         a bunds check for variable steps if the minimum required step is
28508         relatively small. Update calls to the dr_with_seg_len
28509         constructor and to vect_compile_time_alias.
28510         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28511         function.
28512         (vect_loop_versioning): Call it.
28513         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28514         when retrying.
28515         (vect_estimate_min_profitable_iters): Account for any bounds checks.
28517 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28518             Alan Hayward  <alan.hayward@arm.com>
28519             David Sherwood  <david.sherwood@arm.com>
28521         * doc/sourcebuild.texi (vect_scatter_store): Document.
28522         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28523         optabs.
28524         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28525         Document.
28526         * genopinit.c (main): Add supports_vec_scatter_store and
28527         supports_vec_scatter_store_cached to target_optabs.
28528         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28529         IFN_MASK_SCATTER_STORE.
28530         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28531         functions.
28532         * internal-fn.h (internal_store_fn_p): Declare.
28533         (internal_fn_stored_value_index): Likewise.
28534         * internal-fn.c (scatter_store_direct): New macro.
28535         (expand_scatter_store_optab_fn): New function.
28536         (direct_scatter_store_optab_supported_p): New macro.
28537         (internal_store_fn_p): New function.
28538         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28539         IFN_MASK_SCATTER_STORE.
28540         (internal_fn_mask_index): Likewise.
28541         (internal_fn_stored_value_index): New function.
28542         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28543         for scatter stores.
28544         * optabs-query.h (supports_vec_scatter_store_p): Declare.
28545         * optabs-query.c (supports_vec_scatter_store_p): New function.
28546         * tree-vectorizer.h (vect_get_store_rhs): Declare.
28547         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28548         true for scatter stores.
28549         (vect_gather_scatter_fn_p): Handle scatter stores too.
28550         (vect_check_gather_scatter): Consider using scatter stores if
28551         supports_vec_scatter_store_p.
28552         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28553         scatter stores too.
28554         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28555         internal_fn_stored_value_index.
28556         (check_load_store_masking): Handle scatter stores too.
28557         (vect_get_store_rhs): Make public.
28558         (vectorizable_call): Use internal_store_fn_p.
28559         (vectorizable_store): Handle scatter store internal functions.
28560         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28561         when deciding whether the end of the group has been reached.
28562         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28563         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28564         (mask_scatter_store<mode>): New insns.
28566 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28567             Alan Hayward  <alan.hayward@arm.com>
28568             David Sherwood  <david.sherwood@arm.com>
28570         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28571         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28572         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28573         function.
28574         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28575         Use vect_truncate_gather_scatter_offset if we can't treat the
28576         operation as a normal gather load or scatter store.
28577         (get_group_load_store_type): Take the gather_scatter_info
28578         as argument.  Try using a gather load or scatter store for
28579         single-element groups.
28580         (get_load_store_type): Update calls to get_group_load_store_type
28581         and vect_use_strided_gather_scatters_p.
28583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28584             Alan Hayward  <alan.hayward@arm.com>
28585             David Sherwood  <david.sherwood@arm.com>
28587         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28588         optional tree argument.
28589         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28590         null target hooks.
28591         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28592         but continue to use the current value as a fallback.
28593         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28594         to compare the updates.
28595         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28596         (get_load_store_type): Use it when handling a strided access.
28597         (vect_get_strided_load_store_ops): New function.
28598         (vect_get_data_ptr_increment): Likewise.
28599         (vectorizable_load): Handle strided gather loads.  Always pass
28600         a step to vect_create_data_ref_ptr and bump_vector_ptr.
28602 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28603             Alan Hayward  <alan.hayward@arm.com>
28604             David Sherwood  <david.sherwood@arm.com>
28606         * doc/md.texi (gather_load@var{m}): Document.
28607         (mask_gather_load@var{m}): Likewise.
28608         * genopinit.c (main): Add supports_vec_gather_load and
28609         supports_vec_gather_load_cached to target_optabs.
28610         * optabs-tree.c (init_tree_optimization_optabs): Use
28611         ggc_cleared_alloc to allocate target_optabs.
28612         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28613         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28614         functions.
28615         * internal-fn.h (internal_load_fn_p): Declare.
28616         (internal_gather_scatter_fn_p): Likewise.
28617         (internal_fn_mask_index): Likewise.
28618         (internal_gather_scatter_fn_supported_p): Likewise.
28619         * internal-fn.c (gather_load_direct): New macro.
28620         (expand_gather_load_optab_fn): New function.
28621         (direct_gather_load_optab_supported_p): New macro.
28622         (direct_internal_fn_optab): New function.
28623         (internal_load_fn_p): Likewise.
28624         (internal_gather_scatter_fn_p): Likewise.
28625         (internal_fn_mask_index): Likewise.
28626         (internal_gather_scatter_fn_supported_p): Likewise.
28627         * optabs-query.c (supports_at_least_one_mode_p): New function.
28628         (supports_vec_gather_load_p): Likewise.
28629         * optabs-query.h (supports_vec_gather_load_p): Declare.
28630         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28631         and memory_type field.
28632         (NUM_PATTERNS): Bump to 15.
28633         * tree-vect-data-refs.c: Include internal-fn.h.
28634         (vect_gather_scatter_fn_p): New function.
28635         (vect_describe_gather_scatter_call): Likewise.
28636         (vect_check_gather_scatter): Try using internal functions for
28637         gather loads.  Recognize existing calls to a gather load function.
28638         (vect_analyze_data_refs): Consider using gather loads if
28639         supports_vec_gather_load_p.
28640         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28641         (vect_get_gather_scatter_offset_type): Likewise.
28642         (vect_convert_mask_for_vectype): Likewise.
28643         (vect_add_conversion_to_patterm): Likewise.
28644         (vect_try_gather_scatter_pattern): Likewise.
28645         (vect_recog_gather_scatter_pattern): New pattern recognizer.
28646         (vect_vect_recog_func_ptrs): Add it.
28647         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28648         internal_fn_mask_index and internal_gather_scatter_fn_p.
28649         (check_load_store_masking): Take the gather_scatter_info as an
28650         argument and handle gather loads.
28651         (vect_get_gather_scatter_ops): New function.
28652         (vectorizable_call): Check internal_load_fn_p.
28653         (vectorizable_load): Likewise.  Handle gather load internal
28654         functions.
28655         (vectorizable_store): Update call to check_load_store_masking.
28656         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28657         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28658         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28659         (aarch64_gather_scale_operand_d): New predicates.
28660         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28661         (mask_gather_load<mode>): New insns.
28663 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28664             Alan Hayward  <alan.hayward@arm.com>
28665             David Sherwood  <david.sherwood@arm.com>
28667         * optabs.def (fold_left_plus_optab): New optab.
28668         * doc/md.texi (fold_left_plus_@var{m}): Document.
28669         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28670         * internal-fn.c (fold_left_direct): Define.
28671         (expand_fold_left_optab_fn): Likewise.
28672         (direct_fold_left_optab_supported_p): Likewise.
28673         * fold-const-call.c (fold_const_fold_left): New function.
28674         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28675         * tree-parloops.c (valid_reduction_p): New function.
28676         (gather_scalar_reductions): Use it.
28677         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28678         (vect_finish_replace_stmt): Declare.
28679         * tree-vect-loop.c (fold_left_reduction_fn): New function.
28680         (needs_fold_left_reduction_p): New function, split out from...
28681         (vect_is_simple_reduction): ...here.  Accept reductions that
28682         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28683         (vect_force_simple_reduction): Also store the reduction type in
28684         the assignment's STMT_VINFO_REDUC_TYPE.
28685         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28686         (merge_with_identity): New function.
28687         (vect_expand_fold_left): Likewise.
28688         (vectorize_fold_left_reduction): Likewise.
28689         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
28690         scalar phi in place for it.  Check for target support and reject
28691         cases that would reassociate the operation.  Defer the transform
28692         phase to vectorize_fold_left_reduction.
28693         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28694         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28695         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28697 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28699         * tree-if-conv.c (predicate_mem_writes): Remove redundant
28700         call to ifc_temp_var.
28702 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28703             Alan Hayward  <alan.hayward@arm.com>
28704             David Sherwood  <david.sherwood@arm.com>
28706         * target.def (legitimize_address_displacement): Take the original
28707         offset as a poly_int.
28708         * targhooks.h (default_legitimize_address_displacement): Update
28709         accordingly.
28710         * targhooks.c (default_legitimize_address_displacement): Likewise.
28711         * doc/tm.texi: Regenerate.
28712         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28713         as an argument, moving assert of ad->disp == ad->disp_term to...
28714         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
28715         Try calling targetm.legitimize_address_displacement before expanding
28716         the address rather than afterwards, and adjust for the new interface.
28717         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28718         Match the new hook interface.  Handle SVE addresses.
28719         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28720         new hook interface.
28722 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28724         * Makefile.in (OBJS): Add early-remat.o.
28725         * target.def (select_early_remat_modes): New hook.
28726         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28727         * doc/tm.texi: Regenerate.
28728         * targhooks.h (default_select_early_remat_modes): Declare.
28729         * targhooks.c (default_select_early_remat_modes): New function.
28730         * timevar.def (TV_EARLY_REMAT): New timevar.
28731         * passes.def (pass_early_remat): New pass.
28732         * tree-pass.h (make_pass_early_remat): Declare.
28733         * early-remat.c: New file.
28734         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28735         function.
28736         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28738 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28739             Alan Hayward  <alan.hayward@arm.com>
28740             David Sherwood  <david.sherwood@arm.com>
28742         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28743         vfm1 with a bound_epilog parameter.
28744         (vect_do_peeling): Update calls accordingly, and move the prologue
28745         call earlier in the function.  Treat the base bound_epilog as 0 for
28746         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
28747         this base when peeling for gaps.
28748         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28749         with fully-masked loops.
28750         (vect_estimate_min_profitable_iters): Handle the single peeled
28751         iteration in that case.
28753 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28754             Alan Hayward  <alan.hayward@arm.com>
28755             David Sherwood  <david.sherwood@arm.com>
28757         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28758         single-element interleaving even if the size is not a power of 2.
28759         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28760         accesses for single-element interleaving if the group size is
28761         not a power of 2.
28763 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28764             Alan Hayward  <alan.hayward@arm.com>
28765             David Sherwood  <david.sherwood@arm.com>
28767         * doc/md.texi (fold_extract_last_@var{m}): Document.
28768         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28769         * optabs.def (fold_extract_last_optab): New optab.
28770         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28771         * internal-fn.c (fold_extract_direct): New macro.
28772         (expand_fold_extract_optab_fn): Likewise.
28773         (direct_fold_extract_optab_supported_p): Likewise.
28774         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28775         * tree-vect-loop.c (vect_model_reduction_cost): Handle
28776         EXTRACT_LAST_REDUCTION.
28777         (get_initial_def_for_reduction): Do not create an initial vector
28778         for EXTRACT_LAST_REDUCTION reductions.
28779         (vectorizable_reduction): Leave the scalar phi in place for
28780         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
28781         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
28782         epilogue code for EXTRACT_LAST_REDUCTION and defer the
28783         transform phase to vectorizable_condition.
28784         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28785         split out from...
28786         (vect_finish_stmt_generation): ...here.
28787         (vect_finish_replace_stmt): New function.
28788         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28789         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28790         pattern.
28791         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28793 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28794             Alan Hayward  <alan.hayward@arm.com>
28795             David Sherwood  <david.sherwood@arm.com>
28797         * doc/md.texi (extract_last_@var{m}): Document.
28798         * optabs.def (extract_last_optab): New optab.
28799         * internal-fn.def (EXTRACT_LAST): New internal function.
28800         * internal-fn.c (cond_unary_direct): New macro.
28801         (expand_cond_unary_optab_fn): Likewise.
28802         (direct_cond_unary_optab_supported_p): Likewise.
28803         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28804         loops using EXTRACT_LAST.
28805         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28806         (extract_last_<mode>): ...this optab.
28807         (vec_extract<mode><Vel>): Update accordingly.
28809 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28810             Alan Hayward  <alan.hayward@arm.com>
28811             David Sherwood  <david.sherwood@arm.com>
28813         * target.def (empty_mask_is_expensive): New hook.
28814         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28815         * doc/tm.texi: Regenerate.
28816         * targhooks.h (default_empty_mask_is_expensive): Declare.
28817         * targhooks.c (default_empty_mask_is_expensive): New function.
28818         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28819         if the target says that empty masks are expensive.
28820         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28821         New function.
28822         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28824 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28825             Alan Hayward  <alan.hayward@arm.com>
28826             David Sherwood  <david.sherwood@arm.com>
28828         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28829         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28830         (vect_use_loop_mask_for_alignment_p): New function.
28831         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28832         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28833         niters_skip argument.  Make sure that the first niters_skip elements
28834         of the first iteration are inactive.
28835         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28836         Update call to vect_set_loop_masks_directly.
28837         (get_misalign_in_elems): New function, split out from...
28838         (vect_gen_prolog_loop_niters): ...here.
28839         (vect_update_init_of_dr): Take a code argument that specifies whether
28840         the adjustment should be added or subtracted.
28841         (vect_update_init_of_drs): Likewise.
28842         (vect_prepare_for_masked_peels): New function.
28843         (vect_do_peeling): Skip prologue peeling if we're using a mask
28844         instead.  Update call to vect_update_inits_of_drs.
28845         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28846         mask_skip_niters.
28847         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28848         alignment.  Do not include the number of peeled iterations in
28849         the minimum threshold in that case.
28850         (vectorizable_induction): Adjust the start value down by
28851         LOOP_VINFO_MASK_SKIP_NITERS iterations.
28852         (vect_transform_loop): Call vect_prepare_for_masked_peels.
28853         Take the number of skipped iterations into account when calculating
28854         the loop bounds.
28855         * tree-vect-stmts.c (vect_gen_while_not): New function.
28857 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28858             Alan Hayward  <alan.hayward@arm.com>
28859             David Sherwood  <david.sherwood@arm.com>
28861         * doc/sourcebuild.texi (vect_fully_masked): Document.
28862         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28863         default value to 0.
28864         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28865         split out from...
28866         (vect_analyze_loop_2): ...here. Don't check the vectorization
28867         factor against the number of loop iterations if the loop is
28868         fully-masked.
28870 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28871             Alan Hayward  <alan.hayward@arm.com>
28872             David Sherwood  <david.sherwood@arm.com>
28874         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28875         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28876         (dump_groups): Update accordingly.
28877         (iv_use::mem_type): New member variable.
28878         (address_p): New function.
28879         (record_use): Add a mem_type argument and initialize the new
28880         mem_type field.
28881         (record_group_use): Add a mem_type argument.  Use address_p.
28882         Remove obsolete null checks of base_object.  Update call to record_use.
28883         (find_interesting_uses_op): Update call to record_group_use.
28884         (find_interesting_uses_cond): Likewise.
28885         (find_interesting_uses_address): Likewise.
28886         (get_mem_type_for_internal_fn): New function.
28887         (find_address_like_use): Likewise.
28888         (find_interesting_uses_stmt): Try find_address_like_use before
28889         calling find_interesting_uses_op.
28890         (addr_offset_valid_p): Use the iv mem_type field as the type
28891         of the addressed memory.
28892         (add_autoinc_candidates): Likewise.
28893         (get_address_cost): Likewise.
28894         (split_small_address_groups_p): Use address_p.
28895         (split_address_groups): Likewise.
28896         (add_iv_candidate_for_use): Likewise.
28897         (autoinc_possible_for_pair): Likewise.
28898         (rewrite_groups): Likewise.
28899         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28900         (determine_group_iv_cost): Update after split of USE_ADDRESS.
28901         (get_alias_ptr_type_for_ptr_address): New function.
28902         (rewrite_use_address): Rewrite address uses in calls that were
28903         identified by find_address_like_use.
28905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28906             Alan Hayward  <alan.hayward@arm.com>
28907             David Sherwood  <david.sherwood@arm.com>
28909         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28910         TARGET_MEM_REFs.
28911         * gimple-expr.h (is_gimple_addressable: Likewise.
28912         * gimple-expr.c (is_gimple_address): Likewise.
28913         * internal-fn.c (expand_call_mem_ref): New function.
28914         (expand_mask_load_optab_fn): Use it.
28915         (expand_mask_store_optab_fn): Likewise.
28917 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28918             Alan Hayward  <alan.hayward@arm.com>
28919             David Sherwood  <david.sherwood@arm.com>
28921         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28922         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28923         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28924         (cond_umax@var{mode}): Document.
28925         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28926         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28927         (cond_umin_optab, cond_umax_optab): New optabs.
28928         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28929         (COND_IOR, COND_XOR): New internal functions.
28930         * internal-fn.h (get_conditional_internal_fn): Declare.
28931         * internal-fn.c (cond_binary_direct): New macro.
28932         (expand_cond_binary_optab_fn): Likewise.
28933         (direct_cond_binary_optab_supported_p): Likewise.
28934         (get_conditional_internal_fn): New function.
28935         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28936         Cope with reduction statements that are vectorized as calls rather
28937         than assignments.
28938         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28939         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28940         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28941         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28942         (UNSPEC_COND_EOR): New unspecs.
28943         (optab): Add mappings for them.
28944         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28945         (sve_int_op, sve_fp_op): New int attributes.
28947 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28948             Alan Hayward  <alan.hayward@arm.com>
28949             David Sherwood  <david.sherwood@arm.com>
28951         * optabs.def (while_ult_optab): New optab.
28952         * doc/md.texi (while_ult@var{m}@var{n}): Document.
28953         * internal-fn.def (WHILE_ULT): New internal function.
28954         * internal-fn.h (direct_internal_fn_supported_p): New override
28955         that takes two types as argument.
28956         * internal-fn.c (while_direct): New macro.
28957         (expand_while_optab_fn): New function.
28958         (convert_optab_supported_p): Likewise.
28959         (direct_while_optab_supported_p): New macro.
28960         * wide-int.h (wi::udiv_ceil): New function.
28961         * tree-vectorizer.h (rgroup_masks): New structure.
28962         (vec_loop_masks): New typedef.
28963         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28964         and fully_masked_p.
28965         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28966         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28967         (vect_max_vf): New function.
28968         (slpeel_make_loop_iterate_ntimes): Delete.
28969         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28970         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28971         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28972         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28973         internal-fn.h, stor-layout.h and optabs-query.h.
28974         (vect_set_loop_mask): New function.
28975         (add_preheader_seq): Likewise.
28976         (add_header_seq): Likewise.
28977         (interleave_supported_p): Likewise.
28978         (vect_maybe_permute_loop_masks): Likewise.
28979         (vect_set_loop_masks_directly): Likewise.
28980         (vect_set_loop_condition_masked): Likewise.
28981         (vect_set_loop_condition_unmasked): New function, split out from
28982         slpeel_make_loop_iterate_ntimes.
28983         (slpeel_make_loop_iterate_ntimes): Rename to..
28984         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
28985         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28986         (vect_do_peeling): Update call accordingly.
28987         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28988         loops.
28989         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28990         mask_compare_type, can_fully_mask_p and fully_masked_p.
28991         (release_vec_loop_masks): New function.
28992         (_loop_vec_info): Use it to free the loop masks.
28993         (can_produce_all_loop_masks_p): New function.
28994         (vect_get_max_nscalars_per_iter): Likewise.
28995         (vect_verify_full_masking): Likewise.
28996         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28997         retries, and free the mask rgroups before retrying.  Check loop-wide
28998         reasons for disallowing fully-masked loops.  Make the final decision
28999         about whether use a fully-masked loop or not.
29000         (vect_estimate_min_profitable_iters): Do not assume that peeling
29001         for the number of iterations will be needed for fully-masked loops.
29002         (vectorizable_reduction): Disable fully-masked loops.
29003         (vectorizable_live_operation): Likewise.
29004         (vect_halve_mask_nunits): New function.
29005         (vect_double_mask_nunits): Likewise.
29006         (vect_record_loop_mask): Likewise.
29007         (vect_get_loop_mask): Likewise.
29008         (vect_transform_loop): Handle the case in which the final loop
29009         iteration might handle a partial vector.  Call vect_set_loop_condition
29010         instead of slpeel_make_loop_iterate_ntimes.
29011         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
29012         (check_load_store_masking): New function.
29013         (prepare_load_store_mask): Likewise.
29014         (vectorizable_store): Handle fully-masked loops.
29015         (vectorizable_load): Likewise.
29016         (supportable_widening_operation): Use vect_halve_mask_nunits for
29017         booleans.
29018         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
29019         (vect_gen_while): New function.
29020         * config/aarch64/aarch64.md (umax<mode>3): New expander.
29021         (aarch64_uqdec<mode>): New insn.
29023 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29024             Alan Hayward  <alan.hayward@arm.com>
29025             David Sherwood  <david.sherwood@arm.com>
29027         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
29028         (reduc_xor_scal_optab): New optabs.
29029         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
29030         (reduc_xor_scal_@var{m}): Document.
29031         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
29032         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
29033         internal functions.
29034         * fold-const-call.c (fold_const_call): Handle them.
29035         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
29036         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
29037         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
29038         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
29039         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
29040         (UNSPEC_XORV): New unspecs.
29041         (optab): Add entries for them.
29042         (BITWISEV): New int iterator.
29043         (bit_reduc_op): New int attributes.
29045 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29046             Alan Hayward  <alan.hayward@arm.com>
29047             David Sherwood  <david.sherwood@arm.com>
29049         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
29050         * internal-fn.def (VEC_SHL_INSERT): New internal function.
29051         * optabs.def (vec_shl_insert_optab): New optab.
29052         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
29053         (duplicate_and_interleave): Likewise.
29054         * tree-vect-loop.c: Include internal-fn.h.
29055         (neutral_op_for_slp_reduction): New function, split out from
29056         get_initial_defs_for_reduction.
29057         (get_initial_def_for_reduction): Handle option 2 for variable-length
29058         vectors by loading the neutral value into a vector and then shifting
29059         the initial value into element 0.
29060         (get_initial_defs_for_reduction): Replace the code argument with
29061         the neutral value calculated by neutral_op_for_slp_reduction.
29062         Use gimple_build_vector for constant-length vectors.
29063         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29064         but the first group_size elements have a neutral value.
29065         Use duplicate_and_interleave otherwise.
29066         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29067         Update call to get_initial_defs_for_reduction.  Handle SLP
29068         reductions for variable-length vectors by creating one vector
29069         result for each scalar result, with the elements associated
29070         with other scalar results stubbed out with the neutral value.
29071         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29072         Require IFN_VEC_SHL_INSERT for double reductions on
29073         variable-length vectors, or SLP reductions that have
29074         a neutral value.  Require can_duplicate_and_interleave_p
29075         support for variable-length unchained SLP reductions if there
29076         is no neutral value, such as for MIN/MAX reductions.  Also require
29077         the number of vector elements to be a multiple of the number of
29078         SLP statements when doing variable-length unchained SLP reductions.
29079         Update call to vect_create_epilog_for_reduction.
29080         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29081         and remove initial values.
29082         (duplicate_and_interleave): Make public.
29083         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29084         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29086 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29087             Alan Hayward  <alan.hayward@arm.com>
29088             David Sherwood  <david.sherwood@arm.com>
29090         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29091         (can_duplicate_and_interleave_p): New function.
29092         (vect_get_and_check_slp_defs): Take the vector of statements
29093         rather than just the current one.  Remove excess parentheses.
29094         Restriction rejectinon of vect_constant_def and vect_external_def
29095         for variable-length vectors to boolean types, or types for which
29096         can_duplicate_and_interleave_p is false.
29097         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29098         (duplicate_and_interleave): New function.
29099         (vect_get_constant_vectors): Use gimple_build_vector for
29100         constant-length vectors and suitable variable-length constant
29101         vectors.  Use duplicate_and_interleave for other variable-length
29102         vectors.  Don't defer the update when inserting new statements.
29104 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29105             Alan Hayward  <alan.hayward@arm.com>
29106             David Sherwood  <david.sherwood@arm.com>
29108         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29109         min_profitable_iters doesn't go negative.
29111 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29112             Alan Hayward  <alan.hayward@arm.com>
29113             David Sherwood  <david.sherwood@arm.com>
29115         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29116         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29117         * optabs.def (vec_mask_load_lanes_optab): New optab.
29118         (vec_mask_store_lanes_optab): Likewise.
29119         * internal-fn.def (MASK_LOAD_LANES): New internal function.
29120         (MASK_STORE_LANES): Likewise.
29121         * internal-fn.c (mask_load_lanes_direct): New macro.
29122         (mask_store_lanes_direct): Likewise.
29123         (expand_mask_load_optab_fn): Handle masked operations.
29124         (expand_mask_load_lanes_optab_fn): New macro.
29125         (expand_mask_store_optab_fn): Handle masked operations.
29126         (expand_mask_store_lanes_optab_fn): New macro.
29127         (direct_mask_load_lanes_optab_supported_p): Likewise.
29128         (direct_mask_store_lanes_optab_supported_p): Likewise.
29129         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29130         parameter.
29131         (vect_load_lanes_supported): Likewise.
29132         * tree-vect-data-refs.c (strip_conversion): New function.
29133         (can_group_stmts_p): Likewise.
29134         (vect_analyze_data_ref_accesses): Use it instead of checking
29135         for a pair of assignments.
29136         (vect_store_lanes_supported): Take a masked_p parameter.
29137         (vect_load_lanes_supported): Likewise.
29138         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29139         vect_store_lanes_supported and vect_load_lanes_supported.
29140         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29141         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29142         parameter.  Don't allow gaps for masked accesses.
29143         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
29144         and vect_load_lanes_supported.
29145         (get_load_store_type): Take a masked_p parameter and update
29146         call to get_group_load_store_type.
29147         (vectorizable_store): Update call to get_load_store_type.
29148         Handle IFN_MASK_STORE_LANES.
29149         (vectorizable_load): Update call to get_load_store_type.
29150         Handle IFN_MASK_LOAD_LANES.
29152 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29153             Alan Hayward  <alan.hayward@arm.com>
29154             David Sherwood  <david.sherwood@arm.com>
29156         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29157         modes for SVE.
29158         * config/aarch64/aarch64-protos.h
29159         (aarch64_sve_struct_memory_operand_p): Declare.
29160         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29161         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29162         (VPRED, vpred): Handle SVE structure modes.
29163         * config/aarch64/constraints.md (Utx): New constraint.
29164         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29165         (aarch64_sve_struct_nonimmediate_operand): New predicates.
29166         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29167         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29168         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29169         structure modes.  Split into pieces after RA.
29170         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29171         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29172         New patterns.
29173         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29174         SVE structure modes.
29175         (aarch64_classify_address): Likewise.
29176         (sizetochar): Move earlier in file.
29177         (aarch64_print_operand): Handle SVE register lists.
29178         (aarch64_array_mode): New function.
29179         (aarch64_sve_struct_memory_operand_p): Likewise.
29180         (TARGET_ARRAY_MODE): Redefine.
29182 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29183             Alan Hayward  <alan.hayward@arm.com>
29184             David Sherwood  <david.sherwood@arm.com>
29186         * target.def (array_mode): New target hook.
29187         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29188         * doc/tm.texi: Regenerate.
29189         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29190         * hooks.c (hook_optmode_mode_uhwi_none): New function.
29191         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29192         targetm.array_mode.
29193         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
29194         type sizes.
29196 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29197             Alan Hayward  <alan.hayward@arm.com>
29198             David Sherwood  <david.sherwood@arm.com>
29200         * fold-const.c (fold_binary_loc): Check the argument types
29201         rather than the result type when testing for a vector operation.
29203 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29205         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29206         * doc/tm.texi: Regenerate.
29208 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29209             Alan Hayward  <alan.hayward@arm.com>
29210             David Sherwood  <david.sherwood@arm.com>
29212         * doc/invoke.texi (-msve-vector-bits=): Document new option.
29213         (sve): Document new AArch64 extension.
29214         * doc/md.texi (w): Extend the description of the AArch64
29215         constraint to include SVE vectors.
29216         (Upl, Upa): Document new AArch64 predicate constraints.
29217         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29218         enum.
29219         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29220         (msve-vector-bits=): New option.
29221         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29222         SVE when these are disabled.
29223         (sve): New extension.
29224         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29225         modes.  Adjust their number of units based on aarch64_sve_vg.
29226         (MAX_BITSIZE_MODE_ANY_MODE): Define.
29227         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29228         aarch64_addr_query_type.
29229         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29230         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29231         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29232         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29233         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29234         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29235         (aarch64_simd_imm_zero_p): Delete.
29236         (aarch64_check_zero_based_sve_index_immediate): Declare.
29237         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29238         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29239         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29240         (aarch64_sve_float_mul_immediate_p): Likewise.
29241         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29242         rather than an rtx.
29243         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
29244         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
29245         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
29246         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
29247         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
29248         (aarch64_regmode_natural_size): Likewise.
29249         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
29250         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
29251         left one place.
29252         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
29253         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
29254         for VG and the SVE predicate registers.
29255         (V_ALIASES): Add a "z"-prefixed alias.
29256         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
29257         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
29258         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
29259         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
29260         (REG_CLASS_NAMES): Add entries for them.
29261         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
29262         and the predicate registers.
29263         (aarch64_sve_vg): Declare.
29264         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
29265         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
29266         (REGMODE_NATURAL_SIZE): Define.
29267         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
29268         SVE macros.
29269         * config/aarch64/aarch64.c: Include cfgrtl.h.
29270         (simd_immediate_info): Add a constructor for series vectors,
29271         and an associated step field.
29272         (aarch64_sve_vg): New variable.
29273         (aarch64_dbx_register_number): Handle VG and the predicate registers.
29274         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
29275         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
29276         (VEC_ANY_DATA, VEC_STRUCT): New constants.
29277         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
29278         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
29279         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
29280         (aarch64_get_mask_mode): New functions.
29281         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
29282         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
29283         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
29284         predicate modes and predicate registers.  Explicitly restrict
29285         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
29286         to store a vector mode if it is recognized by
29287         aarch64_classify_vector_mode.
29288         (aarch64_regmode_natural_size): New function.
29289         (aarch64_hard_regno_caller_save_mode): Return the original mode
29290         for predicates.
29291         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
29292         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
29293         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
29294         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
29295         functions.
29296         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
29297         does not overlap dest if the function is frame-related.  Handle
29298         SVE constants.
29299         (aarch64_split_add_offset): New function.
29300         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
29301         them aarch64_add_offset.
29302         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
29303         and update call to aarch64_sub_sp.
29304         (aarch64_add_cfa_expression): New function.
29305         (aarch64_expand_prologue): Pass extra temporary registers to the
29306         functions above.  Handle the case in which we need to emit new
29307         DW_CFA_expressions for registers that were originally saved
29308         relative to the stack pointer, but now have to be expressed
29309         relative to the frame pointer.
29310         (aarch64_output_mi_thunk): Pass extra temporary registers to the
29311         functions above.
29312         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
29313         IP0 and IP1 values for SVE frames.
29314         (aarch64_expand_vec_series): New function.
29315         (aarch64_expand_sve_widened_duplicate): Likewise.
29316         (aarch64_expand_sve_const_vector): Likewise.
29317         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
29318         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
29319         into the register, rather than emitting a SET directly.
29320         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
29321         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
29322         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
29323         (offset_9bit_signed_scaled_p): New functions.
29324         (aarch64_replicate_bitmask_imm): New function.
29325         (aarch64_bitmask_imm): Use it.
29326         (aarch64_cannot_force_const_mem): Reject expressions involving
29327         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
29328         (aarch64_classify_index): Handle SVE indices, by requiring
29329         a plain register index with a scale that matches the element size.
29330         (aarch64_classify_address): Handle SVE addresses.  Assert that
29331         the mode of the address is VOIDmode or an integer mode.
29332         Update call to aarch64_classify_symbol.
29333         (aarch64_classify_symbolic_expression): Update call to
29334         aarch64_classify_symbol.
29335         (aarch64_const_vec_all_in_range_p): New function.
29336         (aarch64_print_vector_float_operand): Likewise.
29337         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
29338         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
29339         and the FP immediates 1.0 and 0.5.
29340         (aarch64_print_address_internal): Handle SVE addresses.
29341         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
29342         (aarch64_regno_regclass): Handle predicate registers.
29343         (aarch64_secondary_reload): Handle big-endian reloads of SVE
29344         data modes.
29345         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
29346         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
29347         (aarch64_convert_sve_vector_bits): New function.
29348         (aarch64_override_options): Use it to handle -msve-vector-bits=.
29349         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
29350         rather than an rtx.
29351         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
29352         Handle SVE vector and predicate modes.  Accept VL-based constants
29353         that need only one temporary register, and VL offsets that require
29354         no temporary registers.
29355         (aarch64_conditional_register_usage): Mark the predicate registers
29356         as fixed if SVE isn't available.
29357         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
29358         Return true for SVE vector and predicate modes.
29359         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
29360         rather than an unsigned int.  Handle SVE modes.
29361         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
29362         SVE modes.
29363         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
29364         if SVE is enabled.
29365         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
29366         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
29367         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
29368         (aarch64_sve_float_mul_immediate_p): New functions.
29369         (aarch64_sve_valid_immediate): New function.
29370         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
29371         Explicitly reject structure modes.  Check for INDEX constants.
29372         Handle PTRUE and PFALSE constants.
29373         (aarch64_check_zero_based_sve_index_immediate): New function.
29374         (aarch64_simd_imm_zero_p): Delete.
29375         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
29376         vector modes.  Accept constants in the range of CNT[BHWD].
29377         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
29378         ask for an Advanced SIMD mode.
29379         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
29380         (aarch64_simd_vector_alignment): Handle SVE predicates.
29381         (aarch64_vectorize_preferred_vector_alignment): New function.
29382         (aarch64_simd_vector_alignment_reachable): Use it instead of
29383         the vector size.
29384         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
29385         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
29386         functions.
29387         (MAX_VECT_LEN): Delete.
29388         (expand_vec_perm_d): Add a vec_flags field.
29389         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
29390         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
29391         (aarch64_evpc_ext): Don't apply a big-endian lane correction
29392         for SVE modes.
29393         (aarch64_evpc_rev): Rename to...
29394         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
29395         (aarch64_evpc_rev_global): New function.
29396         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
29397         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
29398         MAX_VECT_LEN.
29399         (aarch64_evpc_sve_tbl): New function.
29400         (aarch64_expand_vec_perm_const_1): Update after rename of
29401         aarch64_evpc_rev.  Handle SVE permutes too, trying
29402         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
29403         than aarch64_evpc_tbl.
29404         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
29405         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
29406         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
29407         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
29408         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
29409         (aarch64_expand_sve_vcond): New functions.
29410         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
29411         of aarch64_vector_mode_p.
29412         (aarch64_dwarf_poly_indeterminate_value): New function.
29413         (aarch64_compute_pressure_classes): Likewise.
29414         (aarch64_can_change_mode_class): Likewise.
29415         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
29416         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
29417         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
29418         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
29419         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
29420         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
29421         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
29422         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
29423         constraints.
29424         (Dn, Dl, Dr): Accept const as well as const_vector.
29425         (Dz): Likewise.  Compare against CONST0_RTX.
29426         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
29427         of "vector" where appropriate.
29428         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
29429         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
29430         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
29431         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
29432         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
29433         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
29434         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
29435         (v_int_equiv): Extend to SVE modes.
29436         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
29437         mode attributes.
29438         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
29439         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
29440         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
29441         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
29442         (SVE_COND_FP_CMP): New int iterators.
29443         (perm_hilo): Handle the new unpack unspecs.
29444         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
29445         attributes.
29446         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
29447         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
29448         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
29449         (aarch64_equality_operator, aarch64_constant_vector_operand)
29450         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
29451         (aarch64_sve_nonimmediate_operand): Likewise.
29452         (aarch64_sve_general_operand): Likewise.
29453         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
29454         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
29455         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
29456         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
29457         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
29458         (aarch64_sve_float_arith_immediate): Likewise.
29459         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
29460         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
29461         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
29462         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
29463         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
29464         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
29465         (aarch64_sve_float_arith_operand): Likewise.
29466         (aarch64_sve_float_arith_with_sub_operand): Likewise.
29467         (aarch64_sve_float_mul_operand): Likewise.
29468         (aarch64_sve_vec_perm_operand): Likewise.
29469         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
29470         (aarch64_mov_operand): Accept const_poly_int and const_vector.
29471         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
29472         as well as const_vector.
29473         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
29474         in file.  Use CONST0_RTX and CONSTM1_RTX.
29475         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
29476         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
29477         Use aarch64_simd_imm_zero.
29478         * config/aarch64/aarch64-sve.md: New file.
29479         * config/aarch64/aarch64.md: Include it.
29480         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
29481         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
29482         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
29483         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
29484         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
29485         (sve): New attribute.
29486         (enabled): Disable instructions with the sve attribute unless
29487         TARGET_SVE.
29488         (movqi, movhi): Pass CONST_POLY_INT operaneds through
29489         aarch64_expand_mov_immediate.
29490         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
29491         CNT[BHSD] immediates.
29492         (movti): Split CONST_POLY_INT moves into two halves.
29493         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29494         Split additions that need a temporary here if the destination
29495         is the stack pointer.
29496         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29497         (*add<mode>3_poly_1): New instruction.
29498         (set_clobber_cc): New expander.
29500 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29502         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29503         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
29504         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29505         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29506         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
29507         Change innermode from fixed_mode_size to machine_mode.
29508         (simplify_subreg): Update call accordingly.  Handle a constant-sized
29509         subreg of a variable-length CONST_VECTOR.
29511 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29512             Alan Hayward  <alan.hayward@arm.com>
29513             David Sherwood  <david.sherwood@arm.com>
29515         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29516         (add_offset_to_base): New function, split out from...
29517         (create_mem_ref): ...here.  When handling a scale other than 1,
29518         check first whether the address is valid without the offset.
29519         Add it into the base if so, leaving the index and scale as-is.
29521 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
29523         PR c++/83778
29524         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29525         fold_for_warn before checking if arg2 is INTEGER_CST.
29527 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
29529         * config/rs6000/predicates.md (load_multiple_operation): Delete.
29530         (store_multiple_operation): Delete.
29531         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29532         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29533         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29534         guarded by TARGET_STRING.
29535         (rs6000_output_load_multiple): Delete.
29536         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29537         OPTION_MASK_STRING / TARGET_STRING handling.
29538         (print_operand) <'N', 'O'>: Add comment that these are unused now.
29539         (const rs6000_opt_masks) <"string">: Change mask to 0.
29540         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29541         (MASK_STRING): Delete.
29542         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29543         parts.  Simplify.
29544         (load_multiple): Delete.
29545         (*ldmsi8): Delete.
29546         (*ldmsi7): Delete.
29547         (*ldmsi6): Delete.
29548         (*ldmsi5): Delete.
29549         (*ldmsi4): Delete.
29550         (*ldmsi3): Delete.
29551         (store_multiple): Delete.
29552         (*stmsi8): Delete.
29553         (*stmsi7): Delete.
29554         (*stmsi6): Delete.
29555         (*stmsi5): Delete.
29556         (*stmsi4): Delete.
29557         (*stmsi3): Delete.
29558         (movmemsi_8reg): Delete.
29559         (corresponding unnamed define_insn): Delete.
29560         (movmemsi_6reg): Delete.
29561         (corresponding unnamed define_insn): Delete.
29562         (movmemsi_4reg): Delete.
29563         (corresponding unnamed define_insn): Delete.
29564         (movmemsi_2reg): Delete.
29565         (corresponding unnamed define_insn): Delete.
29566         (movmemsi_1reg): Delete.
29567         (corresponding unnamed define_insn): Delete.
29568         * config/rs6000/rs6000.opt (mno-string): New.
29569         (mstring): Replace by deprecation warning stub.
29570         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29572 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
29574         * regrename.c (regrename_do_replace): If replacing the same
29575         reg multiple times, try to reuse last created gen_raw_REG.
29577         PR debug/81155
29578         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29579         main to workaround a bug in GDB.
29581 2018-01-12  Tom de Vries  <tom@codesourcery.com>
29583         PR target/83737
29584         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29586 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
29588         PR rtl-optimization/80481
29589         * ira-color.c (get_cap_member): New function.
29590         (allocnos_conflict_by_live_ranges_p): Use it.
29591         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29592         (setup_slot_coalesced_allocno_live_ranges): Ditto.
29594 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
29596         PR target/83628
29597         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29598         (*saddl_se_1): Ditto.
29599         (*ssubsi_1): Ditto.
29600         (*ssubl_se_1): Ditto.
29602 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29604         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29605         rather than wi::to_widest for DR_INITs.
29606         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29607         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29608         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29609         INTEGER_CSTs.
29610         (vect_analyze_group_access_1): Note that here.
29612 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29614         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29615         polynomial type sizes.
29617 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
29619         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29620         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29621         (gimple_add_tmp_var): Likewise.
29623 2018-01-12  Martin Liska  <mliska@suse.cz>
29625         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29626         (gimple_alloc_sizes): Likewise.
29627         (dump_gimple_statistics): Use PRIu64 in printf format.
29628         * gimple.h: Change uint64_t to int.
29630 2018-01-12  Martin Liska  <mliska@suse.cz>
29632         * tree-core.h: Use uint64_t instead of int.
29633         * tree.c (tree_node_counts): Likewise.
29634         (tree_node_sizes): Likewise.
29635         (dump_tree_statistics): Use PRIu64 in printf format.
29637 2018-01-12  Martin Liska  <mliska@suse.cz>
29639         * Makefile.in: As qsort_chk is implemented in vec.c, add
29640         vec.o to linkage of gencfn-macros.
29641         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29642         passing the info to record_node_allocation_statistics.
29643         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29644         and pass the info.
29645         * ggc-common.c (struct ggc_usage): Add operator== and use
29646         it in operator< and compare function.
29647         * mem-stats.h (struct mem_usage): Likewise.
29648         * vec.c (struct vec_usage): Remove operator< and compare
29649         function. Can be simply inherited.
29651 2018-01-12  Martin Jambor  <mjambor@suse.cz>
29653         PR target/81616
29654         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29655         * tree-ssa-math-opts.c: Include domwalk.h.
29656         (convert_mult_to_fma_1): New function.
29657         (fma_transformation_info): New type.
29658         (fma_deferring_state): Likewise.
29659         (cancel_fma_deferring): New function.
29660         (result_of_phi): Likewise.
29661         (last_fma_candidate_feeds_initial_phi): Likewise.
29662         (convert_mult_to_fma): Added deferring logic, split actual
29663         transformation to convert_mult_to_fma_1.
29664         (math_opts_dom_walker): New type.
29665         (math_opts_dom_walker::after_dom_children): New method, body moved
29666         here from pass_optimize_widening_mul::execute, added deferring logic
29667         bits.
29668         (pass_optimize_widening_mul::execute): Moved most of code to
29669         math_opts_dom_walker::after_dom_children.
29670         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29671         * config/i386/i386.c (ix86_option_override_internal): Added
29672         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29674 2018-01-12  Richard Biener  <rguenther@suse.de>
29676         PR debug/83157
29677         * dwarf2out.c (gen_variable_die): Do not reset old_die for
29678         inline instance vars.
29680 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
29682         PR target/81819
29683         * config/rx/rx.c (rx_is_restricted_memory_address):
29684         Handle SUBREG case.
29686 2018-01-12  Richard Biener  <rguenther@suse.de>
29688         PR tree-optimization/80846
29689         * target.def (split_reduction): New target hook.
29690         * targhooks.c (default_split_reduction): New function.
29691         * targhooks.h (default_split_reduction): Declare.
29692         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29693         target requests first reduce vectors by combining low and high
29694         parts.
29695         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29696         (get_vectype_for_scalar_type_and_size): Export.
29697         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29698         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29699         * doc/tm.texi: Regenerate.
29700         * config/i386/i386.c (ix86_split_reduction): Implement
29701         TARGET_VECTORIZE_SPLIT_REDUCTION.
29703 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29705         PR target/83368
29706         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29707         in PIC mode except for TARGET_VXWORKS_RTP.
29708         * config/sparc/sparc.c: Include cfgrtl.h.
29709         (TARGET_INIT_PIC_REG): Define.
29710         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29711         (sparc_pic_register_p): New predicate.
29712         (sparc_legitimate_address_p): Use it.
29713         (sparc_legitimize_pic_address): Likewise.
29714         (sparc_delegitimize_address): Likewise.
29715         (sparc_mode_dependent_address_p): Likewise.
29716         (gen_load_pcrel_sym): Remove 4th parameter.
29717         (load_got_register): Adjust call to above.  Remove obsolete stuff.
29718         (sparc_expand_prologue): Do not call load_got_register here.
29719         (sparc_flat_expand_prologue): Likewise.
29720         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29721         (sparc_use_pseudo_pic_reg): New function.
29722         (sparc_init_pic_reg): Likewise.
29723         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29724         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29726 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
29728         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29729         Add item for branch_cost.
29731 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
29733         PR rtl-optimization/83565
29734         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29735         not extend the result to a larger mode for rotate operations.
29736         (num_sign_bit_copies1): Likewise.
29738 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29740         PR target/40411
29741         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29742         -symbolic.
29743         Use values-Xc.o for -pedantic.
29744         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29746 2018-01-12  Martin Liska  <mliska@suse.cz>
29748         PR ipa/83054
29749         * ipa-devirt.c (final_warning_record::grow_type_warnings):
29750         New function.
29751         (possible_polymorphic_call_targets): Use it.
29752         (ipa_devirt): Likewise.
29754 2018-01-12  Martin Liska  <mliska@suse.cz>
29756         * profile-count.h (enum profile_quality): Use 0 as invalid
29757         enum value of profile_quality.
29759 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
29761         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29762         -mext-string options.
29764 2018-01-12  Richard Biener  <rguenther@suse.de>
29766         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29767         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29768         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29769         Likewise.
29770         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29772 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
29774         * configure.ac (--with-long-double-format): Add support for the
29775         configuration option to change the default long double format on
29776         PowerPC systems.
29777         * config.gcc (powerpc*-linux*-*): Likewise.
29778         * configure: Regenerate.
29779         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29780         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29781         used without modification.
29783 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29785         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29786         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29787         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29788         MISC_BUILTIN_SPEC_BARRIER.
29789         (rs6000_init_builtins): Likewise.
29790         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29791         enum value.
29792         (speculation_barrier): New define_insn.
29793         * doc/extend.texi: Document __builtin_speculation_barrier.
29795 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29797         PR target/83203
29798         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29799         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29800         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29801         iterators.
29802         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
29803         integral modes instead of "ss" and "sd".
29804         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29805         vectors with 32-bit and 64-bit elements.
29806         (vecdupssescalarmodesuffix): New mode attribute.
29807         (vec_dup<mode>): Use it.
29809 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
29811         PR target/83330
29812         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29813         frame if argument is passed on stack.
29815 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
29817         PR target/82682
29818         * ree.c (combine_reaching_defs): Optimize also
29819         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29820         reg2=any_extend(exp); reg1=reg2;, formatting fix.
29822 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29824         PR middle-end/83189
29825         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29827 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
29829         PR middle-end/83718
29830         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29831         after they are computed.
29833 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
29835         PR tree-optimization/83695
29836         * gimple-loop-linterchange.cc
29837         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29838         reset cached scev information after interchange.
29839         (pass_linterchange::execute): Remove call to scev_reset_htab.
29841 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29843         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29844         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29845         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29846         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29847         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29848         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29849         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29850         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29851         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29852         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29853         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29854         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29855         (V_lane_reg): Likewise.
29856         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29857         New define_expand.
29858         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29859         (vfmal_lane_low<mode>_intrinsic,
29860         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29861         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29862         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29863         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29864         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29865         vfmsl_lane_high<mode>_intrinsic): New define_insns.
29867 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29869         * config/arm/arm-cpus.in (fp16fml): New feature.
29870         (ALL_SIMD): Add fp16fml.
29871         (armv8.2-a): Add fp16fml as an option.
29872         (armv8.3-a): Likewise.
29873         (armv8.4-a): Add fp16fml as part of fp16.
29874         * config/arm/arm.h (TARGET_FP16FML): Define.
29875         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29876         when appropriate.
29877         * config/arm/arm-modes.def (V2HF): Define.
29878         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29879         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29880         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29881         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29882         vfmsl_low, vfmsl_high): New set of builtins.
29883         * config/arm/iterators.md (PLUSMINUS): New code iterator.
29884         (vfml_op): New code attribute.
29885         (VFMLHALVES): New int iterator.
29886         (VFML, VFMLSEL): New mode attributes.
29887         (V_reg): Define mapping for V2HF.
29888         (V_hi, V_lo): New mode attributes.
29889         (VF_constraint): Likewise.
29890         (vfml_half, vfml_half_selector): New int attributes.
29891         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29892         define_expand.
29893         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29894         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29895         New define_insn.
29896         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29897         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29898         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29899         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
29900         documentation.
29901         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29902         Document new effective target and option set.
29904 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29906         * config/arm/arm-cpus.in (armv8_4): New feature.
29907         (ARMv8_4a): New fgroup.
29908         (armv8.4-a): New arch.
29909         * config/arm/arm-tables.opt: Regenerate.
29910         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29911         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29912         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29913         Add matching rules for -march=armv8.4-a and extensions.
29914         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29916 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
29918         PR target/81821
29919         * config/rx/rx.md (BW): New mode attribute.
29920         (sync_lock_test_and_setsi): Add mode suffix to insn output.
29922 2018-01-11  Richard Biener  <rguenther@suse.de>
29924         PR tree-optimization/83435
29925         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29926         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29927         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29929 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29930             Alan Hayward  <alan.hayward@arm.com>
29931             David Sherwood  <david.sherwood@arm.com>
29933         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29934         field.
29935         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
29936         (aarch64_print_address_internal): Use it to check for a zero offset.
29938 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
29939             Alan Hayward  <alan.hayward@arm.com>
29940             David Sherwood  <david.sherwood@arm.com>
29942         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29943         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29944         Return a poly_int64 rather than a HOST_WIDE_INT.
29945         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29946         rather than a HOST_WIDE_INT.
29947         * config/aarch64/aarch64.h (aarch64_frame): Protect with
29948         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
29949         hard_fp_offset, frame_size, initial_adjust, callee_offset and
29950         final_offset from HOST_WIDE_INT to poly_int64.
29951         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29952         to_constant when getting the number of units in an Advanced SIMD
29953         mode.
29954         (aarch64_builtin_vectorized_function): Check for a constant number
29955         of units.
29956         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29957         GET_MODE_SIZE.
29958         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29959         attribute instead of GET_MODE_NUNITS.
29960         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29961         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29962         GET_MODE_SIZE for fixed-size registers.
29963         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29964         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29965         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29966         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29967         (aarch64_print_operand, aarch64_print_address_internal)
29968         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29969         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29970         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29971         Handle polynomial GET_MODE_SIZE.
29972         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
29973         wider than SImode without modification.
29974         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29975         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29976         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29977         passing and returning SVE modes.
29978         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29979         rather than GEN_INT.
29980         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29981         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29982         (aarch64_allocate_and_probe_stack_space): Likewise.
29983         (aarch64_layout_frame): Cope with polynomial offsets.
29984         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29985         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
29986         polynomial offsets.
29987         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29988         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29989         poly_int64 rather than a HOST_WIDE_INT.
29990         (aarch64_get_separate_components, aarch64_process_components)
29991         (aarch64_expand_prologue, aarch64_expand_epilogue)
29992         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29993         (aarch64_anchor_offset): New function, split out from...
29994         (aarch64_legitimize_address): ...here.
29995         (aarch64_builtin_vectorization_cost): Handle polynomial
29996         TYPE_VECTOR_SUBPARTS.
29997         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29998         GET_MODE_NUNITS.
29999         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
30000         number of elements from the PARALLEL rather than the mode.
30001         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
30002         rather than GET_MODE_BITSIZE.
30003         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
30004         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
30005         (aarch64_expand_vec_perm_const_1): Handle polynomial
30006         d->perm.length () and d->perm elements.
30007         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
30008         Apply to_constant to d->perm elements.
30009         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
30010         polynomial CONST_VECTOR_NUNITS.
30011         (aarch64_move_pointer): Take amount as a poly_int64 rather
30012         than an int.
30013         (aarch64_progress_pointer): Avoid temporary variable.
30014         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
30015         the mode attribute instead of GET_MODE.
30017 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30018             Alan Hayward  <alan.hayward@arm.com>
30019             David Sherwood  <david.sherwood@arm.com>
30021         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
30022         x exists before using it.
30023         (aarch64_add_constant_internal): Rename to...
30024         (aarch64_add_offset_1): ...this.  Replace regnum with separate
30025         src and dest rtxes.  Handle the case in which they're different,
30026         including when the offset is zero.  Replace scratchreg with an rtx.
30027         Use 2 additions if there is no spare register into which we can
30028         move a 16-bit constant.
30029         (aarch64_add_constant): Delete.
30030         (aarch64_add_offset): Replace reg with separate src and dest
30031         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
30032         Use aarch64_add_offset_1.
30033         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
30034         an rtx rather than an int.  Take the delta as a poly_int64
30035         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
30036         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
30037         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
30038         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
30039         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
30040         and aarch64_add_sp.
30041         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
30042         aarch64_add_constant.
30044 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30046         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
30047         Use scalar_float_mode.
30049 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30051         * config/aarch64/aarch64-simd.md
30052         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
30053         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
30054         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
30055         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
30056         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
30057         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
30058         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
30059         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
30060         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
30061         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
30063 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30065         PR target/83514
30066         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30067         targ_options->x_arm_arch_string is non NULL.
30069 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
30071         * config/aarch64/aarch64.h
30072         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
30074 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
30076         PR target/82096
30077         * expmed.c (emit_store_flag_force): Swap if const op0
30078         and change VOIDmode to mode of op0.
30080 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30082         PR rtl-optimization/83761
30083         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30084         than bytes to mode_for_size.
30086 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
30088         PR middle-end/83189
30089         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30090         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30091         profile.
30093 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
30095         PR middle-end/83575
30096         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30097         when in layout mode.
30098         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30099         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30100         partition fixup.
30102 2018-01-10  Michael Collison  <michael.collison@arm.com>
30104         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30105         * config/aarch64/aarch64-option-extension.def: Add
30106         AARCH64_OPT_EXTENSION of 'fp16fml'.
30107         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30108         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30109         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30110         * config/aarch64/constraints.md (Ui7): New constraint.
30111         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30112         (VFMLA_SEL_W): Ditto.
30113         (f16quad): Ditto.
30114         (f16mac1): Ditto.
30115         (VFMLA16_LOW): New int iterator.
30116         (VFMLA16_HIGH): Ditto.
30117         (UNSPEC_FMLAL): New unspec.
30118         (UNSPEC_FMLSL): Ditto.
30119         (UNSPEC_FMLAL2): Ditto.
30120         (UNSPEC_FMLSL2): Ditto.
30121         (f16mac): New code attribute.
30122         * config/aarch64/aarch64-simd-builtins.def
30123         (aarch64_fmlal_lowv2sf): Ditto.
30124         (aarch64_fmlsl_lowv2sf): Ditto.
30125         (aarch64_fmlalq_lowv4sf): Ditto.
30126         (aarch64_fmlslq_lowv4sf): Ditto.
30127         (aarch64_fmlal_highv2sf): Ditto.
30128         (aarch64_fmlsl_highv2sf): Ditto.
30129         (aarch64_fmlalq_highv4sf): Ditto.
30130         (aarch64_fmlslq_highv4sf): Ditto.
30131         (aarch64_fmlal_lane_lowv2sf): Ditto.
30132         (aarch64_fmlsl_lane_lowv2sf): Ditto.
30133         (aarch64_fmlal_laneq_lowv2sf): Ditto.
30134         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30135         (aarch64_fmlalq_lane_lowv4sf): Ditto.
30136         (aarch64_fmlsl_lane_lowv4sf): Ditto.
30137         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30138         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30139         (aarch64_fmlal_lane_highv2sf): Ditto.
30140         (aarch64_fmlsl_lane_highv2sf): Ditto.
30141         (aarch64_fmlal_laneq_highv2sf): Ditto.
30142         (aarch64_fmlsl_laneq_highv2sf): Ditto.
30143         (aarch64_fmlalq_lane_highv4sf): Ditto.
30144         (aarch64_fmlsl_lane_highv4sf): Ditto.
30145         (aarch64_fmlalq_laneq_highv4sf): Ditto.
30146         (aarch64_fmlsl_laneq_highv4sf): Ditto.
30147         * config/aarch64/aarch64-simd.md:
30148         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30149         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30150         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30151         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30152         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30153         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30154         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30155         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30156         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30157         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30158         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30159         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30160         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30161         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30162         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30163         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30164         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30165         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30166         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30167         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30168         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30169         (vfmlsl_low_u32): Ditto.
30170         (vfmlalq_low_u32): Ditto.
30171         (vfmlslq_low_u32): Ditto.
30172         (vfmlal_high_u32): Ditto.
30173         (vfmlsl_high_u32): Ditto.
30174         (vfmlalq_high_u32): Ditto.
30175         (vfmlslq_high_u32): Ditto.
30176         (vfmlal_lane_low_u32): Ditto.
30177         (vfmlsl_lane_low_u32): Ditto.
30178         (vfmlal_laneq_low_u32): Ditto.
30179         (vfmlsl_laneq_low_u32): Ditto.
30180         (vfmlalq_lane_low_u32): Ditto.
30181         (vfmlslq_lane_low_u32): Ditto.
30182         (vfmlalq_laneq_low_u32): Ditto.
30183         (vfmlslq_laneq_low_u32): Ditto.
30184         (vfmlal_lane_high_u32): Ditto.
30185         (vfmlsl_lane_high_u32): Ditto.
30186         (vfmlal_laneq_high_u32): Ditto.
30187         (vfmlsl_laneq_high_u32): Ditto.
30188         (vfmlalq_lane_high_u32): Ditto.
30189         (vfmlslq_lane_high_u32): Ditto.
30190         (vfmlalq_laneq_high_u32): Ditto.
30191         (vfmlslq_laneq_high_u32): Ditto.
30192         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30193         (AARCH64_FL_FOR_ARCH8_4): New.
30194         (AARCH64_ISA_F16FML): New ISA flag.
30195         (TARGET_F16FML): New feature flag for fp16fml.
30196         (doc/invoke.texi): Document new fp16fml option.
30198 2018-01-10  Michael Collison  <michael.collison@arm.com>
30200         * config/aarch64/aarch64-builtins.c:
30201         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30202         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30203         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30204         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30205         (AARCH64_ISA_SHA3): New ISA flag.
30206         (TARGET_SHA3): New feature flag for sha3.
30207         * config/aarch64/iterators.md (sha512_op): New int attribute.
30208         (CRYPTO_SHA512): New int iterator.
30209         (UNSPEC_SHA512H): New unspec.
30210         (UNSPEC_SHA512H2): Ditto.
30211         (UNSPEC_SHA512SU0): Ditto.
30212         (UNSPEC_SHA512SU1): Ditto.
30213         * config/aarch64/aarch64-simd-builtins.def
30214         (aarch64_crypto_sha512hqv2di): New builtin.
30215         (aarch64_crypto_sha512h2qv2di): Ditto.
30216         (aarch64_crypto_sha512su0qv2di): Ditto.
30217         (aarch64_crypto_sha512su1qv2di): Ditto.
30218         (aarch64_eor3qv8hi): Ditto.
30219         (aarch64_rax1qv2di): Ditto.
30220         (aarch64_xarqv2di): Ditto.
30221         (aarch64_bcaxqv8hi): Ditto.
30222         * config/aarch64/aarch64-simd.md:
30223         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30224         (aarch64_crypto_sha512su0qv2di): Ditto.
30225         (aarch64_crypto_sha512su1qv2di): Ditto.
30226         (aarch64_eor3qv8hi): Ditto.
30227         (aarch64_rax1qv2di): Ditto.
30228         (aarch64_xarqv2di): Ditto.
30229         (aarch64_bcaxqv8hi): Ditto.
30230         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30231         (vsha512h2q_u64): Ditto.
30232         (vsha512su0q_u64): Ditto.
30233         (vsha512su1q_u64): Ditto.
30234         (veor3q_u16): Ditto.
30235         (vrax1q_u64): Ditto.
30236         (vxarq_u64): Ditto.
30237         (vbcaxq_u16): Ditto.
30238         * config/arm/types.md (crypto_sha512): New type attribute.
30239         (crypto_sha3): Ditto.
30240         (doc/invoke.texi): Document new sha3 option.
30242 2018-01-10  Michael Collison  <michael.collison@arm.com>
30244         * config/aarch64/aarch64-builtins.c:
30245         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
30246         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30247         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
30248         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
30249         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
30250         (AARCH64_ISA_SM4): New ISA flag.
30251         (TARGET_SM4): New feature flag for sm4.
30252         * config/aarch64/aarch64-simd-builtins.def
30253         (aarch64_sm3ss1qv4si): Ditto.
30254         (aarch64_sm3tt1aq4si): Ditto.
30255         (aarch64_sm3tt1bq4si): Ditto.
30256         (aarch64_sm3tt2aq4si): Ditto.
30257         (aarch64_sm3tt2bq4si): Ditto.
30258         (aarch64_sm3partw1qv4si): Ditto.
30259         (aarch64_sm3partw2qv4si): Ditto.
30260         (aarch64_sm4eqv4si): Ditto.
30261         (aarch64_sm4ekeyqv4si): Ditto.
30262         * config/aarch64/aarch64-simd.md:
30263         (aarch64_sm3ss1qv4si): Ditto.
30264         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
30265         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
30266         (aarch64_sm4eqv4si): Ditto.
30267         (aarch64_sm4ekeyqv4si): Ditto.
30268         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
30269         (sm3part_op): Ditto.
30270         (CRYPTO_SM3TT): Ditto.
30271         (CRYPTO_SM3PART): Ditto.
30272         (UNSPEC_SM3SS1): New unspec.
30273         (UNSPEC_SM3TT1A): Ditto.
30274         (UNSPEC_SM3TT1B): Ditto.
30275         (UNSPEC_SM3TT2A): Ditto.
30276         (UNSPEC_SM3TT2B): Ditto.
30277         (UNSPEC_SM3PARTW1): Ditto.
30278         (UNSPEC_SM3PARTW2): Ditto.
30279         (UNSPEC_SM4E): Ditto.
30280         (UNSPEC_SM4EKEY): Ditto.
30281         * config/aarch64/constraints.md (Ui2): New constraint.
30282         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
30283         * config/arm/types.md (crypto_sm3): New type attribute.
30284         (crypto_sm4): Ditto.
30285         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
30286         (vsm3tt1aq_u32): Ditto.
30287         (vsm3tt1bq_u32): Ditto.
30288         (vsm3tt2aq_u32): Ditto.
30289         (vsm3tt2bq_u32): Ditto.
30290         (vsm3partw1q_u32): Ditto.
30291         (vsm3partw2q_u32): Ditto.
30292         (vsm4eq_u32): Ditto.
30293         (vsm4ekeyq_u32): Ditto.
30294         (doc/invoke.texi): Document new sm4 option.
30296 2018-01-10  Michael Collison  <michael.collison@arm.com>
30298         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
30299         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
30300         (AARCH64_FL_FOR_ARCH8_4): New.
30301         (AARCH64_FL_V8_4): New flag.
30302         (doc/invoke.texi): Document new armv8.4-a option.
30304 2018-01-10  Michael Collison  <michael.collison@arm.com>
30306         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30307         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
30308         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
30309         * config/aarch64/aarch64-option-extension.def: Add
30310         AARCH64_OPT_EXTENSION of 'sha2'.
30311         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
30312         (crypto): Disable sha2 and aes if crypto disabled.
30313         (crypto): Enable aes and sha2 if enabled.
30314         (simd): Disable sha2 and aes if simd disabled.
30315         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
30316         New flags.
30317         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
30318         (TARGET_SHA2): New feature flag for sha2.
30319         (TARGET_AES): New feature flag for aes.
30320         * config/aarch64/aarch64-simd.md:
30321         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
30322         conditional on TARGET_AES.
30323         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
30324         (aarch64_crypto_sha1hsi): Make pattern conditional
30325         on TARGET_SHA2.
30326         (aarch64_crypto_sha1hv4si): Ditto.
30327         (aarch64_be_crypto_sha1hv4si): Ditto.
30328         (aarch64_crypto_sha1su1v4si): Ditto.
30329         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
30330         (aarch64_crypto_sha1su0v4si): Ditto.
30331         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
30332         (aarch64_crypto_sha256su0v4si): Ditto.
30333         (aarch64_crypto_sha256su1v4si): Ditto.
30334         (doc/invoke.texi): Document new aes and sha2 options.
30336 2018-01-10  Martin Sebor  <msebor@redhat.com>
30338         PR tree-optimization/83781
30339         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
30340         as string arrays.
30342 2018-01-11  Martin Sebor  <msebor@gmail.com>
30343             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30345         PR tree-optimization/83501
30346         PR tree-optimization/81703
30348         * tree-ssa-strlen.c (get_string_cst): Rename...
30349         (get_string_len): ...to this.  Handle global constants.
30350         (handle_char_store): Adjust.
30352 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
30353             Jim Wilson  <jimw@sifive.com>
30355         * config/riscv/riscv-protos.h (riscv_output_return): New.
30356         * config/riscv/riscv.c (struct machine_function): New naked_p field.
30357         (riscv_attribute_table, riscv_output_return),
30358         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
30359         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
30360         (riscv_compute_frame_info): Only compute frame->mask if not a naked
30361         function.
30362         (riscv_expand_prologue): Add early return for naked function.
30363         (riscv_expand_epilogue): Likewise.
30364         (riscv_function_ok_for_sibcall): Return false for naked function.
30365         (riscv_set_current_function): New.
30366         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
30367         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
30368         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
30369         * doc/extend.texi (RISC-V Function Attributes): New.
30371 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
30373         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
30374         check for 128-bit long double before checking TCmode.
30375         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
30376         128-bit long doubles before checking TFmode or TCmode.
30377         (FLOAT128_IBM_P): Likewise.
30379 2018-01-10  Martin Sebor  <msebor@redhat.com>
30381         PR tree-optimization/83671
30382         * builtins.c (c_strlen): Unconditionally return zero for the empty
30383         string.
30384         Use -Warray-bounds for warnings.
30385         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
30386         for non-constant array indices with COMPONENT_REF, arrays of
30387         arrays, and pointers to arrays.
30388         (gimple_fold_builtin_strlen): Determine and set length range for
30389         non-constant character arrays.
30391 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
30393         PR middle-end/81897
30394         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
30395         empty blocks.
30397 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
30399         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
30401 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
30403         PR target/83399
30404         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
30405         VECTOR_MEM_ALTIVEC_OR_VSX_P.
30406         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
30407         indexed_or_indirect_operand predicate.
30408         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
30409         (*vsx_le_perm_load_v8hi): Likewise.
30410         (*vsx_le_perm_load_v16qi): Likewise.
30411         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
30412         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
30413         (*vsx_le_perm_store_v8hi): Likewise.
30414         (*vsx_le_perm_store_v16qi): Likewise.
30415         (eight unnamed splitters): Likewise.
30417 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
30419         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
30420         * config/rs6000/emmintrin.h: Likewise.
30421         * config/rs6000/mmintrin.h: Likewise.
30422         * config/rs6000/xmmintrin.h: Likewise.
30424 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
30426         PR c++/43486
30427         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
30428         "public_flag".
30429         * tree.c (tree_nop_conversion): Return true for location wrapper
30430         nodes.
30431         (maybe_wrap_with_location): New function.
30432         (selftest::check_strip_nops): New function.
30433         (selftest::test_location_wrappers): New function.
30434         (selftest::tree_c_tests): Call it.
30435         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
30436         (maybe_wrap_with_location): New decl.
30437         (EXPR_LOCATION_WRAPPER_P): New macro.
30438         (location_wrapper_p): New inline function.
30439         (tree_strip_any_location_wrapper): New inline function.
30441 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
30443         PR target/83735
30444         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
30445         stack_realign_offset for the largest alignment of stack slot
30446         actually used.
30447         (ix86_find_max_used_stack_alignment): New function.
30448         (ix86_finalize_stack_frame_flags): Use it.  Set
30449         max_used_stack_alignment if we don't realign stack.
30450         * config/i386/i386.h (machine_function): Add
30451         max_used_stack_alignment.
30453 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
30455         * config/arm/arm.opt (-mbranch-cost): New option.
30456         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
30457         account.
30459 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
30461         PR target/83629
30462         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
30463         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
30465 2018-01-10  Richard Biener  <rguenther@suse.de>
30467         PR debug/83765
30468         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
30469         early out so it also covers the case where we have a non-NULL
30470         origin.
30472 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
30474         PR tree-optimization/83753
30475         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
30476         for non-strided grouped accesses if the number of elements is 1.
30478 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
30480         PR target/81616
30481         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
30482         * i386.h (TARGET_USE_GATHER): Define.
30483         * x86-tune.def (X86_TUNE_USE_GATHER): New.
30485 2018-01-10  Martin Liska  <mliska@suse.cz>
30487         PR bootstrap/82831
30488         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
30489         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
30490         partitioning.
30491         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30492         CLEANUP_NO_PARTITIONING is not set.
30494 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
30496         * doc/rtl.texi: Remove documentation of (const ...) wrappers
30497         for vectors, as a partial revert of r254296.
30498         * rtl.h (const_vec_p): Delete.
30499         (const_vec_duplicate_p): Don't test for vector CONSTs.
30500         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30501         * expmed.c (make_tree): Likewise.
30503         Revert:
30504         * common.md (E, F): Use CONSTANT_P instead of checking for
30505         CONST_VECTOR.
30506         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30507         checking for CONST_VECTOR.
30509 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30511         PR middle-end/83575
30512         * predict.c (force_edge_cold): Handle in more sane way edges
30513         with no prediction.
30515 2018-01-09  Carl Love  <cel@us.ibm.com>
30517         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30518         V4SI, V4SF types.
30519         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30520         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30521         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30522         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
30523         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30524         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
30525         * config/rs6000/rs6000-protos.h: Add extern defition for
30526         rs6000_generate_float2_double_code.
30527         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30528         function.
30529         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30530         (float2_v2df): Add define_expand.
30532 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
30534         PR target/83628
30535         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30536         op_mode in the force_to_mode call.
30538 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30540         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30541         instead of checking each element individually.
30542         (aarch64_evpc_uzp): Likewise.
30543         (aarch64_evpc_zip): Likewise.
30544         (aarch64_evpc_ext): Likewise.
30545         (aarch64_evpc_rev): Likewise.
30546         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30547         instead of checking each element individually.  Return true without
30548         generating rtl if
30549         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30550         whether all selected elements come from the same input, instead of
30551         checking each element individually.  Remove calls to gen_rtx_REG,
30552         start_sequence and end_sequence and instead assert that no rtl is
30553         generated.
30555 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30557         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30558         order of HIGH and CONST checks.
30560 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
30562         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30563         if the destination isn't an SSA_NAME.
30565 2018-01-09  Richard Biener  <rguenther@suse.de>
30567         PR tree-optimization/83668
30568         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30569         move prologue...
30570         (canonicalize_loop_form): ... here, renamed from ...
30571         (canonicalize_loop_closed_ssa_form): ... this and amended to
30572         swap successor edges for loop exit blocks to make us use
30573         the RPO order we need for initial schedule generation.
30575 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
30577         PR tree-optimization/64811
30578         * match.pd: When optimizing comparisons with Inf, avoid
30579         introducing or losing exceptions from comparisons with NaN.
30581 2018-01-09  Martin Liska  <mliska@suse.cz>
30583         PR sanitizer/82517
30584         * asan.c (shadow_mem_size): Add gcc_assert.
30586 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
30588         Don't save registers in main().
30590         PR target/83738
30591         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30592         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30593         * config/avr/avr.c (avr_set_current_function): Don't error if
30594         naked, OS_task or OS_main are specified at the same time.
30595         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30596         OS_main.
30597         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30598         attribute.
30599         * common/config/avr/avr-common.c (avr_option_optimization_table):
30600         Switch on -mmain-is-OS_task for optimizing compilations.
30602 2018-01-09  Richard Biener  <rguenther@suse.de>
30604         PR tree-optimization/83572
30605         * graphite.c: Include cfganal.h.
30606         (graphite_transform_loops): Connect infinite loops to exit
30607         and remove fake edges at the end.
30609 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30611         * ipa-inline.c (edge_badness): Revert accidental checkin.
30613 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
30615         PR ipa/80763
30616         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30617         symbols; not inline clones.
30619 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
30621         PR target/83507
30622         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30623         hard registers.  Formatting fixes.
30625         PR preprocessor/83722
30626         * gcc.c (try_generate_repro): Pass
30627         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30628         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30629         do_report_bug.
30631 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
30632             Kito Cheng  <kito.cheng@gmail.com>
30634         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30635         (riscv_leaf_function_p): Delete.
30636         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30638 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30640         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30641         function.
30642         (do_ifelse): New function.
30643         (do_isel): New function.
30644         (do_sub3): New function.
30645         (do_add3): New function.
30646         (do_load_mask_compare): New function.
30647         (do_overlap_load_compare): New function.
30648         (expand_compare_loop): New function.
30649         (expand_block_compare): Call expand_compare_loop() when appropriate.
30650         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30651         option description.
30652         (-mblock-compare-inline-loop-limit): New option.
30654 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30656         PR target/83677
30657         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30658         Reverse order of second and third operands in first alternative.
30659         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30660         of first and second elements in UNSPEC_VPERMR vector.
30661         (altivec_expand_vec_perm_le): Likewise.
30663 2018-01-08  Jeff Law  <law@redhat.com>
30665         PR rtl-optimizatin/81308
30666         * tree-switch-conversion.c (cfg_altered): New file scoped static.
30667         (process_switch): If group_case_labels makes a change, then set
30668         cfg_altered.
30669         (pass_convert_switch::execute): If a switch is converted, then
30670         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
30672         PR rtl-optimization/81308
30673         * recog.c (split_all_insns): Conditionally cleanup the CFG after
30674         splitting insns.
30676 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
30678         PR target/83663 - Revert r255946
30679         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30680         generation for cases where splatting a value is not useful.
30681         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30682         across a vec_duplicate and a paradoxical subreg forming a vector
30683         mode to a vec_concat.
30685 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30687         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30688         -march=armv8.3-a variants.
30689         * config/arm/t-multilib: Likewise.
30690         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
30692 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30694         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30695         to generate rtl.
30696         (cceq_ior_compare_complement): Give it a name so I can use it, and
30697         change boolean_or_operator predicate to boolean_operator so it can
30698         be used to generate a crand.
30699         (eqne): New code iterator.
30700         (bd/bd_neg): New code_attrs.
30701         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30702         a single define_insn.
30703         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30704         decrement (bdnzt/bdnzf/bdzt/bdzf).
30705         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30706         with the new names of the branch decrement patterns, and added the
30707         names of the branch decrement conditional patterns.
30709 2018-01-08  Richard Biener  <rguenther@suse.de>
30711         PR tree-optimization/83563
30712         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30713         cache.
30715 2018-01-08  Richard Biener  <rguenther@suse.de>
30717         PR middle-end/83713
30718         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30720 2018-01-08  Richard Biener  <rguenther@suse.de>
30722         PR tree-optimization/83685
30723         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30724         references to abnormals.
30726 2018-01-08  Richard Biener  <rguenther@suse.de>
30728         PR lto/83719
30729         * dwarf2out.c (output_indirect_strings): Handle empty
30730         skeleton_debug_str_hash.
30731         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30733 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30735         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30736         (emit_store_direct): Likewise.
30737         (arc_trampoline_adjust_address): Likewise.
30738         (arc_asm_trampoline_template): New function.
30739         (arc_initialize_trampoline): Use asm_trampoline_template.
30740         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30741         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30742         * config/arc/arc.md (flush_icache): Delete pattern.
30744 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
30746         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30747         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30748         munaligned-access.
30750 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30752         PR target/83681
30753         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30754         by not USED_FOR_TARGET.
30755         (make_pass_resolve_sw_modes): Likewise.
30757 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30759         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30760         USED_FOR_TARGET.
30762 2018-01-08  Richard Biener  <rguenther@suse.de>
30764         PR middle-end/83580
30765         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30767 2018-01-08  Richard Biener  <rguenther@suse.de>
30769         PR middle-end/83517
30770         * match.pd ((t * 2) / 2) -> t): Add missing :c.
30772 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
30774         PR middle-end/81897
30775         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30776         basic blocks with a small number of successors.
30777         (convert_control_dep_chain_into_preds): Improve handling of
30778         forwarder blocks.
30779         (dump_predicates): Split apart into...
30780         (dump_pred_chain): ...here...
30781         (dump_pred_info): ...and here.
30782         (can_one_predicate_be_invalidated_p): Add debugging printfs.
30783         (can_chain_union_be_invalidated_p): Improve check for invalidation
30784         of paths.
30785         (uninit_uses_cannot_happen): Avoid unnecessary if
30786         convert_control_dep_chain_into_preds yielded nothing.
30788 2018-01-06  Martin Sebor  <msebor@redhat.com>
30790         PR tree-optimization/83640
30791         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30792         subtracting negative offset from size.
30793         (builtin_access::overlap): Adjust offset bounds of the access to fall
30794         within the size of the object if possible.
30796 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
30798         PR rtl-optimization/83699
30799         * expmed.c (extract_bit_field_1): Restrict the vector usage of
30800         extract_bit_field_as_subreg to cases in which the extracted
30801         value is also a vector.
30803         * lra-constraints.c (process_alt_operands): Test for the equivalence
30804         substitutions when detecting a possible reload cycle.
30806 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
30808         PR debug/83480
30809         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30810         by default if flag_selective_schedling{,2}.  Formatting fixes.
30812         PR rtl-optimization/83682
30813         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30814         if it has non-VECTOR_MODE element mode.
30815         (vec_duplicate_p): Likewise.
30817         PR middle-end/83694
30818         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30819         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30821 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30823         PR target/83604
30824         * config/i386/i386-builtin.def
30825         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30826         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30827         Require also OPTION_MASK_ISA_AVX512F in addition to
30828         OPTION_MASK_ISA_GFNI.
30829         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30830         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30831         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30832         to OPTION_MASK_ISA_GFNI.
30833         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30834         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30835         OPTION_MASK_ISA_AVX512BW.
30836         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30837         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30838         addition to OPTION_MASK_ISA_GFNI.
30839         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30840         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30841         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30842         to OPTION_MASK_ISA_GFNI.
30843         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30844         a requirement for all ISAs rather than any of them with a few
30845         exceptions.
30846         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30847         processing.
30848         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30849         bitmasks to be enabled with 3 exceptions, instead of requiring any
30850         enabled ISA with lots of exceptions.
30851         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30852         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30853         Change avx512bw in isa attribute to avx512f.
30854         * config/i386/sgxintrin.h: Add license boilerplate.
30855         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
30856         to __AVX512F__ and __AVX512VL to __AVX512VL__.
30857         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30858         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30859         defined.
30860         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30861         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30862         temporarily sse2 rather than sse if not enabled already.
30864         PR target/83604
30865         * config/i386/sse.md (VI248_VLBW): Rename to ...
30866         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
30867         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30868         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30869         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30870         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30871         mode iterator instead of VI248_VLBW.
30873 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
30875         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30876         (record_modified): Skip clobbers; add debug output.
30877         (param_change_prob): Use sreal frequencies.
30879 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30881         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30882         punt for user-aligned variables.
30884 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
30886         * tree-chrec.c (chrec_contains_symbols): Return true for
30887         POLY_INT_CST.
30889 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
30891         PR target/82439
30892         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30893         of (x|y) == x for BICS pattern.
30895 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
30897         PR tree-optimization/83605
30898         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30899         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30900         can throw.
30902 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
30904         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30905         * config/epiphany/rtems.h: New file.
30907 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30908             Uros Bizjak  <ubizjak@gmail.com>
30910         PR target/83554
30911         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30912         QIreg_operand instead of register_operand predicate.
30913         * config/i386/i386.c (ix86_rop_should_change_byte_p,
30914         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30915         comments instead of -fmitigate[-_]rop.
30917 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
30919         PR bootstrap/81926
30920         * cgraphunit.c (symbol_table::compile): Switch to text_section
30921         before calling assembly_start debug hook.
30922         * run-rtl-passes.c (run_rtl_passes): Likewise.
30923         Include output.h.
30925 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30927         * tree-vrp.c (extract_range_from_binary_expr_1): Check
30928         range_int_cst_p rather than !symbolic_range_p before calling
30929         extract_range_from_multiplicative_op_1.
30931 2018-01-04  Jeff Law  <law@redhat.com>
30933         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30934         redundant test in assertion.
30936 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30938         * doc/rtl.texi: Document machine_mode wrapper classes.
30940 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30942         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30943         using tree_to_uhwi.
30945 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30947         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30948         the VEC_PERM_EXPR fold to fail.
30950 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30952         PR debug/83585
30953         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30954         to switched_sections.
30956 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30958         PR target/83680
30959         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30960         test for d.testing.
30962 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
30964         PR target/83387
30965         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30966         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30968 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
30970         PR debug/83666
30971         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30972         is BLKmode and bitpos not zero or mode change is needed.
30974 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
30976         PR target/83675
30977         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30978         TARGET_VIS2.
30980 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
30982         PR target/83628
30983         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30984         instead of MULT rtx.  Update all corresponding splitters.
30985         (*saddl_se): Ditto.
30986         (*ssub<modesuffix>): Ditto.
30987         (*ssubl_se): Ditto.
30988         (*cmp_sadd_di): Update split patterns.
30989         (*cmp_sadd_si): Ditto.
30990         (*cmp_sadd_sidi): Ditto.
30991         (*cmp_ssub_di): Ditto.
30992         (*cmp_ssub_si): Ditto.
30993         (*cmp_ssub_sidi): Ditto.
30994         * config/alpha/predicates.md (const23_operand): New predicate.
30995         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30996         Look for ASHIFT, not MULT inner operand.
30997         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30999 2018-01-04  Martin Liska  <mliska@suse.cz>
31001         PR gcov-profile/83669
31002         * gcov.c (output_intermediate_file): Add version to intermediate
31003         gcov file.
31004         * doc/gcov.texi: Document new field 'version' in intermediate
31005         file format. Fix location of '-k' option of gcov command.
31007 2018-01-04  Martin Liska  <mliska@suse.cz>
31009         PR ipa/82352
31010         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
31012 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
31014         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
31016 2018-01-03  Martin Sebor  <msebor@redhat.com>
31018         PR tree-optimization/83655
31019         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
31020         checking calls with invalid arguments.
31022 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31024         * tree-vect-stmts.c (vect_get_store_rhs): New function.
31025         (vectorizable_mask_load_store): Delete.
31026         (vectorizable_call): Return false for masked loads and stores.
31027         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
31028         instead of gimple_assign_rhs1.
31029         (vectorizable_load): Handle IFN_MASK_LOAD.
31030         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
31032 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31034         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
31035         split out from..,
31036         (vectorizable_mask_load_store): ...here.
31037         (vectorizable_load): ...and here.
31039 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31041         * tree-vect-stmts.c (vect_build_all_ones_mask)
31042         (vect_build_zero_merge_argument): New functions, split out from...
31043         (vectorizable_load): ...here.
31045 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31047         * tree-vect-stmts.c (vect_check_store_rhs): New function,
31048         split out from...
31049         (vectorizable_mask_load_store): ...here.
31050         (vectorizable_store): ...and here.
31052 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31054         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
31055         split out from...
31056         (vectorizable_mask_load_store): ...here.
31058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31060         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
31061         (vect_model_store_cost): Take a vec_load_store_type instead of a
31062         vect_def_type.
31063         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31064         (vect_model_store_cost): Take a vec_load_store_type instead of a
31065         vect_def_type.
31066         (vectorizable_mask_load_store): Update accordingly.
31067         (vectorizable_store): Likewise.
31068         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31070 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31072         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31073         IFN_MASK_LOAD calls here rather than...
31074         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31076 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31077             Alan Hayward  <alan.hayward@arm.com>
31078             David Sherwood  <david.sherwood@arm.com>
31080         * expmed.c (extract_bit_field_1): For vector extracts,
31081         fall back to extract_bit_field_as_subreg if vec_extract
31082         isn't available.
31084 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31085             Alan Hayward  <alan.hayward@arm.com>
31086             David Sherwood  <david.sherwood@arm.com>
31088         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31089         they are variable or constant sized.
31090         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31091         slots for constant-sized data.
31093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31094             Alan Hayward  <alan.hayward@arm.com>
31095             David Sherwood  <david.sherwood@arm.com>
31097         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31098         handling COND_EXPRs with boolean comparisons, try to find a better
31099         basis for the mask type than the boolean itself.
31101 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31103         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31104         is calculated and how it can be overridden.
31105         * genmodes.c (max_bitsize_mode_any_mode): New variable.
31106         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31107         if defined.
31108         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31109         if nonzero.
31111 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31112             Alan Hayward  <alan.hayward@arm.com>
31113             David Sherwood  <david.sherwood@arm.com>
31115         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31116         Remove the mode argument.
31117         (aarch64_simd_valid_immediate): Remove the mode and inverse
31118         arguments.
31119         * config/aarch64/iterators.md (bitsize): New iterator.
31120         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31121         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31122         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31123         aarch64_simd_valid_immediate.
31124         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31125         (aarch64_reg_or_bic_imm): Likewise.
31126         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31127         with an insn_type enum and msl with a modifier_type enum.
31128         Replace element_width with a scalar_mode.  Change the shift
31129         to unsigned int.  Add constructors for scalar_float_mode and
31130         scalar_int_mode elements.
31131         (aarch64_vect_float_const_representable_p): Delete.
31132         (aarch64_can_const_movi_rtx_p)
31133         (aarch64_simd_scalar_immediate_valid_for_move)
31134         (aarch64_simd_make_constant): Update call to
31135         aarch64_simd_valid_immediate.
31136         (aarch64_advsimd_valid_immediate_hs): New function.
31137         (aarch64_advsimd_valid_immediate): Likewise.
31138         (aarch64_simd_valid_immediate): Remove mode and inverse
31139         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
31140         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31141         and aarch64_float_const_representable_p on the result.
31142         (aarch64_output_simd_mov_immediate): Remove mode argument.
31143         Update call to aarch64_simd_valid_immediate and use of
31144         simd_immediate_info.
31145         (aarch64_output_scalar_simd_mov_immediate): Update call
31146         accordingly.
31148 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31149             Alan Hayward  <alan.hayward@arm.com>
31150             David Sherwood  <david.sherwood@arm.com>
31152         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31153         (mode_nunits): Likewise CONST_MODE_NUNITS.
31154         * machmode.def (ADJUST_NUNITS): Document.
31155         * genmodes.c (mode_data::need_nunits_adj): New field.
31156         (blank_mode): Update accordingly.
31157         (adj_nunits): New variable.
31158         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31159         parameter.
31160         (emit_mode_size_inline): Set need_bytesize_adj for all modes
31161         listed in adj_nunits.
31162         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31163         listed in adj_nunits.  Don't emit case statements for such modes.
31164         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31165         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
31166         nothing if adj_nunits is nonnull.
31167         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31168         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31169         (emit_mode_fbit): Update use of print_maybe_const_decl.
31170         (emit_move_size): Likewise.  Treat the array as non-const
31171         if adj_nunits.
31172         (emit_mode_adjustments): Handle adj_nunits.
31174 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31176         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31177         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31178         (VECTOR_MODES): Use it.
31179         (make_vector_modes): Take the prefix as an argument.
31181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31182             Alan Hayward  <alan.hayward@arm.com>
31183             David Sherwood  <david.sherwood@arm.com>
31185         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31186         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31187         for MODE_VECTOR_BOOL.
31188         * machmode.def (VECTOR_BOOL_MODE): Document.
31189         * genmodes.c (VECTOR_BOOL_MODE): New macro.
31190         (make_vector_bool_mode): New function.
31191         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31192         MODE_VECTOR_BOOL.
31193         * lto-streamer-in.c (lto_input_mode_table): Likewise.
31194         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31195         Likewise.
31196         * stor-layout.c (int_mode_for_mode): Likewise.
31197         * tree.c (build_vector_type_for_mode): Likewise.
31198         * varasm.c (output_constant_pool_2): Likewise.
31199         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31200         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
31201         for MODE_VECTOR_BOOL.
31202         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31203         of mode class checks.
31204         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31205         instead of a list of mode class checks.
31206         (expand_vector_scalar_condition): Likewise.
31207         (type_for_widest_vector_mode): Handle BImode as an inner mode.
31209 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31210             Alan Hayward  <alan.hayward@arm.com>
31211             David Sherwood  <david.sherwood@arm.com>
31213         * machmode.h (mode_size): Change from unsigned short to
31214         poly_uint16_pod.
31215         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31216         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31217         or if measurement_type is not polynomial.
31218         (fixed_size_mode::includes_p): Check for constant-sized modes.
31219         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31220         return a poly_uint16 rather than an unsigned short.
31221         (emit_mode_size): Change the type of mode_size from unsigned short
31222         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
31223         (emit_mode_adjustments): Cope with polynomial vector sizes.
31224         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31225         for GET_MODE_SIZE.
31226         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31227         for GET_MODE_SIZE.
31228         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31229         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31230         * caller-save.c (setup_save_areas): Likewise.
31231         (replace_reg_with_saved_mem): Likewise.
31232         * calls.c (emit_library_call_value_1): Likewise.
31233         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31234         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31235         (gen_lowpart_for_combine): Likewise.
31236         * convert.c (convert_to_integer_1): Likewise.
31237         * cse.c (equiv_constant, cse_insn): Likewise.
31238         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
31239         (cselib_subst_to_values): Likewise.
31240         * dce.c (word_dce_process_block): Likewise.
31241         * df-problems.c (df_word_lr_mark_ref): Likewise.
31242         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
31243         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
31244         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
31245         (rtl_for_decl_location): Likewise.
31246         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
31247         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
31248         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
31249         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
31250         (expand_expr_real_1): Likewise.
31251         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
31252         (pad_below): Likewise.
31253         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31254         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
31255         * ira.c (get_subreg_tracking_sizes): Likewise.
31256         * ira-build.c (ira_create_allocno_objects): Likewise.
31257         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
31258         (ira_sort_regnos_for_alter_reg): Likewise.
31259         * ira-costs.c (record_operand_costs): Likewise.
31260         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
31261         (resolve_simple_move): Likewise.
31262         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
31263         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
31264         (lra_constraints): Likewise.
31265         (CONST_POOL_OK_P): Reject variable-sized modes.
31266         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
31267         (add_pseudo_to_slot, lra_spill): Likewise.
31268         * omp-low.c (omp_clause_aligned_alignment): Likewise.
31269         * optabs-query.c (get_best_extraction_insn): Likewise.
31270         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31271         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
31272         (expand_mult_highpart, valid_multiword_target_p): Likewise.
31273         * recog.c (offsettable_address_addr_space_p): Likewise.
31274         * regcprop.c (maybe_mode_change): Likewise.
31275         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
31276         * regrename.c (build_def_use): Likewise.
31277         * regstat.c (dump_reg_info): Likewise.
31278         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
31279         (find_reloads, find_reloads_subreg_address): Likewise.
31280         * reload1.c (eliminate_regs_1): Likewise.
31281         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
31282         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
31283         (simplify_binary_operation_1, simplify_subreg): Likewise.
31284         * targhooks.c (default_function_arg_padding): Likewise.
31285         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
31286         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
31287         (verify_gimple_assign_ternary): Likewise.
31288         * tree-inline.c (estimate_move_cost): Likewise.
31289         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31290         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
31291         (get_address_cost_ainc): Likewise.
31292         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
31293         (vect_supportable_dr_alignment): Likewise.
31294         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31295         (vectorizable_reduction): Likewise.
31296         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
31297         (vectorizable_operation, vectorizable_load): Likewise.
31298         * tree.c (build_same_sized_truth_vector_type): Likewise.
31299         * valtrack.c (cleanup_auto_inc_dec): Likewise.
31300         * var-tracking.c (emit_note_insn_var_location): Likewise.
31301         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
31302         (ADDR_VEC_ALIGN): Likewise.
31304 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31305             Alan Hayward  <alan.hayward@arm.com>
31306             David Sherwood  <david.sherwood@arm.com>
31308         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
31309         unsigned short.
31310         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31311         or if measurement_type is polynomial.
31312         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
31313         * combine.c (make_extraction): Likewise.
31314         * dse.c (find_shift_sequence): Likewise.
31315         * dwarf2out.c (mem_loc_descriptor): Likewise.
31316         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
31317         (extract_bit_field, extract_low_bits): Likewise.
31318         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
31319         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
31320         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
31321         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
31322         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
31323         * reload.c (find_reloads): Likewise.
31324         * reload1.c (alter_reg): Likewise.
31325         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
31326         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
31327         * tree-if-conv.c (predicate_mem_writes): Likewise.
31328         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
31329         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
31330         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
31331         * valtrack.c (dead_debug_insert_temp): Likewise.
31332         * varasm.c (mergeable_constant_section): Likewise.
31333         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
31335 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31336             Alan Hayward  <alan.hayward@arm.com>
31337             David Sherwood  <david.sherwood@arm.com>
31339         * expr.c (expand_assignment): Cope with polynomial mode sizes
31340         when assigning to a CONCAT.
31342 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31343             Alan Hayward  <alan.hayward@arm.com>
31344             David Sherwood  <david.sherwood@arm.com>
31346         * machmode.h (mode_precision): Change from unsigned short to
31347         poly_uint16_pod.
31348         (mode_to_precision): Return a poly_uint16 rather than an unsigned
31349         short.
31350         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
31351         or if measurement_type is not polynomial.
31352         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
31353         in which the mode is already known to be a scalar_int_mode.
31354         * genmodes.c (emit_mode_precision): Change the type of mode_precision
31355         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
31356         initializer.
31357         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31358         for GET_MODE_PRECISION.
31359         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31360         for GET_MODE_PRECISION.
31361         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
31362         as polynomial.
31363         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
31364         (expand_field_assignment, make_extraction): Likewise.
31365         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
31366         (get_last_value): Likewise.
31367         * convert.c (convert_to_integer_1): Likewise.
31368         * cse.c (cse_insn): Likewise.
31369         * expr.c (expand_expr_real_1): Likewise.
31370         * lra-constraints.c (simplify_operand_subreg): Likewise.
31371         * optabs-query.c (can_atomic_load_p): Likewise.
31372         * optabs.c (expand_atomic_load): Likewise.
31373         (expand_atomic_store): Likewise.
31374         * ree.c (combine_reaching_defs): Likewise.
31375         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
31376         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
31377         * tree.h (type_has_mode_precision_p): Likewise.
31378         * ubsan.c (instrument_si_overflow): Likewise.
31380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31381             Alan Hayward  <alan.hayward@arm.com>
31382             David Sherwood  <david.sherwood@arm.com>
31384         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
31385         polynomial numbers of units.
31386         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
31387         (valid_vector_subparts_p): New function.
31388         (build_vector_type): Remove temporary shim and take the number
31389         of units as a poly_uint64 rather than an int.
31390         (build_opaque_vector_type): Take the number of units as a
31391         poly_uint64 rather than an int.
31392         * tree.c (build_vector_from_ctor): Handle polynomial
31393         TYPE_VECTOR_SUBPARTS.
31394         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
31395         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
31396         (build_vector_from_val): If the number of units is variable,
31397         use build_vec_duplicate_cst for constant operands and
31398         VEC_DUPLICATE_EXPR otherwise.
31399         (make_vector_type): Remove temporary is_constant ().
31400         (build_vector_type, build_opaque_vector_type): Take the number of
31401         units as a poly_uint64 rather than an int.
31402         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
31403         VECTOR_CST_NELTS.
31404         * cfgexpand.c (expand_debug_expr): Likewise.
31405         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
31406         (store_constructor, expand_expr_real_1): Likewise.
31407         (const_scalar_mask_from_tree): Likewise.
31408         * fold-const-call.c (fold_const_reduction): Likewise.
31409         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
31410         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
31411         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
31412         (fold_relational_const): Likewise.
31413         (native_interpret_vector): Likewise.  Change the size from an
31414         int to an unsigned int.
31415         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
31416         TYPE_VECTOR_SUBPARTS.
31417         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
31418         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
31419         duplicating a non-constant operand into a variable-length vector.
31420         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
31421         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
31422         * ipa-icf.c (sem_variable::equals): Likewise.
31423         * match.pd: Likewise.
31424         * omp-simd-clone.c (simd_clone_subparts): Likewise.
31425         * print-tree.c (print_node): Likewise.
31426         * stor-layout.c (layout_type): Likewise.
31427         * targhooks.c (default_builtin_vectorization_cost): Likewise.
31428         * tree-cfg.c (verify_gimple_comparison): Likewise.
31429         (verify_gimple_assign_binary): Likewise.
31430         (verify_gimple_assign_ternary): Likewise.
31431         (verify_gimple_assign_single): Likewise.
31432         * tree-pretty-print.c (dump_generic_node): Likewise.
31433         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31434         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
31435         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
31436         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
31437         (vect_shift_permute_load_chain): Likewise.
31438         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
31439         (expand_vector_condition, optimize_vector_constructor): Likewise.
31440         (lower_vec_perm, get_compute_type): Likewise.
31441         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
31442         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
31443         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
31444         (vect_recog_mask_conversion_pattern): Likewise.
31445         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
31446         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
31447         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31448         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
31449         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
31450         (vectorizable_shift, vectorizable_operation, vectorizable_store)
31451         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
31452         (supportable_widening_operation): Likewise.
31453         (supportable_narrowing_operation): Likewise.
31454         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
31455         Likewise.
31456         * varasm.c (output_constant): Likewise.
31458 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31459             Alan Hayward  <alan.hayward@arm.com>
31460             David Sherwood  <david.sherwood@arm.com>
31462         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
31463         so that both the length == 3 and length != 3 cases set up their
31464         own permute vectors.  Add comments explaining why we know the
31465         number of elements is constant.
31466         (vect_permute_load_chain): Likewise.
31468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31469             Alan Hayward  <alan.hayward@arm.com>
31470             David Sherwood  <david.sherwood@arm.com>
31472         * machmode.h (mode_nunits): Change from unsigned char to
31473         poly_uint16_pod.
31474         (ONLY_FIXED_SIZE_MODES): New macro.
31475         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
31476         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
31477         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
31478         New typedefs.
31479         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
31480         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
31481         or if measurement_type is not polynomial.
31482         * genmodes.c (ZERO_COEFFS): New macro.
31483         (emit_mode_nunits_inline): Make mode_nunits_inline return a
31484         poly_uint16.
31485         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
31486         Use ZERO_COEFFS when emitting initializers.
31487         * data-streamer.h (bp_pack_poly_value): New function.
31488         (bp_unpack_poly_value): Likewise.
31489         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31490         for GET_MODE_NUNITS.
31491         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31492         for GET_MODE_NUNITS.
31493         * tree.c (make_vector_type): Remove temporary shim and make
31494         the real function take the number of units as a poly_uint64
31495         rather than an int.
31496         (build_vector_type_for_mode): Handle polynomial nunits.
31497         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31498         * emit-rtl.c (const_vec_series_p_1): Likewise.
31499         (gen_rtx_CONST_VECTOR): Likewise.
31500         * fold-const.c (test_vec_duplicate_folding): Likewise.
31501         * genrecog.c (validate_pattern): Likewise.
31502         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31503         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31504         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31505         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31506         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31507         * rtlanal.c (subreg_get_info): Likewise.
31508         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31509         (vect_grouped_load_supported): Likewise.
31510         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31511         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31512         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31513         (simplify_const_unary_operation, simplify_binary_operation_1)
31514         (simplify_const_binary_operation, simplify_ternary_operation)
31515         (test_vector_ops_duplicate, test_vector_ops): Likewise.
31516         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31517         instead of CONST_VECTOR_NUNITS.
31518         * varasm.c (output_constant_pool_2): Likewise.
31519         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31520         explicit-encoded elements in the XVEC for variable-length vectors.
31522 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31524         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31526 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31527             Alan Hayward  <alan.hayward@arm.com>
31528             David Sherwood  <david.sherwood@arm.com>
31530         * coretypes.h (fixed_size_mode): Declare.
31531         (fixed_size_mode_pod): New typedef.
31532         * builtins.h (target_builtins::x_apply_args_mode)
31533         (target_builtins::x_apply_result_mode): Change type to
31534         fixed_size_mode_pod.
31535         * builtins.c (apply_args_size, apply_result_size, result_vector)
31536         (expand_builtin_apply_args_1, expand_builtin_apply)
31537         (expand_builtin_return): Update accordingly.
31539 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31541         * cse.c (hash_rtx_cb): Hash only the encoded elements.
31542         * cselib.c (cselib_hash_rtx): Likewise.
31543         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31544         CONST_VECTOR encoding.
31546 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31547             Jeff Law  <law@redhat.com>
31549         PR target/83641
31550         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31551         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31552         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31553         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31555         PR target/83641
31556         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31557         explicitly probe *sp in a noreturn function if there were any callee
31558         register saves or frame pointer is needed.
31560 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31562         PR debug/83621
31563         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31564         BLKmode for ternary, binary or unary expressions.
31566         PR debug/83645
31567         * var-tracking.c (delete_vta_debug_insn): New inline function.
31568         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31569         insns from get_insns () to NULL instead of each bb separately.
31570         Use delete_vta_debug_insn.  No longer static.
31571         (vt_debug_insns_local, variable_tracking_main_1): Adjust
31572         delete_vta_debug_insns callers.
31573         * rtl.h (delete_vta_debug_insns): Declare.
31574         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31575         instead of variable_tracking_main.
31577 2018-01-03  Martin Sebor  <msebor@redhat.com>
31579         PR tree-optimization/83603
31580         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31581         arguments past the endof the argument list in functions declared
31582         without a prototype.
31583         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31584         Avoid checking when arguments are null.
31586 2018-01-03  Martin Sebor  <msebor@redhat.com>
31588         PR c/83559
31589         * doc/extend.texi (attribute const): Fix a typo.
31590         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31591         issuing -Wsuggest-attribute for void functions.
31593 2018-01-03  Martin Sebor  <msebor@redhat.com>
31595         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31596         offset_int::from instead of wide_int::to_shwi.
31597         (maybe_diag_overlap): Remove assertion.
31598         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31599         * gimple-ssa-sprintf.c (format_directive): Same.
31600         (parse_directive): Same.
31601         (sprintf_dom_walker::compute_format_length): Same.
31602         (try_substitute_return_value): Same.
31604 2018-01-03  Jeff Law  <law@redhat.com>
31606         PR middle-end/83654
31607         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31608         non-constant residual for zero at runtime and avoid probing in
31609         that case.  Reorganize code for trailing problem to mirror handling
31610         of the residual.
31612 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31614         PR tree-optimization/83501
31615         * tree-ssa-strlen.c (get_string_cst): New.
31616         (handle_char_store): Call get_string_cst.
31618 2018-01-03  Martin Liska  <mliska@suse.cz>
31620         PR tree-optimization/83593
31621         * tree-ssa-strlen.c: Include tree-cfg.h.
31622         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31623         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31624         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31625         to false.
31626         (strlen_dom_walker::before_dom_children): Call
31627         gimple_purge_dead_eh_edges. Dump tranformation with details
31628         dump flags.
31629         (strlen_dom_walker::before_dom_children): Update call by adding
31630         new argument cleanup_eh.
31631         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31633 2018-01-03  Martin Liska  <mliska@suse.cz>
31635         PR ipa/83549
31636         * cif-code.def (VARIADIC_THUNK): New enum value.
31637         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31638         thunks.
31640 2018-01-03  Jan Beulich  <jbeulich@suse.com>
31642         * sse.md (mov<mode>_internal): Tighten condition for when to use
31643         vmovdqu<ssescalarsize> for TI and OI modes.
31645 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31647         Update copyright years.
31649 2018-01-03  Martin Liska  <mliska@suse.cz>
31651         PR ipa/83594
31652         * ipa-visibility.c (function_and_variable_visibility): Skip
31653         functions with noipa attribure.
31655 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
31657         * gcc.c (process_command): Update copyright notice dates.
31658         * gcov-dump.c (print_version): Ditto.
31659         * gcov.c (print_version): Ditto.
31660         * gcov-tool.c (print_version): Ditto.
31661         * gengtype.c (create_file): Ditto.
31662         * doc/cpp.texi: Bump @copying's copyright year.
31663         * doc/cppinternals.texi: Ditto.
31664         * doc/gcc.texi: Ditto.
31665         * doc/gccint.texi: Ditto.
31666         * doc/gcov.texi: Ditto.
31667         * doc/install.texi: Ditto.
31668         * doc/invoke.texi: Ditto.
31670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31672         * vector-builder.h (vector_builder::m_full_nelts): Change from
31673         unsigned int to poly_uint64.
31674         (vector_builder::full_nelts): Update prototype accordingly.
31675         (vector_builder::new_vector): Likewise.
31676         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31677         (vector_builder::operator ==): Likewise.
31678         (vector_builder::finalize): Likewise.
31679         * int-vector-builder.h (int_vector_builder::int_vector_builder):
31680         Take the number of elements as a poly_uint64 rather than an
31681         unsigned int.
31682         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31683         from unsigned int to poly_uint64.
31684         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31685         (vec_perm_indices::new_vector): Likewise.
31686         (vec_perm_indices::length): Likewise.
31687         (vec_perm_indices::nelts_per_input): Likewise.
31688         (vec_perm_indices::input_nelts): Likewise.
31689         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31690         number of elements per input as a poly_uint64 rather than an
31691         unsigned int.  Use the original encoding for variable-length
31692         vectors, rather than clamping each individual element.
31693         For the second and subsequent elements in each pattern,
31694         clamp the step and base before clamping their sum.
31695         (vec_perm_indices::series_p): Handle polynomial element counts.
31696         (vec_perm_indices::all_in_range_p): Likewise.
31697         (vec_perm_indices_to_tree): Likewise.
31698         (vec_perm_indices_to_rtx): Likewise.
31699         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31700         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31701         (tree_vector_builder::new_binary_operation): Handle polynomial
31702         element counts.  Return false if we need to know the number
31703         of elements at compile time.
31704         * fold-const.c (fold_vec_perm): Punt if the number of elements
31705         isn't known at compile time.
31707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31709         * vec-perm-indices.h (vec_perm_builder): Change element type
31710         from HOST_WIDE_INT to poly_int64.
31711         (vec_perm_indices::element_type): Update accordingly.
31712         (vec_perm_indices::clamp): Handle polynomial element_types.
31713         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31714         (vec_perm_indices::all_in_range_p): Likewise.
31715         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31716         than shwi trees.
31717         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31718         polynomial vec_perm_indices element types.
31719         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31720         * fold-const.c (fold_vec_perm): Likewise.
31721         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31722         * tree-vect-generic.c (lower_vec_perm): Likewise.
31723         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31724         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31725         element type to HOST_WIDE_INT.
31727 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31728             Alan Hayward  <alan.hayward@arm.com>
31729             David Sherwood  <david.sherwood@arm.com>
31731         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31732         rather than an int.  Use plus_constant.
31733         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31734         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31737             Alan Hayward  <alan.hayward@arm.com>
31738             David Sherwood  <david.sherwood@arm.com>
31740         * calls.c (emit_call_1, expand_call): Change struct_value_size from
31741         a HOST_WIDE_INT to a poly_int64.
31743 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31744             Alan Hayward  <alan.hayward@arm.com>
31745             David Sherwood  <david.sherwood@arm.com>
31747         * calls.c (load_register_parameters): Cope with polynomial
31748         mode sizes.  Require a constant size for BLKmode parameters
31749         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
31750         forces a parameter to be padded at the lsb end in order to
31751         fill a complete number of words, require the parameter size
31752         to be ordered wrt UNITS_PER_WORD.
31754 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31755             Alan Hayward  <alan.hayward@arm.com>
31756             David Sherwood  <david.sherwood@arm.com>
31758         * reload1.c (spill_stack_slot_width): Change element type
31759         from unsigned int to poly_uint64_pod.
31760         (alter_reg): Treat mode sizes as polynomial.
31762 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31763             Alan Hayward  <alan.hayward@arm.com>
31764             David Sherwood  <david.sherwood@arm.com>
31766         * reload.c (complex_word_subreg_p): New function.
31767         (reload_inner_reg_of_subreg, push_reload): Use it.
31769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31770             Alan Hayward  <alan.hayward@arm.com>
31771             David Sherwood  <david.sherwood@arm.com>
31773         * lra-constraints.c (process_alt_operands): Reject matched
31774         operands whose sizes aren't ordered.
31775         (match_reload): Refer to this check here.
31777 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31778             Alan Hayward  <alan.hayward@arm.com>
31779             David Sherwood  <david.sherwood@arm.com>
31781         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31782         that the mode size is in the set {1, 2, 4, 8, 16}.
31784 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31785             Alan Hayward  <alan.hayward@arm.com>
31786             David Sherwood  <david.sherwood@arm.com>
31788         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31789         Use plus_constant instead of gen_rtx_PLUS.
31791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31792             Alan Hayward  <alan.hayward@arm.com>
31793             David Sherwood  <david.sherwood@arm.com>
31795         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31796         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31797         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31798         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31799         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31800         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31801         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31802         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31803         * config/i386/i386.c (ix86_push_rounding): ...this new function.
31804         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31805         a poly_int64.
31806         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31807         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31808         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31809         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31810         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31811         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31812         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31813         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31814         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31815         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31816         function.
31817         * expr.c (emit_move_resolve_push): Treat the input and result
31818         of PUSH_ROUNDING as a poly_int64.
31819         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31820         (emit_push_insn): Likewise.
31821         * lra-eliminations.c (mark_not_eliminable): Likewise.
31822         * recog.c (push_operand): Likewise.
31823         * reload1.c (elimination_effects): Likewise.
31824         * rtlanal.c (nonzero_bits1): Likewise.
31825         * calls.c (store_one_arg): Likewise.  Require the padding to be
31826         known at compile time.
31828 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31829             Alan Hayward  <alan.hayward@arm.com>
31830             David Sherwood  <david.sherwood@arm.com>
31832         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31833         Use plus_constant instead of gen_rtx_PLUS.
31835 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31836             Alan Hayward  <alan.hayward@arm.com>
31837             David Sherwood  <david.sherwood@arm.com>
31839         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31840         rather than an int.
31842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31843             Alan Hayward  <alan.hayward@arm.com>
31844             David Sherwood  <david.sherwood@arm.com>
31846         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31847         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31848         via stack temporaries.  Treat the mode size as polynomial too.
31850 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31851             Alan Hayward  <alan.hayward@arm.com>
31852             David Sherwood  <david.sherwood@arm.com>
31854         * expr.c (expand_expr_real_2): When handling conversions involving
31855         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31856         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
31857         as a poly_uint64 too.
31859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31860             Alan Hayward  <alan.hayward@arm.com>
31861             David Sherwood  <david.sherwood@arm.com>
31863         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31865 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31866             Alan Hayward  <alan.hayward@arm.com>
31867             David Sherwood  <david.sherwood@arm.com>
31869         * combine.c (can_change_dest_mode): Handle polynomial
31870         REGMODE_NATURAL_SIZE.
31871         * expmed.c (store_bit_field_1): Likewise.
31872         * expr.c (store_constructor): Likewise.
31873         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31874         and polynomial REGMODE_NATURAL_SIZE.
31875         (gen_lowpart_common): Likewise.
31876         * reginfo.c (record_subregs_of_mode): Likewise.
31877         * rtlanal.c (read_modify_subreg_p): Likewise.
31879 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31880             Alan Hayward  <alan.hayward@arm.com>
31881             David Sherwood  <david.sherwood@arm.com>
31883         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31884         numbers of elements.
31886 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31887             Alan Hayward  <alan.hayward@arm.com>
31888             David Sherwood  <david.sherwood@arm.com>
31890         * match.pd: Cope with polynomial numbers of vector elements.
31892 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31893             Alan Hayward  <alan.hayward@arm.com>
31894             David Sherwood  <david.sherwood@arm.com>
31896         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31897         in a POINTER_PLUS_EXPR.
31899 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31900             Alan Hayward  <alan.hayward@arm.com>
31901             David Sherwood  <david.sherwood@arm.com>
31903         * omp-simd-clone.c (simd_clone_subparts): New function.
31904         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31905         (ipa_simd_modify_function_body): Likewise.
31907 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31908             Alan Hayward  <alan.hayward@arm.com>
31909             David Sherwood  <david.sherwood@arm.com>
31911         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31912         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31913         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31914         (expand_vector_condition, vector_element): Likewise.
31915         (subparts_gt): New function.
31916         (get_compute_type): Use subparts_gt.
31917         (count_type_subparts): Delete.
31918         (expand_vector_operations_1): Use subparts_gt instead of
31919         count_type_subparts.
31921 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31922             Alan Hayward  <alan.hayward@arm.com>
31923             David Sherwood  <david.sherwood@arm.com>
31925         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31926         (vect_compile_time_alias): ...this new function.  Do the calculation
31927         on poly_ints rather than trees.
31928         (vect_prune_runtime_alias_test_list): Update call accordingly.
31930 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31931             Alan Hayward  <alan.hayward@arm.com>
31932             David Sherwood  <david.sherwood@arm.com>
31934         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31935         numbers of units.
31936         (vect_schedule_slp_instance): Likewise.
31938 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31939             Alan Hayward  <alan.hayward@arm.com>
31940             David Sherwood  <david.sherwood@arm.com>
31942         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31943         constant and extern definitions for variable-length vectors.
31944         (vect_get_constant_vectors): Note that the number of units
31945         is known to be constant.
31947 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31948             Alan Hayward  <alan.hayward@arm.com>
31949             David Sherwood  <david.sherwood@arm.com>
31951         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31952         of units as polynomial.  Choose between WIDE and NARROW based
31953         on multiple_p.
31955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31956             Alan Hayward  <alan.hayward@arm.com>
31957             David Sherwood  <david.sherwood@arm.com>
31959         * tree-vect-stmts.c (simd_clone_subparts): New function.
31960         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31962 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31963             Alan Hayward  <alan.hayward@arm.com>
31964             David Sherwood  <david.sherwood@arm.com>
31966         * tree-vect-stmts.c (vectorizable_call): Treat the number of
31967         vectors as polynomial.  Use build_index_vector for
31968         IFN_GOMP_SIMD_LANE.
31970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31971             Alan Hayward  <alan.hayward@arm.com>
31972             David Sherwood  <david.sherwood@arm.com>
31974         * tree-vect-stmts.c (get_load_store_type): Treat the number of
31975         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31976         for variable-length vectors.
31977         (vectorizable_mask_load_store): Treat the number of units as
31978         polynomial, asserting that it is constant if the condition has
31979         already been enforced.
31980         (vectorizable_store, vectorizable_load): Likewise.
31982 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31983             Alan Hayward  <alan.hayward@arm.com>
31984             David Sherwood  <david.sherwood@arm.com>
31986         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31987         of units as polynomial.  Punt if we can't tell at compile time
31988         which vector contains the final result.
31990 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31991             Alan Hayward  <alan.hayward@arm.com>
31992             David Sherwood  <david.sherwood@arm.com>
31994         * tree-vect-loop.c (vectorizable_induction): Treat the number
31995         of units as polynomial.  Punt on SLP inductions.  Use an integer
31996         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
31997         cast of such a series for variable-length floating-point
31998         reductions.
32000 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32001             Alan Hayward  <alan.hayward@arm.com>
32002             David Sherwood  <david.sherwood@arm.com>
32004         * tree.h (build_index_vector): Declare.
32005         * tree.c (build_index_vector): New function.
32006         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
32007         of units as polynomial, forcibly converting it to a constant if
32008         vectorizable_reduction has already enforced the condition.
32009         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
32010         to create a {1,2,3,...} vector.
32011         (vectorizable_reduction): Treat the number of units as polynomial.
32012         Choose vectype_in based on the largest scalar element size rather
32013         than the smallest number of units.  Enforce the restrictions
32014         relied on above.
32016 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32017             Alan Hayward  <alan.hayward@arm.com>
32018             David Sherwood  <david.sherwood@arm.com>
32020         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
32021         number of units as polynomial.
32023 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32024             Alan Hayward  <alan.hayward@arm.com>
32025             David Sherwood  <david.sherwood@arm.com>
32027         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
32028         * target.def (autovectorize_vector_sizes): Return the vector sizes
32029         by pointer, using vector_sizes rather than a bitmask.
32030         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
32031         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
32032         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
32033         Likewise.
32034         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
32035         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
32036         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
32037         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
32038         * omp-general.c (omp_max_vf): Likewise.
32039         * omp-low.c (omp_clause_aligned_alignment): Likewise.
32040         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
32041         * tree-vect-loop.c (vect_analyze_loop): Likewise.
32042         * tree-vect-slp.c (vect_slp_bb): Likewise.
32043         * doc/tm.texi: Regenerate.
32044         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
32045         to a poly_uint64.
32046         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
32047         the vector size as a poly_uint64 rather than an unsigned int.
32048         (current_vector_size): Change from an unsigned int to a poly_uint64.
32049         (get_vectype_for_scalar_type): Update accordingly.
32050         * tree.h (build_truth_vector_type): Take the size and number of
32051         units as a poly_uint64 rather than an unsigned int.
32052         (build_vector_type): Add a temporary overload that takes
32053         the number of units as a poly_uint64 rather than an unsigned int.
32054         * tree.c (make_vector_type): Likewise.
32055         (build_truth_vector_type): Take the number of units as a poly_uint64
32056         rather than an unsigned int.
32058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32059             Alan Hayward  <alan.hayward@arm.com>
32060             David Sherwood  <david.sherwood@arm.com>
32062         * target.def (get_mask_mode): Take the number of units and length
32063         as poly_uint64s rather than unsigned ints.
32064         * targhooks.h (default_get_mask_mode): Update accordingly.
32065         * targhooks.c (default_get_mask_mode): Likewise.
32066         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32067         * doc/tm.texi: Regenerate.
32069 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32070             Alan Hayward  <alan.hayward@arm.com>
32071             David Sherwood  <david.sherwood@arm.com>
32073         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32074         * omp-general.c (omp_max_vf): Likewise.
32075         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32076         (expand_omp_simd): Handle polynomial safelen.
32077         * omp-low.c (omplow_simd_context): Add a default constructor.
32078         (omplow_simd_context::max_vf): Change from int to poly_uint64.
32079         (lower_rec_simd_input_clauses): Update accordingly.
32080         (lower_rec_input_clauses): Likewise.
32082 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32083             Alan Hayward  <alan.hayward@arm.com>
32084             David Sherwood  <david.sherwood@arm.com>
32086         * tree-vectorizer.h (vect_nunits_for_cost): New function.
32087         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32088         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32089         (vect_analyze_slp_cost): Likewise.
32090         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32091         (vect_model_load_cost): Likewise.
32093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32094             Alan Hayward  <alan.hayward@arm.com>
32095             David Sherwood  <david.sherwood@arm.com>
32097         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32098         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32099         from an unsigned int * to a poly_uint64_pod *.
32100         (calculate_unrolling_factor): New function.
32101         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
32103 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32104             Alan Hayward  <alan.hayward@arm.com>
32105             David Sherwood  <david.sherwood@arm.com>
32107         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32108         from an unsigned int to a poly_uint64.
32109         (_loop_vec_info::slp_unrolling_factor): Likewise.
32110         (_loop_vec_info::vectorization_factor): Change from an int
32111         to a poly_uint64.
32112         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32113         (vect_get_num_vectors): New function.
32114         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32115         (vect_get_num_copies): Use vect_get_num_vectors.
32116         (vect_analyze_data_ref_dependences): Change max_vf from an int *
32117         to an unsigned int *.
32118         (vect_analyze_data_refs): Change min_vf from an int * to a
32119         poly_uint64 *.
32120         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32121         than an unsigned HOST_WIDE_INT.
32122         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32123         (vect_analyze_data_ref_dependence): Change max_vf from an int *
32124         to an unsigned int *.
32125         (vect_analyze_data_ref_dependences): Likewise.
32126         (vect_compute_data_ref_alignment): Handle polynomial vf.
32127         (vect_enhance_data_refs_alignment): Likewise.
32128         (vect_prune_runtime_alias_test_list): Likewise.
32129         (vect_shift_permute_load_chain): Likewise.
32130         (vect_supportable_dr_alignment): Likewise.
32131         (dependence_distance_ge_vf): Take the vectorization factor as a
32132         poly_uint64 rather than an unsigned HOST_WIDE_INT.
32133         (vect_analyze_data_refs): Change min_vf from an int * to a
32134         poly_uint64 *.
32135         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32136         vfm1 as a poly_uint64 rather than an int.  Make the same change
32137         for the returned bound_scalar.
32138         (vect_gen_vector_loop_niters): Handle polynomial vf.
32139         (vect_do_peeling): Likewise.  Update call to
32140         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32141         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32142         be constant.
32143         * tree-vect-loop.c (vect_determine_vectorization_factor)
32144         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32145         (vect_get_known_peeling_cost): Likewise.
32146         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32147         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32148         (vect_transform_loop): Likewise.  Use the lowest possible VF when
32149         updating the upper bounds of the loop.
32150         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
32151         rather than an int.
32152         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32153         polynomial unroll factors.
32154         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32155         (vect_make_slp_decision): Likewise.
32156         (vect_supported_load_permutation_p): Likewise, and polynomial
32157         vf too.
32158         (vect_analyze_slp_cost): Handle polynomial vf.
32159         (vect_slp_analyze_node_operations): Likewise.
32160         (vect_slp_analyze_bb_1): Likewise.
32161         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32162         than an unsigned HOST_WIDE_INT.
32163         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32164         (vectorizable_load): Handle polynomial vf.
32165         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32166         a poly_uint64.
32167         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32169 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32170             Alan Hayward  <alan.hayward@arm.com>
32171             David Sherwood  <david.sherwood@arm.com>
32173         * match.pd: Handle bit operations involving three constants
32174         and try to fold one pair.
32176 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32178         * tree-vect-loop-manip.c: Include gimple-fold.h.
32179         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32180         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
32181         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32182         Add a path that uses a step of VF instead of 1, but disable it
32183         for now.
32184         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32185         and niters_no_overflow parameters.  Update calls to
32186         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32187         Create a new SSA name if the latter choses to use a ste other
32188         than zero, and return it via niters_vector_mult_vf_var.
32189         * tree-vect-loop.c (vect_transform_loop): Update calls to
32190         vect_do_peeling, vect_gen_vector_loop_niters and
32191         slpeel_make_loop_iterate_ntimes.
32192         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32193         (vect_gen_vector_loop_niters): Update declarations after above changes.
32195 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
32197         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32198         128-bit round to integer instructions.
32199         (ceil<mode>2): Likewise.
32200         (btrunc<mode>2): Likewise.
32201         (round<mode>2): Likewise.
32203 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32205         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32206         unaligned VSX load/store on P8/P9.
32207         (expand_block_clear): Allow the use of unaligned VSX
32208         load/store on P8/P9.
32210 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32212         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32213         New function.
32214         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32215         swap associated with both a load and a store.
32217 2018-01-02  Andrew Waterman  <andrew@sifive.com>
32219         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32220         * config/riscv/riscv.md (clear_cache): Use it.
32222 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
32224         * web.c: Remove out-of-date comment.
32226 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32228         * expr.c (fixup_args_size_notes): Check that any existing
32229         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32230         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32231         (emit_single_push_insn): ...here.
32233 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32235         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32236         (const_vector_encoded_nelts): New function.
32237         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
32238         (const_vector_int_elt, const_vector_elt): Declare.
32239         * emit-rtl.c (const_vector_int_elt_1): New function.
32240         (const_vector_elt): Likewise.
32241         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
32242         of CONST_VECTOR_ELT.
32244 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32246         * expr.c: Include rtx-vector-builder.h.
32247         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
32248         directly on the tree encoding.
32249         (const_vector_from_tree): Likewise.
32250         * optabs.c: Include rtx-vector-builder.h.
32251         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
32252         sequence of "u" values.
32253         * vec-perm-indices.c: Include rtx-vector-builder.h.
32254         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
32255         directly on the vec_perm_indices encoding.
32257 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32259         * doc/rtl.texi (const_vector): Describe new encoding scheme.
32260         * Makefile.in (OBJS): Add rtx-vector-builder.o.
32261         * rtx-vector-builder.h: New file.
32262         * rtx-vector-builder.c: Likewise.
32263         * rtl.h (rtx_def::u2): Add a const_vector field.
32264         (CONST_VECTOR_NPATTERNS): New macro.
32265         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
32266         (CONST_VECTOR_DUPLICATE_P): Likewise.
32267         (CONST_VECTOR_STEPPED_P): Likewise.
32268         (CONST_VECTOR_ENCODED_ELT): Likewise.
32269         (const_vec_duplicate_p): Check for a duplicated vector encoding.
32270         (unwrap_const_vec_duplicate): Likewise.
32271         (const_vec_series_p): Check for a non-duplicated vector encoding.
32272         Say that the function only returns true for integer vectors.
32273         * emit-rtl.c: Include rtx-vector-builder.h.
32274         (gen_const_vec_duplicate_1): Delete.
32275         (gen_const_vector): Call gen_const_vec_duplicate instead of
32276         gen_const_vec_duplicate_1.
32277         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
32278         (gen_const_vec_duplicate): Use rtx_vector_builder.
32279         (gen_const_vec_series): Likewise.
32280         (gen_rtx_CONST_VECTOR): Likewise.
32281         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
32282         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32283         Build a new vector rather than modifying a CONST_VECTOR in-place.
32284         (handle_special_swappables): Update call accordingly.
32285         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
32286         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
32287         Build a new vector rather than modifying a CONST_VECTOR in-place.
32288         (handle_special_swappables): Update call accordingly.
32290 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32292         * simplify-rtx.c (simplify_const_binary_operation): Use
32293         CONST_VECTOR_ELT instead of XVECEXP.
32295 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32297         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
32298         the selector elements to be different from the data elements
32299         if the selector is a VECTOR_CST.
32300         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
32301         ssizetype for the selector.
32303 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32305         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
32306         before testing each element individually.
32307         * tree-vect-generic.c (lower_vec_perm): Likewise.
32309 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32311         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
32312         * selftest-run-tests.c (selftest::run_tests): Call it.
32313         * vector-builder.h (vector_builder::operator ==): New function.
32314         (vector_builder::operator !=): Likewise.
32315         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
32316         (vec_perm_indices::all_from_input_p): New function.
32317         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32318         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
32319         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
32320         instead of reading the VECTOR_CST directly.  Detect whether both
32321         vector inputs are the same before constructing the vec_perm_indices,
32322         and update the number of inputs argument accordingly.  Use the
32323         utility functions added above.  Only construct sel2 if we need to.
32325 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32327         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
32328         the broadcast of the low byte.
32329         (expand_mult_highpart): Use an explicit encoding for the permutes.
32330         * optabs-query.c (can_mult_highpart_p): Likewise.
32331         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
32332         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32333         (vectorizable_bswap): Likewise.
32334         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
32335         explicit encoding for the power-of-2 permutes.
32336         (vect_permute_store_chain): Likewise.
32337         (vect_grouped_load_supported): Likewise.
32338         (vect_permute_load_chain): Likewise.
32340 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32342         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
32343         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
32344         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
32345         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32346         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
32347         (vect_gen_perm_mask_any): Likewise.
32349 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32351         * int-vector-builder.h: New file.
32352         * vec-perm-indices.h: Include int-vector-builder.h.
32353         (vec_perm_indices): Redefine as an int_vector_builder.
32354         (auto_vec_perm_indices): Delete.
32355         (vec_perm_builder): Redefine as a stand-alone class.
32356         (vec_perm_indices::vec_perm_indices): New function.
32357         (vec_perm_indices::clamp): Likewise.
32358         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
32359         (vec_perm_indices::new_vector): New function.
32360         (vec_perm_indices::new_expanded_vector): Update for new
32361         vec_perm_indices class.
32362         (vec_perm_indices::rotate_inputs): New function.
32363         (vec_perm_indices::all_in_range_p): Operate directly on the
32364         encoded form, without computing elided elements.
32365         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
32366         encoding.  Update for new vec_perm_indices class.
32367         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
32368         the given vec_perm_builder.
32369         (expand_vec_perm_var): Update vec_perm_builder constructor.
32370         (expand_mult_highpart): Use vec_perm_builder instead of
32371         auto_vec_perm_indices.
32372         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
32373         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
32374         or double series encoding as appropriate.
32375         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
32376         vec_perm_indices instead of auto_vec_perm_indices.
32377         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32378         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32379         (vect_permute_store_chain): Likewise.
32380         (vect_grouped_load_supported): Likewise.
32381         (vect_permute_load_chain): Likewise.
32382         (vect_shift_permute_load_chain): Likewise.
32383         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32384         (vect_transform_slp_perm_load): Likewise.
32385         (vect_schedule_slp_instance): Likewise.
32386         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32387         (vectorizable_mask_load_store): Likewise.
32388         (vectorizable_bswap): Likewise.
32389         (vectorizable_store): Likewise.
32390         (vectorizable_load): Likewise.
32391         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
32392         vec_perm_indices instead of auto_vec_perm_indices.  Use
32393         tree_to_vec_perm_builder to read the vector from a tree.
32394         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
32395         vec_perm_builder instead of a vec_perm_indices.
32396         (have_whole_vector_shift): Use vec_perm_builder and
32397         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
32398         truncation to calc_vec_perm_mask_for_shift.
32399         (vect_create_epilog_for_reduction): Likewise.
32400         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
32401         from auto_vec_perm_indices to vec_perm_indices.
32402         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32403         instead of changing individual elements.
32404         (aarch64_vectorize_vec_perm_const): Use new_vector to install
32405         the vector in d.perm.
32406         * config/arm/arm.c (expand_vec_perm_d::perm): Change
32407         from auto_vec_perm_indices to vec_perm_indices.
32408         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
32409         instead of changing individual elements.
32410         (arm_vectorize_vec_perm_const): Use new_vector to install
32411         the vector in d.perm.
32412         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
32413         Update vec_perm_builder constructor.
32414         (rs6000_expand_interleave): Likewise.
32415         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
32416         (rs6000_expand_interleave): Likewise.
32418 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32420         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
32421         to qimode could truncate the indices.
32422         * optabs.c (expand_vec_perm_var): Likewise.
32424 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32426         * Makefile.in (OBJS): Add vec-perm-indices.o.
32427         * vec-perm-indices.h: New file.
32428         * vec-perm-indices.c: Likewise.
32429         * target.h (vec_perm_indices): Replace with a forward class
32430         declaration.
32431         (auto_vec_perm_indices): Move to vec-perm-indices.h.
32432         * optabs.h: Include vec-perm-indices.h.
32433         (expand_vec_perm): Delete.
32434         (selector_fits_mode_p, expand_vec_perm_var): Declare.
32435         (expand_vec_perm_const): Declare.
32436         * target.def (vec_perm_const_ok): Replace with...
32437         (vec_perm_const): ...this new hook.
32438         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
32439         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
32440         * doc/tm.texi: Regenerate.
32441         * optabs.def (vec_perm_const): Delete.
32442         * doc/md.texi (vec_perm_const): Likewise.
32443         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
32444         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
32445         expand_vec_perm for constant permutation vectors.  Assert that
32446         the mode of variable permutation vectors is the integer equivalent
32447         of the mode that is being permuted.
32448         * optabs-query.h (selector_fits_mode_p): Declare.
32449         * optabs-query.c: Include vec-perm-indices.h.
32450         (selector_fits_mode_p): New function.
32451         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
32452         is defined, instead of checking whether the vec_perm_const_optab
32453         exists.  Use targetm.vectorize.vec_perm_const instead of
32454         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
32455         fit in the vector mode before using a variable permute.
32456         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
32457         vec_perm_indices instead of an rtx.
32458         (expand_vec_perm): Replace with...
32459         (expand_vec_perm_const): ...this new function.  Take the selector
32460         as a vec_perm_indices rather than an rtx.  Also take the mode of
32461         the selector.  Update call to shift_amt_for_vec_perm_mask.
32462         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
32463         Use vec_perm_indices::new_expanded_vector to expand the original
32464         selector into bytes.  Check whether the indices fit in the vector
32465         mode before using a variable permute.
32466         (expand_vec_perm_var): Make global.
32467         (expand_mult_highpart): Use expand_vec_perm_const.
32468         * fold-const.c: Includes vec-perm-indices.h.
32469         * tree-ssa-forwprop.c: Likewise.
32470         * tree-vect-data-refs.c: Likewise.
32471         * tree-vect-generic.c: Likewise.
32472         * tree-vect-loop.c: Likewise.
32473         * tree-vect-slp.c: Likewise.
32474         * tree-vect-stmts.c: Likewise.
32475         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
32476         Delete.
32477         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
32478         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
32479         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
32480         (aarch64_vectorize_vec_perm_const): ...this new function.
32481         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32482         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32483         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
32484         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
32485         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32486         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32487         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
32488         into...
32489         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
32490         check for NEON modes.
32491         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32492         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32493         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32494         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32495         into...
32496         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
32497         the old VEC_PERM_CONST conditions.
32498         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32499         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32500         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32501         (ia64_vectorize_vec_perm_const_ok): Merge into...
32502         (ia64_vectorize_vec_perm_const): ...this new function.
32503         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32504         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32505         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32506         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32507         * config/mips/mips.c (mips_expand_vec_perm_const)
32508         (mips_vectorize_vec_perm_const_ok): Merge into...
32509         (mips_vectorize_vec_perm_const): ...this new function.
32510         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32511         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32512         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32513         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32514         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32515         (rs6000_expand_vec_perm_const): Delete.
32516         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32517         Delete.
32518         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32519         (altivec_expand_vec_perm_const_le): Take each operand individually.
32520         Operate on constant selectors rather than rtxes.
32521         (altivec_expand_vec_perm_const): Likewise.  Update call to
32522         altivec_expand_vec_perm_const_le.
32523         (rs6000_expand_vec_perm_const): Delete.
32524         (rs6000_vectorize_vec_perm_const_ok): Delete.
32525         (rs6000_vectorize_vec_perm_const): New function.
32526         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32527         an element count and rtx array.
32528         (rs6000_expand_extract_even): Update call accordingly.
32529         (rs6000_expand_interleave): Likewise.
32530         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32531         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32532         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32533         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32534         (rs6000_expand_vec_perm_const): Delete.
32535         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32536         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32537         (altivec_expand_vec_perm_const_le): Take each operand individually.
32538         Operate on constant selectors rather than rtxes.
32539         (altivec_expand_vec_perm_const): Likewise.  Update call to
32540         altivec_expand_vec_perm_const_le.
32541         (rs6000_expand_vec_perm_const): Delete.
32542         (rs6000_vectorize_vec_perm_const_ok): Delete.
32543         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
32544         reference to the SPE evmerge intructions.
32545         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32546         an element count and rtx array.
32547         (rs6000_expand_extract_even): Update call accordingly.
32548         (rs6000_expand_interleave): Likewise.
32549         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32550         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32551         new function.
32552         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32554 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32556         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32557         vector mode and that that mode matches the mode of the data
32558         being permuted.
32559         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32560         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
32561         directly using expand_vec_perm_1 when forcing selectors into
32562         registers.
32563         (expand_vec_perm_var): New function, split out from expand_vec_perm.
32565 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32567         * optabs-query.h (can_vec_perm_p): Delete.
32568         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32569         * optabs-query.c (can_vec_perm_p): Split into...
32570         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32571         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32572         particular selector is valid.
32573         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32574         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32575         (vect_grouped_load_supported): Likewise.
32576         (vect_shift_permute_load_chain): Likewise.
32577         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32578         (vect_transform_slp_perm_load): Likewise.
32579         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32580         (vectorizable_bswap): Likewise.
32581         (vect_gen_perm_mask_checked): Likewise.
32582         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
32583         implementations of variable permutation vectors into account
32584         when deciding which selector to use.
32585         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32586         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32587         with a false third argument.
32588         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32589         to test whether the constant selector is valid and can_vec_perm_var_p
32590         to test whether a variable selector is valid.
32592 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32594         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32595         * optabs-query.c (can_vec_perm_p): Likewise.
32596         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32597         instead of vec_perm_indices.
32598         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32599         (vect_gen_perm_mask_checked): Likewise,
32600         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32601         (vect_gen_perm_mask_checked): Likewise,
32603 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32605         * optabs-query.h (qimode_for_vec_perm): Declare.
32606         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32607         (qimode_for_vec_perm): ...this new function.
32608         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32610 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32612         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32613         does not have a conditional at the top.
32615 2018-01-02  Richard Biener  <rguenther@suse.de>
32617         * ipa-inline.c (big_speedup_p): Fix expression.
32619 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32621         PR target/81616
32622         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32623         for generic 4->6.
32625 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
32627         PR target/81616
32628         Generic tuning.
32629         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32630         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32631         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32632         cond_taken_branch_cost 3->4.
32634 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
32636         PR tree-optimization/83581
32637         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32638         TODO_cleanup_cfg if any changes have been made.
32640         PR middle-end/83608
32641         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32642         convert_modes if target mode has the right side, but different mode
32643         class.
32645         PR middle-end/83609
32646         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32647         last argument when extracting from CONCAT.  If either from_real or
32648         from_imag is NULL, use expansion through memory.  If result is not
32649         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32650         the parts directly to inner mode, if even that fails, use expansion
32651         through memory.
32653         PR middle-end/83623
32654         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32655         check for bswap in mode rather than HImode and use that in expand_unop
32656         too.
32658 Copyright (C) 2018 Free Software Foundation, Inc.
32660 Copying and distribution of this file, with or without modification,
32661 are permitted in any medium without royalty provided the copyright
32662 notice and this notice are preserved.