[RS6000] PowerPC64 soft-float
[official-gcc.git] / gcc / ChangeLog
blob15cbe00abd6e1c0b48e726944e14ae425cda4ce5
1 2018-11-30  Alan Modra  <amodra@gmail.com>
3         * config/rs6000/predicates.md (easy_fp_constant): Avoid long
4         dependent insn sequences.
5         * config/rs6000/rs6000.c (num_insns_constant): Support long
6         double constants.
7         * config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
8         length attribute.
10 2018-11-30  Alan Modra  <amodra@gmail.com>
12         * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
13         num_insns_constant_wide.  Make static.  Revise comment.
14         (num_insns_constant_multi): New function.
15         (num_insns_constant): Formatting.  Correct CONST_WIDE_INT
16         calculation.  Simplify and extract code common to both
17         CONST_INT and CONST_DOUBLE.  Add gcc_unreachable for unhandled
18         const_double modes.
19         * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
21 2018-11-30  Richard Biener  <rguenther@suse.de>
23         PR tree-optimization/88274
24         * tree-vrp.c (ranges_from_anti_range): Fix handling of
25         TYPE_MIN/MAX_VALUE.
27 2018-11-29  Andi Kleen  <ak@linux.intel.com>
29         * config/i386/i386.c (current_fentry_section): Add.
30         (x86_function_profiler): Handle fentry section.
31         (ix86_attribute_table): Add fentry section.
32         * config/i386/i386.opt: Add -mfentry-section.
33         * doc/extend.texi: Document fentry_section attribute.
34         * doc/invoke.texi: Document -mfentry-section.
36 2018-11-29  Andi Kleen  <ak@linux.intel.com>
38         * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
39         (current_fentry_name): Add.
40         (x86_function_profiler): Handle fentry_name attribute.
41         (ix86_handle_fentry_name): Add.
42         (ix86_attribute_table): Add fentry_name.
43         * config/i386/i386.opt: Add -mfentry-name
44         * doc/extend.texi: Document fentry_name.
45         * doc/invoke.texi: Document minstrument-return.
47 2018-11-29  Andi Kleen  <ak@linux.intel.com>
49         * config/i386/i386-opts.h (enum instrument_return): Add.
50         * config/i386/i386.c (output_return_instrumentation): Add.
51         (ix86_output_function_return): Call output_return_instrumentation.
52         (ix86_output_call_insn): Call output_return_instrumentation.
53         * config/i386/i386.opt: Add -minstrument-return=.
54         * doc/invoke.texi (-minstrument-return): Document.
56 2018-11-29  Eric Botcazou  <ebotcazou@adacore.com>
58         PR target/87807
59         * config/sparc/sparc-modes.def: Minor tweak.
60         * config/sparc/sparc.c: Minor reordering.
61         (sparc_pass_by_reference): Move around.
62         (traverse_record_type): Change offset from HOST_WIDE_INT to int.
63         (classify_registers): Likewise for bitpos.
64         (function_arg_slotno): Remove dead test and tweak comments.
65         <MODE_RANDOM>: Remove useless assertion and test whether the
66         parameter is named in order to pass it in FP registers.  Return
67         the regno for floating-point vector types.
68         (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
69         (compute_fp_layout): Likewise.
70         (count_registers): Likewise.
71         (assign_int_registers): Likewise.
72         (assign_fp_registers): Likewise.
73         (assign_registers): Likewise.
74         (function_arg_record_value): Change size from HOST_WIDE_INT to int
75         and use CEIL_NWORDS to compute the number of registers.
76         (function_arg_union_value): Minor tweaks.
77         (function_arg_vector_value): Add slotno and named parameters, use
78         CEIL_NWORDS to compute the number of registers.
79         (sparc_function_arg_1): Rework handling of vector types.  Change
80         size from HOST_WIDE_INT to int.
81         (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
82         with vector types for the 64-bt ABI.
83         (sparc_function_arg_advance): Likewise.
84         (sparc_return_in_memory): Add reference to -fpcc-struct-return.
85         (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
86         (sparc_function_value_1): Rework handling of vector types.  Change
87         size from HOST_WIDE_INT to int.
89 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
91         PR target/88152
92         * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
93         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
94         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
95         *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
96         *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
97         define_insn_and_split patterns.
99         PR target/54700
100         * config/i386/sse.md
101         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
102         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
103         *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
104         define_insn_and_split.
106 2018-11-29  Peter Bergner  <bergner@linux.ibm.com>
108         PR target/87496
109         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
110         -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
112 2018-11-29  Uros Bizjak  <ubizjak@gmail.com>
114         * config/i386/i386.c (inline_memory_move_cost):
115         Check "in" for 2 in MMX_CLASS_P case.
116         * config/i386/mmx.md (*mov<mode>_internal): Correct
117         TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
118         alternatives in preferred_for_speed attribute calculation.
120 2018-11-29  Martin Sebor  <msebor@redhat.com>
122         PR c/88172
123         PR testsuite/88208
124         * doc/extend.texi (attribute constructor): Clarify.
126 2018-11-29  Martin Liska  <mliska@suse.cz>
128         PR middle-end/88246
129         * builtins.c (expand_movstr): Fix thinko introduced
130         when switching to the new enum.
132 2018-11-29  qing zhao  <qing.zhao@oracle.com>
134         * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
135         * common.opt: Add -flive-patching flag.
136         * doc/invoke.texi: Document -flive-patching.
137         * flag-types.h (enum live_patching_level): New enum.
138         * ipa-inline.c (can_inline_edge_p): Disable external functions from
139         inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
140         * opts.c (control_options_for_live_patching): New function.
141         (finish_options): Make flag_live_patching incompatible with flag_lto.
142         Control IPA optimizations based on different levels of
143         flag_live_patching.
145 2018-11-29  Giuliano Belinassi  <giuliano.belinassi@usp.br>
147         * match.pd (sinh (atanh (x))): New simplification rules.
148         (cosh (atanh (x))): Likewise.
150 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
152         PR target/54700
153         * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
154         (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
155         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
156         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
157         *<sse4_1_avx2>_pblendvb_lt): New define_insns.
159         PR target/88152
160         * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
161         * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
162         * match.pd (define_predicates): Add uniform_integer_cst_p.
163         (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
164         so that it works also for vector comparisons with uniform constants
165         with INTEGER_CST element.
167         PR target/88234
168         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
169         vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
170         in unsigned_type_for instead of vector integral type where overflow
171         doesn't wrap.
173 2018-11-29  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
175         There can be at most one .resolver clone per function
176         * config/rs6000/rs6000.c (make_resolver_func): Generate
177         resolver symbol with clone_function_name instead of
178         clone_function_name_numbered.
180 2018-11-29  Richard Biener  <rguenther@suse.de>
182         PR tree-optimization/88243
183         * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
184         type of all pattern-sequence stmts to vect_internal_def.
186 2018-11-29  Andre Vieira  <andre.simoesdiasvieira@arm.com>
188         PR target/88224
189         * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
190         (cortex-r7, cortex-r8): Update default and add new configuration.
191         * doc/invoke.texi (armv7-r): Add two new vfp options.
192         (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
193         support this option.
195 2018-11-29  Alan Modra  <amodra@gmail.com>
197         * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
198         double split for targets other than Darwin.
200 2018-11-29  Alan Modra  <amodra@gmail.com>
202         * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
204 2018-11-29  Alan Modra  <amodra@gmail.com>
206         * config/rs6000/predicates.md (easy_fp_constant): Remove code
207         dealing with integers in const_double.  Assert on unexpected
208         modes.  Delete superfluous ABI_V4 test.
209         * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
210         Don't call easy_fp_constant for Pmode.
211         (rs6000_hash_constant): Remove code dealing with integers in
212         const_double.
213         (rs6000_legitimate_constant_p): Likewise.
214         (output_toc): Formatting, use CONST_DOUBLE_P.
216 2018-11-29  Alan Modra  <amodra@gmail.com>
218         * config/rs6000/constraints.md (G, H): Comment on purpose of
219         constraint.  Correct mode comments and "G" mode test.
220         * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
221         alternative handling "F".  Add length attr.  Formatting.
222         (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
223         alternative, and move "F" to separate alternative.  Correct
224         insn lengths.
226 2018-11-29  Alan Modra  <amodra@gmail.com>
228         * config/rs6000/predicates.md (easy_vector_constant): Don't call
229         easy_fp_constant.
231 2018-11-29  Alan Modra  <amodra@gmail.com>
233         * config.in (HAVE_AS_PLTSEQ): Add.
234         * config/rs6000/predicates.md (indirect_call_operand): New.
235         * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
236         (rs6000_sibcall_sysv): Declare.
237         * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
238         CALL_LONG for -fno-plt.
239         (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
240         (rs6000_indirect_call_template_1): Emit .reloc directives for
241         UNSPEC_PLTSEQ calls.
242         (rs6000_pltseq_template): New function.
243         (rs6000_longcall_ref): Add arg parameter.  Use PLT16 insns if
244         relocs supported by assembler.  Move SYMBOL_REF test to callers.
245         (rs6000_call_aix): Adjust rs6000_longcall_ref call.  Package
246         insns in UNSPEC_PLTSEQ, preserving original func_desc.
247         (rs6000_call_sysv): Likewise.
248         (rs6000_sibcall_sysv): New function.
249         * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
250         * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
251         UNSPEC_PLT16_LO): New.
252         (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
253         (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
254         cookie in constraints.  Test explicitly for flags in length attr.
255         Handle unspec operand 1.
256         (call_value_indirect_nonlocal_sysv): Likewise.
257         (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
258         (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
259         (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
260         (sibcall_indirect_nonlocal_sysv): New pattern.
261         (sibcall_value_indirect_nonlocal_sysv): Likewise.
262         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
263         call alternatives.
264         * configure.ac: Check for gas plt sequence marker support.
265         * configure: Regenerate.
267 2018-11-29  Alan Modra  <amodra@gmail.com>
269         * config/rs6000/predicates.md (unspec_tls): New.
270         * config/rs6000/rs6000-protos.h (rs6000_call_template),
271         (rs6000_sibcall_template): Update prototype.
272         (rs6000_longcall_ref): Delete.
273         (rs6000_call_sysv): Declare.
274         * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
275         (global_tlsarg): New variable.
276         (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
277         handling.
278         (print_operand): Extract UNSPEC_TLSGD address operand.
279         (rs6000_call_template, rs6000_sibcall_template): Remove arg
280         parameter, extract from second call operand instead.
281         (rs6000_longcall_ref): Make static, localize vars.
282         (rs6000_call_aix): Rename parameter to reflect new usage.  Take
283         tlsarg from global_tlsarg.  Don't create unused rtl or nop insns.
284         (rs6000_sibcall_aix): Rename parameter to reflect new usage.  Take
285         tlsarg from global_tlsarg.
286         (rs6000_call_sysv): New function.
287         * config/rs6000/rs6000.md: Adjust rs6000_call_template and
288         rs6000_sibcall_template throughout.
289         (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
290         (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
291         (tls_gdld_nomark): New insn.
292         (tls_gd): Swap operand order.  Simplify mode selection.
293         (tls_gd_high, tls_gd_low): Swap operand order.
294         (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
295         Simplify mode selection.
296         (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
297         (call, call_value): Don't assert for second call operand.
298         Use rs6000_call_sysv.
300 2018-11-29  Alan Modra  <amodra@gmail.com>
302         * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
303         (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
304         (call_value_nonlocal_darwin64): Remove constraints from second call
305         arg, the rounded_stack_size_rtx arg.
306         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
307         (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
308         (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
309         (call_value_local64, call_indirect_nonlocal_sysv),
310         (call_nonlocal_sysv, call_nonlocal_sysv_secure),
311         (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
312         (call_value_nonlocal_sysv_secure, call_local_aix),
313         (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
314         (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
315         (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
316         (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
317         (sibcall_value_aix): Likewise.
319 2018-11-29  Alan Modra  <amodra@gmail.com>
321         * config/rs6000/rs6000.md (TLSmode): Delete mode iterator.  Replace
322         with P throughout except for call mems which should use SI.
323         (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
324         attributes.  Replace with bits, mode and ptrload respectively.
326 2018-11-29  Alan Modra  <amodra@gmail.com>
328         * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
329         (rs6000_indirect_sibcall_template): Declare.
330         * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
331         (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
332         New functions.
333         * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
334         (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
335         (call_indirect_aix, call_value_indirect_aix): Use
336         rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
337         call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
338         handle both speculation and non-speculation cases.
339         (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
340         (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
342 2018-11-29  Alan Modra  <amodra@gmail.com>
344         * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
345         (rs6000_sibcall_template): Declare.
346         (macho_call_template): Rename from output_call.
347         * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
348         (rs6000_call_template, rs6000_sibcall_template): Likewise.
349         (macho_call_template): Rename from output_call.
350         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
351         (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
352         (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
353         (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
354         (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
355         (call_value_nonlocal_aix): Use rs6000_call_template and update
356         occurrences of output_call to macho_call_template.
357         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
358         (sibcall_value_aix): Use rs6000_sibcall_template.
360 2018-11-28  Aaron Sawdey  <acsawdey@linux.ibm.com>
362         * config/rs6000/rs6000-string.c (expand_block_clear): Change how
363         we determine if unaligned vsx is ok.
365 2018-11-28  Jan Hubicka  <jh@suse.cz>
367         * predict.c (determine_unlikely_bbs): Forward declare; also determine
368         edges that are always known to be taken because it is only likely
369         edge out of given BB.
370         (tree_estimate_probability): Call before profile guessing to get bit
371         of extra precision.
373 2018-11-28  Jan Hubicka  <jh@suse.cz>
375         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
376         profile_probability::always better.
378 2018-11-28  Jan Hubicka  <jh@suse.cz>
380         * profile-count.h (profile_count::split): Give better result when
381         splitting profile_probability::always.
383 2018-11-28  Vladimir Makarov  <vmakarov@redhat.com>
385         PR target/88207
386         * ira-costs.c (scan_one_insn): Process subregs when updating costs
387         for pseudos and allocnos from insn.
389 2018-11-28  David Edelsohn  <dje.gcc@gmail.com>
391         * config/rs6000/aix72.h: Update to match aix71.h changes.
393 2018-11-28  Jeff Law  <law@redhat.com>
395         * config/h8300/constraints.md: Add "C" constraint for call insns.
396         * config/h8300/h8300.md (call, call_value): Turn into a define_expand
397         and define_insn pair.  Move invalid call targets into a register in
398         the expander and fix constraints in the matching pattern.
399         * config/h8300/predicates.md (call_expander_operand): Renamed from
400         call_insn_operand.  Reject things we shouldn't be trying to handle.
401         (call_insn_operand): New predicate for use by the call/call_value
402         insns.
403         (small_call_insn_operand): Update appropriately.
405 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
407         * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
408         calls to strtok with strtok_r.
410 2018-11-28  Richard Biener  <rguenther@suse.de>
412         PR tree-optimization/88223
413         * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
414         over a stored-same value may-alias store make sure to consider
415         partial overlaps which are valid when TBAA reasonings do not
416         apply and byte-granular overlaps are possible at all.
418 2018-11-28  Richard Biener  <rguenther@suse.de>
420         PR tree-optimization/88217
421         * vr-values.c (vr_values::extract_range_from_phi_node): Make
422         sure to handle results > +INF and < -INF correctly when
423         trying to drop down to +INF - 1 or -INF + 1.
425 2018-11-28  Alan Modra  <amodra@gmail.com>
427         * xcoffout.c (do_block): Signed/unsigned warning fix.
429 2018-11-28  Richard Biener  <rguenther@suse.de>
431         PR tree-optimization/79351
432         * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
433         empty CONSTRUCTORs ensure the store is at a constant position.
435 2018-11-28  Richard Biener  <rguenther@suse.de>
437         PR tree-optimization/88229
438         * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
439         is an INTEGER_CST before accessing it so.
441 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
443         * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
445 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
447         PR target/88189
448         * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
449         SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1.  Formatting fixes.
450         * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
452 2018-11-27  Martin Liska  <mliska@suse.cz>
454         * gcov.c (generate_results): Append current_working_directory
455         only when exists.
457 2018-11-27  Mike Gulick  <mgulick@mathworks.com>
459         PR preprocessor/83173
460         * input.c (dump_location_info): Dump reason and included_from
461         fields from line_map_ordinary struct.  Fix indentation when
462         location > 5 digits.
463         * diagnostic-show-locus.c (num_digits, num_digits): Move to
464         diagnostic.c to allow it to be utilized by input.c.
465         * diagnostic.c (num_digits, selftest::test_num_digits): Moved
466         here.
467         (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
468         * diagnostic.h (num_digits): Add extern definition.
470 2018-11-27  Fredrik Noring  <noring@nocrew.org>
472         * config/mips/mips.c (mips_reorg_process_insns)
473         (mips_option_override): Handle `-mfix-r5900'.
474         * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
475         `mno-fix-r5900'.
476         * config/mips/mips.opt (mfix-r5900): New option.
477         * doc/invoke.texi: Document the `r5900' processor name, and
478         `-mfix-r5900' and `-mno-fix-r5900' options.
480 2018-11-27  Jakub Jelinek  <jakub@redhat.com>
482         PR target/88188
483         * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
484         output_operand_lossage instead of gcc_assert.
485         <case 't'>: Likewise.
486         <case 'z'>: Likewise.
487         <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
489 2018-11-27  Jeff Law  <law@redhat.com>
491         * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
492         in call to move_by_pieces.
494         * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
495         to move_by_pieces.
497         * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
498         call to move_by_pieces.
500         * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
501         in call to move_by_pieces.
503         * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
504         RETURN_BEGIN in call to move_by_pieces.
505         (microblaze_expand_block_move): Likewise.
507 2018-11-27  Tamar Christina  <tamar.christina@arm.com>
509         * doc/md.texi (xorsign): Document it.
511 2018-11-27  Martin Liska  <mliska@suse.cz>
513         * config/gnu-user.h (TARGET_F951_OPTIONS): New.
514         * gcc.c (find_fortran_preinclude_file): New function
515         to handle Fortran pre-include.
517 2018-11-27  Martin Liska  <mliska@suse.cz>
519         * asan.c (asan_emit_stack_protection): Use new enum values
520         instead of int constants.
521         * builtins.c (expand_builtin_memory_copy_args): Replace int
522         type with memop_ret enum type.
523         (expand_builtin_mempcpy_args): Likewise.
524         (expand_builtin_memcpy): Use new enum values
525         instead of int constants. Likewise.
526         (expand_builtin_mempcpy): Likewise.
527         (expand_movstr): Likewise.
528         (expand_builtin_strcpy_args): Likewise.
529         (expand_builtin_stpcpy_1): Likewise.
530         (expand_builtin_strncpy): Likewise.
531         (expand_builtin_memset_args): Likewise.
532         * expr.c (move_by_pieces_d::finish_endp): Rename to ...
533         (move_by_pieces_d::finish_retmode): ... this.
534         (move_by_pieces): Change last argument type to memop_ret.
535         (store_by_pieces): Use new enum values
536         instead of int constants.
537         (emit_block_move_hints): Likewise.
538         (emit_push_insn): Likewise.
539         (store_expr): Likewise.
540         * expr.h (store_by_pieces): Change int to newly added enum
541         type.
542         * rtl.h (enum memop_ret): Define.
543         (move_by_pieces): Use the enum type.
545 2018-11-27  Alan Modra  <amodra@gmail.com>
547         * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
548         cpu here.
549         (ASM_CPU_SPEC): Do so here.  Rewrite using if .. else if .. specs
550         form.  Error on missing -mcpu case.
551         * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
552         (asm_names <!_AIX>): Add missing cpus.  Update NULL case.  Apply
553         PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
554         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
555         else if .. specs form.  Error on missing -mcpu case.  Don't output
556         duplicate -maltivec.  Apply PR63177 fix for -mcpu=powerpc64le.
558 2018-11-26  David Malcolm  <dmalcolm@redhat.com>
560         * dump-context.h (dump_context::dump_loc): Convert 1st param from
561         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
562         const dump_location_t & to const dump_user_location_t &.
563         (dump_context::dump_loc_immediate): Convert 2nd param from
564         const dump_location_t & to const dump_user_location_t &.
565         (dump_context::dump_gimple_stmt): Convert 1st param from
566         dump_flags_t to const dump_metadata_t &.
567         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
568         2nd param from const dump_location_t & to
569         const dump_user_location_t &.
570         (dump_context::dump_gimple_expr): Convert 1st param from
571         dump_flags_t to const dump_metadata_t &.
572         (dump_context::dump_gimple_expr_loc): Likewise; convert
573         2nd param from const dump_location_t & to
574         const dump_user_location_t &.
575         (dump_context::dump_generic_expr): Convert 1st param from
576         dump_flags_t to const dump_metadata_t &.
577         (dump_context::dump_generic_expr_loc): Likewise; convert
578         2nd param from const dump_location_t & to
579         const dump_user_location_t &.
580         (dump_context::dump_printf_va): Convert 1st param from
581         dump_flags_t to const dump_metadata_t &.
582         (dump_context::dump_printf_loc_va): Likewise; convert
583         2nd param from const dump_location_t & to
584         const dump_user_location_t &.
585         (dump_context::dump_dec): Convert 1st param from
586         dump_flags_t to const dump_metadata_t &.
587         (dump_context::dump_symtab_node): Likewise.
588         (dump_context::begin_scope): Split out 2nd param into
589         user and impl locations.
590         (dump_context::ensure_pending_optinfo): Add metadata param.
591         (dump_context::begin_next_optinfo): Replace dump_location_t param
592         with metadata and user location.
593         * dumpfile.c (dump_context::dump_loc): Convert 1st param from
594         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
595         const dump_location_t & to const dump_user_location_t &.
596         (dump_context::dump_loc_immediate): Convert 2nd param from
597         const dump_location_t & to const dump_user_location_t &.
598         (dump_context::dump_gimple_stmt): Convert 1st param from
599         dump_flags_t to const dump_metadata_t &.
600         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
601         2nd param from const dump_location_t & to
602         const dump_user_location_t &.
603         (dump_context::dump_gimple_expr): Convert 1st param from
604         dump_flags_t to const dump_metadata_t &.
605         (dump_context::dump_gimple_expr_loc): Likewise; convert
606         2nd param from const dump_location_t & to
607         const dump_user_location_t &.
608         (dump_context::dump_generic_expr): Convert 1st param from
609         dump_flags_t to const dump_metadata_t &.
610         (dump_context::dump_generic_expr_loc): Likewise; convert
611         2nd param from const dump_location_t & to
612         const dump_user_location_t &.
613         (dump_context::dump_printf_va): Convert 1st param from
614         dump_flags_t to const dump_metadata_t &.
615         (dump_context::dump_printf_loc_va): Likewise; convert
616         2nd param from const dump_location_t & to
617         const dump_user_location_t &.
618         (dump_context::dump_dec): Convert 1st param from
619         dump_flags_t to const dump_metadata_t &.
620         (dump_context::dump_symtab_node): Likewise.
621         (dump_context::begin_scope): Split out 2nd param into
622         user and impl locations.
623         (dump_context::ensure_pending_optinfo): Add metadata param.
624         (dump_context::begin_next_optinfo): Replace dump_location_t param
625         with metadata and user location.
626         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
627         const dump_metadata_t &.
628         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
629         const dump_location_t & to const dump_user_location_t &.
630         (dump_gimple_expr): Convert 1st param from dump_flags_t to
631         const dump_metadata_t &.
632         (dump_gimple_expr_loc): Likewise; convert 2nd param from
633         const dump_location_t & to const dump_user_location_t &.
634         (dump_generic_expr): Convert 1st param from dump_flags_t to
635         const dump_metadata_t &.
636         (dump_generic_expr_loc): Likewise; convert 2nd param from
637         const dump_location_t & to const dump_user_location_t &.
638         (dump_printf): Convert 1st param from dump_flags_t to
639         const dump_metadata_t &.
640         (dump_printf_loc): Likewise; convert 2nd param from
641         const dump_location_t & to const dump_user_location_t &.
642         (dump_dec): Convert 1st param from dump_flags_t to
643         const dump_metadata_t &.
644         (dump_symtab_node): Likewise.
645         (dump_begin_scope): Split out 2nd param into user and impl
646         locations.
647         (selftest::assert_impl_location_eq): New function.
648         (ASSERT_IMPL_LOCATION_EQ): New macro.
649         (selftest::test_impl_location): Update to use
650         ASSERT_IMPL_LOCATION_EQ.
651         (selftest::test_capture_of_dump_calls): Convert "loc" to
652         dump_user_location_t.  Add ASSERT_IMPL_LOCATION_EQ throughout,
653         verifying line numbers of dump emissions.
654         * dumpfile.h (class dump_metadata_t): New class.
655         (dump_printf): Convert 1st param from dump_flags_t to
656         const dump_metadata_t &.
657         (dump_printf_loc): Likewise; convert 2nd param from
658         const dump_location_t & to const dump_user_location_t &.
659         (dump_generic_expr_loc): Likewise.
660         (dump_generic_expr): Convert 1st param from dump_flags_t to
661         const dump_metadata_t &.
662         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
663         const dump_location_t & to const dump_user_location_t &.
664         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
665         const dump_metadata_t &.
666         (dump_gimple_expr_loc): Likewise; convert 2nd param from
667         const dump_location_t & to const dump_user_location_t &.
668         (dump_gimple_expr): Convert 1st param from dump_flags_t to
669         const dump_metadata_t &.
670         (dump_symtab_node): Likewise.
671         (dump_dec): Likewise.
672         (dump_begin_scope): Split out 2nd param into user and impl
673         locations.
674         (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
675         location and impl_location, and capture the impl_location.
676         (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
677         * loop-unroll.c (report_unroll): Update for changes to
678         dump_printf_loc and dump_printf.
679         * opt-problem.cc (opt_problem::opt_problem): Update for change to
680         dump_loc.
681         * optinfo-emit-json.cc
682         (selftest::test_building_json_from_dump_calls): Convert "loc" from
683         dump_location_t to dump_user_location_t.
684         * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
685         dump_loc_immediate.
686         * profile.c (compute_branch_probabilities): Update for change to
687         dump_printf_loc.
688         * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
689         * tree-vect-slp.c (vect_print_slp_tree): Update for change to
690         dump_printf_loc.
692 2018-11-27  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
694         * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
695         and check_effective_target_ptr_eq_long.
697 2018-11-27  Alan Modra  <amodra@gmail.com>
699         * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
700         (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
701         (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
702         (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
703         (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
704         * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
705         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
706         (ASM_APP_ON, ASM_APP_OFF): Don't define.
707         * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
708         * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
709         * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
710         * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
711         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
712         * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
713         * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
714         (GNU_USER_TARGET_CRTN): Redefine.
715         (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
716         (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
717         (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
718         (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
719         (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
720         (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
721         (LINK_EH_SPEC): Don't define.
723 2018-11-26  Martin Sebor  <msebor@redhat.com>
725         PR 87756
726         * expr.c (string_constant): Handle top-level decls of all character
727         types and subobjects of narrow character type.
729 2018-11-27  Alan Modra  <amodra@gmail.com>
731         * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
732         * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
733         GNU_USER_TARGET_OS_CPP_BUILTINS.
734         (RS6000_ABI_NAME): Define.
735         * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
736         GNU_USER_TARGET_OS_CPP_BUILTINS.
737         (MUSL_DYNAMIC_LINKER32): Undef before defining.
738         (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
739         (CHOOSE_DYNAMIC_LINKER): Don't define.
740         (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
741         * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
742         (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
743         not already defined.
744         (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
745         TARGET_OS_CPP_BUILTINS.
747 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
749         * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
751 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
753         PR target/88195
754         * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
755         and !TARGET_64BIT, return NULL_TREE.
757         PR c++/86900
758         * dwarf2out.c (secname_for_decl): For functions with
759         DECL_SECTION_NAME if in_cold_section_p, try to return
760         current_function_section's name if it is a named section.
762 2018-11-26  Maya Rashish  <coypu@sdf.org>
764         PR target/58397
765         * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
766         * config/x-netbsd: New file.
767         * config/host-netbsd: New file.
769 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
771         * doc/sourcebuild.texi: Document check_effective_target_size20plus.
772         Clarify documentation for check_effective_target_size32plus.
774 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
776         * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
777         and modify expand_strncmp_vec_sequence.
778         (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
779         (generate_6432_conversion): New function.
780         (expand_block_compare): Add support for vsx.
781         (expand_block_compare_gpr): New function.
782         * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
783         default limit to 63 because of more compact vsx code.
785 2018-11-26  Uros Bizjak  <ubizjak@gmail.com>
787         PR target/88178
788         * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
789         for registers for which no debug information can be generated.
790         Use INVALID_REGNUM for non-existent registers.
791         (dbx64_register_map): Ditto.
792         (svr4_dbx_register_map): Ditto.
794 2018-11-26  Sandra Loosemore  <sandra@codesourcery.com>
796         PR c/57182
797         * doc/invoke.texi (Optimize Options): Document that
798         -freorder-functions also uses "hot" and "cold" attributes.
800 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
802         * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
804 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
806         * config/arm/types.md (mul64): Rename to...
807         (widen_mul64): ... This.
808         * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
809         * config/arm/cortex-a15.md: Likewise.
810         * config/arm/cortex-a5.md: Likewise.
811         * config/arm/cortex-a53.md: Likewise.
812         * config/arm/cortex-a57.md: Likewise.
813         * config/arm/cortex-a7.md: Likewise.
814         * config/arm/cortex-m4.md: Likewise.
815         * config/arm/exynos-m1.md: Likewise.
816         * config/arm/marvell-pj4.md: Likewise.
817         * config/arm/xgene1.md: Likewise.
819 2018-11-26  Richard Biener  <rguenther@suse.de>
821         PR tree-optimization/88182
822         * tree-vect-loop.c (vectorizable_reduction): Pick up single
823         correct reduc_def_info.
824         * tree-vect-slp.c (vect_analyze_slp_instance): Set
825         STMT_VINFO_REDUC_DEF of the first stmt.
827 2018-11-26  Andreas Krebbel  <krebbel@linux.ibm.com>
829         * doc/invoke.texi: Document z14/arch12 -march option.
831 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
833         PR c/57166
834         * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
835         (Warning Options): Likewise.
837 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
839         PR web/79738
840         * doc/extend.texi (Common Function Attributes): Clarify that
841         functions with "const" attribute can read const global variables.
843 2018-11-26  Alan Modra  <amodra@gmail.com>
845         * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
847 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
849         PR other/54265
850         * doc/extend.texi (Common Variable Attributes): Use preferred
851         placement of type attributes in examples, plus whitespace fixes.
852         (Type Attributes): Clarify why placement of attributes
853         immediately after struct/union/enum keyword is preferred.
854         (Common Type Attributes): Use preferred placement of type
855         attributes in examples, plus more whitespace fixes.
857 2018-11-25  Paul Koning  <ni1d@arrl.net>
859         * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
861 2018-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
863         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
864         attributes): Document d_runtime.
866 2018-11-25  Vladimir Makarov  <vmakarov@redhat.com>
868         PR bootstrap/88157
869         * ira-costs.c (record_operand_costs): Initiate register move cost
870         for mode.
872 2018-11-23  Jeff Law  <law@redhat.com>
874         PR rtl-optimization/87468
875         * tree-ssa-threadupdate.c (create_block_for_threading): Clear
876         EDGE_IGNORE on all outgoing edges of the duplicate block.
878 2018-11-23  Vladimir Makarov  <vmakarov@redhat.com>
880         PR bootstrap/88157
881         * ira-costs.c (record_operand_costs): Use bigger hard reg class if
882         its mode does not fit to the original class.
884 2018-11-23  Martin Sebor  <msebor@redhat.com>
886         PR tree-optimization/87756
887         * expr.c (string_constant): Synthesize a string literal from
888         the address of a constant character.
889         * tree.c (build_string_literal): Add an argument.
890         * tree.h (build_string_literal): Same.
892 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
894         * config/aarch64/aarch64-cores.def: Define emag.
895         * config/aarch64/aarch64-tune.md: Regenerated with emag.
896         * config/aarch64/aarch64.c (emag_tunings): New struct.
897         * doc/invoke.texi: Document mtune value.
899 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
900             Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
902         * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
903         for GCC 9.
904         * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
905         prefetch tunings.
906         * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
907         costs.
908         * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
909         for XGene1.
911 2018-11-23  Richard Biener  <rguenther@suse.de>
913         PR tree-optimization/88149
914         * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
915         the case where there are two different def types for the
916         same operand at different operand position in the same stmt.
918 2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
920         * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
921         gen_atomic_compare_swap_1.
922         (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
923         (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
924         (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
925         (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
926         (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
927         checks.
928         * config/arm/arm.md (neon_vext<mode>),
929         (neon_vrev64<mode>, neon_vrev32<mode>),
930         (neon_vrev16<mode>, neon_vtrn<mode>_internal),
931         (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
932         before the pattern name.
933         * config/arm/sync.md:
934         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
935         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
937 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
939         PR tree-optimization/86614
940         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
941         if TREE_NO_WARNING is set on ref.ref.
943 2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
944             Alan Coopersmith  <alan.coopersmith@oracle.com>
946         PR c/53608
947         * doc/extend.texi (Designated Inits): Clarify handling of multiple
948         initializers for unions.
950 2018-11-22  Jan Hubicka  <jh@suse.cz>
952         PR lto/88142
953         * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
954         parameters; do not warn here.
955         (odr_subtypes_equivalent_p): Likewise.
956         (warn_odr): Fix typo.
957         (warn_types_mismatch): Do not output confused warnings on integer types.
958         (odr_types_equivalent_p): Update.
960 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
962         * config/i386/i386.c (ix86_option_override_internal,
963         ix86_can_inline_p, classify_argument, construct_container,
964         ix86_expand_prologue, ix86_expand_split_stack_prologue,
965         ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
966         expand_setmem_epilogue_via_loop, promote_duplicated_reg,
967         ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
968         Formatting fixes.
970         * config/i386/i386.c (ix86_option_override_internal): For
971         stack_protector_guard related options, use opts_set->x_ instead
972         of global_options_set. and prefix options with opts->x_ .  Move
973         defaults for offset and reg into else block.
975 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
977         * config/i386/i386.c (ix86_check_avx_upper_register):
978         Return true for all SSE registers with mode bitsize > 128.
980 2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
982         PR rtl-optimization/87718
983         * ira-costs.c: Remove trailing white-spaces.
984         (record_operand_costs): Add a special treatment for moves
985         involving a hard register.
987 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
989         * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
990         (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
992 2018-11-22  Martin Liska  <mliska@suse.cz>
994         * common/config/i386/i386-common.c (processor_names): Add
995         static assert and add missing "znver2".
996         (ix86_get_valid_option_values): Add checking assert for null
997         values and add "native" value if feasible.
998         * config/i386/i386.h: Do not declare size of processor_names.
999         * common/config/i386/i386-common.c:
1000         * config/i386/i386.c: Add static assert for size
1001         of processor_cost_table.
1003 2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1005         * target-insns.def (stack_protect_combined_set): Define new standard
1006         pattern name.
1007         (stack_protect_combined_test): Likewise.
1008         * cfgexpand.c (stack_protect_prologue): Try new
1009         stack_protect_combined_set pattern first.
1010         * function.c (stack_protect_epilogue): Try new
1011         stack_protect_combined_test pattern first.
1012         * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
1013         parameters to control which register to use as PIC register and force
1014         reloading PIC register respectively.  Insert in the stream of insns if
1015         possible.
1016         (legitimize_pic_address): Expose above new parameters in prototype and
1017         adapt recursive calls accordingly.  Use pic_reg if non null instead of
1018         cached one.
1019         (arm_load_pic_register): Add pic_reg parameter and use it if non null.
1020         (arm_legitimize_address): Adapt to new legitimize_pic_address
1021         prototype.
1022         (thumb_legitimize_address): Likewise.
1023         (arm_emit_call_insn): Adapt to require_pic_register prototype change.
1024         (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
1025         (thumb1_expand_prologue): Likewise.
1026         * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
1027         change.
1028         (arm_load_pic_register): Likewise.
1029         * config/arm/predicated.md (guard_addr_operand): New predicate.
1030         (guard_operand): New predicate.
1031         * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
1032         prototype change.
1033         (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
1034         prototype change.
1035         (stack_protect_combined_set): New expander..
1036         (stack_protect_combined_set_insn): New insn_and_split pattern.
1037         (stack_protect_set_insn): New insn pattern.
1038         (stack_protect_combined_test): New expander.
1039         (stack_protect_combined_test_insn): New insn_and_split pattern.
1040         (arm_stack_protect_test_insn): New insn pattern.
1041         * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
1042         * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
1043         (UNSPEC_SP_TEST): Likewise.
1044         * doc/md.texi (stack_protect_combined_set): Document new standard
1045         pattern name.
1046         (stack_protect_set): Clarify that the operand for guard's address is
1047         legal.
1048         (stack_protect_combined_test): Document new standard pattern name.
1049         (stack_protect_test): Clarify that the operand for guard's address is
1050         legal.
1052 2018-11-22  Richard Biener  <rguenther@suse.de>
1054         PR tree-optimization/88148
1055         * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
1056         valueization callback parameter and handle it.
1057         * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
1058         * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
1060 2018-11-22  Richard Biener  <rguenther@suse.de>
1062         PR lto/87229
1063         PR lto/88112
1064         * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1065         which can appear in size expressions.
1066         * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1067         CALL_EXPR_BY_DESCRIPTOR.
1068         (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1069         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1070         CALL_EXPR_BY_DESCRIPTOR.
1071         (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1073         Revert
1074         PR lto/87229
1075         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1076         sizepos values.
1078 2018-11-22  Richard Biener  <rguenther@suse.de>
1080         PR tree-optimization/88069
1081         * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
1082         apply to default defs.
1084 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
1086         PR target/85644
1087         PR target/86832
1088         * config/i386/i386.c (ix86_option_override_internal): Default
1089         ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1090         is defined.
1091         * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1092         stack_protect_test, stack_protect_test_<mode>): Use empty condition
1093         instead of TARGET_SSP_TLS_GUARD.
1095 2018-11-22  Martin Liska  <mliska@suse.cz>
1097         PR sanitizer/88017
1098         * config/i386/i386.c (ix86_option_override_internal): Error
1099         about usage -mabi=ms and -fsanitize=thread.
1101 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
1103         Revert the revert:
1104         2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
1106         Revert:
1107         2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
1109         * lra-spills.c (lra_final_code_change): Remove useless move insns.
1111 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
1113         PR middle-end/88129
1114         * function.c (expand_function_end): Do not emit extra blockage insn.
1116 2018-11-21  Lokesh Janghel  <lokeshjanghel91@gmail.com>
1118         PR target/85667
1119         * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
1120         of FIRST_SSE_REG for 4 or 8 byte modes.
1122 2018-11-21  Jan Hubicka  <jh@suse.cz>
1124         PR lto/87957
1125         * tree.c (fld_decl_context): Break out from ...
1126         (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1127         DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1128         (fld_incomplete_type_of): Build copy of TYP_DECL.
1129         * ipa-devirt.c (free_enum_values): Rename to ...
1130         (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1131         and TREE_TYPEs of TYPE_DECLs.
1132         (get_odr_type): Initialize odr_vtable_hash if needed.
1134 2018-11-21  Alexandre Oliva <oliva@adacore.com>
1136         * final.c (compute_discriminator): Declare.  Renamed from...
1137         (maybe_set_discriminator): ... this.  Set and return a local.
1138         (override_discriminator): New.
1139         (final_scan_insn_1): Set it.
1140         (notice_source_line): Adjust.  Always set discriminator.
1142 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1144         PR target/87839
1145         * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1146         rIJ constraint for aarch64_plus_operand rather than rn.
1148 2018-11-21  Renlin Li  <renlin.li@arm.com>
1150         PR middle-end/84877
1151         * explow.h (get_dynamic_stack_size): Declare it as external.
1152         * explow.c (record_new_stack_level): Remove function static attribute.
1153         * function.c (assign_stack_local_1): Dynamically align the stack slot
1154         addr for parameter copy on the stack.
1156 2018-11-21  Richard Biener  <rguenther@suse.de>
1158         PR bootstrap/88133
1159         * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1160         * Makefile.in (bitmap.o-warn): Remove again.
1162 2018-11-20  Jeff Law  <law@redhat.com>
1164         PR tree-optimization/88069
1165         * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1166         degenerate virtual PHIs.
1168 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1170         PR target/87317
1171         * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1172         nonimmediate_operand with register_operand.
1173         (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1174         (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1175         (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1176         (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1177         (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1178         (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1179         (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1180         (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1181         (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1182         (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1183         (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1184         (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1185         (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1186         (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1187         (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1188         (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1189         (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1190         (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1191         (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1192         (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1193         (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1194         (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1195         (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1196         (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1197         (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1198         (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1199         (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1201 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1203         * read-rtl.c (apply_subst_iterator): Handle define_split and
1204         define_insn_and_split.
1206 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1208         PR rtl-optimization/87817
1209         * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1210         *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1211         in the pattern to avoid triggering UB when operands[2] is zero.
1212         (tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
1213         (*tbm_bextri_<mode>): ... this.
1215 2018-11-21  Tom de Vries  <tdevries@suse.de>
1217         PR driver/79855
1218         * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1219         period.
1221 2018-11-21  Andreas Krebbel  <krebbel@linux.ibm.com>
1223         * configure.ac: Add check for Binutils to determine whether vector
1224         load/store alignments hints are being supported.
1225         * config.in: Regenerate.
1226         * configure: Regenerate.
1227         * config/s390/s390.c (print_operand): Support new output
1228         modifier A.
1229         * config/s390/s390.md ("movti"): Append alignment hint output
1230         using the new output modifier 'A'.
1231         * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1232         ("*vec_ti_to_v1ti"): Likewise.
1234 2018-11-20  Martin Sebor  <msebor@redhat.com>
1236         * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1238 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1240         PR lto/84044
1241         * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1242         compare ENUM values.
1244 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
1246         PR tree-optimization/87895
1247         * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1248         or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1249         (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1250         redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1251         has any preds and always use EDGE_PRED (, 0).
1253 2018-11-20  Uros Bizjak  <ubizjak@gmail.com>
1255         PR target/88070
1256         * mode-switching.c (create_pre_exit): After reload, always split the
1257         fallthrough edge to the exit block.
1259 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1261         * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1262         * tree.c (build_array_type_1): Forward declare.
1263         (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1264         (fld_type_variant): Likewise.
1265         (fld_simplified_types): New hash.
1266         (fld_process_array_type): New function.
1267         (fld_incomplete_type_of): Handle array and enumeration types.
1268         (fld_simplified_type): Handle simplification of arrays.
1269         (free_lang_data): Allocate and free simplified types hash.
1271 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1273         PR lto/87957
1274         * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1275         when sybtype already violates ODR.
1276         (get_odr_type): Do not ICE when insert is false and type duplicate
1277         is not registered yet.
1278         (register_odr_type): Be sure to register subtypes first.
1280 2018-11-20  Andreas Krebbel  <krebbel@linux.ibm.com>
1282         * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1283         DImode parts of the target operand.
1285 2018-11-20  Nathan Sidwell  <nathan@acm.org>
1287         PR 87926
1288         * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1290 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1292         PR lto/87997
1293         * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1294         type checking to...
1295         (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1297 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1299         PR ipa/87706
1300         * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1301         * ipa.c (possible_inline_candidate_p): Break out from ..
1302         (process_references): ... here ; drop before_inlining_p;
1303         cleanup handling of alises.
1304         (walk_polymorphic_call_targets): Likewise.
1305         (symbol_table::remove_unreachable_nodes): Likewise.
1306         * passes.c (pass_data_ipa_remove_symbols): New structure.
1307         (pass_ipa_remove_symbols): New pass.
1308         (make_pass_ipa_remove_symbols): New function.
1309         * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1310         * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1312 2018-11-20  Richard Biener  <rguenther@suse.de>
1314         * tree-vect-stmts.c (vectorizable_condition): Do not get
1315         at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
1316         pointless vect_is_simple_use calls.
1318 2018-11-20  Richard Biener  <rguenther@suse.de>
1320         PR tree-optimization/88074
1321         * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1322         backedges.
1324 2018-11-20  Richard Biener  <rguenther@suse.de>
1326         PR tree-optimization/88069
1327         * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1328         virtual PHI arguments.
1330 2018-11-20  Ilya Leoshkevich  <iii@linux.ibm.com>
1332         PR target/88083
1333         * config/s390/s390.md: Skip LT(G) peephole when literal pool is
1334         involved.
1335         * rtl.h (contains_constant_pool_address_p): New function.
1336         * rtlanal.c (contains_constant_pool_address_p): Likewise.
1338 2018-11-20  Richard Biener  <rguenther@suse.de>
1340         PR middle-end/83215
1341         * alias.c (component_uses_parent_alias_set_from): Remove
1342         alias-set zero and TYPE_TYPELESS_STORAGE case both already
1343         handled in other ways.
1345 2018-11-20  Richard Biener  <rguenther@suse.de>
1347         PR tree-optimization/88087
1348         * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
1349         call fntype.
1350         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
1351         call fntype.
1353 2018-11-20  Richard Biener  <rguenther@suse.de>
1355         PR middle-end/88089
1356         * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
1358 2018-11-19  Jan Hubicka  <hubicka@ucw.cz>
1360         PR lto/87957
1361         * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
1363 2018-11-19  Sandra Loosemore  <sandra@codesourcery.com>
1365         PR driver/50250
1366         * doc/invoke.texi (Link Options): Mention shared libraries
1367         in documentation for the -l option.  Simplify discussion and
1368         point to the system linker documentation for details.
1370 2018-11-19  Peter Bergner  <bergner@linux.ibm.com>
1372         PR rtl-optimization/88033
1373         * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
1374         to itself.  Use HARD_REGISTER_NUM_P.
1376 2018-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1378         * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
1379         of the loop if vf is non-constant.
1381 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
1383         PR tree-optimization/87025
1384         * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
1385         immediately after creating the scope optinfo.
1386         (selftest::test_pr87025): New function.
1387         (selftest::dumpfile_c_tests): Call it.
1388         * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
1389         that we're not popping the top-level records array.
1390         * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
1391         not changing the kind of a "scope" optinfo.
1393 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
1395         PR tree-optimization/87025
1396         * dump-context.h: Include "optinfo.h".
1397         (class optrecord_json_writer): New forward decl.
1398         (dump_context::forcibly_enable_optinfo_p): Delete.
1399         (dump_context::optinfo_enabled_p): New member function.
1400         (dump_context::optimization_records_enabled_p): New member
1401         function.
1402         (dump_context::set_json_writer): New member function.
1403         (dump_context::emit_optinfo): New member function.
1404         (dump_context::m_forcibly_enable_optinfo): Delete.
1405         (dump_context::m_json_writer): New member data.
1406         * dumpfile.c (dump_context::set_json_writer): New member function.
1407         (dump_context::finish_any_json_writer): New member function.
1408         (dump_context::end_scope): Replace call to
1409         optimization_records_maybe_pop_dump_scope with call to
1410         m_json_writer->pop_scope.
1411         (dump_context::optinfo_enabled_p): New member function.
1412         (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
1413         to dump_context::emit_optinfo.
1414         (dump_context::emit_optinfo): New member function.
1415         (temp_dump_context::temp_dump_context): Replace
1416         m_forcibly_enable_optinfo with call to set_json_writer.
1417         (temp_dump_context::~temp_dump_context): Clean up any json writer.
1418         * optinfo-emit-json.cc (class optrecord_json_writer): Move to
1419         optinfo-emit-json.h
1420         (the_json_writer): Delete.
1421         (optimization_records_start): Delete.
1422         (optimization_records_finish): Delete.
1423         (optimization_records_enabled_p): Delete, in favor of
1424         dump_context::optimization_records_enabled_p.
1425         (optimization_records_maybe_record_optinfo): Delete.
1426         (optimization_records_maybe_pop_dump_scope): Delete.
1427         * optinfo-emit-json.h: Include "json.h".  Delete forward
1428         decl of opt_pass.
1429         (optimization_records_start): Delete.
1430         (optimization_records_finish): Delete.
1431         (optimization_records_enabled_p): Delete.
1432         (optimization_records_maybe_record_optinfo): Delete.
1433         (optimization_records_maybe_pop_dump_scope): Delete.
1434         (class optrecord_json_writer): Move here from
1435         optinfo-emit-json.cc.
1436         * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
1437         to optinfo::emit with call to dump_context::emit_optinfo.
1438         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1439         (optinfo_enabled_p): Delete, in favor of
1440         dump_context::optinfo_enabled_p.
1441         (optinfo_wants_inlining_info_p): Update for conversion o
1442         optimization_records_enabled_p to a member function of
1443         dump_context.
1444         * optinfo.h (optinfo_enabled_p): Delete, in favor of
1445         dump_context::optinfo_enabled_p.
1446         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1447         * toplev.c: Include "dump-context.h".
1448         (compile_file): Replace call to optimization_records_finish with
1449         dump_context::finish_any_json_writer.
1450         (do_compile): Replace call to optimization_records_start with
1451         conditionally creating a optrecord_json_writer for the
1452         dump_context.
1454 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
1456         PR tree-optimization/88071
1457         * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
1458         of false as last argument to gsi_remove.
1459         * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
1460         false as last argument to gsi_replace.
1462         PR debug/87039
1463         * omp-expand.c: Don't include debug.h.
1464         (adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
1465         from innermost outer parallel, task, teams or target that has a
1466         child_fn set, or, if there is no such outer region, use
1467         current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
1468         whether a suitable BLOCK is found or not.
1469         (expand_parallel_call, expand_teams_call): Don't call
1470         adjust_context_and_scope here.
1471         (grid_expand_target_grid_body): Revert 2017-01-25 changes.
1472         (expand_omp_taskreg, expand_omp_target): Likewise.  Call
1473         adjust_context_and_scope.
1474         * dwarf2out.c (dwarf2out_early_global_decl): For
1475         decl_function_context recurse instead of calling dwarf2out_decl.
1477 2018-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1479         PR rtl-optimization/85925
1480         * rtl.h (word_register_operation_p): New predicate.
1481         * combine.c (record_dead_and_set_regs_1): Only apply specific handling
1482         for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
1483         * rtlanal.c (nonzero_bits1): Likewise.  Adjust couple of comments.
1484         (num_sign_bit_copies1): Likewise.
1486 2018-11-19  Richard Biener  <rguenther@suse.de>
1488         PR lto/87229
1489         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1490         sizepos values.
1492 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
1494         * compare-elim.c (struct comparison): Add not_in_a field.
1495         (is_not): New static function.
1496         (strip_not): Likewise.
1497         (conforming_compare): Handle a NOT in the first operand.
1498         (can_eliminate_compare): Likewise.
1499         (find_comparison_dom_walker::before_dom_children): Likewise.
1500         (try_eliminate_compare): Likewise.
1501         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
1502         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
1504 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
1506         * doc/extend.texi (Common Type Attributes): Fix typos.
1508 2018-11-19  Martin Liska  <mliska@suse.cz>
1510         PR gcov-profile/88045
1511         * coverage.c (coverage_begin_function): Add assert.
1513 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
1515         PR other/40498
1516         * doc/extend.texi (Common Function Attributes): Document that
1517         no_instrument_function applies to -p and -pg, too.
1518         * doc/invoke.texi (Instrumentation Options): Add cross-references
1519         to docs for -p, -pg, and -finstrument-functions.
1521 2018-11-18  Alan Modra  <amodra@gmail.com>
1523         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
1524         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
1525         (GNU_USER_TARGET_CRTN): Define.
1526         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
1527         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
1529 2018-11-18  Alan Modra  <amodra@gmail.com>
1531         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
1532         !HAVE_LD_PIE variant.
1533         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
1535 2018-11-17  Nick Clifton  <nickc@redhat.com>
1536             Sandra Loosemore  <sandra@codesourcery.com>
1538         PR driver/31357
1539         * doc/invoke.texi (Overall Options): Document that --help and
1540         --help=<value> options cannot be combined.
1542 2018-11-17  Jim Wilson  <jimw@sifive.com>
1544         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
1545         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
1546         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
1547         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
1548         to step2 if frame_pointer_needed and step1 is 0.
1550 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
1552         PR c++/4225
1553         * doc/cpp.texi (System Headers): Add note about implicit
1554         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
1556 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
1558         PR c++/4025
1559         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
1560         -fno-implicit-templates.
1562 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
1564         PR tree-optimization/87546
1565         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
1566         min_precision variable, initially set it to orig_precision, only does
1567         something if op_type's precision is <= min_precision and update
1568         min_precision whenever calling set_op.
1570 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
1572         PR ipa/87957
1573         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
1575 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
1577         * doc/invoke.texi (Option Summary): Fix whitespace and line
1578         breaks in @gccoptlist environments.
1579         (Warning Options): Likewise.
1580         (Optimize Options): Likewise.
1581         (PowerPC SPE Options): Likewise.
1582         (RS/6000 and PowerPC Options): Likewise.
1584 2018-11-16  Jeff Law  <law@redhat.com>
1586         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
1587         gcc_assert.
1589 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
1591         PR middle-end/23197
1592         * doc/invoke.texi (Optimize Options): Update options enabled by
1593         fprofile-generate, -fprofile-use, and -fauto-profile.
1595 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1597         PR target/87927
1598         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
1599         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
1600         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
1601         the byte_op hook.
1602         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
1603         * targhooks.c (default_print_patchable_function_entry): Assert
1604         asm_int_op does not return a NULL string.
1605         * varasm.c (integer_asm_op): Return the op for a partial int type
1606         when the requested size does not correspond to an integer type.
1607         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
1608         * doc/tm.texi: Regenerate.
1610 2018-11-12  Jason Merrill  <jason@redhat.com>
1612         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
1614 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
1616         * config/rs6000/constraints.md (wF constraint): Remove power9
1617         fusion documentation.  Just document wF's use for power8 fusion.
1618         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
1619         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
1620         fusion support to require the upper 12 bits to be all 0's or all
1621         1's.
1622         (fusion_gpr_mem_load): Add comment.
1623         (fusion_addis_mem_combo_load): Remove power9 fusion support.
1624         (fusion_addis_mem_combo_store): Delete.
1625         (fusion_offsettable_mem_operand): Delete.
1626         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
1627         power8 fusion here.
1628         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
1629         (POWERPC_MASKS): Delete power9 fusion.
1630         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
1631         (fusion_p9_p): Delete.
1632         (expand_fusion_p9_load): Delete.
1633         (expand_fusion_p9_store): Delete.
1634         (emit_fusion_p9_load): Delete.
1635         (emit_fusion_p9_store): Delete.
1636         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
1637         fusion support.
1638         (rs6000_option_override_internal): Set power8 fusion based on
1639         whether we are tuning for power8.  Delete power9 fusion support.
1640         (rs6000_opt_masks): Delete -mpower9-fusion switch.
1641         (emit_fusion_load): Rename emit_fusion_load_store to
1642         emit_fusion_load, and drop fusion store support.  Update callers.
1643         (emit_fusion_load_store): Likewise.
1644         (emit_fusion_gpr_load): Likewise.
1645         (fusion_p9_p): Delete.
1646         (expand_fusion_p9_load): Delete.
1647         (expand_fusion_p9_store): Delete.
1648         (emit_fusion_p9_load): Delete.
1649         (emit_fusion_p9_store): Delete.
1650         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
1651         (GPR_FUSION): Delete.
1652         (FPR_FUSION): Delete.
1653         (power9 fusion peephole2s): Delete.
1654         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
1655         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
1656         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
1657         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
1658         (fusion_p9_<mode>_constant): Delete.
1659         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
1660         power9 fusion switch.
1661         * doc/md.texi (PowerPC constraints): Update wF constraint
1662         documentation for power8 fusion only.
1664 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
1666         PR rtl-optimization/87475
1667         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
1668         CROSSING_JUMP_P insns.
1669         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
1671 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
1673         PR target/88051
1674         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
1675         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
1676         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
1678 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
1680         PR middle-end/88032
1681         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
1682         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
1684 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
1686         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
1687         location_t parameter.
1688         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1689         (switch_decision_tree::do_jump_if_equal): Likewise.
1690         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
1691         of switch statement to emit_case_nodes.
1692         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
1693         set it on the newly built GIMPLE comparison statement.
1694         (switch_decision_tree::do_jump_if_equal): Likewise.
1695         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
1696         in calls to do_jump_if_equal as well as recursive calls.
1698 2018-11-16  Andi Kleen  <ak@linux.intel.com>
1700         * config/i386/i386.md: Allow memory operands to ptwrite.
1702 2018-11-16  Michael Matz  <matz@suse.de>
1704         * system.h (PRsa): New macro.
1705         (SIZE_AMOUNT): Cast number to uint64_t.
1706         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
1707         (pool_usage::dump_footer): Likewise and also use PRIu64.
1708         * bitmap.h (bitmap_usage::dump): Likewise.
1709         * ggc-common.c (ggc_usage::dump): Likewise.
1710         * ggc-page.c (ggc_print_statistics): Likewise.
1711         * input.c (dump_line_table_statistics): Likewise.
1712         * mem-stats.h (mem_usage::dump): Likewise.
1713         (mem_usage::dump_footer): Likewise.
1714         * rtl.c (dump_rtx_statistics): Likewise.
1715         * tree-cfg.c (dump_cfg_stats): Likewise.
1716         * tree-dfa.c (dump_dfa_stats): Likewise.
1717         * tree-phinodes.c (phinodes_print_statistics): Likewise.
1718         * tree-ssanames (ssanames_print_statistics): Likewise.
1719         * vec.c (vec_usage::dump): Likewise.
1720         (vec_usage::dump_footer): Likewise.
1722 2018-11-16  Richard Biener  <rguenther@suse.de>
1724         PR tree-optimization/88011
1725         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
1726         replacing set_value_range_to_undefined and
1727         set_value_range_to_varying with method calls.
1729 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1731         * config/s390/s390.md
1732         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
1733         assembler.
1734         (*r<noxa>sbg_<mode>_sll): Likewise.
1735         (*r<noxa>sbg_<mode>_srl): Likewise.
1736         (*r<noxa>sbg_sidi_srl): New pattern.
1738 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
1740         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
1741         Default to TARGET_VXWORKS_RTP.
1742         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1743         of TARGET_VXWORKS_RTP.
1744         * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
1745         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1746         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
1748 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
1750         PR c++/25759
1751         * doc/extend.texi (Common Type Attributes): Make it explicit
1752         that attribute "packed" can apply to C++ classes.
1754 2018-11-15  Martin Sebor  <msebor@redhat.com>
1756         PR c++/87541
1757         PR c++/87542
1758         * tree.c (type_argument_type): New function.
1759         * tree.h (type_argument_type): Declare it.
1760         * gcc/doc/extend.texi (alloc_align): Update and clarify.
1761         (alloc_size, nonnull, sentinel): Same.
1763 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
1764             Kwok Cheung Yeung  <kcy@codesourcery.com>
1766         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
1767         int_mode_for_size fails.
1768         (vectorizable_load): Likewise.
1770 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1772         * doc/ux.texi (Group logically-related diagnostics): Move
1773         discussion of auto_diagnostic_group into this new subsection.
1774         Give an example of where this grouping is used.
1776 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1778         PR other/19165
1779         * Makefile.in (OBJS): Move json.o to...
1780         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
1781         * common.opt (fdiagnostics-format=): New option.
1782         (diagnostics_output_format): New enum.
1783         * diagnostic-format-json.cc: New file.
1784         * diagnostic.c (default_diagnostic_final_cb): New function, taken
1785         from start of diagnostic_finish.
1786         (diagnostic_initialize): Initialize final_cb to
1787         default_diagnostic_final_cb.
1788         (diagnostic_finish): Move "being treated as errors" messages to
1789         default_diagnostic_final_cb.  Call any final_cb.
1790         (default_diagnostic_finalizer): Add diagnostic_t param.
1791         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
1792         diagnostic_finalizer callback.
1793         * diagnostic.h (enum diagnostics_output_format): New enum.
1794         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
1795         (struct diagnostic_context): Add "final_cb".
1796         (default_diagnostic_finalizer): Add diagnostic_t param.
1797         (diagnostic_output_format_init): New decl.
1798         * doc/invoke.texi (-fdiagnostics-format): New option.
1799         * dwarf2out.c (gen_producer_string): Ignore
1800         OPT_fdiagnostics_format_.
1801         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
1802         * lto-wrapper.c (append_diag_options): Ignore it.
1803         * opts.c (common_handle_option): Handle it.
1805 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1807         PR tree-optimization/88015
1808         * graphite-isl-ast-to-gimple.c
1809         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
1810         for dump_enabled_p.
1811         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
1813 2018-11-15  Richard Biener  <rguenther@suse.de>
1815         PR middle-end/88029
1816         * gimple.c (gimple_call_flags): Union flags from decl, type
1817         and call fntype.
1818         * trans-mem.c (is_tm_pure_call): Simplify.
1820 2018-11-15  Richard Biener  <rguenther@suse.de>
1822         PR tree-optimization/88031
1823         * tree-vect-loop.c (vectorizable_reduction): Move check
1824         for multiple types earlier so we get the expected dump.
1825         Simplify calls to vectorizable_condition.
1826         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
1827         * tree-vect-stmts.c (vectorizable_condition): Instead of
1828         reduc_def and reduc_index take just a flag.  Simplify
1829         code-generation now that we can rely on the defs being set up.
1830         (vectorizable_comparison): Remove unused argument.
1832 2018-11-15  Richard Biener  <rguenther@suse.de>
1834         PR tree-optimization/88030
1835         * tree-complex.c (need_eh_cleanup): New global.
1836         (update_complex_assignment): Mark blocks that need EH update.
1837         (expand_complex_comparison): Likewise.
1838         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1839         perform EH cleanup and schedule CFG cleanup if that did anything.
1841 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
1843         PR rtl-optimization/88018
1844         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1845         on the presence of fallthru edge, rather than if it is a USE or not.
1847 2018-11-15  Richard Biener  <rguenther@suse.de>
1849         PR middle-end/87917
1850         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
1851         analyze_subscript_affine_affine properly.
1853 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1855         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
1856         (GLIBC_DYNAMIC_LINKER): Define.
1857         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
1859 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
1861         PR tree-optimization/84648
1862         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
1863         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
1864         by calling adjust_cond_for_loop_until_wrap.
1866 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
1868         PR other/56334
1869         * doc/extend.texi (Common Function Attributes): Clarify linker
1870         restrictions on "aligned" attribute.
1871         (Common Variable Attributes): Likewise.  Mention that linker
1872         restrictions don't apply to stack-allocated variables.
1874 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1876         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
1877         as an lvalue.
1879 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
1881         PR lto/55102
1882         PR lto/56700
1883         * doc/invoke.texi (Optimize Options): Remove bad example about
1884         interaction between -flto and -O.  Replace it with a note that
1885         you need to compile with -O and not just link.  Copy-edit -flto
1886         discussion to reduce verbiage and improve flow.
1888 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
1890         PR middle-end/59658
1891         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
1892         also suppress many optimizations.  Alphabetize option lists for
1893         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
1894         correct documentation for those options to say that.
1895         * opts.c (default_options_table): Sort table by level and option
1896         name, to make it easier to correlate to the manual.
1898 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
1900         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
1901         printing of the names of segment registers.
1903 2018-11-14  Nathan Sidwell  <nathan@acm.org>
1905         PR debug/88006
1906         PR debug/87462
1907         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1908         type list.
1910 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
1912         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1914 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1916         P1236R1 - Signed integers are two's complement
1917         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1919         PR bootstrap/86739
1920         * hash-map.h (hash_map::iterator::reference_pair): New class.
1921         (hash_map::iterator::operator*): Return it rather than std::pair.
1923 2018-11-14  Jeff Law  <law@redhat.com>
1925         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1926         iff the operand is a constant.
1928 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
1930         * gimple-ssa-evrp-analyze.c
1931         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1932         ignore_equivs_equal_p to equal_p.
1933         * ipa-cp.c (meet_with_1): Use equal_p instead of
1934         ignore_equivs_equal_p.
1935         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1936         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1937         (value_range::operator==): Remove.
1938         (value_range::operator!=): Remove.
1939         (vrp_prop::visit_stmt): Use equal_p.
1940         * tree-vrp.h (value_range): Remove operator==, operator!=,
1941         ignore_equivs_equal_p.
1942         * vr-values.c (update_value_range): Use equal_p.
1944 2018-11-14  Michael Matz  <matz@suse.de>
1946         PR middle-end/86575
1947         * gimplify.c (collect_fallthrough_labels): Add new argument,
1948         return location via that, don't modify statements.
1949         (warn_implicit_fallthrough_r): Adjust call, don't use
1950         statement location directly.
1952 2018-11-14  Richard Biener  <rguenther@suse.de>
1954         PR middle-end/87985
1955         * tree-data-ref.c (split_constant_offset): Add wrapper
1956         allocating a cache hash-map.
1957         (split_constant_offset_1): Cache results of expanding
1958         expressions from SSA def stmts.
1960 2018-11-14  Richard Biener  <rguenther@suse.de>
1962         PR middle-end/88021
1963         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1964         to lambda_int.
1965         (lambda_vector_mult_const): Likewise.
1966         (lambda_matrix_right_hermite): Use lambda_int temporaries.
1968 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
1969             Jackson Woodruff  <jackson.woodruff@arm.com>
1971         PR 71026/tree-optimization
1972         * match.pd: Simplify floating point comparisons.
1974 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1976         PR rtl-optimization/87817
1977         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1978         last argument has low 8 bits clear, fold to 0.
1980 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
1982         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1983         MAX_OFILE_ALIGNMENT as needed.
1985 2018-11-14  Richard Biener  <rguenther@suse.de>
1987         PR tree-optimization/88019
1988         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1989         COND_EXPR arguments to non-trapping overflow.
1991 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
1993         * config/arc/arc.h (reg_class): Reorder registers classes, remove
1994         unused register classes.
1995         (REG_CLASS_NAMES): Likewise.
1996         (REG_CLASS_CONTENTS): Likewise.
1997         (FIXED_REGISTERS): Make lp_count fixed.
1998         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1999         (PROGRAM_COUNTER_REGNO): Remove.
2000         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
2001         register classes, use constants for register numbers, remove
2002         reg_class_contents references.
2003         (arc_process_double_reg_moves): Add asserts.
2004         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
2005         lra_in_progress predicate.
2006         (arc_init_reg_tables): Remove unused register classes.
2007         (arc_register_move_cost): Likewise.
2008         (arc_preferred_reload_class): Likewise.
2009         (hwloop_optimize): Update rtx patterns involving lp_count register.
2010         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
2011         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
2012         CHEAP_CORE_REGS.  Former one will be used for LRA.
2013         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
2014         one will be used for LRA.
2015         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
2016         one will be used for LRA.
2017         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
2018         Former one will be used for LRA.
2019         ("f"): Delete constraint.
2020         ("k"): Likewise.
2021         ("e"): Likewise.
2022         ("l"): Change it from register constraint to constraint.
2023         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
2024         (movhi_insn): Likewise.
2025         (movsi_insn): Update pattern.
2026         (arc_lp): Likewise.
2027         (dbnz): Likewise.
2028         (stack_tie): Remove 'b' constraint letter.
2029         (R4_REG): Define.
2030         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
2031         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
2032         (R57_REG, R59_REG, PCL_REG): Likewise.
2033         (ILINK1_REGNUM): Renamed to ILINK1_REG.
2034         (ILINK2_REGNUM): Renamed to ILINK2_REG.
2035         (Rgp): Remove.
2036         (SP_REGS): Likewise.
2037         (Rcw): Remove unused reg classes.
2038         * config/arc/predicates.md (dest_reg_operand): Just default on
2039         register_operand predicate.
2040         (mpy_dest_reg_operand): Likewise.
2041         (move_dest_operand): Use macros instead of constants.
2042         * config/arc/arc.opt (mlra): Switch to lra as default.
2044 2018-11-14  Richard Biener  <rguenther@suse.de>
2046         PR tree-optimization/87974
2047         * tree-vect-loop.c (vectorizable_reduction): When computing
2048         the vectorized reduction PHI vector type ignore constant
2049         and external defs.
2051 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2053         PR tree-optimization/87977
2054         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
2055         stmt, build a new one and replace the old one with it.  Formatting fix.
2056         Call release_ssa_name (x) if !has_other_use and !delete_div.
2057         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
2058         verify lhs of stmt is still def.
2060 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
2062         PR rtl-optimization/87507
2063         * lower-subreg.c (operand_for_swap_move_operator): New function.
2064         (simple_move): Strip simple operators.
2065         (find_pseudo_copy): Likewise.
2066         (resolve_operand_for_swap_move_operator): New function.
2067         (resolve_simple_move): Strip simple operators and swap operands.
2069 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
2071         PR tree-optimization/87898
2072         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
2073         (ipa_simd_modify_function_body): Remove debug stmts where the first
2074         argument was changed into a non-decl.
2076 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
2078         PR rtl-optimization/87899
2079         * lra-lives.c (start_living): Update white space in comment.
2080         (enum point_type): New.
2081         (sparseset_contains_pseudos_p): New function.
2082         (update_pseudo_point): Likewise.
2083         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
2084         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
2085         handling.  Move early exit after adding conflicts.
2086         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
2087         if regno is already live.  Remove all handling of program points.
2088         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
2089         after adding conflicts.  Remove all handling of program points and
2090         ignore_reg_for_conflicts.
2091         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
2092         and do not guard call to mark_pseudo_live.
2093         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
2094         and do not guard call to mark_pseudo_dead.
2095         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
2096         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
2097         Use new function update_pseudo_point.  Handle register copies by
2098         removing the source register from the live set.  Handle INOUT operands.
2099         Update to the next program point using the unused_set, dead_set and
2100         start_dying sets.
2101         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2103 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2105         * builtins.c: Replace "source_location" with "location_t".
2106         * diagnostic-show-locus.c: Likewise.
2107         * diagnostic.c: Likewise.
2108         * dumpfile.c: Likewise.
2109         * gcc-rich-location.h: Likewise.
2110         * genmatch.c: Likewise.
2111         * gimple.h: Likewise.
2112         * gimplify.c: Likewise.
2113         * input.c: Likewise.
2114         * input.h: Likewise.  Eliminate the typedef.
2115         * omp-expand.c: Likewise.
2116         * selftest.h: Likewise.
2117         * substring-locations.h (get_source_location_for_substring):
2118         Rename to...
2119         (get_location_within_string): ...this.
2120         * tree-cfg.c: Replace "source_location" with "location_t".
2121         * tree-cfgcleanup.c: Likewise.
2122         * tree-diagnostic.c: Likewise.
2123         * tree-into-ssa.c: Likewise.
2124         * tree-outof-ssa.c: Likewise.
2125         * tree-parloops.c: Likewise.
2126         * tree-phinodes.c: Likewise.
2127         * tree-phinodes.h: Likewise.
2128         * tree-ssa-loop-ivopts.c: Likewise.
2129         * tree-ssa-loop-manip.c: Likewise.
2130         * tree-ssa-phiopt.c: Likewise.
2131         * tree-ssa-phiprop.c: Likewise.
2132         * tree-ssa-threadupdate.c: Likewise.
2133         * tree-ssa.c: Likewise.
2134         * tree-ssa.h: Likewise.
2135         * tree-vect-loop-manip.c: Likewise.
2137 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2139         * doc/extend.texi: Fix typo in the weakref description.
2141 2018-11-13  Richard Biener  <rguenther@suse.de>
2143         PR tree-optimization/86991
2144         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2145         group building until we have successfully detected the SLP
2146         reduction.
2147         (vect_is_simple_reduction): Remove fixup code here.
2149 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2151         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2152         (dump_gimple_stmt): Use it.
2153         (dump_gimple_stmt_loc): Likewise.
2154         (dump_gimple_expr): Likewise.
2155         (dump_gimple_expr_loc): Likewise.
2156         (dump_generic_expr): Likewise.
2157         (dump_generic_expr_loc): Likewise.
2158         (dump_printf): Likewise.
2159         (dump_printf_loc): Likewise.
2160         (dump_dec): Likewise.
2161         (dump_dec): Likewise.
2162         (dump_hex): Likewise.
2163         (dump_symtab_node): Likewise.
2164         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2165         Guard dump call with dump_enabled_p.
2166         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2167         * graphite-optimize-isl.c (optimize_isl): Likewise.
2168         * graphite.c (graphite_transform_loops): Likewise.
2169         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2170         * tree-parloops.c (parallelize_loops): Likewise.
2171         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2172         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2173         (vect_prune_runtime_alias_test_list): Likewise.
2174         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2175         (vect_estimate_min_profitable_iters): Likewise.
2176         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2177         (vect_build_slp_tree_2): Likewise.
2178         (vect_supported_load_permutation_p): Likewise.
2179         (vect_slp_analyze_operations): Likewise.
2180         (vect_slp_analyze_bb_1): Likewise.
2181         (vect_slp_bb): Likewise.
2182         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2183         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2184         (pass_slp_vectorize::execute): Likewise.
2185         (increase_alignment): Likewise.
2187 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2189         PR ipa/87955
2190         * ipa-inline.c (report_inline_failed_reason): Guard calls to
2191         cl_target_option_print_diff and cl_optimization_print_diff with
2192         if (dump_file).
2194 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2196         * doc/invoke.texi (-fsave-optimization-record): Note that the
2197         output is compressed.
2198         * optinfo-emit-json.cc: Include <zlib.h>.
2199         (optrecord_json_writer::write): Compress the output.
2201 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
2203         * tree-vrp.c (value_range_base::dump): Dump type.
2204         Do not use INF nomenclature for 1-bit types.
2205         (dump_value_range): Group all variants to common dumping code.
2206         (debug): New overloaded functions for value_ranges.
2207         (value_range_base::dump): Remove no argument version.
2208         (value_range::dump): Same.
2210 2018-11-13  Richard Biener  <rguenther@suse.de>
2212         PR tree-optimization/87931
2213         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2214         nested cycles we support to latch computations vectorizable_reduction
2215         handles.
2217 2018-11-13  Martin Liska  <mliska@suse.cz>
2219         PR tree-optimization/87885
2220         * cfghooks.c (account_profile_record): Rename
2221         to ...
2222         (profile_record_check_consistency): ... this.
2223         Calculate missing num_mismatched_freq_in.
2224         (profile_record_account_profile): New function
2225         that calculates time and size of a function.
2226         * cfghooks.h (struct profile_record): Remove
2227         all tuples.
2228         (struct cfg_hooks): Remove after_pass flag.
2229         (account_profile_record): Rename to ...
2230         (profile_record_check_consistency): ... this.
2231         (profile_record_account_profile): New.
2232         * cfgrtl.c (rtl_account_profile_record): Remove
2233         after_pass flag.
2234         * passes.c (check_profile_consistency): Do only
2235         checking.
2236         (account_profile): Calculate size and time of
2237         function only.
2238         (pass_manager::dump_profile_report): Reformat
2239         output.
2240         (execute_one_ipa_transform_pass): Call
2241         consistency check before clean upand call account_profile
2242         after a clean up is done.
2243         (execute_one_pass): Call check_profile_consistency and
2244         account_profile instead of using after_pass flag..
2245         * tree-cfg.c (gimple_account_profile_record): Likewise.
2247 2018-11-13  Martin Liska  <mliska@suse.cz>
2249         PR sanitizer/87930
2250         * config/i386/i386.c (ix86_option_override_internal): Error
2251         about usage -mabi=ms and -fsanitize={,kernel-}address.
2253 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2255         * config/aarch64/aarch64.c
2256         (aarch64_vectorize_preferred_vector_alignment): Change return type to
2257         poly_uint64.
2258         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2259         alignment being a poly int.
2260         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2261         return type to poly_uint64.
2262         * target.def (default_preferred_vector_alignment): Likewise.
2263         * targhooks.c (default_preferred_vector_alignment): Likewise.
2264         * targhooks.h (default_preferred_vector_alignment): Likewise.
2265         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2266         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2267         poly int.
2268         (vect_update_misalignment_for_peel): Likewise.
2269         (vect_enhance_data_refs_alignment): Likewise.
2270         (vect_find_same_alignment_drs): Likewise.
2271         (vect_duplicate_ssa_name_ptr_info): Likewise.
2272         (vect_setup_realignment): Likewise.
2273         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2274         poly_uint64.
2275         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2276         mask with a compile time variable vector alignment.
2277         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2278         int.
2279         (vect_do_peeling): Exit early if vector alignment is not constant.
2280         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2281         a poly int.
2282         (vectorizable_store): Likewise.
2283         (vectorizable_load): Likweise.
2284         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2285         poly_uint64.
2286         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2287         poly int.
2288         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2289         poly_uint64.
2291 2018-11-13  Richard Biener  <rguenther@suse.de>
2293         PR tree-optimization/87962
2294         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2295         detect outer reduction for disqualifying in-loop uses.
2297 2018-11-13  Richard Biener  <rguenther@suse.de>
2299         PR tree-optimization/87967
2300         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2301         for constants for the scalar loop.
2303 2018-11-13  Alan Modra  <amodra@gmail.com>
2305         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2306         integer constants when -mcmodel=medium.
2308 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2310         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2311         * config/arc/elf.h (PROFILE_HOOK): Define.
2312         * config/arc/linux.h (PROFILE_HOOK): Likewise.
2314 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2316         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2317         jump table data in the text section.
2319 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2321         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2322         to fit the eh_return pattern.
2323         * config/arc/arc.md (eh_return): Define.
2324         (VUNSPEC_ARC_EH_RETURN): Likewise.
2325         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2326         new implementation.
2327         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2330 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2332         * common/config/arc/arc-common.c (arc_option_optimization_table):
2333         Millicode optimization is default on for size optimizations.
2334         * config/arc/arc-protos.h (arc_check_multi): New function.
2335         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
2336         (ENTER_LEAVE_START_REG): Define.
2337         (ENTER_LEAVE_END_REG): Likewise.
2338         (arc_override_options): Disable millicode when long calls option
2339         is on.
2340         (arc_frame_info): Change it from int to bool.
2341         (arc_compute_frame_size): Clean up.
2342         (arc_save_restore): Remove.
2343         (frame_save_reg): New function.
2344         (frame_restore_reg): Likewise.
2345         (arc_enter_leave_p): Likewise.
2346         (arc_save_callee_saves): Likewise.
2347         (arc_restore_callee_saves): Likewise.
2348         (arc_save_callee_enter): Likewise.
2349         (arc_restore_callee_leave): Likewise.
2350         (arc_save_callee_milli): Likewise.
2351         (arc_restore_callee_milli): Likewise.
2352         (arc_expand_prologue): Reimplement to emit enter/leave
2353         instructions.
2354         (arc_expand_epilogue): Likewise.
2355         (arc_check_multi): New function.
2356         * config/arc/arc.md (push_multi_fp): New pattern.
2357         (push_multi_fp_blink): Likewise.
2358         (pop_multi_fp): Likewise.
2359         (pop_multi_fp_blink): Likewise.
2360         (pop_multi_fp_ret): Likewise.
2361         (pop_multi_fp_blink_ret): Likewise.
2362         * config/arc/arc.opt (mmillicode): Update option.
2363         (mcode-density-frame): New option.
2364         * config/arc/predicates.md (push_multi_operand): New predicate.
2365         (pop_multi_operand): Likewise.
2366         * doc/invoke.texi (ARC): Update ARC options information.
2369 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2371         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
2372         * config/arc/arc.c (operands_ok_ldd_std): New function.
2373         (mem_ok_for_ldd_std): Likewise.
2374         (gen_operands_ldd_std): Likewise.
2375         * config/arc/arc.md: Add peephole2 rules for std/ldd.
2377 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
2379         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
2380         test on stack_usage_file.
2381         (lang_dependent_init): Do not open the .su file if generating LTO.
2383 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
2385         PR rtl-optimization/87918
2386         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
2387         simplify_gen_relational rather than simplify_gen_binary.
2389 2018-11-13  Richard Biener  <rguenther@suse.de>
2391         * tree-ssanames.h (set_range_info): Use value_range_base.
2392         (get_range_info): Likewise.
2393         * tree-ssanames.c (set_range_info): Likewise.
2394         (get_range_info): Likewise.
2395         * tree-vrp.c (value_range_base::union_helper): Split
2396         out common parts of value_range[_base]::union_.
2397         (value_range_base::union_): Update.
2398         (value_range::union_): Likewise.
2399         (determine_value_range_1): Use value_range_base.
2400         (determine_value_range): Likewise.
2401         * tree-vrp.h (value_range_base::union_helper): Move ...
2402         (value_range::union_helper): ... from here.
2404 2018-11-13  Alan Modra  <amodra@gmail.com>
2406         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
2407         offset for PRE_DEC.
2408         (rs6000_secondary_reload_gpr): Don't call find_replacement.
2410 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
2412         PR middle-end/59634
2413         * doc/invoke.texi (Optimize Options): Clarify that the
2414         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
2415         apply to data cache size.
2417 2018-11-13  Alan Modra  <amodra@gmail.com>
2419         * config/rs6000/predicates.md (logical_const_operand),
2420         (logical_operand): Correct comment.
2421         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
2423 2018-11-13  Alan Modra  <amodra@gmail.com>
2425         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
2427 2018-11-13  Alan Modra  <amodra@gmail.com>
2429         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
2430         description.
2431         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
2432         covered by alternative.
2433         (movcc_internal1): Ignore h for register preference.
2434         (mov<mode>_hardfloat64): Likewise.
2435         (mov<mode>_softfloat): Ignore c, l, h for register preference.
2437 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
2439         PR preprocessor/47823
2440         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
2441         documentation to...
2442         (Pragmas): ...here.
2443         * doc/extend.texi (Pragmas): Note additional pragmas documented
2444         in the CPP manual.
2446 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
2448         PR middle-end/86677
2449         PR middle-end/87528
2450         * tree-scalar-evolution.c (expression_expensive_p): Make
2451         BUILTIN POPCOUNT as expensive when backend does not define it.
2453 2018-11-12  Fredrik Noring  <noring@nocrew.org>
2455         * config.gcc: Update with-llsc defaults for MIPS r5900.
2457 2018-11-12  Martin Liska  <mliska@suse.cz>
2459         PR gcov-profile/87442
2460         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
2461         options.
2462         * doc/invoke.texi: Document them.
2463         * tree-profile.c (parse_profile_filter): New.
2464         (parse_profile_file_filtering): Likewise.
2465         (release_profile_file_filtering): Likewise.
2466         (include_source_file_for_profile): Likewise.
2467         (tree_profiling): Filter source files based on the
2468         newly added options.
2470 2018-11-12  Martin Liska  <mliska@suse.cz>
2472         PR target/87903
2473         * doc/extend.texi: Add missing values for __builtin_cpu_is and
2474         __builtin_cpu_supports for x86 target.
2476 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
2478         PR middle-end/21110
2479         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
2480         have to be Pmode.
2481         (Arithmetic): Likewise for "lo_sum".
2483 2018-11-12  Renlin Li  <renlin.li@arm.com>
2485         PR target/87815
2486         * dse.c (get_stored_val): Add check for compile-time constantness
2487         of gap.
2489 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
2491         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
2492         (ARMv8_5a): New fgroup.
2493         (armv8.5-a): New arch.
2494         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
2495         sb and predres.
2496         * config/arm/arm-tables.opt: Regenerate.
2497         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
2498         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
2499         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
2500         Add matching rules for -march=armv8.5-a and extensions.
2501         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
2502         Add sb and predres to all armv8-a except armv8.5-a.
2504 2018-11-12  Richard Biener  <rguenther@suse.de>
2506         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
2507         overload for single value.
2508         (value_range[_base]::set_nonnull): New.
2509         (value_range[_base]::set_null): Likewise.
2510         (value_range): Document bitmap copying behavior, mark
2511         copy constructor and assignment operator deleted.
2512         (value_range::move): New.
2513         (value_range::set_and_canonicalize): Default bitmap to zero.
2514         (set_value_range_to_nonnull): Remove.
2515         (set_value_range_to_null): Likewise.
2516         (set_value_range): Likewise.
2517         (set_value_range_to_value): Likewise.
2518         (extract_range_from_unary_expr): Work on value_range_base.
2519         (extract_range_from_binary_expr_1): Likewise.  Rename to...
2520         (extract_range_from_binary_expr): ... this.
2521         * tree-vrp.c (value_range::update): Clear equiv bitmap
2522         if required.
2523         (value_range::move): New, move equiv bitmap.
2524         (value_range_base::set_undefined): Avoid assignment.
2525         (value_range::set_undefined): Likewise.
2526         (value_range_base::set_varying): Likewise.
2527         (value_range::set_varying): Likewise.
2528         (set_value_range): Remove.
2529         (value_range_base::set): New overload for value.
2530         (value_range::set): Likewise.
2531         (set_value_range_to_nonnull): Remove.
2532         (value_range_base::set_nonnull): New.
2533         (value_range::set_nonnull): Likewise.
2534         (set_value_range_to_null): Remove.
2535         (value_range_base::set_null): New.
2536         (value_range::set_null): Likewise.
2537         (range_is_null): Work on value_range_base.
2538         (range_is_nonnull): Likewise.
2539         (ranges_from_anti_range): Likewise.
2540         (extract_range_into_wide_ints): Likewise.
2541         (extract_range_from_multiplicative_op): Likewise.
2542         (extract_range_from_binary_expr): Likewise.  Update for API changes.
2543         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
2544         handling.
2545         (value_range::intersect_helper): Avoid copy and assignment.
2546         (value_range::union_helper): Likewise.
2547         (determine_value_range_1): Adjust.
2548         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
2549         Avoid assignment by using move.
2550         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
2551         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2552         Likewise.
2553         * tree-ssanames.c (get_range_info): Likewise.
2554         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
2555         * vr-values.c (vr_values::get_value_range): Adjust.
2556         (vr_values::update_value_range): Likewise.
2557         (symbolic_range_based_on_p): Work on value_range_base.
2558         (vr_values::extract_range_from_binary_expr): Use value_range_base.
2559         (vr_values::extract_range_from_unary_expr): Likewise.
2560         (vr_values::extract_range_from_cond_expr): Avoid assignment.
2561         (vr_values::extract_range_from_comparison): Adjust.
2562         (vr_values::check_for_binary_op_overflow): Use value_range_base.
2563         (vr_values::extract_range_basic): Adjust.
2564         (vr_values::adjust_range_with_scev): Likewise.
2565         (vr_values::vrp_visit_assignment_or_call): Likewise.
2566         (vr_values::get_vr_for_comparison): Change API to avoid
2567         assignment and copy construction.
2568         (vr_values::compare_name_with_value): Adjust accordingly.
2569         (vr_values::compare_names): Likewise.
2570         (vr_values::extract_range_from_phi_node): Avoid assignment and
2571         bogus in-place modify of equiv bitmap.
2572         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
2573         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
2574         for extract_range_from_unary_expr API change.
2575         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
2577 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
2579         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
2581 2018-11-12  Richard Biener  <rguenther@suse.de>
2583         * tree-vrp.h (value_range_base::symbolic_p,
2584         value_range_base::constant_p, value_range_base::zero_p,
2585         value_range_base::singleton_p): Move from value_range.
2586         (value_range::dump): Add.
2587         * gimple-ssa-evrp-analyze.c
2588         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
2589         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
2590         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2591         Use set_varying.
2592         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
2593         (value_range::constant_p): Likewise.
2594         (value_range::singleton_p): Likewise.
2595         (value_range_base::dump): Add.
2596         (set_value_range_to_undefined): Remove.
2597         (set_value_range_to_varying): Likewise.
2598         (range_int_cst_p): Take value_range_base argument.
2599         (range_int_cst_singleton_p): Likewise.
2600         (value_range_constant_singleton): Likewise.
2601         (vrp_set_zero_nonzero_bits): Likewise.
2602         (extract_range_from_multiplicative_op): Use set_varying.
2603         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
2604         (extract_range_from_unary_expr): Likewise.
2605         (dump_value_range_base): Change to overload of dump_value_range.
2606         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
2607         (vrp_prop::visit_stmt): Likewise.
2608         (value_range::intersect_helper): Likewise.
2609         (value_range::union_helper): Likewise.
2610         (determine_value_range_1): Likewise.
2612 2018-11-12  Richard Biener  <rguenther@suse.de>
2614         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
2615         (set_value_range_to_null): Likewise.
2616         * vr-values.c (vr_values::extract_range_from_comparison):
2617         Clear equiv for constant singleton ranges.
2619 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
2621         * config/i386/sse.md: Combine VFIXUPIMM* patterns
2622         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2623         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2624         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
2625         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2626         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2627         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
2629 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
2631         PR c/69502
2632         * doc/extend.texi (Common Type Attributes): For the align type
2633         attribute, copy language about decreasing alignment from the
2634         corresponding variable attribute.
2636 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2638         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
2639         -frounding-math.
2641 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
2643         PR c++/43105
2644         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
2645         -frtti and -fno-rtti code.
2647 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
2649         PR c/26366
2650         * doc/extend.texi (Other Builtins): Document probability associated
2651         with __builtin_expect.
2653 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
2655         PR target/87928
2656         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2657         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2658         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2659         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2661 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2663         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
2665 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2667         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2669 2018-11-11  Richard Biener  <rguenther@suse.de>
2671         * tree-vrp.h (class value_range_base): New base class for
2672         value_range containing all but the m_equiv member.
2673         (dump_value_range_base): Add.
2674         (range_includes_zero_p): Work on value_range_base.
2675         * tree-vrp.c (value_range_base::set): Split out base handling
2676         from...
2677         (value_range::set): this.
2678         (value_range::set_equiv): New.
2679         (value_range_base::value_range_base): New constructors.
2680         (value_range_base::check): Split out base handling from...
2681         (value_range::check): this.
2682         (value_range::equal_p): Refactor in terms of
2683         ignore_equivs_equal_p which is now member of the base.
2684         (value_range_base::set_undefined): New.
2685         (value_range_base::set_varying): Likewise.
2686         (value_range_base::dump):Split out base handling from...
2687         (value_range::dump): this.
2688         (value_range_base::set_and_canonicalize): Split out base handling
2689         from...
2690         (value_range::set_and_canonicalize): this.
2691         (value_range_base::union_): New.
2692         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
2693         for m_vr.
2694         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
2695         instead of value_range everywhere.
2696         (ipcp_vr_lattice::print): Use dump_value_range_base.
2697         (ipcp_vr_lattice::meet_with): Adjust.
2698         (ipcp_vr_lattice::meet_with_1): Likewise.
2699         (ipa_vr_operation_and_type_effects): Likewise.
2700         (propagate_vr_across_jump_function): Likewise.
2701         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
2702         (ipa_get_value_range): Likewise.
2703         (ipa_set_jfunc_vr): Likewise.
2704         (ipa_compute_jump_functions_for_edge): Likewise.
2706 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
2708         PR middle-end/65703
2709         * doc/invoke.texi (Optimize Options): Add @opindex entries
2710         for the positive forms of -fno-xxx and -mno-xxx options
2711         that were lacking them.
2713 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
2715         * combine.c (make_more_copies): Only make an intermediate copy if the
2716         dest of a move is a pseudo.
2718 2018-11-09  Maya Rashish  <coypu@sdf.org>
2720         PR target/87221
2721         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
2722         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2724 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
2726         PR driver/41179
2727         PR middle-end/65703
2728         * doc/invoke.texi (Optimize Options): Clarify default behavior
2729         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2731 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2733         PR tree-optimization/87940
2734         * expr.c (string_constant): Don't strip NOPS in subexpressions.
2735         Fold PLUS_EXPR correctly.
2737 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
2739         PR target/87762
2740         * config/s390/s390.c (s390_safe_relative_long_p): New function.
2741         (annotate_constant_pool_refs): Skip insns which support
2742         relative addressing.
2743         (annotate_constant_pool_refs_1): New helper function.
2744         (find_constant_pool_ref): Skip insns which support relative
2745         addression.
2746         (find_constant_pool_ref_1): New helper function.
2747         (replace_constant_pool_ref): Skip insns which support
2748         relative addressing.
2749         (replace_constant_pool_ref_1): New helper function.
2750         (s390_mainpool_start): Adapt to the new signature.
2751         (s390_mainpool_finish): Likewise.
2752         (s390_chunkify_start): Likewise.
2753         (s390_chunkify_finish): Likewise.
2754         (pass_s390_early_mach::execute): Likewise.
2755         (s390_prologue_plus_offset): Likewise.
2756         (s390_emit_prologue): Likewise.
2757         (s390_emit_epilogue): Likewise.
2759 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
2761         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
2762         but unsupported lastprivate with conditional modifier.
2764 2018-11-09  Jeff Law  <law@redhat.com>
2766         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
2767         unused argument better.  Add gcc_unreachable to silence warning.
2769 2018-11-09  Martin Sebor  <msebor@redhat.com>
2771         PR middle-end/81824
2772         * attribs.c (has_attribute): New helper function.
2773         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
2774         * attribs.h (decls_mismatched_attributes): Declare.
2775         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
2776         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
2777         * common.opt (-Wattribute-alias): Take an argument.
2778         (-Wno-attribute-alias): New option.
2779         * doc/extend.texi (Common Function Attributes): Document copy.
2780         (Common Variable Attributes): Same.
2781         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
2782         (-Wattribute-alias): Document new option argument.
2784 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
2786         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
2787         matching criteria.  Remove unused array initializer.
2789 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
2790             Jinsong Ji  <jji@us.ibm.com>
2792         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
2793         constraints by introducing a new temporary.
2794         (_mm_cvtss_si64): Likewise.
2796 2018-11-09  Martin Liska  <mliska@suse.cz>
2798         * common.opt: Add -fipa-stack-alignment flag.
2799         * doc/invoke.texi: Document it.
2800         * final.c (rest_of_clean_state): Guard stack
2801         shrinking with flag.
2803 2018-11-09  Martin Liska  <mliska@suse.cz>
2805         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
2806         to ...
2807         (ipa_discover_variable_flags): ... this.
2808         * common.opt: Come up with new flag -fipa-reference-addressable.
2809         * doc/invoke.texi: Document it.
2810         * ipa-reference.c (propagate): Call the renamed fn.
2811         * ipa-visibility.c (whole_program_function_and_variable_visibility):
2812         Likewise.
2813         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
2814         ...
2815         (ipa_discover_variable_flags): ... this.  Discover
2816         non-addressable variables only with the newly added flag.
2817         * opts.c: Enable the newly added flag with -O1 and higher
2818         optimization level.
2820 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
2822         * json.cc (selftest::test_writing_literals): Fix comment.
2824 2018-11-09  Martin Liska  <mliska@suse.cz>
2826         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
2827         string to a stack buffer.
2828         (aarch64_parse_cpu): Likewise.
2829         (aarch64_parse_tune): Likewise.
2831 2018-11-09  Richard Biener  <rguenther@suse.de>
2833         PR tree-optimization/87953
2834         * tree-vect-loop.c (vectorizable_reduction): For analysis
2835         always pass ops[0] to vectorizable_condition.
2837 2018-11-09  Stafford Horne  <shorne@gmail.com>
2838             Richard Henderson  <rth@twiddle.net>
2839             Joel Sherrill  <joel@rtems.org>
2841         * common/config/or1k/or1k-common.c: New file.
2842         * config/or1k/*: New.
2843         * config.gcc (or1k*-*-*): New.
2844         * configure.ac (or1k*-*-*): New test for openrisc tls.
2845         * configure: Regenerated.
2846         * doc/install.texi: Document OpenRISC triplets.
2847         * doc/invoke.texi: Document OpenRISC arguments.
2848         * doc/md.texi: Document OpenRISC.
2850 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
2852         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
2853         (arm7tdmi-s): Delete CPU.
2854         (arm710t): Add aliases for arm720t and arm740t.
2855         (arm720t, arm740t): Delete CPUs.
2856         (arm920t): Add aliases for arm920, arm922t and arm940t.
2857         (arm920, arm922t, arm940t): Delete CPUs.
2858         (arm10tdmi): Add alias for arm1020t.
2859         (arm1020t): Delete CPU.
2860         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
2861         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
2862         (arm10e): Add aliases for arm1020e and arm1022e.
2863         (arm1020e, arm1022e): Delete CPU.
2864         * config/arm/arm.md (generic_sched): Remove entries that are now
2865         handled by aliases.
2866         (generic_vfp): Likewise.
2867         * config/arm/arm1020e.md: Simplify tuning selection based on alias
2868         changes.
2869         * config/arm/arm-tune.md: Regenerated.
2870         * config/arm/arm-tables.opt: Regenerated.
2872 2018-11-09  Richard Biener  <rguenther@suse.de>
2874         PR tree-optimization/87621
2875         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
2876         op with only phi inputs.
2877         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
2878         (ch_base::copy_headers): Run CSE on copied loop headers.
2879         (pass_ch_vect::process_loop_p): Simplify.
2881 2018-11-09  Alexandre Oliva <oliva@adacore.com>
2883         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
2884         for non-w64 x86_64 biarch.
2886 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
2888         PR rtl-optimization/86438
2889         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
2890         of in_b for the compare if in_b is SET_DEST.
2892         PR target/87793
2893         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
2894         non-toplevel UNSPEC.
2896 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2898         * tree-vrp.c (value_range::check): Do not access internals
2899         directly.
2900         (value_range::singleton_p): Same.
2901         (value_range::type): Same.
2902         (vrp_finalize): Use value_range API.
2904 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2906         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2908 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2910         * vr-values.c (vr_values::get_value_range): Use value_range API
2911         instead of piecing together ranges.
2912         (vr_values::update_value_range): Same.
2914 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2916         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2917         of performing ad-hoc calculations.
2918         * tree-ssanames.c (set_range_info): New overloaded function
2919         accepting value_range &.
2920         (get_range_info): Same.
2921         * tree-ssanames.h (set_range_info_raw): Remove.
2922         (set_range_info): New prototype.
2923         (get_range_info): Same.
2924         * tree-vrp.h (value_range::null_p): Rename to zero_p.
2925         * tree-vrp.c (value_range::null_p): Same.
2927 2018-11-09  Jan Hubicka  <jh@suse.cz>
2929         * tree.c (fld_type_variant_equal_p): Test user align flag.
2930         (flt_type_variant): Copy user align flag.
2931         (fld_incomplete_type_of): Clear it.
2933 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2935         * config/arm/neon.md (div<mode>3): New pattern.
2937 2018-11-08  Andi Kleen  <ak@linux.intel.com>
2939         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2940         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2941         (ix86_handle_option): Handle OPT_mptwrite.
2942         * config/i386/cpuid.h (bit_PTWRITE): Add.
2943         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2944         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2945         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2946         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2947         (ix86_option_override_internal): Handle PTA_PTWRITE.
2948         (ix86_valid_target_attribute_inner_p): Define ptwrite.
2949         (def_builtin2): Force UINT64 to be 64bit only.
2950         * config/i386/i386.h (TARGET_PTWRITE): Add.
2951         (TARGET_PTWRITE_P): Add.
2952         (PTA_PTWRITE): Add.
2953         * config/i386/i386.md: Define ptwrite.
2954         * config/i386/i386.opt: Add -mptwrite.
2955         * config/i386/immintrin.h (_ptwrite64): Add.
2956         (_ptwrite32): Add
2957         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2958         * doc/invoke.texi: Document -mptwrite.
2960 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
2962         PR rtl-optimization/87600
2963         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2964         * lra-constraints.c (process_alt_operands): Skip illegal hard
2965         register usage.  Prefer reloading non hard register operands.
2967 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
2969         PR other/36572
2970         * doc/invoke.texi (Optimize Options): Clarify default behavior
2971         for -fno-sched-interblock and -fno-sched-spec.
2973 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
2975         * collect2.c (linker_select):  Add USE_LLD_LD.
2976         (ld_suffixes): Add ld.lld.
2977         (main): Handle -fuse-ld=lld.
2978         * common.opt (-fuse-ld=lld): New option.
2979         * doc/invoke.texi (-fuse-ld=lld): Document.
2980         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2982 2018-11-08  Paul Koning  <ni1d@arrl.net>
2984         * config/pdp11/constraints.md: Add "Z" series constraints for use
2985         with pre-dec and post-inc addressing.
2986         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2987         (pdp11_expand_operands): Add int argument (word count).
2988         (pdp11_sp_frame_offset): Delete.
2989         (pdp11_cmp_length): New function.
2990         (pushpop_regeq): New function.
2991         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2992         Add hook.
2993         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2994         frame layout.
2995         (pdp11_initial_elimination_offset): Ditto.
2996         (pdp11_expand_operands): Add word count argument.  Bugfixes.
2997         (output_move_multiple): Change how pointer adjustment is done.
2998         (pdp11_gen_int_label): Correct format.
2999         (output_ascii): Ditto.
3000         (pdp11_asm_output_var): Add code for DEC assembler case.
3001         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
3002         value.
3003         (legitimate_const_double_p): Ditto.
3004         (pdp11_register_move_cost): Adjust for new register classes.
3005         (pdp11_regno_reg_class): Ditto.
3006         (expand_block_move): Delete.
3007         (pushpop_regeq): New function.
3008         (pdp11_legitimate_address_p): Bugfix in check for constant
3009         offset.
3010         (pdp11_sp_frame_offset): Delete.
3011         (pdp11_reg_save_size): New helper function for new frame layout.
3012         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
3013         (pdp11_expand_shift): Bugfix in check for constant shift count.
3014         (pdp11_shift_length): Ditto.
3015         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
3016         (pdp11_cmp_length): New function.
3017         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
3018         some compile options.
3019         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
3020         (CALL_USED_REGISTERS): Ditto.
3021         (ELIMINABLE_REGS): Ditto.
3022         (REGISTER_NAMES): Ditto.
3023         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
3024         constraints.
3025         (REG_CLASS_NAMES): Ditto.
3026         (REG_CLASS_CONTENTS): Ditto.  Also remove
3027         HARD_FRAME_POINTER_REGNUM.
3028         (CPU_REG_CLASS): New macro.
3029         (CLASS_MAX_NREGS): Adjust for new register classes.
3030         (FUNCTION_PROFILER): Make no-op.
3031         (may_call_alloca): Remove unused declaration.
3032         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
3033         (ASM_OUTPUT_SKIP): Fix format.
3034         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
3035         (HARD_FRAME_POINTER_REGNUM): Remove.
3036         (return): Delete.
3037         (*rts): Rename.  Remove epilogue related checks.
3038         (cmpsi, cmpdi): New insn.
3039         (cbranch<mode>4): Change to apply to SI and DI modes as well.
3040         (mov<mode>): Change constraints to enforce that push/pop
3041         destination cannot use the same register as source.
3042         (*mov<mode><cc_cc>): Ditto.
3043         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
3044         at assembly output rather than as RTL expander.
3045         (zero_extendqihi2): Bugfix in check for same registers.
3046         (adddi3_nocc): Bugfix in check for constant operand.
3047         (addsi3_nocc): Ditto.
3048         (subdi3_nocc): Ditto.
3049         (subsi3_nocc): Ditto.
3050         (negdi2_nocc): Copy input to pdp11_expand_operands.
3051         (negsi2_nocc): Ditto.
3052         (bswap2_nocc): Ditto.
3053         * config/pdp11/pdp11.opt (mlra): Fix documentation.
3054         * config/pdp11/t-pdp11: Use -Os.
3056 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
3058         * config/arm/parsecpu.awk (/alias/): New parsing rule.
3059         (/begin cpu/): Check that the cpu name hasn't been previously defined.
3060         (gen_comm_data): Print out CPU alias tables.
3061         (check_cpu): Match aliases when checking the CPU name.
3062         * config/arm/arm-protos.h (cpu_alias): New structure.
3063         (cpu_option): Add entry for aliases.
3064         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
3065         strongarm1100 and strongarm1110.
3066         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
3067         (config/arm/arm-generic.md): Remove redundant references to
3068         strongarm110, strongarm1100 and strongarm1110.
3069         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
3070         Scan aliases for additional hints.
3071         (arm_parse_cpu_option_name): Also match a cpu name against the list
3072         of aliases.
3073         * config/arm/arm-tables.opt: Regenerated.
3074         * config/arm/arm-tune.md: Regenerated.
3076 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
3078         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3079         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3080         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3081         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3082         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3083         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3084         * gengtype.c (open_base_files): Add omp-general.h.
3085         * gimple.c (gimple_build_omp_critical):
3086         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
3087         gimple_omp_taskgroup_set_clauses.
3088         (gimple_build_omp_atomic_load): Add mo argument, call
3089         gimple_omp_atomic_set_memory_order.
3090         (gimple_build_omp_atomic_store): Likewise.
3091         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
3092         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
3093         instead of GSS_OMP.
3094         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
3095         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
3096         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
3097         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
3098         different value for GF_OMP_ATOMIC_NEED_VALUE.
3099         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
3100         comments.
3101         (struct gimple_statement_omp_single_layout): And remove here.
3102         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
3103         than gimple_statement_omp_single_layout.
3104         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
3105         GIMPLE_OMP_TEAMS.
3106         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
3107         (gimple_omp_subcode): Formatting fix.
3108         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
3109         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
3110         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
3111         gimple_omp_teams_host, gimple_omp_teams_set_host,
3112         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
3113         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
3114         gimple_omp_taskgroup_set_clauses): New inline functions.
3115         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
3116         (gimple_build_omp_atomic_store): Likewise.
3117         (gimple_omp_atomic_seq_cst_p): Remove.
3118         (gimple_omp_atomic_memory_order): New function.
3119         (gimple_omp_atomic_set_seq_cst): Remove.
3120         (gimple_omp_atomic_set_memory_order): New function.
3121         (gimple_build_omp_taskgroup): Add clauses argument.
3122         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
3123         (dump_gimple_omp_task): Print taskwait with depend clauses.
3124         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3125         dump_omp_atomic_memory_order.
3126         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3127         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3128         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3129         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3130         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3131         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3132         ORT_UNTIED_TASKLOOP enumerators.
3133         (enum gimplify_defaultmap_kind): New.
3134         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3135         target_map_pointers_as_0len_arrays members, add defaultmap.
3136         (new_omp_context): Initialize defaultmap member.
3137         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3138         (maybe_fold_stmt): Don't fold even in host teams regions.
3139         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3140         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
3141         ctx->omp_firstprivatize_variable.
3142         (omp_add_variable): Don't add private/firstprivate for VLAs in
3143         ORT_TASKGROUP.
3144         (omp_default_clause): Print "taskloop" rather than "task" if
3145         ORT_*TASKLOOP.
3146         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3147         Handle new defaultmap clause kinds.
3148         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
3149         iterator to be lastprivate or private.  Fix up diagnostics if linear
3150         is used on collapse>1 simd iterator.
3151         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3152         (gimplify_omp_depend): New function.
3153         (gimplify_scan_omp_clauses): Add shared clause on parallel for
3154         combined parallel master taskloop{, simd} if taskloop has
3155         firstprivate, lastprivate or reduction clause.  Handle
3156         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
3157         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
3158         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
3159         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
3160         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
3161         lastprivate.
3162         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
3163         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3164         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
3165         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3166         (gimplify_omp_task): Handle taskwait with depend clauses.
3167         (gimplify_omp_for): Add shared clause on parallel for combined
3168         parallel master taskloop{, simd} if taskloop has firstprivate,
3169         lastprivate or reduction clause.  Use ORT_TASKLOOP or
3170         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
3171         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
3172         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
3173         __for_end and __for_range temporaries on OMP_PARALLEL for
3174         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
3175         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3176         sandwiched in between two taskloops.
3177         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3178         instead of ctx->omp_firstprivatize_variable.
3179         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3180         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
3181         host teams, use gimplify_and_return_first etc. for body like
3182         for target or target data constructs, and at the end call
3183         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3184         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3185         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3186         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3187         gimple_omp_atomic_set_seq_cst calls.
3188         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3189         case, handle taskgroup clauses.
3190         * lto-streamer-out.c (hash_tree): Handle
3191         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3192         * Makefile.in (GTFILES): Add omp-general.h.
3193         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3194         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3195         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3196         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3197         BUILT_IN_GOMP_LOOP_DOACROSS_START,
3198         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3199         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3200         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3201         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3202         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3203         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3204         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3205         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3206         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3207         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3208         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3209         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3210         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3211         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3212         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3213         * omp-expand.c (workshare_safe_to_combine_p): Return false for
3214         non-worksharing loops.
3215         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3216         (determine_parallel_type): Don't combine parallel with worksharing
3217         which has _reductemp_ clause.
3218         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3219         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3220         if there is nonmonotonic modifier or if there is no modifier and no
3221         ordered clause.  For dynamic and guided schedule without monotonic
3222         and nonmonotonic modifier, default to nonmonotonic.
3223         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
3224         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3225         task reductions.
3226         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3227         there are any reduction clauses.
3228         (expand_taskwait_call): New function.
3229         (expand_teams_call): New function.
3230         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3231         expand_teams_call for it.  Formatting fix.  Handle taskwait with
3232         depend clauses.
3233         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
3234         of worksharing loops with task reductions.
3235         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3236         expansion of worksharing loops with task reductions.
3237         (expand_omp_sections): Handle expansion of sections with task
3238         reductions.
3239         (expand_omp_synch): For host teams call expand_omp_taskreg.
3240         (omp_memory_order_to_memmodel): New function.
3241         (expand_omp_atomic_load, expand_omp_atomic_store,
3242         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3243         instead of gimple_omp_atomic_seq_cst_p.
3244         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3245         depend clauses as a standalone directive.
3246         * omp-general.c (enum omp_requires): New variable.
3247         (omp_extract_for_data): Initialize have_reductemp member.  Allow
3248         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3249         GT_EXPR loops depending on incr sign.  Formatting fixes.
3250         * omp-general.h (struct omp_for_data): Add have_reductemp member.
3251         (enum omp_requires): New enum.
3252         (omp_requires_mask): Declare.
3253         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3254         Fix comment typos.
3255         * omp-low.c (struct omp_context): Add task_reductions and
3256         task_reduction_map fields.
3257         (is_host_teams_ctx): New function.
3258         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3259         (use_pointer_for_field): Use is_global_var instead of
3260         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3261         in outer contexts.
3262         (build_outer_var_ref): Ignore taskgroup outer contexts.
3263         (delete_omp_context): Release task_reductions and task_reduction_map.
3264         (scan_sharing_clauses): Don't add any fields for reduction clause on
3265         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
3266         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3267         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
3268         Handle OMP_CLAUSE_NONTEMPORAL.
3269         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3270         needed.
3271         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3272         clauses with task modifier.
3273         (scan_omp_task): Handle taskwait with depend clauses.
3274         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3275         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3276         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3277         (scan_omp_for): Fix comment formatting.
3278         (scan_omp_teams): Handle host teams constructs.
3279         (check_omp_nesting_restrictions): Allow teams with no outer
3280         OpenMP context.  Adjust diagnostics for teams strictly nested into
3281         some explicit OpenMP construct other than target.  Allow OpenMP atomics
3282         inside of simd regions.
3283         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3284         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3285         taskreg_nesting_level while scanning host teams construct.
3286         (task_reduction_read): New function.
3287         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3288         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3289         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
3290         second argument create_tmp_var if it is NULL.  Don't ignore shared
3291         clauses in is_host_teams_ctx contexts.  Handle
3292         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3293         clauses.
3294         (lower_reduction_clauses): Ignore reduction clauses with task
3295         modifier.  Remove second argument create_tmp_var if it is NULL.
3296         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3297         (lower_send_clauses): Ignore reduction clauses with task modifier.
3298         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
3299         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
3300         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3301         rely that it is the last stmt in body so far.  Ignore outer taskgroup
3302         contexts.
3303         (omp_task_reductions_find_first, omp_task_reduction_iterate,
3304         lower_omp_task_reductions): New functions.
3305         (lower_omp_sections): Handle reduction clauses with taskgroup
3306         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
3307         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3308         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
3309         modifiers.
3310         (lower_omp_taskgroup): Handle taskgroup reductions.
3311         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3312         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3313         (lower_depend_clauses): If there are any
3314         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3315         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
3316         seen, assume lowering is done already and return early.  Set kind
3317         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3318         (lower_omp_taskreg): Handle reduction clauses with task modifier on
3319         parallel construct.  Handle reduction clause on taskloop construct.
3320         Handle taskwait with depend clauses.
3321         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3322         for host teams constructs.
3323         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3324         nontemporal and _reductemp_ clause entries.
3325         (omp_clause_code_name): Likewise.
3326         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3327         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3328         * tree-core.h (enum omp_clause_code): Add
3329         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3330         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3331         (struct tree_base): Add omp_atomic_memory_order field into union.
3332         Remove OMP_ATOMIC_SEQ_CST comment.
3333         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3334         and OMP_CLAUSE_DEPEND_DEPOBJ.
3335         (struct tree_omp_clause): Add subcode.defaultmap_kind.
3336         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
3337         OpenMP constructs with body and clauses operands.
3338         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
3339         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
3340         (OMP_TASKGROUP_CLAUSES): Define.
3341         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
3342         OMP_CLAUSE__LOOPTEMP_.
3343         (OMP_ATOMIC_SEQ_CST): Remove.
3344         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
3345         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
3346         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
3347         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
3348         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
3349         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
3350         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
3351         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
3352         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
3353         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
3354         Define.
3355         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
3356         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3357         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
3358         (convert_local_omp_clauses): Likewise.  Remove useless test.
3359         * tree-parloops.c (create_call_for_reduction_1): Pass
3360         OMP_MEMORY_ORDER_RELAXED as new argument to
3361         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
3362         * tree-pretty-print.c (dump_omp_iterators): New function.
3363         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
3364         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
3365         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
3366         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
3367         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
3368         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
3369         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
3370         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3371         (dump_omp_atomic_memory_order): New function.
3372         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
3373         taskwait with depend clauses.
3374         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
3375         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
3376         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
3377         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
3378         write_ts_omp_clause_tree_pointers): Likewise.
3380 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3382         PR ipa/86395
3383         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
3384         "-missed", "-note", and "-all" sub-options.
3385         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
3386         API.
3387         (can_early_inline_edge_p): Likewise.
3388         (want_early_inline_function_p): Likewise.
3389         (want_inline_self_recursive_call_p): Likewise.
3390         (recursive_inlining): Likewise.
3391         (inline_small_functions): Likewise.
3392         (flatten_function): Likewise.
3393         (ipa_inline): Likewise.
3394         (inline_always_inline_functions): Likewise.
3395         (early_inline_small_functions): Likewise.
3396         (early_inliner): Likewise.
3397         * tree-inline.c (expand_call_inline): Likewise.
3399 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3401         * pretty-print.c (pp_format): Handle %f.
3402         (selftest::test_pp_format): Add test of %f.
3403         * pretty-print.h (pp_double): New macro.
3405 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3407         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
3408         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
3409         (dump_pretty_printer::decode_format): Implement "%C" for
3410         cgraph_node *.
3411         (selftest::test_capture_of_dump_calls): Rename "where" to
3412         "stmt_loc".  Convert test_decl to a function decl and set its
3413         location.  Add a symbol_table_test RAII instance and a
3414         cgraph_node, using it to test "%C" and dump_symtab_node.
3416 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
3418         PR middle-end/87916
3419         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
3421 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3423         * cgraph.c: Include "selftest.h".
3424         (saved_symtab): New variable.
3425         (selftest::symbol_table_test::symbol_table_test): New ctor.
3426         (selftest::symbol_table_test::~symbol_table_test): New dtor.
3427         (selftest::test_symbol_table_test): New test.
3428         (selftest::cgraph_c_tests): New.
3429         * cgraph.h (saved_symtab): New decl.
3430         (selftest::symbol_table_test): New class.
3431         * selftest-run-tests.c (selftest::run_tests): Call
3432         selftest::cgraph_c_tests.
3433         * selftest.h (selftest::cgraph_c_tests): New decl.
3435 2018-11-08  Richard Biener  <rguenther@suse.de>
3437         * tree-data-ref.h (lambda_int): New typedef.
3438         (lambda_vector_gcd): Adjust.
3439         (lambda_vector_new): Likewise.
3440         (lambda_matrix_new): Likewise.
3441         * tree-data-ref.c  (print_lambda_vector): Adjust.
3443 2018-11-08  Richard Biener  <rguenther@suse.de>
3445         PR tree-optimization/87929
3446         * tree-complex.c (expand_complex_comparison): Clean EH.
3448 2018-11-08  Martin Liska  <mliska@suse.cz>
3450         * doc/extend.texi: Reword.
3451         * predict.c (expr_expected_value_1): Likewise.
3453 2018-11-08  Richard Biener  <rguenther@suse.de>
3455         PR tree-optimization/87913
3456         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
3457         of extreme values to ordered comparisons.
3459 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
3461         PR middle-end/42726
3462         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
3464 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
3466         * doc/invoke.texi: Remove leading dash from @opindex entries
3467         throughout the file.
3469 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
3471         PR driver/80828
3472         * doc/invoke.texi (Option Summary): Add -e and --entry.
3473         (Link Options): Likewise.
3475 2018-11-07  Nathan Sidwell  <nathan@acm.org>
3477         PR 87926
3478         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
3479         --disable-checking bootstrap.
3481 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3483         * configure: Regenerated.
3485 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3487         PR c/87691
3488         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
3489         to the mode of the widest field iff the widest field has mode class
3490         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
3491         reference.
3493 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
3495         * common.opt: Add -Wattribute-warning.
3496         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
3497         * expr.c (expand_expr_real_1): Add new attribute to warning_at
3498         call to allow user configure behavior of "warning" attribute.
3500 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
3502         * target.def: Put @: after every vs., e.g., and i.e. where it is
3503         followed by whitespace.
3504         * doc/extend.texi: Ditto.
3505         * doc/fragments.texi: Ditto.
3506         * doc/gimple.texi: Ditto.
3507         * doc/implement-c.texi: Ditto.
3508         * doc/install.texi: Ditto.
3509         * doc/invoke.texi: Ditto.
3510         * doc/md.texi: Ditto.
3511         * doc/plugins.texi: Ditto.
3512         * doc/rtl.texi: Ditto.
3513         * doc/sourcebuild.texi: Ditto.
3514         * doc/tm.texi.in: Ditto.
3515         * doc/ux.texi: Ditto.
3516         * doc/tm.texi: Regenerate.
3518 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3520         * config/arm/arm-cpus.in (ares): New entry.
3521         * config/arm/arm-tables.opt: Regenerate.
3522         * config/arm/arm-tune.md: Likewise.
3523         * doc/invoke.texi (ARM Options): Document ares.
3525 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3527         * config/aarch64/aarch64-cores.def (ares): Define.
3528         * config/aarch64/aarch64-tune.md: Regenerate.
3529         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
3531 2018-11-07  Jan Hubicka  <jh@suse.cz>
3533         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
3534         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
3535         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
3536         TYPE_DECL.
3538 2018-11-07  Richard Biener  <rguenther@suse.de>
3540         PR tree-optimization/87914
3541         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
3542         of nested cycles.
3543         (vectorizable_reduction): Handle shifts and rotates by dispatching
3544         to vectorizable_shift.
3545         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
3546         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
3547         def cases.
3548         (vectorizable_shift): Export and handle being called as
3549         vect_nested_cycle.
3550         (vect_analyze_stmt): Call vectorizable_shift after
3551         vectorizable_reduction.
3552         * tree-vectorizer.h (vectorizable_shift): Declare.
3554 2018-11-07  Jan Hubicka  <jh@suse.cz>
3556         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
3557         than const decls in TREE_VALUE of enum.
3558         (dump_type_inheritance_graph): Improve duplicate dumping.
3559         (free_enum_values): New.
3560         (build_type_inheritance_graph): Use it.
3561         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
3562         which are not main variants or not ODR types.
3563         (verify_type_variant): Expect variants to have no TYPE_VALUES.
3565 2018-11-07  Richard Biener  <rguenther@suse.de>
3567         * ipa-inline.c (want_inline_small_function_p): Compute
3568         big_speedup_p lazily and last.
3570 2018-11-07  Jan Hubicka  <jh@suse.cz>
3572         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
3573         building incomplete variant of complete type.
3574         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
3575         variant of complete type.
3577 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3579         * config/mips/mips.c: Fix typo in documentation of
3580         mips_loongson_ext2_prefetch_cookie.
3581         (mips_option_override): fix brain twister logical.
3582         * config/mips/mips.h: Fix typo in documentation of
3583         ISA_HAS_CTZ_CTO and define pattern.
3584         * config/mips/mips.md (prefetch): Hoist EXT2 above
3585         the 2EF/EXT block.
3586         (prefetch_indexed): Hoist EXT2 above the EXT block.
3588 2018-11-07  Jan Hubicka  <jh@suse.cz>
3590         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
3591         return and parameter types of function and method types.
3592         (free_lang_data_in_cgraph): Update.
3594 2018-11-07  Martin Liska  <mliska@suse.cz>
3596         PR rtl-optimization/87868
3597         * postreload-gcse.c (eliminate_partially_redundant_load): Set
3598         threshold to max_count if we would overflow.
3599         * profile-count.h: Make max_count a public constant.
3601 2018-11-07  Martin Liska  <mliska@suse.cz>
3603         * mem-stats.h: Fix GNU coding style.
3605 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3607         * config/mips/gs264e.md: New.
3608         * config/mips/mips-cpus.def: Define gs264e.
3609         * config/mips/mips-tables.opt: Regenerate.
3610         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3611         gs264e.
3612         (mips_issue_rate): Add support for gs264e.
3613         (mips_multipass_dfa_lookahead): Likewise.
3614         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
3615         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
3616         (MIPS_ASE_MSA_SPEC): New.
3617         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
3618         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
3619         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
3620         * config/mips/mips.md: Include gs264e.md.
3621         (processor): Add gs264e.
3622         * config/mips/mips.opt (MSA): Use Mask instead of Var.
3623         * doc/invoke.texi: Add gs264e to supported architectures.
3625 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3627         * config/mips/gs464e.md: New.
3628         * config/mips/mips-cpus.def: Define gs464e.
3629         * config/mips/mips-tables.opt: Regenerate.
3630         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3631         gs464e.
3632         (mips_issue_rate): Add support for gs464e.
3633         (mips_multipass_dfa_lookahead): Likewise.
3634         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
3635         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
3636         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
3637         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
3638         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
3639         * config/mips/mips.md: Include gs464e.md.
3640         (processor): Add gs464e.
3641         * doc/invoke.texi: Add gs464e to supported architectures.
3643 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3645         * config/mips/loongson3a.md: Rename to ...
3646         * config/mips/gs464.md: ... here.
3647         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
3648         as an alias of gs464 processor.
3649         * config/mips/mips-tables.opt: Regenerate.
3650         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
3651         instead of PROCESSOR_LOONGSON_3A.
3652         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
3653         TUNE_LOONGSON_3A.
3654         (mips_option_override): Enable MMI and EXT for gs464.
3655         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
3656         Rename TUNE_LOONGSON_3A to TUNE_GS464.
3657         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
3658         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
3659         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
3660         TARGET_LOONGSON_3A.
3661         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
3662         (processor): Add gs464;
3663         * doc/invoke.texi: Add gs464 to supported architectures.
3665 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3667         * config/mips/mips-protos.h
3668         (mips_loongson_ext2_prefetch_cookie): New prototype.
3669         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
3670         (mips_option_override): Enable TARGET_LOONGSON_EXT when
3671         TARGET_LOONGSON_EXT2 is true.
3672         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
3673         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
3674         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
3675         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
3676         TARGET_LOONGSON_EXT2.
3677         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
3678         (define_insn "ctz<mode>2"): New insn pattern.
3679         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
3680         (define_insn "prefetch_indexed_<mode>"): Include
3681         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
3682         * config/mips/mips.opt (-mloongson-ext2): Add option.
3683         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
3685 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3687         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
3688         __mips_loongson_ext.
3689         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
3690         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
3691         -mloongson-ext.
3692         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
3693         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
3694         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
3695         instead of TARGET_LOONGSON_3A.
3696         * config/mips/mips.opt (-mloongson-ext): Add option.
3697         * gcc/doc/invoke.texi (-mloongson-ext): Document.
3699 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3701         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
3702         * config/mips/loongson.md: Move to ...
3703         * config/mips/loongson-mmi.md: here; Adjustment.
3704         * config/mips/loongson.h: Move to ...
3705         State as deprecated. Include loongson-mmiintrin.h for back
3706         compatibility and warning.
3707         * config/mips/loongson-mmiintrin.h: ... here.
3708         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
3709         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
3710         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3711         (mips_option_override): Make sure MMI use hard float;
3712         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
3713         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
3714         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
3715         TARGET_LOONGSON_VECTORS.
3716         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
3717         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
3718         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
3719         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
3720         -mloongson-mmi.
3721         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
3722         TARGET_LOONGSON_VECTORS.
3723         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
3724         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3725         (Loongson MMI patterns): Include loongson-mmi.md instead of
3726         loongson.md.
3727         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
3728         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
3730 2018-11-07  Richard Biener  <rguenther@suse.de>
3732         PR lto/87906
3733         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
3734         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
3736 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
3738         PR rtl-optimization/87874
3739         * lra.c (lra_substitute_pseudo): Do not create a subreg for
3740         const wide ints.
3742 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
3744         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
3745         if not in indexed or indirect form.
3746         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
3747         (bswap<mode>2_store): Ditto.
3749 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
3751         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
3752         the UNSPEC.
3754 2018-11-06  Richard Biener  <rguenther@suse.de>
3756         PR tree-optimization/86850
3757         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
3758         instead of src.m_vec.
3760 2018-11-06  Jan Hubicka  <jh@suse.cz>
3762         * tree.c (fld_simplified_type_name): Break out form ...
3763         (free_lang_data_in_type): ... here.
3764         (fld_type_variant_equal_p): Use it.
3766 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3768         * config/default-d.c: Include memmodel.h.
3770         * config/sol2-d.c: New file.
3771         * config/t-sol2 (sol2-d.o): New rule.
3772         * config.gcc <*-*-solaris2*>: Set d_target_objs,
3773         target_has_targetdm.
3775 2018-11-06  Jan Hubicka  <jh@suse.cz>
3777         * tree.c (fld_type_variant): Also copy alignment; be sure that
3778         new variant is equal.
3780 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3782         PR target/87762
3783         * config/s390/s390.md: Add relative_long attribute.
3785 2018-11-06  Jan Hubicka  <jh@suse.cz>
3787         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
3788         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
3789         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
3790         stream TYPE_NEEDS_CONSTRUCTING.
3791         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
3792         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
3794 2018-11-06  Richard Biener  <rguenther@suse.de>
3796         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
3797         dump-scope ...
3798         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
3800 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3802         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
3803         REG_CLASS_CONTENTS[GEN_REGS].
3804         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
3806 2018-11-06  Jan Hubicka  <jh@suse.cz>
3808          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
3810 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3812         PR sanitizer/80953
3813         * config/sol2.h (ASAN_CC1_SPEC): Define.
3814         (LD_WHOLE_ARCHIVE_OPTION): Define.
3815         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
3816         (ASAN_REJECT_SPEC): Provide default.
3817         (LIBASAN_EARLY_SPEC): Define.
3818         (LIBTSAN_EARLY_SPEC): Define.
3819         (LIBLSAN_EARLY_SPEC): Define.
3820         * config/i386/sol2.h (CC1_SPEC): Redefine.
3821         (ASAN_REJECT_SPEC): Define.
3823         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
3824         (TARGET_ASAN_SHADOW_OFFSET): Define.
3825         (sparc_asan_shadow_offset): New function.
3826         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
3827         (ASAN_REJECT_SPEC): Define.
3829 2018-11-06  Jan Hubicka  <jh@suse.cz>
3831         * tree.c (fld_type_variant): Copy canonical type.
3832         (fld_incomplete_type_of): Check that canonical types looks sane;
3833         copy canonical type.
3834         (verify_type): Accept when incomplete type has complete canonical type.
3836 2018-11-06  Jan Hubicka  <jh@suse.cz>
3838         * tree.c (free_lang_data): Reset overwite_assembler_name,
3839         print_xnode, print_decl, print_type and print_identifier of
3840         langhooks.
3842 2018-11-06  Richard Biener  <rguenther@suse.de>
3844         PR tree-optimization/87889
3845         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3846         Do nothing if old and new arg are the same
3848 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
3850         PR target/87723
3851         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
3852         attributes for operands 3 and 4.
3854 2018-11-06  Richard Biener  <rguenther@suse.de>
3856         PR middle-end/18041
3857         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
3858         matching bitfield insertion.
3860 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
3862         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
3863         (reg_next_debug_use): New.
3864         (attempt_change): Propagate adjusted expression into affected
3865         debug insns.
3866         (merge_in_block): Track uses in debug insns.
3867         (pass_inc_dec::execute): Allocate and release
3868         reg_next_debug_use.
3870 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
3872         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
3873         (_mm512_fixupimm_round_pd): Update parameters and builtin.
3874         (_mm512_maskz_fixupimm_round_pd): Ditto.
3875         (_mm512_fixupimm_round_ps): Ditto.
3876         (_mm512_maskz_fixupimm_round_ps): Ditto.
3877         (_mm_fixupimm_round_sd): Ditto.
3878         (_mm_maskz_fixupimm_round_sd): Ditto.
3879         (_mm_fixupimm_round_ss): Ditto.
3880         (_mm_maskz_fixupimm_round_ss): Ditto.
3881         (_mm512_fixupimm_pd): Ditto.
3882         (_mm512_maskz_fixupimm_pd): Ditto.
3883         (_mm512_fixupimm_ps): Ditto.
3884         (_mm512_maskz_fixupimm_ps): Ditto.
3885         (_mm_fixupimm_sd): Ditto.
3886         (_mm_maskz_fixupimm_sd): Ditto.
3887         (_mm_fixupimm_ss): Ditto.
3888         (_mm_maskz_fixupimm_ss): Ditto.
3889         (_mm512_mask_fixupimm_round_pd): Update builtin.
3890         (_mm512_mask_fixupimm_round_ps): Ditto.
3891         (_mm_mask_fixupimm_round_sd): Ditto.
3892         (_mm_mask_fixupimm_round_ss): Ditto.
3893         (_mm512_mask_fixupimm_pd): Ditto.
3894         (_mm512_mask_fixupimm_ps): Ditto.
3895         (_mm_mask_fixupimm_sd): Ditto.
3896         (_mm_mask_fixupimm_ss): Ditto.
3897         * config/i386/avx512vlintrin.h:
3898         (_mm256_fixupimm_pd): Update parameters and builtin.
3899         (_mm256_maskz_fixupimm_pd): Ditto.
3900         (_mm256_fixupimm_ps): Ditto.
3901         (_mm256_maskz_fixupimm_ps): Ditto.
3902         (_mm_fixupimm_pd): Ditto.
3903         (_mm_maskz_fixupimm_pd): Ditto.
3904         (_mm_fixupimm_ps): Ditto.
3905         (_mm_maskz_fixupimm_ps): Ditto.
3906         (_mm256_mask_fixupimm_pd): Update builtin.
3907         (_mm256_mask_fixupimm_ps): Ditto.
3908         (_mm_mask_fixupimm_pd): Ditto.
3909         (_mm_mask_fixupimm_ps): Ditto.
3910         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3911         * config/i386/i386-builtin.def: Update builtin definitions.
3912         * config/i386/i386.c: Handle new builtin types and remove useless ones.
3913         * config/i386/sse.md: Update VFIXUPIMM* patterns.
3914         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3915         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3916         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3917         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3918         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3919         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3920         * config/i386/subst.md:
3921         (round_saeonly_sd_mask_operand4): Add new subst_attr.
3922         (round_saeonly_sd_mask_op4): Ditto.
3923         (round_saeonly_expand_operand5): Ditto.
3924         (round_saeonly_expand): Update.
3926 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
3928         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3930 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
3932         PR rtl-optimization/87871
3933         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3935 2018-11-05  Paul Koning  <ni1d@arrl.net>
3937         * doc/sourcebuild.texi (target attributes): Document new "inf"
3938         effective target keyword.
3940 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3942         * config/s390/s390.c (s390_register_move_cost): Increase costs for
3943         moves involving the CC reg.
3945 2018-11-05  Richard Biener  <rguenther@suse.de>
3947         PR tree-optimization/87873
3948         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3949         argument.
3950         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3951         * tree-vect-loop.c (vect_transform_loop): When splitting the
3952         loop exit also create forwarder PHIs for constants.
3953         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3954         Handle constant to_arg, add extra checking we match up the correct
3955         PHIs.
3957 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3959         * config/s390/s390.md: QImode and HImode for load on condition.
3961 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3963         * config/s390/predicates.md: Fix typo.
3964         * config/s390/s390.md: Allow immediates for load on condition.
3966 2018-11-05  Martin Liska  <mliska@suse.cz>
3968         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3969         * bitmap.h (struct bitmap_usage): Likewise.
3970         * ggc-common.c (SCALE): Remove.
3971         (LABEL): Likewise.
3972         (struct ggc_usage): Use SIZE_AMOUNT. And update
3973         compare method.
3974         * ggc-page.c (SCALE): Remove.
3975         (STAT_LABEL): Remove.
3976         (ggc_print_statistics): Use SIZE_AMOUNT.
3977         * gimple.h (SCALE): Remove.
3978         (LABEL): Likewise.
3979         * input.c (ONE_K): Remove.
3980         (ONE_M): Likewise.
3981         (SCALE): Likewise.
3982         (STAT_LABEL): Likewise.
3983         (FORMAT_AMOUNT): Likewise.
3984         (dump_line_table_statistics): Use SIZE_AMOUNT.
3985         * mem-stats.h (struct mem_usage): Likewise.
3986         * rtl.c (dump_rtx_statistics): Likewise.
3987         (rtx_alloc_counts): Change type to size_t.
3988         (rtx_alloc_sizes): Likewise.
3989         (rtx_count_cmp): New.
3990         (dump_rtx_statistics): Sort first based on counts.
3991         * tree.c (tree_nodes_cmp): New.
3992         (tree_codes_cmp): New.
3993         (dump_tree_statistics): Sort first based on counts.
3994         * system.h (ONE_K): New.
3995         (ONE_M): Likewise.
3996         (SIZE_SCALE): Likewise.
3997         (SIZE_LABEL): Likewise.
3998         (SIZE_AMOUNT): Likewise.
3999         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
4000         * tree-dfa.c (dump_dfa_stats): Likewise.
4001         * tree-phinodes.c (phinodes_print_statistics): Likewise.
4002         * tree-ssanames.c (ssanames_print_statistics): Likewise.
4003         * tree.c (dump_tree_statistics): Likewise.
4004         * vec.c (struct vec_usage): Likewise.
4005         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
4006         trigger a -Werror=format-overflow with
4007         --enable-gather-detailed-stats.
4009 2018-11-05  Martin Liska  <mliska@suse.cz>
4011         * mem-stats.h (mem_alloc_description::release_instance_overhead):
4012         Return T *.
4013         * vec.c (struct vec_usage): Register m_element_size.
4014         (vec_prefix::register_overhead): New arguments: elements and
4015         element_size.
4016         (vec_prefix::release_overhead): Subtract elements.
4017         * vec.h (struct vec_prefix): Change signature.
4018         (va_heap::reserve): Pass proper arguments.
4019         (va_heap::release): Likewise.
4021 2018-11-05  Martin Liska  <mliska@suse.cz>
4023         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
4024         style.
4025         * vec.c: Likewise.
4027 2018-11-05  Richard Biener  <rguenther@suse.de>
4029         * tree-scalar-evolution.h (final_value_replacement_loop): Update
4030         prototype.
4031         * tree-scalar-evolution.c (final_value_replacement_loop): Return
4032         whether anything was done.
4033         (scev_const_prop): Remove constant propagation part, fold
4034         remains into ...
4035         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
4036         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
4037         conditionally.
4039 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
4041         PR tree-optimization/87859
4042         * gimple-ssa-store-merging.c (struct merged_store_group): Add
4043         only_constants and first_nonmergeable_order members.
4044         (merged_store_group::merged_store_group): Initialize them.
4045         (merged_store_group::do_merge): Clear only_constants member if
4046         adding something other than INTEGER_CST store.
4047         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
4048         stores with order >= first_nonmergeable_order.  Use
4049         merged_store->only_constants instead of always recomputing it.
4050         Set merged_store->first_nonmergeable_order if we've skipped any
4051         stores.  Attempt to merge overlapping INTEGER_CST stores that
4052         we would otherwise skip.
4054         PR sanitizer/87837
4055         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
4057 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
4059         PR target/87853
4060         * config/i386/emmintrin.h (__v16qs): New to cope with option
4061         -funsigned-char.
4062         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
4063         (_mm_cmplt_epi8): Likewise.
4064         (_mm_cmpgt_epi8): Likewise.
4066 2018-11-05  Richard Biener  <rguenther@suse.de>
4068         PR rtl-optimization/87852
4069         * fwprop.c (use_killed_between): Only consider single-defs of the
4070         use whose definition statement dominates the use.
4072 2018-11-05  Martin Liska  <mliska@suse.cz>
4074         PR web/87829
4075         * doc/invoke.texi: Remove options that are
4076         not disabled with -Os.
4078 2018-11-05  Martin Liska  <mliska@suse.cz>
4080         PR c/87811
4081         * doc/extend.texi: Update constrain about the last argument
4082         of __builtin_expect_with_probability.
4084 2018-11-05  Martin Liska  <mliska@suse.cz>
4086         PR c/87811
4087         * predict.c (expr_expected_value_1): Verify
4088         that last argument is a real constants and emit
4089         error.
4091 2018-11-05  Martin Liska  <mliska@suse.cz>
4093         PR gcov-profile/77698
4094         * ipa-profile.c (ipa_profile): Adjust hotness threshold
4095         only in LTO mode.
4097 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4099         PR tree-optimization/86572
4100         * builtins.c (c_strlen): Handle negative offsets in a safe way.
4102 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4104         PR tree-optimization/87672
4105         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
4106         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
4108 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
4110         PR middle-end/58372
4111         * cfgexpand.c (pass_expand::execute): Move the call to
4112         finish_eh_generation in front of the call to expand_stack_alignment.
4114 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
4116         * common/config/i386/i386-common.c (processor_alias_table): Add
4117         znver2 entry.
4118         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
4119         (case ${target}): Add znver2.
4120         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
4121         -march=native recognize znver2 processors.
4122         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
4123         * config/i386/i386.c (m_znver2): New definition.
4124         (m_ZNVER): New definition.
4125         (m_AMD_MULTIPLE): Includes m_znver2.
4126         (processor_cost_table): Add znver2 entry.
4127         (processor_target_table): Add znver2 entry.
4128         (get_builtin_code_for_version): Set priority for
4129         PROCESSOR_ZNVER2.
4130         (processor_model): Add M_AMDFAM17H_ZNVER2.
4131         (arch_names_table): Ditto.
4132         (ix86_reassociation_width): Include znver2.
4133         * config/i386/i386.h (TARGET_znver2): New definition.
4134         (struct ix86_size_cost): Add TARGET_ZNVER2.
4135         (enum processor_type): Add PROCESSOR_ZNVER2.
4136         * config/i386/i386.md (define_attr "cpu"): Add znver2.
4137         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4138         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4139         (ix86_adjust_cost): Add znver2.
4140         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
4141         * gcc/doc/extend.texi: Add details about znver2.
4142         * gcc/doc/invoke.texi: Add details about znver2.
4144 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
4146         PR target/87079
4148         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4149         pattern.
4151 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4153         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4154         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4156 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
4158         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4159         shrink-wrapping when -mtrack-speculation.
4161 2018-11-02  Richard Biener  <rguenther@suse.de>
4163         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4164         (pop_cost_one_pair): Do not free pair.
4165         (pop_best_coalesce): Likewise.
4166         (create_coalesce_list): Initialize obstack.
4167         (delete_coalesce_list): Free obstack.
4168         (find_coalesce_pair): Obstack-allocate coalesce pairs.
4169         (add_cost_one_coalesce): Likewise.
4170         (struct live_track): Remove bitmap pointer indirections.
4171         (new_live_track): Adjust.
4172         (delete_live_track): Likewise.
4173         (live_track_remove_partition): Likewise.
4174         (live_track_add_partition): Likewise.
4175         (live_track_live_p): Likewise.
4176         (live_track_process_def): Likewise.
4177         (live_track_clear_base_vars): Likewise.
4179 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4181         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4182         * configure: Regenerate.
4183         * config.in: Regenerate.
4184         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4185         HAVE_AS_REGISTER_PSEUDO_OP guard.
4186         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4187         !HAVE_AS_REGISTER_PSEUDO_OP support.
4188         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4189         guard.
4191 2018-11-02  Richard Biener  <rguenther@suse.de>
4193         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4194         with is_type_die.
4196 2018-11-02  Richard Biener  <rguenther@suse.de>
4198         PR tree-optimization/87776
4199         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4200         executable when iterating but running into rpo-vn-max-loop-depth
4201         and not eliding the iteration.
4203 2018-11-30  Jan Hubicka  <jh@suse.cz>
4205         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4206         TYPE_DECL.
4208 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
4210         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4211         prototype.
4212         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4213         Combine with rs6000_address_for_fpconvert.
4214         (rs6000_address_for_fpconvert): Combine with
4215         rs6000_force_indexed_or_indirect_mem.
4216         (rs6000_expand_vector_init): Change function call from
4217         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4218         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4219         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4220         (floatsi<mode>2_lfiwax_mem): Ditto.
4221         (floatunssi<mode>2_lfiwzx): Ditto.
4222         (floatunssi<mode>2_lfiwzx_mem): Ditto.
4223         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4224         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4225         (fix_trunc<mode>si2_stfiwx): Ditto.
4226         (fixuns_trunc<mode>si2_stfiwx): Ditto.
4227         (float_<mode>si2_hw): Ditto.
4228         (floatuns_<mode>si2_hw): Ditto.
4229         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4230         (vsx_splat_<mode>): Ditto.
4232 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
4234         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4235         at end of assembler input text.
4236         * configure: Regenerate.
4238 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
4240         PR tree-optimization/87826
4241         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4242         negative or larger or equal to type's precision.
4244 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
4246         * opts.c (default_options_table): Do not enable
4247         OPT_fdelayed_branch at -Og.
4248         * doc/invoke.texi (-fdelayed-branch): Document it.
4250 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4252         * optabs-libfuncs.c (build_libfunc_function_visibility):
4253         New, split out from...
4254         (build_libfunc_function): ... here.
4255         (init_one_libfunc_visibility): New, split out from ...
4256         (init_one_libfunc): ... here.
4258         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4259         scratch register need not be early-clobber.  Document the reason
4260         why we cannot use ST<OP>.
4262 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
4264         PR bootstrap/82856
4265         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
4266         line for second argument of AC_DEFINE_UNQUOTED.
4267         * doc/install.texi (Tools/packages necessary for modifying GCC):
4268         Update to autoconf 2.69 and automake 1.15.1.
4269         * aclocal.m4, config.in, configure: Regenerate.
4271 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
4273         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4274         initialization.
4276 2018-10-31  Martin Liska  <mliska@suse.cz>
4278         PR driver/83193
4279         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4280         Add new argument invalid_extension.
4281         (aarch64_get_all_extension_candidates): New function.
4282         (aarch64_rewrite_selected_cpu): Add NULL to function call.
4283         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4284         new argument.
4285         (aarch64_get_all_extension_candidates): New function.
4286         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4287         argument invalid_extension.
4288         (aarch64_parse_cpu): Likewise.
4289         (aarch64_print_hint_for_extensions): New function.
4290         (aarch64_validate_mcpu): Provide hint about invalid extension.
4291         (aarch64_validate_march): Likewise.
4292         (aarch64_handle_attr_arch): Pass new argument.
4293         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4294         (aarch64_handle_attr_isa_flags): Likewise.
4296 2018-10-31  Richard Biener  <rguenther@suse.de>
4298         PR middle-end/70359
4299         PR middle-end/86270
4300         * tree-outof-ssa.c (insert_backedge_copies): Restrict
4301         copy generation to useful cases.  Place the copy before
4302         the definition of the backedge value when possible.
4304 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4306         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4307         * config/arc/arc.c (arc_active_insn): New function.
4308         (check_store_cacheline_hazard): Likewise.
4309         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4310         (arc_override_options): Disable delay slot scheduler for older
4311         A7.
4312         (arc_store_addr_hazard_p): New implementation, old one renamed to
4313         ...
4314         (arc_store_addr_hazard_internal_p): Renamed.
4315         (arc_reorg): Don't combine into brcc instructions which are part
4316         of hardware hazard solution.
4317         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4318         (tune_arc700): Likewise.
4319         * config/arc/arc.opt (arc7xx): New tune value.
4320         * config/arc/arc700.md: Improve A7 scheduler.
4322 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4324         * config/arc/arc.c (arc_override_options): Remove
4325         TARGET_COMPACT_CASESI.
4326         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4327         (CASE_VECTOR_MODE): Likewise.
4328         (CASE_VECTOR_PC_RELATIVE): Likewise.
4329         (CASE_VECTOR_SHORTEN_MODE): Likewise.
4330         (CASE_VECTOR_SHORTEN_MODE1): Delete.
4331         (ADDR_VEC_ALIGN): Update.
4332         (ASM_OUTPUT_CASE_LABEL): Undefine.
4333         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
4334         (TARGET_BI_BIH): Define.
4335         (DEFAULT_BRANCH_INDEX): Likewise.
4336         * config/arc/arc.md (casesi): Rework to accept BI/BIH
4337         instructions, remove compact_casesi use case.
4338         (casesi_compact_jump): Remove.
4339         (casesi_dispatch): New pattern.
4340         * config/arc/arc.opt: Add mbranch-index option. Deprecate
4341         compact_casesi option.
4342         * doc/invoke.texi: Document mbranch-index option.
4344 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4346         * config/arc/arc.c (arc_get_tp): Remove function.
4347         (arc_emit_call_tls_get_addr): Likewise.
4348         (arc_call_tls_get_addr): New function.
4349         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
4350         * config/arc/arc.md (tls_load_tp_soft): Remove.
4351         (tls_gd_get_addr): Likewise.
4353 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4355         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4356         (mulsi3_600_lib): Remove pattern.
4357         (umulsi3_highpart_600_lib_le): Likewise.
4358         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
4359         (umulsidi3): Remove call to umulsidi3_600_lib.
4360         (umulsidi3_600_lib): Remove pattern.
4361         (peephole2): Remove peephole using the above deprecated patterns.
4363 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
4365         PR target/87374
4366         * config/arm/arm.c (arm_option_check_internal): Disable the combined
4367         use of -mslow-flash-data and -mword-relocations.
4368         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
4369         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
4370         flag_pic.
4371         * doc/invoke.texi (-mword-relocations): Mention conflict with
4372         -mslow-flash-data.
4373         (-mslow-flash-data): Reciprocally.
4375 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4377         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
4378         16-byte modes held in GP registers to use an even regno.
4380         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
4381         (aarch64_atomic_ldop_supported_p): Remove.
4382         (aarch64_gen_atomic_ldop): Remove.
4383         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
4384         Fully expand LSE operations here.
4385         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
4386         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
4387         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
4388         and use ATOMIC_LDOP instead; use register_operand for the input;
4389         drop the split and emit insns directly.
4390         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
4391         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
4392         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
4394         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
4395         (aarch64_gen_atomic_ldop): Don't call it.
4396         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
4397         Use aarch64_reg_or_zero.
4398         (aarch64_atomic_exchange<ALLI>): Likewise.
4399         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
4400         operand 0; use aarch64_reg_or_zero for input; merge ...
4401         (@aarch64_atomic_swp<ALLI>): ... this and remove.
4403         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
4404         (aarch64_split_compare_and_swap): Use it.
4405         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
4406         test oldval against the proper predicate.
4407         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
4408         Use nonmemory_operand for expected.
4409         (cas_short_expected_pred): New.
4410         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
4411         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
4412         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
4413         (aarch64_plushi_operand): New.
4415         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
4416         Force oldval into the rval register for TARGET_LSE; emit the compare
4417         during initial expansion so that it may be deleted if unused.
4418         (aarch64_gen_atomic_cas): Remove.
4419         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
4420         Change =&r to +r for operand 0; use match_dup for operand 2;
4421         remove is_weak and mod_f operands as unused.  Drop the split
4422         and merge with...
4423         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
4424         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
4425         (@aarch64_atomic_cas<GPI>): Similarly.
4427 2018-10-31  Richard Biener  <rguenther@suse.de>
4429         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
4430         using ABSU_EXPR.
4432 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4434         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
4435         * config/aarch64/aarch64.md: Include saphira.md
4436         * config/aarch64/saphira.md: New file for pipeline description.
4438 2018-10-30  Martin Sebor  <msebor@redhat.com>
4440         PR middle-end/87041
4441         * gimple-ssa-sprintf.c (format_directive): Use %G to include
4442         inlining context.
4443         (sprintf_dom_walker::compute_format_length):
4444         Avoid setting POSUNDER4K here.
4445         (get_destination_size): Handle null argument values.
4446         (get_user_idx_format): New function.
4447         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
4448         functions, including user-defined with attribute format printf.
4449         Use %G to include inlining context.
4450         Set POSUNDER4K here.
4452 2018-10-30  Jan Hubicka  <jh@suse.cz>
4454         * params.def (lto-partitions): Bump from 32 to 128.
4456 2018-10-30  Jan Hubicka  <jh@suse.cz>
4458         * tree.c
4459         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
4460         head in file.
4461         (free_lang_data_in_type): Forward declare.
4462         (fld_type_variant_equal_p): New function.
4463         (fld_type_variant): New function
4464         (fld_incomplete_types): New hash.
4465         (fld_incomplete_type_of): New function
4466         (fld_simplfied-type): New function.
4467         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
4468         (free_lang_data): Allocate and free fld_incomplete_type; update call
4469         of free_lang_data_in_decl.
4471 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
4473         * gcov.c (output_lines): Remove duplicate line.
4475 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
4477         * config/rs6000/rs6000.md (bswapdi2): Force address into register
4478         if not in indexed or indirect form.
4479         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
4480         (bswapdi2_store): Ditto.
4481         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
4482         helper function.
4483         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
4484         Prototype for helper function.
4486 2018-10-30  Martin Sebor  <msebor@redhat.com>
4488         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
4489         (target, pragma GCC optimize, pragma GCC target): Ditto.
4491 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
4493         * doc/extend.texi: Fix prototype and description of
4494         __builtin_expect_with_probability.
4496 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
4498         * cgraph.h (clone_function_name_1): Replaced by new
4499           clone_function_name_numbered that takes name as string; for
4500           privatize_symbol_name_1 use only.
4501           (clone_function_name): Renamed to
4502           clone_function_name_numbered to be explicit about numbering.
4503           (clone_function_name): New two-argument function that does
4504           not number its output.
4505           (clone_function_name): New three-argument function that
4506           takes a number to append to its output.
4507         * cgraphclones.c (duplicate_thunk_for_node):
4508           (clone_function_name_1): Renamed.
4509           (clone_function_name_numbered): Two new functions.
4510           (clone_function_name): Improved documentation.
4511           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
4512         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
4513         * final.c (final_scan_insn_1): Use the new clone_function_name
4514           without numbering.
4515         * multiple_target.c (create_dispatcher_calls): Ditto.
4516           (create_target_clone): Ditto.
4517         * omp-expand.c (grid_expand_target_grid_body): Ditto.
4518         * omp-low.c (create_omp_child_function_name): Ditto.
4519         * omp-simd-clone.c (simd_clone_create): Ditto.
4520         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
4521           new clone_function_name without numbering.
4523 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
4525         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
4526         Assert that the allocation size is not zero.
4528 2018-10-30  Richard Biener  <rguenther@suse.de>
4530         PR tree-optimization/87800
4531         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
4532         non-induction or reduction PHIs.
4534 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
4536         * config/aarch64/falkor-tag-collision-avoidance.c
4537         (execute_tag_collision_avoidance): Call df_note_add_problem.
4539 2018-10-30  Martin Liska  <mliska@suse.cz>
4541         * doc/extend.texi: Fix typo in documentation
4542         of __builtin_expect_with_probability.
4544 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
4546         PR c++/87721
4547         * input.c (get_substring_ranges_for_loc): Detect if
4548         linemap_resolve_location gives us a NULL map, and reject
4549         this case.
4551 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
4553         * config.gcc (xstormy16-*-elf): Set tm_d_file.
4555 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
4556             Martin Sebor  <msebor@redhat.com>
4557             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4559         * doc/ux.texi (Quoting): New subsection, adapted from material at
4560         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
4561         MartinSebor and ManuelLopezIbanez.
4562         (Fix-it hints): Note that fix-it hints shouldn't be marked for
4563         translation.
4565 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
4567         PR middle-end/87469
4568         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
4569         max value.
4571 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
4573         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
4575 2018-10-29  Paul Koning  <ni1d@arrl.net>
4577         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
4579 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
4581         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
4582         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
4583         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
4584         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
4585         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
4586         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
4587         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
4588         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
4589         Change 'vector' to '__vector'.
4590         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
4591         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
4592         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
4593         _mm_avg_pu16): Likewise.  And, whitespace corrections.
4595 2018-10-29  Richard Biener  <rguenther@suse.de>
4597         PR tree-optimization/87785
4598         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
4599         internal defs.
4601 2018-10-29  Olivier Hainque  <hainque@adacore.com>
4603         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
4605 2018-10-29  Olivier Hainque  <hainque@adacore.com>
4607         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
4608         ports configuration macro, defaults to "gnu".
4609         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
4610         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
4612 2018-10-29  Olivier Hainque  <hainque@adacore.com>
4614         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
4616 2018-10-29  Richard Biener  <rguenther@suse.de>
4618         PR tree-optimization/87790
4619         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
4620         (vect_make_slp_decision): Adjust.
4621         (vect_slp_analyze_bb_1): Likewise.
4622         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
4623         edges.
4625 2018-10-29  Richard Biener  <rguenther@suse.de>
4627         PR tree-optimization/87785
4628         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
4629         and processing.
4630         (vect_build_slp_tree): Likewise.
4631         (vect_gather_slp_loads): New function.
4632         (vect_analyze_slp_instance): Gather loads separately from the
4633         SLP tree build.
4635 2018-10-29  Martin Liska  <mliska@suse.cz>
4637         * Makefile.in: Make dependency to json.o.
4638         * doc/gcov.texi: Document new JSON format, remove
4639         old intermediate format documentation.
4640         * gcov.c (struct function_info): Come up with m_name and
4641         m_demangled_name.
4642         (function_info::function_info): Initialize it.
4643         (function_info::~function_info): Release it.
4644         (main): Rename flag_intermediate_format to flag_json_format.
4645         (print_usage): Describe --json-format.
4646         (process_args): Set flag_json_format.
4647         (output_intermediate_line): Remove.
4648         (output_intermediate_json_line): Likewise.
4649         (get_gcov_intermediate_filename): Return new extension
4650         ".gcov.json.gz".
4651         (output_intermediate_file): Implement JSON emission.
4652         (output_json_intermediate_file): Implement JSON emission.
4653         (generate_results): Use ::get_name for function name.
4654         Handle JSON output file.
4655         (read_graph_file): Use ::get_name instead of cplus_demangle.
4656         (read_count_file): Likewise.
4657         (solve_flow_graph): Likewise.
4658         (add_line_counts): Likewise.
4659         (accumulate_line_counts): Use new flag_json_format.
4660         (output_function_details): Use ::get_name instead of cplus_demangle.
4661         (output_lines): Likewise.
4662         * json.cc (test_writing_literals): Add new tests.
4663         * json.h (class literal): Add new boolean constructor.
4665 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
4667         PR rtl-optimization/87701
4668         PR rtl-optimization/87780
4669         * combine.c (make_more_copies): Rewrite.
4671 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
4673         * doc/generic.texi (ABSU_EXPR): Document.
4674         * match.pd (absu(x)*absu(x) -> x*x): Handle.
4675         (absu(absu(X)) -> absu(X)): Likewise.
4676         (absu(-X) -> absu(X)): Likewise.
4677         (absu(X)  where X is nonnegative -> X): Likewise.
4679 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
4681         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
4682         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
4683         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
4684         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
4685         (s-tm-texi): Also check timestamp on d-target.def.
4686         (generated_files): Add TM_D_H and d-target-hooks-def.h.
4687         (build/genhooks.o): Also depend on D_TARGET_DEF.
4688         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
4689         variables.
4690         * config/aarch64/aarch64-d.c: New file.
4691         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
4692         Define.
4693         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
4694         prototype.
4695         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
4696         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
4697         * config/arm/arm-d.c: New file.
4698         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
4699         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
4700         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4701         * config/arm/t-arm (arm-d.o): New rule.
4702         * config/default-d.c: New file.
4703         * config/glibc-d.c: New file.
4704         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4705         * config/i386/i386-d.c: New file.
4706         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
4707         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
4708         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4709         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
4710         * config/i386/t-i386 (i386-d.o): New rule.
4711         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4712         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4713         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
4714         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4715         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4716         * config/mips/mips-d.c: New file.
4717         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
4718         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
4719         * config/mips/t-mips (mips-d.o): New rule.
4720         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4721         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4722         * config/powerpcspe/powerpcspe-d.c: New file.
4723         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
4724         New prototype.
4725         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4726         Support GNU D by using 0 as the language type.
4727         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
4728         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
4729         * config/riscv/riscv-d.c: New file.
4730         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
4731         prototype.
4732         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
4733         * config/riscv/t-riscv (riscv-d.o): New rule.
4734         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4735         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4736         * config/rs6000/rs6000-d.c: New file.
4737         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
4738         prototype.
4739         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4740         Support GNU D by using 0 as the language type.
4741         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
4742         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
4743         * config/s390/s390-d.c: New file.
4744         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
4745         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
4746         * config/s390/t-s390 (s390-d.o): New rule.
4747         * config/sparc/sparc-d.c: New file.
4748         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
4749         prototype.
4750         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
4751         * config/sparc/t-sparc (sparc-d.o): New rule.
4752         * config/t-glibc (glibc-d.o): New rule.
4753         * configure: Regenerated.
4754         * configure.ac (tm_d_file): New variable.
4755         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
4756         * doc/contrib.texi (Contributors): Add self for the D frontend.
4757         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
4758         * doc/install.texi (Configuration): Mention libphobos as an option for
4759         --enable-shared.  Mention d as an option for --enable-languages.
4760         (Testing): Mention check-d as a target.
4761         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
4762         name suffixes.  Mention d as a -x option.
4763         * doc/sourcebuild.texi (Top Level): Mention libphobos.
4764         * doc/standards.texi (Standards): Add section on D language.
4765         * doc/tm.texi: Regenerated.
4766         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
4767         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
4768         * dwarf2out.c (is_dlang): New function.
4769         (gen_compile_unit_die): Use DW_LANG_D for D.
4770         (declare_in_namespace): Return module die for D, instead of adding
4771         extra declarations into the namespace.
4772         (gen_namespace_die): Generate DW_TAG_module for D.
4773         (gen_decl_die): Handle CONST_DECLSs for D.
4774         (dwarf2out_decl): Likewise.
4775         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
4776         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
4777         kinds of aggregates.
4778         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
4779         * genhooks.c: Include d/d-target.def.
4781 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
4783         PR target/85669
4784         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
4785         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
4786         (STACK_DYNAMIC_OFFSET): Likewise.
4788 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
4790         PR target/80024
4791         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
4792         error message.
4794 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
4796         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
4797         return type and other typos.
4799 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4801         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
4802         a shorter sequence with fewer branches.
4803         (emit_final_str_compare_gpr): Ditto.
4805 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4807         * config/rs6000/tmmintrin.h: New file.
4808         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
4810 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4812         * config/rs6000/mmintrin.h: Enable 32bit compilation.
4813         * config/rs6000/xmmintrin.h: Likewise.
4815 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4817         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
4819 2018-10-26  Richard Biener  <rguenther@suse.de>
4821         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
4822         and wrapper.
4823         (vect_mark_slp_stmts_relevant): Likewise.
4824         (vect_detect_hybrid_slp_stmts): Likewise.
4825         (vect_bb_slp_scalar_cost): Likewise.
4826         (vect_remove_slp_scalar_calls): Likewise.
4828 2018-10-26  Jan Hubicka  <jh@suse.cz>
4830         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
4831         (warn_types_mismatch): Fix walk of DECL_NAME.
4832         (odr_types_equivalent_p): Fix overactive assert.
4834 2018-10-26  Richard Biener  <rguenther@suse.de>
4836         PR tree-optimization/87105
4837         * tree-vectorizer.h (_slp_tree::refcnt): New member.
4838         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
4839         refcnt.
4840         (vect_create_new_slp_node): Initialize refcnt to one.
4841         (bst_traits): Move.
4842         (scalar_stmts_set_t, bst_fail): Remove.
4843         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
4844         (vect_build_slp_tree): Add bst_map argument and lookup
4845         already created SLP nodes.
4846         (vect_print_slp_tree): Handle a SLP graph, print SLP node
4847         addresses.
4848         (vect_slp_rearrange_stmts): Handle a SLP graph.
4849         (vect_analyze_slp_instance): Adjust and free SLP nodes from
4850         the CSE map.  Fix indenting.
4851         (vect_schedule_slp_instance): Add short-cut.
4853 2018-10-26  Martin Liska  <mliska@suse.cz>
4855         PR testsuite/86158
4856         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
4857         addr_expr and not with pointers.
4859 2018-10-26  Jan Hubicka  <jh@suse.cz>
4861         * tree.c (free_lang_data_in_type): Only check main variants.
4862         * ipa-devirt.c (warn_odr): Make static.
4863         (types_same_for_odr): Drop strict variant.
4864         (types_odr_comparable): Likewise.
4865         (odr_or_derived_type_p): Look for main variants.
4866         (odr_name_hasher::equal): Cleanup comment.
4867         (odr_subtypes_equivalent): Add warn and warned arguments; check main
4868         variants.
4869         (type_variants_equivalent_p): break out from ...
4870         (odr_types_equivalent): ... here; go for main variants where needed.
4871         (warn_odr): ... here; turn static.
4872         (warn_types_mismatch): Compare mangled names of main variants.
4873         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
4874         (type_with_linkage_p): Sanity check that we look at main variant.
4875         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
4876         * tree.h (types_same_for_odr): Drop strict argument.
4878 2018-10-26  Richard Biener  <rguenther@suse.de>
4880         PR tree-optimization/87746
4881         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
4882         Simplify and fix WRT strided store groups with size not
4883         equal to step in element count.
4884         (vect_analyze_group_access_1): Dump the whole group.
4886 2018-10-25  Carl Love  <cel@us.ibm.com>
4888         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
4889         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
4890         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
4891         precicion entry for each overloaded builtin.
4892         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
4893         VSCEDPUO): Rename overloaded name.
4894         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
4895         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
4896         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
4897         define_expand for xscmpexqp instruction.
4898         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
4900 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4901             Jinsong Ji <jji@us.ibm.com>
4903         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
4904         function with vec_sl.
4905         (_mm_slli_epi32): Likewise.
4906         (_mm_slli_epi64): Likewise.
4907         (_mm_srai_epi16): Replace deprecated function with vec_sra.
4908         (_mm_srai_epi32): Likewise.
4909         (_mm_srli_epi16): Replace deprecated function with vec_sr.
4910         (_mm_srli_epi32): Likewise.
4911         (_mm_srli_epi64): Likewise.
4912         (_mm_sll_epi16): Replace deprecated function with vec_sl.
4913         (_mm_sll_epi32): Likewise.
4914         (_mm_sll_epi64): Likewise.
4915         (_mm_sra_epi16): Replace deprecated function with vec_sra.
4916         (_mm_sra_epi32): Likewise.
4917         (_mm_srl_epi16): Replace deprecated function with vec_sr.
4918         (_mm_srl_epi32): Likewise.
4919         (_mm_srl_epi64): Likewise.
4921 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4922             Jinsong Ji <jji@us.ibm.com>
4924         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4925         comparison operators with vec_cmp* for compatibility due to
4926         unfortunate history; clean up formatting and use types more
4927         appropriately.
4928         (_mm_sll_epi32): Likewise.
4929         (_mm_sll_epi64): Likewise.
4930         (_mm_srl_epi16): Likewise.
4931         (_mm_srl_epi32): Likewise.
4932         (_mm_srl_epi64): Likewise.
4934 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4935             Jinsong Ji <jji@us.ibm.com>
4937         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4938         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4939         __vector __bool int.  Use vec_cmpgt in preference to deprecated
4940         function vec_vcmpgtfp.
4941         (_mm_max_ps): Likewise.
4943 2018-10-25  Jeff Law  <law@redhat.com>
4945         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4946         if returning false.
4948 2018-10-25  Martin Sebor  <msebor@redhat.com>
4950         * doc/extend.texi (aligned): Expand attribute description.
4951         (Alignment): Rename section.  Discuss function arguments.
4953 2018-10-25  Jan Hubicka  <jh@suse.cz>
4955         * ipa-devirt.c (main_odr_variant): Remove.
4956         (hash_odr_name, types_same_for_odr, types_odr_comparable,
4957         odr_name_hasher::equal, odr_subtypes_equivalent_p):
4958         Drop use of main_odr_variant.
4959         (add_type_duplicate): Silence confused warnings on integer types.
4960         (get_odr_type): Always look for main variant.
4961         (register_odr_type): Simplify.
4963 2018-10-25  Richard Biener  <rguenther@suse.de>
4965         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4966         Initialize ng to silence error with release checking bootstrap.
4968 2018-10-25  Richard Biener  <rguenther@suse.de>
4970         * tree-if-conv.c: Include tree-ssa-sccvn.h.
4971         (tree_if_conversion): Run CSE on the if-converted loop body.
4973 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4975         * config/s390/constraints.md (ZL): New constraint.
4976         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4977         operands.
4978         * config/s390/s390.md (movdi_larl): Remove.
4979         (movdi_64): Add the LARL alternative.
4981 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4983         PR bootstrap/87747
4984         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4985         (RTX_CODE_HWINT_P): New macro.
4986         (rtx_code_size): Use RTX_CODE_HWINT_P ().
4988 2018-10-25  Jan Hubicka  <jh@suse.cz>
4990         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4991         is anonymous.
4993 2018-10-25  Richard Biener  <rguenther@suse.de>
4995         PR tree-optimization/87665
4996         PR tree-optimization/87745
4997         * tree-vectorizer.h (get_earlier_stmt): Remove.
4998         (get_later_stmt): Pick up UID from the original non-pattern stmt.
5000 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
5002         * options.texi (Deprecated): Move list to Var section.
5004 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
5005             Jinsong Ji <jji@us.ibm.com>
5007         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
5008         __vector long to __vector long long.
5009         (_mm_cvtpd_ps): Likewise.
5010         (_mm_cvttpd_epi32): Likewise.
5011         (_mm_cvtpi32_pd): Likewise.
5012         (_mm_unpackhi_epi64): Likewise.
5013         (_mm_unpacklo_epi64): Likewise.
5015 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
5017         PR rtl-optimization/87720
5018         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
5020 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
5022         * gimple-ssa-isolate-paths.c
5023         (find_implicit_erroneous_behavior): Do not change code if the
5024         pass is running for warnings only.
5025         (find_explicit_erroneous_behavior): Likewise.
5027 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
5029         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
5030         Define as rs6000_mangle_decl_assembler_name.
5031         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
5032         long double to IEEE long double, switch the names of the long
5033         double built-in functions to be <func>f128 instead of <func>l.
5035 2018-10-24  Martin Sebor  <msebor@redhat.com>
5037         * doc/extend.texi (nonnull): List no-argument form.  Reference
5038         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
5040 2018-10-24  Richard Biener  <rguenther@suse.de>
5042         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
5044 2018-10-24  Martin Liska  <mliska@suse.cz>
5046         PR tree-optimization/84436
5047         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
5048         Remove.
5049         (switch_conversion::contains_linear_function_p): New.
5050         (switch_conversion::build_one_array): Support linear
5051         transformation on input.
5052         * tree-switch-conversion.h (struct switch_conversion): Add
5053         contains_linear_function_p declaration.
5055 2018-10-24  Richard Biener  <rguenther@suse.de>
5057         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
5058         if its argument is CONSTANT_CLASS_P.
5060 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
5062         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
5063         it is wrong for forward declarations.
5065 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5067         * config/s390/s390.c (s390_check_qrst_address): Add the missing
5068         SYMBOL_REF_P () check.
5070 2018-10-24  Richard Biener  <rguenther@suse.de>
5072         PR tree-optimization/87105
5073         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
5074         dump classification.
5075         (vect_analyze_data_ref_accesses): Handle duplicate loads and
5076         stores by splitting the affected group after the fact.
5077         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
5078         fail the SLP build because of size constraints.
5080 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5082         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
5083         * configure: Regenerate.
5084         * config.in: Regenerate.
5085         * varasm.c (mergeable_string_section): Use readonly_data_section
5086         if linker doesn't support SHF_MERGE with alignment > 8.
5087         (mergeable_constant_section): Likewise.
5089 2018-10-24  Richard Biener  <rguenther@suse.de>
5091         PR tree-optimization/84013
5092         * tree-ssa-structalias.c (struct msdi_data): New struct for
5093         marshalling data to walk_stmt_load_store_ops.
5094         (maybe_set_dependence_info): Refactor as callback for
5095         walk_stmt_load_store_ops.
5096         (compute_dependence_clique): Set restrict info on all stmt kinds.
5098 2018-10-24  Martin Liska  <mliska@suse.cz>
5100         * cgraph.c (cgraph_node::dump):
5101         Remove reduntant dumps and make tp_first_run dump more compact.
5103 2018-10-24  Richard Biener  <rguenther@suse.de>
5105         PR tree-optimization/87665
5106         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
5107         to reflect reality.
5109 2018-10-12  Jeff Law  <law@redhat.com>
5111         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
5112         for H8/S.
5114 2018-10-23  Richard Biener  <rguenther@suse.de>
5116         * tree-vrp.c (add_assert_info): Guard dump_printf with
5117         dump_enabled_p.
5118         * gimple-ssa-evrp-analyze.c
5119         (evrp_range_analyzer::record_ranges_from_incoming_edge):
5120         Use value_range::ignore_equivs_equal_p.
5122 2018-10-23  Richard Biener  <rguenther@suse.de>
5124         PR tree-optimization/87105
5125         PR tree-optimization/87608
5126         * passes.def (pass_all_early_optimizations): Add early phi-opt
5127         after dce.
5128         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5129         addition to debug stmts.
5130         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5131         and abs replacement early.
5132         * tree-cfg.c (gimple_empty_block_p): Likewise.
5134 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
5136         PR target/86383
5137         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5138         specified to configure.
5139         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5141 2018-10-23  Richard Biener  <rguenther@suse.de>
5143         PR tree-optimization/87700
5144         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5146 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
5148         PR target/87674
5149         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5150         second argument from __mmask16 to __mmask8.
5151         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5152         _mm_mask_packs_epi32): Likewise.
5153         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5154         Likewise.
5155         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
5157 2018-10-23  Richard Biener  <rguenther@suse.de>
5159         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5161 2018-10-23  Richard Biener  <rguenther@suse.de>
5163         PR tree-optimization/86144
5164         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5165         over simd attribute.
5167 2018-10-23  Richard Biener  <rguenther@suse.de>
5169         PR tree-optimization/87693
5170         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5171         the case we do not find the taken edge.
5173 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
5174             Jinsong Ji  <jji@us.ibm.com>
5176         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5177         (_mm_store_pd): Use unaligned vector type for pointer cast.
5178         (_mm_maskmoveu_si128): Likewise.
5179         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5180         (_mm_store_ps): Use unaligned vector type for pointer cast.
5182 2018-10-22  Paul Koning  <ni1d@arrl.net>
5184         * symtab.c (symtab_node::increase_alignment): Correct max
5185         alignment check.
5187 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
5189         PR tree-optimization/87633
5190         * match.pd: Do not generate unordered integer comparisons.
5192 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5194         PR rtl-optimization/87600
5195         * combine.c: Add include of expr.h.
5196         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5197         register to a pseudo.
5198         (make_more_copies): New function, add a copy to a new pseudo after
5199         the moves from hard registers into pseudos.
5200         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5201         later.  Call make_more_copies.
5203 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
5205         * lra-constraints.c (process_alt_operands): New local array,
5206         matching_early_clobber.  Check matching_early_clobber before
5207         decrementing reject, and set matching_early_clobber after.
5209 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5211         PR target/87598
5212         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5213         call output_addr_const and hope for the best.
5215 2018-10-22  Richard Biener  <rguenther@suse.de>
5217         * gimple-ssa-evrp-analyze.c
5218         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5219         smarter about what ranges to use.
5220         * tree-vrp.c (add_assert_info): Dump here.
5221         (register_edge_assert_for_2): Instead of here at multiple but
5222         not all places.
5224         * gcc.dg/tree-ssa/evrp12.c: New testcase.
5225         * gcc.dg/predict-6.c: Adjust.
5226         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5227         * gcc.dg/tree-ssa/vrp02.c: Likewise.
5228         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5230 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
5231         Richard Biener  <rguenther@suse.de>
5233         * bitmap.h: Update data structure documentation, including a
5234         description of bitmap views as either linked-lists or splay trees.
5235         (struct bitmap_element_def): Update comments for splay tree bitmaps.
5236         (struct bitmap_head_def): Likewise.
5237         (bitmap_list_view, bitmap_tree_view): New prototypes.
5238         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5239         tree_form fields.
5240         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5241         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5242         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5243         released bitmap element here.
5244         (bitmap_element_free): Remove.
5245         (bitmap_elt_clear_from): Work on splay tree bitmaps.
5246         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
5247         this function similar ones such that linked-list bitmap implementation
5248         functions are grouped.
5249         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5250         and moved for grouping.
5251         (bitmap_list_insert_element_after): Renamed from
5252         bitmap_elt_insert_after, and moved for grouping.
5253         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5254         (bitmap_tree_link_left, bitmap_tree_link_right,
5255         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5256         bitmap_tree_link_element, bitmap_tree_unlink_element,
5257         bitmap_tree_find_element): New functions for splay-tree bitmap
5258         implementation.
5259         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5260         Renamed and moved, see above entries.
5261         (bitmap_tree_listify_from): New function to convert part of a splay
5262         tree bitmap to a linked-list bitmap.
5263         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5264         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5265         (bitmap_find_bit): Remove.
5266         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5267         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5268         Handle splay tree bitmaps.
5269         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5270         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5271         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5272         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5273         bitmap_intersect_compl_p, bitmap_ior_and_compl,
5274         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5275         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
5276         corresponding changes to use linked-list specific bitmap_element
5277         manipulation functions as applicable for efficiency.
5278         (bitmap_tree_to_vec): New function.
5279         (debug_bitmap_elt_file): New function split out from ...
5280         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
5281         (bitmap_print): Likewise.
5283         PR tree-optimization/63155
5284         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5285         SSA edge worklists.
5286         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5287         in tree-view.
5289 2018-10-22  Martin Liska  <mliska@suse.cz>
5291         PR tree-optimization/87686
5292         Revert
5293         2018-08-29  Martin Liska  <mliska@suse.cz>
5295         * tree-switch-conversion.c (switch_conversion::expand):
5296         Strenghten assumption about gswitch statements.
5298 2018-10-22  Martin Liska  <mliska@suse.cz>
5300         * ipa-icf.c (sem_item::compare_attributes): Remove.
5301         (sem_item::compare_referenced_symbol_properties): Use
5302         attribute_list_equal instead.
5303         (sem_function::equals_wpa): Likewise.
5304         * ipa-icf.h: Remove compare_attributes.
5306 2018-10-22  Richard Biener  <rguenther@suse.de>
5308         PR middle-end/87682
5309         * mem-stats.h (mem_usage::operator==): Fix pasto.
5311 2018-10-22  Richard Biener  <rguenther@suse.de>
5313         PR tree-optimization/87640
5314         * tree-vrp.c (set_value_range_with_overflow): Decompose
5315         incomplete result.
5316         (extract_range_from_binary_expr_1): Adjust.
5318 2018-10-22  Martin Jambor  <mjambor@suse.cz>
5320         * tree-eh.h (stmt_could_throw_p): Add function parameter.
5321         (stmt_can_throw_external): Likewise.
5322         (stmt_can_throw_internal): Likewise.
5323         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5324         (lower_eh_constructs_2): Likewise.
5325         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5326         (stmt_can_throw_external): Likewise.
5327         (stmt_can_throw_internal): Likewise.
5328         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5329         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5330         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5331         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5332         (pass_lower_eh_dispatch::execute): Pass cfun to
5333         stmt_can_throw_external.
5334         (cleanup_empty_eh): Likewise.
5335         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
5336         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
5337         stmt_can_throw_external instead of pushing it to cfun.
5338         (symbol_table::create_edge): Likewise.
5339         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
5340         stmt_can_throw_internal.
5341         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
5342         to stmt_could_throw_p.
5343         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
5344         stmt_can_throw_internal.
5345         (pass_store_merging::execute): Likewise.
5346         * gimple-ssa-strength-reduction.c
5347         (find_candidates_dom_walker::before_dom_children): Pass cfun to
5348         stmt_could_throw_p.
5349         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
5350         stmt_can_throw_internal.
5351         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
5352         to stmt_can_throw_external.
5353         (check_stmt): Pass cfun to stmt_could_throw_p.
5354         (check_stmt): Pass cfun to stmt_can_throw_external.
5355         (pass_nothrow::execute): Likewise.
5356         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
5357         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
5358         stmt_can_throw_internal.
5359         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
5360         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
5361         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
5362         * tree-complex.c (expand_complex_libcall): Pass cfun to
5363         stmt_could_throw_p and to stmt_can_throw_internal.
5364         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
5365         * tree-inline.c (copy_edges_for_bb): Likewise.
5366         (maybe_move_debug_stmts_to_successors): Likewise.
5367         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
5368         stmt_could_throw_p.
5369         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
5370         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
5371         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
5372         stmt_can_throw_internal.
5373         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
5374         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
5375         stmt_could_throw_p.
5376         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
5377         stmt_can_throw_internal.
5378         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
5379         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
5380         stmt_could_throw_p.
5381         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
5382         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
5383         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5384         (convert_mult_to_fma_1): Likewise.
5385         (convert_to_divmod): Likewise.
5386         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
5387         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
5388         * tree-ssa-propagate.c
5389         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
5390         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
5391         (maybe_optimize_range_tests): Likewise.
5392         (linearize_expr_tree): Likewise.
5393         (reassociate_bb): Likewise.
5394         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5395         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
5396         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
5397         (handle_char_store): Likewise.
5398         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
5399         stmt_can_throw_internal.
5400         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
5401         stmt_could_throw_p.
5402         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5403         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
5404         (vectorizable_simd_clone_call): Likewise.
5405         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
5406         (gimple_stringop_fixed_value): Likewise.
5408 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
5410         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
5411         literal pool references.
5412         (s390_check_qrst_address): Adapt to the new behavior of
5413         s390_loadrelative_operand_p ().
5415 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
5417         PR target/72782
5418         * config/i386/sse.md (*andnot<mode>3_bcst): New.
5420 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
5422         PR target/72782
5423         * config/i386/sse.md (*<code><mode>3_bcst): New.
5425 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
5427         PR target/72782
5428         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
5429         V4DI, V16SI and V8DI.
5430         (*sub<mode>3<mask_name>_bcst): New.
5431         (*add<mode>3<mask_name>_bcst): Likewise.
5433 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5434             Jinsong Ji  <jji@us.ibm.com>
5436         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
5437         __m64 with __vector unsigned long long for compatibility.
5438         (_mm_movemask_epi8): Likewise.
5439         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
5440         (_mm_cvttps_pi32): Likewise.
5441         (_mm_cvtpi32_ps): Likewise.
5442         (_mm_cvtps_pi16): Likewise.
5443         (_mm_loadh_pi): Likewise.
5444         (_mm_storeh_pi): Likewise.
5445         (_mm_movehl_ps): Likewise.
5446         (_mm_movelh_ps): Likewise.
5447         (_mm_loadl_pi): Likewise.
5448         (_mm_storel_pi): Likewise.
5449         (_mm_movemask_ps): Likewise.
5450         (_mm_shuffle_pi16): Likewise.
5452 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5454         PR target/72782
5455         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
5456         __builtin_ia32_vfnmsubpd512_mask.
5457         (_mm512_mask_fnmsub_round_pd): Likewise.
5458         (_mm512_fnmsub_pd): Likewise.
5459         (_mm512_mask_fnmsub_pd): Likewise.
5460         (_mm512_maskz_fnmsub_round_pd): Use
5461         __builtin_ia32_vfnmsubpd512_maskz.
5462         (_mm512_maskz_fnmsub_pd): Likewise.
5463         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
5464         (_mm512_mask_fnmsub_round_ps): Likewise.
5465         (_mm512_fnmsub_ps): Likewise.
5466         (_mm512_mask_fnmsub_ps): Likewise.
5467         (_mm512_maskz_fnmsub_round_ps): Use
5468         __builtin_ia32_vfnmsubps512_maskz.
5469         (_mm512_maskz_fnmsub_ps): Likewise.
5470         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
5471         __builtin_ia32_vfnmsubpd256_mask.
5472         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
5473         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5474         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
5475         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5476         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5477         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
5478         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
5479         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
5480         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
5481         __builtin_ia32_vfnmsubpd.
5482         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
5483         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
5484         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
5485         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
5486         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
5487         * config/i386/i386-builtin.def: Add
5488         __builtin_ia32_vfnmsubpd256_mask,
5489         __builtin_ia32_vfnmsubpd256_maskz,
5490         __builtin_ia32_vfnmsubpd128_mask,
5491         __builtin_ia32_vfnmsubpd128_maskz,
5492         __builtin_ia32_vfnmsubps256_mask,
5493         __builtin_ia32_vfnmsubps256_maskz,
5494         __builtin_ia32_vfnmsubps128_mask,
5495         __builtin_ia32_vfnmsubps128_maskz,
5496         __builtin_ia32_vfnmsubpd512_mask,
5497         __builtin_ia32_vfnmsubpd512_maskz,
5498         __builtin_ia32_vfnmsubps512_mask,
5499         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
5500         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
5501         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
5502         __builtin_ia32_vfnmsubpd256.
5503         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
5504         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
5505         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
5506         Likewise.
5507         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
5508         Likewise.
5509         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
5510         Likewise.
5511         (fmai_vmfnmsub_<mode><round_name>): Likewise.
5513 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5515         PR target/72782
5516         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
5517         __builtin_ia32_vfnmaddpd512_mask.
5518         (_mm512_mask_fnmadd_round_pd): Likewise.
5519         (_mm512_fnmadd_pd): Likewise.
5520         (_mm512_mask_fnmadd_pd): Likewise.
5521         (_mm512_maskz_fnmadd_round_pd): Use
5522         __builtin_ia32_vfnmaddpd512_maskz.
5523         (_mm512_maskz_fnmadd_pd): Likewise.
5524         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
5525         (_mm512_mask_fnmadd_round_ps): Likewise.
5526         (_mm512_fnmadd_ps): Likewise.
5527         (_mm512_mask_fnmadd_ps): Likewise.
5528         (_mm512_maskz_fnmadd_round_ps): Use
5529         __builtin_ia32_vfnmaddps512_maskz.
5530         (_mm512_maskz_fnmadd_ps): Likewise.
5531         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
5532         __builtin_ia32_vfnmaddpd256_mask.
5533         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
5534         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
5535         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
5536         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5537         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5538         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
5539         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
5540         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
5541         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
5542         __builtin_ia32_vfnmaddpd.
5543         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
5544         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
5545         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
5546         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
5547         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
5548         * config/i386/i386-builtin.def: Add
5549         __builtin_ia32_vfnmaddpd256_mask,
5550         __builtin_ia32_vfnmaddpd256_maskz,
5551         __builtin_ia32_vfnmaddpd128_mask,
5552         __builtin_ia32_vfnmaddpd128_maskz,
5553         __builtin_ia32_vfnmaddps256_mask,
5554         __builtin_ia32_vfnmaddps256_maskz,
5555         __builtin_ia32_vfnmaddps128_mask,
5556         __builtin_ia32_vfnmaddps128_maskz,
5557         __builtin_ia32_vfnmaddpd512_mask,
5558         __builtin_ia32_vfnmaddpd512_maskz,
5559         __builtin_ia32_vfnmaddps512_mask,
5560         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
5561         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
5562         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
5563         __builtin_ia32_vfnmaddpd256.
5564         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
5565         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
5566         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
5567         Likewise.
5568         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
5569         Likewise.
5570         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
5571         Likewise.
5572         (fmai_vmfnmadd_<mode><round_name>): Likewise.
5574 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5576         PR target/72782
5577         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
5578         __builtin_ia32_vfmsubpd512_mask.
5579         (_mm512_mask_fmsub_round_pd): Likewise.
5580         (_mm512_fmsub_pd): Likewise.
5581         (_mm512_mask_fmsub_pd): Likewise.
5582         (_mm512_maskz_fmsub_round_pd): Use
5583         __builtin_ia32_vfmsubpd512_maskz.
5584         (_mm512_maskz_fmsub_pd): Likewise.
5585         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
5586         (_mm512_mask_fmsub_round_ps): Likewise.
5587         (_mm512_fmsub_ps): Likewise.
5588         (_mm512_mask_fmsub_ps): Likewise.
5589         (_mm512_maskz_fmsub_round_ps): Use
5590         __builtin_ia32_vfmsubps512_maskz.
5591         (_mm512_maskz_fmsub_ps): Likewise.
5592         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
5593         __builtin_ia32_vfmsubpd256_mask.
5594         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
5595         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5596         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
5597         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5598         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5599         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
5600         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
5601         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
5602         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
5603         __builtin_ia32_vfmsubpd.
5604         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
5605         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
5606         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
5607         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
5608         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
5609         * config/i386/i386-builtin.def: Add
5610         __builtin_ia32_vfmsubpd256_mask,
5611         __builtin_ia32_vfmsubpd256_maskz,
5612         __builtin_ia32_vfmsubpd128_mask,
5613         __builtin_ia32_vfmsubpd128_maskz,
5614         __builtin_ia32_vfmsubps256_mask,
5615         __builtin_ia32_vfmsubps256_maskz,
5616         __builtin_ia32_vfmsubps128_mask,
5617         __builtin_ia32_vfmsubps128_maskz,
5618         __builtin_ia32_vfmsubpd512_mask,
5619         __builtin_ia32_vfmsubpd512_maskz,
5620         __builtin_ia32_vfmsubps512_mask,
5621         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
5622         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
5623         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
5624         __builtin_ia32_vfmsubpd256.
5625         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
5626         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
5627         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
5628         Likewise.
5629         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
5630         Likewise.
5631         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
5632         Likewise.
5633         (fmai_vmfmsub_<mode><round_name>): Likewise.
5635 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5637         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
5638         Remove plus.  Renamed to ...
5639         (*sub<mode>3<mask_name>_bcst): This.
5640         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
5641         (*add<mode>3<mask_name>_bcst): This.
5643 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5645         PR target/72782
5646         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
5648 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5650         PR target/87662
5651         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
5652         (_mm_or_epi32): Likewise.
5653         (_mm256_xor_epi32): Likewise.
5654         (_mm_xor_epi32): Likewise.
5655         (_mm256_or_epi64): Likewise.
5656         (_mm_or_epi64): Likewise.
5657         (_mm256_xor_epi64): Likewise.
5658         (_mm_xor_epi64): Likewise.
5660 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
5662         PR target/72782
5663         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
5665 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
5667         PR middle-end/87647
5668         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
5670 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
5672         * doc/ux.texi: Move @section directly after @node.
5674 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
5676         PR middle-end/85488
5677         PR middle-end/87649
5678         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
5679         depend closely nested inside of loop with ordered clause with
5680         a parameter.
5682 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
5684         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
5685         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
5686         * doc/ux.texi: New file.
5688 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
5690         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
5691         be the first CR field allocated.
5693 2018-10-19  Richard Biener  <rguenther@suse.de>
5695         PR target/87657
5696         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
5697         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
5699 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
5701         PR target/72782
5702         * config/i386/sse.md
5703         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
5704         (*add<mode>3<mask_name>_bcst_2): Likewise.
5706 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
5708         * config/i386/sse.md
5709         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5710         Replace nonimmediate_operand with register_operand.
5711         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5712         Likewise.
5713         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5714         Likewise.
5716 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5718         PR rtl-optimization/87596
5719         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
5720         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
5721         for instructions in FROM..TO range.
5723 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
5725         * cfgexpand.c (expand_one_var): Use specific wording in error message
5726         for non-local frame variables.
5727         * stor-layout.c (layout_decl): Do not issue a warning for them.
5729 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
5731         * haifa-sched.c (priority): Add force_recompute parameter.
5732         (apply_replacement): Call priority () with force_recompute = true.
5733         (restore_pattern): Likewise.
5735 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5737         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
5738         HOST_BITS_PER_WIDE_INT.
5739         (test_vector_ops_duplicate): Likewise.
5741 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5743         PR target/72782
5744         * config/i386/sse.md (VF_AVX512): New.
5745         (avx512bcst): Likewise.
5746         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5747         Likewise.
5748         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5749         Likewise.
5750         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5751         Likewise.
5753 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
5755         * doc/invoke.texi (-dumpversion): Improve grammar.
5756         (-dumpfullversion): Make more consistent with -dumpversion.
5758 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
5760         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
5761         Set JUMP_LABEL to the jump insn.
5762         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
5763         Predict emitted jump and add label to jump insn.
5765 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
5767         PR tree-optimization/87562
5768         * input.c (get_substring_ranges_for_loc): Use
5769         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
5770         getting the linemap for the endpoint.  Verify that it's either
5771         in the same linemap as the start point's spelling location, or
5772         at least in the same file.
5774 2018-10-18  Richard Biener  <rguenther@suse.de>
5776         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
5777         feed width-specific load/store costs through ix86_vec_cost.
5778         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
5779         (k8_cost): Likewise.
5780         (bdver_cost): Likewise.
5781         (znver1_cost): Likewise.
5782         (btver1_cost): Likewise.
5783         (btver2_cost): Likewise.
5785 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5787         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
5788         to simplify subreg of vec_merge.
5790 2018-10-18  Richard Biener  <rguenther@suse.de>
5792         * config/i386/i386.c: Fix costing of vector FMA.
5794 2018-10-18  Richard Biener  <rguenther@suse.de>
5796         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
5797         and argument.
5798         (ix86_builtin_vectorization_cost): For vec_construct properly
5799         cost insertion into SSE regs.
5800         (...): Adjust calls to ix86_vec_cost.
5802 2018-10-18  Richard Biener  <rguenther@suse.de>
5804         PR middle-end/87087
5805         Revert
5806         2018-02-07  Richard Biener  <rguenther@suse.de>
5808         PR tree-optimization/84204
5809         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
5810         this place.
5812 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5814         PR target/87537
5815         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
5816         of vec_duplicate.
5817         (test_vector_ops_duplicate): Add test for a scalar subreg of a
5818         VEC_MERGE of a VEC_DUPLICATE.
5820 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5822         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
5823         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
5824         * doc/standards.texi (C Language): Document C2X.
5825         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
5826         (rl78_option_override): Handle "GNU C2X" language name.
5828 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5830         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
5831         Document C17 as published in 2018.
5833 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
5835         PR middle-end/87623
5836         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
5837         bail out if both sides do not have the same storage order.
5839 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5841         * bitmap.c (bitmap_head::dump): New.
5842         * bitmap.h (bitmap_head): Add dump().
5843         * gimple-ssa-evrp-analyze.c
5844         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
5845         (evrp_range_analyzer::set_ssa_range_info): Same.
5846         (evrp_range_analyzer::record_ranges_from_phis): Same.
5847         (evrp_range_analyzer::record_ranges_from_stmt): Same.
5848         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
5849         * gimple-ssa-sprintf.c (get_int_range): Same.
5850         (format_integer): Same.
5851         (sprintf_dom_walker::handle_gimple_call): Same.
5852         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
5853         (ipcp_vr_lattice::top_p): Same.
5854         (ipcp_vr_lattice::bottom_p): Same.
5855         (ipcp_vr_lattice::set_to_bottom): Same.
5856         (ipa_vr_operation_and_type_effects): Same.
5857         (propagate_vr_across_jump_function): Same.
5858         (ipcp_store_vr_results): Same.
5859         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
5860         (ipa_print_node_jump_functions_for_edge): Same.
5861         (ipa_get_value_range): Same.
5862         (ipa_compute_jump_functions_for_edge): Same.
5863         (ipa_write_jump_function): Same.
5864         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
5865         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
5866         Same.
5867         * vr-values.c (set_value_range_to_nonnegative): Same.
5868         (set_value_range_to_truthvalue): Same.
5869         (vr_values::get_value_range): Same.
5870         (vr_values::set_defs_to_varying): Same.
5871         (vr_values::update_value_range): Same.
5872         (symbolic_range_based_on_p): Same.
5873         (vr_values::op_with_boolean_value_range_p): Same.
5874         (vr_values::extract_range_for_var_from_comparison_expr): Same.
5875         (vr_values::extract_range_from_ssa_name): Same.
5876         (vr_values::extract_range_from_binary_expr): Same.
5877         (vr_values::extract_range_from_unary_expr): Same.
5878         (vr_values::extract_range_from_cond_expr): Same.
5879         (vr_values::extract_range_from_comparison): Same.
5880         (vr_values::check_for_binary_op_overflow): Same.
5881         (vr_values::extract_range_basic): Same.
5882         (vr_values::extract_range_from_assignment): Same.
5883         (compare_ranges): Same.
5884         (compare_range_with_value): Same.
5885         (vr_values::adjust_range_with_scev): Same.
5886         (vrp_valueize): Same.
5887         (vrp_valueize_1): Same.
5888         (vr_values::get_vr_for_comparison): Same.
5889         (vr_values::compare_name_with_value): Same.
5890         (vr_values::compare_names): Same.
5891         (vr_values::vrp_evaluate_conditional): Same.
5892         (find_case_label_ranges): Same.
5893         (vr_values::vrp_visit_switch_stmt): Same.
5894         (vr_values::extract_range_from_phi_node): Same.
5895         (vr_values::simplify_div_or_mod_using_ranges): Same.
5896         (vr_values::simplify_bit_ops_using_ranges): Same.
5897         (test_for_singularity): Same.
5898         (range_fits_type_p): Same.
5899         (vr_values::simplify_cond_using_ranges_1): Same.
5900         (vr_values::simplify_switch_using_ranges): Same.
5901         (vr_values::simplify_float_conversion_using_ranges): Same.
5902         (vr_values::two_valued_val_range_p): Same.
5903         (vr_values::add_equivalence): Move to value_range::equiv_add.
5904         * vr-values.h (vr_values::add_equivalence): Remove.
5905         (VR_INITIALIZER): Remove.
5906         * tree-vrp.c (value_range::set): New.
5907         (value_range::equiv_add): New.
5908         (value_range::value_range): New.
5909         (value_range::deep_copy): New.
5910         (value_range::check): New.
5911         (value_range::equal_p): New.
5912         (value_range::ignore_equivs_equal_p): New.
5913         (value_range::operator==): New.
5914         (value_range::operator!=): New.
5915         (value_range::symbolic_p): New.
5916         (value_range::numeric_p): New.
5917         (value_range::set_undefined): New.
5918         (value_range::set_varying): New.
5919         (value_range::may_contain_p): New.
5920         (value_range::equiv_clear): New.
5921         (value_range::singleton_p): New.
5922         (value_range::intersect): New.
5923         (value_range::dump): New.
5924         (value_range::set_and_canonicalize): New.
5925         (set_value_range): Adjust for value_range API.
5926         (set_value_range_to_undefined): Same.
5927         (set_value_range_to_varying): Same.
5928         (set_and_canonicalize_value_range): Same.
5929         (set_value_range_to_nonnull): Same.
5930         (set_value_range_to_null): Same.
5931         (range_is_null): Same.
5932         (range_is_nonnull): Same.
5933         (range_int_cst_p): Same.
5934         (range_int_cst_singleton_p): Same.
5935         (symbolic_range_p): Same.
5936         (range_includes_zero_p): Same.
5937         (value_range_constant_singleton): Same.
5938         (vrp_set_zero_nonzero_bits): Same.
5939         (ranges_from_anti_range): Same.
5940         (extract_range_into_wide_ints): Same.
5941         (extract_range_from_multiplicative_op): Same.
5942         (set_value_range_with_overflow): Same.
5943         (extract_range_from_binary_expr_1): Same.
5944         (extract_range_from_unary_expr): Same.
5945         (dump_value_range): Same.
5946         (debug_value_range): Same.
5947         (vrp_prop::check_array_ref): Same.
5948         (vrp_prop::check_mem_ref): Same.
5949         (vrp_prop::vrp_initialize): Same.
5950         (vrp_prop::visit_stmt): Same.
5951         (intersect_ranges): Same.
5952         (vrp_prop::visit_phi): Same.
5953         (vrp_prop::vrp_finalize): Same.
5954         (determine_value_range_1): Same.
5955         (determine_value_range): Same.
5956         (vrp_intersect_ranges_1): Rename to...
5957         (vrp_intersect_1): this.
5958         (vrp_intersect_ranges): Rename to...
5959         (value_range::intersect_helper): ...this.
5960         (vrp_meet_1): Rename to...
5961         (value_range::union_helper): ...this.
5962         (vrp_meet): Rename to...
5963         (value_range::union_): ...this.
5964         (copy_value_range): Remove.
5965         * tree-vrp.h (struct value_range): Rewrite into a proper class.
5966         (value_range::vrtype): New.
5967         (value_range::type): New.
5968         (value_range::equiv): New.
5969         (value_range::min): New.
5970         (value_range::max): New.
5971         (value_range::varying_p): New.
5972         (value_range::undefined_p): New.
5973         (value_range::null_p): New.
5974         (value_range::equiv_add): New.
5975         (copy_value_range): Remove.
5977 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
5979         * Makefile.in (SELFTEST_TARGETS): New.
5980         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5981         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5982         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5983         c/Make-lang.in.
5984         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5985         (selftest-c++-gdb, selftest-c++-valgrind): Move to
5986         cp/Make-lang.in.
5987         * configure: Regenerate.
5988         * configure.ac (selftest_languages): New.
5990 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5992         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5993         overflow wraps argument.
5994         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5995         wide_int_range_multiplicative_op.
5996         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5997         overflow wraps argument.
5998         (wide_int_range_multiplicative_op): Same.
5999         (wide_int_range_lshift): Same.
6000         (wide_int_range_div): Same.
6001         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
6002         (wide_int_range_lshift): Same.
6003         (wide_int_range_div): Same.
6005 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
6007         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
6008         use sign as argument.
6009         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
6010         wide_int_range_shift_undefined_p.
6012 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6014         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
6015         Rename to...
6016         (@despeculate_copy<ALLI_TI:mode>): ... This.
6017         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
6018         switch statement.
6020 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6022         * config.gcc: Obsolete *-*-solaris2.10*.
6023         * doc/install.texi (Specific, *-*-solaris2*): Document it.
6025 2018-10-12  Jeff Law  <law@redhat.com>
6027         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
6028         reg + sym +- const_int addressing modes.
6030 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
6032         * common.opt (fdiagnostics-minimum-margin-width=): New option.
6033         * diagnostic-show-locus.c (layout::layout): Apply the minimum
6034         margin width.
6035         (layout::start_annotation_line): Only print up to 3 of the
6036         margin character, to avoid touching the left-hand side.
6037         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
6038         minimum margin width, as set by test_diagnostic_context's ctor.
6039         (selftest::test_fixit_insert_containing_newline): Likewise.
6040         (selftest::test_fixit_insert_containing_newline_2): Likewise.
6041         (selftest::test_line_numbers_multiline_range): Clear
6042         dc.min_margin_width.
6043         * diagnostic.c (diagnostic_initialize): Initialize
6044         min_margin_width.
6045         * diagnostic.h (struct diagnostic_context): Add field
6046         "min_margin_width".
6047         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
6048         * opts.c (common_handle_option): Handle
6049         OPT_fdiagnostics_minimum_margin_width_.
6050         * selftest-diagnostic.c
6051         (selftest::test_diagnostic_context::test_diagnostic_context):
6052         Initialize min_margin_width to 6.
6053         * toplev.c (general_init): Initialize global_dc->min_margin_width.
6055 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
6057         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
6058         Fix usage of "error_at_rich_loc" in the comment.
6060 2018-10-15  Renlin Li  <renlin.li@arm.com>
6062         PR target/87563
6063         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
6064         if-conversioned loop when it contains ifn with types not
6065         supported by backend.
6066         * internal-fn.c (expand_direct_optab_fn): Add an assert.
6067         (direct_internal_fn_supported_p): New helper function.
6068         * internal-fn.h (direct_internal_fn_supported_p): Declare.
6070 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
6072         PR target/87572
6073         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6074         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6075         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6077 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
6079         PR tree-optimization/87022
6080         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
6081         bits in dist vector rather than the first one.
6083 2018-10-15  Richard Biener  <rguenther@suse.de>
6085         PR middle-end/87610
6086         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
6087         (visit_loadstore): When a used restrict tag escaped verify that
6088         the points-to solution of "other" pointers do not include
6089         escaped.
6090         (compute_dependence_clique): If a used restrict tag escaped
6091         communicated that down to visit_loadstore.
6093 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
6095         * config/s390/s390.c (s390_expand_vec_init): Force vector element
6096         into reg if it isn't a general operand.
6098 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
6100         PR target/87599
6101         * config/i386/sse.md (*vec_dupv2di): Add register source to
6102         movddup.
6104 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
6106         PR target/87572
6107         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6108         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
6109         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6110         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6112 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
6114         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
6115         (notice_args_size): Set it in the current trace if no insn that can
6116         throw internally has been seen yet.
6117         (connect_traces): When connecting args_size between traces, allow the
6118         incoming values not to match if there is an insn setting it before the
6119         first insn that can throw internally; in that case, force the creation
6120         of a CFI note on this latter insn.
6122 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
6124         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6125         the base class, because using the injected-class-name was not clearly
6126         specified until DR 176.
6128 2018-10-12  Paul Koning  <ni1d@arrl.net>
6130         * config/pdp11/pdp11.md (doloop_end): New expander.
6131         (doloop_end_insn): renamed from "doloop_end".
6132         (addqi3): New pattern.
6133         (subqi3): New pattern.
6134         * config/pdp11/predicates.md (incdec_operand): New predicate.
6136 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
6138         PR middle-end/81376
6139         * real.c (format_helper::can_represent_integral_type_p): New function
6140         * real.h (format_helper::can_represent_integral_type_p): Ditto.
6141         * match.pd: New pattern.
6143 2018-10-12  Alexandre Oliva <oliva@adacore.com>
6145         * configure.ac: Introduce --enable-large-address-aware
6146         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6147         * doc/install.texi: Document it.
6148         * configure, config.in: Rebuilt.
6149         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6150         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6151         (LINK_SPEC): Insert it.
6152         * config/i386/mingw-w64.h: Likewise.
6154         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6156 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
6158         PR rtl-optimization/87600
6159         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6161 2018-10-12  Paul Koning  <ni1d@arrl.net>
6163         * doc/md.texi (doloop_end): Document that the pattern code may
6164         need to check operand mode.
6166 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
6168         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6169         to zero-extend between int and floating-point registers.
6170         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6171         ldp into floating-point registers.  Add type and arch attributes.
6172         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6173         Use f_loads for type attribute.
6175 2018-10-11  Martin Sebor  <msebor@redhat.com>
6177         * doc/extend.texi (attribute packed): Correct typos.
6179 2018-10-11  Martin Sebor  <msebor@redhat.com>
6181         * doc/extend.texi (attribute flatten): Mention interaction with
6182         noinline.
6184 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
6186         PR target/87156
6187         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6188         Set new_decl virtual flag to zero.
6190 2018-10-11  Martin Sebor  <msebor@redhat.com>
6192         PR middle-end/87593
6193         * doc/extend.texi (attribute format_arg): Discuss using multiple
6194         attributes on a single function.
6196 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
6198         PR tree-optimization/86829
6199         * match.pd (sin (atan (x))): New simplification rules.
6200         (cos (atan (x))): Likewise.
6201         * real.c (build_sinatan_real): New function.
6202         * real.h (build_sinatan_real): Prototype.
6204 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
6206         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6207         function.
6208         (fold_mergeeo_helper): New helper function.
6209         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6210         intrinsics.  Correct some whitespace indentation issues.
6212 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
6214         PR target/87511
6215         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6216         Use HOST_WIDE_INT_1U for shift.
6218 2018-10-11  Doug Rupp  <rupp@adacore.com>
6219             Olivier Hainque  <hainque@adacore.com>
6221         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6222         Pass --relax to the linker for RTPs.
6223         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6225 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
6226             Jan Hubicka  <jh@suse.cz>
6227             Martin Jambor  <mjambor@suse.cz>
6229         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6230         the same elements are repeated rather than printing all of them.
6231         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6232         "repeated" elements.
6233         * read-rtl-function.c (test_loading_repeat): New function.
6234         (read_rtl_function_c_tests): Call test_loading_repeat.
6235         * rtl-tests.c (test_dumping_repeat): New function.
6236         (rtl_tests_c_tests): Call test_dumping_repeat.
6238 2018-10-11  Richard Biener  <rguenther@suse.de>
6240         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6241         bdver?_cost): Unify to ...
6242         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6243         * config/i386/i386.c (processor_cost_table): Adjust.
6245 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
6247         PR middle-end/87574
6248         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6249         the thunk when expanding to GIMPLE.
6251 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6253         * varasm.c (mergeable_string_section): Don't try to move zero-length
6254         strings to the merge section.
6256 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
6258         PR target/87573
6259         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6261 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
6263         PR target/87550
6264         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6265         to special_args set.
6267 2018-10-10  Richard Biener  <rguenther@suse.de>
6269         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6270         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6271         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6272         and recursing and pattern terminating the recursion on SSE
6273         vector width using ix86_expand_reduc.
6274         (reduc_sminmax_scal_<mode>): Split into part reducing to half
6275         width and recursing and SSE2 vector variant doing the final
6276         reduction with ix86_expand_reduc.
6277         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6278         with terminating the recursion at AVX level, splitting that
6279         to SSE there.
6281 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
6283         * genmatch.c (error_cb): Rename to...
6284         (diagnostic_cb): ...this, converting int params to enums.
6285         (fatal_at): Update for renaming.
6286         (warning_at): Likewise.
6287         (main): Likewise.
6288         * input.c (selftest::ebcdic_execution_charset::apply):
6289         Update for renaming of...
6290         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6291         to...
6292         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6293         converting level and reason to enums.
6294         (class selftest::lexer_error_sink): Rename to...
6295         (class selftest::lexer_test_options): ...this, renaming field
6296         "m_errors" to "m_diagnostics".
6297         (selftest::lexer_test_options::apply): Update for renaming of...
6298         (selftest::lexer_test_options::on_error): ...this, renaming to...
6299         (selftest::lexer_test_options::on_diagnostic): ...this
6300         converting level and reason to enums.
6301         (selftest::test_lexer_string_locations_raw_string_unterminated):
6302         Update for renamings.
6303         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6304         "reason".
6306 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
6308         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6309         * config/rs6000/pmmintrin.h: New file.
6311 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
6313         PR tree-optimization/86659
6314         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6316 2018-10-09  Richard Biener  <rguenther@suse.de>
6318         PR tree-optimization/63155
6319         * tree-ssa-structalias.c: Include tree-ssa.h.
6320         (get_constraint_for_ssa_var): For undefs return nothing_id.
6321         (find_func_aliases): Cleanup PHI handling.
6323 2018-10-09  Richard Biener  <rguenther@suse.de>
6325         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6326         replacements.
6328 2018-10-09  Martin Liska  <mliska@suse.cz>
6330         * asan.c (asan_emit_stack_protection): If a stack variable
6331         is located in a same file as current function, then emit
6332         line info into variable definition string.
6334 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6336         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
6337         information.
6339 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6341         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
6342         on the thunk.
6344 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6346         PR tree-optimization/86659
6347         * gimple-match.h (struct gimple_match_op): Add reverse field.
6348         (gimple_match_op::set_op): New overloaded method.
6349         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
6350         the REF_REVERSE_STORAGE_ORDER flag on the value.
6351         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
6352         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
6354 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
6356         PR middle-end/63155
6357         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
6358         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
6360 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
6362         PR target/87517
6363         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
6364         Defined with __builtin_ia32_vfmaddsubpd512_mask.
6366 2018-10-08  Richard Biener  <rguenther@suse.de>
6368         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
6369         cost the same as AVX128 ones.
6371 2018-10-08  Paul Koning  <ni1d@arrl.net>
6373         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
6374         (expand_block_move): New function.
6375         * config/pdp11/pdp11.c (output_block_move): Remove.
6376         (expand_block_move): New function.
6377         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
6378         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
6379         (*movmemhi1): Remove.
6381 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
6383         * config/s390/2827.md: Increase latencies for some FP instructions.
6385 2018-10-08  Richard Biener  <rguenther@suse.de>
6387         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6388         Open a dump scope.
6389         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
6390         * tree-vectorizer.h (dump_stmt_cost): Adjust.
6391         (add_stmt_cost): Dump return value of the hook.
6393 2018-10-08  Richard Biener  <rguenther@suse.de>
6395         PR tree-optimization/63155
6396         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
6397         (ssa_propagation_engine::ssa_propagate): Remove redundant
6398         bitmap bit clearing.
6400 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
6402         PR rtl-optimization/86939
6403         PR rtl-optimization/87479
6404         * ira.h (non_conflicting_reg_copy_p): New prototype.
6405         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
6406         (make_hard_regno_dead): Don't add conflicts for register
6407         ignore_reg_for_conflicts.
6408         (make_object_dead): Likewise.
6409         (non_conflicting_reg_copy_p): New function.
6410         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
6411         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
6412         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
6413         (make_hard_regno_dead): Don't add conflicts for register
6414         ignore_reg_for_conflicts.  Remove special conflict handling of
6415         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
6416         check_pic_pseudo_p and update callers.
6417         (mark_pseudo_dead): Don't add conflicts for register
6418         ignore_reg_for_conflicts.
6419         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
6421 2018-10-05  Andrew Waterman  <andrew@sifive.com>
6422             Jim Wilson  <jimw@sifive.com>
6424         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
6425         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
6426         new pattern using HONOR_SNANS that emits one extra instruction.
6428 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
6430         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
6431         patterns): Merge SI and DI patterns to a GPR pattern.
6432         (unnamed define_insn and define_split for record form of that): Merge
6433         to a single define_insn_and_split pattern.
6435 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
6437         PR c++/56856
6438         * input.c (expand_location_to_spelling_point): Add param "aspect"
6439         and use rather than hardcoding LOCATION_ASPECT_CARET.
6440         (get_substring_ranges_for_loc): Handle the case of a single token
6441         within a macro expansion.
6442         * input.h (expand_location_to_spelling_point): Add "aspect" param,
6443         defaulting to LOCATION_ASPECT_CARET.
6445 2018-10-05  Paul Koning  <ni1d@arrl.net>
6447         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
6448         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
6449         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
6450         (pdp11_guard_type): New function.
6452 2018-10-05  Paul Koning  <ni1d@arrl.net>
6454         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
6455         * config/pdp11/pdp11.opt (mfloat32): Remove.
6456         (mfloat64): Remove.
6457         * doc/invoke.texi (pdp11 -mfloat32): Remove:
6458         (pdp11 -mfloat64): Remove.
6460 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
6462         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
6463         (*cmp<mode>_cc_i387): Ditto.
6464         (*cmpu<mode>_cc_i387): Ditto.
6465         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6466         * config/i386/i386.c (ix86_expand_fp_compare): Remove
6467         "scratch" argument.
6468         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
6469         Emit x86_sahf_1 pattern.
6470         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
6471         (ix86_expand_carry_flag_compare): Ditto.
6473 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
6475         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
6476         to reg_or_0_operand.  Add "C" constraint.
6477         (*cmpxf_cc_i387): Ditto.
6478         (*cmp<mode>_i387): Change operand 2 predicate
6479         to nonimm_or_0_operand.  Add "C" constraint.
6480         (*cmp<mode>_cc_i387): Ditto.
6481         (*cmp<mode>_0_i387): Remove insn pattern.
6482         (*cmp<mode>_0_cc_i387): Ditto.
6484 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
6486         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
6487         * config/i386/predicates.md (nonimm_or_0_operand): Rename
6488         from vector_move_operand.  Update all uses.
6490 2018-10-05  Martin Sebor  <msebor@redhat.com>
6492         PR tree-optimization/87490
6493         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
6494         consistently.
6496 2018-10-05  Richard Biener  <rguenther@suse.de>
6498         PR tree-optimization/63155
6499         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
6500         vertical space in dumpfiles.
6501         * tree-ssa-propagate.h
6502         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
6503         * tree-ssa-propagate.c (cfg_blocks_back): New global.
6504         (ssa_edge_worklist_back): Likewise.
6505         (curr_order): Likewise.
6506         (cfg_blocks_get): Remove abstraction.
6507         (cfg_blocks_add): Likewise.
6508         (cfg_blocks_empty_p): Likewise.
6509         (add_ssa_edge): Add to current or next worklist based on
6510         RPO index.
6511         (add_control_edge): Likewise.
6512         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
6513         into ...
6514         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
6515         iteration from CFG and SSA edge worklist so we process
6516         everything in RPO order, prioritizing forward progress
6517         over iteration.
6518         (ssa_prop_init): Allocate new worklists, do not dump
6519         immediate uses.
6520         (ssa_prop_fini): Free new worklists.
6522 2018-10-05  Richard Biener  <rguenther@suse.de>
6524         * tree-core.h (tree_block::abstract_flag): Remove.
6525         (tree_block::block_num): Make full 32bits.
6526         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
6527         * tree.h (BLOCK_ABSTRACT): Remove.
6528         * dwarf2out.c (gen_lexical_block_die): Remove dead code
6529         resulting from BLOCK_ABSTRACT being always false.
6530         (gen_inlined_subroutine_die): Likewise.
6531         (gen_block_die): Likewise.
6532         * tree.c (block_ultimate_origin): Likewise.
6533         * tree-pretty-print.c (dump_block_node): Remove code dealing
6534         with BLOCK_ABSTRACT.
6535         * tree-ssa-live.c (dump_scope_block): Likewise.
6536         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
6537         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
6539 2018-10-05   Richard Biener  <rguenther@suse.de>
6541         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
6542         is asked for initialize mode to the component mode of the
6543         vector type.
6545 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
6547         PR target/87522
6548         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
6549         assembler for -mavx.
6550         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
6552 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
6554         PR target/87509
6555         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
6556         RS6000_BTM_DFP.
6557         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
6558         to be DImode.  When using mffscrn, force the operand to a register.
6560 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
6562         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
6563         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
6564         X87MODEF mode iterator.
6565         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
6566         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
6567         X87MODEF mode iterator.
6569 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
6571         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
6572         -Wno-prio-ctor-dtor.
6574 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6576         * Makefile.in (OBJS): Add opt-problem.o.
6577         * dump-context.h: Include "selftest.h.
6578         (selftest::temp_dump_context): New forward decl.
6579         (class dump_context): Make friend of class
6580         selftest::temp_dump_context.
6581         (dump_context::dump_loc_immediate): New decl.
6582         (class dump_pretty_printer): Move here from dumpfile.c.
6583         (class temp_dump_context): Move to namespace selftest.
6584         (temp_dump_context::temp_dump_context): Add param
6585         "forcibly_enable_dumping".
6586         (selftest::verify_dumped_text):
6587         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
6588         (selftest::verify_item):
6589         (ASSERT_IS_TEXT): Move here from dumpfile.c.
6590         (ASSERT_IS_TREE): Likewise.
6591         (ASSERT_IS_GIMPLE): Likewise.
6592         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
6593         to...
6594         (dump_context::dump_loc_immediate): ...this new function.
6595         (class dump_pretty_printer): Move to dump-context.h.
6596         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
6597         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
6598         (temp_dump_context::temp_dump_context): Move to "selftest"
6599         namespace.  Add param "forcibly_enable_dumping", and use it to
6600         conditionalize the use of m_pp;
6601         (selftest::verify_dumped_text): Make non-static.
6602         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
6603         (selftest::verify_item): Make non-static.
6604         (ASSERT_IS_TEXT): Move to dump-context.h.
6605         (ASSERT_IS_TREE): Likewise.
6606         (ASSERT_IS_GIMPLE): Likewise.
6607         (selftest::test_capture_of_dump_calls): Pass "true" for new
6608         param of temp_dump_context.
6609         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
6610         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
6611         TDF_COMPARE_DEBUG.
6612         * opt-problem.cc: New file.
6613         * opt-problem.h: New file.
6614         * optinfo-emit-json.cc
6615         (selftest::test_building_json_from_dump_calls): Pass "true" for
6616         new param of temp_dump_context.
6617         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
6618         (optinfo::emit_for_opt_problem): New function.
6619         (optinfo::emit): Clarity which emit_item is used.
6620         * optinfo.h (optinfo::get_dump_location): New accessor.
6621         (optinfo::emit_for_opt_problem): New decl.
6622         (optinfo::emit): Make const.
6623         * selftest-run-tests.c (selftest::run_tests): Call
6624         selftest::opt_problem_cc_tests.
6625         * selftest.h (selftest::opt_problem_cc_tests): New decl.
6626         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
6627         bool to opt_result, converting fprintf messages to
6628         opt_result::failure_at calls.  Add "stmt" param for use by the
6629         failure_at calls.
6630         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
6631         (runtime_alias_check_p): Convert return type from bool to
6632         opt_result, converting dump_printf calls to
6633         opt_result::failure_at, using the statement DDR_A for their
6634         location.
6635         (find_data_references_in_stmt): Convert return type from bool to
6636         opt_result, converting "return false" to opt_result::failure_at
6637         with a new message.
6638         * tree-data-ref.h: Include "opt-problem.h".
6639         (dr_analyze_innermost): Convert return type from bool to opt_result,
6640         and add a const gimple * param.
6641         (find_data_references_in_stmt): Convert return type from bool to
6642         opt_result.
6643         (runtime_alias_check_p): Likewise.
6644         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
6645         dr_analyze_innermost.
6646         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
6647         Convert return type from bool to opt_result, adding a message for
6648         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
6649         (vect_analyze_data_ref_dependence): Convert return type from bool
6650         to opt_result.  Change sense of return type from "false"
6651         effectively meaning "no problems" to "false" meaning a problem,
6652         so that "return false" becomes "return opt_result::success".
6653         Convert "return true" calls to opt_result::failure_at, using
6654         the location of statement A rather than vect_location.
6655         (vect_analyze_data_ref_dependences): Convert return type from bool
6656         to opt_result.
6657         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
6658         calls to opt_result::failure_at, using the stmt location rather
6659         than vect_location.
6660         (vect_verify_datarefs_alignment): Convert return type from bool
6661         to opt_result.
6662         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
6663         into multiple more-tightly-scoped copies.
6664         (vect_analyze_data_refs_alignment): Convert return type from bool
6665         to opt_result.
6666         (vect_analyze_data_ref_accesses): Likewise, converting a
6667         "return false" to a "return opt_result::failure_at", adding a
6668         new message.
6669         (vect_prune_runtime_alias_test_list): Convert return type from
6670         bool to opt_result, converting dump_printf_loc to
6671         opt_result::failure_at.  Add a %G to show the pertinent statement,
6672         and use the stmt's location rather than vect_location.
6673         (vect_find_stmt_data_reference): Convert return type from
6674         bool to opt_result, converting dump_printf_loc to
6675         opt_result::failure_at, using stmt's location.
6676         (vect_analyze_data_refs):  Convert return type from bool to
6677         opt_result.  Convert "return false" to "return
6678         opt_result::failure_at", adding messages as needed.
6679         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
6680         type from bool to opt_result.
6681         (vect_determine_vf_for_stmt): Likewise.
6682         (vect_determine_vectorization_factor): Likewise, converting
6683         dump_printf_loc to opt_result::failure_at, using location of phi
6684         rather than vect_location.
6685         (vect_analyze_loop_form_1): Convert return type from bool to
6686         opt_result, converting dump_printf_loc calls, retaining the use of
6687         vect_location.
6688         (vect_analyze_loop_form): Convert return type from loop_vec_info
6689         to opt_loop_vec_info.
6690         (vect_analyze_loop_operations): Convert return type from bool to
6691         opt_result, converting dump_printf_loc calls, using the location
6692         of phi/stmt rather than vect_location where available.  Convert
6693         various "return false" to "return opt_result::failure_at" with
6694         "unsupported phi" messages.
6695         (vect_get_datarefs_in_loop): Convert return type from bool to
6696         opt_result.  Add a message for the
6697         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
6698         (vect_analyze_loop_2): Convert return type from bool to
6699         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
6700         each "goto again;", adding new messages where needed.
6701         Add "unsupported grouped {store|load}" messages.
6702         (vect_analyze_loop): Convert return type from loop_vec_info to
6703         opt_loop_vec_info.
6704         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
6705         bool to opt_result.
6706         * tree-vect-stmts.c (process_use): Likewise, converting
6707         dump_printf_loc call and using stmt location, rather than
6708         vect_location.
6709         (vect_mark_stmts_to_be_vectorized): Likeise.
6710         (vect_analyze_stmt): Likewise, adding a %G.
6711         (vect_get_vector_types_for_stmt): Convert return type from bool to
6712         opt_result, converting dump_printf_loc calls and using stmt
6713         location, rather than vect_location.
6714         (vect_get_mask_type_for_stmt): Convert return type from tree to
6715         opt_tree, converting dump_printf_loc calls and using stmt location.
6716         * tree-vectorizer.c: Include "opt-problem.h.
6717         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
6718         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
6719         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
6720         enabled, use it to report at the top level "couldn't vectorize
6721         loop" followed by the problem.
6722         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
6723         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
6724         to opt_result.
6725         (vect_analyze_stmt): Likewise.
6726         (vect_get_vector_types_for_stmt): Likewise.
6727         (tree vect_get_mask_type_for_stmt): Likewise.
6728         (vect_analyze_data_ref_dependences): Likewise.
6729         (vect_enhance_data_refs_alignment): Likewise.
6730         (vect_analyze_data_refs_alignment): Likewise.
6731         (vect_verify_datarefs_alignment): Likewise.
6732         (vect_analyze_data_ref_accesses): Likewise.
6733         (vect_prune_runtime_alias_test_list): Likewise.
6734         (vect_find_stmt_data_reference): Likewise.
6735         (vect_analyze_data_refs): Likewise.
6736         (vect_analyze_loop): Convert return type from loop_vec_info to
6737         opt_loop_vec_info.
6738         (vect_analyze_loop_form): Likewise.
6739         (vect_analyze_slp): Convert return type from bool to opt_result.
6741 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6743         * doc/invoke.texi (-fopt-info): Document new "internals"
6744         sub-option.
6745         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
6746         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
6747         MSG_ALL_KINDS.
6748         (optinfo_verbosity_options): Add "internals".
6749         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
6750         (dump_context::apply_dump_filter_p): New member function.
6751         (dump_context::dump_loc): Use apply_dump_filter_p rather than
6752         explicitly masking the dump_kind.
6753         (dump_context::begin_scope): Increment the scope depth first.  Use
6754         apply_dump_filter_p rather than explicitly masking the dump_kind.
6755         (dump_context::emit_item): Use apply_dump_filter_p rather than
6756         explicitly masking the dump_kind.
6757         (dump_dec): Likewise.
6758         (dump_hex): Likewise.
6759         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
6760         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
6761         (opt_info_switch_p): Update handling of default
6762         MSG_OPTIMIZED_LOCATIONS to cope with default of
6763         MSG_PRIORITY_USER_FACING.
6764         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
6765         masking the dump_kind.
6766         (selftest::test_capture_of_dump_calls): Update test_dump_context
6767         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
6768         than MSG_ALL.  Generalize scope test to be run at all four
6769         combinations of with/without MSG_PRIORITY_USER_FACING and
6770         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
6771         for each of the two values.
6772         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
6773         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
6774         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
6775         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
6776         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
6777         with MSG_PRIORITY_*.
6778         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
6779         dump messages as MSG_PRIORITY_USER_FACING.
6780         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
6781         about the interaction with MSG_PRIORITY_*.
6783 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6785         * varasm.c (output_constant): Add new parameter merge_strings.
6786         Make strings properly zero terminated in merge string sections.
6787         (mergeable_string_section): Don't fail if the last char is non-zero.
6788         (assemble_variable_contents): Handle merge string sections.
6789         (assemble_variable): Likewise.
6790         (assemble_constant_contents): Likewise.
6791         (output_constant_def_contents): Likewise.
6792         (output_constructor_array_range,
6793         output_constructor_regular_field): Adjust call to output_constant.
6794         (output_object_block): Adjust call to assemble_constant_contents
6795         and assemble_variable_contents.
6797 2018-10-04  Martin Liska  <mliska@suse.cz>
6799         PR c/87483
6800         * cgraphunit.c (process_function_and_variable_attributes):
6801         Warn about a function with alias attribute and a body.
6803 2018-10-04  Martin Liska  <mliska@suse.cz>
6805         PR ipa/82625
6806         * multiple_target.c (redirect_to_specific_clone): New function.
6807         (ipa_target_clone): Use it.
6808         * tree-inline.c: Fix comment.
6810 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6812         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
6813         fields.
6814         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
6815         (gcc::dump_manager::register_pass): New member function, adapted
6816         from loop body in gcc::pass_manager::register_pass, adding a
6817         call to update_dfi_for_opt_info.
6818         (gcc::dump_manager::opt_info_enable_passes): Store the
6819         -fopt-info options into the new fields.  Move the loop
6820         bodies into...
6821         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
6822         function.
6823         * dumpfile.h (struct opt_pass): New forward decl.
6824         (gcc::dump_manager::register_pass): New decl.
6825         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
6826         (class gcc::dump_manager): Add fields "m_optgroup_flags",
6827         "m_optinfo_flags", and "m_optinfo_filename".
6828         * passes.c (gcc::pass_manager::register_pass): Move all of the
6829         dump-handling code to gcc::dump_manager::register_pass.
6831 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
6833         PR rtl-optimization/87466
6834         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
6835         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
6836         * doc/tm.texi: Regenerate.
6837         * ira-lives.c (process_bb_node_lives): Use the new target hook.
6838         * lra-lives.c (process_bb_lives): Likewise.
6839         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
6840         Define.
6842 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
6844         * params.c (add_params): Fix initialization.
6846 2018-10-04  Martin Liska  <mliska@suse.cz>
6848         PR gcov-profile/84107
6849         * tree-profile.c (init_ic_make_global_vars):
6850         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6851         Come up with new ic_tuple* variables.  Emit
6852         __gcov_indirect_call{,_topn} variables.
6853         (gimple_gen_ic_profiler): Access the variable
6854         and emit gimple.
6855         (gimple_gen_ic_func_profiler): Access
6856         __gcov_indirect_call.callee field.
6857         (gimple_init_gcov_profiler): Use ptr_type_node.
6858         * value-prof.c (gimple_ic): Use ptr_type_node.
6860 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6862         PR tree-optimization/85787
6863         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
6864         malloc_candidate_p into this function and add support for
6865         detecting multiple phis.
6866         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
6868 2018-10-04  Martin Liska  <mliska@suse.cz>
6870         PR ipa/87491
6871         * ipa-inline.c (inline_to_all_callers_1):
6872         Call ultimate_alias_target for node being inlined.
6874 2018-10-03  Jeff Law  <law@redhat.com>
6876         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
6877         target's wchar_t.
6878         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
6879         * tree.h (get_typenode_from_name): Prototype.
6881 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
6883         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6884         Change operand 2 predicate to nonimmediate_operand.
6885         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6887 2018-10-03  Martin Sebor  <msebor@redhat.com>
6888             Jeff Law  <law@redhat.com>
6890         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
6891         initialize it.
6892         (get_string_length): Detect unterminated arrays.
6893         (format_string): Same.
6894         (format_directive): Warn about unterminated arrays.
6895         (handle_gimple_call): Mark statements with no_warning as needed.
6897 2018-10-03  Jim Wilson  <jimw@sifive.com>
6899         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
6900         also define __riscv_abi_rve.  Delete trailing white space.
6902 2018-10-03  Paul Koning  <ni1d@arrl.net>
6904         Enable LRA register allocator for PDP11.
6905         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
6906         (R): Likewise.
6907         (D): Likewise.
6908         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
6909         * config/pdp11/pdp11.opt (-mlra): New option.
6910         * doc/invoke.texi (PDP-11 Options): Document -mlra.
6912 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
6914         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6915         (*<absneg:code>extend<mode>xf2): Ditto.
6917 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
6919         PR tree-optimization/87415
6920         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6921         precision fields.
6923 2018-10-02  Jeff Law  <law@redhat.com>
6925         * gimple-fold.c (get_range_strlen): Only set *nonstr when
6926         an unterminated string is discovered.  Bubble up range
6927         even for unterminated strings.
6928         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6929         indicates the string was not terminated via NONSTR.
6931 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
6933         * tree-vrp.c (extract_range_from_unary_expr): Special case all
6934         pointer conversions.
6935         Do not do anything special for anti-ranges.
6937 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
6939         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6940         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6942 2018-10-03  Martin Liska  <mliska@suse.cz>
6944         PR gcov-profile/86109
6945         * coverage.c (coverage_begin_function): Do not
6946         mark lambdas as artificial.
6947         * tree-core.h (struct GTY): Remove tm_clone_flag
6948         and introduce new lambda_function.
6949         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6951 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6953         PR target/87474
6954         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6955         P8_VECTOR and VSX are enabled.
6957 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
6959         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6960         0x3907 as CPU model number.
6962 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
6964         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6965         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6966         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6967         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6968         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6969         * config/s390/s390.md: Likewise. Rename also the cpu attribute
6970         value from arch12 to z14.
6972 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
6974         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6975         (isinfxf2): Ditto.
6976         (isinf<mode>2): Ditto.
6978 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
6980         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6981         before emitting fxam.  Perform calculations in XFmode.
6983 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
6985         * match.pd (((X /[ex] A) +- B) * A): New transformation.
6987 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
6989         PR middle-end/87319
6990         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6991         * tree.c (signed_or_unsigned_type_for): Handle complex.
6993 2018-10-02  Jeff Law  <law@redhat.com>
6995         * gimple-fold.c (get_range_strlen): Remove dead code.
6997 2018-10-02  Martin Sebor  <msebor@redhat.com>
6998             Jeff Law  <law@redhat.com>
7000         * builtins.c (unterminated_array): Add new arguments.
7001         If argument is not terminated, bubble up size and exact
7002         state to callers.
7003         (expand_builtin_strnlen): Detect, avoid expanding
7004         and diagnose unterminated arrays.
7005         (c_strlen): Fill in offset of start of unterminated strings.
7006         * builtins.h (unterminated_array): Update prototype.
7008 2018-10-02  Richard Biener  <rguenther@suse.de>
7010         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
7011         of haddv4df, first reduce to SSE width and exploit the fact
7012         that we only need element zero with the reduction result.
7013         (reduc_plus_scal_v2df): Likewise.
7015 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
7017         * dojump.h (do_jump): Delete.
7018         (do_jump_1): Likewise.
7019         (split_comparison): Move around.
7020         * dojump.c (do_jump): Make static.
7021         (do_jump_1): Likewise.
7022         (jumpifnot): Move around.
7023         (jumpifnot_1): Likewise.
7024         (jumpif): Likewise.
7025         (jumpif_1): Likewise.
7026         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
7028 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
7030         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
7031         insns in the delay slot and add_insn_after for the jump insn.
7033 2018-10-02  Richard Biener  <rguenther@suse.de>
7035         * tree-inline.c (expand_call_inline): Use the location of
7036         the callee declaration for the inline-entry marker.
7037         * final.c (notice_source_line): Remove special-casing of
7038         NOTE_INSN_INLINE_ENTRY.
7040 2018-10-01  Carl Love  <cel@us.ibm.com>
7042         PR 69431
7043         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
7044         (__builtin_mtfsb0): New.
7045         (__builtin_mtfsb1): New.
7046         ( __builtin_set_fpscr_rn): New.
7047         (__builtin_set_fpscr_drn): New.
7048         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
7049         (rs6000_expand_set_fpscr_rn_builtin): Add.
7050         (rs6000_expand_set_fpscr_drn_builtin): Add.
7051         (rs6000_expand_builtin): Add case statement entries for
7052         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
7053         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
7054         RS6000_BUILTIN_MFFSL.
7055         (rs6000_init_builtins): Add ftype initialization and def_builtin
7056         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
7057         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
7058         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
7059         rs6000_mffscdrn): Add define_insn.
7060         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
7061         * doc/extend.texi: Add documentation for the builtins.
7063 2018-10-01  Richard Biener  <rguenther@suse.de>
7065         PR tree-optimization/87465
7066         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
7067         causing branch miscounts.
7069 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7071         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
7072         aarch64_option_default_param):  New.
7073         (params.h): Include.
7074         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
7075         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
7076         stack-clash protection validation code.
7078 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7080         * params.c (validate_param): New.
7081         (add_params): Use it.
7082         (set_param_value): Refactor param validation into validate_param.
7083         (diagnostic.h): Include.
7084         * diagnostic.h (diagnostic_ready_p): New.
7086 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7088         * params.c (set_param_value):
7089         Add index of parameter being validated.
7090         * common/common-target.def (option_validate_param): New.
7091         * common/common-targhooks.h (default_option_validate_param): New.
7092         * common/common-targhooks.c (default_option_validate_param): New.
7093         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
7094         * doc/tm.texi: Regenerate.
7096 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7098         PR target/86486
7099         * config/aarch64/aarch64.c (aarch64_override_options_internal):
7100         Add validation for stack-clash parameters and set defaults.
7102 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7104         PR target/86486
7105         * configure.ac: Add stack-clash-protection-guard-size.
7106         * doc/install.texi: Document it.
7107         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
7108         * params.def: Update comment for guard-size.
7109         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
7110         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
7111         * configure: Regenerate.
7113 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7115         PR target/86486
7116         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
7117         STACK_DYNAMIC_OFFSET): New.
7118         * config/aarch64/aarch64.c (aarch64_layout_frame):
7119         Update outgoing args size.
7120         (aarch64_stack_clash_protection_alloca_probe_range,
7121         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7123 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7125         PR target/86486
7126         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7127         probe ranges.
7128         * target.def (stack_clash_protection_alloca_probe_range): New.
7129         (stack_clash_protection_final_dynamic_probe): Remove.
7130         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7131         (default_stack_clash_protection_final_dynamic_probe): Remove.
7132         * targhooks.c: Likewise.
7133         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7134         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7135         * doc/tm.texi: Regenerate.
7137 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7139         PR target/86486
7140         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7141         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7142         aarch64_clamp_to_uimm12_shift): New.
7143         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7144         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7146 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7148         PR target/86486
7149         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7151 2018-10-01  Jeff Law  <law@redhat.com>
7152             Richard Sandiford <richard.sandiford@linaro.org>
7153             Tamar Christina  <tamar.christina@arm.com>
7155         PR target/86486
7156         * config/aarch64/aarch64.md
7157         (probe_stack_range): Add k (SP) constraint.
7158         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7159         STACK_CLASH_MAX_UNROLL_PAGES): New.
7160         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7161         stack probes for stack clash.
7162         (aarch64_allocate_and_probe_stack_space): New.
7163         (aarch64_expand_prologue): Use it.
7164         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7165         (aarch64_sub_sp): Add emit_move_imm optional param.
7167 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
7169         PR tree-optimization/87261
7170         * match.pd: Remove trailing whitespace.
7171         Add (x & y) | ~(x | y) -> ~(x ^ y),
7172         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7174 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7176         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7177         constraints.
7178         (ashlsi3_insn): Update instruction constraints.
7179         (ashrsi3_insn): Likewise.
7180         (rotrsi3): Likewise.
7181         (add_shift): Likewise.
7182         * config/arc/constraints.md (Csz): New 32 bit constraint. It
7183         avoids placing in the limm field small constants which, otherwise,
7184         could end into a small instruction.
7186 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7188         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7189         destination register is not odd-even.
7190         (umaddsidi4_split): Likewise.
7192 2018-10-01  Richard Biener  <rguenther@suse.de>
7194         * tree-inline.c (expand_call_inline): Store origin of fn
7195         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7196         * tree.c (block_ultimate_origin): Simplify and do some
7197         checking.
7199 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
7201         * config/i386/mmx.md (EMMS): New int iterator.
7202         (emms): New int attribute.
7203         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7204         EMMS int iterator.  Explicitly declare clobbers.
7205         (mmx_emms): Remove expander.
7206         (mmx_femms): Ditto.
7207         * config/i386/predicates.md (emms_operation): Remove predicate.
7208         (vzeroall_pattern): New predicate.
7209         (vzeroupper_pattern): Rename from vzeroupper_operation.
7210         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7211         vzeroupper_pattern and vzeroall_pattern predicates.
7213 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
7215         PR rtl-optimization/86939
7216         * ira-lives.c (make_hard_regno_born): Rename from this...
7217         (make_hard_regno_live): ... to this.  Remove update to conflict
7218         information.  Update function comment.
7219         (make_hard_regno_dead): Add conflict information update.  Update
7220         function comment.
7221         (make_object_born): Rename from this...
7222         (make_object_live): ... to this.  Remove update to conflict information.
7223         Update function comment.
7224         (make_object_dead):  Add conflict information update.  Update function
7225         comment.
7226         (mark_pseudo_regno_live): Call make_object_live.
7227         (mark_pseudo_regno_subword_live): Likewise.
7228         (mark_hard_reg_dead): Update function comment.
7229         (mark_hard_reg_live): Call make_hard_regno_live.
7230         (process_bb_node_lives): Likewise.
7231         * lra-lives.c (make_hard_regno_born): Rename from this...
7232         (make_hard_regno_live): ... to this.  Remove update to conflict
7233         information.  Remove now uneeded check_pic_pseudo_p argument.
7234         Update function comment.
7235         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7236         to conflict information.  Update function comment.
7237         (mark_pseudo_live): Remove update to conflict information.  Update
7238         function comment.
7239         (mark_pseudo_dead): Add conflict information update.
7240         (mark_regno_live): Call make_hard_regno_live.
7241         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7242         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7244 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
7246         PR target/87370
7247         * config/i386/i386.c (construct_container): Use TImode for
7248         BLKmode values in 2 integer registers.
7250 2018-09-29  Jeff Law  <law@redhat.com>
7252         * builtins.c (unterminated_array): Pass in c_strlen_data * to
7253         c_strlen rather than just a tree *.
7254         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7255         Update recursive calls appropriately.  If caller did not provide a
7256         suitable data pointer, create a local one.  When a non-terminated
7257         string is discovered, bubble up information about the string via the
7258         c_strlen_data object.
7259         * builtins.h (c_strlen): Update prototype.
7260         (c_strlen_data): New structure.
7261         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7262         For a type 2 call, if c_strlen indicates a non-terminated string
7263         use the length of the non-terminated string.
7264         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7266 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
7268         PR target/87467
7269         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7270         __m512d type for __A argument rather than __m512.
7272 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
7274         * match.pd (simple_comparison): Don't optimize if either operand is
7275         a function pointer when target needs function pointer canonicalization.
7277 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7279         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7280         power5 .. power9 to remove indirection.
7281         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7282         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7283         ASM_CPU_476_SPEC): Delete.
7284         (ASM_CPU_SPEC): Adjust.
7285         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7286         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7288 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7290         * config.in: Delete HAVE_AS_DCI.
7291         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7292         * config/rs6000/rs6000.h: Ditto.
7293         * configure.ac: Delete HAVE_AS_DCI.
7294         * configure: Regenerate.
7296 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7298         * config.in (HAVE_AS_LWSYNC): Delete.
7299         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7300         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7301         do it as a .long .
7302         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7303         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7304         as a .long .
7305         * configure.ac: Delete HAVE_AS_LWSYNC.
7306         * configure: Regenerate.
7308 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7309             Pierre-Marie de Rodat  <derodat@adacore.com>
7311         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7312         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7313         (cgraph_node::create_thunk): Add indirect_offset parameter.
7314         (thunk_adjust): Likewise.
7315         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7316         and initialize the corresponding field with it.
7317         (cgraph_node::dump): Dump indirect_offset field.
7318         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7319         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7320         (thunk_adjust): Add indirect_offset parameter and deal with it.
7321         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7322         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
7323         or if the thunk is external or local.  Fix formatting.  Do not chain
7324         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
7325         if any, in the GIMPLE representation.
7326         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7327         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7328         (input_node): Read indirect_offset field.
7329         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7330         call to thunk_adjust.
7331         * tree-nested.c (struct nesting_info): Add thunk_p field.
7332         (create_nesting_tree): Set it.
7333         (convert_all_function_calls): Copy static chain from targets to thunks.
7334         (finalize_nesting_tree_1): Return early for thunks.
7335         (unnest_nesting_tree_1): Do not finalize thunks.
7336         (gimplify_all_functions): Do not gimplify thunks.
7338 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7340         * opt-suggestions.c (option_proposer::build_option_suggestions):
7341         Release "option_values".
7343 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7345         * coverage.c (get_coverage_counts): Convert problem-reporting dump
7346         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
7347         * dumpfile.c (kind_as_string): New function.
7348         (dump_loc): Rather than a hardcoded prefix of "note: ", use
7349         kind_as_string to vary the prefix based on dump_kind.
7350         (selftest::test_capture_of_dump_calls): Update for above.
7352 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7354         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
7355         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
7357 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7359         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
7360         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
7361         INVALID_REGNUM instead of FPSR_REG.
7362         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
7363         * config/i386/i386.md: Update comment of FP compares.
7364         (fldenv): Do not clobber FPSR_REG.
7366 2018-09-28  Richard Biener  <rguenther@suse.de>
7368         * tree.h (BLOCK_ORIGIN): New.
7369         * omp-expand.c (grid_expand_target_grid_body): Assign
7370         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
7371         * tree-inline.c (remap_block): Likewise.
7372         * auto-profile.c (get_function_decl_from_block): Simplify
7373         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
7374         * langhooks.c (lhd_print_error_function): Likewise.
7375         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
7376         Likewise.
7377         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7378         * tree.c (block_nonartificial_location): Likewise.
7379         (block_ultimate_origin): Likewise.
7380         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
7381         no longer needed LTO case.
7383 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
7384             Jan Hubicka  <jh@suse.cz>
7385             Martin Jambor  <mjambor@suse.cz>
7387         * simplify-rtx.c (simplify_merge_mask): New function.
7388         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
7389         same masks are used in op1 or op2.
7390         (test_vec_merge): New function.
7391         (test_vector_ops): Call test_vec_merge.
7393 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7395         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
7396         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
7397         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
7398         (cypress_costs): Set it.
7399         (supersparc_costs): Likewise.
7400         (hypersparc_costs): Likewise.
7401         (leon_cost): Likewise.
7402         (leon3_costs): Likewise.
7403         (sparclet_costs): Likewise.
7404         (ultrasparc_costs): Likewise.
7405         (ultrasparc_costs): Likewise.
7406         (niagara_costs): Likewise.
7407         (niagara2_costs): Likewise.
7408         (niagara3_costs): Likewise.
7409         (niagara4_costs): Likewise.
7410         (niagara7_costs): Likewise.
7411         (m8_costs): Likewise.
7412         (TARGET_CAN_FOLLOW_JUMP): Define.
7413         (pass_work_around_errata::gate): Minor tweak.
7414         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
7415         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
7416         Automaitcally clear MASK_FSMULD mask for V7 processors.
7417         (sparc_can_follow_jump): New static function.
7418         (output_ubranch): Deal with CROSSING_JUMP_P.
7419         (sparc_use_sched_lookahead): Rewrite using switch statement.
7420         (sparc_issue_rate): Reorder.
7421         (sparc_branch_cost): New function.
7423 2018-09-27  Martin Sebor  <msebor@redhat.com>
7425         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
7426         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
7427         (int_fits_type_p): Same.
7429 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
7431         * config/i386/i386.md (FPCR_REG): Remove.
7432         (UNSPEC_FLDCW): Remove.
7433         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
7434         (x86_fldcw_1): Remove insn pattern.
7435         (fnstenv): Do not clobber FPCR_REG.
7436         (fldenv): Ditto.
7437         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
7438         (CALL_USED_REGISTERS): Ditto.
7439         (REG_ALLOC_ORDER): Ditto.
7440         (REG_CLASS_CONTENTS): Ditto.
7441         (HI_REGISTER_NAMES): Ditto.
7442         (ADDITIONAL_REGISTER_NAMES): Use defines instead
7443         of numerical constants.
7444         * config/i386/i386.c (regclass_map): Remove fpsr register.
7445         (dbx_register_map): Ditto.
7446         (dbx64_register_map): Ditto.
7447         (svr4_dbx_register_map): Ditto.
7448         (print_reg): Do not handle FPCR_REG.
7450 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
7452         PR target/87149
7453         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
7454         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
7455         Delete, always treat as true.
7456         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7457         Ditto.  Simplify remaining code.
7458         * config/powerpcspe/powerpcspe.h: Ditto.
7459         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
7460         Simplify remaining code.
7461         (rs6000_expand_builtin): Ditto.
7462         * config/rs6000/rs6000.h: Ditto.
7463         * configure.ac: Ditto.
7464         * configure: Regenerate.
7466 2018-09-27  Martin Liska  <mliska@suse.cz>
7468         * coverage.c (get_coverage_counts): Revert the formatting
7469         of missing profile opt info.
7471 2018-09-27  Richard Biener  <rguenther@suse.de>
7473         PR debug/37801
7474         PR debug/87440
7475         * dwarf2out.c (set_block_origin_self): Do not mark outermost
7476         block as we do not output that.
7477         (gen_inlined_subroutine_die): Elide the originally outermost
7478         block, matching what we do for concrete instances.
7479         (decls_for_scope): Add parameter specifying whether to recurse
7480         to subblocks.
7482 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
7483             Tom de Vries  <tom@codesourcery.com>
7485         PR 82089
7487         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
7488         STORE_FLAG_VALUE == 1.
7490 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
7492         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
7493         constant definitions.
7494         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
7495         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
7496         ("speculation_barrier"): New expander definition.
7498 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
7500         PR gcov-profile/86957
7501         * common.opt: New warning option -Wmissing-profile.
7502         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
7503         * doc/invoke.texi: Document -Wmissing-profile.
7505 2018-09-26  Jim Wilson  <jimw@sifive.com>
7507         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
7508         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
7510 2018-09-26  Martin Sebor  <msebor@redhat.com>
7512         * tree.c (zerop): Change return type to bool.
7513         (integer_zerop, integer_onep, integer_each_onep): Same.
7514         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7515         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7516         (real_onep, real_minus_onep, chain_index): Same.
7517         (print_type_hash_statistics, type_list_equal): Same.
7518         * tree.h (zerop): Same.
7519         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
7520         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7521         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7522         (real_onep, real_minus_onep, chain_index): Same.
7523         (print_type_hash_statistics, type_list_equal): Same.
7525 2018-09-26  Jim Wilson  <jimw@sifive.com>
7527         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
7529 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
7531         PR target/87414
7532         * config/i386/i386.c: Include debug.h and dwarf2out.h.
7533         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
7534         call.
7536 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
7538         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
7540 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
7542         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
7543         and FP_SECOND_SSE_REGS.
7544         (REG_CLASS_NAMES): Ditto.
7545         (REG_CLASS_CONTENTS): Ditto.
7546         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
7547         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
7548         (ix86_preferred_output_reload_class): Ditto.
7549         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
7550         clobber constraint to "=&f".
7551         (fix_truncdi_i387): Ditto.
7552         (lrintxfdi2): Ditto.
7553         (fistdi2_<rounding>): Ditto.
7554         (fpremxf4_i387): Change "=u" constraint to "=f".
7555         (fprem1xf4_i387): Ditto.
7556         (sincosxf3): Ditto.
7557         (fptanxf4_i387): Ditto.
7558         (fxtractxf3_i387): Ditto.
7559         (fscalexf4_i387): Ditto.
7560         (atan2xf3): Change "u" constraint to "f".
7561         (fyl2xxf3_i387): Ditto.
7562         (fyl2xp1xf3_i387): Ditto.
7564 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
7566         PR target/87439
7567         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
7568         for removed I387_MASK_PM entity.
7571 2018-09-26  Jeff Law  <law@redhat.com>
7572         Revert
7573         2018-09-26  Alexey Neyman  <stilor@att.net>
7575         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7576         headers are no longer pulled in by <isl/val.h>.
7578 2018-09-26  Richard Biener  <rguenther@suse.de>
7580         PR debug/87443
7581         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
7582         or concrete instance DIE to the tree.  Create abstract origin
7583         attributes also for concrete instances.
7585 2018-09-26  Alexey Neyman  <stilor@att.net>
7587         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7588         headers are no longer pulled in by <isl/val.h>.
7590 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
7592         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
7593         Use new helper functions.
7594         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
7595         Use new helper functions.
7596         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
7597         aarch_mm_needs_release): New declarations.
7598         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
7599         aarch_mm_needs_release): New.
7601 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
7603         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
7604         (arm32_output_mi_thunk): Deal with long calls.
7606 2018-09-26  Richard Biener  <rguenther@suse.de>
7608         PR debug/87428
7609         PR debug/87362
7610         * tree-inline.c (expand_call_inline): When the location
7611         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
7612         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
7613         the inserted BLOCK to make inlined_function_outer_scope_p
7614         recognize it.
7615         * dwarf2out.c (add_call_src_coords_attributes): Do not add
7616         coords for reserved locations.
7618 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
7620         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
7621         (*call_indirect_nonlocal_sysv<mode>): Ditto.
7622         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
7623         (*sibcall_nonlocal_sysv<mode>): Ditto.
7624         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
7625         (<bd>_<mode>): Ditto.
7626         (<bd>tf_<mode>): Ditto.
7628 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
7630         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
7631         control string as a list of templates instead of as C code.
7632         (*altivec_movti): Ditto.
7633         * config/rs6000/darwin.md (movdf_low_di): Ditto.
7635 2018-09-25  Jim Wilson  <jimw@sifive.com>
7637         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
7638         when target symbol is weak.
7640 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7642         PR c/87387
7643         * builtins.c (unterminated_array): Simplify.
7644         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
7645         where pointer arithmetic is safe.
7647 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
7649         PR target/86987
7650         * config/rs6000/altivec.md (altivec_vspltb): Use
7651         const_0_to_15_operand instead of u5bit_cint_operand.
7652         (*altivec_vspltb_internal): Ditto.
7653         (altivec_vspltb_direct): Ditto.
7654         (altivec_vsplth): Use const_0_to_7_operand instead of
7655         u5bit_cint_operand.
7656         (*altivec_vsplth_internal): Ditto.
7657         (altivec_vsplth_direct): Ditto.
7658         (altivec_vspltw): Use const_0_to_3_operand instead of
7659         u5bit_cint_operand.
7660         (*altivec_vspltw_internal): Ditto.
7661         (altivec_vspltw_direct): Ditto.
7662         (altivec_vspltsf): Ditto.
7663         (*altivec_vspltsf_internal): Ditto.
7664         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
7665         various splats with the proper size immediate.  Reorder the various
7666         cases by ascending size of immediate, and put all such together.
7668 2018-09-25  Richard Biener  <rguenther@suse.de>
7670         PR debug/83941
7671         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
7672         GC-ification.
7673         (maybe_create_die_with_external_ref): Do not create
7674         DW_TAG_imported_unit here.
7675         (add_abstract_origin_attribute): Handle external BLOCK refs.
7676         (dwarf2out_abstract_function): Simplify LTO case.
7677         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
7678         rather than using maybe_create_die_with_external_ref.
7680 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
7682         PR target/71278
7683         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
7684         (frndintxf2_mask_pm_i387): Ditto.
7685         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
7686         Enable for !flag_trapping_math.
7687         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
7688         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
7689         Change operand 1 predicate to nonimmediate_operand.
7690         (attr "i387_cw"): Remove mask_pm.
7691         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
7692         (enum ix86_entity): Remove I387_MASK_PM.
7693         * config/i386/i386.c (ix86_i387_mode_needed): Do not
7694         handle I387_MASK_PM.
7695         (ix86_mode_needed): Ditto.
7696         (ix86_mode_after): Ditto.
7697         (ix86_mode_entry): Ditto.
7698         (ix86_mode_exit): Ditto.
7699         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
7701 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
7703         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
7704         to_update_switch_stmts to vNULL instead of calling create on them
7705         immediately.
7707 2018-09-25  Richard Biener  <rguenther@suse.de>
7709         PR tree-optimization/87402
7710         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
7711         (visit_phi): Re-instantiate handling of supposed to be VARYING
7712         but non-VARYING backedge value.
7714 2018-09-25  Richard Biener  <rguenther@suse.de>
7716         PR debug/83941
7717         * dwarf2out.c (struct sym_off_pair): New.
7718         (external_die_map): New global.
7719         (lookup_decl_die): When in LTO create DIEs lazily from the
7720         external_die_map.
7721         (lookup_block_die): New function, create DIEs lazily in LTO.
7722         (equate_block_to_die): New function.
7723         (dwarf2out_die_ref_for_decl): During WPA get the association
7724         from the external DIE map.
7725         (dwarf2out_register_external_die): Record mapping into the
7726         external DIE map.
7727         (maybe_create_die_with_external_ref): New function split out from
7728         DIE generation part of old dwarf2out_register_external_die.
7729         (add_abstract_origin_attribute): Do not return the DIE.  When
7730         in LTO reference externals directly.
7731         (dwarf2out_abstract_function): When in LTO ignore calls for
7732         decls with external DIEs (already present abstract instances).
7733         (gen_call_site_die): Adjust.
7734         (add_high_low_attributes): Likewise.
7735         (gen_lexical_block_die): Likewise.
7736         (gen_inlined_subroutine_die): Likewie.
7737         (gen_block_die): Likewise.
7738         (dwarf2out_inline_entry): Likewise.
7739         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
7740         DIEs.
7742 2018-09-25  Martin Liska  <mliska@suse.cz>
7744         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
7745         integers and not by a float value.
7747 2018-09-25  Martin Liska  <mliska@suse.cz>
7749         PR fortran/87394
7750         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
7751         instead of NULL.
7752         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
7753         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
7754         * godump.c (go_format_type): Remove extra parenthesis.
7756 2018-09-25  Martin Liska  <mliska@suse.cz>
7758         * alias.c (set_dest_equal_p): Remove unused function.
7759         * config/i386/i386.c (def_builtin_pure2): Likewise.
7760         * diagnostic-show-locus.c (class layout): Remove
7761         unused field.
7762         (layout::layout): Likewise here.
7763         * dump-context.h (class temp_dump_context): Likewise.
7764         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
7765         (add_AT_loclistsptr): Likewise.
7766         (add_AT_offset): Likewise.
7767         (get_AT_hi_pc): Likewise.
7768         (is_comdat_die): Likewise.
7769         (type_is_enum): Likewise.
7770         (ceiling): Likewise.
7771         (add_AT_vms_delta): Likewise.
7772         (is_class_die): Likewise.
7773         * edit-context.c (class line_event): Remove unused field.
7774         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
7775         unused function.
7776         * ipa-cp.c (ipa_get_vr_lat): Likewise.
7777         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
7778         (ok_for_base_p_nonstrict): Likewise.
7779         * tree-chrec.c (is_not_constant_evolution): Likewise.
7780         (chrec_fold_poly_cst): Likewise.
7781         * tree-if-conv.c (has_pred_critical_p): Likewise.
7782         * tree-ssa-coalesce.c (print_exprs): Likewise.
7783         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
7784         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
7785         * tree-vrp.c (value_ranges_intersect_p): Likewise.
7786         (value_range_nonnegative_p): Likewise.
7788 2018-09-25  Martin Liska  <mliska@suse.cz>
7790         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
7791         Do not handle "GNU Pascal".
7792         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
7793         Likewise.
7794         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
7795         from documentation. Likewise.
7796         * dbxout.c (dbxout_range_type): Likewise.
7797         * doc/cpp.texi: Likewise.
7798         * doc/extend.texi: Likewise.
7799         * doc/frontends.texi: Likewise.
7800         * doc/invoke.texi: Remove Pascal entry.
7801         * tree.def (CLEANUP_POINT_EXPR): Likewise.
7802         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
7804 2018-09-25  Martin Liska  <mliska@suse.cz>
7806         PR middle-end/86078
7807         * doc/invoke.texi: Document all parameters and remove default
7808         of the parameters.
7810 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
7812         PR bootstrap/87417
7813         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
7814         contains HOST_WIDE_INTs when computing its size.
7816 2018-09-24  Jim Wilson  <jimw@sifive.com>
7818         PR target/87391
7819         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
7820         not TARGET_RVE.
7821         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
7823 2018-09-24  Andrew Pinski  <apinski@marvell.com>
7825         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
7826         access prev before checking it for NULLness in the
7827         AARCH64_FUSE_CMP_BRANCH case.
7829 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
7831         PR target/82699
7832         * config/i386/i386.c (rest_of_insert_endbranch): Set
7833         endbr_queued_at_entrance to true and don't insert ENDBR if
7834         x86_function_profiler will be called.
7835         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
7836         is true.
7837         * config/i386/i386.h (machine_function): Add
7838         endbr_queued_at_entrance.
7840 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
7842         * genattrtab.c (mk_attr_alt): Use alternative_mask.
7843         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
7844         types.
7845         (check_attr_test): Use alternative_mask.
7846         (get_attr_value): Likewise.
7847         (compute_alternative_mask): Use alternative_mask and XWINT.
7848         (make_alternative_compare): Use alternative_mask.
7849         (attr_alt_subset_p): Use XWINT.
7850         (attr_alt_subset_of_compl_p): Likewise.
7851         (attr_alt_intersection): Use alternative_mask and XWINT.
7852         (attr_alt_union): Likewise.
7853         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
7854         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
7855         (simplify_test_exp): Use alternative_mask and XWINT.
7856         (write_test_expr): Use alternative_mask and XWINT, adjust bit
7857         number calculation to support 64 bits.  Generate code that
7858         checks 64-bit masks.
7859         (main): Use alternative_mask.
7860         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
7862 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
7864         PR target/80080
7865         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
7866         RETURN+USE when returning via %r14.
7868 2018-09-24  Martin Liska  <mliska@suse.cz>
7870         * gcov.c (output_lines): Print colorization legend
7871         for both flag_use_colors and flag_use_hotness_colors.
7872         Reword the help.
7874 2018-09-24  Martin Liska  <mliska@suse.cz>
7876         * coverage.c (get_coverage_counts): Use warning_at
7877         with current_function_decl location. Use %qD in warning
7878         message.
7880 2018-09-24  Martin Liska  <mliska@suse.cz>
7882         * memory-block.h (memory_block_pool::release): Annotate with
7883         valgrind that the memory is not accessible.
7885 2018-09-24  Martin Liska  <mliska@suse.cz>
7887         PR sanitizer/85774
7888         * asan.c: Make asan_handled_variables extern.
7889         * asan.h: Likewise.
7890         * cfgexpand.c (expand_stack_vars): Make sure
7891         a representative is unpoison if another
7892         variable in the partition is handled by
7893         use-after-scope sanitization.
7895 2018-09-24  Richard Biener  <rguenther@suse.de>
7897         PR tree-optimization/63155
7898         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
7899         the worklist when the edge of the respective argument isn't
7900         executable.
7902 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7904         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
7905         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
7906         (MASK_CLASS_P): Update for rename.
7907         (MAYBE_MASK_CLASS_P): Ditto.
7908         (REG_CLASS_NAMES): Update.
7909         (REG_CLASS_CONTENT): Update.
7910         * config/i386/i386.c (regclass_map): Update for MASK_REG
7911         and ALL_MASK_REGS rename.
7912         * config/i386/constraints.md (Yk): Update for rename.
7913         (k): Ditto.
7915 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7917         * config/i386/i386.h (enum reg_class): Remove
7918         EVEX_SSE_REGS and MOD4_SSE_REGS.
7919         (REG_CLASS_NAMES): Update.
7920         (REG_CLASS_CONTENT): Update.
7921         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7922         registers as ALL_SSE_REGS.
7923         (ix86_additional_allocno_class_p): Remove.
7924         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7925         (ix86_register_priority): Lower priority of EVEX SSE registers.
7926         Use IN_RANGE macro where appropriate.
7927         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7928         AVX-5124VNNIW checks.
7929         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7930         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7931         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7932         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7933         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7934         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7935         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7936         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7937         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7938         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7939         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7940         * config/i386/constraints.md (Yh): Remove.
7942 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7944         * config/i386/i386.c (regclass_map): Declare integer REX registers
7945         as GENERAL_REGS.
7947 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
7949         * doc/service.texi (Service): Switch the fsf.org link to https.
7951 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7953         PR target/86798
7954         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7955         Define to speculation_safe_value_not_needed.
7957 2018-09-21  Florian Weimer  <fweimer@redhat.com>
7959         PR middle-end/81035
7960         * doc/extend.texi (Common Function Attributes): Mention that
7961         noreturn suppresses tail call optimization.
7963 2018-09-21  Jeff Law  <law@redhat.com>
7965         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7966         vr_values::cleanup_edges_and_switches.
7967         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7968         vr_values class.
7969         (identify_jump_threads): Remove EDGE_IGNORE handling.
7970         (execute_vrp): Move handling of to_remove_edges and
7971         to_update_switch_stmts into vr_values class member functions.
7972         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7973         (to_update_switch_stmts): Likewise.
7974         * vr-values.c: Include cfghooks.h.
7975         (vr_values::vr_values): Initialize to_remove_edges and
7976         to_update_switch_stmts.
7977         (vr_values::~vr_values): Verify to_remove_edges and
7978         to_update_switch_stmts are empty.
7979         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7980         (vr_values::cleanup_edges_and_switches): New member function.
7981         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7982         function.  Add new data members.
7984 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
7986         PR tree-optimization/87309
7987         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7988         calls with pflags and alt_flags.
7989         (selftest::test_capture_of_dump_calls): Add test of interaction of
7990         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7992 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7994         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7996 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7998         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
8000 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8002         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
8003         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
8004         (VXWORKS_LIBS_RTP): Minor reordering.
8006 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8008         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
8009         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
8011 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8013         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
8014         (PTRDIFF_TYPE): Likewise.
8016 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8018         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
8019         triplet, similar to support for VxWorks7.
8020         * config/vxworks-dummy.h: Provide a default definition
8021         of TARGET_VXWORKS64 to 0.
8023 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8025         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
8026         * config/vxworks-dummy.h: here.
8028 2018-09-21  Olivier Hainque  <hainque@adacore.com>
8030         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
8032 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
8033             Bo Zhou  <zbo.zhou@hisilicon.com>
8035         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
8036         * config/aarch64/aarch64-tune.md: Regenerated.
8037         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
8038         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8039         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
8041 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
8042             Julian Brown  <julian@codesourcery.com>
8044         * builtins.c (get_builtin_sync_mem): Handle address spaces.
8046 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8048         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
8049         if the call takes a static chain.
8051 2018-09-21  Martin Liska  <mliska@suse.cz>
8053         * auto-profile.c (autofdo_source_profile::read): Do not
8054         set sum_all.
8055         (read_profile): Do not add working sets.
8056         (read_autofdo_file): Remove sum_all.
8057         (afdo_callsite_hot_enough_for_early_inline): Remove const
8058         qualifier.
8059         * coverage.c (struct counts_entry): Remove gcov_summary.
8060         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
8061         do not support GCOV_TAG_PROGRAM_SUMMARY.
8062         (get_coverage_counts): Remove summary and expected
8063         arguments.
8064         * coverage.h (get_coverage_counts): Likewise.
8065         * doc/gcov-dump.texi: Remove -w option.
8066         * gcov-dump.c (dump_working_sets): Remove.
8067         (main): Do not support '-w' option.
8068         (print_usage): Likewise.
8069         (tag_summary): Likewise.
8070         * gcov-io.c (gcov_write_summary): Do not dump
8071         histogram.
8072         (gcov_read_summary): Likewise.
8073         (gcov_histo_index): Remove.
8074         (gcov_histogram_merge): Likewise.
8075         (compute_working_sets): Likewise.
8076         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
8077         it not obsolete.
8078         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
8079         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
8080         (GCOV_HISTOGRAM_SIZE): Remove.
8081         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
8082         (struct gcov_summary): Simplify rapidly just
8083         to runs and sum_max fields.
8084         (gcov_histo_index): Remove.
8085         (NUM_GCOV_WORKING_SETS): Likewise.
8086         (compute_working_sets): Likewise.
8087         * gcov-tool.c (print_overlap_usage_message): Remove
8088         trailing empty line.
8089         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
8090         (output_lines): Remove program related line.
8091         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
8092         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
8093         histogram.
8094         (input_profile_summary): Do not read it.
8095         (merge_profile_summaries): And do not merge it.
8096         (input_symtab): Do not call removed function.
8097         * modulo-sched.c (sms_schedule): Do not print sum_max.
8098         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
8099         removed when histogram method was invented.
8100         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
8101         mode.
8102         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
8103         GCOV coding style.
8104         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
8105         and dump selected value.
8106         * profile.c (add_working_set): Remove.
8107         (get_working_sets): Likewise.
8108         (find_working_set): Likewise.
8109         (get_exec_counts): Do not work with working sets.
8110         (read_profile_edge_counts): Do not inform as sum_max is removed.
8111         (compute_branch_probabilities): Likewise.
8112         (compute_value_histograms): Remove argument for call of
8113         get_coverage_counts.
8114         * profile.h: Do not make gcov_summary const.
8116 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
8118         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
8120 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
8122         PR tree-optimization/86990
8123         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
8124         Check that the entire merged store group is made of constants only for
8125         overlapping stores.
8127 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8129         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8130         (VTABLE_VERIFICATION_SPEC): Likewise.
8131         (SANITIZER_EARLY_SPEC): Likewise.
8132         (SANITIZER_SPEC): Likewise.
8133         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8134         * doc/invoke.texi (Link Options): Document -r.
8136 2018-09-20  Richard Biener <rguenther@suse.de>
8138         PR middle-end/87054
8139         * gimplify.c (gimplify_expr): Retain alignment of
8140         addressable lvalue in dereference.
8142 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
8144         PR bootstrap/87013
8145         * configure.ac: Check for .loc is_stmt support.
8146         * configure, config.in: Rebuilt.
8147         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8148         if not supported.
8150 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8152         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8153         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8154         -misel=no.
8156 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8158         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8159         VECTOR_OTHER.
8160         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8161         case VECTOR_OTHER.
8163 2018-09-20  Marek Polacek  <polacek@redhat.com>
8165         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8167 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8169         PR tree-optimization/87288
8170         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8171         into account when determining PEELING_FOR_NITERS.
8173 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8175         PR tree-optimization/86877
8176         * tree-vect-loop.c (vect_analyze_loop_2): Call
8177         vect_verify_datarefs_alignment.
8179 2018-09-19  Marek Polacek  <polacek@redhat.com>
8181         * doc/invoke.texi: Document -Wclass-conversion.
8183 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
8185         * config/pa/pa.c (pa_adjust_priority): Delete.
8186         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8188         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8189         (atomic_storehi): Likewise.
8190         (atomic_storesi): Likewise.
8191         (atomic_loaddi): Restore compare and swap exchange loop code.
8193 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
8195         PR rtl-optimization/86902
8196         * combine.c (try_combine): When changing the CC mode used, don't change
8197         an unrelated mode in other_insn to that new CC mode.
8199 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
8201         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8202         with %T in place of calls to dump_generic_expr.
8203         (prune_runtime_alias_test_list): Likewise.
8204         (create_runtime_alias_checks): Likewise.
8205         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8206         (vect_analyze_data_ref_dependence): Likewise.
8207         (vect_slp_analyze_data_ref_dependence): Likewise.
8208         (vect_record_base_alignment): Likewise.  Use %G in place of call
8209         to dump_gimple_stmt.
8210         (vect_compute_data_ref_alignment): Likewise.
8211         (verify_data_ref_alignment): Likewise.
8212         (vect_find_same_alignment_drs): Likewise.
8213         (vect_analyze_group_access_1): Likewise.
8214         (vect_analyze_data_ref_accesses): Likewise.
8215         (dependence_distance_ge_vf): Likewise.
8216         (dump_lower_bound): Likewise.
8217         (vect_prune_runtime_alias_test_list): Likewise.
8218         (vect_find_stmt_data_reference): Likewise.
8219         (vect_analyze_data_refs): Likewise.
8220         (vect_create_addr_base_for_vector_ref): Likewise.
8221         (vect_create_data_ref_ptr): Likewise.
8222         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8223         (vect_can_advance_ivs_p): Likewise.
8224         (vect_update_ivs_after_vectorizer): Likewise.
8225         (vect_gen_prolog_loop_niters): Likewise.
8226         (vect_prepare_for_masked_peels): Likewise.
8227         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8228         (vect_determine_vectorization_factor): Likewise.
8229         (vect_is_simple_iv_evolution): Likewise.
8230         (vect_analyze_scalar_cycles_1): Likewise.
8231         (vect_analyze_loop_operations): Likewise.
8232         (report_vect_op): Likewise.
8233         (vect_is_slp_reduction): Likewise.
8234         (check_reduction_path): Likewise.
8235         (vect_is_simple_reduction): Likewise.
8236         (vect_create_epilog_for_reduction): Likewise.
8237         (vect_finalize_reduction:): Likewise.
8238         (vectorizable_induction): Likewise.
8239         (vect_transform_loop_stmt): Likewise.
8240         (vect_transform_loop): Likewise.
8241         (optimize_mask_stores): Likewise.
8242         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8243         (vect_split_statement): Likewise.
8244         (vect_recog_over_widening_pattern): Likewise.
8245         (vect_recog_average_pattern): Likewise.
8246         (vect_determine_min_output_precision_1): Likewise.
8247         (vect_determine_precisions_from_range): Likewise.
8248         (vect_determine_precisions_from_users): Likewise.
8249         (vect_mark_pattern_stmts): Likewise.
8250         (vect_pattern_recog_1): Likewise.
8251         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8252         (vect_record_max_nunits): Likewise.
8253         (vect_build_slp_tree_1): Likewise.
8254         (vect_build_slp_tree_2): Likewise.
8255         (vect_print_slp_tree): Likewise.
8256         (vect_analyze_slp_instance): Likewise.
8257         (vect_detect_hybrid_slp_stmts): Likewise.
8258         (vect_detect_hybrid_slp_1): Likewise.
8259         (vect_slp_analyze_operations): Likewise.
8260         (vect_slp_analyze_bb_1): Likewise.
8261         (vect_transform_slp_perm_load): Likewise.
8262         (vect_schedule_slp_instance): Likewise.
8263         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8264         (vect_mark_stmts_to_be_vectorized): Likewise.
8265         (vect_init_vector_1): Likewise.
8266         (vect_get_vec_def_for_operand): Likewise.
8267         (vect_finish_stmt_generation_1): Likewise.
8268         (vect_check_load_store_mask): Likewise.
8269         (vectorizable_call): Likewise.
8270         (vectorizable_conversion): Likewise.
8271         (vectorizable_operation): Likewise.
8272         (vectorizable_load): Likewise.
8273         (vect_analyze_stmt): Likewise.
8274         (vect_is_simple_use): Likewise.
8275         (vect_get_vector_types_for_stmt): Likewise.
8276         (vect_get_mask_type_for_stmt): Likewise.
8277         * tree-vectorizer.c (increase_alignment): Likewise.
8279 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
8281         * doc/rtl.texi: Adjust vec_select description.
8282         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8283         non-constant selectors.
8285 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
8287         * config/aarch64/aarch64-protos.h
8288         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8289         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8290         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8291         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8292         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8293         (AARCH64_FL_PROFILE): Move index so flags are ordered.
8294         (AARCH64_ISA_RCPC8_4): New flag.
8295         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8296         to aarch64_offset_9bit_signed_unscaled_p.
8297         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8298         and use stlur.
8299         * config/aarch64/constraints.md (Ust): New constraint.
8300         * config/aarch64/predicates.md.
8301         (aarch64_9bit_offset_memory_operand): New predicate.
8302         (aarch64_rcpc_memory_operand): New predicate.
8304 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
8306         PR rtl-optimization/87361
8307         * rtlanal.c (nonzero_bits1): Revert accidental change.
8309 2018-09-19  Richard Biener  <rguenther@suse.de>
8311         PR tree-optimization/87349
8312         PR tree-optimization/87342
8313         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8315 2018-09-18  Marek Polacek  <polacek@redhat.com>
8317         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8318         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8320 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8322         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8324 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8326         PR rtl-optimization/86882
8327         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8329 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
8331         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8332         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
8334 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
8336         PR other/87353
8337         * doc/invoke.texi (Link Options): Fix formatting and grammar.
8339 2018-09-18  Richard Biener  <rguenther@suse.de>
8341         PR middle-end/63155
8342         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
8343         (compute_samebase_partition_bases): Likewise.
8344         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
8345         (gimple_can_coalesce_p): Simplify.
8347 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
8349         Handle a library implementation of ffs calling __builtin_ffs.
8350         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
8351         (mmix_init_libfuncs): New function: make __builtin_ffs expand
8352         to __ffsdi2.
8354 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8356         * diagnostic-show-locus.c (class layout_range): Add field
8357         "m_original_idx".
8358         (layout_range::layout_range): Add "original_idx" param and use it
8359         to initialize new field.
8360         (make_range): Use 0 for original_idx.
8361         (layout::layout): Pass in index to calls to
8362         maybe_add_location_range.
8363         (layout::maybe_add_location_range): Add param "original_idx" and
8364         pass it on to layout_range.
8365         (layout::print_any_labels): Pass on range->m_original_idx to
8366         get_text call.
8367         (gcc_rich_location::add_location_if_nearby): Use 0 for
8368         original_idx.
8369         * gcc-rich-location.h (text_range_label::get_text): Update for new
8370         param.
8371         (range_label_for_type_mismatch::get_text): Likewise.
8373 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
8375         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
8377 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8379         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
8380         format_string_diagnostic_t.
8381         (fmtwarn_n): Likewise.
8382         * substring-locations.c
8383         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
8384         (format_warning_n_va): Convert to...
8385         (format_string_diagnostic_t::emit_warning_n_va): ...this.
8386         (format_warning_va): Convert to...
8387         (format_string_diagnostic_t::emit_warning_va): ...this.
8388         (format_warning_at_substring): Convert to...
8389         (format_string_diagnostic_t::emit_warning): ...this.
8390         (format_warning_at_substring_n): Convert to...
8391         (format_string_diagnostic_t::emit_warning_n): ...this.
8392         * substring-locations.h (class format_string_diagnostic_t): New
8393         class.
8394         (format_warning_va): Convert to
8395         format_string_diagnostic_t::emit_warning_va.
8396         (format_warning_n_va): Convert to
8397         format_string_diagnostic_t::emit_warning_n_va.
8398         (format_warning_at_substring): Convert to
8399         format_string_diagnostic_t::emit_warning.
8400         (format_warning_at_substring_n): Convert to
8401         format_string_diagnostic_t::emit_warning_n.
8403 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
8404             Bernd Schmidt <bernds_cb1@t-online.de>
8406         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
8407         SImode args.
8409 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
8411         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
8412         operand 0 predicate to nonimmediate operand.
8413         (rint<mode>2_frndint): Remove insn pattern.
8414         (rint<mode>2): Change operand 1 predicate to general_operand.
8415         Extend operand 1 to XFmode and generate rintxf2 insn.
8416         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
8417         Do not use X87MODEF mode macro.
8418         (frndintxf2_<rounding>_i387): Rename from
8419         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
8420         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
8421         to XFmode and generate significandxf3 insn.
8423 2018-09-17  Richard Biener  <rguenther@suse.de>
8425         PR tree-optimization/87328
8426         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
8427         visiting unexecutable backedges when not iterating.
8428         (do_rpo_vn): Mark all edges not executable even when not
8429         iterating.
8431 2018-09-17  Martin Jambor  <mjambor@suse.cz>
8433         PR c/63886
8434         * doc/invoke.texi (Warning Options): Likewise.
8436 2018-09-17  Richard Biener  <rguenther@suse.de>
8438         PR tree-optimization/87301
8439         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
8440         clean EH info from leftover copy assignments.
8442 2018-09-17  Martin Liska  <mliska@suse.cz>
8444         PR gcov-profile/85871
8445         * gcov.c (output_intermediate_file): Fix out of bounds
8446         access.
8448 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
8450         * config/arc/arc.c: Object attributes for core4 not reflected
8451         correctly.
8452         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
8453         core3).
8455 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
8457         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
8459 2018-09-17  Martin Liska  <mliska@suse.cz>
8461         * doc/gcov.texi: Document new option --use-hotness-colors.
8462         * gcov.c (struct source_info): Declare new field.
8463         (source_info::source_info): Set default for maximum_count.
8464         (print_usage): Add new -q option.
8465         (process_args): Process it.
8466         (accumulate_line_info): Save src->maximum_count.
8467         (output_line_beginning): Make color line number if
8468         flag_use_hotness_colors is set.
8469         (output_line_details): Pass default argument value.
8470         (output_lines): Pass src->maximum_count.
8472 2018-09-17  Martin Liska  <mliska@suse.cz>
8474         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
8475         Use processor_names table.
8476         * config/i386/i386.c (ix86_default_align): Use
8477         processor_cost_table for alignment values.
8478         (ix86_option_override_internal): Use processor_names.
8479         (ix86_function_specific_print): Likewise.
8480         * config/i386/i386.h (struct processor_costs):
8481         Add alignment values.
8482         (struct ptt): Remove and replace with const char *.
8483         * config/i386/x86-tune-costs.h (struct processor_costs):
8484         Declare default alignments for all costs.
8486 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
8488         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
8489         symbolics or VR_VARYING ranges for ABS_EXPR.
8490         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
8491         when range will wrap.
8493 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
8495         PR middle-end/86864
8496         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
8497         before and after a JUMP_TABLE_DATA.
8499 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
8501         PR middle-end/87188
8502         * dojump.c (do_compare_and_jump): Canonicalize function pointers
8503         when one operand is a function pointer.  Use POINTER_TYPE_P and
8504         FUNC_OR_METHOD_TYPE_P.
8505         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
8506         * fold-const.c (build_range_check): Likewise.
8507         * match.pd (simple_comparison): Likewise.
8509 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
8511         PR c/82967
8512         * spellcheck.c (get_edit_distance_cutoff): New function.
8513         (selftest::test_edit_distance_unit_test_oneway): Rename to...
8514         (selftest::test_get_edit_distance_one_way): ...this.
8515         (selftest::test_get_edit_distance_unit): Rename to...
8516         (selftest::test_get_edit_distance_both_ways): ...this.
8517         (selftest::test_edit_distances): Move tests to this new function,
8518         and test some more pairs of strings.  Update for above renaming.
8519         (selftest::get_old_cutoff): New function.
8520         (selftest::test_get_edit_distance_cutoff): New function.
8521         (selftest::assert_suggested_for): New function.
8522         (ASSERT_SUGGESTED_FOR): New macro.
8523         (selftest::assert_not_suggested_for): New function.
8524         (ASSERT_NOT_SUGGESTED_FOR): New macro.
8525         (selftest::test_suggestions): New function.
8526         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
8527         tests to selftest::test_edit_distances and call it.  Add calls to
8528         selftest::test_get_edit_distance_cutoff and
8529         selftest::test_suggestions.
8530         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
8531         (best_match::consider): Replace hard-coded cutoff calculation with
8532         a call to...
8533         (best_match::get_cutoff): New declaration.
8534         (best_match::get_best_meaningful_candidate): Likewise.
8536 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8538         * builtins.c (fold_builtin_strlen): Remove TODO comment.
8540 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8542         revert:
8543         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8545         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8546         terminated string literal.
8548 2018-09-14  Martin Sebor  <msebor@redhat.com>
8550         * builtins.c (unterminated_array): Handle ARRAY_REF.
8551         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
8552         * builtins.h (unterminated_array): Declare extern.
8553         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
8554         arrays.
8555         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
8556         calls.
8558 2018-09-14  Martin Sebor  <msebor@redhat.com>
8559             Jeff Law  <law@redhat.com>
8561         * builtins.c (unterminated_array): New.
8562         (expand_builtin_strcpy): Adjust.
8563         (expand_builtin_strcpy_args): Detect unterminated arrays.
8564         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
8565         unterminated arrays.
8566         * gimple-fold.h (get_maxval_strlen): Add argument.
8567         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
8569         * gimple-fold.c (get_range_strlen): Add argument.
8570         (get_maxval_strlen): Adjust.
8571         * gimple-fold.h (get_range_strlen): Add argument.
8573 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
8575         * config/i386/movdirintrin.h: Fix copyright year.
8577 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
8579         * reg-stack.c: Include regs.h.
8580         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
8581         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
8582         FIRST_STACK_REG, not DFmode.
8583         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
8584         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
8585         (change stack): Default register mode to the reg_raw_mode of
8586         FIRST_STACK_REG, not DFmode.
8587         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
8588         (*swapxf): Rename from swapxf.
8590 2018-09-14  Carl Love  <cel@us.ibm.com>
8592         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
8593         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
8595 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
8597         PR target/87224
8598         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
8599         alternatives.
8601 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
8603         PR target/85628
8604         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
8606 2018-09-14  Jason Merrill  <jason@redhat.com>
8608         Fix --enable-gather-detailed-mem-stats.
8609         * hash-table.c (hash_table_usage): Change from variable to function.
8610         * hash-table.h: Adjust.
8611         * Makefile.in: Add missing dependencies on hash-table.h.
8613 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8615         PR tree-optimization/87259
8616         PR lto/87283
8617         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
8618         execute_cse_reciprocals_1 has tried transforming.
8620 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
8622         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
8623         VR_VARYING for PLUS/MINUS_EXPR.
8625 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
8627         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
8628         formatting.
8630 2018-09-14  Richard Biener  <rguenther@suse.de>
8632         PR middle-end/63155
8633         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
8634         bits for the merged partition.
8636 2018-09-13  Martin Sebor  <msebor@redhat.com>
8637             Bernd Edlinger  <bernd.edlinger@hotmail.de>
8639         * builtins.h (c_srlen): Add argument.
8640         * builtins.c (warn_string_no_nul): New function.
8641         (c_strlen): Add argument and use it.  Update recursive calls.
8642         Pass DECL argument to string_constant to get info on non
8643         terminated strings.  Update *NONSTR as needed.
8644         (fold_builtin_strlen): Add argument to calls to c_strlen.
8645         Warn for unterminated arrays.
8646         (warn_string_no_null): Add prototype.
8647         * expr.c (string_constant): Update arguments.  Update recursive
8648         calls appropriately.  Detect missing NUL terminator and outermost
8649         declaration its missing in.
8650         Improve checks for arrays with nonzero lower bound or elements
8651         that are not a single byte.  Simplify offset computation.
8652         Simplify checks for non-NUL terminated strings.
8653         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
8654         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
8656 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8658         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
8659         correctly.
8660         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
8661         argument.  Fix range checks.
8662         * fold-const.h (c_getstr): Adjust protoype.
8663         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
8664         string is constant but contains no NUL byte.
8666         * expr.c (string_constant): Adjust function comment.
8667         Remove bogus check for zero termination.
8669         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
8671         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
8672         (get_constant_size): Don't make STRING_CSTs larger than they are.
8673         (check_string_literal): New check function for STRING_CSTs.
8674         (output_constant): Use it.
8676 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
8678         PR target/86812
8679         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
8681 2018-09-13  Richard Biener  <rguenther@suse.de>
8683         PR tree-optimization/87263
8684         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
8685         (struct unwind_state): Add max_rpo field.
8686         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
8687         Compute max_rpo, the max RPO number a block can be backwards reached
8688         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
8689         separating it from the iterating mode.
8691 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
8693         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
8694         (rfs_decision): New scheduling decision.
8696 2018-09-13  Richard Biener  <rguenther@suse.de>
8698         PR bootstrap/87134
8699         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
8700         (vn_nary_op_insert_pieces_predicated): Do not write useless
8701         valid_dominated_by_p entry outside of the allocated storage.
8703 2018-09-13  Omar Sandoval  <osandov@osandov.com>
8704             Tom de Vries  <tdevries@suse.de>
8706         PR debug/86985
8707         * dwarf2out.c (is_c): New function.
8708         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
8710 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
8712         PR target/85628
8713         * config/aarch64/aarch64.md (*aarch64_bfxil):
8714         Define.
8715         * config/aarch64/constraints.md (Ulc): Define.
8716         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
8717         Define.
8718         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
8719         New function.
8721 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
8723         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
8724         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
8725         aarch64_layout_frame call.
8726         (aarch64_expand_epilogue): Likewise.
8727         (aarch64_initial_elimination_offset): Likewise.
8728         (aarch64_get_separate_components): Likewise.
8729         (aarch64_use_return_insn_p): Likewise.
8730         (aarch64_layout_frame): Remove unneeded check.
8732 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8734         * configure.ac: Only append
8735         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
8736         gcc_config_arguments if it was never reconfigured or last reconfigure
8737         was with different arguments.
8738         * configure: Regenerated.
8740 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8741             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8743         PR middle-end/87290
8744         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
8745         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8747 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8749         PR tree-optimization/87287
8750         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
8751         X % C == 0 to X % (unsigned) C == 0 optimization to ...
8752         * match.pd (X % C == 0): ... here.  New optimization.
8754 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8756         PR middle-end/82853
8757         * expr.h (maybe_optimize_mod_cmp): Declare.
8758         * expr.c (mod_inv): New function.
8759         (maybe_optimize_mod_cmp): New function.
8760         (do_store_flag): Use it.
8761         * cfgexpand.c (expand_gimple_cond): Likewise.
8763 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
8764             Julian Brown  <julian@codesourcery.com>
8766         PR middle-end/86336
8767         * gimplify.c (gimplify_scan_omp_clauses): Set
8768         target_firstprivatize_array_bases in OpenACC parallel and kernels
8769         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
8770         OpenACC data regions.
8772 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
8774         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
8775         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
8777 2018-09-12  Richard Biener  <rguenther@suse.de>
8779         PR tree-optimization/87280
8780         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
8781         edge but unreachable target.
8782         (do_rpo_vn): For conservatively handling a PHI only mark
8783         the backedge executable but not the block reachable.
8785 2018-09-12  Richard Biener  <rguenther@suse.de>
8787         PR tree-optimization/87266
8788         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
8789         visited blocks.
8791 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
8793         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
8794         constants.
8795         ("trunc<BFP:mode><DFP_ALL:mode>2")
8796         ("trunc<DFP_ALL:mode><BFP:mode>2")
8797         ("extend<BFP:mode><DFP_ALL:mode>2")
8798         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
8799         according to the target operand type.
8801 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8802             Andreas Krebbel  <krebbel@linux.ibm.com>
8804         PR tree-optimization/86844
8805         * gimple-ssa-store-merging.c
8806         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
8807         there are any overlapping stores in between them, make sure they are
8808         also coalesced or we give up completely.
8810 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8812         PR middle-end/87248
8813         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
8814         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
8816 2018-09-12  Tom de Vries  <tdevries@suse.de>
8818         * common.opt (gdescribe-dies): Add option.
8819         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
8820         attribute for artifical and nameless decls.
8821         (dwarf2out_register_external_die): Add description attribute to
8822         external reference die.
8823         (add_desc_attribute): New functions.
8824         (gen_subprogram_die): Add description attribute to
8825         DW_TAG_call_site_parameter.
8826         * tree-pretty-print.c (print_generic_expr_to_str): New function.
8827         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
8828         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
8829         -gno-describe-dies.
8830         (@item -gdescribe-dies): Add.
8832 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
8834         * tree-vrp.c (vrp_shift_undefined_p): Remove.
8835         (extract_range_from_binary_expr_1: Call
8836         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
8837         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
8838         depend on sign.
8840 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
8842         * gimple-ssa-warn-alloca.c
8843         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
8844         field for ALLOCA_BOUND_*_LARGE.
8846 2018-09-11  Nathan Sidwell  <nathan@acm.org>
8848         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
8850 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8852         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8853         for clobbers.  Remove obsolete comment.
8855 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8857         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
8858         mpxchk, mpxld and mpxst types.
8859         (define_attr length_immediate): Remove all processing of mpx types.
8860         (define_attr prefix_0f): Ditto.
8861         (define_attr memory): Ditto.
8863 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8865         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
8866         (log<mode>2): Change operand 1 predicate to general_operand.
8867         Extend operand 1 to XFmode and generate logxf3 insn.
8868         (log10<mode>2): Change operand 1 predicate to general_operand.
8869         Extend operand 1 to XFmode and generate log10xf3 insn.
8870         (log2<mode>2): Change operand 1 predicate to general_operand.
8871         Extend operand 1 to XFmode and generate log2xf3 insn.
8872         (fyl2xp1_extend<mode>xf3_i387): Remove.
8873         (log1p<mode>2): Change operand 1 predicate to general_operand.
8874         Extend operand 1 to XFmode and generate log1pxf3 insn.
8875         (fxtract_extend<mode>xf3_i387): Remove.
8876         (logb<mode>2): Change operand 1 predicate to general_operand.
8877         Extend operand 1 to XFmode and generate logbxf3 insn.
8878         (ilogb<mode>2): Change operand 1 predicate to general_operand.
8879         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
8880         (significand<mode>2): Change operand 1 predicate to general_operand.
8881         Extend operand 1 to XFmode and generate significandxf3 insn.
8883 2018-09-11  Nathan Sidwell  <nathan@acm.org>
8885         * gcc.c (perror_with_name, pfatal_with_name): Delete.
8886         (load_specs): Use fatal_error.
8887         (DELETE_IF_ORDINARY, process_command): Use error.
8888         (execute, run_attempt): Use fatal_error.
8890 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
8892         * diagnostic-core.h (sorry_at): New prototype.
8893         * diagnostic.c (sorry_at): New function.
8895 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
8897         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
8898         by zero as VR_UNDEFINED.
8900 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
8902         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
8903         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
8904         (<sincos>mode2): New expander.
8905         (sincos_extend<mode>xf3_i387): Remove insn pattern.
8906         (sincos -> sin, cos splitters): Remove splitter patterns.
8907         (sincos<mode>3): Change operand 2 predicate to general_operand.
8908         Extend operand 2 to XFmode and generate sincosxf3 insn.
8909         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8910         Change operand 3 predicate to const1_operand.
8911         (fptan_extend<mode>xf4_i387): Remove insn pattern.
8912         (tanxf2): Update operands in the call to fptanxf4_i387.
8913         (tan<mode>2): Change operand 1 predicate to general_operand.
8914         Extend operand 1 to XFmode and generate tanxf3 insn.
8915         (atan2xf3): Rename from *fpatanxf3_i387.
8916         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8917         (atan2xf3): Remove expander.
8918         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
8919         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8920         (atan<mode>2): Change operand 1 predicate to general_operand.
8921         Extend operand 1 to XFmode and generate atanxf3 insn.
8923 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
8925         * config/i386/i386.md (x87/SSE constant load splitter): Use
8926         memory_operand instead of nonimmediate_operand for input operand
8927         predicate.
8929 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
8931         * config/i386/i386.md (float partial SSE register stall splitter): Move
8932         splitter near its instruction pattern.
8933         (float_extend partial SSE register stall splitter): Ditto.
8934         (float_truncate partial SSE register stall splitter): Ditto.
8936 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
8938         PR target/86794
8939         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8940         to speculation_safe_value_not_needed.
8942         PR target/85666
8943         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8944         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8945         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8946         leaf_function_p, instead use has_hard_reg_initial_val.
8948 2018-09-09  Nathan Sidwell  <nathan@acm.org>
8950         * gcc.h (pfatal_with_name): Don't declare here.
8951         * gcc.c (pfatal_with_name): Make static.
8953 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
8955         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8956         earlyclobber.
8958 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
8960         PR rtl-optimization/85458
8961         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8962         priority hook to reduce the priority of EXPR.
8964 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
8966         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8967         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
8968         with X87_ENABLE_FLOAT.  Remove preparation code.
8969         (*float<SWI48:mode><MODEF:mode>2): Rename from
8970         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
8971         math using "enabled" attribute.
8972         (*floatdi<MODEF:mode>2_i387): Rename from
8973         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
8974         enable for 32bit targets only.
8975         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8976         splitter.
8977         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8978         as operand 1 predicate.  Rewrite as define_insn_and_split.
8979         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8981 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
8983         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8984         to fallthru to FLOAT case.
8986 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8988         PR target/86731
8989         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8990         around folding of vec_sl to handle out of range shift values.
8992 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
8994         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8995         Update callers to gen_fix_trunc<mode>_i387_fisttp
8996         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8997         nonimmediate_operand.
8998         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8999         and corresponding splitters.
9000         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
9001         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
9002         (fix_truncdi_i387_with_temp): Remove insn pattern
9003         and corresponding splitters.
9004         (fix_trunc<mode>_i387): Change operand 0 predicate to
9005         nonimmediate_operand.
9006         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
9007         and corresponding splitters.
9008         (*fistdi2_1): Remove.
9009         (fistdi2): Ditto.
9010         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
9011         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
9012         (*fist<mode>2_1): Remove.
9013         (fist<mode>2): Ditto.
9014         (fist<mode>2_with_temp): Remove insn pattern and corresponding
9015         splitters.
9016         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
9017         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
9018         (fistdi2_<rounding>): Change operand 0 predicate to
9019         nonimmediate_operand.
9020         (fistdi2_<rounding>_with_temp): Remove insn pattern
9021         and corresponding splitters.
9022         (fist<mode>2_<rounding>): Change operand 0 predicate to
9023         nonimmediate_operand.
9024         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
9025         and corresponding splitters.
9027         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
9029 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9031         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
9032         the init value.
9034 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9036         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9037         early gimple folding of vec_splat().
9038         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
9039         * gimple-fold.h: Add an extern define for tree_vec_extract().
9041 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
9043         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
9044         wrappers around TREE_TYPE comparisons.
9046 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9048         PR target/80080
9049         * config/s390/predicates.md: Add nonsym_memory_operand.
9050         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
9051         contains a SYMBOL_REF, load it into an intermediate pseudo.
9052         (s390_emit_compare_and_swap): Legitimize operand.
9053         * config/s390/s390.md: Use the new nonsym_memory_operand
9054         with UNSPECV_CAS patterns.
9056 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9058         PR target/80080
9059         * config/s390/s390-passes.def: New file.
9060         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
9061         declaration.
9062         (make_pass_s390_early_mach): Add declaration.
9063         * config/s390/s390.c (make_pass_s390_early_mach):
9064         (s390_option_override): Remove dynamic registration.
9065         * config/s390/t-s390: Add s390-passes.def.
9067 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
9069         * config/s390/s390.c (s390_decompose_constant_pool_ref):
9070         Remove UNSPEC_LTREL_BASE check.
9071         (annotate_constant_pool_refs): Likewise.
9072         (find_constant_pool_ref): Likewise.
9073         (find_ltrel_base): Removed.
9074         (replace_ltrel_base): Removed.
9075         (s390_mainpool_finish): Remove replace_ltrel_base call.
9076         (s390_chunkify_start): Remove pending LTREL_BASE logic.
9077         (s390_chunkify_finish): Remove replace_ltrel_base call.
9078         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
9080 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
9082         PR target/86779
9083         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9084         to speculation_safe_value_not_needed.
9086 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
9087             Bernd Schmidt  <bernds_cb1@t-online.de>
9089         * config/nvptx/nvptx-opts.h: New file.
9090         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
9091         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
9092         (ASM_SPEC): Define.
9093         (TARGET_SM35): New macro.
9094         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
9095         correct predicate.
9096         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
9097         values.
9098         (misa=): New option.
9099         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
9101 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
9103         * config/i386/i386.md (truncdfsf2): Remove expander.
9104         (truncdfsf2_with_temp): Ditto.
9105         (truncxf<mode>2): Ditto.
9106         (*truncdfsf_fast_mixed): Remove insn pattern.
9107         (*truncdfsf_fast_i387): Ditto.
9108         (*truncdfsf_mixed): Ditto.
9109         (*truncdfsf_i387): Ditto.
9110         (*truncdfsf2_i387_1): Ditto.
9111         (*truncxfsf2_mixed): Ditto.
9112         (*truncxfdf2_mixed): Ditto.
9113         (*truncxf<mode>2_i387_noop): Ditto. Update callers
9114         to call gen_truncxf<mode>2 instead.
9115         (*truncxf<mode>2_i387): Remove.
9116         (reg->reg splitters): Remove splitter pattern.
9117         (reg->mem splitters): Ditto.
9119         (truncdfsf2): New insn pattern.
9120         (truncxf<mode>2): Ditto.
9122 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9124         * tree-ssa-math-opts.c (is_mult_by): New function.
9125         (is_square_of): Use the above.
9126         (optimize_recip_sqrt): New function.
9127         (pass_cse_reciprocals::execute): Use the above.
9129 2018-09-05  Richard Biener  <rguenther@suse.de>
9131         PR bootstrap/87134
9132         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9133         to zero-init the emplaced vec.
9135 2018-09-05  Martin Liska  <mliska@suse.cz>
9137         PR tree-optimization/87205
9138         * tree-switch-conversion.c (pass_lower_switch::execute):
9139         Group cases for switch statements.
9141 2018-09-05  Richard Biener  <rguenther@suse.de>
9143         PR tree-optimization/87217
9144         * tree-ssa-sccvn.c (vuse_valueize): New.
9145         (vn_reference_lookup_pieces): Use it.
9146         (vn_reference_lookup): Likewise.
9148 2018-09-05  Nathan Sidwell  <nathan@acm.org>
9150         PR c++/87137
9151         * stor-layout.c (place_field): Scan forwards to check last
9152         bitfield when ms_bitfield_placement is in effect.
9154 2018-09-05  Richard Biener  <rguenther@suse.de>
9156         PR bootstrap/87225
9157         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9158         return.
9160 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9161             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9163         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9164         * config.gcc (extra_objs): Build it.
9165         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9166         Likewise.
9167         * config/aarch64/aarch64-passes.def
9168         (pass_tag_collision_avoidance): New pass.
9169         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9170         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9171         (aarch64_classify_address): Remove static qualifier.
9172         (aarch64_address_info, aarch64_address_type): Move to...
9173         * config/aarch64/aarch64-protos.h: ... here.
9174         (make_pass_tag_collision_avoidance): New function.
9175         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9176         New tuning flag.
9178 2018-09-05  Martin Liska  <mliska@suse.cz>
9180         * doc/gcov.texi: Update documentation of humar
9181         readable mode.
9182         * gcov.c (format_count): Print one decimal place, it provides
9183         more fine number of situations like '1G' vs. '1.4G'.
9185 2018-09-05  Martin Liska  <mliska@suse.cz>
9187         PR target/87164
9188         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9189         * optc-gen.awk: Allow 'Var' for Deprecated options in order
9190         to generate a MASK value.
9192 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
9194         PR debug/86593
9195         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9196         if frame pointer isn't used.
9197         (compute_frame_pointer_to_fb_displacement): Likewise.
9199 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
9201         PR target/87198
9202         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9203         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9204         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9205         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9206         and OPTION_MASK_ISA_XSAVEC_UNSET.
9208 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
9210         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9211         XOR operations in NAND case.
9213 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9215         * wide-int-range.cc (wide_int_range_convert): New.
9216         * wide-int-range.h (wide_int_range_convert): New.
9217         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9218         code into wide_int_range_convert.
9219         (extract_range_into_wide_ints): Do not munge anti range constants
9220         into the entire domain.  Just return the range back.
9222 2018-09-04  Martin Liska  <mliska@suse.cz>
9224         * genmatch.c (output_line_directive): Add new argument
9225         fnargs.
9226         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9228 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9230         * doc/invoke.texi (Option Summary): Add whitespace.
9232         * doc/invoke.texi (Option Summary): Add -Waligned-new.
9234 2018-09-04  Richard Biener  <rguenther@suse.de>
9236         PR tree-optimization/87211
9237         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9238         backedge value we're supposed to treat as VARYING also number
9239         the PHI to VARYING in case it got a different value-number already.
9241 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9243         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9244         (extract_range_from_binary_expr_1): Do not call
9245         vrp_can_optimize_bit_op.
9246         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9247         static.
9248         (wide_int_range_get_mask_and_bounds): New.
9249         (wide_int_range_optimize_bit_op): New.
9250         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9251         (wide_int_range_bit_and): Same.
9252         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9253         (wide_int_range_optimize_bit_op): New.
9254         (wide_int_range_get_mask_and_bounds): New.
9256 2018-09-04  Richard Biener  <rguenther@suse.de>
9258         PR tree-optimization/87176
9259         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9260         variable.  When value-numbering a virtual PHI node make sure
9261         to not value-number to the backedge value.
9263 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9265         * doc/extend.texi (Long Long, Hex Floats): Document support for
9266         long long and hex floats in more recent versions of ISO C++.
9268 2018-09-03  Richard Biener  <rguenther@suse.de>
9270         PR tree-optimization/87177
9271         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9272         cleanup.
9274 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9276         * bb-reorder.c (edge_order): Convert to C-qsort-style
9277         tri-state comparator.
9278         (reorder_basic_blocks_simple): Change std::stable_sort to
9279         gcc_stablesort.
9281 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9283         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9284         tri-state comparator.
9285         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9287 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9289         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
9290         (mergesort): ... here as maximum count for using netsort.
9291         (gcc_qsort): Set nlim to 3 if stable sort is requested.
9292         (gcc_stablesort): New.
9293         * system.h (gcc_stablesort): Declare.
9295 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9297         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9298         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
9299         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
9301 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
9303         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9304         lxsdx and stxsdx alternatives.
9305         (*mov<mode>_hardfloat64): Ditto.
9306         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9308 2018-09-03  Richard Biener  <rguenther@suse.de>
9310         PR tree-optimization/87200
9311         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9312         simplify result.
9314 2018-09-03  Martin Liska  <mliska@suse.cz>
9316         PR tree-optimization/87201
9317         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9318         Fix parenthesis in an expression.
9320 2018-09-03  Richard Biener  <rguenther@suse.de>
9322         PR tree-optimization/87197
9323         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9324         visited.  CSE the VN_INFO hashtable lookup.
9326         PR tree-optimization/87169
9327         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9328         iterating make sure there's no extra backedges from irreducible
9329         regions feeding the header.  Mark the destination block
9330         executable.
9332 2018-09-03  Martin Liska  <mliska@suse.cz>
9334         PR driver/83193
9335         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
9336         * common/common-targhooks.c (default_get_valid_option_values):
9337         New function.
9338         * common/common-targhooks.h (default_get_valid_option_values):
9339         Likewise.
9340         * common/config/i386/i386-common.c: Move processor_target_table
9341         from i386.c.
9342         (ix86_get_valid_option_values): New function.
9343         (TARGET_GET_VALID_OPTION_VALUES): New macro.
9344         * config/i386/i386.c (struct ptt): Move to i386-common.c.
9345         (PTA_*): Move all defined masks into i386-common.c.
9346         (ix86_function_specific_restore): Use new processor_cost_table.
9347         * config/i386/i386.h (struct ptt): Moved from i386.c.
9348         (struct pta): Likewise.
9349         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
9350         * doc/tm.texi.in: Likewise.
9351         * opt-suggestions.c (option_proposer::suggest_option):
9352         Pass prefix to build_option_suggestions.
9353         (option_proposer::get_completions): Likewise.
9354         (option_proposer::build_option_suggestions): Use the new target
9355         hook.
9356         * opts.c (struct option_help_tuple): New struct.
9357         (print_filtered_help): Use the new target hook.
9359 2018-09-03  Martin Liska  <mliska@suse.cz>
9361         PR middle-end/59521
9362         * predict.c (set_even_probabilities): Add likely_edges
9363         argument and handle cases where we have precisely one
9364         likely edge.
9365         (combine_predictions_for_bb): Catch also likely_edges.
9366         (tree_predict_by_opcode): Handle gswitch statements.
9367         * tree-cfg.h (find_case_label_for_value): New declaration.
9368         (find_taken_edge_switch_expr): Likewise.
9369         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9370         Find pivot in decision tree based on probabily, not by number of
9371         nodes.
9373 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
9375         * doc/standards.texi (Standards): Update Objective-C reference.
9377 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9379         * doc/install.texi (Prerequisites): Update link for MPC.
9381 2018-09-01  Michael Matz  <matz@suse.de>
9383         PR tree-optimization/87074
9384         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
9385         PHIs for outer-loop uses.
9387 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9389         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
9390         * doc/invoke.texi (C Dialect Options): Ditto.
9392 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9394         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
9396 2018-08-31  Richard Biener  <rguenther@suse.de>
9398         PR tree-optimization/87168
9399         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
9400         (rpo_elim::eliminate_avail): When OP was not visited it must
9401         be available.
9403 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
9405         * tree-vrp.c (copy_value_range): Convert param "from" from
9406         "value_range *" to "const value_range *".
9407         (range_is_null): Likewise for param "vr".
9408         (range_int_cst_p): Likewise.
9409         (range_int_cst_singleton_p): Likewise.
9410         (symbolic_range_p): Likewise.
9411         (value_ranges_intersect_p): Likewise for both params.
9412         (value_range_nonnegative_p): Likewise for param "vr".
9413         (value_range_constant_singleton): Likewise.
9414         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
9415         (extract_range_into_wide_ints): Likewise for param "vr".
9416         (extract_range_from_multiplicative_op): Likewise for params "vr0"
9417         and "vr1".
9418         (vrp_can_optimize_bit_op): Likewise.
9419         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
9420         "vr1_".
9421         (extract_range_from_unary_expr): Likewise.
9422         (debug_value_range): Likewise for param "vr".
9423         (value_range::dump): Add "const" qualifier.
9424         (vrp_prop::check_array_ref): Convert local "vr" from
9425         "value_range *" to "const value_range *".
9426         (vrp_prop::check_mem_ref): Likewise.
9427         (vrp_prop::visit_stmt): Likewise for local "old_vr".
9428         (vrp_intersect_ranges_1): Likewise for param "vr_1".
9429         (vrp_intersect_ranges): Likewise.
9430         (simplify_stmt_for_jump_threading): Likewise for local "vr".
9431         (vrp_prop::vrp_finalize): Likewise.
9432         * tree-vrp.h (value_range::dump): Add "const" qualifier.
9433         (vrp_intersect_ranges): Add "const" qualifier to params as above.
9434         (extract_range_from_unary_expr): Likewise.
9435         (value_range_constant_singleton): Likewise.
9436         (symbolic_range_p): Likewise.
9437         (copy_value_range): Likewise.
9438         (extract_range_from_binary_expr_1): Likewise.
9439         (range_int_cst_p): Likewise.
9440         (vrp_set_zero_nonzero_bits): Likewise.
9441         (range_int_cst_singleton_p): Likewise.
9443 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
9445         * config/aarch64/arm_neon.h (vabsd_s64): New.
9446         (vnegd_s64): Likewise.
9448 2018-08-31  Martin Jambor  <mjambor@suse.cz>
9450         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
9452 2018-08-31  Martin Liska  <mliska@suse.cz>
9454         * ipa-icf.c (sem_item::add_type): Use
9455         sem_item::m_type_hash_cache.
9456         * ipa-icf.h: Move the cache from sem_item_optimizer
9457         to sem_item.
9459 2018-08-31  Nathan Sidwell  <nathan@acm.org>
9461         * doc/extend.texi (Backwards Compatibility): Remove implicit
9462         extern C leeway of () being (...).
9464 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9466         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
9468 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
9470         PR target/86684
9471         PR target/87149
9472         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
9474 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
9476         PR middle-end/87138
9477         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
9478         gen_int_mode.  Formatting fixes.
9480 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
9482         * target.def (custom_function_descriptors): Improve documentation.
9483         * doc/tm.texi.in (Trampolines): Expand discussion of function
9484         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
9485         beginning of the section.
9486         * doc/tm.texi: Regenerated.
9488 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
9490         * cfg.h (class auto_edge_flag): Spell out the template-id of the
9491         base class in the initializer list.  This is a workaround for
9492         building with older GCC.
9493         (class auto_bb_flag): Likewise.
9495 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
9497         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
9498         (altivec_vcmpequ<VI_char>_p): Remove star.
9499         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
9500         vector load modes.
9501         (expand_strncmp_vec_sequence): New function.
9502         (emit_final_str_compare_vec): New function.
9503         (expand_strn_compare): Add support for vector strncmp.
9504         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
9505         length specification to bytes.
9506         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
9507         (vcmpnezb_p): New pattern.
9508         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
9509         for option -mstring-compare-inline-limit.
9511 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
9513         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
9514         (PTA_SKYLAKE): Add PTA_AES.
9515         (PTA_GOLDMONT): Likewise.
9517 2018-08-29  Jan Hubicka  <jh@suse.cz>
9519         PR lto/86517
9520         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
9521         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
9523 2018-08-29  Jan Hubicka  <jh@suse.cz>
9525         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
9526         TYPE_STUB_DECL.
9527         (hash_tree): Do not visit TYPE_STUB_DECL.
9528         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
9529         stream TYPE_STUB_DECL.
9530         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
9531         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
9532         after free_lang_data.
9533         (type_in_anonymous_namespace_p): Likewise.
9535 2018-08-29  Jan Hubicka  <jh@suse.cz>
9537         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9538         comment that it has to be even number.
9539         (class sreal): Change m_sig type to int32_t.
9540         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9541         int64_t for temporary calculations.
9542         (sreal_verify_basics): Drop one bit from minimum and maximum.
9544 2018-08-30  Richard Biener  <rguenther@suse.de>
9546         PR tree-optimization/87147
9547         * tree-ssa-sccvn.c (SSA_VISITED): New function.
9548         (visit_phi): When the degenerate result is from the backedge and
9549         we didn't visit its definition yet drop to VARYING.
9550         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
9552 2018-08-29  Jan Hubicka  <jh@suse.cz>
9554         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
9555         DECL_VINDEX.
9556         (hash_tree): Likewise.
9558 2018-08-29  Jan Hubicka  <jh@suse.cz>
9560         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
9561         and TYPE_NEXT_REF_TO.
9563 2018-08-29  Jan Hubicka  <jh@suse.cz>
9565         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9566         comment that it has to be even number.
9567         (class sreal): Change m_sig type to int32_t.
9568         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9569         int64_t for temporary calculations.
9570         (sreal_verify_basics): Drop one bit from minimum and maximum.
9572 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
9574         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
9576 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
9578         PR middle-end/86995
9579         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
9580         if to_add is negative.
9582 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9584         PR middle-end/87053
9585         * builtins.c (c_strlen): Improve range checks.
9587 2018-08-29  Martin Sebor  <msebor@redhat.com>
9588             Jeff Law  <law@redhat.com>
9590         PR tree-optimization/86714
9591         PR tree-optimization/86711
9592         * builtins.c (c_strlen): Add arguments to call to string_constant.
9593         * expr.c (string_constant): Add argument.  Detect missing nul
9594         terminator and outermost declaration it's missing in.
9595         * expr.h (string_constant): Add argument.
9596         * fold-const.c (read_from_constant_string): Add arguments to call to
9597         string_constant.
9598         (c_getstr): Likewise.
9599         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9600         to string_constant.
9601         * tree-ssa-strlen.c (get_stridx): Likewise.
9603 2018-08-29  Jan Hubicka  <jh@suse.cz>
9605         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
9606         Do not stream DECL_VINDEX.
9607         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
9608         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
9609         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
9611 2018-08-29  Richard Biener  <rguenther@suse.de>
9613         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
9614         virtual operands that are not default defs to honor region
9615         boundaries.
9616         (rpo_vn_valueize): Remove ineffective code here.
9618 2018-08-29  Richard Biener  <rguenther@suse.de>
9620         PR tree-optimization/87132
9621         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
9622         when skipping defs reachable over backedges.
9624 2018-08-29  Richard Biener  <rguenther@suse.de>
9626         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
9627         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
9628         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
9629         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
9630         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
9631         (vn_reference_lookup_3): Remove use of const_parms.
9632         (free_rpo_vn): Do not free const_parms.
9633         (do_rpo_vn): Do not call init_const_parms.
9634         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
9635         SSA_NAME_POINTS_TO_READONLY_MEMORY.
9636         (call_may_clobber_ref_p_1): Likewise.
9638 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
9640         PR other/86726
9641         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
9642         (-O): Ditto.
9643         (-ftree-scev-cprop): Document.
9645 2018-08-29  Jan Hubicka  <jh@suse.cz>
9647         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
9648         parameters.
9649         (sreal constructor): Update.
9650         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
9651         sreal:operator/): Update.
9653 2018-08-29  Martin Liska  <mliska@suse.cz>
9655         * tree-switch-conversion.c (switch_conversion::expand):
9656         Strenghten assumption about gswitch statements.
9658 2018-08-29  Richard Biener  <rguenther@suse.de>
9660         PR tree-optimization/87117
9661         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
9662         re-value-number released SSA VDEFs.
9664 2018-08-29  Richard Biener  <rguenther@suse.de>
9666         PR tree-optimization/87126
9667         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
9669 2018-08-28  Jim Wilson  <jimw@sifive.com>
9671         * config/riscv/pic.md: Rewrite.
9672         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
9673         invalid address.
9674         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
9675         (SOFTF, default_load, softload, softstore): New.
9677 2018-08-28  Jeff Law  <law@redhat.com>
9679         * fold-const.c (fold_binary_loc): Remove recently added assert.
9681 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
9683         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
9684         to OP parmeter of generated function.
9686 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
9688         PR tree-optimization/87009
9689         * match.pd: Add boolean optimizations.
9691 2018-08-28  Martin Sebor  <msebor@redhat.com>
9693         PR middle-end/86631
9694         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
9695         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
9696         (pass_walloca::gate): Use it.
9697         (alloca_call_type): Same.
9698         (pass_walloca::execute): Same.
9699         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
9701 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
9703         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
9704         GCC_VERSION for usage of "__gcc_dump_printf__" format from
9705         >= 3005 to >= 9000.
9707 2018-08-28  Richard Biener  <rguenther@suse.de>
9709         PR tree-optimization/87124
9710         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
9711         constants before looking up avail.
9713 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
9715         PR middle-end/87099
9716         * calls.c (maybe_warn_nonstring_arg): Punt early if
9717         warn_stringop_overflow is zero.  Don't call get_range_strlen
9718         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
9719         Swap comparison operands to have constants on rhs.  Only use
9720         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
9721         increment lenrng[0].
9723 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
9725         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
9726         use of tree_to_shwi.  Remove duplicated test for the size being
9727         a whole number of bytes.
9729 2018-08-28  Richard Biener  <rguenther@suse.de>
9731         PR tree-optimization/87117
9732         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
9733         Handle removed stmt without LHS (GIMPLE_NOP).
9735 2018-08-28  Richard Biener  <rguenther@suse.de>
9737         PR tree-optimization/87117
9738         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
9739         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
9741 2018-08-28  Richard Biener  <rguenther@suse.de>
9743         PR tree-optimization/87117
9744         * tree-ssa-pre.c (compute_avail): Do not make expressions
9745         with predicated values available.
9746         (get_expr_value_id): Assert we do not run into predicated value
9747         expressions.
9749 2018-08-28  Richard Biener  <rguenther@suse.de>
9751         PR tree-optimization/87117
9752         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
9753         get virtual operands.
9754         (get_expr_operands): Handle STRING_CST like other decls.
9756 2018-08-28  Martin Liska  <mliska@suse.cz>
9758         * tree.h: Update documentation of fndecl_built_in_p
9759         functions.
9762 2018-08-27  Jeff Law  <law@redhat.com>
9763         PR tree-optimization/87110
9764         * tree-ssa-dse.c (compute_trims): Handle non-constant
9765         TYPE_SIZE_UNIT.
9767 2018-08-27  Martin Sebor  <msebor@redhat.com>
9769         PR tree-optimization/86914
9770         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
9772 2018-08-27  Martin Sebor  <msebor@redhat.com>
9774         PR tree-optimization/87112
9775         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
9776         the type of the bound argument.
9778 2018-08-27  Jeff Law  <law@redhat.com>
9780         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
9781         type does not have a TYPE_SIZE_UNIT.
9783 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
9785         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
9786         with include of backend.h.
9788 2018-08-27  Richard Biener  <rguenther@suse.de>
9790         PR tree-optimization/86927
9791         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
9792         use const cond reduction code.
9794 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
9796         PR tree-optimization/85758
9797         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
9799 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
9801         PR c++/87091
9802         * diagnostic-show-locus.c (class layout_range): Update for
9803         conversion of show_caret_p to a tri-state.
9804         (layout_range::layout_range): Likewise.
9805         (make_range): Likewise.
9806         (layout::maybe_add_location_range): Likewise.
9807         (layout::should_print_annotation_line_p): Don't show annotation
9808         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
9809         (layout::get_state_at_point): Update for conversion of
9810         show_caret_p to a tri-state.  Bail out early for
9811         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
9812         underlining or source colorization.
9813         (gcc_rich_location::add_location_if_nearby): Update for conversion
9814         of show_caret_p to a tri-state.
9815         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
9816         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
9817         Likewise.
9818         (selftest::test_one_liner_labels): Likewise.
9819         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
9820         conversion of show_caret_p to a tri-state.
9821         * pretty-print.c (text_info::set_location): Likewise.
9822         * pretty-print.h (text_info::set_location): Likewise.
9823         * substring-locations.c (format_warning_n_va): Likewise.
9824         * tree-diagnostic.c (default_tree_printer): Likewise.
9825         * tree-pretty-print.c (newline_and_indent): Likewise.
9827 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
9829         PR c++/87091
9830         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
9831         line above for line-insertion fix-it hints.
9832         (selftest::test_fixit_insert_containing_newline): Update the
9833         expected results, and add a test with line-numbering enabled.
9835 2018-08-27  Martin Liska  <mliska@suse.cz>
9837         PR sanitizer/86962
9838         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
9839         params with DECL_HAS_VALUE_EXPR_P.
9841 2018-08-27  Martin Liska  <mliska@suse.cz>
9843         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
9844         selected expansion strategy.
9846 2018-08-27  Martin Liska  <mliska@suse.cz>
9848         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9849         * builtins.c (is_builtin_fn): Likewise.
9850         * attribs.c (diag_attr_exclusions): Use new function
9851         fndecl_built_in_p and remove check for FUNCTION_DECL if
9852         possible.
9853         (builtin_mathfn_code): Likewise.
9854         (fold_builtin_expect): Likewise.
9855         (fold_call_expr): Likewise.
9856         (fold_builtin_call_array): Likewise.
9857         (fold_call_stmt): Likewise.
9858         (set_builtin_user_assembler_name): Likewise.
9859         (is_simple_builtin): Likewise.
9860         * calls.c (gimple_alloca_call_p): Likewise.
9861         (maybe_warn_nonstring_arg): Likewise.
9862         * cfgexpand.c (expand_call_stmt): Likewise.
9863         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
9864         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
9865         (cgraph_node::verify_node): Likewise.
9866         * cgraphclones.c (build_function_decl_skip_args): Likewise.
9867         (cgraph_node::create_clone): Likewise.
9868         * config/arm/arm.c (arm_insert_attributes): Likewise.
9869         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
9870         * dse.c (scan_insn): Likewise.
9871         * expr.c (expand_expr_real_1): Likewise.
9872         * fold-const.c (operand_equal_p): Likewise.
9873         (fold_binary_loc): Likewise.
9874         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9875         * gimple-low.c (lower_stmt): Likewise.
9876         * gimple-pretty-print.c (dump_gimple_call): Likewise.
9877         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9878         Likewise.
9879         * gimple.c (gimple_build_call_from_tree): Likewise.
9880         (gimple_call_builtin_p): Likewise.
9881         (gimple_call_combined_fn): Likewise.
9882         * gimplify.c (gimplify_call_expr): Likewise.
9883         (gimple_boolify): Likewise.
9884         (gimplify_modify_expr): Likewise.
9885         (gimplify_addr_expr): Likewise.
9886         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
9887         * ipa-cp.c (determine_versionability): Likewise.
9888         * ipa-fnsummary.c (compute_fn_summary): Likewise.
9889         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
9890         * ipa-split.c (visit_bb): Likewise.
9891         (split_function): Likewise.
9892         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9893         * lto-cgraph.c (input_node): Likewise.
9894         * lto-streamer-out.c (write_symbol): Likewise.
9895         * omp-low.c (setjmp_or_longjmp_p): Likewise.
9896         (lower_omp_1): Likewise.
9897         * predict.c (strip_predict_hints): Likewise.
9898         * print-tree.c (print_node): Likewise.
9899         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
9900         * trans-mem.c (is_tm_irrevocable): Likewise.
9901         (is_tm_load): Likewise.
9902         (is_tm_simple_load): Likewise.
9903         (is_tm_store): Likewise.
9904         (is_tm_simple_store): Likewise.
9905         (is_tm_abort): Likewise.
9906         (tm_region_init_1): Likewise.
9907         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
9908         * tree-cfg.c (verify_gimple_call): Likewise.
9909         (move_stmt_r): Likewise.
9910         (stmt_can_terminate_bb_p): Likewise.
9911         * tree-eh.c (lower_eh_constructs_2): Likewise.
9912         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9913         * tree-inline.c (remap_gimple_stmt): Likewise.
9914         (copy_bb): Likewise.
9915         (estimate_num_insns): Likewise.
9916         (fold_marked_statements): Likewise.
9917         * tree-sra.c (scan_function): Likewise.
9918         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9919         (optimize_stack_restore): Likewise.
9920         (pass_fold_builtins::execute): Likewise.
9921         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9922         (mark_all_reaching_defs_necessary_1): Likewise.
9923         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9924         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9925         (pass_forwprop::execute): Likewise.
9926         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9927         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9928         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9929         * tree-ssa-strlen.c (get_string_length): Likewise.
9930         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9931         (find_func_aliases_for_call): Likewise.
9932         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9933         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9934         * tree-tailcall.c (find_tail_calls): Likewise.
9935         * tree.c (need_assembler_name_p): Likewise.
9936         (free_lang_data_in_decl): Likewise.
9937         (get_call_combined_fn): Likewise.
9938         * ubsan.c (is_ubsan_builtin_p): Likewise.
9939         * varasm.c (incorporeal_function_p): Likewise.
9940         * tree.h (DECL_BUILT_IN): Remove and replace with
9941         fndecl_built_in_p.
9942         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9943         (fndecl_built_in_p): New.
9945 2018-08-27  Martin Liska  <mliska@suse.cz>
9947         PR tree-optimization/86847
9948         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9949         Dump also subtree probability.
9950         (switch_decision_tree::do_jump_if_equal): New function.
9951         (switch_decision_tree::emit_case_nodes): Handle special
9952         situations in balanced tree that can be emitted much simpler.
9953         Fix calculation of probabilities that happen in tree expansion.
9954         * tree-switch-conversion.h (struct cluster): Add
9955         is_single_value_p.
9956         (struct simple_cluster): Likewise.
9957         (struct case_tree_node): Add new function has_child.
9958         (do_jump_if_equal): New.
9960 2018-08-27  Martin Liska  <mliska@suse.cz>
9962         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9963         Add new argument to bit_test_cluster constructor.
9964         (bit_test_cluster::emit): Set bits really number of values
9965         handlel by a test.
9966         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9967         probability argument.
9968         * tree-switch-conversion.h (struct bit_test_cluster):
9969         Add m_handles_entire_switch.
9971 2018-08-27  Martin Liska  <mliska@suse.cz>
9973         PR tree-optimization/86702
9974         * tree-switch-conversion.c (jump_table_cluster::emit):
9975         Make probabilities even for values in jump table
9976         according to number of cases handled.
9977         (switch_decision_tree::compute_cases_per_edge): Pass
9978         argument to reset_out_edges_aux function.
9979         (switch_decision_tree::analyze_switch_statement): Likewise.
9980         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9981         Make it static.
9983 2018-08-27  Martin Liska  <mliska@suse.cz>
9985         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9986         cfun argument explicitly.
9987         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9988         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9989         function gimple_switch_default_bb.
9990         (convert_switch_statements):
9991         (expand_builtins):
9992         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9993         * stmt.c (label_to_block_fn): Use label_to_block and pass
9994         cfun argument explicitly and use gimple_switch_label_bb.
9995         (expand_case): Likewise.
9996         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9997         cfun argument explicitly. Likewise.
9998         (make_edges_bb): Likewise.
9999         (make_cond_expr_edges): Likewise.
10000         (get_cases_for_edge): Likewise.
10001         (make_gimple_switch_edges): Likewise.
10002         (label_to_block_fn): Likewise.
10003         (label_to_block): Likewise.
10004         (make_goto_expr_edges): Likewise.
10005         (make_gimple_asm_edges): Likewise.
10006         (main_block_label): Likewise.
10007         (group_case_labels_stmt): Likewise.
10008         (find_taken_edge_computed_goto): Likewise.
10009         (find_taken_edge_switch_expr): Likewise.
10010         (gimple_verify_flow_info): Likewise.
10011         (gimple_redirect_edge_and_branch): Likewise.
10012         (gimple_switch_label_bb): New function.
10013         (gimple_switch_default_bb): Likewise.
10014         (gimple_switch_edge): Likewise.
10015         (gimple_switch_default_edge): Likewise.
10016         * tree-cfg.h (label_to_block_fn): Remove and replace ...
10017         (label_to_block): ... with this.
10018         (gimple_switch_label_bb): New.
10019         (gimple_switch_default_bb): Likewise.
10020         (gimple_switch_edge): Likewise.
10021         (gimple_switch_default_edge): Likewise.
10022         * tree-cfgcleanup.c (convert_single_case_switch): Use
10023         new gimple functions and pass new argument to label_to_block.
10024         (cleanup_control_flow_bb):
10025         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
10026         cfun argument explicitly.
10027         (make_eh_edges): Likewise.
10028         (redirect_eh_dispatch_edge): Likewise.
10029         (lower_resx): Likewise.
10030         (lower_eh_dispatch): Likewise.
10031         (maybe_remove_unreachable_handlers): Likewise.
10032         (unsplit_eh): Likewise.
10033         (cleanup_empty_eh): Likewise.
10034         (verify_eh_edges): Likewise.
10035         (verify_eh_dispatch_edge): Likewise.
10036         * tree-ssa-dom.c (record_edge_info): Likewise.
10037         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
10038         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
10039         (thread_through_normal_block): Likewise.
10040         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
10041         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
10042         * tree-switch-conversion.c (switch_conversion::collect): Use new
10043         gimple functions.
10044         (switch_conversion::check_final_bb): Likewise.
10045         (switch_conversion::gather_default_values): Pass new argument
10046         to label_to_block.
10047         (switch_conversion::build_constructors): Likewise.
10048         (switch_decision_tree::compute_cases_per_edge): Use new
10049         gimple_switch_edge function.
10050         (switch_decision_tree::analyze_switch_statement): Pass new argument
10051         to label_to_block.
10052         (switch_decision_tree::try_switch_expansion): Use
10053         gimple_switch_default_edge.
10054         * tree-vrp.c (find_switch_asserts): Pass new argument
10055         to label_to_block.
10056         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
10057         (vr_values::simplify_switch_using_ranges): Likewise.
10059 2018-08-27  Richard Biener  <rguenther@suse.de>
10061         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
10062         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
10064         * tree-ssa-sccvn.h (struct vn_pval): New structure.
10065         (struct vn_nary_op_s): Add unwind_to member.  Add
10066         predicated_values flag and put result into a union together
10067         with a linked list of vn_pval.
10068         (struct vn_ssa_aux): Add name member to make maintaining
10069         a map of SSA name to vn_ssa_aux possible.  Remove no longer
10070         needed info, dfsnum, low, visited, on_sccstack, use_processed
10071         and range_info_anti_range_p members.
10072         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
10073         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
10074         New functions.
10075         (vn_valueize): New global.
10076         (vn_context_bb): Likewise.
10077         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
10078         VN_INFO_PTR_INFO): Remove.
10079         * tree-ssa-sccvn.c: ... (rewrite)
10080         (pass_fre::execute): For -O2+ initialize loops and run
10081         RPO VN in optimistic mode (iterating).  For -O1 and -Og
10082         run RPO VN in non-optimistic mode.
10083         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
10084         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
10085         * doc/invoke.texi (sccvn-max-scc-size): Remove.
10086         (rpo-vn-max-loop-depth): Document.
10087         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
10088         when valuezing the VUSE signals we walked out of the region.
10089         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
10090         (phi_translate): Set VN context block to use for availability
10091         lookup.
10092         (compute_avail): Likewise.
10093         (pre_valueize): New function.
10094         (pass_pre::execute): Adjust to the RPO VN API.
10096         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
10097         (propagate_constants_for_unrolling): Remove.
10098         (tree_unroll_loops_completely): Perform value-numbering
10099         on the unrolled bodies loop parent.
10101 2018-08-27  Richard Biener  <rguenther@suse.de>
10103         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
10104         for partial antic compute.
10106 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
10108         PR rtl-optimization/87065
10109         * combine.c (simplify_if_then_else): Formatting fix.
10110         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
10111         check.
10112         (known_cond): Don't return const_true_rtx for vector modes.  Use
10113         CONST0_RTX instead of const0_rtx.  Formatting fixes.
10115 2018-08-27  Martin Liska  <mliska@suse.cz>
10117         PR gcov-profile/87069
10118         * gcov.c (process_file): Record files already processed
10119         and warn about a file being processed multiple times.
10121 2018-08-27  Martin Liska  <mliska@suse.cz>
10123         PR driver/83193
10124         * config/aarch64/aarch64.c (aarch64_override_options_internal):
10125         Set default values for x_aarch64_*_string strings.
10126         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10127         prefix.  For -mabi do not print '=ABI' in help and use
10128         <option_value> format for -msve-vector-bits and -moverride
10129         options.
10131 2018-08-26  Jeff Law  <law@redhat.com>
10133         * config/mips/frame-header-opt.c: Include "backend.h" rather than
10134         "cfg.h"
10136 2018-08-26  Marek Polacek  <polacek@redhat.com>
10138         PR c++/87029, Implement -Wredundant-move.
10139         * doc/invoke.texi: Document -Wredundant-move.
10141 2018-08-25  Martin Sebor  <msebor@redhat.com>
10143         PR tree-optimization/87059
10144         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10145         to the same type as the other.
10146         * fold-const.c (fold_binary_loc): Assert expectation.
10148 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
10150         * config/darwin.c (machopic_legitimize_pic_address): Clean up
10151         extraneous parentheses, dead code section and formatting.
10153 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
10155         PR c++/87091
10156         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10157         wide enough for jumps in the line-numbering to be visible.
10158         (layout::print_gap_in_line_numbering): New member function.
10159         (layout::calculate_line_spans): When using line numbering, merge
10160         line spans that are only 1 line apart.
10161         (diagnostic_show_locus): When printing line numbers, show gaps in
10162         line numbering directly, rather than printing headers.
10163         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10164         line-numbering with multiple line spans.
10165         (selftest::test_fixit_insert_containing_newline_2): Add test of
10166         line-numbering, in which the spans are close enough to be merged.
10168 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10170         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10171         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
10172         * tree-vrp.c (range_is_nonnull): Remove.
10173         (range_includes_zero_p): Accept value_range instead of min/max.
10174         (extract_range_from_binary_expr_1): Do not early bail on
10175         POINTER_PLUS_EXPR.
10176         Use range_includes_zero_p instead of range_is_nonnull.
10177         (extract_range_from_unary_expr): Use range_includes_zero_p instead
10178         of range_is_nonnull.
10179         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
10180         special case VR_ANTI_RANGE.
10181         (vrp_finalize): Same.
10182         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10183         instead of min/max.
10184         (range_is_nonnull): Remove.
10185         * vr-values.c (vrp_stmt_computes_nonzero): Use
10186         range_includes_zero_p instead of range_is_nonnull.
10187         (extract_range_basic): Pass value_range to range_includes_zero_p
10188         instead of range_is_nonnull.
10190 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
10192         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10193         * emit-rtl.h (rtl_data): Remove return_bnd.
10194         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10195         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10196         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10197         (POINTER_BOUNDS_MODE): Remove definition.
10198         (make_pointer_bounds_mode): Remove.
10199         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10200         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10201         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10202         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10203         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10204         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10205         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10207         * config/i386/i386-modes.def (BND32, BND64): Remove.
10208         * config/i386/i386.c (dbx_register_map): Remove bound registers.
10209         (dbx64_register_map): Ditto.
10210         (svr4_dbx_register_map): Ditto.
10211         (indirect_thunk_bnd_needed): Remove.
10212         (indirect_thunks_bnd_used): Ditto.
10213         (indirect_return_bnd_needed): Ditto.
10214         (indirect_return_via_cx_bnd): Ditto.
10215         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10216         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10217         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
10218         (output_indirect_thunk_function): Remove handling of
10219         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10220         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10221         (ix86_save_reg): Remove handling of crtl->return_bnd.
10222         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10223         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10224         and UNSPEC_BNDLX_ADDR.
10225         (ix86_output_indirect_branch_via_reg): Remove handling of
10226         indirect_thunk_prefix_bnd.
10227         (ix86_output_indirect_branch_via_push): Ditto.
10228         (ix86_output_function_return): Ditto.
10229         (ix86_output_indirect_function_return): Ditto.
10230         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10231         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10232         (CALL_USED_REGISTERS): Ditto.
10233         (REG_ALLOC_ORDER): Update for removal of bound registers.
10234         (HI_REGISTER_NAMES): Ditto.
10235         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10236         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10237         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10238         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10239         (FIRST_PSEUDO_REG): Update.
10240         (BND): Remove mode iterator.
10241         * config/i386/predicates.md (bnd_mem_operator): Remove.
10243 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10245         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10246         vectors.
10248 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10250         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10251         the case in which the permute needs only a single element and
10252         repeats for every vector of the result.  Extend that case to
10253         handle variable-length vectors.
10254         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10256 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
10258         PR debug/79342
10259         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10260         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10262 2018-08-24  Richard Biener  <rguenther@suse.de>
10264         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10265         bb_flags_allocated members.
10266         (auto_flag): New RAII class for allocating flags.
10267         (auto_edge_flag): New RAII class for allocating edge flags.
10268         (auto_bb_flag): New RAII class for allocating bb flags.
10269         * cfgloop.c (verify_loop_structure): Allocate temporary edge
10270         flag dynamically.
10271         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10272         in favor of temporarily allocated BB flag.
10273         * hsa-brig.c: Re-order includes.
10274         * hsa-dump.c: Likewise.
10275         * hsa-regalloc.c: Likewise.
10276         * print-rtl.c: Likewise.
10277         * profile-count.c: Likewise.
10279 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
10281         PR target/86989
10282         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10283         the TOC register.
10285 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10287         PR 87073/bootstrap
10288         * wide-int-range.cc (wide_int_range_div): Do not ignore result
10289         from wide_int_range_multiplicative_op.
10291 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10293         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10294         "permutaion".
10296 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
10298         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10299         to 'expanded'.
10301 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
10303         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10304         full GENERIC expression used for replacement.
10306 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
10308         * tree-vrp.c (abs_extent_range): Remove.
10309         (extract_range_into_wide_ints): Pass wide ints by reference.
10310         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10311         Pass wide ints by reference in all calls to
10312         extract_range_into_wide_ints.
10313         * wide-int-range.cc (wide_int_range_div): New.
10314         * wide-int-range.h (wide_int_range_div): New.
10315         (wide_int_range_includes_zero_p): New.
10316         (wide_int_range_zero_p): New.
10318 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
10320         * config/aarch64/aarch64.md (arches): New enum.
10321         (arch): New enum attr.
10322         (arch_enabled): New attr.
10323         (enabled): Now uses arch_enabled only.
10324         (simd, sve, fp16): Removed attribute.
10325         (fp): Attr now defined in terms of 'arch'.
10326         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10327         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10328         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10329         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10330         attributes into 'arch'.
10331         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10332         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
10333         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
10334         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
10335         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
10336         'simd' attribute into 'arch'.
10337         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
10338         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
10339         Convert use of 'fp' attribute to 'arch'.
10340         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
10341         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
10342         into 'arch'.
10343         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
10344         (different modes) Merge 'fp' and 'simd' into 'arch'.
10345         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
10346         'simd' into 'arch'.
10348 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
10350         PR rtl-optimization/87026
10351         * expmed.c (canonicalize_comparison): If we can no longer create
10352         pseudoregisters, don't.
10354 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
10356         PR target/86951
10357         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
10358         prototype.
10359         * config/arm/arm.c (speculation_barrier_libfunc): New static
10360         variable.
10361         (arm_init_libfuncs): Initialize it.
10362         (arm_emit_speculation_barrier): New function.
10363         * config/arm/arm.md (speculation_barrier): Call
10364         arm_emit_speculation_barrier for architectures that do not have
10365         DSB or ISB.
10366         (speculation_barrier_insn): Only match on Armv7 or later.
10368 2018-08-23  Richard Biener  <rguenther@suse.de>
10370         PR middle-end/87024
10371         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
10372         calls.
10374 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10376         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
10377         of single-vector TBLs.
10378         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
10379         one input is given.
10381 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10383         PR target/85910
10384         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
10385         aarch64_evpc_tbl guard.
10387 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10389         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
10390         behaviour.
10392 2018-08-22  Martin Sebor  <msebor@redhat.com>
10394         PR middle-end/87052
10395         * tree-pretty-print.c (pretty_print_string): Add argument.
10396         (dump_generic_node): Call to pretty_print_string with string size.
10398 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
10400         PR rtl-optimization/86771
10401         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
10402         of two SETs into those two SETs, one to be placed at i2, if that SETs
10403         destination is modified between i2 and i3.
10405 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10407         PR tree-optimization/86725
10408         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
10409         function.
10410         (vect_analyze_scalar_cycles_1): Check it.
10412 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10414         PR tree-optimization/86725
10415         * tree-vect-loop.c (vect_is_simple_reduction): When treating
10416         an outer loop phi as a double reduction, make sure that the
10417         single user of the phi result is an inner loop phi.
10419 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10421         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
10422         grouped stores with gaps to a strided group.
10424 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10426         * tree-vect-stmts.c (get_group_load_store_type)
10427         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
10428         first statement in a group.
10430 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10432         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
10433         the sequence used in gcc/gcc.c.
10435 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10437         PR other/704
10438         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
10439         building it.
10441 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10443         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
10444         Darwin10-specific unwinder-shim.
10445         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
10446         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
10447         New to cater for Darwin10 Rosetta.
10449 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10451         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
10452         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
10454 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10456         PR bootstrap/81033
10457         PR target/81733
10458         PR target/52795
10459         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
10460         (dwarf2out_switch_text_section): Generate a local label for the
10461         second function sub-section and apply it as the second FDE start
10462         label.
10463         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
10464         second sub-section start.
10466 2018-08-22  Richard Biener  <rguenther@suse.de>
10468         PR tree-optimization/86988
10469         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
10471 2018-08-22  Richard Biener  <rguenther@suse.de>
10473         PR tree-optimization/86945
10474         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
10476 2018-08-22  Alexandre Oliva <oliva@adacore.com>
10478         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
10479         a comment about how uses of r2 for .sdata2 come about.
10481 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
10483         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
10485 2018-08-21  Marek Polacek  <polacek@redhat.com>
10487         PR c++/86981, Implement -Wpessimizing-move.
10488         * doc/invoke.texi: Document -Wpessimizing-move.
10490 2018-08-21  Jan Hubicka  <jh@suse.cz>
10492         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
10493         * tree.h (is_redundant_typedef): Remove.
10494         * dwarf2out.c (is_redundant_typedef): Turn into static function.
10496 2018-08-21  Jan Hubicka  <jh@suse.cz>
10498         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
10499         when possible.
10501 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
10503         * expmed.c (extract_low_bits): Reject invalid subregs early.
10505 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10507         PR middle-end/86121
10508         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
10509         behaviour.
10511 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10513         * config/vxworks.h: Guard vxworks_asm_out_constructor and
10514         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
10515         * config/vxworks.c: Likewise.
10517 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10519         * config/vxworks.c: Set targetm.have_ctors_dtors
10520         if HAVE_INITFINI_ARRAY_SUPPORT.
10521         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
10522         if HAVE_INITFINI_ARRAY_SUPPORT.
10524 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10526         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
10527         default search path for VxWorks < 7.
10529 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10531         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
10532         (get_format_string): Refer to c_getstr.
10534 2018-08-21  Tom de Vries  <tdevries@suse.de>
10536         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10537         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10538         (debuginfo_early_stop): Declare.
10539         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10540         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10541         (debuginfo_early_stop): New function.
10542         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
10543         and debuginfo_early_stop.
10544         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
10545         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
10546         (general_init): Call debuginfo_early_init.
10547         (finalize): Call debuginfo_fini.
10548         (do_compile): Call debuginfo_init.
10549         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
10550         -fdump-early-debug.
10551         (@item -fdump-debug, @item -fdump-earlydebug): Add.
10553 2018-08-21  Tom de Vries  <tdevries@suse.de>
10555         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
10556         flag_dump_noaddr and flag_dump_unnumbered.
10558 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
10560         * wide-int-range.cc (wide_int_range_abs): New.
10561         (wide_int_range_order_set): Rename from wide_int_range_min_max.
10562         * wide-int-range.h (wide_int_range_abs): New.
10563         (wide_int_range_min_max): New.
10564         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
10565         case to call wide_int_range_abs.
10566         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
10567         (extract_range_from_abs_expr): Delete.
10569 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
10571         PR target/87033
10572         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
10573         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
10574         for indexed loads.
10576 2018-08-20  Nathan Sidwell  <nathan@acm.org>
10577             Jeff Law <law@redhat.com>
10579         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
10580         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
10582 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
10584         PR other/84889
10585         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
10586         (decl_attributes): Likewise.
10587         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
10588         instance.
10589         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10590         * diagnostic-core.h (class auto_diagnostic_group): New class.
10591         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
10592         (diagnostic_report_diagnostic): Handle the first diagnostics within
10593         a group.
10594         (emit_diagnostic): Add auto_diagnostic_group instance.
10595         (inform): Likewise.
10596         (inform_n): Likewise.
10597         (warning): Likewise.
10598         (warning_at): Likewise.
10599         (warning_n): Likewise.
10600         (pedwarn): Likewise.
10601         (permerror): Likewise.
10602         (error): Likewise.
10603         (error_n): Likewise.
10604         (error_at): Likewise.
10605         (sorry): Likewise.
10606         (fatal_error): Likewise.
10607         (internal_error): Likewise.
10608         (internal_error_no_backtrace): Likewise.
10609         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
10610         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
10611         * diagnostic.h (struct diagnostic_context): Add fields
10612         "diagnostic_group_nesting_depth",
10613         "diagnostic_group_emission_count", "begin_group_cb",
10614         "end_group_cb".
10615         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
10616         Add auto_diagnostic_group instance(s).
10617         (find_explicit_erroneous_behavior): Likewise.
10618         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
10619         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
10620         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
10621         (gimplify_va_arg_expr): Likewise.
10622         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
10623         (HSA_SORRY_AT): Likewise.
10624         * ipa-devirt.c (compare_virtual_tables): Likewise.
10625         (warn_odr): Likewise.
10626         * multiple_target.c (expand_target_clones): Likewise.
10627         * opts-common.c (cmdline_handle_error): Likewise.
10628         * reginfo.c (globalize_reg): Likewise.
10629         * substring-locations.c (format_warning_n_va): Likewise.
10630         * tree-inline.c (expand_call_inline): Likewise.
10631         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
10632         * tree-ssa-loop-niter.c
10633         (do_warn_aggressive_loop_optimizations): Likewise.
10634         * tree-ssa-uninit.c (warn_uninit): Likewise.
10635         * tree.c (warn_deprecated_use): Likewise.
10637 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
10639         PR target/87014
10640         * config/i386/i386.md (eh_return): Always update EH return
10641         address in word_mode.
10643 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
10645         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
10646         TARGET_SPLIT_COMPLEX_ARG is defined.
10648 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10650         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
10652 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10654         PR target/86984
10655         * expr.c (expand_assignment): Assert that bitpos is positive.
10656         (store_field): Likewise
10657         (expand_expr_real_1): Make sure that bitpos is positive.
10658         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
10659         integer overflow.
10661 2018-08-20  Nathan Sidwell  <nathan@acm.org>
10663         * Makefile.in (CPP_ID_DATA_H): Delete.
10664         (CPP_INTERNAL_H): Don't add it.
10665         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
10666         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
10668 2018-08-20  Richard Biener  <rguenther@suse.de>
10670         PR tree-optimization/78655
10671         * tree-vrp.c (extract_range_from_binary_expr_1): Make
10672         pointer + offset nonnull if either operand is nonnull work.
10674 2018-08-20  Tom de Vries  <tdevries@suse.de>
10676         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
10677         unless the referenced die describes the added property using
10678         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
10679         Otherwise, add a DW_AT_location to the referenced die.
10681 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
10683         PR target/86994
10684         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
10685         register_operand when calling ix86_set_reg_reg_cost.
10686         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
10687         Set *total to 0 for operands that satisfy x86_64_immediate_operand
10688         predicate and to 1 otherwise.
10690 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
10692         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
10693         emit a diagnostic that it is not supported and reset the option.
10694         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
10695         supported and consume the option.  (ASM_FINAL_SPEC): New.
10697 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
10699         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
10700         a sentence.
10702 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
10704         C-SKY port: Documentation
10706         * doc/extend.texi (C-SKY Function Attributes): New section.
10707         * doc/invoke.texi (Option Summary): Add C-SKY options.
10708         (C-SKY Options): New section.
10709         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
10711 2018-08-17  Jojo  <jijie_rong@c-sky.com>
10712             Huibin Wang  <huibin_wang@c-sky.com>
10713             Sandra Loosemore  <sandra@codesourcery.com>
10714             Chung-Lin Tang  <cltang@codesourcery.com>
10716         C-SKY port: Backend implementation
10718         * config/csky/*: New.
10719         * common/config/csky/*: New.
10721 2018-08-17  Jojo  <jijie_rong@c-sky.com>
10722             Huibin Wang  <huibin_wang@c-sky.com>
10723             Sandra Loosemore  <sandra@codesourcery.com>
10724             Chung-Lin Tang  <cltang@codesourcery.com>
10725             Andrew Jenner  <andrew@codesourcery.com>
10727         C-SKY port: Configury
10729         * config.gcc (csky-*-*): New.
10730         * configure.ac: Add csky to targets for dwarf2 debug_line support.
10731         * configure: Regenerated.
10733 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
10735         * dump-context.h: Include "dumpfile.h".
10736         (dump_context::dump_printf_va): Convert final param from va_list
10737         to va_list *.  Convert from ATTRIBUTE_PRINTF to
10738         ATTRIBUTE_GCC_DUMP_PRINTF.
10739         (dump_context::dump_printf_loc_va): Likewise.
10740         * dumpfile.c: Include "stringpool.h".
10741         (make_item_for_dump_printf_va): Delete.
10742         (make_item_for_dump_printf): Delete.
10743         (class dump_pretty_printer): New class.
10744         (dump_pretty_printer::dump_pretty_printer): New ctor.
10745         (dump_pretty_printer::emit_items): New member function.
10746         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
10747         function.
10748         (dump_pretty_printer::emit_item): New member function.
10749         (dump_pretty_printer::stash_item): New member function.
10750         (dump_pretty_printer::format_decoder_cb): New member function.
10751         (dump_pretty_printer::decode_format): New member function.
10752         (dump_context::dump_printf_va): Reimplement in terms of
10753         dump_pretty_printer.
10754         (dump_context::dump_printf_loc_va): Convert final param from va_list
10755         to va_list *.
10756         (dump_context::begin_scope): Reimplement call to
10757         make_item_for_dump_printf.
10758         (dump_printf): Update for change to dump_printf_va.
10759         (dump_printf_loc): Likewise.
10760         (selftest::test_capture_of_dump_calls): Convert "stmt" from
10761         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
10762         with %T, %E, and %G.
10763         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
10764         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
10765         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
10766         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
10767         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
10768         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
10769         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
10770         within a dump_printf_loc call to "%wu".
10771         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
10772         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
10773         missing space after "=".
10774         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
10775         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
10776         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
10777         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
10778         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
10779         duplicate "vectorized" from message.
10781 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
10783         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
10784         polyNxK_t element's TYPE_STRING_FLAG.
10786 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
10788         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
10789         (they were unnamed before).  Fix comments.
10791 2018-08-17  Nathan Sidwell  <nathan@acm.org>
10793         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
10795 2018-08-17  Richard Biener  <rguenther@suse.de>
10797         PR tree-optimization/86841
10798         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
10800 2018-08-17  Martin Liska  <mliska@suse.cz>
10802         * common.opt: Remove Warn, Init and Report for options with
10803         Ignore/Deprecated flag. Warning is done automatically for
10804         Deprecated flags.
10805         * config/i386/i386.opt: Likewise.
10806         * config/ia64/ia64.opt: Likewise.
10807         * config/rs6000/rs6000.opt: Likewise.
10808         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
10809         Remove usage of flag_check_pointer_bounds.
10810         * lto-wrapper.c (merge_and_complain): Do not handle
10811         OPT_fcheck_pointer_bounds.
10812         (append_compiler_options): Likewise.
10813         * opt-functions.awk: Do not handle Deprecated.
10814         * optc-gen.awk: Check that Var, Report and Init are not
10815         used for an option with Ignore/Deprecated flag.
10816         * opts-common.c (decode_cmdline_option): Do not report
10817         CL_ERR_DEPRECATED.
10818         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
10819         options.
10820         * opts.h (struct cl_option): Remove cl_deprecated flag.
10821         (CL_ERR_DEPRECATED): Remove error enum value.
10823 2018-08-17  Richard Biener  <rguenther@suse.de>
10825         PR middle-end/86505
10826         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
10827         across a va-arg-pack using call adjust its return value accordingly.
10829 2018-08-16  Martin Sebor  <msebor@redhat.com>
10831         PR tree-optimization/86853
10832         * gimple-ssa-sprintf.c (struct format_result): Rename member.
10833         (struct fmtresult): Add member and initialize it in ctors.
10834         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
10835         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
10836         (format_directive): Set POSUNDER4K when MAYFAIL is set.
10837         (parse_directive): Handle %C same as %c.
10838         (sprintf_dom_walker::compute_format_length): Adjust.
10839         (is_call_safe): Adjust.
10841 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10843         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
10844         for determining how to count the elements.
10845         * builtins.h (c_strlen): Adjust prototype.
10846         * expr.c (string_constant): Add new parameter mem_size.
10847         Set *mem_size appropriately.
10848         * expr.h (string_constant): Adjust protoype.
10849         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
10850         * gimple-fold.h (get_range_strlen): Adjust prototype.
10851         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
10852         (format_string): Call get_string_length with eltsize.
10854 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
10856         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
10857         to emit the span, rather than setting it as the prefix.
10859 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
10861         * diagnostic-show-locus.c (layout::start_annotation_line): Add
10862         "margin_char" parameter, defaulting to space.  Use it in place
10863         of pp_space for the initial part of the margin.
10864         (layout::print_leading_fixits): Use '+' when filling the margin
10865         of line-insertion fix-it hints.
10867 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10869         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
10870         Delete.
10872 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10874         * config/rs6000/altivec.md: Don't set length attribute to the default
10875         value.
10876         * config/rs6000/darwin.md: Ditto.
10877         * config/rs6000/dfp.md: Ditto.
10878         * config/rs6000/htm.md: Ditto.
10879         * config/rs6000/rs6000.md: Ditto.
10880         * config/rs6000/sync.md: Ditto.
10881         * config/rs6000/vsx.md: Ditto.
10883 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10885         * config/rs6000/altivec.md: Don't set length attribute to the default
10886         value, for branch instructions.
10887         * config/rs6000/darwin.md: Ditto.
10888         * config/rs6000/rs6000.md: Ditto.
10890 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10892         * config/rs6000/rs6000.md (length): Always define as const_int 4.
10893         (unnamed conditional branch define_insn): Set length to 4 or 8
10894         depending on offset.
10895         (<bd>_<mode>): Similar, for alternative 0.
10896         (<bd>tf_<mode>): Ditto.
10898 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10900         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
10902 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
10904         * doc/rtl.texi: Replace old RTX class names with new names.
10907 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
10909         * expmed.h (canonicalize_comparison): New declaration.
10910         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10911         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10912         * optabs.c (prepare_cmp_insn): Likewise.
10913         * rtl.h (unsigned_condition_p): New function which checks if a
10914         comparison operator is unsigned.
10916 2018-08-16  Nathan Sidwell  <nathan@acm.org>
10918         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10919         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10921 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10923         PR target/84711
10924         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10925         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10926         (mov<mov>): ..this and enable unconditionally.
10928 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10930         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10932 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
10934         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10935         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10936         "Common" with "Target".
10938 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
10940         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10941         * doc/invoke.texi (mmitigate-rop): Remove.
10942         * config/i386/i386.c: Do not include "regrename.h".
10943         (ix86_rop_should_change_byte_p, reg_encoded_number)
10944         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10945         Remove.
10946         (ix86_reorg): Remove call to ix86_mitigate_rop.
10947         * config/i386/i386.md (attr "modrm_class"): Remove.
10948         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10949         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10950         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10952 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
10954         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10955         allow folding of mergeh() and mergel() for the float and double types.
10956         (fold_mergehl_helper): Rework to handle building a permute tree
10957         for float vectors.
10959 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
10961         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10962         for TARGET_SSE.
10964 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
10966         * common.opt (fdiagnostics-show-labels): New option.
10967         * diagnostic-show-locus.c (class layout_range): Add field
10968         "m_label".
10969         (class layout): Add field "m_show_labels_p".
10970         (layout_range::layout_range): Add param "label" and use it to
10971         initialize m_label.
10972         (make_range): Pass in NULL for new "label" param of layout_range's
10973         ctor.
10974         (layout::layout): Initialize m_show_labels_p.
10975         (layout::maybe_add_location_range): Pass in loc_range->m_label
10976         when constructing layout_range instances.
10977         (struct line_label): New struct.
10978         (layout::print_any_labels): New member function.
10979         (layout::print_line): Call it if label-printing is enabled.
10980         (selftest::test_one_liner_labels): New test.
10981         (selftest::test_diagnostic_show_locus_one_liner): Call it.
10982         * diagnostic.c (diagnostic_initialize): Initialize
10983         context->show_labels_p.
10984         * diagnostic.h (struct diagnostic_context): Add field
10985         "show_labels_p".
10986         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10987         -fno-diagnostics-show-labels.
10988         * dwarf2out.c (gen_producer_string): Add
10989         OPT_fdiagnostics_show_labels to the ignored options.
10990         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10991         param.
10992         (gcc_rich_location::maybe_add_expr): Likewise.
10993         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10994         label" param, defaulting to NULL.
10995         (gcc_rich_location::add_expr): Add "label" param.
10996         (gcc_rich_location::maybe_add_expr): Likewise.
10997         (class text_range_label): New class.
10998         (class range_label_for_type_mismatch): New class.
10999         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
11000         of format_warning_va.
11001         (fmtwarn_n): Likewise for new params of format_warning_n_va.
11002         * lto-wrapper.c (merge_and_complain): Add
11003         OPT_fdiagnostics_show_labels to the "pick one setting" options.
11004         (append_compiler_options): Likewise to the dropped options.
11005         (append_diag_options): Likewise to the passed-on options.
11006         * opts.c (common_handle_option): Handle the new option.
11007         * selftest-diagnostic.c
11008         (test_diagnostic_context::test_diagnostic_context): Enable
11009         show_labels_p.
11010         * substring-locations.c: Include "gcc-rich-location.h".
11011         (format_warning_n_va): Add "fmt_label" and "param_label" params
11012         and use them as appropriate.
11013         (format_warning_va): Add "fmt_label" and "param_label" params,
11014         passing them on to format_warning_n_va.
11015         (format_warning_at_substring): Likewise.
11016         (format_warning_at_substring_n): Likewise.
11017         * substring-locations.h (format_warning_va): Add "fmt_label" and
11018         "param_label" params.
11019         (format_warning_n_va): Likewise.
11020         (format_warning_at_substring): Likewise.
11021         (format_warning_at_substring_n): Likewise.
11022         * toplev.c (general_init): Initialize global_dc->show_labels_p.
11024 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
11026         PR testsuite/86519
11027         * builtins.c (expand_builtin_memcmp): Do not expand the call
11028         when overflow is detected.
11030 2018-08-15  Martin Sebor  <msebor@redhat.com>
11032         PR tree-optimization/71625
11033         * config/aarch64/aarch64-builtins.c
11034         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
11036 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
11038         * config/s390/s390.c (s390_reorg): Remove loop.
11040 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
11042         * config/darwin.c
11043          (darwin_function_switched_text_sections): Delete.
11044         * gcc/config/darwin.h
11045          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
11047 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
11049         PR target/81685
11050         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
11051         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
11052         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
11054 2018-08-15  Martin Liska  <mliska@suse.cz>
11056         PR tree-optimization/86925
11057         * predict.c (expr_expected_value_1): When taking
11058         later predictor, assign also probability.
11059         Use fold_build2_initializer_loc in order to fold
11060         the expression in -frounding-math.
11062 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
11064         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
11065         patterns.
11066         (expand_vec_perm_1): Try the new method.
11068 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
11070         PR target/86547
11071         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
11072         Check whether lra_live_max_point is 0 before dividing.
11074 2018-08-14  Martin Sebor  <msebor@redhat.com>
11076         PR tree-optimization/86650
11077         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
11078         (vrp_prop::check_mem_ref): Same.
11080 2018-08-13  Liu Hao <lh_mouse@126.com>
11082         * pretty-print.c (eat_esc_sequence): Swap the foreground and
11083         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
11084         and clear it thereafter, as it only works for DBCS.
11086 2018-08-13  Liu Hao <lh_mouse@126.com>
11088         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
11089         handle returned by _get_osf_handle().
11091 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
11093         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
11094         for folding vec_perm.
11096 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
11098         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
11099         Add support for gimple-folding of vec_pack() and vec_unpack()
11100         intrinsics.
11102 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
11104         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
11105         vec_xst variants to the list.
11106         (rs6000_gimple_fold_builtin): Add support for folding unaligned
11107         vector loads and stores.
11109 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
11111         * config.gcc (rs6000-ibm-aix4.x): Delete.
11112         (rs6000-ibm-aix5.1): Delete.
11113         (rs6000-ibm-aix5.2): Delete.
11114         (rs6000-ibm-aix5.3): Delete.
11115         * config/rs6000/aix43.h: Delete.
11116         * config/rs6000/aix51.h: Delete.
11117         * config/rs6000/aix52.h: Delete.
11118         * config/rs6000/t-aix43: Delete.
11120 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
11122         * config/s390/s390.c (s390_decompose_constant_pool_ref):
11123         New function.
11124         (s390_decompose_address): Factor out constant pool ref
11125         decomposition.
11127 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11129         * config/nds32/nds32-predicates.c
11130         (nds32_can_use_bclr_p): Change return type as bool.
11131         (nds32_can_use_bset_p): Ditto.
11132         (nds32_can_use_btgl_p): Ditto.
11133         (nds32_can_use_bitci_p): Ditto.
11134         * config/nds32/nds32-protos.h
11135         (nds32_can_use_bclr_p): Change declaration.
11136         (nds32_can_use_bset_p): Ditto.
11137         (nds32_can_use_btgl_p): Ditto.
11138         (nds32_can_use_bitci_p): Ditto.
11140 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11142         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11143         Support -msched-prolog-epilog option.
11144         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11146 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11148         * common/config/nds32/nds32-common.c
11149         (nds32_option_optimization_table): Enalbe -malways-align.
11151 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11153         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11154         extra_headers.
11155         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11156         OPT_misr_secure_ case.
11157         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11158         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11159         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11160         secure attribute.
11161         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11162         (nds32_isr_info): New field security_level.
11163         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11164         * config/nds32/nds32.md (return_internal): Consider critical attribute.
11165         * config/nds32/nds32.opt (misr-secure): New option.
11166         * config/nds32/nds32_init.inc: New file.
11167         * config/nds32/nds32_isr.h: New file.
11169 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
11171         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11172         Update comment for atomic instructions.
11173         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11174         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11175         Remove.
11176         (atomic_loaddi): Revise fence expansion to only emit fence prior to
11177         load for __ATOMIC_SEQ_CST model.
11178         (atomic_loaddi_1): Remove float register target.
11179         (atomic_storedi): Handle CONST_INT values.
11180         (atomic_storedi_1): Remove float register source.  Add special case
11181         for zero value.
11182         (memory_barrier): New expander and insn.
11184 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
11186         PR tree-optimization/86835
11187         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11188         new_stmt after def_gsi, make sure to insert new_square_stmt after
11189         that stmt, not 2 stmts before it.
11191 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
11193         PR target/82418
11194         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11195         instead of SWI48.
11197 2018-08-10  Martin Liska  <mliska@suse.cz>
11199         PR target/83610
11200         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11201         function type.
11202         * builtins.c (expand_builtin_expect_with_probability):
11203         New function.
11204         (expand_builtin_expect_with_probability): New function.
11205         (build_builtin_expect_predicate): Add new argumnet probability
11206         for BUILT_IN_EXPECT_WITH_PROBABILITY.
11207         (fold_builtin_expect):
11208         (fold_builtin_2):
11209         (fold_builtin_3):
11210         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11211         * builtins.h (fold_builtin_expect): Set new argument.
11212         * doc/extend.texi: Document __builtin_expect_with_probability.
11213         * doc/invoke.texi: Likewise.
11214         * gimple-fold.c (gimple_fold_call): Pass new argument.
11215         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11216         also BUILT_IN_EXPECT_WITH_PROBABILITY.
11217         * predict.c (get_predictor_value): New function.
11218         (expr_expected_value): Add new argument probability. Assume
11219         that predictor and probability are always non-null.
11220         (expr_expected_value_1): Likewise.  For __builtin_expect and
11221         __builtin_expect_with_probability set probability.  Handle
11222         combination in binary expressions.
11223         (tree_predict_by_opcode): Simplify code by simply calling
11224         get_predictor_value.
11225         (pass_strip_predict_hints::execute): Add handling of
11226         BUILT_IN_EXPECT_WITH_PROBABILITY.
11227         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11228         new predictor.
11229         * tree.h (DECL_BUILT_IN_P): New function.
11231 2018-08-10  Martin Liska  <mliska@suse.cz>
11233         PR tree-optimization/85799
11234         * passes.def: Add argument for pass_strip_predict_hints.
11235         * predict.c (class pass_strip_predict_hints): Add new argument
11236         early_p.
11237         (strip_predictor_early): New function.
11238         (pass_strip_predict_hints::execute): Call the function to
11239         strip predictors.
11240         (strip_predict_hints): New function.
11241         * predict.def: Fix comment.
11243 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
11245         * Makefile.in: Clarify which tm.texi to copy over to assert the
11246         right to grant a GFDL license for all.
11248 2018-08-09  Jeff Law  <law@redhat.com>
11250         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11251         unused variable.
11253 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
11255         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11256         prototype.
11258 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11260         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11261         reductions for variable-length vectors.
11263 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
11265         PR other/84889
11266         * common.opt (fdiagnostics-show-line-numbers): New option.
11267         * diagnostic-show-locus.c (class layout): Add fields
11268         "m_show_line_numbers_p" and "m_linenum_width";
11269         (num_digits): New function.
11270         (test_num_digits): New function.
11271         (layout::layout): Initialize new fields.  Update m_x_offset
11272         logic to handle any left margin.
11273         (layout::print_source_line): Print line number when requested.
11274         (layout::start_annotation_line): New member function.
11275         (layout::print_annotation_line): Call it.
11276         (layout::print_leading_fixits): Likewise.
11277         (layout::print_trailing_fixits): Likewise.  Update calls to
11278         move_to_column for new parameter.
11279         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11280         it to potentially call start_annotation_line.
11281         (layout::show_ruler): Call start_annotation_line.
11282         (selftest::test_line_numbers_multiline_range): New selftest.
11283         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11284         and selftest::test_line_numbers_multiline_range.
11285         * diagnostic.c (diagnostic_initialize): Initialize
11286         show_line_numbers_p.
11287         * diagnostic.h (struct diagnostic_context): Add field
11288         "show_line_numbers_p".
11289         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11290         -fno-diagnostics-show-line-numbers.
11291         * dwarf2out.c (gen_producer_string): Add
11292         OPT_fdiagnostics_show_line_numbers to the ignored options.
11293         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11294         one setting" options.
11295         (append_compiler_options): Likewise to the dropped options.
11296         (append_diag_options): Likewise to the passed-on options.
11297         * opts.c (common_handle_option): Handle the new option.
11298         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11300 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11302         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11303         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
11304         third argument of type "const signed char" to descriptions of
11305         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11306         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11307         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11308         __builtin_bcdsub_ov functions.
11310 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11312         PR tree-optimization/86858
11313         * tree-vect-loop.c (vect_is_simple_reduction): Restore
11314         flow_bb_inside_loop_p calls.
11316 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11318         PR tree-optimization/86871
11319         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11320         instead of gimple_assign_lhs.
11322 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
11324         PR target/86887
11325         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11326         register constraint to operand 0.
11327         (add<mode>3_carryinC): Likewise.
11328         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11330 2018-08-09  Martin Liska  <mliska@suse.cz>
11332         PR c/86895
11333         * common.opt: Remove extra line.
11335 2018-08-09  Martin Liska  <mliska@suse.cz>
11337         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
11338         at the end of a line, make first letter capital and end up
11339         a sentence with a dot.
11340         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
11341         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
11342         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
11343         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
11344         (PARAM_MAX_ISL_OPERATIONS): Likewise.
11345         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
11346         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
11347         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
11348         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
11349         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
11350         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
11351         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
11352         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
11353         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
11354         (PARAM_TREE_REASSOC_WIDTH): Likewise.
11355         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
11356         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
11357         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
11359 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
11361         PR target/84332
11362         * config/s390/s390.c (s390_option_override_internal): Reduce the
11363         stack-clash-protection-probe-interval param if it would be too big
11364         for z900.
11366 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
11368         PR target/46179
11369         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
11370         * config/m68k/m68k.c (handle_move_double): Don't call
11371         m68k_final_prescan_insn.
11372         (m68k_adjust_decorated_operand): Renamed from
11373         m68k_final_prescan_insn, remove first and third operand and
11374         simplify.
11375         (print_operand): Call it.
11376         (print_operand_address): Call it.
11378 2018-08-08  Nathan Sidwell  <nathan@acm.org>
11380         * diagnostic.c (diagnostic_report_current_module): Use
11381         linemap_included_from & linemap_included_from_linemap.
11383 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
11385         * config/aarch64/aarch64-cores.def: Add phecda core.
11386         * config/aarch64/aarch64-tune.md: Regenerate.
11387         * doc/invoke.texi: Add phecda core.
11389 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
11391         PR target/85295
11392         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
11393         definitions.
11394         * config/s390/s390.md ("movti"): Add more alternatives for
11395         constant to GPR copies.
11397 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
11399         * config/s390/s390.c: Fix whitespace damage throughout the file.
11400         * config/s390/s390.h: Likewise.
11401         * config/s390/tpf.h: Likewise.
11403 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
11405         * config/s390/s390.c (s390_loadrelative_operand_p):
11406         Remove TARGET_CPU_ZARCH usages.
11407         (s390_rtx_costs): Likewise.
11408         (s390_legitimate_constant_p): Likewise.
11409         (s390_cannot_force_const_mem): Likewise.
11410         (legitimate_reload_constant_p): Likewise.
11411         (s390_preferred_reload_class): Likewise.
11412         (legitimize_pic_address): Likewise.
11413         (legitimize_tls_address): Likewise.
11414         (s390_split_branches): Removed.
11415         (s390_add_execute): Removed.
11416         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
11417         (s390_mainpool_start): Likewise.
11418         (s390_mainpool_finish): Likewise.
11419         (s390_mainpool_cancel): Removed.
11420         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
11421         (s390_chunkify_cancel): Likewise.
11422         (s390_return_addr_rtx): Likewise.
11423         (s390_register_info): Remove split_branches_pending_p uages.
11424         (s390_optimize_register_info): Likewise.
11425         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
11426         split_branches_pending_p usages.
11427         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
11428         (s390_load_got): Likewise.
11429         (s390_expand_split_stack_prologue): Likewise.
11430         (output_asm_nops): Likewise.
11431         (s390_function_profiler): Likewise.
11432         (s390_emit_call): Likewise.
11433         (s390_conditional_register_usage): Likewise.
11434         (s390_optimize_prologue): Likewise.
11435         (s390_reorg): Remove TARGET_CPU_ZARCH and
11436         split_branches_pending_p usages.
11437         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
11438         usages.
11439         (s390_output_indirect_thunk_function): Likewise.
11440         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
11441         (TARGET_CPU_ZARCH_P): Removed.
11442         (struct machine_function): Remove split_branches_pending_p.
11443         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
11445 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
11447         * common/config/s390/s390-common.c (processor_flags_table):
11448         Remove flags.
11449         * config.gcc: Remove with_arch/with_tune support.
11450         * config/s390/2064.md: Remove cpu attribute comparisons.
11451         * config/s390/driver-native.c (s390_host_detect_local_cpu):
11452         Remove MTN.
11453         * config/s390/linux.h (ASM_SPEC):
11454         Remove -march support.
11455         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
11456         Use a table to get an arch level.
11457         * config/s390/s390-opts.h (enum processor_type):
11458         Remove enum values.
11459         * config/s390/s390.c
11460         (processor_table): Remove entries, add arch_level values.
11461         (s390_issue_rate): Remove cases.
11462         (s390_option_override): Adjust
11463         s390_option_override_internal() call.
11464         (s390_option_override_internal): Remove deprecation warning.
11465         (s390_valid_target_attribute_tree): Adjust
11466         s390_option_override_internal() call.
11467         * config/s390/s390.h (struct s390_processor):
11468         Share with s390-c.c, add arch_level field.
11469         * config/s390/s390.md:
11470         Remove occurrences in cpu attribute.
11471         * config/s390/s390.opt: Remove -march/-mtune support.
11472         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
11473         * doc/invoke.texi: Remove deprecation warning.
11475 2018-08-08  Luis Machado  <luis.machado@linaro.org>
11477         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
11478         global.
11479         (qdf24xx_tunings): Set vector cost structure to
11480         qdf24xx_vector_cost.
11482         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
11483         <register_sextend>: Set to 3.
11485 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
11487         PR target/86838
11488         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
11489         * config/aarch64/aarch64-simd.md
11490         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
11491         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
11492         (aarch64_frecpx<mode>): ...this new pattern.
11493         * config/aarch64/aarch64-simd-builtins.def: Remove comment
11494         about aarch64_frecp<FRECP:frecp_suffix><mode>.
11496 2018-08-07  Martin Liska  <mliska@suse.cz>
11498         PR middle-end/83023
11499         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
11500         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
11501         * predict.def (PRED_MALLOC_NONNULL): New predictor.
11502         * doc/extend.texi: Document that malloc attribute adds
11503         hit to compiler.
11505 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
11507         PR target/86785
11508         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11509         Define to speculation_safe_value_not_needed.
11511 2018-08-06  Jeff Law  <law@redhat.com>
11513         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
11514         the vr_values instance to cprop_into_stmt.
11515         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
11516         (cprop_operand): Also query EVRP to determine if OP is a constant.
11518 2018-08-06  Nathan Sidwell  <nathan@acm.org>
11520         * diagnostic.c (diagnostic_report_current_module): Reroll
11521         included-at loop.  Translate text.
11523 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
11525         * function-tests.c (selftest::test_expansion_to_rtl): Call
11526         free_after_compilation.
11528 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11530         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
11532 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
11534         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
11535         loops with memory block operations from getting unrolled.
11537 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
11539         PR target/86807
11540         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11541         Define to speculation_safe_value_not_needed.
11543 2018-08-06  Jeff Law  <law@redhat.com>
11545         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
11546         assert.
11548 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11550         PR target/86662
11551         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
11552         with all enabled __intN types.
11554         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
11556 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11558         * alias.c (record_set): Check for clobber high.
11559         * cfgexpand.c (expand_gimple_stmt): Likewise.
11560         * combine-stack-adj.c (single_set_for_csa): Likewise.
11561         * combine.c (find_single_use_1): Likewise.
11562         (set_nonzero_bits_and_sign_copies): Likewise.
11563         (get_combine_src_dest): Likewise.
11564         (is_parallel_of_n_reg_sets): Likewise.
11565         (try_combine): Likewise.
11566         (record_dead_and_set_regs_1): Likewise.
11567         (reg_dead_at_p_1): Likewise.
11568         (reg_dead_at_p): Likewise.
11569         * dce.c (deletable_insn_p): Likewise.
11570         (mark_nonreg_stores_1): Likewise.
11571         (mark_nonreg_stores_2): Likewise.
11572         * df-scan.c (df_find_hard_reg_defs): Likewise.
11573         (df_uses_record): Likewise.
11574         (df_get_call_refs): Likewise.
11575         * dwarf2out.c (mem_loc_descriptor): Likewise.
11576         * haifa-sched.c (haifa_classify_rtx): Likewise.
11577         * ira-build.c (create_insn_allocnos): Likewise.
11578         * ira-costs.c (scan_one_insn): Likewise.
11579         * ira.c (equiv_init_movable_p): Likewise.
11580         (rtx_moveable_p): Likewise.
11581         (interesting_dest_for_shprep): Likewise.
11582         * jump.c (mark_jump_label_1): Likewise.
11583         * postreload-gcse.c (record_opr_changes): Likewise.
11584         * postreload.c (reload_cse_simplify): Likewise.
11585         (struct reg_use): Add source expr.
11586         (reload_combine): Check for clobber high.
11587         (reload_combine_note_use): Likewise.
11588         (reload_cse_move2add): Likewise.
11589         (move2add_note_store): Likewise.
11590         * print-rtl.c (print_pattern): Likewise.
11591         * recog.c (decode_asm_operands): Likewise.
11592         (store_data_bypass_p): Likewise.
11593         (if_test_bypass_p): Likewise.
11594         * regcprop.c (kill_clobbered_value): Likewise.
11595         (kill_set_value): Likewise.
11596         * reginfo.c (reg_scan_mark_refs): Likewise.
11597         * reload1.c (maybe_fix_stack_asms): Likewise.
11598         (eliminate_regs_1): Likewise.
11599         (elimination_effects): Likewise.
11600         (mark_not_eliminable): Likewise.
11601         (scan_paradoxical_subregs): Likewise.
11602         (forget_old_reloads_1): Likewise.
11603         * reorg.c (find_end_label): Likewise.
11604         (try_merge_delay_insns): Likewise.
11605         (redundant_insn): Likewise.
11606         (own_thread_p): Likewise.
11607         (fill_simple_delay_slots): Likewise.
11608         (fill_slots_from_thread): Likewise.
11609         (dbr_schedule): Likewise.
11610         * resource.c (update_live_status): Likewise.
11611         (mark_referenced_resources): Likewise.
11612         (mark_set_resources): Likewise.
11613         * rtl.c (copy_rtx): Likewise.
11614         * rtlanal.c (reg_referenced_p): Likewise.
11615         (single_set_2): Likewise.
11616         (noop_move_p): Likewise.
11617         (note_stores): Likewise.
11618         * sched-deps.c (sched_analyze_reg): Likewise.
11619         (sched_analyze_insn): Likewise.
11621 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11623         * cse.c (invalidate_reg): New function extracted from...
11624         (invalidate): ...here.
11625         (canonicalize_insn): Check for clobber high.
11626         (invalidate_from_clobbers): invalidate clobber highs.
11627         (invalidate_from_sets_and_clobbers): Likewise.
11628         (count_reg_usage): Check for clobber high.
11629         (insn_live_p): Likewise.
11630         * cselib.c (cselib_expand_value_rtx_1):Likewise.
11631         (cselib_invalidate_regno): Check for clobber in setter.
11632         (cselib_invalidate_rtx): Pass through setter.
11633         (cselib_invalidate_rtx_note_stores):
11634         (cselib_process_insn): Check for clobber high.
11635         * cselib.h (cselib_invalidate_rtx): Add operand.
11637 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11639         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
11640         (mark_not_eliminable): Likewise.
11641         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
11642         * lra-lives.c (process_bb_lives): Check for clobber high.
11643         * lra.c (new_insn_reg): Remember clobber highs.
11644         (collect_non_operand_hard_regs): Check for clobber high.
11645         (lra_set_insn_recog_data): Likewise.
11646         (add_regs_to_insn_regno_info): Likewise.
11647         (lra_update_insn_regno_info): Likewise.
11649 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11651         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
11652         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
11654 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11656         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
11657         (copy_insn_1): Likewise.
11658         (gen_hard_reg_clobber_high): New gen function.
11659         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
11660         * genemit.c (gen_exp): Likewise.
11661         (gen_emit_seq): Pass through info.
11662         (gen_insn): Check for CLOBBER_HIGH.
11663         (gen_expand): Pass through info.
11664         (gen_split): Likewise.
11665         (output_add_clobbers): Likewise.
11666         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
11667         (remove_clobbers): Likewise.
11668         * rtl.h (gen_hard_reg_clobber_high): New declaration.
11670 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11672         * doc/rtl.texi (clobber_high): Add.
11673         (parallel): Add in clobber high
11674         * rtl.c (rtl_check_failed_code3): Add function.
11675         * rtl.def (CLOBBER_HIGH): Add expression.
11676         * rtl.h (RTL_CHECKC3): Add macro.
11677         (rtl_check_failed_code3): Add declaration.
11678         (XC3EXP): Add macro.
11680 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
11682         PR target/86386
11683         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
11684         cfun->machine->max_used_stack_alignment if needed.
11686 2018-08-04  Martin Sebor  <msebor@redhat.com>
11688         PR tree-optimization/86571
11689         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
11690         NaN output to 4.
11692 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
11694         PR target/86799
11695         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11696         Define.
11698 2018-08-03  Jeff Law  <law@redhat.com>
11700         PR target/86795
11701         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11702         Define to speculation_safe_value_not_needed.
11704 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
11706         * doc/gcov.texi (-x): Remove duplicate "to".
11707         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
11708         (-Wif-not-aligned): Remove duplicate "is".
11709         (-flto): Remove duplicate "the".
11710         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
11711         duplicate "v5.00.b".
11712         (MSP430 Options): Remove duplicate "and" from the description
11713         of "-mgprel-sec=regexp".
11714         (x86 Options): Remove duplicate copies of "vmldLog102" and
11715         vmlsLog104 from description of "-mveclibabi=type".
11717 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
11719         * internal-fn.h (first_commutative_argument): Declare.
11720         * internal-fn.c (first_commutative_argument): New function.
11721         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
11722         restrictions for pattern statements.  Use first_commutative_argument
11723         to look for commutative operands in calls to internal functions.
11725 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
11727         * Makefile.in (wide-int-range.o): New.
11728         * tree-vrp.c: Move all the wide_int_* functions to...
11729         * wide-int-range.cc: ...here.
11730         * tree-vrp.h: Move all the wide_int_* prototypes to...
11731         * wide-int-range.h: ...here.
11733 2018-08-03  Tom de Vries  <tdevries@suse.de>
11735         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
11736         UI_NONE.
11737         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
11738         * except.c (output_function_exception_table): Do early exit if
11739         targetm_common.except_unwind_info (&global_options) == UI_NONE.
11741 2018-08-03  Martin Liska  <mliska@suse.cz>
11743         * predict.c (dump_prediction): Change to 2 digits
11744         in fraction part.
11746 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11748         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
11749         neon_dup_q to...
11750         (falkor_am_1_gtov_gtov): ... a new insn reservation.
11752 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
11754         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
11755         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
11756         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
11757         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
11758         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
11760 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
11762         * diagnostic-show-locus.c (diagnostic_show_locus): Use
11763         pp_take_prefix when saving the existing prefix.
11764         * diagnostic.c (diagnostic_append_note): Likewise.
11765         * langhooks.c (lhd_print_error_function): Likewise.
11766         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
11767         param's type.  Free the existing prefix.
11768         (pp_take_prefix): New function.
11769         (pretty_printer::pretty_printer): Drop the prefix parameter.
11770         Rename the length parameter to match the comment.
11771         (pretty_printer::~pretty_printer): Free the prefix.
11772         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
11773         parameter.
11774         (struct pretty_printer): Drop the "const" from "prefix" field's
11775         type and clarify memory management.
11776         (pp_set_prefix): Drop the "const" from the 2nd param.
11777         (pp_take_prefix): New decl.
11779 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
11781         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
11782         for word_mode_ok here instead of passing as argument.
11783         (expand_block_compare): Change select_block_compare_mode() call.
11784         (expand_strncmp_gpr_sequence): New function.
11785         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
11787 2018-08-02  Jeff Law  <law@redhat.com>
11789         PR target/86790
11790         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11791         Define to speculation_safe_value_not_needed.
11793         PR target/86784
11794         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11795         Define to speculation_safe_value_not_needed.
11797 2018-08-02  Tom de Vries  <tdevries@suse.de>
11799         PR target/86660
11800         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
11801         function.  Return UI_TARGET unconditionally.
11802         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
11803         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
11805 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11807         * genemit.c (print_overload_test): Fix typo.
11809 2018-08-02  Richard Biener  <rguenther@suse.de>
11811         PR tree-optimization/86816
11812         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
11813         which checks for value availability before querying it.
11814         (gvn_uses_equal): Use it.
11815         (same_succ_hash): Likewise.
11816         (gimple_equal_p): Likewise.
11818 2018-08-02  Nick Clifton  <nickc@redhat.com>
11820         PR target/86813
11821         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11822         Define to speculation_safe_value_not_needed.
11824         PR target/86810
11825         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11826         Define to speculation_safe_value_not_needed.
11828         PR target/86810
11829         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11830         Define to speculation_safe_value_not_needed.
11832         PR target/86803
11833         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11834         Define to speculation_safe_value_not_needed.
11836         PR target/86797
11837         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11838         Define to speculation_safe_value_not_needed.
11840         PR target/86791
11841         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11842         Define to speculation_safe_value_not_needed.
11844         PR target/86789
11845         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11846         Define to speculation_safe_value_not_needed.
11848         PR target/86787
11849         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11850         Define to speculation_safe_value_not_needed.
11852         PR target/86782
11853         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11854         speculation_safe_value_not_needed.
11856         PR target/86781
11857         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
11858         to speculation_safe_value_not_needed.
11860 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11862         * doc/md.texi: Expand the documentation of instruction names
11863         to mention port-local uses.  Document '@' in pattern names.
11864         * read-md.h (overloaded_instance, overloaded_name): New structs.
11865         (mapping): Declare.
11866         (md_reader::handle_overloaded_name): New member function.
11867         (md_reader::get_overloads): Likewise.
11868         (md_reader::m_first_overload): New member variable.
11869         (md_reader::m_next_overload_ptr): Likewise.
11870         (md_reader::m_overloads_htab): Likewise.
11871         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
11872         m_next_overload_ptr and m_overloads_htab.
11873         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
11874         (get_mode_token, get_code_token, get_int_token): New functions.
11875         (map_attr_string): Add an optional argument that passes back
11876         the associated iterator.
11877         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
11878         (md_reader::handle_overloaded_name, add_overload_instance): New
11879         functions.
11880         (apply_iterators): Handle '@' names.  Report an error if '@'
11881         is used without iterators.
11882         (initialize_iterators): Initialize the new iterator_group fields.
11883         * genopinit.c (handle_overloaded_code_for)
11884         (handle_overloaded_gen): New functions.
11885         (main): Use them to print declarations of maybe_code_for_* and
11886         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
11887         * genemit.c (print_overload_arguments, print_overload_test)
11888         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
11889         (main): Use it to print definitions of maybe_code_for_* and
11890         maybe_gen_* functions.
11891         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
11892         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
11893         instead of explicit mode checks.
11894         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
11895         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
11896         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
11897         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
11898         (aarch64_expand_compare_and_swap): Likewise
11899         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
11900         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
11901         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
11902         (aarch64_constant_pool_reload_icode): Delete.
11903         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
11904         instead of aarch64_constant_pool_reload_icode.  Use
11905         code_for_aarch64_reload_mov instead of explicit mode checks.
11906         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
11907         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
11908         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
11909         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11910         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11911         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11912         (aarch64_atomic_load_op_code): Delete.
11913         (aarch64_emit_atomic_load_op): Likewise.
11914         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11915         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
11916         instead of aarch64_emit_atomic_load_op.
11917         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11918         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11919         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11920         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11921         character before the pattern name.
11922         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11923         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11924         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11925         (aarch64_frecps<mode>): Likewise.
11926         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11927         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11928         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11929         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11930         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11932 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11934         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11935         Allow HFmode constants if TARGET_FP_F16INST.
11937 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
11939         PR target/86014
11940         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11941         No longer check last store for clobber of address register.
11943 2018-08-02  Martin Liska  <mliska@suse.cz>
11945         PR gcov-profile/86817
11946         * gcov.c (process_all_functions): New function.
11947         (main): Call it.
11948         (process_file): Move functions processing to
11949         process_all_functions.
11951 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
11953         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11954         "const" to the "gimple *" and "rtx_insn *" parameters.
11955         * dumpfile.h (dump_user_location_t::dump_user_location_t):
11956         Likewise.
11957         (dump_location_t::dump_location_t): Likewise.
11959 2018-08-01  Martin Sebor  <msebor@redhat.com>
11961         PR tree-optimization/86650
11962         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11963         rather than a "gcall *".  Directly pass the data of interest
11964         to percent_K_format, rather than building a temporary CALL_EXPR
11965         to hold it.
11966         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11967         (gimple_fold_builtin_strncat): Adjust.
11968         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11969         gcall* argument with gimple*.
11970         * gimple-ssa-warn-restrict.c (check_call): Same.
11971         (wrestrict_dom_walker::before_dom_children): Same.
11972         (builtin_access::builtin_access): Same.
11973         (check_bounds_or_overlap): Same
11974         (maybe_diag_overlap): Same.
11975         (maybe_diag_offset_bounds): Same.
11976         * tree-diagnostic.c (default_tree_printer): Move usage of
11977         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11978         to this callsite.
11979         * tree-pretty-print.c (percent_K_format): Add argument.
11980         * tree-pretty-print.h: Add argument.
11981         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11982         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11983         (maybe_diag_stxncpy_trunc): Same.
11984         (handle_builtin_stxncpy): Same.
11985         (handle_builtin_strcat): Same.
11987 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11989         * match.pd: Optimise pointer range checks.
11991 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11993         PR tree-optimization/86758
11994         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11995         to remove pattern statements.
11997 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11999         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
12000         result of dfs_enumerate_from when constructing stmt_vec_infos,
12001         instead of additionally calling get_loop_body.
12003 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12005         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
12006         parameter.
12007         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
12008         When creating an iv, assert that the step is not known to be zero.
12009         (vect_setup_realignment): Update call accordingly.
12010         * tree-vect-stmts.c (vectorizable_store): Likewise.
12011         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
12013 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12015         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
12016         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
12017         (vectorizable_reduction): Likewise.
12018         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12019         (vect_detect_hybrid_slp_stmts): Likewise.
12020         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12022 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
12024         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
12025         (wide_int_set_zero_nonzero_bits): ...this.
12026         (zero_nonzero_bits_from_vr): Rename to...
12027         (vrp_set_zero_nonzero_bits): ...this.
12028         (extract_range_from_multiplicative_op_1): Abstract wide int
12029         code...
12030         (wide_int_range_multiplicative_op): ...here.
12031         (extract_range_from_binary_expr_1): Extract wide int binary
12032         operations into their own functions.
12033         (wide_int_range_lshift): New.
12034         (wide_int_range_can_optimize_bit_op): New.
12035         (wide_int_range_shift_undefined_p): New.
12036         (wide_int_range_bit_xor): New.
12037         (wide_int_range_bit_ior): New.
12038         (wide_int_range_bit_and): New.
12039         (wide_int_range_trunc_mod): New.
12040         (extract_range_into_wide_ints): New.
12041         (vrp_shift_undefined_p): New.
12042         (extract_range_from_multiplicative_op): New.
12043         (vrp_can_optimize_bit_op): New.
12044         * tree-vrp.h (value_range::dump): New.
12045         (wide_int_range_multiplicative_op): New.
12046         (wide_int_range_lshift):New.
12047         (wide_int_range_shift_undefined_p): New.
12048         (wide_int_range_bit_xor): New.
12049         (wide_int_range_bit_ior): New.
12050         (wide_int_range_bit_and): New.
12051         (wide_int_range_trunc_mod): New.
12052         (zero_nonzero_bits_from_bounds): Rename to...
12053         (wide_int_set_zero_nonzero_bits): ...this.
12054         (zero_nonzero_bits_from_vr): Rename to...
12055         (vrp_set_zero_nonzero_bits): ...this.
12056         (range_easy_mask_min_max): Rename to...
12057         (wide_int_range_can_optimize_bit_op): this.
12058         * vr-values.c (simplify_bit_ops_using_ranges): Rename
12059         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
12061 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12063         * tree-vectorizer.h (vect_orig_stmt): New function.
12064         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
12065         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
12066         (vect_create_epilog_for_reduction): Likewise.
12067         (vectorizable_live_operation): Likewise.
12068         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12069         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
12070         * tree-vect-stmts.c (vectorizable_call): Likewise.
12071         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
12073 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12075         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
12076         argument.
12077         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
12078         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
12079         (vect_transform_loop): Likewise.
12080         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12082 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12084         * tree-vectorizer.h (vect_schedule_slp): Return void.
12085         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12086         (vect_schedule_slp): Likewise.
12088 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12090         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
12091         argument.
12092         (vect_transform_loop): Update calls accordingly.  Schedule SLP
12093         instances before the main loop, if any exist.
12095 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
12097         PR tree-optimization/86749
12098         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
12099         If the lhs is used in a COND_EXPR, check that it is being used
12100         as the "then" or "else" value.
12102 2018-08-01  Tom de Vries  <tdevries@suse.de>
12104         PR target/86800
12105         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12106         speculation_safe_value_not_needed.
12108 2018-08-01  Richard Biener  <rguenther@suse.de>
12110         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
12111         as base and offset.
12113 2018-08-01  Martin Liska  <mliska@suse.cz>
12115         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
12116         format how successful transformation is dumped.
12117         (gimple_mod_pow2_value_transform): Likewise.
12118         (gimple_mod_subtract_transform): Likewise.
12119         (gimple_stringops_transform): Likewise.
12121 2018-08-01  Martin Liska  <mliska@suse.cz>
12123         PR value-prof/35543
12124         * value-prof.c (interesting_stringop_to_profile_p):
12125         Simplify the code and add BUILT_IN_MEMMOVE.
12126         (gimple_stringops_transform): Likewise.
12128 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
12130         * config/aarch64/aarch64-simd.md
12131         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12132         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12133         use GPI iterator instead of SI mode.
12135 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12137         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12138         rs6000_speculation_barrier.
12139         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12140         new barrier pattern name.
12142 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12144         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12145         (speculation_barrier): New insn.
12147 2018-08-01  Richard Biener  <rguenther@suse.de>
12149         PR bootstrap/86724
12150         * graphite.h: Include isl/id.h and isl/space.h to allow build
12151         with ISL 0.20.
12153 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
12155         PR target/86651
12156         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12157         mode for COFF targets.
12158         * defaults.h (TARGET_COFF): Define.
12159         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12160         TARGET_COFF): Define.
12161         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12162         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12163         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12165 2018-07-31  Alexandre Oliva <oliva@adacore.com>
12167         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12168         * gimple-streamer-out.c (output_bb): Save it.
12169         * lto-streamer-in.c (input_struct_function_base): Restore
12170         instance discriminator if available.  Create map on demand.
12171         * lto-streamer-out.c (output_struct_function_base): Save it if
12172         available.
12173         * final.c (decl_to_instance_map): Document LTO strategy.
12175 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
12176             Olivier Hainque  <hainque@adacore.com>
12178         * debug.h (decl_to_instance_map_t): New type.
12179         (decl_to_instance_map): Declare.
12180         (maybe_create_decl_to_instance_map): New inline function.
12181         * final.c (bb_discriminator, last_bb_discriminator): New statics,
12182         to track basic block discriminators.
12183         (final_start_function_1): Initialize them.
12184         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12185         bb_discriminator.
12186         (decl_to_instance_map): New variable.
12187         (map_decl_to_instance, maybe_set_discriminator): New functions.
12188         (notice_source_line): Set discriminator.
12190 2018-07-31  Ian Lance Taylor  <iant@golang.org>
12192         * targhooks.c (default_have_speculation_safe_value): Add
12193         ATTRIBUTE_UNUSED.
12195 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12197         * dump-context.h: Include "pretty-print.h".
12198         (dump_context::refresh_dumps_are_enabled): New decl.
12199         (dump_context::emit_item): New decl.
12200         (class dump_context): Add fields "m_test_pp" and
12201         "m_test_pp_flags".
12202         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12203         (temp_dump_context::get_dumped_text): New decl.
12204         (class temp_dump_context): Add field "m_pp".
12205         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12206         (dump_context::refresh_dumps_are_enabled): ...and add a test for
12207         m_test_pp.
12208         (set_dump_file): Update for above change.
12209         (set_alt_dump_file): Likewise.
12210         (dump_loc): New overload, taking a pretty_printer *.
12211         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
12212         to any test pretty-printer.
12213         (make_item_for_dump_gimple_stmt): New function, adapted from
12214         optinfo::add_gimple_stmt.
12215         (dump_context::dump_gimple_stmt): Call it, and use the result,
12216         eliminating the direct usage of dump_file and alt_dump_file in
12217         favor of indirectly using them via emit_item.
12218         (make_item_for_dump_gimple_expr): New function, adapted from
12219         optinfo::add_gimple_expr.
12220         (dump_context::dump_gimple_expr): Call it, and use the result,
12221         eliminating the direct usage of dump_file and alt_dump_file in
12222         favor of indirectly using them via emit_item.
12223         (make_item_for_dump_generic_expr): New function, adapted from
12224         optinfo::add_tree.
12225         (dump_context::dump_generic_expr): Call it, and use the result,
12226         eliminating the direct usage of dump_file and alt_dump_file in
12227         favor of indirectly using them via emit_item.
12228         (make_item_for_dump_printf_va): New function, adapted from
12229         optinfo::add_printf_va.
12230         (make_item_for_dump_printf): New function.
12231         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12232         and use the result, eliminating the direct usage of dump_file and
12233         alt_dump_file in favor of indirectly using them via emit_item.
12234         (make_item_for_dump_dec): New function.
12235         (dump_context::dump_dec): Call it, and use the result,
12236         eliminating the direct usage of dump_file and alt_dump_file in
12237         favor of indirectly using them via emit_item.
12238         (make_item_for_dump_symtab_node): New function, adapted from
12239         optinfo::add_symtab_node.
12240         (dump_context::dump_symtab_node): Call it, and use the result,
12241         eliminating the direct usage of dump_file and alt_dump_file in
12242         favor of indirectly using them via emit_item.
12243         (dump_context::begin_scope): Reimplement, avoiding direct usage
12244         of dump_file and alt_dump_file in favor of indirectly using them
12245         via emit_item.
12246         (dump_context::emit_item): New member function.
12247         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12248         Set up test pretty-printer on the underlying context.  Call
12249         refresh_dumps_are_enabled.
12250         (temp_dump_context::~temp_dump_context): Call
12251         refresh_dumps_are_enabled.
12252         (temp_dump_context::get_dumped_text): New member function.
12253         (selftest::verify_dumped_text): New function.
12254         (ASSERT_DUMPED_TEXT_EQ): New macro.
12255         (selftest::test_capture_of_dump_calls): Run all tests twice, with
12256         and then without optinfo enabled.  Add uses of
12257         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
12258         * dumpfile.h: Update comment for the dump_* API.
12259         * optinfo-emit-json.cc
12260         (selftest::test_building_json_from_dump_calls): Update for new
12261         param for temp_dump_context ctor.
12262         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12263         and "m_owned" field.
12264         (optinfo_item::~optinfo_item): Likewise.
12265         (optinfo::add_item): New member function.
12266         (optinfo::emit): Update comment.
12267         (optinfo::add_string): Delete.
12268         (optinfo::add_printf): Delete.
12269         (optinfo::add_printf_va): Delete.
12270         (optinfo::add_gimple_stmt): Delete.
12271         (optinfo::add_gimple_expr): Delete.
12272         (optinfo::add_tree): Delete.
12273         (optinfo::add_symtab_node): Delete.
12274         (optinfo::add_dec): Delete.
12275         * optinfo.h (class dump_context): New forward decl.
12276         (optinfo::add_item): New decl.
12277         (optinfo::add_string): Delete.
12278         (optinfo::add_printf): Delete.
12279         (optinfo::add_printf_va): Delete.
12280         (optinfo::add_gimple_stmt): Delete.
12281         (optinfo::add_gimple_expr): Delete.
12282         (optinfo::add_tree): Delete.
12283         (optinfo::add_symtab_node): Delete.
12284         (optinfo::add_dec): Delete.
12285         (optinfo::add_poly_int): Delete.
12286         (optinfo_item::optinfo_item): Remove "owned" param.
12287         (class optinfo_item): Remove field "m_owned".
12289 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12291         PR middle-end/86705
12292         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12293         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12294         requested variable alignment.
12295         (expand_one_ssa_partition): Likewise.
12296         (expand_one_var): Likewise.
12298 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12300         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12301         to speculation_safe_value_not_needed.
12303 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12305         * targhooks.h (speculation_safe_value_not_needed): New prototype.
12306         * targhooks.c (speculation_safe_value_not_needed): New function.
12307         * target.def (have_speculation_safe_value): Update documentation.
12308         * doc/tm.texi: Regenerated.
12310 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12312         * config/aarch64/iterators.md (ALLI_TI): New iterator.
12313         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12314         expand.
12315         (despeculate_copy<ALLI:mode>_insn): New insn.
12316         (despeculate_copyti_insn): New insn.
12317         (despeculate_simple<ALLI:mode>): New insn
12318         (despeculate_simpleti): New insn.
12319         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12320         function.
12321         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12322         aarch64_speculation_safe_value.
12323         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12325 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12327         * config/aarch64/aarch64-speculation.cc: New file.
12328         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12329         before pass_reorder_blocks.
12330         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12331         prototype.
12332         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
12333         X14 and X15 when tracking speculation.
12334         * config/aarch64/aarch64.md (register name constants): Add
12335         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
12336         (unspec): Add UNSPEC_SPECULATION_TRACKER.
12337         (speculation_barrier): New insn attribute.
12338         (cmp<mode>): Allow SP in comparisons.
12339         (speculation_tracker): New insn.
12340         (speculation_barrier): Add speculation_barrier attribute.
12341         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
12342         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
12343         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
12345 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12347         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
12348         aarch64_track_speculation is true.
12349         (tb<optab><mode>1): Likewise.
12350         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
12351         generate CB[N]Z when tracking speculation.
12352         (aarch64_split_compare_and_swap): Likewise.
12353         (aarch64_split_atomic_op): Likewise.
12355 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12357         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
12359 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12361         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
12362         (speculation_barrier): New insn.
12364 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12366         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
12367         * config/arm/arm.md (speculation_barrier): New expand.
12368         (speculation_barrier_insn): New pattern.
12370 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12372         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
12373         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
12374         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
12375         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
12376         list.
12377         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
12378         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
12379         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
12380         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12381         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
12382         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
12383         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
12384         * builtins.c (expand_speculation_safe_value): New function.
12385         (expand_builtin): Call it.
12386         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
12387         * doc/extend.texi: Document __builtin_speculation_safe_value.
12388         * doc/md.texi: Document "speculation_barrier" pattern.
12389         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
12390         TARGET_HAVE_SPECULATION_SAFE_VALUE.
12391         * doc/tm.texi: Regenerated.
12392         * target.def (have_speculation_safe_value, speculation_safe_value): New
12393         hooks.
12394         * targhooks.c (default_have_speculation_safe_value): New function.
12395         (default_speculation_safe_value): New function.
12396         * targhooks.h (default_have_speculation_safe_value): Add prototype.
12397         (default_speculation_safe_value): Add prototype.
12399 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12401         * dump-context.h (dump_context::dump_loc): New decl.
12402         * dumpfile.c (dump_context::dump_loc): New member function.
12403         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
12404         and dump_gimple_stmt.
12405         (dump_context::dump_gimple_expr_loc): Likewise, using
12406         dump_gimple_expr.
12407         (dump_context::dump_generic_expr_loc): Likewise, using
12408         dump_generic_expr.
12409         (dump_context::dump_printf_loc_va): Likewise, using
12410         dump_printf_va.
12411         (dump_context::begin_scope): Explicitly using the global function
12412         "dump_loc", rather than the member function.
12414 2018-07-31  Martin Sebor  <msebor@redhat.com>
12416         PR tree-optimization/86741
12417         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
12419 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
12421         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
12422         depend on whether prefetch instructions will be emitted or not.
12423         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
12424         will be emitted or not.
12425         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
12426         (TARGET_SETMEM_PFD): New macros.
12428 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12430         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
12431         (NULL_STMT_VEC_INFO): Delete.
12432         (stmt_vec_info::operator*): Likewise.
12433         (stmt_vec_info::operator gimple *): Likewise.
12434         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
12435         of NULL_STMT_VEC_INFO.
12436         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12437         (vect_reassociating_reduction_p): Likewise.
12438         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12439         (vectorizable_store): Likewise.
12440         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
12441         (vec_info::free_stmt_vec_infos): Likewise.
12443 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12445         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
12446         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
12448 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12450         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
12451         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12452         (vec_info::free_stmt_vec_info): New private member functions.
12453         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
12454         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
12455         * tree-parloops.c (gather_scalar_reductions): Remove calls to
12456         set_stmt_vec_info_vec and free_stmt_vec_infos.
12457         * tree-vect-loop.c (_loop_vec_info): Remove call to
12458         set_stmt_vec_info_vec.
12459         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
12460         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
12461         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
12462         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12463         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
12464         assignments in {vec_info::,}new_stmt_vec_info that are redundant
12465         with the clearing in the xcalloc.
12466         (stmt_vec_info_vec): Delete.
12467         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
12468         (vectorize_loops): Likewise.
12469         (vec_info::~vec_info): Remove argument from call to
12470         free_stmt_vec_infos.
12471         (vec_info::add_stmt): Remove vinfo argument from call to
12472         new_stmt_vec_info.
12474 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12476         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
12477         rather than a gimple stmt.
12478         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
12479         information for pattern statements when passed the original
12480         statement; instead wait to be passed the pattern statement itself.
12481         Don't call set_vinfo_for_stmt here.
12482         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
12483         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
12484         stmt_vec_infos here.
12485         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
12486         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
12487         stmt_vec_infos entry.
12489 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12491         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
12492         * tree-vectorizer.c (vec_info::replace_stmt): New function.
12493         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
12494         * tree-vect-stmts.c (vectorizable_call): Likewise.
12495         (vectorizable_simd_clone_call): Likewise.
12497 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12499         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
12500         * tree-vectorizer.c (vec_info::remove_stmt): New function.
12501         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
12502         * tree-vect-loop.c (vect_transform_loop): Likewise.
12503         * tree-vect-slp.c (vect_schedule_slp): Likewise.
12504         * tree-vect-stmts.c (vect_remove_stores): Likewise.
12506 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12508         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
12509         (vect_dr_stmt): Delete.
12510         * tree-vectorizer.c (vec_info::lookup_dr): New function.
12511         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
12512         of DR_VECT_AUX.
12513         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12514         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
12515         (vect_verify_datarefs_alignment, vect_peeling_supportable)
12516         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12517         (vect_analyze_data_refs): Likewise.
12518         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
12519         argument.
12520         (vect_find_same_alignment_drs): Likewise.
12521         (vect_slp_analyze_node_dependences): Update calls accordingly.
12522         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
12523         instead of DR_VECT_AUX.
12524         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
12525         of a vector data references.  Use vec_info::lookup_dr instead of
12526         DR_VECT_AUX.
12527         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
12528         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
12529         instead of DR_VECT_AUX.
12531 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12533         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
12534         dr_vec_info.
12535         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12536         accordingly.
12537         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12538         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12539         (vect_gen_prolog_loop_niters): Likewise.
12541 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12543         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
12544         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
12545         (vect_known_alignment_in_bytes, vect_dr_behavior)
12546         (vect_get_scalar_dr_size): Take references as dr_vec_infos
12547         instead of data_references.  Update calls to other routines for
12548         which the same change has been made.
12549         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
12550         dr_vec_infos instead of stmt_vec_infos.
12551         (vect_analyze_data_ref_dependence): Update call accordingly.
12552         (vect_slp_analyze_data_ref_dependence)
12553         (vect_record_base_alignments): Use DR_VECT_AUX.
12554         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
12555         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
12556         (vector_alignment_reachable_p, vect_get_data_access_cost)
12557         (vect_peeling_supportable, vect_analyze_group_access_1)
12558         (vect_analyze_group_access, vect_analyze_data_ref_access)
12559         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
12560         (vect_compile_time_alias, vect_small_gap_p)
12561         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
12562         (vect_supportable_dr_alignment): Take references as dr_vec_infos
12563         instead of data_references.  Update calls to other routines for
12564         which the same change has been made.
12565         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
12566         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12567         (vect_slp_analyze_and_verify_node_alignment)
12568         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12569         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12570         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
12571         above changes.
12572         (_vect_peel_info::dr): Replace with...
12573         (_vect_peel_info::dr_info): ...this new field.
12574         (vect_peeling_hash_get_most_frequent)
12575         (vect_peeling_hash_choose_best_peeling): Update accordingly.
12576         (vect_peeling_hash_get_lowest_cost):
12577         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
12578         routines for which the same change has been made.
12579         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
12580         data_reference.
12581         * tree-vect-loop-manip.c (get_misalign_in_elems)
12582         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
12583         above changes.
12584         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12585         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
12586         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
12587         (get_group_load_store_type, get_negative_load_store_type)
12588         (vect_get_data_ptr_increment, vectorizable_store)
12589         (vectorizable_load): Likewise.
12590         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
12591         Update calls to other routines for which the same change has been made.
12593 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12595         * tree-vectorizer.h (vec_info::move_dr): New member function.
12596         (dataref_aux): Rename to...
12597         (dr_vec_info): ...this and add "dr" and "stmt" fields.
12598         (_stmt_vec_info::dr_aux): Update accordingly.
12599         (_stmt_vec_info::data_ref_info): Delete.
12600         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
12601         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
12602         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
12603         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
12604         of data_ref.
12605         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
12606         (STMT_VINFO_DR_INFO): New macro.
12607         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
12608         (set_dr_misalignment): Update after rename of dataref_aux.
12609         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
12610         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
12611         initialization of STMT_VINFO_DATA_REF.
12612         * tree-vectorizer.c (vec_info::move_dr): New function.
12613         * tree-vect-patterns.c (vect_recog_bool_pattern)
12614         (vect_recog_mask_conversion_pattern)
12615         (vect_recog_gather_scatter_pattern): Use it.
12616         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
12617         the "dr" and "stmt" fields of dr_vec_info instead of
12618         STMT_VINFO_DATA_REF.
12620 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12622         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
12623         (is_pattern_stmt_p): Use it.
12624         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
12625         on pattern statements.
12627 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12629         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
12630         original stmt as a stmt_vec_info rather than a gimple stmt.
12631         (vect_pattern_recog_1): Take the statement directly as a
12632         stmt_vec_info, rather than via a gimple_stmt_iterator.
12633         Update call to vect_mark_pattern_stmts.
12634         (vect_pattern_recog): Update calls accordingly.
12636 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12638         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
12639         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
12640         a vect_def_type for the first argument.
12641         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
12642         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
12643         operand if it isn't defined by a vectorized statement.
12644         (vect_build_gather_load_calls): Remove the mask_dt argument and
12645         update calls to vect_get_vec_def_for_stmt_copy.
12646         (vectorizable_bswap): Likewise the dt argument.
12647         (vectorizable_call): Update calls to vectorizable_bswap and
12648         vect_get_vec_def_for_stmt_copy.
12649         (vectorizable_simd_clone_call, vectorizable_assignment)
12650         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
12651         (vectorizable_comparison): Update calls to
12652         vect_get_vec_def_for_stmt_copy.
12653         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
12654         vect_is_simple_use.
12655         (vect_get_loop_based_defs): Remove dt argument and update call
12656         to vect_get_vec_def_for_stmt_copy.
12657         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
12658         and vect_get_vec_def_for_stmt_copy.
12659         (vectorizable_load): Update calls to vect_build_gather_load_calls
12660         and vect_get_vec_def_for_stmt_copy.
12661         * tree-vect-loop.c (vect_create_epilog_for_reduction)
12662         (vectorizable_reduction, vectorizable_live_operation): Update calls
12663         to vect_get_vec_def_for_stmt_copy.
12665 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12667         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
12668         and gimple stmt arguments with a stmt_vec_info.
12669         (vect_record_base_alignments): Update calls accordingly.
12670         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
12671         and gimple stmt arguments with a stmt_vec_info.
12672         (vect_build_slp_tree_1): Remove vinfo argument and update call
12673         to vect_record_max_nunits.
12674         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
12675         and vect_record_max_nunits.
12677 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12679         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
12680         file and take a stmt_vec_info instead of a gimple stmt.
12681         (supportable_widening_operation, vect_finish_replace_stmt)
12682         (vect_finish_stmt_generation, vect_get_store_rhs)
12683         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
12684         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
12685         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
12686         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
12687         (vect_create_data_ref_ptr, bump_vector_ptr)
12688         (vect_permute_store_chain, vect_setup_realignment)
12689         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
12690         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
12691         (vectorizable_reduction, vectorizable_induction)
12692         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
12693         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
12694         than gimple stmts as arguments.
12695         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
12696         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
12697         (can_group_stmts_p, vect_check_gather_scatter)
12698         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12699         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
12700         (vect_permute_load_chain, vect_shift_permute_load_chain)
12701         (vect_transform_grouped_load)
12702         (vect_record_grouped_load_vectors): Likewise.
12703         * tree-vect-loop.c (vect_fixup_reduc_chain)
12704         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
12705         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
12706         (vectorizable_reduction, vectorizable_induction)
12707         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
12708         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
12709         (vect_get_load_store_mask): Likewise.
12710         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
12711         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
12712         * tree-vect-stmts.c (vect_mark_relevant)
12713         (is_simple_and_all_uses_invariant)
12714         (exist_non_indexing_operands_for_use_p, process_use)
12715         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
12716         (vect_get_vec_def_for_operand, vect_get_vec_defs)
12717         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
12718         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
12719         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
12720         (get_negative_load_store_type, get_load_store_type)
12721         (vect_check_load_store_mask, vect_check_store_rhs)
12722         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
12723         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12724         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12725         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12726         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
12727         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
12728         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
12729         (supportable_widening_operation): Likewise.
12731 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12733         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
12734         a stmt_vec_info instead of a gcall.
12735         (vect_check_gather_scatter): Update call accordingly.
12736         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
12737         of a gphi.
12738         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
12739         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
12740         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
12741         instead of a gimple stmt.
12742         (vect_transform_loop): Update calls accordingly.
12743         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
12744         stmt_vec_infos instead of gimple stmts.
12745         (vect_analyze_slp_instance): Update use accordingly.
12746         * tree-vect-stmts.c (read_vector_array, write_vector_array)
12747         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
12748         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
12749         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
12750         (vect_gen_widened_results_half, vect_get_loop_based_defs)
12751         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
12752         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
12753         down to subroutines.
12755 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12757         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
12758         of the worklist from a vector of gimple stmts to a vector of
12759         stmt_vec_infos.
12760         * tree-vect-stmts.c (vect_mark_relevant, process_use)
12761         (vect_mark_stmts_to_be_vectorized): Likewise
12763 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12765         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
12766         statement before passing it to vect_analyze_stmt.
12767         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
12768         the chain of phi vector definitions.  Track the exit phi via its
12769         stmt_vec_info.
12770         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
12771         STMT_VINFO_REDUC_DEF.
12772         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
12773         stmt_vec_infos to handle the statement chains.
12774         (vect_get_slp_defs): Record the first statement in the node
12775         using a stmt_vec_info.
12776         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
12777         statements here and pass their stmt_vec_info down to subroutines.
12778         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
12779         down to vect_finish_stmt_generation.
12780         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
12781         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
12782         stmt_vec_infos to subroutines.
12783         (vect_remove_stores): Use stmt_vec_infos to handle the statement
12784         chains.
12786 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12788         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
12789         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
12790         (vect_permute_store_chain, vect_setup_realignment)
12791         (vect_permute_load_chain, vect_shift_permute_load_chain)
12792         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
12793         stmts internally, and when passing values to other vectorizer routines.
12794         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12795         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
12796         (vect_analyze_loop_operations, get_initial_def_for_reduction)
12797         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
12798         (vectorizable_reduction, vectorizable_induction)
12799         (vectorizable_live_operation, vect_transform_loop_stmt)
12800         (vect_transform_loop): Likewise.
12801         * tree-vect-patterns.c (vect_reassociating_reduction_p)
12802         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
12803         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
12804         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12805         (vect_slp_analyze_node_operations_1): Likewise.
12806         * tree-vect-stmts.c (vect_mark_relevant, process_use)
12807         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
12808         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
12809         (vect_finish_stmt_generation_1, get_group_load_store_type)
12810         (get_load_store_type, vect_build_gather_load_calls)
12811         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12812         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12813         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12814         (vectorizable_store, vectorizable_load, vectorizable_condition)
12815         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
12816         (supportable_widening_operation): Likewise.
12817         (vect_get_vector_types_for_stmt): Likewise.
12818         * tree-vectorizer.h (vect_dr_behavior): Likewise.
12820 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12822         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12823         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
12824         (vect_permute_store_chain, vect_permute_load_chain)
12825         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
12826         repeated stmt_vec_info lookups.
12827         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12828         (vect_update_ivs_after_vectorizer): Likewise.
12829         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
12830         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12831         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
12832         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12833         (vect_bb_slp_scalar_cost): Likewise.
12834         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
12836 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12838         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
12839         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
12840         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
12841         to get gassigns and gcalls, rather than operating on generc gimple
12842         stmts.
12843         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
12844         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
12845         (vectorizable_load, vect_analyze_stmt): Likewise.
12846         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
12848 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12850         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
12851         return stmt_vec_infos rather than gimple stmts.  Do not accept
12852         null arguments.
12853         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
12854         of a gimple stmt.
12855         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12856         Update use of get_later_stmt.
12857         (vect_get_constant_vectors): Update call accordingly.
12858         (vect_schedule_slp_instance): Likewise
12859         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
12860         (vect_slp_analyze_instance_dependence): Likewise.
12861         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
12863 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12865         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
12866         (stmt_info_for_cost::stmt_info): ...this new field.
12867         (add_stmt_costs): Update accordingly.
12868         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12869         (vect_get_known_peeling_cost): Likewise.
12870         (vect_estimate_min_profitable_iters): Likewise.
12871         * tree-vect-stmts.c (record_stmt_cost): Likewise.
12873 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12875         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
12876         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12877         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12878         accordingly.
12879         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
12881 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12883         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
12884         a gimple stmt to a stmt_vec_info.
12885         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12887 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12889         * tree-vectorizer.h (vec_info::grouped_stores): Change from
12890         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12891         (_loop_vec_info::reduction_chains): Likewise.
12892         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
12893         accordingly.
12894         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12896 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12898         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
12899         a gimple stmt to a stmt_vec_info.
12900         (_stmt_vec_info::next_element): Likewise.
12901         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
12902         (vect_slp_analyze_and_verify_node_alignment)
12903         (vect_analyze_group_access_1, vect_analyze_group_access)
12904         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
12905         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
12906         (vect_supportable_dr_alignment): Update accordingly.
12907         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
12908         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
12909         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12910         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12911         * tree-vect-slp.c (vect_build_slp_tree_1)
12912         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12913         (vect_split_slp_store_group, vect_analyze_slp_instance)
12914         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12915         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12916         (get_group_load_store_type, get_load_store_type)
12917         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12918         (vect_transform_stmt, vect_remove_stores): Likewise.
12920 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12922         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12923         than a gimple stmt.
12924         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12925         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12926         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12927         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12928         (vector_alignment_reachable_p, vect_get_data_access_cost)
12929         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12930         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12931         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12932         (vect_analyze_group_access_1, vect_analyze_group_access)
12933         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12934         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12935         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12936         result of vect_dr_stmt and use the stmt_vec_info instead of
12937         the associated gimple stmt.
12938         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12939         (vect_gen_prolog_loop_niters): Likewise.
12940         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12942 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12944         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12945         to a vec<stmt_vec_info>.
12946         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12947         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12948         vec<stmt_vec_info>.
12949         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12950         to a vec<stmt_vec_info>.
12951         (bst_traits::value_type, bst_traits::value_type): Likewise.
12952         (bst_traits::hash): Update accordingly.
12953         (vect_get_and_check_slp_defs): Change the stmts parameter from
12954         a vec<gimple *> to a vec<stmt_vec_info>.
12955         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12956         (vect_build_slp_tree): Likewise.
12957         (vect_build_slp_tree_2): Likewise.  Update uses of
12958         SLP_TREE_SCALAR_STMTS.
12959         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12960         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12961         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12962         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12963         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12964         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12965         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12966         (vect_get_constant_vectors, vect_get_slp_defs)
12967         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12968         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12969         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12970         instead of gimple stmts.
12971         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12972         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12973         (vect_slp_analyze_instance_dependence): Update uses of
12974         SLP_TREE_SCALAR_STMTS.
12975         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12976         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12977         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12978         (get_initial_defs_for_reduction): Likewise.
12979         (vect_create_epilog_for_reduction): Likewise.
12980         (vectorize_fold_left_reduction): Likewise.
12981         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12982         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12983         (can_vectorize_live_stmts): Likewise.
12985 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12987         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12988         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12989         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12990         than gimple stmts.
12991         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12992         of a gimple stmt.
12993         (gather_scalar_reductions): Update after above interface changes.
12994         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12995         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12996         than gimple stmts.
12997         (vect_force_simple_reduction): Likewise.
12998         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12999         LOOP_VINFO_REDUCTIONS.
13000         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
13002 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13004         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
13005         a gimple stmt to a stmt_vec_info.
13006         * tree-vect-loop.c (vect_active_double_reduction_p)
13007         (vect_force_simple_reduction, vectorizable_reduction): Update
13008         accordingly.
13010 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13012         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
13013         vec<gimple *> to a vec<stmt_vec_info>.
13014         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
13015         the reduction_phis argument from a vec<gimple *> to a
13016         vec<stmt_vec_info>.
13017         (vectorizable_reduction): Likewise the phis local variable that
13018         is passed to vect_create_epilog_for_reduction.  Update for new type
13019         of SLP_TREE_VEC_STMTS.
13020         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
13021         (vectorizable_live_operation): Likewise.
13022         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
13023         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
13025 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13027         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
13028         a gimple stmt to a stmt_vec_info.
13029         (vectorizable_condition, vectorizable_live_operation)
13030         (vectorizable_reduction, vectorizable_induction): Pass back the
13031         vectorized statement as a stmt_vec_info.
13032         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
13033         use of STMT_VINFO_VEC_STMT.
13034         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
13035         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
13036         as stmt_vec_infos rather than gimple stmts.
13037         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
13038         to a stmt_vec_info.
13039         (vectorizable_live_operation): Likewise.
13040         (vectorizable_reduction, vectorizable_induction): Likewise,
13041         updating use of STMT_VINFO_VEC_STMT.
13042         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
13043         of STMT_VINFO_VEC_STMT.
13044         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
13045         (vectorizable_simd_clone_call, vectorizable_conversion)
13046         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13047         (vectorizable_store, vectorizable_load, vectorizable_condition)
13048         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
13049         from a gimple stmt to a stmt_vec_info.
13050         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
13051         pointer to a stmt_vec_info to the vectorizable_* routines.
13053 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13055         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
13056         a gimple stmt to a stmt_vec_info.
13057         (is_pattern_stmt_p): Update accordingly.
13058         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
13059         (vect_record_grouped_load_vectors): Likewise.
13060         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
13061         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
13062         (vect_model_reduction_cost): Likewise.
13063         (vect_create_epilog_for_reduction): Likewise.
13064         (vectorizable_reduction, vectorizable_induction): Likewise.
13065         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13066         Return the stmt_vec_info for the pattern statement.
13067         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
13068         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
13069         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13070         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
13071         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
13072         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
13073         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
13074         (free_stmt_vec_info, vect_is_simple_use): Likewise.
13076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13078         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
13079         (vect_finish_stmt_generation): Likewise.
13080         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13081         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
13082         (vect_build_gather_load_calls): Use the return value of the above
13083         functions instead of a separate call to vinfo_for_stmt.  Use narrow
13084         scopes for the input gimple stmt and wider scopes for the associated
13085         stmt_vec_info.  Use vec_info::lookup_def when setting these
13086         stmt_vec_infos from an SSA_NAME definition.
13087         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13088         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13089         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13090         (vectorizable_store, vectorizable_load, vectorizable_condition)
13091         (vectorizable_comparison): Likewise.
13092         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
13093         (vectorizable_reduction): Likewise.
13095 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13097         * tree-vectorizer.h (vect_is_simple_use): Add an optional
13098         stmt_vec_info * parameter before the optional gimple **.
13099         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13100         (process_use, vect_get_vec_def_for_operand_1): Update callers.
13101         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
13102         * tree-vect-loop.c (vectorizable_reduction): Likewise.
13103         (vectorizable_live_operation): Likewise.
13104         * tree-vect-patterns.c (type_conversion_p): Likewise.
13105         (vect_look_through_possible_promotion): Likewise.
13106         (vect_recog_rotate_pattern): Likewise.
13107         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13109 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13111         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
13112         a typedef to a wrapper class.
13113         (NULL_STMT_VEC_INFO): New macro.
13114         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
13115         (stmt_vec_info::operator*): New function.
13116         (stmt_vec_info::operator gimple *): Likewise.
13117         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
13118         (add_stmt_costs): Likewise.
13119         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
13120         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13121         (vect_get_known_peeling_cost): Likewise.
13122         (vect_estimate_min_profitable_iters): Likewise.
13123         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13124         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13125         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13126         (vectorizable_store, free_stmt_vec_infos): Likewise.
13127         (new_stmt_vec_info): Change return type of xcalloc to
13128         _stmt_vec_info *.
13130 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13132         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13133         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13134         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13135         a single_imm_use-based sequence.
13136         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13138 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13140         * tree-vectorizer.h (vec_info::lookup_def): Declare.
13141         * tree-vectorizer.c (vec_info::lookup_def): New function.
13142         * tree-vect-patterns.c (vect_get_internal_def): Use it.
13143         (vect_widened_op_tree): Likewise.
13144         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13145         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13146         (vectorizable_reduction): Likewise.
13147         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13148         of a gimple *.
13149         (vect_is_slp_reduction): Update calls accordingly.  Use
13150         vec_info::lookup_def.
13151         (vect_is_simple_reduction): Likewise
13152         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13154 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13156         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13157         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13158         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13159         of vinfo_for_stmt.
13160         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13161         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13162         (vect_update_vf_for_slp, vect_analyze_loop_operations)
13163         (vect_is_slp_reduction, vectorizable_induction)
13164         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13165         * tree-vect-patterns.c (vect_init_pattern_stmt):
13166         (vect_determine_min_output_precision_1, vect_determine_precisions)
13167         (vect_pattern_recog): Likewise.
13168         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13169         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13170         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13171         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13172         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13173         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
13174         info field from a loop to a loop_vec_info.
13176 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13178         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13179         (vec_info::add_stmt): Declare.
13180         * tree-vectorizer.c (vec_info::add_stmt): New function.
13181         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13182         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13183         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13184         (vectorizable_induction): Likewise.
13185         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13186         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13187         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13188         (vectorizable_load): Likewise.
13189         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13190         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13191         (vect_recog_gather_scatter_pattern): Likewise.
13192         (append_pattern_def_seq): Likewise.  Remove a check that is
13193         performed by add_stmt itself.
13195 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13197         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13198         which make_ssa_name was called with new_stmt before new_stmt
13199         had been created.
13201 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13203         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13204         split out from...
13205         (vect_is_slp_reduction): ...here...
13206         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
13207         that are already known to be false.
13209 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13211         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13212         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
13213         STMT_VINFO_NUM_SLP_USES when it's true.
13214         (vect_free_slp_instance): Add a final_p parameter and pass it to
13215         vect_free_slp_tree.
13216         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13217         (vect_analyze_slp_instance): Likewise.
13218         (vect_slp_analyze_operations): Likewise.
13219         (vect_slp_analyze_bb_1): Likewise.
13220         * tree-vectorizer.c (vec_info): Likewise.
13221         * tree-vect-loop.c (vect_transform_loop): Likewise.
13223 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13225         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13226         function is not called for second and subsequent members of
13227         a reduction group.
13229 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13231         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13232         cases for nested loops from here to ...
13233         (vect_create_epilog_for_reduction): ...here.  Only call
13234         vect_is_simple_use for inner-loop reductions.
13236 2018-07-31  Martin Liska  <mliska@suse.cz>
13238         PR gcov-profile/85338
13239         PR gcov-profile/85350
13240         PR gcov-profile/85372
13241         * profile.c (struct location_triplet): New.
13242         (struct location_triplet_hash): Likewise.
13243         (output_location): Do not output a BB that
13244         is already recorded for a line.
13245         (branch_prob): Use streamed_locations.
13247 2018-07-31  Martin Liska  <mliska@suse.cz>
13249         PR gcov-profile/85370
13250         * coverage.c (coverage_begin_function): Do not mark target
13251         clones as artificial functions.
13253 2018-07-31  Martin Liska  <mliska@suse.cz>
13255         PR gcov-profile/83813
13256         PR gcov-profile/84758
13257         PR gcov-profile/85217
13258         PR gcov-profile/85332
13259         * profile.c (branch_prob): Do not record GOTO expressions
13260         for GIMPLE statements which locations are already streamed.
13262 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13264         * gcc.c (handle_spec_function): Accept a soft_matched_part
13265         argument, as do_spec_1.  Pass it down to ...
13266         (eval_spec_function): Accept a soft_matched_part argument,
13267         and pass it down to ...
13268         (do_spec_2): Accept a soft_matched_part argument, and pass
13269         it down to do_spec_1.
13270         (do_spec_1): Pass soft_matched_part to handle_spec_function.
13271         (handle_braces): Update call to handle_spec_function.
13272         (driver::set_up_specs): Update calls to do_spec_2.
13273         (compare_debug_dump_opt_spec_function): Likewise.
13274         (compare_debug_self_opt_spec_function): Likewise.
13276 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13278         * common.opt (nolibc): New option.
13279         * doc/invoke.texi (Link Options): Document it.
13280         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13281         * config/alpha/linux.h: Likewise.
13282         * config/arc/elf.h: Likewise.
13283         * config/arm/uclinux-elf.h: Likewise.
13284         * config/arm/unknown-elf.h: Likewise.
13285         * config/avr/avrlibc.h: Likewise.
13286         * config/bfin/bfin.h: Likewise.
13287         * config/bfin/linux.h: Likewise.
13288         * config/bfin/uclinux.h: Likewise.
13289         * config/darwin.h: Likewise.
13290         * config/darwin10.h: Likewise.
13291         * config/darwin12.h: Likewise.
13292         * config/gnu-user.h: Likewise.
13293         * config/lm32/uclinux-elf.h: Likewise.
13294         * config/pa/pa-hpux11.h: Likewise.
13295         * config/pa/pa64-hpux.h: Likewise.
13296         * config/sparc/sparc.h: Likewise.
13298 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13300         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13301         undefined variables.
13303 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13305         PR target/86640
13306         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13307         instead of GEN_INT.
13309 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13311         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13312         terminated string literal.
13314 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13316         PR rtl-optimization/85160
13317         * combine.c (is_just_move): New function.
13318         (try_combine): Allow combining two instructions into two if neither of
13319         the original instructions was a move.
13321 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
13323         PR target/86673
13324         * doc/extend.texi (Global Register Variables): Discourage use of type
13325         qualifiers.
13326         (Local Register Variables): Likewise.
13328 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
13330         PR tree-optimization/86506
13331         * hwint.h (ceil_log2): Resync with hwint.c implementation.
13333 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
13335         PR target/86547
13336         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
13337         hard_regno, make sure no insn between `from` and `to` clobbers it.
13339 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
13340             Tom de Vries  <tdevries@suse.de>
13342         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
13343         (PTX_DEFAULT_RUNTIME_DIM): ... this.
13344         (nvptx_goacc_validate_dims): Set default worker and gang dims to
13345         PTX_DEFAULT_RUNTIME_DIM.
13346         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
13348 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
13350         * config/pa/pa.c (pa_output_addr_vec): Align address table.
13351         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
13352         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
13354 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
13356         * config/rs6000/constraints.md (wG constraint): Delete, no longer
13357         used.
13358         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
13359         predicate to reflect toc fusion has been deleted.
13360         (toc_fusion_mem_raw): Delete, no longer used.
13361         (toc_fusion_mem_wrapped): Likewise.
13362         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
13363         fusion mask bit.
13364         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
13365         Delete, no longer used.
13366         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
13367         meant to be used for toc fusion.
13368         (rs6000_debug_print_mode): Delete toc fusion debugging.
13369         (rs6000_debug_reg_global): Likewise.
13370         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
13371         fusion and secondary reload support that were never used.
13372         (rs6000_option_override_internal): Delete TOC fusion, that was only
13373         partially defined, and it did not work unless you also used the
13374         -mcmodel= switch.
13375         (rs6000_legitimate_address_p): Delete TOC fusion support.
13376         (rs6000_opt_masks): Likewise.
13377         (fusion_wrap_memory_address): Delete function, no longer used.
13378         (fusion_split_address); Delete TOC fusion support.
13379         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
13380         longer used with toc fusion being deleted.
13381         (TARGET_TOC_FUSION_FP): Likewise.
13382         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
13383         UNSPEC.
13384         (toc fusion spliter): Delete TOC fusion support.
13385         (toc_fusionload_<mode>): Likewise.
13386         (toc_fusionload_di): Likewise.
13387         (fusion_gpr_load_<mode>): Delete generator function, this insn no
13388         longer needs to be named.  Rename predicate to delete TOC fusion.
13389         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13390         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13391         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13392         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13393         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
13395 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13397         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
13398         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
13399         __int128 in built-in function prototypes.
13400         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
13401         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
13403 2018-07-27  Martin Sebor  <msebor@redhat.com>
13405         PR tree-optimization/86696
13406         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
13407         types, including enums.
13408         (handle_char_store): Be prepared for the above function to fail.
13410 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
13412         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
13413         when optimization level is lower than 2 or optimize for size.
13415 2018-07-26  Martin Sebor  <msebor@redhat.com>
13417         PR tree-optimization/86043
13418         PR tree-optimization/86042
13419         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
13420         (get_string_cst_length): Rename...
13421         (get_min_string_length): ...to this.  Add argument.
13422         (handle_char_store): Extend to handle multi-character stores by
13423         MEM_REF.
13424         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
13425         * tree.h (initializer_zerop): Add argument.
13427 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
13429         PR middle-end/86660
13430         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
13431         declare target to variables if they have always,{to,from,tofrom} map
13432         kinds.
13434 2018-07-26  Martin Liska  <mliska@suse.cz>
13436         PR lto/86548
13437         * lto-wrapper.c: Add linker_output as prefix
13438         for ltrans_output_file.
13440 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
13442         PR rtl-optimization/85805
13443         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
13444         value for hard registers if that was written in the same mode.
13446 2018-07-26  Martin Liska  <mliska@suse.cz>
13448         PR gcov-profile/86536
13449         * gcov.c (format_gcov): Use printf format %.*f directly
13450         and do not handle special values.
13452 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13454         * common/config/arc/arc-common.c (arc_option_optimization_table):
13455         Update default optimizations for size.
13457 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13459         * config/arc/arc.md (movsf_insn): Add short instruction selection.
13460         * config/arc/constraints.md (CfZ): New constraint.
13461         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
13462         (subsf3_fpu): Likewise.
13463         (cmpsf_fpu): Likewise.
13464         (cmpsf_fpu_uneq): Likewise.
13466 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13468         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
13469         accesses as well.
13470         (arc_is_uncached_mem_p): uncached applies to both the variable and
13471         the pointer.
13473 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13475         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
13476         register names.
13478 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
13480         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
13481         field "m_scopes" from vec to auto_vec.
13483 2018-07-25  Martin Liska  <mliska@suse.cz>
13485         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
13486         return type.
13488 2018-07-25  Richard Biener  <rguenther@suse.de>
13490         PR debug/86654
13491         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
13492         special wrt context_die late.
13493         (gen_subprogram_die): Re-use DIEs in local scope.
13495 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
13497         PR tree-optimization/86644
13498         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
13500 2018-07-25  Martin Liska  <mliska@suse.cz>
13502         PR middle-end/86645
13503         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
13504         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
13506 2018-07-25  Martin Liska  <mliska@suse.cz>
13508         PR sanitizer/79635
13509         * params.def: Explain ASan abbreviation and provide
13510         a documentation link.
13512 2018-07-24  Martin Sebor  <msebor@redhat.com>
13514         PR tree-optimization/86622
13515         PR tree-optimization/86532
13516         * builtins.h (string_length): Declare.
13517         * builtins.c (c_strlen): Correct handling of non-constant offsets.
13518         (check_access): Be prepared for non-constant length ranges.
13519         (string_length): Make extern.
13520         * expr.c (string_constant): Only handle the minor non-constant
13521         array index.  Use string_constant to compute the length of
13522         a generic string constant.
13524 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
13526         PR tree-optimization/86618
13527         * tree-vect-stmts.c (vectorizable_call): Don't take the address
13528         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
13530 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
13532         PR tree-optimization/86636
13533         * json.cc (json::object::set): Fix comment.  Add assertions.
13534         (json::array::append): Move here from json.h.  Add comment and an
13535         assertion.
13536         (json::string::string): Likewise.
13537         * json.h (json::array::append): Move to json.cc.
13538         (json::string::string): Likewise.
13539         * optinfo-emit-json.cc
13540         (optrecord_json_writer::impl_location_to_json): Assert that we
13541         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
13542         wrapper around it.  Expand the location once, rather than three
13543         times.
13544         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
13545         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
13546         wrappers.
13547         (optrecord_json_writer::optinfo_to_json): Likewise, in four
13548         places.  Fix some overlong lines.
13550 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
13552         * config/aarch64/aarch64-simd.md
13553         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
13554         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
13555         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
13556         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
13557         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
13558         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
13559         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
13560         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
13561         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
13563 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
13565         PR middle-end/86627
13566         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
13567         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
13568         and abs_d == d, do the power of two handling if profitable.
13570 2018-07-24  Richard Biener  <rguenther@suse.de>
13572         * match.pd: Add BIT_FIELD_REF canonicalizations.
13574 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13576         PR c/86617
13577         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
13579 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13581         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
13582         terminated STRING_CST object.
13584 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13586         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
13588 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
13590         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
13591         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
13592         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
13593         the elements into a register.
13594         (rs6000_split_v4si_init_di_reg): Delete.
13595         (rs6000_split_v4si_init): Delete.
13596         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
13597         (vsx_init_v4si): Rewrite as a define_expand.
13599 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
13601         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
13602         zero_extend argument from memory): New.
13604 2018-07-22  Martin Sebor  <msebor@redhat.com>
13606         PR bootstrap/86621
13607         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
13608         diagnosing calls with unknown arguments unless -Walloca-larger-than
13609         is restricted to less than PTRDIFF_MAX bytes.
13611 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
13613         * doc/gcov.texi (Invoking Gcov): Editorial changes.
13615 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
13617         * pretty-print.c (text_info::set_location): Remove redundant
13618         "line_table" parameter from call to rich_location::set_range.
13620 2018-07-20  Martin Sebor  <msebor@redhat.com>
13622         PR middle-end/82063
13623         * builtins.c (expand_builtin_alloca): Adjust.
13624         * calls.c (alloc_max_size): Simplify.
13625         * cgraphunit.c (cgraph_node::expand): Adjust.
13626         * common.opt (larger_than_size, warn_frame_larger_than): Remove
13627         variables.
13628         (frame_larger_than_size): Same.
13629         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
13630         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
13631         Initialize.
13632         * doc/invoke.texi (GCC Command Options): Document option arguments.
13633         Explain byte-size arguments and suffixes.
13634         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
13635         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
13636         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
13637         * doc/options.texi (UInteger): Expand.
13638         (Host_Wide_Int, ByteSize): Document new properties.
13639         * final.c (final_start_function_1): Include sizes in an error message.
13640         * function.c (frame_offset_overflow): Same.
13641         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
13642         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
13643         Diagnose unbounded alloca calls only for limits of less than
13644         PTRDIFF_MAX.
13645         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
13646         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
13647         for alloca(0).
13648         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
13649         only for limits of less than PTRDIFF_MAX.
13650         * langhooks-def.h (lhd_handle_option): Change function argument
13651         to HOST_WIDE_INT.
13652         * langhooks.c (lhd_handle_option): Same.
13653         * langhooks.h (handle_option): Same.
13654         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
13655         ByteSize flags.
13656         (var_type, var_type_struct): Same.
13657         (var_set): Handle ByteSize flag.
13658         * optc-gen.awk: Add comments to output to ease debugging.  Make
13659         use of HOST_WIDE_INT where appropriate.
13660         * opts-gen-save.awk:  Use %lx to format unsigned long.
13661         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
13662         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
13663         arguments.  Parse bytes-size suffixes.
13664         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
13665         (enum_value_to_arg): Same.
13666         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
13667         (handle_option): Adjust.
13668         (generate_option): Change function argument to HOST_WIDE_INT.
13669         (cmdline_handle_error): Adjust.
13670         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
13671         (set_option): Change function argument to HOST_WIDE_INT.
13672         (option_enabled): Handle cl_host_wide_int.
13673         (get_option_state): Handle CLVC_SIZE.
13674         (control_warning_option): Same.
13675         * opts.c (common_handle_option): Change function argument to
13676         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
13677         OPT_Wvla_larger_than_.
13678         * opts.h (enum cl_var_type): Add an enumerator.
13679         * stor-layout.c (layout_decl): Print a more meaningful warning.
13680         * toplev.c (output_stack_usage): Adjust.
13682 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
13684         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
13685         call to inline_expand_builtin_string_cmp.
13686         (expand_builtin_strcmp): Likewise.
13687         (expand_builtin_strncmp): Likewise.
13688         (inline_string_cmp): Delete the last parameter, change char_type_node
13689         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
13690         two operands.
13691         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
13692         the inlining expansion on target where the type of the call has same or
13693         narrower precision than unsigned char.
13695 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
13697         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
13698         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
13699         * common.opt (fsave-optimization-record): New option.
13700         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
13701         * doc/invoke.texi (-fsave-optimization-record): New option.
13702         * dumpfile.c: Include "optinfo-emit-json.h".
13703         (struct kv_pair): Move to coretypes.h.
13704         (optgroup_options): Make non-static.
13705         (dump_context::end_scope): Call
13706         optimization_records_maybe_pop_dump_scope.
13707         * dumpfile.h (optgroup_options): New decl.
13708         * json.cc: New file.
13709         * json.h: New file.
13710         * optinfo-emit-json.cc: New file.
13711         * optinfo-emit-json.h: New file.
13712         * optinfo.cc: Include "optinfo-emit-json.h".
13713         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
13714         (optinfo_enabled_p): Check optimization_records_enabled_p.
13715         (optinfo_wants_inlining_info_p): Likewise.
13716         * optinfo.h: Update comment.
13717         * profile-count.c (profile_quality_as_string): New function.
13718         * profile-count.h (profile_quality_as_string): New decl.
13719         (profile_count::quality): New accessor.
13720         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
13721         and optinfo_emit_json_cc_tests.
13722         * selftest.h (selftest::json_cc_tests): New decl.
13723         (selftest::optinfo_emit_json_cc_tests): New decl.
13724         * toplev.c: Include "optinfo-emit-json.h".
13725         (compile_file): Call optimization_records_finish.
13726         (do_compile): Call optimization_records_start.
13727         * tree-ssa-live.c: Include optinfo.h.
13728         (remove_unused_scope_block_p): Retain inlining information if
13729         optinfo_wants_inlining_info_p returns true.
13731 2018-07-20  Richard Biener  <rguenther@suse.de>
13733         PR debug/86585
13734         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
13735         to cover -flto-partition=none.
13737 2018-07-20  Martin Liska  <mliska@suse.cz>
13739         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
13740         (get_decl_source_range): Remove unused function.
13742 2018-07-20  Richard Biener  <rguenther@suse.de>
13744         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
13745         (struct vn_phi_s): Likewise.
13746         (struct vn_reference_s): Likewise.
13747         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
13748         for searching the slot of an entry known to be in the hash itself.
13749         (vn_phi_hasher::equal): Likewise.
13750         (vn_reference_hasher::equal): Likewise.
13751         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
13752         globals.
13753         (optimistic_info, current_info): Remove, keeping only valid_info.
13754         (vn_reference_lookup_1): Remove fallback lookup.
13755         (vn_reference_lookup_2): Likewise.
13756         (vn_nary_op_lookup_1): Likewise.
13757         (vn_phi_lookup): Likewise.
13758         (vn_nary_build_or_lookup_1): Make sure to not chain the built
13759         hash element.
13760         (vn_reference_insert): Adjust, chain the inserted hash element
13761         at last_inserted_ref.
13762         (vn_reference_insert_pieces): Likewise.
13763         (visit_reference_op_call): Likewise.
13764         (vn_nary_op_insert_into): Chain the inserted hash element at
13765         last_inserted_nary.
13766         (vn_nary_op_insert_pieces): Adjust.
13767         (vn_nary_op_insert): Likewise.
13768         (vn_nary_op_insert_stmt): Likewise.
13769         (vn_phi_insert): Adjust, chain the inserted hash element at
13770         last_inserted_phi.
13771         (process_scc): Remove clearing and copying the optimistic
13772         table.  Instead remove elements inserted during an optimistic
13773         iteration from the single table we maintain.
13774         (init_scc_vn): Adjust.
13775         (free_scc_vn): Likewise.
13776         (sccvn_dom_walker::record_cond): Likewise.
13777         (sccvn_dom_walker::after_dom_children): Likewise.
13779 2018-07-19  Martin Sebor  <msebor@redhat.com>
13781         PR tree-optimization/84047
13782         PR tree-optimization/83776
13783         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
13784         (check_array_bounds): Call it.
13786 2018-07-19  Martin Sebor  <msebor@redhat.com>
13788         * align.h (align_flags): Use member initialization.
13790 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
13792         * Makefile.in (OBJS): Add optinfo.o.
13793         * coretypes.h (class symtab_node): New forward decl.
13794         (struct cgraph_node): New forward decl.
13795         (class varpool_node): New forward decl.
13796         * dump-context.h: New file.
13797         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
13798         "tree-pass.h".
13799         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
13800         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
13801         (set_alt_dump_file): Likewise.
13802         (dump_context::~dump_context): New dtor.
13803         (dump_gimple_stmt): Move implementation to...
13804         (dump_context::dump_gimple_stmt): ...this new member function.
13805         Add the stmt to any pending optinfo, creating one if need be.
13806         (dump_gimple_stmt_loc): Move implementation to...
13807         (dump_context::dump_gimple_stmt_loc): ...this new member function.
13808         Start a new optinfo and add the stmt to it.
13809         (dump_gimple_expr): Move implementation to...
13810         (dump_context::dump_gimple_expr): ...this new member function.
13811         Add the stmt to any pending optinfo, creating one if need be.
13812         (dump_gimple_expr_loc): Move implementation to...
13813         (dump_context::dump_gimple_expr_loc): ...this new member function.
13814         Start a new optinfo and add the stmt to it.
13815         (dump_generic_expr): Move implementation to...
13816         (dump_context::dump_generic_expr): ...this new member function.
13817         Add the tree to any pending optinfo, creating one if need be.
13818         (dump_generic_expr_loc): Move implementation to...
13819         (dump_context::dump_generic_expr_loc): ...this new member
13820         function.  Add the tree to any pending optinfo, creating one if
13821         need be.
13822         (dump_printf): Move implementation to...
13823         (dump_context::dump_printf_va): ...this new member function.  Add
13824         the text to any pending optinfo, creating one if need be.
13825         (dump_printf_loc): Move implementation to...
13826         (dump_context::dump_printf_loc_va): ...this new member function.
13827         Start a new optinfo and add the stmt to it.
13828         (dump_dec): Move implementation to...
13829         (dump_context::dump_dec): ...this new member function.  Add the
13830         value to any pending optinfo, creating one if need be.
13831         (dump_context::dump_symtab_node): New member function.
13832         (dump_context::get_scope_depth): New member function.
13833         (dump_context::begin_scope): New member function.
13834         (dump_context::end_scope): New member function.
13835         (dump_context::ensure_pending_optinfo): New member function.
13836         (dump_context::begin_next_optinfo): New member function.
13837         (dump_context::end_any_optinfo): New member function.
13838         (dump_context::s_current): New global.
13839         (dump_context::s_default): New global.
13840         (dump_scope_depth): Delete global.
13841         (dumpfile_ensure_any_optinfo_are_flushed): New function.
13842         (dump_symtab_node): New function.
13843         (get_dump_scope_depth): Reimplement in terms of dump_context.
13844         (dump_begin_scope): Likewise.
13845         (dump_end_scope): Likewise.
13846         (selftest::temp_dump_context::temp_dump_context): New ctor.
13847         (selftest::temp_dump_context::~temp_dump_context): New dtor.
13848         (selftest::verify_item): New function.
13849         (ASSERT_IS_TEXT): New macro.
13850         (ASSERT_IS_TREE): New macro.
13851         (ASSERT_IS_GIMPLE): New macro.
13852         (selftest::test_capture_of_dump_calls): New test.
13853         (selftest::dumpfile_c_tests): Call it.
13854         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
13855         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
13856         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
13857         descriptive comment.
13858         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
13859         (dump_node, dump_bb): Move these unrelated decls.
13860         (class dump_manager): Add leading comment.
13861         * optinfo.cc: New file.
13862         * optinfo.h: New file.
13864 2018-07-19  Michael Collison  <michael.collison@arm.com>
13865             Richard Henderson <rth@redhat.com>
13867         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
13868         (subti): Handle op1 zero.
13869         (subvti4, usub4ti4): New.
13870         (*sub<GPI>3_compare1_imm): New.
13871         (sub<GPI>3_carryinCV): New.
13872         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
13873         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
13875 2018-07-19  Michael Collison  <michael.collison@arm.com>
13876             Richard Henderson <rth@redhat.com>
13878         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
13879         (addti3): Create simpler code if low part is already known to be 0.
13880         (addvti4, uaddvti4): New.
13881         (*add<GPI>3_compareC_cconly_imm): New.
13882         (*add<GPI>3_compareC_cconly): New.
13883         (*add<GPI>3_compareC_imm): New.
13884         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
13885         handle constants within this pattern..
13886         (*add<GPI>3_compareV_cconly_imm): New.
13887         (*add<GPI>3_compareV_cconly): New.
13888         (*add<GPI>3_compareV_imm): New.
13889         (add<GPI>3_compareV): New.
13890         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
13891         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
13892         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
13893         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
13894         with 'comparison' operator.
13895         (*add<GPI>3_compareV_cconly_imm): Ditto.
13896         (*add<GPI>3_compareV_cconly): Ditto.
13897         (*add<GPI>3_compareV_imm): Ditto.
13898         (add<GPI>3_compareV): Ditto.
13899         (add<mode>3_carryinC): Ditto.
13900         (*add<mode>3_carryinC_zero): Ditto.
13901         (*add<mode>3_carryinC): Ditto.
13902         (add<mode>3_carryinV): Ditto.
13903         (*add<mode>3_carryinV_zero): Ditto.
13904         (*add<mode>3_carryinV): Ditto.
13906 2018-07-19  Michael Collison  <michael.collison@arm.com>
13907             Richard Henderson <rth@redhat.com>
13909         * config/aarch64/aarch64-modes.def (CC_V): New.
13910         * config/aarch64/aarch64-protos.h
13911         (aarch64_addti_scratch_regs): Declare
13912         (aarch64_subvti_scratch_regs): Declare.
13913         (aarch64_expand_subvti): Declare.
13914         (aarch64_gen_unlikely_cbranch): Declare
13915         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13916         for signed overflow using CC_Vmode.
13917         (aarch64_get_condition_code_1): Handle CC_Vmode.
13918         (aarch64_gen_unlikely_cbranch): New function.
13919         (aarch64_addti_scratch_regs): New function.
13920         (aarch64_subvti_scratch_regs): New function.
13921         (aarch64_expand_subvti): New function.
13923 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13925         * config/aarch64/aarch64-option-extensions.def: New entry for profile
13926         extension.
13927         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13928         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13929         extension.
13931 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13933         PR target/83009
13934         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13935         address check not strict.
13937 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13939         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13940         Umq with Umn.
13941         (store_pair_lanes<mode>): Likewise.
13942         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13943         enum value 'ADDR_QUERY_LDP_STP_N'.
13944         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13945         (aarch64_print_address_internal): Add declaration.
13946         (aarch64_print_ldpstp_address): Remove.
13947         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13948         (aarch64_print_operand): Change printing of 'y'.
13949         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13950         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13951         'true' rather than '1'.
13952         * config/aarch64/constraints.md (Uml): Likewise.
13953         (Uml): Rename to Umn.
13954         (Umq): Remove.
13956 2018-07-19  Richard Biener  <rguenther@suse.de>
13958         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13959         a trailing array.
13960         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13961         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13962         (vn_reference_hasher): Likewise.
13963         (struct vn_tables_s): Remove obstack and alloc-pool members.
13964         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13965         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13966         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13967         (vn_reference_insert_pieces): Likewise.
13968         (alloc_vn_nary_op_noinit): Adjust.
13969         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13970         (vn_phi_eq): Adjust.
13971         (shared_lookup_phiargs): Remove.
13972         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13973         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13974         (visit_reference_op_call): Likewise.
13975         (copy_nary, copy_phi, copy_reference): Remove.
13976         (process_scc): Rewind the obstack when iterating.  Do not
13977         copy the elements to valid_info but just move them from one
13978         hashtable to the other.
13979         (allocate_vn_table): Adjust.
13980         (free_vn_table): Likewise.
13981         (init_scc_vn): Likewise.
13982         (free_scc_vn): Likewise.
13984 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
13986         PR target/86560
13987         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13988         indirect_return as function type attribute.
13989         (ix86_attribute_table): Change indirect_return to function
13990         type attribute.
13991         * doc/extend.texi: Update indirect_return attribute.
13993 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
13995         * wide-int.h (widest2_int): New.
13996         * gimple-fold.c (arith_overflowed_p): Use it.
13997         * tree.h (widest2_int_cst): New.
13998         * tree-vrp.c (wide_int_binop_overflow): Rename from
13999         vrp_int_const_binop.
14000         Rewrite to work on trees.
14001         (extract_range_from_multiplicative_op_1): Abstract code to...
14002         (wide_int_range_min_max): ...here.
14003         (wide_int_range_cross_product): ...and here.
14004         (extract_range_from_binary_expr_1): Abstract overflow code to...
14005         (wide_int_range_mult_wrapping): ...here.
14006         * tree-vrp.h (wide_int_range_cross_product): New.
14007         (wide_int_range_mult_wrapping): New.
14009 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
14010             Julia Koval  <julia.koval@intel.com>
14012         * config/i386/x86-tune-costs.h (skylake_memcpy,
14013         skylake_memset): Replace rep_prefix with unrolling for size 512.
14015 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
14017         PR middle-end/86544
14018         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
14019         comparision with EQ_EXPR in last stmt.
14021 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14023         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
14024         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
14025         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
14026         previously known as "PowerPC AltiVec Built-in Functions".  Move
14027         some material to new subsubsections "PowerPC AltiVec Built-in
14028         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
14029         ISA 2.07".
14030         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
14031         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
14032         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
14033         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
14035 2018-07-18  Richard Biener  <rguenther@suse.de>
14037         PR tree-optimization/86557
14038         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
14039         EXACT_DIV_EXPR.
14041 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
14043         * config/s390/s390.c (s390_function_profiler): Generate CFI.
14045 2018-07-17  Jeff Law  <law@redhat.com>
14047         * config/arm/arm.c (get_label_padding): Update for recent
14048         changes to label_to_alignment.
14050         PR tree-optimization/86010
14051         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
14053         * config/mips/mips.c (vr4130_align_insns): Update for recent
14054         changes to label_to_alignment.
14056         * config/frv/frv.c (frv_label_align): Update for recent changes
14057         to label_to_alignment.
14059         * config/nios2/nios2.c (nios2_label_align): Update for recent
14060         changes which dropped ALIGN_LABELS_LOG.
14062 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
14064         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
14065         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
14067 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
14069         * config/arc/arc.c (arc_label_align): Use align_labels instead of
14070         deprecated align_labels_log.
14072 2018-07-17  Richard Biener  <rguenther@suse.de>
14074         PR lto/86456
14075         * dwarf2out.c (init_sections_and_labels): Always generate
14076         a debug_line_str_section for early LTO debug.
14077         (dwarf2out_finish): Reset debug_line_str_hash output early.
14078         Bump counter for extra dwarf5 .debug_loc labels to not conflict
14079         with fat LTO part.
14080         (dwarf2out_early_finish): Output debug_line_str.
14082 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
14084         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
14085         index register on z196 or later.
14087 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
14089         * config/s390/s390.c (s390_default_align): Set default function
14090         alignment to 16.
14091         (s390_override_options_after_change): Call s390_default align.
14092         (s390_option_override_internal): Call s390_default_align.
14093         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
14095 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14097         PR middle-end/86542
14098         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
14099         to _looptemp_ clauses, other than the first two.
14101 2018-07-17  Martin Liska  <mliska@suse.cz>
14103         * opts.c: Do not enable OPT_falign_* for -Os.
14105 2018-07-17  Martin Liska  <mliska@suse.cz>
14107         * align.h (MAX_CODE_ALIGN): New.
14108         (MAX_CODE_ALIGN_VALUE): New.
14109         * common/config/i386/i386-common.c (ix86_handle_option):
14110         (MAX_CODE_ALIGN): Moved to align.h.
14111         * final.c (MAX_CODE_ALIGN): Likewise.
14112         * opts.c (parse_and_check_align_values):
14113         (MAX_CODE_ALIGN): Likewise.
14114         (MAX_CODE_ALIGN_VALUE): Likewise.
14116 2018-07-17  Martin Liska  <mliska@suse.cz>
14118         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
14119         in order to fulfil coding style.
14120         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
14121         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14122         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14123         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
14124         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14125         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14126         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14127         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14128         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14130 2018-07-17  Martin Liska  <mliska@suse.cz>
14132         * align.h: New file.
14133         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14134         directly.
14135         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14136         align_flags of label_to_alignment.
14137         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14138         align_flags class.
14139         * config/m68k/m68k.c: Do not use removed align_labels_value and
14140         align_loops_value.
14141         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14142         (LOOP_ALIGN): Likewise.
14143         (LABEL_ALIGN): Likewise.
14144         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14145         Remove not used macro.
14146         (rs6000_loop_align): Change return type to align_flags.
14147         (rs6000_loop_align_max_skip): Remove.
14148         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14149         Change return type to align_flags.
14150         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14151         Remove not used macro.
14152         (rs6000_loop_align):  Change return type to align_flags.
14153         (rs6000_loop_align_max_skip): Remove.
14154         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14155         * config/rx/rx-protos.h (rx_align_for_label): Make it
14156         static function.
14157         * config/rx/rx.c (rx_align_for_label): Change return type
14158         to align_flags.
14159         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14160         macro definitions.
14161         into align_flags class.
14162         (LABEL_ALIGN): Likewise.
14163         (LOOP_ALIGN): Likewise.
14164         * config/s390/s390.c (s390_label_align): Use align_flags
14165         class member.
14166         (s390_asm_output_function_label): Likewise.
14167         * config/sh/sh.c (sh_override_options_after_change):
14168         Use align_flags class directly without macros.
14169         (find_barrier): Likewise.
14170         (barrier_align): Likewise.
14171         (sh_loop_align): Likewise.
14172         * config/spu/spu.c (spu_option_override):
14173         Use align_flags_tuple::get_value instead of removed macros.
14174         (spu_sched_init): Likewise.
14175         * config/spu/spu.h (GTY): Likewise.
14176         * config/visium/visium.c (visium_option_override):
14177         Set "8" as default secondary alignment.
14178         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14179         in order to guarantee secondary alignment of 8.
14180         * coretypes.h: Include align.h header file.
14181         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14182         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14183         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14184         * doc/tm.texi.in: Likewise.
14185         * final.c (struct label_alignment): Remove not used structure.
14186         (LABEL_ALIGN): Change type to align_flags.
14187         (LOOP_ALIGN): Likewise.
14188         (JUMP_ALIGN): Likewise.
14189         (default_loop_align_max_skip): Remove.
14190         (default_label_align_max_skip): Likewise.
14191         (default_jump_align_max_skip): Likewise.
14192         (default_label_align_after_barrier_max_skip):
14193         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14194         (LABEL_TO_MAX_SKIP): Remove.
14195         (label_to_alignment): Return align_flags type instead of integer.
14196         (label_to_max_skip): Remove.
14197         (align_fuzz): Use align_flags type.
14198         (compute_alignments): Use align_flags type and use align_flags::max
14199         to combine multiple alignments.
14200         (grow_label_align): Grow vec instead of C array.
14201         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14202         (shorten_branches):  Use align_flags type and use align_flags::max
14203         to combine multiple alignments.
14204         (final_scan_insn_1): Remove usage of secondary alignment that comes
14205         from label alignment, but instead use proper secondary alignment
14206         which is computed in grow_label_align.
14207         * flags.h (struct align_flags_tuple): Move to align.h.
14208         (struct align_flags): Likewise.
14209         (state_align_loops): Rename to align_loops.
14210         (state_align_jumps): Rename to align_jumps.
14211         (state_align_labels): Rename to align_labels.
14212         (state_align_functions): Rename to align_functions.
14213         (align_loops_log): Remove.
14214         (align_jumps_log): Remove.
14215         (align_labels_log): Remove.
14216         (align_functions_log): Remove.
14217         (align_loops_max_skip): Remove.
14218         (align_jumps_max_skip): Remove.
14219         (align_labels_max_skip): Remove.
14220         (align_functions_max_skip): Remove.
14221         (align_loops_value): Remove.
14222         (align_jumps_value): Remove.
14223         (align_labels_value): Remove.
14224         (align_functions_value): Remove.
14225         * output.h (label_to_alignment): Change return type to align_flags.
14226         (label_to_max_skip): Remove.
14227         * target.def: Remove loop_align_max_skip, label_align_max_skip,
14228         jump_align_max_skip macros.
14229         * targhooks.h (default_loop_align_max_skip): Remove.
14230         (default_label_align_max_skip): Likewise.
14231         (default_jump_align_max_skip): Likewise.
14232         (default_label_align_after_barrier_max_skip): Remove.
14233         * toplev.c (read_log_maxskip): Use ::normalize function.
14234         (parse_N_M): Remove not used argument and also call ::normalize.
14235         (parse_alignment_opts): Do not pass unused arguments.
14236         * varasm.c (assemble_start_function): Use directly align_functions
14237         instead of removed macros.
14238         * system.h: Do not poison removed macros.
14240 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14242         PR middle-end/86539
14243         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14244         and cond temporaries don't have reference type if iterator has
14245         pointer type.  For init use &for_pre_body instead of pre_p if
14246         for_pre_body is non-empty.
14248 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14250         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14251         double-double modes to SFmode directly directly.
14252         (trunc<mode>sf2_fprs): Delete.
14254 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14256         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14257         for conversions between IFmode and the decimal floating point modes.
14258         (init_float128_ieee): Use the correct names for conversions between
14259         KFmode and the decimal floating point modes.
14261 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14263         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14264         for the conversions between TDmode and IFmode.
14265         (init_float128_ieee): Use more correct names for the conversions
14266         between TDmode and KFmode.
14268 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
14270         PR tree-optimization/86526
14271         * builtins.c (expand_builtin_memcmp): Formatting fixes.
14272         (inline_expand_builtin_string_cmp): Likewise.
14273         (inline_string_cmp): Likewise.  Use c_readstr instead of
14274         builtin_memcpy_read_str.  Add unit_mode temporary.
14276 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14278         PR middle-end/86528
14279         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14280         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14282 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14284         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14285         Alphabetize prototypes of built-in functions, separating out
14286         built-in functions that are listed in this section but should be
14287         described elsewhere.
14289 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
14291         PR target/86511
14292         * expmed.c (emit_store_flag): Do not emit setcc followed by a
14293         conditional move when trapping comparison was split to a
14294         non-trapping one (and vice versa).
14296 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14298         * config/s390/s390.c (s390_function_profiler): Generate nops
14299         instead of profiler call sequences.
14300         * config/s390/s390.opt: Add the new option.
14302 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14304         * config/s390/s390.c (s390_function_profiler): Generate
14305         __mcount_loc section.
14306         * config/s390/s390.opt: Add the new option.
14308 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14310         * common.opt: Add the new warning.
14311         * config/s390/s390.c (s390_function_profiler): Emit "brasl
14312         %r0,__fentry__" when -mfentry is specified.
14313         (s390_option_override_internal): Disallow -mfentry for 31-bit
14314         CPUs.
14315         * config/s390/s390.opt: Add the new option.
14317 2018-07-16  Richard Biener  <rguenther@suse.de>
14319         PR lto/86523
14320         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14321         for function-local FUNCTION_DECL and RESULT_DECL immediately.
14323 2018-07-16  Martin Liska  <mliska@suse.cz>
14325         PR ipa/86529
14326         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14327         to ::get_create.
14329 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14331         * config/arc/arcHS.md: Update ARCHS scheduling rules.
14333 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14335         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
14336         for ARCHS4x.
14337         * config/arc/arc-cpus.def (hs4x): New cpu.
14338         (hs4xd): Likewise.
14339         * config/arc/arc-tables.opt: Regenerate.
14340         * config/arc/arc.c (arc_sched_issue_rate): New function.
14341         (TARGET_SCHED_ISSUE_RATE): Define.
14342         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
14343         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
14344         fpu_cvt.
14345         (attr tune): Add ARCHS4x tune values.
14346         (attr tune_dspmpy): Define.
14347         (*tst): Correct instruction type.
14348         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
14349         * config/arc/arcHS4x.md: New file.
14350         * config/arc/fpu.md: Update instruction type attributes.
14351         * config/arc/t-multilib: Regenerate.
14353 2018-07-16  Tom de Vries  <tdevries@suse.de>
14355         PR debug/86455
14356         * var-tracking.c (vt_initialize): Fix pre_dec handling.
14358 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14360         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
14361         early clobber.
14363 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
14365         PR tree-optimization/86514
14366         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
14367         conversion to a boolean type from a type with greater precision.
14369 2018-07-16  Tom de Vries  <tdevries@suse.de>
14371         * var-tracking.c (vt_initialize): Print adjusted insn slim if
14372         dump_flags request TDF_SLIM.
14374 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
14376         * fold-const.c (int_const_binop_1): Abstract...
14377         (wide_int_binop): ...wide int code here.
14378         (poly_int_binop): ...poly int code here.
14379         Abstract the rest of int_const_binop_1 into int_const_binop.
14380         * fold-const.h (wide_int_binop): New.
14381         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
14382         Remove useless PLUS/MINUS_EXPR case.
14383         (zero_nonzero_bits_from_vr): Move wide int code...
14384         (zero_nonzero_bits_from_bounds): ...here.
14385         (extract_range_from_binary_expr_1): Move mask optimization code...
14386         (range_easy_mask_min_max): ...here.
14387         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
14388         (range_easy_mask_min_max): New.
14390 2018-07-15  Jeff Law  <law@redhat.com>
14392         PR target/85993
14393         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
14394         block.
14396 2018-07-14  Jim Wilson  <jimw@sifive.com>
14398         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
14400 2018-07-14  Paul Koning  <ni1d@arrl.net>
14402         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
14404 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
14406         * lto-streamer-out.c (copy_function_or_variable): Dump info about
14407         copying section.
14409 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
14410             Steve Munroe  <munroesj52@gmail.com>
14412         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
14413         (_mm_andnot_si128): Likewise.
14414         (_mm_or_si128): Likewise.
14415         (_mm_xor_si128): Likewise.
14417 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
14419         PR middle-end/78809
14420         * builtins.c (expand_builtin_memcmp): Inline the calls first
14421         when result_eq is false.
14422         (expand_builtin_strcmp): Inline the calls first.
14423         (expand_builtin_strncmp): Likewise.
14424         (inline_string_cmp): New routine. Expand a string compare
14425         call by using a sequence of char comparison.
14426         (inline_expand_builtin_string_cmp): New routine. Inline expansion
14427         a call to str(n)cmp/memcmp.
14428         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
14429         New option.
14430         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
14432 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
14434         * config/arm/driver-arm.c: Include arm-native.h.
14435         (host_detect_local_cpu): Use auto-generated data tables.
14436         (vendors, arm_cpu_table): Delete.  Move part information to ...
14437         * config/arm/arm-cpus.in: ... here.
14438         * config/arm/parsecpu.awk (gen_native): New function.
14439         (vendor, part): New CPU fields.
14440         (END): Add support for building the native CPU detection tables.
14441         * config/arm/t-arm (arm-native.h): Add build rule.
14442         (driver-arm.o): Add dependency on arm-native.h.
14444 2018-07-13  Richard Biener  <rguenther@suse.de>
14446         PR middle-end/85974
14447         * match.pd (addr1 - addr2): Allow either of the operand to
14448         have a conversion.
14450 2018-07-13  Tom de Vries  <tdevries@suse.de>
14452         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
14453         in remap_ssa_name.
14455 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
14457         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
14458         arrays instead of numbered variables.
14460 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
14462         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
14463         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
14465 2018-07-13  Richard Biener  <rguenther@suse.de>
14467         PR debug/86452
14468         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
14469         instead of get_context_die.
14471 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
14472             Richard Biener  <rguenther@suse.de>
14474         PR middle-end/86489
14475         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
14476         that the loop latch destination where phi is defined.
14478 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
14480         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
14481         (riscv_expand_epilogue): Add assertion to check interrupt mode.
14482         (riscv_set_current_function): Extract getting interrupt type to new
14483         function.
14484         (riscv_get_interrupt_type): New function.
14485         (riscv_merge_decl_attributes): New function, checking interrupt type is
14486         same.
14487         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
14489 2018-07-12  Paul Koning  <ni1d@arrl.net>
14491         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
14492         directive.
14494 2018-07-12  Paul Koning  <ni1d@arrl.net>
14496         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
14497         zero reference, add doloop_end instead.
14498         * doc/md.texi (decrement_and_branch_until_zero): Remove.
14499         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
14500         detail for doloop_end.
14502 2018-07-12  Martin Sebor  <msebor@redhat.com>
14504         PR c/86453
14505         * attribs.c (decl_attributes): Reject conflicting attributes before
14506         calling attribute handlers.
14508 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
14510         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
14511          parameter.
14512         (gcc::dump_manager::get_dump_file_name): likewise.
14513         (dump_begin): Likewise.
14514         * dumpfile.h (dump_begin): Update prototype.
14515         (gcc::dump_manager::get_dump_file_name,
14516         gcc::dump_manager::get_dump_file_name): Update prototype.
14518 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14520         * internal-fn.h (vectorizable_internal_fn_p): New function.
14521         * tree-vect-slp.c (compatible_calls_p): Likewise.
14522         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
14523         to internal functions.
14524         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
14526 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14528         * fold-const.h (inverse_conditions_p): Declare.
14529         * fold-const.c (inverse_conditions_p): New function.
14530         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
14531         that test the inverse condition of a conditional internal function.
14532         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
14533         * internal-fn.c (internal_fn_mask_index): Handle conditional
14534         internal functions.
14535         (vectorized_internal_fn_supported_p): New function.
14536         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
14537         (any_pred_load_store): Replace with...
14538         (need_to_predicate): ...this new variable.
14539         (redundant_ssa_names): New variable.
14540         (ifcvt_can_use_mask_load_store): Move initial checks to...
14541         (ifcvt_can_predicate): ...this new function.  Handle tree codes
14542         for which a conditional internal function exists.
14543         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
14544         instead of ifcvt_can_use_mask_load_store.  Update after variable
14545         name change.
14546         (predicate_load_or_store): New function, split out from
14547         predicate_mem_writes.
14548         (check_redundant_cond_expr): New function.
14549         (value_available_p): Likewise.
14550         (predicate_rhs_code): Likewise.
14551         (predicate_mem_writes): Rename to...
14552         (predicate_statements): ...this.  Use predicate_load_or_store
14553         and predicate_rhs_code.
14554         (combine_blocks, tree_if_conversion): Update after above name changes.
14555         (ifcvt_local_dce): Handle redundant_ssa_names.
14556         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
14557         general conditional functions.
14558         * tree-vect-stmts.c (vectorizable_call): Likewise.
14560 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14561             Alan Hayward  <alan.hayward@arm.com>
14562             David Sherwood  <david.sherwood@arm.com>
14564         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
14565         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
14566         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
14567         plus and minus and convert them into IFN_COND_FMA-based sequences.
14568         (convert_mult_to_fma): Handle conditional plus and minus.
14570 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14572         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
14573         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
14574         (cond_fnms_optab): New optabs.
14575         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
14576         internal functions.
14577         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
14578         * internal-fn.h (get_conditional_internal_fn): Declare.
14579         (get_unconditional_internal_fn): Likewise.
14580         * internal-fn.c (cond_ternary_direct): New macro.
14581         (expand_cond_ternary_optab_fn): Likewise.
14582         (direct_cond_ternary_optab_supported_p): Likewise.
14583         (FOR_EACH_COND_FN_PAIR): Likewise.
14584         (get_conditional_internal_fn): New function.
14585         (get_unconditional_internal_fn): Likewise.
14586         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
14587         (gimple_match_op::gimple_match_op): Add a new overload for 5
14588         operands.
14589         (gimple_match_op::set_op): Likewise.
14590         (gimple_resimplify5): Declare.
14591         * genmatch.c (decision_tree::gen): Generate simplifications for
14592         5 operands.
14593         * gimple-match-head.c (gimple_simplify): Define an overload for
14594         5 operands.  Handle calls with 5 arguments in the top-level overload.
14595         (convert_conditional_op): Handle conversions from unconditional
14596         internal functions to conditional ones.
14597         (gimple_resimplify5): New function.
14598         (build_call_internal): Pass a fifth operand.
14599         (maybe_push_res_to_seq): Likewise.
14600         (try_conditional_simplification): Try converting conditional
14601         internal functions to unconditional internal functions.
14602         Handle 3-operand unconditional forms.
14603         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
14604         Define ternary equivalents of the current rules for binary conditional
14605         internal functions.
14606         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
14607         ternary operations.
14608         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
14609         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
14610         (optab): Handle them.
14611         (SVE_COND_FP_TERNARY): New int iterator.
14612         (sve_fmla_op, sve_fmad_op): New int attributes.
14613         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
14614         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
14615         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
14617 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14619         * target.def (preferred_else_value): New target hook.
14620         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
14621         * doc/tm.texi: Regenerate.
14622         * targhooks.h (default_preferred_else_value): Declare.
14623         * targhooks.c (default_preferred_else_value): New function.
14624         * internal-fn.h (conditional_internal_fn_code): Declare.
14625         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
14626         (get_conditional_internal_fn): Use it.
14627         (conditional_internal_fn_code): New function.
14628         * gimple-match.h (gimple_match_cond): New struct.
14629         (gimple_match_op): Add a cond member function.
14630         (gimple_match_op::gimple_match_op): Update all forms to take a
14631         gimple_match_cond.
14632         * genmatch.c (expr::gen_transform): Use the same condition as res_op
14633         for the suboperation, but don't specify a particular else_value.
14634         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
14635         (visit_nary_op, visit_reference_op_load): Pass
14636         gimple_match_cond::UNCOND to the gimple_match_op constructor.
14637         * gimple-match-head.c: Include tree-eh.h
14638         (convert_conditional_op): New function.
14639         (maybe_resimplify_conditional_op): Likewise.
14640         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
14641         (gimple_resimplify2): Likewise.
14642         (gimple_resimplify3): Likewise.
14643         (gimple_resimplify4): Likewise.
14644         (maybe_push_res_to_seq): Return null for conditional operations.
14645         (try_conditional_simplification): New function.
14646         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
14647         constructor.
14648         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
14649         IFN_COND_* call.
14650         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
14651         function.
14652         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
14654 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
14656         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14657         DECL_FCONTEXT
14658         (hash_tree): Do not hash DECL_FCONTEXT
14659         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
14660         Do not stream DECL_FCONTEXT.
14661         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
14662         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
14664 2018-07-12  Richard Biener  <rguenther@suse.de>
14666         PR debug/86462
14667         * dwarf2out.c (gen_block_die): Only output blocks when they have
14668         at least one !DECL_IGNORED_P variable.
14670 2018-07-12  Richard Biener  <rguenther@suse.de>
14672         PR target/84829
14673         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
14674         Remove -mieee-fp handling.
14676 2018-07-12  Richard Biener  <rguenther@suse.de>
14678         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
14679         left-over from last patch.
14681 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
14683         PR tree-optimization/86492
14684         * gimple-ssa-store-merging.c
14685         (imm_store_chain_info::coalesce_immediate_stores): Call
14686         check_no_overlap even for the merge_overlapping case.  Formatting fix.
14688 2018-07-12  Richard Biener  <rguenther@suse.de>
14690         PR middle-end/86479
14691         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
14692         move possibly trapping operations into the conditional.
14694 2018-07-12  Richard Biener  <rguenther@suse.de>
14696         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
14697         (vn_lookup_simplify_result): Remove recursion limit applied
14698         here.
14699         (vn_nary_build_or_lookup_1): Adjust.
14700         (try_to_simplify): Likewise.
14701         * gimple-match-head.c (gimple_resimplify1): Instead apply one
14702         here.
14703         (gimple_resimplify2): Likewise.
14704         (gimple_resimplify3): Likewise.
14705         (gimple_resimplify4): Likewise.
14707 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
14709         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
14710         Use __mmask64 type instead of __mmask8 for __M argument.
14711         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
14712         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
14713         __U argument.
14714         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
14715         __mmask16 for __M argument.
14716         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
14717         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
14718         to __mmask16 instead of __mmask8.
14719         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
14720         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
14721         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
14722         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
14723         instead of __mmask16 for __U argument.
14724         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
14725         __mmask16 instead of __mmask8 for __U argument.
14726         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
14727         __U argument.
14728         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
14729         __mmask16.
14730         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
14731         argument.
14732         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
14733         __U argument.
14734         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
14735         __mmask16.
14736         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
14737         of __mmask16.
14738         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
14739         __U argument.
14740         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
14741         __U argument.
14742         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
14743         __U argument.
14744         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
14745         __U argument.
14746         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
14747         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
14748         return type as well as __M argument type and all casts from __mmask8
14749         to __mmask32.
14750         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
14751         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
14752         return type as well as __M argument type and all casts from __mmask8
14753         to __mmask16.
14754         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
14755         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
14756         return type as well as __M argument type and all casts from __mmask8
14757         to __mmask32.
14758         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
14759         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
14760         return type as well as __M argument type and all casts from __mmask8
14761         to __mmask16.
14762         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
14763         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
14764         __mmask16.
14766 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
14768         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
14769         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
14770         for __U argument.
14772 2018-07-11  Paul Koning  <ni1d@arrl.net>
14774         * doc/md.texi (define_subst): Document how multiple occurrences of
14775         the same argument in the replacement pattern are handled.
14777 2018-07-11  Paul Koning  <ni1d@arrl.net>
14779         * doc/extend.texi (Common Variable Attributes): Move "mode" into
14780         alphabetical order.
14781         (Common Type Attributes): Add "mode" attribute.
14783 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
14785         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
14786         stream DECL_ORIGINAL_TYPE.
14787         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
14788         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
14789         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
14790         Do not walk original type.
14791         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
14792         external decls.
14793         (write_ts_decl_non_common_tree_pointers): Do not stream
14794         DECL_ORIGINAL_TYPE
14795         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
14796         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
14798 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
14800         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
14801         thread twice from the same starting edge.
14803 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
14805         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
14806         * gimple.c (gimple_call_nonnull_result_p): ...here...
14807         (gimple_call_nonnull_arg): ...and here.
14808         * gimple.h (gimple_call_nonnull_result_p): New.
14809         (gimple_call_nonnull_arg): New.
14811 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
14813         * config/arm/arm-cpus.in: Move information from fpu field of each
14814         cpu definition to the isa field.
14815         * config/arm/parsecpu.awk (fpu): Delete match rule.
14816         (gen_comm_data): Don't add bits from the CPU's FPU entry.
14818 2018-07-11  Richard Biener  <rguenther@suse.de>
14820         PR debug/86457
14821         * dwarf2out.c (init_sections_and_labels): Use
14822         output_asm_line_debug_info consistently.
14823         (dwarf2out_early_finish): Likewise.
14824         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
14825         type units.
14827 2018-07-11  Richard Biener  <rguenther@suse.de>
14829         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
14830         Rework father_bb setting in a way to avoid propagating constants
14831         multiple times on a loop body.
14833 2018-07-10  Mark Wielaard  <mark@klomp.org>
14835         PR debug/86459
14836         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
14838 2018-07-10  Richard Biener  <rguenther@suse.de>
14840         * hash-map.h (hash_map::iterator::operator*): Return
14841         references to key and value.
14843 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
14845         PR c++/86443
14846         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
14847         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
14848         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
14849         (gimplify_omp_for): For composite loops, move outer
14850         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14851         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
14852         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
14853         TREE_LIST for both the original class iterator and the "last" helper
14854         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
14855         loop, remember has_decl_expr from outer composite loops for the
14856         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
14858 2018-07-09  Martin Sebor  <msebor@redhat.com>
14860         PR middle-end/77357
14861         PR middle-end/86428
14862         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
14863         accessing implicitly initialized array elements.
14864         * expr.c (string_constant): Handle string initializers of
14865         character arrays within aggregates.
14866         * gimple-fold.c (fold_array_ctor_reference): Add argument.
14867         Store element offset.  As a special case, handle zero size.
14868         (fold_nonarray_ctor_reference): Same.
14869         (fold_ctor_reference): Add argument.  Store subobject offset.
14870         * gimple-fold.h (fold_ctor_reference): Add argument.
14872 2018-07-09  Paul Koning  <ni1d@arrl.net>
14874         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
14875         (pdp11_insn_cost): New function.
14876         (pdp11_md_asm_adjust): New function.
14877         (TARGET_INVALID_WITHIN_DOLOOP): Define.
14878         (pdp11_rtx_costs): Update to match machine better.
14879         (output_addr_const_pdp11): Correct format mismatch warnings.
14880         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
14881         * config/pdp11/pdp11.md: General change to add base_cost and/or
14882         length attributes for use by new pdp11_insn_cost function.
14883         (MIN_BRANCH): Correct definition.
14884         (MIN_SOB): Ditto.
14885         (doloop_end): Use standard pattern name for looping pattern.
14886         (doloop_end_nocc): New.
14887         (movsf): Add another constraint alternative.
14888         (zero_extendqihi2): Add constraint alternatives for not in place
14889         extend.
14890         (zero_extendhisi2): Remove.
14891         (shift patterns): Add CC handling variants.
14892         (bswaphi2): New.
14893         (bswapsi2): New.
14894         (rothi3): New.
14895         (define_peephole2): New peephole to recognize mov that sets CC for
14896         subsequent test.
14898 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14900         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
14901         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
14902         wi::add.
14904 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
14906         PR c/86420
14907         * real.c (real_nextafter): Return true if result is denormal.
14909 2018-07-09  Martin Liska  <mliska@suse.cz>
14911         * common.opt: Add back wrongly removed attribute.
14913 2018-07-09  Richard Biener  <rguenther@suse.de>
14915         PR debug/86413
14916         * dwarf2out.c (gen_block_die): For an early generated DIE
14917         always output high/low PC attributes.
14919 2018-07-09  Tom de Vries  <tdevries@suse.de>
14921         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14922         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14923         onto VAR_DECL with abstract origin.
14925 2018-07-07  Jim Wilson  <jimw@sifive.com>
14927         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14929 2018-07-07  Tom de Vries  <tdevries@suse.de>
14931         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14933 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
14935         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14936         overflow_type.
14937         (combine_bound): Use wide-int overflow calculation instead of
14938         rolling our own.
14939         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14940         overflow_type.
14941         * fold-const.c (int_const_binop_2): Same.
14942         (extract_muldiv_1): Same.
14943         (fold_div_compare): Same.
14944         (fold_abs_const): Same.
14945         * match.pd: Same.
14946         * poly-int.h (add): Same.
14947         (sub): Same.
14948         (neg): Same.
14949         (mul): Same.
14950         * predict.c (predict_iv_comparison): Same.
14951         * profile-count.c (slow_safe_scale_64bit): Same.
14952         * simplify-rtx.c (simplify_const_binary_operation): Same.
14953         * tree-chrec.c (tree_fold_binomial): Same.
14954         * tree-data-ref.c (split_constant_offset_1): Same.
14955         * tree-if-conv.c (idx_within_array_bound): Same.
14956         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14957         * tree-ssa-phiopt.c (minmax_replacement): Same.
14958         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14959         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14960         * vr-values.c (vr_values::adjust_range_with_scev): Same.
14961         * wide-int.cc (wi::add_large): Same.
14962         (wi::mul_internal): Same.
14963         (wi::sub_large): Same.
14964         (wi::divmod_internal): Same.
14965         * wide-int.h: Change overflow type to overflow_type for neg, add,
14966         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14967         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14968         mul_internal, divmod_internal.
14969         (overflow_type): New enum.
14970         (accumulate_overflow): New.
14972 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
14974         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14975         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14977 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
14979         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14980         argument is checked for zero before entering loop, avoid checking again.
14982 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
14984         * gimplify.h (generic_expr_could_trap_p): Set as global function.
14985         * gimplify.h (generic_expr_could_trap_p): Likwise.
14986         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14988 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
14990         PR tree-optimization/86401
14991         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14992         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14993         (fold_bit_and_mask): ... here.  New helper function for match.pd.
14994         * fold-const.h (fold_bit_and_mask): Declare.
14995         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14997 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
14999         PR target/86324
15000         * target.def (translate_mode_attribute): New hook.
15001         * targhooks.h (default_translate_mode_attribute): Declare.
15002         * targhooks.c (default_translate_mode_attribute): New function.
15003         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
15004         * doc/tm.texi: Regenerate.
15005         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
15006         (rs6000_translate_mode_attribute): New function.
15008 2018-07-06  Paul Koning  <ni1d@arrl.net>
15010         * doc/md.texi (define_split): Document DONE and FAIL.
15011         (define_peephole2): Ditto.
15013 2018-07-05  Jeff Law  <law@redhat.com>
15015         PR tree-optimization/86010
15016         * tree-ssa-dse.c (compute_trims): More aggressively trim at
15017         both the head and tail of mem* and str* calls.
15019 2018-07-05  Jim Wilson  <jimw@sifive.com>
15021         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
15023 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
15025         * config/aarch64/aarch64-simd.md: correct flags text for
15026         MIN_EXPR replacement.
15028 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
15030         * configure: Regenerated.
15032 2018-07-05  Carl Love  <cel@us.ibm.com>
15034         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
15035         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
15036         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
15037         VSX_BUILTIN_DOUBLEL_V4SF.
15039 2018-07-05  Martin Sebor  <msebor@redhat.com>
15041         PR c++/86400
15042         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
15043         than its domain to compute its the upper bound of a char array.
15045 2018-07-05  Nathan Sidwell  <nathan@acm.org>
15047         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
15048         * doc/cpp.texi: Update comment.
15049         * doc/tm.texi: Rebuilt.
15050         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
15051         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
15052         * doc/extend.texi (Backwards Compatibility): Clarify it is system
15053         headers affected by extern "C".
15054         * system.h: Poison NO_IMPLICIT_EXTERN_C.
15055         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
15056         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
15057         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
15058         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
15059         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
15060         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
15061         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
15062         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
15063         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
15064         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
15065         config/sparc/sp64-elf.h, config/spu/spu.h,
15066         config/stormy16/stormy16.h, config/v850/v850.h,
15067         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
15068         define NO_IMPLICIT_EXTERN_C.
15069         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
15071 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15073         PR target/84711
15074         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15075         instead of GET_MODE_SIZE when comparing Units.
15077 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15079         PR target/84711
15080         * rtlanal.c (set_noop_p): Constrain on mode change,
15081         include hard-reg-set.h
15083 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
15085         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
15087 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
15089         Revert
15090         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
15092         PR sanitizer/84250
15093         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15094         libasan.
15095         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15097 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
15099         PR sanitizer/84250
15100         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15101         libasan.
15102         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15104 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
15106         PR middle-end/86380
15107         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
15109 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
15111         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
15112         neg_*_op* variables.
15114 2018-07-04  Martin Liska  <mliska@suse.cz>
15116         * tree-switch-conversion.c: Define
15117         max_ratio_for_speed and max_ratio_for_size constants.
15119 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15120             Martin Liska  <mliska@suse.cz>
15122         PR middle-end/66240
15123         PR target/45996
15124         PR c/84100
15125         * common.opt: Rename align options with 'str_' prefix.
15126         * common/config/i386/i386-common.c (set_malign_value): New
15127         function.
15128         (ix86_handle_option): Use it to set -falign-* options/
15129         * config/aarch64/aarch64-protos.h (struct tune_params): Change
15130         type from int to string.
15131         * config/aarch64/aarch64.c: Update default values from int
15132         to string.
15133         * config/alpha/alpha.c (alpha_override_options_after_change):
15134         Likewise.
15135         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15136         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15137         max skip conditionally.
15138         * config/i386/freebsd.h (SUBALIGN_LOG): New.
15139         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15140         max skip conditionally.
15141         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15142         max skip conditionally.
15143         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15144         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15145         max skip conditionally.
15146         * config/i386/i386.c (struct ptt): Change type from int to
15147         string.
15148         (ix86_default_align): Set default values.
15149         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15150         max skip conditionally.
15151         * config/i386/iamcu.h (SUBALIGN_LOG): New.
15152         (ASM_OUTPUT_MAX_SKIP_ALIGN):
15153         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15154         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15155         max skip conditionally.
15156         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15157         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15158         * config/i386/x86-64.h (SUBALIGN_LOG): New.
15159         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15160         max skip conditionally.
15161         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15162         * config/ia64/ia64.c (ia64_option_override): Set default values
15163         for alignment options.
15164         * config/m68k/m68k.c: Handle new str_align_* options.
15165         * config/mips/mips.c (mips_set_compression_mode): Change
15166         type of constants.
15167         (mips_option_override): Set default values for options.
15168         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15169         Likewise.
15170         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15171         Likewise.
15172         * config/rx/rx.c (rx_option_override): Likewise.
15173         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15174         (LABEL_ALIGN): Use align_labels_log.
15175         (LOOP_ALIGN): Use align_loops_align.
15176         * config/s390/s390.c (s390_asm_output_function_label): Use new
15177         macros.
15178         * config/sh/sh.c (sh_override_options_after_change):
15179         Change type of constants.
15180         * config/spu/spu.c (spu_sched_init): Likewise.
15181         * config/sparc/sparc.c (sparc_option_override): Set default
15182         values for options.
15183         * config/visium/visium.c (visium_option_override): Likewise.
15184         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15185         emit p2align format with last argument if it's not needed.
15186         * doc/invoke.texi: Document extended format of -falign-*.
15187         * final.c: Use align_labels alignment.
15188         * flags.h (struct target_flag_state): Change type to use
15189         align_flags.
15190         (struct align_flags_tuple): New.
15191         (struct align_flags): Likewise.
15192         (align_loops_log): Redefine macro to use new types.
15193         (align_loops_max_skip): Redefine macro to use new types.
15194         (align_jumps_log): Redefine macro to use new types.
15195         (align_jumps_max_skip): Redefine macro to use new types.
15196         (align_labels_log): Redefine macro to use new types.
15197         (align_labels_max_skip): Redefine macro to use new types.
15198         (align_functions_log): Redefine macro to use new types.
15199         (align_loops): Redefine macro to use new types.
15200         (align_jumps): Redefine macro to use new types.
15201         (align_labels): Redefine macro to use new types.
15202         (align_functions): Redefine macro to use new types.
15203         (align_functions_max_skip): Redefine macro to use new types.
15204         (align_loops_value): New macro.
15205         (align_jumps_value): New macro.
15206         (align_labels_value): New macro.
15207         (align_functions_value): New macro.
15208         * function.c (invoke_set_current_function_hook): Propagate
15209         alignment values from flags to global variables default in
15210         topleev.h.
15211         * ipa-icf.c (sem_function::equals_wpa): Use
15212         cl_optimization_option_eq instead of memcmp.
15213         * lto-streamer.h (cl_optimization_stream_out): Support streaming
15214         of string types.
15215         (cl_optimization_stream_in): Likewise.
15216         * optc-save-gen.awk: Support strings in cl_optimization.
15217         * opth-gen.awk: Likewise.
15218         * opts.c (finish_options): Remove error checking of invalid
15219         value ranges.
15220         (MAX_CODE_ALIGN): Remove.
15221         (MAX_CODE_ALIGN_VALUE): Likewise.
15222         (parse_and_check_align_values): New function.
15223         (check_alignment_argument): Likewise.
15224         (common_handle_option): Use check_alignment_argument.
15225         * opts.h (parse_and_check_align_values): Declare.
15226         * toplev.c (init_alignments): Remove.
15227         (read_log_maxskip): New.
15228         (parse_N_M): Likewise.
15229         (parse_alignment_opts): Likewise.
15230         (backend_init_target): Remove usage of init_alignments.
15231         * toplev.h (parse_alignment_opts): Declare.
15232         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15233         argument.
15234         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15235         * tree.c (cl_option_hasher::equal): New.
15236         * varasm.c: Use new global macros.
15238 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15240         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15241         Use a simpler align directive also if MAXSKIP = ALIGN-1.
15242         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15243         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15244         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15245         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15246         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15247         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15248         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15249         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15250         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15251         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15252         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15254 2018-07-04  Martin Liska  <mliska@suse.cz>
15255             Jonathan Wakely  <jwakely@redhat.com>
15257         * coverage.c: Use correct type.
15258         * doc/invoke.texi: Language correction.
15260 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
15262         PR target/85620
15263         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15264         ENDBRANCH for non-tail call which may return via indirect branch.
15265         * doc/extend.texi: Document indirect_return attribute.
15267 2018-07-03  Martin Sebor  <msebor@redhat.com>
15269         PR tree-optimization/86274
15270         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15271         precondition.
15272         (format_floating): Correct handling of infinities and NaNs.
15274 2018-07-03  Martin Sebor  <msebor@redhat.com>
15276         * print-tree.c (print_real_cst): New function.
15277         (print_node_brief): Call it.
15278         (print_node): Ditto.
15280 2018-07-03  Jeff Law  <law@redhat.com>
15282         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15283         into a single pattern.
15285         * config/h8300/h8300.md (ors code_iterator): New.
15286         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15287         a single pattern and single splitter.
15288         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15289         (iorqi3_1, xorqi3_1): Likewise.
15290         (iorqi3, xorqi3 expanders): Similarly.
15292         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15293         (movmd_internal) into a single pattern using the P mode iterator.
15294         (movmd splitters): Similarly.
15295         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15296         (movsd splitters): Similarly.
15298         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15299         ADDB, ADDW and ADDL into a single ADD attribute which selects the
15300         right table based on the size of the operand.
15301         * config/h8300/h8300.md (length_table): Corresponding changes. All
15302         references to "addb", "addw" and "addl" changed to "add".
15303         (btst patterns): Merge two variants into a single pattern.
15304         (tstqi, tsthi): Likewise.
15305         (addhi3_incdec, addsi3_incdec): Likewise.
15306         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15307         (mulhi3, mulsi3): Likewise.
15308         (udivhi3, udivsi3): Likewise.
15309         (divhi3, divsi3): Likewise.
15310         (andorqi3, andorhi3, andorsi3): Likewise.
15312 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
15314         PR target/85694
15315         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15316         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15318 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15320         PR tree-optimization/85694
15321         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15322         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15323         UNSPEC_URHADD.
15324         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15325         (<u>avg<mode>3_ceil): New patterns.
15327 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
15329         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15330         scan-tree-dump directive.
15331         * gcc.dg/vect/slp-perm-2.c: Likewise.
15332         * gcc.dg/vect/slp-perm-3.c: Likewise.
15333         * gcc.dg/vect/slp-perm-5.c: Likewise.
15334         * gcc.dg/vect/slp-perm-6.c: Likewise.
15335         * gcc.dg/vect/slp-perm-7.c: Likewise.
15336         * gcc.dg/vect/slp-perm-8.c: Likewise.
15338 2018-07-03  Marek Polacek  <polacek@redhat.com>
15340         PR middle-end/86202
15341         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
15343 2018-07-03  Richard Biener  <rguenther@suse.de>
15345         PR ipa/86389
15346         * tree-ssa-structalias.c (find_func_clobbers): Properly
15347         handle indirect calls.
15349 2018-07-03  Jeff Law  <law@redhat.com>
15351         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
15352         (shifts): New code iterator.
15353         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
15354         expander.  Fix HImode handling on H8/SX.
15355         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
15356         (subqi3, subhi3, subsi3 expanders): Likewise.
15357         (andqi3, andhi3, andsi3 expanders): Likewise.
15358         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
15359         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
15360         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
15361         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
15362         (zero_extendqihi2, zero_extendqisi2): Likewise.
15363         (extendqihi2, extendqisi2): Likewise.
15364         (rotlqi3, rotlhi3, rotlsi3): Likewise.
15365         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
15366         (rotlqi3_1, rotlhi3_1): Likewise.
15367         (logicalhi3_sn, logicalsi3_sn): Likewise.
15368         (logicalhi3, logicalsi3): Likewise.
15370 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15372         * tree-vect-patterns.c (vect_recog_rotate_pattern)
15373         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15374         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
15375         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
15376         type to append_pattern_def_seq instead of creating a stmt_vec_info
15377         directly.
15378         (build_mask_conversion): Likewise.  Remove vinfo argument.
15379         (vect_add_conversion_to_patterm): Likewise, renaming to...
15380         (vect_add_conversion_to_pattern): ...this.
15381         (vect_recog_mask_conversion_pattern): Update call to
15382         build_mask_conversion.  Pass the vector type to
15383         append_pattern_def_seq here too.
15384         (vect_recog_gather_scatter_pattern): Update call to
15385         vect_add_conversion_to_pattern.
15387 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15389         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
15390         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15391         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
15392         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
15393         STMT_VINFO_PATTERN_DEF_SEQ to null here.
15394         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
15395         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
15396         append_pattern_def_seq instead of new_pattern_def_seq.
15397         (vect_recog_divmod_pattern): Do both of the above.
15398         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
15399         is null.
15401 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15403         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
15404         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
15405         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
15406         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
15407         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
15408         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15409         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
15410         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15411         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15412         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
15413         parameter with a single stmt_vec_info.
15414         (vect_recog_func_ptr): Likewise.
15415         (vect_recog_gather_scatter_pattern): Likewise, folding in...
15416         (vect_try_gather_scatter_pattern): ...this.
15417         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
15418         the stmt_vec_info of the statement to be matched.  Don't clear
15419         STMT_VINFO_RELATED_STMT.
15420         (vect_pattern_recog): Update call accordingly.
15422 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15424         PR tree-optimization/85694
15425         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
15426         (uavgM3_ceil): Document new optabs.
15427         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
15428         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
15429         functions.
15430         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
15431         (savg_ceil_optab): New optabs.
15432         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
15433         (vect_vect_recog_func_ptrs): Add it.
15434         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
15435         constant directly from the associated lhs.
15437 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15439         * tree-vect-patterns.c (vect_split_statement): New function.
15440         (vect_convert_input): Use it to try to split an existing cast.
15442 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15444         * poly-int.h (print_hex): New function.
15445         * dumpfile.h (dump_dec, dump_hex): Declare.
15446         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
15447         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
15448         min_input_precision, operation_precision and operation_sign.
15449         * tree-vect-patterns.c (vect_get_range_info): New function.
15450         (vect_same_loop_or_bb_p, vect_single_imm_use)
15451         (vect_operation_fits_smaller_type): Delete.
15452         (vect_look_through_possible_promotion): Add an optional
15453         single_use_p parameter.
15454         (vect_recog_over_widening_pattern): Rewrite to use new
15455         stmt_vec_info infomration.  Handle one operation at a time.
15456         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
15457         (vect_truncatable_operation_p, vect_set_operation_type)
15458         (vect_set_min_input_precision): New functions.
15459         (vect_determine_min_output_precision_1): Likewise.
15460         (vect_determine_min_output_precision): Likewise.
15461         (vect_determine_precisions_from_range): Likewise.
15462         (vect_determine_precisions_from_users): Likewise.
15463         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
15464         (vect_vect_recog_func_ptrs): Put over_widening first.
15465         Add cast_forwprop.
15466         (vect_pattern_recog): Call vect_determine_precisions.
15468 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15470         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
15471         statements that have been replaced by further pattern statements.
15472         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
15474 2018-07-03  Richard Biener  <rguenther@suse.de>
15476         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
15477         always set *dt.  Dump vectype in vectype overload.
15478         * dumpfile.h (dump_gimple_expr): New function.
15479         (dump_gimple_expr_loc): Likewise.
15480         * dumpfile.c (dump_gimple_expr): New function.
15481         (dump_gimple_expr_loc): Likewise.
15483 2018-07-02  Jeff Law  <law@redhat.com>
15485         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
15486         the H8/300, H8/300H and H8/S variants into a single pattern.
15487         (movhi_h8300, movqi_h8300hs): Similarly.
15488         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
15489         (QHI mode iterator): New.
15491         * config/h8300/h8300.md: Remove trailing whitespace.
15493 2018-07-02  Jim Wilson  <jimw@sifive.com>
15495         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
15496         instead of emit_insn for interrupt returns.
15497         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
15498         (riscv_sret, riscv_uret): Likewise.
15500 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
15502         * pretty-print.c (selftest::test_pp_format): Move save and restore
15503         of quotes to class auto_fix_quotes, and add an instance.
15504         * selftest.c: Include "intl.h".
15505         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
15506         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
15507         * selftest.h (selftest::auto_fix_quotes): New class.
15509 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
15511         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
15512         (aarch64_sve_prepare_conditional_op): Remove.
15513         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
15514         Allow aarch64_simd_reg_or_zero as select operand; remove
15515         the aarch64_sve_prepare_conditional_op call.
15516         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
15517         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15518         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
15519         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
15520         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
15521         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
15522         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
15523         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
15524         and a splitters to match all of the *_any patterns.
15525         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
15527         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
15528         (SVE_COND_FP_BINARY_REV): Remove.
15529         (sve_int_op_rev, sve_fp_op_rev): New.
15530         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
15531         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
15532         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
15533         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
15534         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
15535         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
15536         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
15537         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
15538         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
15540         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
15541         Remove match_dup 1 from the inner unspec.
15542         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15544         * config/aarch64/aarch64.md (movprfx): New attr.
15545         (length): Default movprfx to 8.
15546         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
15547         (*madd<SVE_I>, *msub<SVE_I): Likewise.
15548         (*<su>mul<SVE_I>3_highpart): Likewise.
15549         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
15550         (*v<ASHIFT><SVE_I>3): Likewise.
15551         (*<su><MAXMIN><SVE_I>3): Likewise.
15552         (*<su><MAXMIN><SVE_F>3): Likewise.
15553         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
15554         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
15555         (*div<SVE_F>4): Likewise.
15557 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
15559         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
15560         in dump string.
15562 2018-07-02  Richard Biener  <rguenther@suse.de>
15564         PR tree-optimization/86363
15565         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
15566         memset argument refers to a non-variable address.
15568 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
15570         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
15571         {PLUS,MINUS}_EXPR code to...
15572         (adjust_symbolic_bound): ...here,
15573         (combine_bound): ...here,
15574         (set_value_range_with_overflow): ...and here.
15576 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
15578         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
15579         code...
15580         (extract_range_from_abs_expr): ...here.
15582 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
15584         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
15585         -fno-omit-frame-pointer when not optimizing.
15587 2018-07-02  Martin Liska  <mliska@suse.cz>
15589         PR ipa/86279
15590         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
15591         (propagate_nothrow): Likewise.
15593 2018-07-02  Martin Liska  <mliska@suse.cz>
15595         PR ipa/86323
15596         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
15598 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
15600         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
15601         function in r262149, changing "loc" param from source_location to
15602         const dump_location_t &.
15603         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
15604         declaration, as above.
15606 2018-07-01  Paul Koning  <ni1d@arrl.net>
15608         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15609         -munit-asm, -mgnu-asm, -mdec-asm.
15610         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
15611         (pdp11_output_labelref): New.
15612         (pdp11_output_def): New.
15613         (pdp11_output_addr_vec_elt): New.
15614         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
15615         %# and %@ format codes.
15616         (pdp11_option_override): New.
15617         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
15618         (pdp11_output_ident): New.
15619         (pdp11_asm_named_section): New.
15620         (pdp11_asm_init_sections): New.
15621         (pdp11_file_start): New.
15622         (pdp11_file_end): New.
15623         (output_ascii): Use .ascii/.asciz for -mdec-asm.
15624         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
15625         %o, like %c but octal.
15626         (pdp11_option_override): New.
15627         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
15628         -mdec-asm.
15629         (DATA_SECTION_ASM_OP): Ditto.
15630         (READONLY_DATA_SECTION_ASM_OP): New.
15631         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
15632         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
15633         (ASM_OUTPUT_LABELREF): Ditto.
15634         (ASM_OUTPUT_DEF): Ditto.
15635         (ASM_OUTPUT_EXTERNAL): New.
15636         (ASM_OUTPUT_SOURCE_FILENAME): New.
15637         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
15638         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
15639         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
15640         %# and %@ format codes.
15641         * config/pdp11/pdp11.opt (mgnu-asm): New.
15642         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
15643         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
15644         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
15646 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
15648         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
15649         dereferencing path[] beyond its length.
15650         (debug_path): New.
15651         (debug_all_paths): New.
15652         (rewire_first_differing_edge): New.
15653         (adjust_paths_after_duplication): New.
15654         (duplicate_thread_path): Call adjust_paths_after_duplication.
15655         Add new argument.
15656         (thread_through_all_blocks): Add new argument to
15657         duplicate_thread_path.
15659 2018-06-30  Jim Wilson  <jimw@sifive.com>
15661         * config/riscv/predicates.md (p2m1_shift_operand): New.
15662         (high_mask_shift_operand): New.
15663         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
15664         pattern using p2m1_shift_operand.
15665         (lshsi3_zero_extend_3+2): New combiner pattern using
15666         high_mask_shift_operand.
15668 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15670         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
15671         split out from...
15672         (vect_recog_rotate_pattern): ...here.
15673         (vect_convert_input): Try to insert casts of invariants in the
15674         preheader.
15675         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
15676         preheader to be empty.
15678 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15680         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
15681         vector type.  If given, install it in the new statement's
15682         STMT_VINFO_VECTYPE.
15683         (vect_element_precision): New function.
15684         (vect_unpromoted_value): New struct.
15685         (vect_unpromoted_value::vect_unpromoted_value): New function.
15686         (vect_unpromoted_value::set_op): Likewise.
15687         (vect_look_through_possible_promotion): Likewise.
15688         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
15689         (vect_widened_op_tree, vect_convert_input): Likewise.
15690         (vect_convert_inputs, vect_convert_output): Likewise.
15691         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
15692         to handle the optional cast of the multiplication result and
15693         vect_widened_op_tree to detect the widened multiplication itself.
15694         Do not require the input and output of promotion casts to have
15695         the same sign, but base the signedness of the operation on the
15696         input rather than the result.  If the pattern includes two
15697         promotions, check that those promotions have the same sign.
15698         Do not restrict the MULT_EXPR handling to a double-width result;
15699         handle quadruple-width results and wider.  Use vect_convert_inputs
15700         to convert the inputs to the common type.
15701         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
15702         to handle the optional cast of the ABS result.  Also allow a sign
15703         change or a sign extension between the ABS and MINUS.
15704         Use vect_widened_op_tree to detect the widened subtraction and use
15705         vect_convert_inputs to convert the inputs to the common type.
15706         (vect_handle_widen_op_by_const): Delete.
15707         (vect_recog_widen_op_pattern): New function.
15708         (vect_recog_widen_mult_pattern): Use it.
15709         (vect_recog_widen_shift_pattern): Likewise.
15710         (vect_recog_widen_sum_pattern): Use
15711         vect_look_through_possible_promotion to handle the promoted
15712         PLUS_EXPR operand.
15714 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15716         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
15717         the containing gimple_seq *.
15718         * gimple-iterator.h (gsi_for_stmt): Declare it.
15719         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
15720         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
15721         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15722         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15723         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
15724         checks.
15725         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
15726         split out from...
15727         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
15728         statement being replaced is part of an existing pattern
15729         definition sequence, inserting the new pattern statements before
15730         the original one.
15731         (vect_pattern_recog_1): Don't return a bool.  If the statement
15732         is already part of a pattern, instead apply pattern matching
15733         to the pattern definition statements.  Don't clear the
15734         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
15735         (vect_pattern_recog): Don't break after the first match;
15736         continue processing the pattern definition statements instead.
15737         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
15739 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15741         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15742         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15743         (vect_recog_widen_sum_pattern): Use it.
15745 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15747         * tree-vect-loop.c (vectorizable_reduction): Assert that the
15748         phi is not a pattern statement and has not been replaced by
15749         a pattern statement.
15750         * tree-vect-patterns.c (type_conversion_p): Don't check
15751         STMT_VINFO_IN_PATTERN_P.
15752         (vect_recog_vector_vector_shift_pattern): Likewise.
15753         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
15754         the pattern statement rather than the original statement; check
15755         directly for a WIDEN_MULT_EXPR here.
15756         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
15757         vect_is_simple_use to return the pattern statement rather
15758         than the original statement; use is_pattern_stmt_p to check
15759         for such a pattern statement.
15760         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
15761         to return the pattern statement rather than the original statement;
15762         don't do the same transformation here.
15763         (vect_is_simple_use): If the defining statement has been replaced
15764         by a pattern statement, return the pattern statement instead.
15765         Remove the corresponding (local) transformation from the vectype
15766         overload.
15768 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15770         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
15771         end and default to null.
15772         * tree-vect-loop.c (vect_create_epilog_for_reduction)
15773         (vectorizable_reduction): Update calls accordingly, dropping the
15774         gimple ** argument if the passed-back statement isn't needed.
15775         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
15776         (vect_recog_rotate_pattern): Likewise.
15777         (vect_recog_mask_conversion_pattern): Likewise.
15778         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15779         (vect_mask_constant_operand_p): Likewise.
15780         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
15781         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
15782         (get_group_load_store_type, get_load_store_type): Likewise.
15783         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
15784         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
15785         (vectorizable_conversion, vectorizable_assignment): Likewise.
15786         (vectorizable_shift, vectorizable_operation): Likewise.
15787         (vectorizable_store, vect_is_simple_cond): Likewise.
15788         (vectorizable_condition, vectorizable_comparison): Likewise.
15789         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
15790         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
15791         and move it to the end.  Cope with null def_stmt_outs.
15793 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15795         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
15797 2018-06-29  Jeff Law  <law@redhat.com>
15799         * config/v850/v850.c (v850_legitimate_address_p): Handle large
15800         displacements for TARGET_V850E2V3 and newer.
15801         (TARGET_LRA_P): Remove.  Defaults to LRA now.
15802         * config/v850/v850.md (sign23byte_load): Remove.
15803         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
15804         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
15806 2018-06-29  Martin Liska  <mliska@suse.cz>
15808         PR lto/85759
15809         * coverage.c (coverage_init): Mangle full path name.
15810         * doc/invoke.texi: Document the change.
15811         * gcov-io.c (mangle_path): New.
15812         * gcov-io.h (mangle_path): Likewise.
15813         * gcov.c (mangle_name): Use mangle_path for path mangling.
15815 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15817         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
15818         if starting source register is not even.
15820 2018-06-29  Martin Liska  <mliska@suse.cz>
15822         PR tree-optimization/86263
15823         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
15824         Make edge redirection.
15826 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
15828         * dumpfile.c (dump_loc): Add indentation based on scope depth.
15829         (dump_scope_depth): New variable.
15830         (get_dump_scope_depth): New function.
15831         (dump_begin_scope): New function.
15832         (dump_end_scope): New function.
15833         * dumpfile.h (get_dump_scope_depth): New declaration.
15834         (dump_begin_scope): New declaration.
15835         (dump_end_scope): New declaration.
15836         (class auto_dump_scope): New class.
15837         (AUTO_DUMP_SCOPE): New macro.
15838         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
15839         AUTO_DUMP_SCOPE.
15841 2018-06-29  Richard Biener  <rguenther@suse.de>
15843         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
15844         compute_all_dependences succeeds.
15845         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
15846         exceed --param loop-max-datarefs-for-datadeps.
15848 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
15850         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
15852 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
15854         PR target/86348
15855         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
15856         alternative 0 in preferred_for_speed attribute.
15858 2018-06-28  Paul Koning  <ni1d@arrl.net>
15860         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
15861         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
15862         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
15863         * config/pdp11/pdp11.md: Correct "length" attribute calculation
15864         for shift insn patterns.
15866 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
15868         * cgraph.c (cgraph_node::get_body): Replace assignments to
15869         "dump_file" with calls to set_dump_file.
15870         * dumpfile.c (alt_dump_file): Make static, and group with...
15871         (alt_flags): ...this definition.
15872         (dumps_are_enabled): New variable.
15873         (refresh_dumps_are_enabled): New function.
15874         (set_dump_file): New function.
15875         (set_alt_dump_file): New function.
15876         (gcc::dump_manager::dump_start): Replace assignments to
15877         "dump_file" and "alt_dump_file" with calls to set_dump_file and
15878         set_alt_dump_file.
15879         (gcc::dump_manager::dump_finish): Likewise.
15880         * dumpfile.h (alt_dump_file): Delete decl.
15881         (dumps_are_enabled): New variable decl.
15882         (set_dump_file): New function decl.
15883         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
15884         global.
15885         * tree-nested.c (lower_nested_functions): Replace assignments to
15886         "dump_file" with calls to set_dump_file.
15888 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
15890         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
15891         goto_locus of each outgoing edge of each basic block.
15893 2018-06-28  Richard Biener  <rguenther@suse.de>
15895         * dwarf2out.c (decl_scope_table): Remove.
15896         (push_decl_scope): Likewise.
15897         (pop_decl_scope): Likewise.
15898         (gen_type_die_for_member): Do not call push/pop_decl_scope.
15899         (gen_struct_or_union_type_die): Likewise.
15900         (gen_tagged_type_die): Likewise.
15901         (dwarf2out_init): Do not initialize decl_scope_table.
15902         (dwarf2out_c_finalize): Do not free it.
15904 2018-06-28  Richard Biener  <rguenther@suse.de>
15906         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
15907         deciding whether to not re-use a DIE.
15909 2018-06-28  Richard Biener  <rguenther@suse.de>
15911         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15912         DW_AT_abstract_origin attribute.
15914 2018-06-28  Martin Liska  <mliska@suse.cz>
15916         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15917         Use newly introduced constants.
15918         * tree-switch-conversion.h (struct jump_table_cluster):
15919         Define max_ratio_for_size and max_ratio_for_speed.
15921 2018-06-28  Martin Liska  <mliska@suse.cz>
15923         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15924         Add new checking assert to catch invalid state.
15925         (jump_table_cluster::can_be_handled): Handle single case
15926         clusters.
15927         (jump_table_cluster::is_beneficial): Bail out for such case.
15928         (bit_test_cluster::find_bit_tests):
15929         Add new checking assert to catch invalid state.
15930         (bit_test_cluster::can_be_handled): Handle single case
15931         clusters.
15932         (bit_test_cluster::is_beneficial): Bail out for such case.
15933         (switch_decision_tree::analyze_switch_statement):
15934         Fix comment.
15936 2018-06-28  Martin Liska  <mliska@suse.cz>
15938         * common.opt: Introduce -completion option.
15939         * gcc.c (driver_handle_option): Handle it.
15940         (driver::main): Print completions if completion
15941         is set.
15942         * opt-suggestions.c (option_proposer::get_completions):
15943         New function.
15944         (option_proposer::suggest_completion): Likewise.
15945         (option_proposer::find_param_completions): Likewise.
15946         (verify_autocompletions): Likewise.
15947         (test_completion_valid_options): Likewise.
15948         (test_completion_valid_params): Likewise.
15949         (in_completion_p): Likewise.
15950         (empty_completion_p): Likewise.
15951         (test_completion_partial_match): Likewise.
15952         (test_completion_garbage): Likewise.
15953         (opt_proposer_c_tests): Likewise.
15954         * opt-suggestions.h: Declare new functions.
15955         * opts.c (common_handle_option): Handle OPT__completion_.
15956         * selftest-run-tests.c (selftest::run_tests): Add
15957         opt_proposer_c_tests.
15958         * selftest.c (assert_str_startswith): New.
15959         * selftest.h (assert_str_startswith): Likewise.
15960         (opt_proposer_c_tests): New.
15961         (ASSERT_STR_STARTSWITH): Likewise.
15963 2018-06-28  Martin Liska  <mliska@suse.cz>
15965         * Makefile.in: Add opt-suggestions.o.
15966         * gcc-main.c: Include opt-suggestions.h.
15967         * gcc.c (driver::driver): Likewise.
15968         (driver::~driver): Remove m_option_suggestions.
15969         (driver::build_option_suggestions): Moved to option_proposer.
15970         (driver::suggest_option): Likewise.
15971         (driver::handle_unrecognized_options): Use option_proposer.
15972         * gcc.h (class driver): Add new memver m_option_proposer.
15973         * opt-suggestions.c: New file.
15974         * opt-suggestions.h: New file.
15976 2018-06-28  Martin Liska  <mliska@suse.cz>
15978         * vec.h (class auto_string_vec): New (moved from auto_argvec).
15979         (auto_string_vec::~auto_string_vec): Likewise.
15981 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
15983         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15984         prevent_decl_creation_for_types fields up and add reset_location field.
15985         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15986         statement if id->reset_location is true.
15987         (copy_edges_for_bb): Do not set goto_locus on the new edges if
15988         id->reset_location is true.
15989         (copy_phis_for_bb): Force input_location on the arguments if
15990         id->reset_location is true.
15991         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15992         is set on the function to be inlined.
15994 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
15996         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15998 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
16000         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
16001         registers for Pmode.
16002         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
16003         hard registers for the clobbered pseudo.
16005 2018-06-27  Paul Koning  <ni1d@arrl.net>
16007         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
16008         mutually exclusive options.
16009         * config/pdp11/constraints.md (h): New constraint.
16010         (O): Update definition to match shift code generation.
16011         (D): New constraint.
16012         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
16013         (CCFP): Remove.
16014         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
16015         function.
16016         (output_jump): Change arguments.
16017         (pdp11_fixed_cc_regs): New function.
16018         (pdp11_cc_mode): Ditto.
16019         (pdp11_expand_shift): Ditto.
16020         (pdp11_assemble_shift): Ditto.
16021         (pdp11_small_shift): Ditto.
16022         (pdp11_branch_cost): Remove.
16023         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
16024         from output.
16025         (pdp11_register_move_cost): Update for CC registers.
16026         (pdp11_rtx_costs): Add case for LSHIFTRT.
16027         (pdp11_output_jump): Add CCNZ mode conditional branches.
16028         (notice_update_cc_on_set): Remove.
16029         (pdp11_cc_mode): New function.
16030         (simple_memory_operand): Correct pre/post decrement case.
16031         (no_side_effect_operand): New function.
16032         (pdp11_regno_reg_class): Add CC_REGS class.
16033         (pdp11_fixed_cc_regs): New function.
16034         (pdp11_small_shift): New function.
16035         (pdp11_expand_shift): New function to expand shift insns.
16036         (pdp11_assemble_shift): New function to output shifts.
16037         (pdp11_branch_cost): Remove.
16038         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
16039         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
16040         (WCHAR_TYPE): Ditto.
16041         (PTRDIFF_TYPE): Ditto.
16042         (ADJUST_INSN_LENGTH): New macro.
16043         (FIXED_REGISTERS): Add CC registers.
16044         (CALL_USED_REGISTERS): Ditto.
16045         (reg_class): Ditto.
16046         (REG_CLASS_NAMES): Ditto.
16047         (REG_CLASS_CONTENTS): Ditto.
16048         (SELECT_CC_MODE): Use new function.
16049         (TARGET_FLAGS_REGNUM): New macro.
16050         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
16051         (cc0_reg_rtx): Remove.
16052         (CC_STATUS_MDEP): Remove.
16053         (CC_STATUS_MDEFP_INIT): Remove.
16054         (CC_IN_FPU): Remove.
16055         (NOTICE_UPDATE_CC): Remove.
16056         (REGISTER_NAMES): Add CC registers.
16057         (BRANCH_COST): Change to constant 1.
16058         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
16059         handling.
16060         * config/pdp11/pdp11.opt (mbcopy): Remove.
16061         (mbcopy-builtin): Remove.
16062         (mbranch-cheap): Remove.
16063         (mbranch-expensive): Remove.
16064         * config/pdp11/predicates.md (expand_shift_operand): Update to
16065         match shift code generation.
16066         (ccnz_operator): New predicate.
16067         * doc/invoke.texi (PDP-11 Options): Remove deleted options
16068         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
16069         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
16070         exclusive options.
16071         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
16072         description of O constraint.
16074 2018-06-27  Jeff Law  <law@redhat.com>
16075             Austin Law  <austinklaw@gmail.com>
16077         * config/v850/v850.md (addsi3_set_flags): New pattern.
16078         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
16079         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
16080         (zero_extendhisi2_v850_set_flags): Likewise.
16081         (zero_extendqisi2_v850_set_flags): Likewise.
16082         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
16083         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
16084         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
16086         * config/v850/v850-protos.h (notice_update_cc): Remove.
16087         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
16088         (v850_print_operand): Handle 'D' and "d".
16089         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
16090         Add handling of arithmetic/logical operations compared against zero.
16091         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
16092         Do not look at v850_compare_op, instead get mode from last argument.
16093         (v850_gen_compare): Remove
16094         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
16095         after reload for prologue insns.
16096         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
16097         patterns.
16098         (construct_save_jarl): Likewise.
16099         (TARGET_FLAGS_REGNUM): Define.
16100         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
16101         (NOTICE_UPDATE_CC): Remove.
16102         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
16103         than cc0.  Conditionalize on reload_completed.
16104         (cmpsi_insn, setfcc_insn): Likewise.
16105         (tst1 splitter): Turn into define_and_split which sets the flags
16106         after reload.
16107         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
16108         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
16109         (cstoresf4, cstoredf4): Clobber the flags.
16110         (cmpsi, cmpsf, cmpdf): Remove expanders.
16111         (setf_insn): Remove pattern.
16112         (addsi3): Turn into define_and_split which clobbers the flags after
16113         reload and a suitable pattern (addsi3_clobber_flags) for use after
16114         reload.
16115         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
16116         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
16117         (ashrsi3, ashrsi3_v850e2): Likewise.
16118         (bins): Clobber the flags.
16119         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
16120         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
16121         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
16122         (call_value_internal_short, call_value_internal_long): Likewise.
16123         (callt_save_interrupt, callt_return_interrupt): Likewise.
16124         (save_interrupt, return_interrupt): Likewise.
16125         (callt_save_all_interrupt, save_all_interrupt): Likewise.
16126         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16127         (restore_all_interrupt, _restore_all_interrupt): Likewise.
16128         (All FP comparisons): Only allow after reload has completed.
16129         (trfsr): Likewise.
16130         (divh, divhu): Tweak output template.
16131         (branch_z_normal, branch_z_invert): Remove
16132         (branch_nz_normal, branch_nz_invert): Likewise.
16133         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16135         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16136         * config/v850/v850.c (notice_update_cc): Remove.
16137         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
16138         (CC_NO_CARRY): Likewise.
16139         (NOTICE_UPDATE_CC): Define to nothing.
16140         * config/v850/v850.md: Remove block comment on cc0 handling
16141         Remove "cc" attribute from all patterns.  Remove cc_status handling
16142         from all patterns.  Minor formatting fixes.
16144 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16146         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16147         (cortex-a76.cortex-a55): Likewise.
16148         * config/aarch64/aarch64-tune.md: Regenerate.
16149         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16150         cortex-a76.cortex-a55.
16152 2018-06-27  Jeff Law  <law@redhat.com>
16154         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16155         (MULTILIB_DIRNAMES): Similarly.
16157 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
16159         * gimple.h (gimple_return_retbnd): Delete.
16160         (gimple_return_set_retbnd): Likewise.
16161         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16162         gimple_return_set_retbnd.
16163         * gimple-pretty-print.c (dump_gimple_return): Remove call to
16164         gimple_return_retbnd and adjust.
16165         * tree-inline.h (struct copy_body_data): Remove retbnd field.
16166         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16167         Explicitly return NULL in a couple more cases.  Move assertion
16168         on debug statements and remove unreachable code.
16169         (reset_debug_binding): Do not test id->retbnd.
16170         (expand_call_inline): Do not set it.
16172 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
16174         * configure.ac: Add --disable-gcov option.
16175         * configure: Regenerate.
16176         * Makefile.in: Honour @enable_gcov@.
16177         * doc/install.texi: Document --disable-gcov.
16179 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16181         * config/arm/arm-cpus.in (cortex-a76): New entry.
16182         (cortex-a76.cortex-a55): Likewise.
16183         * config/arm/arm-tables.opt: Regenerate.
16184         * config/arm/arm-tune.md: Likewise.
16185         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16186         * doc/invoke.texi (ARM Options): Document cortex-a76 and
16187         cortex-a76.cortex-a55.
16189 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
16191         PR target/85769
16192         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16194 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
16196         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16197         comment.
16198         (EPILOGUE_USES): Likewise.
16200 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
16202         * tree-inline.c (remap_location): New function extracted from...
16203         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
16204         (copy_phis_for_bb): ...here.  Call remap_location.
16205         (copy_cfg_body): Adjust call to copy_edges_for_bb.
16207 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
16209         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16210         unaligned vsx for 16B memset.
16212 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
16214         PR target/86285
16215         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16216         ieee128_float_type_node to long_double_type_node unless
16217         TARGET_LONG_DOUBLE_128 is set.
16219 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
16221         * cfgloop.c (get_loop_location): Convert return type from
16222         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16223         by implicit construction from rtx_insn *, and using
16224         dump_user_location_t::from_function_decl for the fallback case.
16225         * cfgloop.h (get_loop_location): Convert return type from
16226         location_t to dump_user_location_t.
16227         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16228         dump_printf_loc to pass in a dump_location_t rather than a
16229         location_t, via the gimple stmt.
16230         * coverage.c (get_coverage_counts): Update calls to
16231         dump_printf_loc to pass in dump_location_t rather than a
16232         location_t.
16233         * doc/optinfo.texi (Dump types): Convert example of
16234         dump_printf_loc from taking "locus" to taking "insn".  Update
16235         description of the "_loc" calls to cover dump_location_t.
16236         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16237         "selftest.h".
16238         (dump_user_location_t::dump_user_location_t): New constructors,
16239         from gimple *stmt and rtx_insn *.
16240         (dump_user_location_t::from_function_decl): New function.
16241         (dump_loc): Make static.
16242         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16243         const dump_location_t &.
16244         (dump_generic_expr_loc): Delete.
16245         (dump_printf_loc): Convert param "loc" from location_t to
16246         const dump_location_t &.
16247         (selftest::test_impl_location): New function.
16248         (selftest::dumpfile_c_tests): New function.
16249         * dumpfile.h: Include "profile-count.h".
16250         (class dump_user_location_t): New class.
16251         (struct dump_impl_location_t): New struct.
16252         (class dump_location_t): New class.
16253         (dump_printf_loc): Convert 2nd param from source_location to
16254         const dump_location_t &.
16255         (dump_generic_expr_loc): Delete.
16256         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16257         const dump_location_t &.
16258         * gimple-fold.c (fold_gimple_assign): Update call to
16259         dump_printf_loc to pass in a dump_location_t rather than a
16260         location_t, via the gimple stmt.
16261         (gimple_fold_call): Likewise.
16262         * gimple-loop-interchange.cc
16263         (loop_cand::analyze_iloop_reduction_var): Update for change to
16264         check_reduction_path.
16265         (tree_loop_interchange::interchange): Update for change to
16266         find_loop_location.
16267         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16268         change in return-type of find_loop_location.
16269         (graphite_regenerate_ast_isl): Likewise.
16270         * graphite-optimize-isl.c (optimize_isl): Likewise.
16271         * graphite.c (graphite_transform_loops): Likewise.
16272         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16273         pass in a dump_location_t rather than a location_t, via the
16274         gimple stmt.
16275         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16276         * ipa.c (walk_polymorphic_call_targets): Likewise.
16277         * loop-unroll.c (report_unroll): Convert "locus" param from
16278         location_t to dump_location_t.
16279         (decide_unrolling): Update for change to get_loop_location's
16280         return type.
16281         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16282         location_t to dump_user_location_t.
16283         (grid_find_single_omp_among_assignments_1): Updates calls to
16284         dump_printf_loc to pass in a dump_location_t rather than a
16285         location_t, via the gimple stmt.
16286         (grid_parallel_clauses_gridifiable): Convert "tloc" from
16287         location_t to dump_location_t.  Updates calls to dump_printf_loc
16288         to pass in a dump_location_t rather than a location_t, via the
16289         gimple stmt.
16290         (grid_inner_loop_gridifiable_p): Likewise.
16291         (grid_dist_follows_simple_pattern): Likewise.
16292         (grid_gfor_follows_tiling_pattern): Likewise.
16293         (grid_target_follows_gridifiable_pattern): Likewise.
16294         (grid_attempt_target_gridification): Convert initialization
16295         of local "grid" from memset to zero-initialization; FIXME: does
16296         this require C++11?  Update call to dump_printf_loc to pass in a
16297         optinfo_location rather than a location_t, via the gimple stmt.
16298         * profile.c (read_profile_edge_counts): Updates call to
16299         dump_printf_loc to pass in a dump_location_t rather than a
16300         location_t
16301         (compute_branch_probabilities): Likewise.
16302         * selftest-run-tests.c (selftest::run_tests): Call
16303         dumpfile_c_tests.
16304         * selftest.h (dumpfile_c_tests): New decl.
16305         * tree-loop-distribution.c (pass_loop_distribution::execute):
16306         Update for change in return type of find_loop_location.
16307         * tree-parloops.c (parallelize_loops): Likewise.
16308         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16309         "locus" from location_t to dump_user_location_t.
16310         (canonicalize_loop_induction_variables): Likewise.
16311         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16312         for change in return type of find_loop_location.
16313         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16314         to dump_printf_loc to pass in a dump_location_t rather than a
16315         location_t, via the stmt.
16316         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16317         Likewise.
16318         * tree-vect-loop-manip.c (find_loop_location): Convert return
16319         type from source_location to dump_user_location_t.
16320         (vect_do_peeling): Update for above change.
16321         (vect_loop_versioning): Update for change in type of
16322         vect_location.
16323         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16324         from location_t to dump_user_location_t.
16325         (vect_estimate_min_profitable_iters): Update for change in type
16326         of vect_location.
16327         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16328         location_t to dump_location_t.
16329         (vect_slp_bb): Update for change in type of vect_location.
16330         * tree-vectorizer.c (vect_location): Convert from source_location
16331         to dump_user_location_t.
16332         (try_vectorize_loop_1): Update for change in vect_location's type.
16333         (vectorize_loops): Likewise.
16334         (increase_alignment): Likewise.
16335         * tree-vectorizer.h (vect_location): Convert from source_location
16336         to dump_user_location_t.
16337         (find_loop_location): Convert return type from source_location to
16338         dump_user_location_t.
16339         (check_reduction_path): Convert 1st param from location_t to
16340         dump_user_location_t.
16341         * value-prof.c (check_counter): Update call to dump_printf_loc to
16342         pass in a dump_user_location_t rather than a location_t; update
16343         call to error_at for change in type of "locus".
16344         (check_ic_target): Update call to dump_printf_loc to
16345         pass in a dump_user_location_t rather than a location_t, via the
16346         call_stmt.
16348 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
16350         * config/s390/s390.h (enum processor_flags): Do not use
16351         default tune parameter when -march was specified.
16353 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
16355         PR target/86314
16356         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
16357         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
16358         operands.
16360 2018-06-26  Richard Biener  <rguenther@suse.de>
16362         PR tree-optimization/86287
16363         PR bootstrap/86316
16364         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
16365         (vect_analyze_loop): Initialize n_stmts.
16367 2018-06-26  Richard Biener  <rguenther@suse.de>
16369         PR middle-end/86271
16370         * fold-const.c (fold_convertible_p): Pointer extension
16371         isn't valid.
16373 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
16375         PR debug/86064
16376         * dwarf2out.c (loc_list_has_views): Adjust comments.
16377         (dw_loc_list): Split single cross-partition range with
16378         nonzero locview.
16380 2018-06-25  Jeff Law  <law@redhat.com>
16382         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
16383         on -mbig-switch by default.
16385         * config/v850/predicates.md (const_float_1_operand): Fix match_code
16386         test.
16387         (const_float_0_operand): Remove unused predicate.
16388         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
16389         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
16390         (recipsf2): New expander.  Original pattern now called
16391         (recipsf2_insn).
16392         (recipdf2, recipdf2_insn): Similarly.
16393         (rsqrtsf2, rsqrtsf2_insn): Similarly
16394         (rsqrtdf2, rsqrtdf2_insn): Similarly
16396 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
16398         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
16399         Simplify logic for FreeBSD (twice).
16401 2018-06-25  Martin Sebor  <msebor@redhat.com>
16403         PR tree-optimization/86204
16404         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
16405         a strnlen result if it's less than the length of the string.
16407 2018-06-25  Martin Sebor  <msebor@redhat.com>
16409         PR tree-optimization/85700
16410         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
16411         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
16412         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
16414 2018-06-25  Martin Sebor  <msebor@redhat.com>
16416         * doc/extend.texi (Zero-length arrays): Update and clarify.
16418 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
16420         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
16421         added IEEE/IBM long double multilib support on PowerPC little
16422         endian Linux systems.
16423         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
16424         (MULTILIB_DEFAULTS): Likewise.
16425         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16426         Likewise.
16427         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
16428         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
16429         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
16431 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
16433         PR middle-end/86311
16434         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
16435         (REORDER_45): Likewise.
16437 2018-06-25  Jeff Law  <law@redhat.com>
16439         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
16440         dividend to 32 bits.  Adjust length.
16441         (udivmodhi4): Cleanup output template.  Fix length.
16443 2018-06-25  Carl Love  <cel@us.ibm.com>
16445         * config/rs6000/vsx.md: Change word selector to prefered location.
16447 2018-06-25  Richard Biener  <rguenther@suse.de>
16449         PR tree-optimization/86304
16450         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
16451         epilogue-if-converted loops as well.
16453 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
16455         * lto-section-out.c (lto_begin_section): Do not print section
16456         name for noaddr and unnumbered dumps.
16458 2018-06-25  Richard Biener  <rguenther@suse.de>
16460         * tree-vectorizer.h (struct vec_info_shared): New structure
16461         with parts split out from struct vec_info and loop_nest from
16462         struct _loop_vec_info.
16463         (struct vec_info): Adjust accordingly.
16464         (struct _loop_vec_info): Likewise.
16465         (LOOP_VINFO_LOOP_NEST): Adjust.
16466         (LOOP_VINFO_DATAREFS): Likewise.
16467         (LOOP_VINFO_DDRS): Likewise.
16468         (struct _bb_vec_info): Likewise.
16469         (BB_VINFO_DATAREFS): Likewise.
16470         (BB_VINFO_DDRS): Likewise.
16471         (struct _stmt_vec_info): Add dr_aux member.
16472         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
16473         (DR_MISALIGNMENT_UNINITIALIZED): New.
16474         (set_dr_misalignment): Adjust.
16475         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
16476         (vect_analyze_loop): Adjust prototype.
16477         (vect_analyze_loop_form): Likewise.
16478         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16479         Compute dependences lazily.
16480         (vect_record_base_alignments): Use shared datarefs/ddrs.
16481         (vect_verify_datarefs_alignment): Likewise.
16482         (vect_analyze_data_refs_alignment): Likewise.
16483         (vect_analyze_data_ref_accesses): Likewise.
16484         (vect_analyze_data_refs): Likewise.
16485         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
16486         constructor parameter for shared part.
16487         (vect_analyze_loop_form): Pass in shared part and adjust.
16488         (vect_analyze_loop_2): Pass in storage for the number of
16489         stmts.  Move loop nest finding to the caller.  Compute
16490         datarefs lazily.
16491         (vect_analyze_loop): Pass in shared part.
16492         (vect_transform_loop): Verify shared datarefs are unchanged.
16493         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
16494         constructor parameter for shared part.
16495         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
16496         (vect_slp_bb): Verify shared datarefs are unchanged before
16497         transform.
16498         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
16499         change.
16500         (new_stmt_vec_info): Initialize DR_AUX misalignment to
16501         DR_MISALIGNMENT_UNINITIALIZED.
16502         * tree-vectorizer.c (vec_info::vec_info): Add constructor
16503         parameter for shared part.
16504         (vec_info::~vec_info): Adjust.
16505         (vec_info_shared::vec_info_shared): New.
16506         (vec_info_shared::~vec_info_shared): Likewise.
16507         (vec_info_shared::save_datarefs): Likewise.
16508         (vec_info_shared::check_datarefs): Likewise.
16509         (try_vectorize_loop_1): Construct shared part live for analyses
16510         of a single loop for multiple vector sizes.
16511         * tree-parloops.c (gather_scalar_reductions): Adjust.
16513 2018-06-25  Richard Biener  <rguenther@suse.de>
16515         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
16516         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
16517         (vect_analyze_data_refs): Remove similar code from here and
16518         simplify accordingly.
16520 2018-06-25  Richard Biener  <rguenther@suse.de>
16522         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
16523         for reverse storage order accesses rather than asserting
16524         they cannot happen here.
16526 2018-06-25  Tom de Vries  <tdevries@suse.de>
16528         PR debug/86257
16529         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
16530         Use data16 instead of .byte for insn prefix.
16532 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
16534         PR C++/86082
16535         * parser.c (make_char_string_pack): Pass this literal chars
16536         through cpp_interpret_string.
16537         (cp_parser_userdef_numeric_literal): Check the result of
16538         make_char_string_pack.
16540 2018-06-24  Maya Rashish  <coypu@sdf.org>
16542         * ginclude/stddef.h: Simplify conditions around avoiding
16543         re-definition of __size_t.
16545 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
16547         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
16548         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
16550 2018-06-22  Maya Rashish  <coypu@sdf.org>
16552         * doc/invoke.texi (mno-fancy-math-387): Update for changes
16553         made to OpenBSD and NetBSD through the years.
16555 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16557         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16558         behavior of vec_pack (vector double, vector double) to match
16559         behavior of vec_float2 (vector double, vector double).
16561 2018-06-22  Olivier Hainque  <hainque@adacore.com>
16563         * gimplify.c (gimplify_function_tree): Prevent creation
16564         of a trampoline for the address of the current function
16565         passed to entry/exit instrumentation hooks.
16567 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
16569         PR target/86222
16570         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
16571         correctly.
16573 2018-06-22  Martin Liska  <mliska@suse.cz>
16575         PR tree-optimization/86263
16576         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16577         Bail out if is_enabled is false.
16578         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
16579         New declaration.
16580         (jump_table_cluster::is_enabled): New function.
16582 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
16584         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16585         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
16586         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
16587         (lto_input_ts_binfo_tree_pointers): Likewise.
16588         * tree-streamer-out.c (streamer_write_tree_bitfields,
16589         write_ts_binfo_tree_pointers): Likewise.
16590         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
16592 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
16594         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
16596 2018-06-22  Martin Liska  <mliska@suse.cz>
16598         * symbol-summary.h (get): Make it pure and inline move
16599         functionality from ::get function.
16600         (get): Remove and inline into ::get and ::get_create.
16601         (get_create): Move code from ::get function.
16603 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16605         PR target/85994
16606         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
16607         -x assembler-with-cpp.
16609 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16611         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
16612         _FILE_OFFSET_BITS=64 for C++.
16614 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
16616         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
16617         conversion insn that shows up when pr85657-3.c is compiled using
16618         IEEE 128-bit long double.
16619         (neg<mode>2_internal): Use the correct mode to check whether the
16620         mode is IBM extended.
16621         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
16622         multiply and divide external functions from being created more
16623         than once.
16625 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16627         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
16628         functions.
16629         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
16630         the edge can be forwarded.
16631         (cfg_layout_merge_blocks): Likewise.
16633 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16635         * except.c (finish_eh_generation): Commit edge insertions only after
16636         the EH edges have been redirected from post-landing to landing pads.
16638 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16640         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
16641         create_tmp_var_for to create the FRAME decl.
16642         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
16644 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16646         * tree-inline.c (copy_edges_for_bb): Minor tweak.
16647         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
16648         debug statement when resetting its value.
16649         (expand_call_inline): Copy the locus of the call onto the assignment
16650         of the return value, if any.  Use local variable in more cases.
16652 2018-06-21  Martin Liska  <mliska@suse.cz>
16654         * ipa-pure-const.c (propagate_nothrow): Use
16655         funct_state_summaries->get.
16656         (dump_malloc_lattice): Likewise.
16657         (propagate_malloc): Likewise.
16659 2018-06-21  Richard Biener  <rguenther@suse.de>
16661         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
16662         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
16663         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
16664         comment.
16665         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
16666         BLOCK_ABSTRACT_ORIGIN unconditionally.
16668 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
16670         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
16671         deleting it.
16672         * ipa-reference.c (ipa_reference_c_finalize): Delete
16673         ipa_ref_opt_sum_summaries and set it to NULL.
16675 2018-06-21  Tom de Vries  <tdevries@suse.de>
16677         PR tree-optimization/85859
16678         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
16679         test with comment from bb_no_side_effects_p.
16681 2018-06-21  Richard Biener  <rguenther@suse.de>
16683         PR tree-optimization/86232
16684         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
16685         max for constant niter.
16687 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16689         * config/aarch64/aarch64-simd.md
16690         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
16692 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16694         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
16695         Make opernads of the unspec commutative.
16697 2018-06-21  Richard Biener  <rguenther@suse.de>
16699         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
16700         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
16701         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
16702         (vect_analyze_data_ref_dependence): Re-order checks to deal with
16703         NULL DR_STEP.
16704         (vect_record_base_alignments): Do not record base alignment
16705         for gathers or scatters.
16706         (vect_compute_data_ref_alignment): Drop return value that is always
16707         true.  Bail out early for gathers or scatters.
16708         (vect_enhance_data_refs_alignment): Bail out early for gathers
16709         or scatters.
16710         (vect_find_same_alignment_drs): Likewise.
16711         (vect_analyze_data_refs_alignment): Remove dead code.
16712         (vect_slp_analyze_and_verify_node_alignment): Likewise.
16713         (vect_analyze_data_refs): For possible gathers or scatters do
16714         not create an alternate DR, just check their possible validity
16715         and mark them.  Adjust DECL_NONALIASED handling to not rely
16716         on DR_BASE_ADDRESS.
16717         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
16718         update inits of gathers or scatters.
16719         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
16720         Also copy gather/scatter flag to pattern vinfo.
16722 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16724         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16725         behavior of vec_packsu (vector unsigned long long, vector unsigned
16726         long long) to match behavior of vec_packs with same signature.
16728 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
16729             Thomas Schwinge <thomas@codesourcery.com>
16730             Cesar Philippidis  <cesar@codesourcery.com>
16732         * gimplify.c (gimplify_scan_omp_clauses): Add support for
16733         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16734         (gimplify_adjust_omp_clauses): Likewise.
16735         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
16736         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
16737         (gimplify_omp_target_update): Update handling of acc update and
16738         enter/exit data.
16739         * omp-low.c (install_var_field): Remove unused parameter
16740         base_pointers_restrict.
16741         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
16742         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
16743         FINALIZE}
16744         (omp_target_base_pointers_restrict_p): Delete.
16745         (scan_omp_target): Update call to scan_sharing_clauses.
16746         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
16747         FINALIZE}.
16748         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
16749         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16750         (convert_local_omp_clauses): Likewise.
16751         * tree-pretty-print.c (dump_omp_clause): Likewise.
16752         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
16753         FINALIZE}.
16754         (omp_clause_code_name): Likewise.
16756 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
16758         PR debug/86194
16759         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
16760         be narrowed.
16762         PR tree-optimization/86231
16763         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
16764         anti-range don't overwrite *vr0min before using it to compute *vr0max.
16766 2018-06-20  Tom de Vries  <tdevries@suse.de>
16768         PR tree-optimization/86097
16769         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
16770         iv type if signedness of iv type is not the same as that of *nit.
16772 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
16774         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
16775         EDGE_EH edges, verify they are all EDGE_EH.
16777 2018-06-20  Maya Rashish  <coypu@sdf.org>
16779         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
16781 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16783         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
16784         * config/aarch64/aarch64.c (xgene1_tunings): Add
16785         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
16786         (aarch64_mode_valid_for_sched_fusion_p):
16787         Allow 16-byte modes.
16788         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
16789         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
16790         128-bit modes.
16791         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
16792         New pattern.
16793         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
16794         * config/aarch64/iterators.md (VQ2): New mode iterator.
16796 2018-06-20  Martin Liska  <mliska@suse.cz>
16798         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16799         Change default ratio from 10 to 8.
16801 2018-06-20  Martin Liska  <mliska@suse.cz>
16803         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16804         New.
16805         (bit_test_cluster::find_bit_tests): Likewise.
16806         (switch_decision_tree::analyze_switch_statement): Find clusters.
16807         * tree-switch-conversion.h (struct jump_table_cluster): Document
16808         hierarchy.
16810 2018-06-20  Martin Liska  <mliska@suse.cz>
16812         * tree-switch-conversion.c (switch_conversion::collect):
16813         Record m_uniq property.
16814         (switch_conversion::expand): Bail out for special conditions.
16815         (group_cluster::~group_cluster): New.
16816         (group_cluster::group_cluster): Likewise.
16817         (group_cluster::dump): Likewise.
16818         (jump_table_cluster::emit): New.
16819         (switch_decision_tree::fix_phi_operands_for_edges): New.
16820         (struct case_node): Remove struct.
16821         (jump_table_cluster::can_be_handled): New.
16822         (case_values_threshold): Moved to header.
16823         (reset_out_edges_aux): Likewise.
16824         (jump_table_cluster::is_beneficial): New.
16825         (bit_test_cluster::can_be_handled): Likewise.
16826         (add_case_node): Remove.
16827         (bit_test_cluster::is_beneficial): New.
16828         (case_bit_test::cmp): New.
16829         (bit_test_cluster::emit): New.
16830         (expand_switch_as_decision_tree_p): Remove.
16831         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
16832         (fix_phi_operands_for_edge): Likewise.
16833         (switch_decision_tree::analyze_switch_statement): New.
16834         (compute_cases_per_edge): Move ...
16835         (switch_decision_tree::compute_cases_per_edge): ... here.
16836         (try_switch_expansion): Likewise.
16837         (switch_decision_tree::try_switch_expansion): Likewise.
16838         (record_phi_operand_mapping): Likewise.
16839         (switch_decision_tree::record_phi_operand_mapping): Likewise.
16840         (emit_case_decision_tree): Likewise.
16841         (switch_decision_tree::emit): Likewise.
16842         (balance_case_nodes): Likewise.
16843         (switch_decision_tree::balance_case_nodes): Likewise.
16844         (dump_case_nodes): Likewise.
16845         (switch_decision_tree::dump_case_nodes): Likewise.
16846         (emit_jump): Likewise.
16847         (switch_decision_tree::emit_jump): Likewise.
16848         (emit_cmp_and_jump_insns): Likewise.
16849         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
16850         (emit_case_nodes): Likewise.
16851         (switch_decision_tree::emit_case_nodes): Likewise.
16852         (conditional_probability): Remove.
16853         * tree-switch-conversion.h (enum cluster_type): New.
16854         (PRINT_CASE): New.
16855         (struct cluster): Likewise.
16856         (cluster::cluster): Likewise.
16857         (struct simple_cluster): Likewise.
16858         (simple_cluster::simple_cluster): Likewise.
16859         (struct group_cluster): Likewise.
16860         (struct jump_table_cluster): Likewise.
16861         (struct bit_test_cluster): Likewise.
16862         (struct min_cluster_item): Likewise.
16863         (struct case_tree_node): Likewise.
16864         (case_tree_node::case_tree_node): Likewise.
16865         (jump_table_cluster::case_values_threshold): Likewise.
16866         (struct case_bit_test): Likewise.
16867         (struct switch_decision_tree): Likewise.
16868         (struct switch_conversion): Likewise.
16869         (switch_decision_tree::reset_out_edges_aux): Likewise.
16871 2018-06-20  Martin Liska  <mliska@suse.cz>
16873         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
16874         (hoist_edge_and_branch_if_true): Likewise.
16875         (expand_switch_using_bit_tests_p): Likewise.
16876         (struct case_bit_test): Likewise.
16877         (case_bit_test_cmp): Likewise.
16878         (emit_case_bit_tests): Likewise.
16879         (switch_conversion::switch_conversion): New class.
16880         (struct switch_conv_info): Remove old struct.
16881         (collect_switch_conv_info): More to ...
16882         (switch_conversion::collect): ... this.
16883         (check_range): Likewise.
16884         (switch_conversion::check_range): Likewise.
16885         (check_all_empty_except_final): Likewise.
16886         (switch_conversion::check_all_empty_except_final): Likewise.
16887         (check_final_bb): Likewise.
16888         (switch_conversion::check_final_bb): Likewise.
16889         (create_temp_arrays): Likewise.
16890         (switch_conversion::create_temp_arrays): Likewise.
16891         (free_temp_arrays): Likewise.
16892         (gather_default_values): Likewise.
16893         (switch_conversion::gather_default_values): Likewise.
16894         (build_constructors): Likewise.
16895         (switch_conversion::build_constructors): Likewise.
16896         (constructor_contains_same_values_p): Likewise.
16897         (switch_conversion::contains_same_values_p): Likewise.
16898         (array_value_type): Likewise.
16899         (switch_conversion::array_value_type): Likewise.
16900         (build_one_array): Likewise.
16901         (switch_conversion::build_one_array): Likewise.
16902         (build_arrays): Likewise.
16903         (switch_conversion::build_arrays): Likewise.
16904         (gen_def_assigns): Likewise.
16905         (switch_conversion::gen_def_assigns): Likewise.
16906         (prune_bbs): Likewise.
16907         (switch_conversion::prune_bbs): Likewise.
16908         (fix_phi_nodes): Likewise.
16909         (switch_conversion::fix_phi_nodes): Likewise.
16910         (gen_inbound_check): Likewise.
16911         (switch_conversion::gen_inbound_check): Likewise.
16912         (process_switch): Use the newly created class.
16913         (switch_conversion::expand): New.
16914         (switch_conversion::~switch_conversion): New.
16915         * tree-switch-conversion.h: New file.
16917 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16919         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16920         tree-vect-patterns.c.
16921         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16922         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
16923         (vect_recog_sad_pattern): Likewise.
16924         (vect_recog_widen_sum_pattern): Likewise.
16925         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
16926         (vect_recog_widen_shift_pattern): Remove the type_in argument.
16927         (vect_recog_rotate_pattern): Likewise.
16928         (vect_recog_mult_pattern): Likewise.
16929         (vect_recog_vector_vector_shift_pattern): Likewise.
16930         (vect_recog_divmod_pattern): Likewise.
16931         (vect_recog_mixed_size_cond_pattern): Likewise.
16932         (vect_recog_bool_pattern): Likewise.
16933         (vect_recog_mask_conversion_pattern): Likewise.
16934         (vect_try_gather_scatter_pattern): Likewise.
16935         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
16936         (vect_recog_over_widening_pattern): Likewise.
16937         (vect_recog_gather_scatter_pattern): Likewise.
16938         (vect_recog_func_ptr): Move from tree-vectorizer.h
16939         (vect_vect_recog_func_ptrs): Move further down the file.
16940         (vect_recog_func): Likewise.  Remove the third argument.
16941         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16942         (vect_pattern_recog_1): Expect the pattern function to do any
16943         necessary target tests.  Also expect it to provide a vector type.
16944         Remove the type_in handling.
16946 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16948         * tree-vect-patterns.c (vect_pattern_detected): New function.
16949         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16950         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16951         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16952         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16953         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16954         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16955         (vect_recog_mask_conversion_pattern)
16956         (vect_try_gather_scatter_pattern): Likewise.
16958 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16960         * tree-vect-patterns.c (vect_get_internal_def): New function.
16961         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16962         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16963         (search_type_for_mask_1): Use it.
16965 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16967         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16968         redundant WIDEN_SUM_EXPR handling.
16969         (vect_recog_sad_pattern): Likewise.
16971 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16973         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16974         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16975         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16976         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16977         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16979 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16981         * tree-vect-stmts.c (vectorizable_call): Make sure that we
16982         use the stmt_vec_info of the original bb statement for the
16983         new zero assignment, even if the call is part of a pattern.
16985 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16987         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16988         that the sequence is attached to the original statement rather
16989         than the pattern statement.
16990         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16991         PATTERN_DEF_SEQ from the original statement rather than
16992         the main pattern statement.
16993         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16994         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16995         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16997 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16999         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
17000         definition statements before the early exit for statements that aren't
17001         live or relevant.
17002         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
17003         split out from...
17004         (vect_transform_loop): ...here.  Process pattern definition
17005         statements without first checking whether the main pattern
17006         statement is live or relevant.
17008 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17010         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
17011         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
17013 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
17015         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
17016         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
17017         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
17018         (expand_block_compare): Change select_block_compare_mode call.
17019         (expand_strncmp_align_check): Use new functions, fix comment.
17020         (emit_final_str_compare_gpr): New function.
17021         (expand_strn_compare): Refactor and clean up code.
17022         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
17024 2018-06-19  Tony Reix  <tony.reix@atos.com>
17025             Damien Bergamini  <damien.bergamini@atos.com>
17026             David Edelsohn  <dje.gcc@gmail.com>
17028         * collect2.c (static_obj): New variable.
17029         (static_libs): New variable.
17030         (is_in_list): Uncomment declaration.
17031         (main): Track AIX libraries linked statically.
17032         (is_in_list): Uncomment definition.
17033         (scan_prog_file): Don't add AIX shared libraries initializer
17034         to constructor list if linking statically.
17036 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
17038         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
17039         constant.
17040         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
17042 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
17044         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
17045         blocks.
17047 2018-06-19  Martin Liska  <mliska@suse.cz>
17049         * config/i386/i386.c (ix86_can_inline_p): Do not use
17050         ipa_fn_summaries::get_create.
17051         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
17052         get.
17053         (devirtualization_time_bonus): Likewise.
17054         (ipcp_propagate_stage): Likewise.
17055         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17056         (edge_set_predicate): Likewise.
17057         (evaluate_conditions_for_known_args): Likewise.
17058         (evaluate_properties_for_edge): Likewise.
17059         (ipa_call_summary::reset): Tranform to ...
17060         (ipa_call_summary::~ipa_call_summary): ... this.
17061         (ipa_fn_summary::reset): Transform to ...
17062         (ipa_fn_summary::~ipa_fn_summary): ... this.
17063         (ipa_fn_summary_t::remove): Rename to ...
17064         (ipa_fn_summary_t::remove_callees): ... this.
17065         (ipa_fn_summary_t::duplicate): Use placement new
17066         instead of memory copy.
17067         (ipa_call_summary_t::duplicate): Likewise.
17068         (ipa_call_summary_t::remove): Remove.
17069         (dump_ipa_call_summary): Change get_create to get.
17070         (ipa_dump_fn_summary): Dump only when summary exists.
17071         (analyze_function_body): Use symbol_summary::get instead
17072         of get_create.
17073         (compute_fn_summary): Likewise.
17074         (estimate_edge_devirt_benefit): Likewise.
17075         (estimate_edge_size_and_time): Likewise.
17076         (inline_update_callee_summaries): Likewise.
17077         (remap_edge_change_prob): Likewise.
17078         (remap_edge_summaries): Likewise.
17079         (ipa_merge_fn_summary_after_inlining): Likewise.
17080         (write_ipa_call_summary): Likewise.
17081         (ipa_fn_summary_write): Likewise.
17082         (ipa_free_fn_summary): Likewise.
17083         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
17084         (struct ipa_call_summary): Likewise.
17085         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
17086         of get_create.
17087         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
17088         (estimate_size_after_inlining): Likewise.
17089         (estimate_growth): Likewise.
17090         (growth_likely_positive): Likewise.
17091         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17092         (inline_call): Likewise.
17093         * ipa-inline.c (caller_growth_limits): Likewise.
17094         (can_inline_edge_p): Likewise.
17095         (can_inline_edge_by_limits_p): Likewise.
17096         (compute_uninlined_call_time): Likewise.
17097         (compute_inlined_call_time): Likewise.
17098         (want_inline_small_function_p): Likewise.
17099         (edge_badness): Likewise.
17100         (update_caller_keys): Likewise.
17101         (update_callee_keys): Likewise.
17102         (inline_small_functions): Likewise.
17103         (inline_to_all_callers_1): Likewise.
17104         (dump_overall_stats): Likewise.
17105         (early_inline_small_functions): Likewise.
17106         (early_inliner): Likewise.
17107         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17108         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17109         * ipa-pure-const.c (malloc_candidate_p): Likewise.
17110         * ipa-split.c (execute_split_functions): Likewise.
17111         * symbol-summary.h: Likewise.
17112         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17114 2018-06-19  Richard Biener  <rguenther@suse.de>
17116         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
17117         (vectorize_loops): ... here.  Fix dbgcnt handling.
17118         (try_vectorize_loop): Wrap try_vectorize_loop_1.
17120 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
17122         PR target/86197
17123         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
17124         ieee128 argument takes up only one (vector) register, not two (floating
17125         point) registers.
17127 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17129         * gimplify.c (gimplify_init_constructor): Really never clear for an
17130         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17132 2018-06-19  Richard Biener  <rguenther@suse.de>
17134         PR tree-optimization/86179
17135         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17136         after failed recognition.
17138 2018-06-18  Martin Sebor  <msebor@redhat.com>
17140         PR middle-end/85602
17141         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17142         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17143         Handle integer subtraction.
17144         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17145         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17147 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17149         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17150         param from rtx to rtx_insn *.
17151         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17152         param.
17153         (frv_ifcvt_modify_insn): Likwise.
17154         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17155         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
17156         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17157         as_a <rtx_insn *> cast to local "unprotected_region" once
17158         it's been established that it's not NULL or pc_rtx.
17159         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17160         param "sethi" from rtx to rtx_insn *.
17161         (nds32_group_float_insns): Likewise for param "insn".
17162         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17163         param.
17164         (vax_output_int_subtract): Likewise.
17165         * config/vax/vax.c (vax_output_int_add): Likewise for param
17166         "insn".
17167         (vax_output_int_subtract): Likewise.
17168         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17169         (emit_pattern_after): Likewise for param "after".
17170         (emit_insn_after): Likewise.
17171         (emit_jump_insn_after): Likewise.
17172         (emit_call_insn_after): Likewise.
17173         (emit_debug_insn_after): Likewise.
17174         (emit_pattern_before): Likewise for param "before".
17175         (emit_insn_before): Likewise.
17176         (emit_jump_insn_before): Likewise.
17177         * final.c (get_insn_template): Likewise for param "insn", removing
17178         a cast.
17179         * output.h (get_insn_template): Likewise for 2nd param.
17180         * rtl.h (emit_insn_before): Likewise.
17181         (emit_jump_insn_before): Likewise.
17182         (emit_debug_insn_before_noloc): Likewise.
17183         (emit_insn_after): Likewise.
17184         (emit_jump_insn_after): Likewise.
17185         (emit_call_insn_after): Likewise.
17186         (emit_debug_insn_after): Likewise.
17187         (set_insn_deleted): Likewise for param.
17189 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
17191         PR target/85358
17192         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17193         floating point modes, so that IFmode is numerically greater than
17194         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17195         to declare the ordering.  This prevents IFmode from being
17196         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17197         machine.  Include rs6000-modes.h to share the fractional values
17198         between genmodes* and the rest of the compiler.
17199         (IFmode): Likewise.
17200         (KFmode): Likewise.
17201         (TFmode): Likewise.
17202         * config/rs6000/rs6000-modes.h: New file.
17203         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17204         meaning of rs6000_long_double_size so that 126..128 selects an
17205         appropriate 128-bit floating point type.
17206         (rs6000_option_override_internal): Likewise.
17207         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17208         (TARGET_LONG_DOUBLE_128): Change the meaning of
17209         rs6000_long_double_size so that 126..128 selects an appropriate
17210         128-bit floating point type.
17211         (LONG_DOUBLE_TYPE_SIZE): Update comment.
17212         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17213         source and destination to match the standard usage.
17214         (truncifkf2): Likewise.
17215         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17216         ISA 2.07 to use an explicit clobber, instead of passing in a
17217         temporary.
17218         (copysign<mode>3_soft): Likewise.
17220 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17222         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17223         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17224         (vect_slp_analyze_instance_dependence): Likewise.
17225         (vect_enhance_data_refs_alignment): Likewise.
17226         (vect_analyze_data_refs_alignment): Likewise.
17227         (vect_slp_analyze_and_verify_instance_alignment
17228         (vect_analyze_data_ref_accesses): Likewise.
17229         (vect_prune_runtime_alias_test_list): Likewise.
17230         (vect_analyze_data_refs): Likewise.
17231         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17232         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17233         (vect_analyze_scalar_cycles_1): Likewise.
17234         (vect_get_loop_niters): Likewise.
17235         (vect_analyze_loop_form_1): Likewise.
17236         (vect_update_vf_for_slp): Likewise.
17237         (vect_analyze_loop_operations): Likewise.
17238         (vect_analyze_loop): Likewise.
17239         (vectorizable_induction): Likewise.
17240         (vect_transform_loop): Likewise.
17241         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17242         * tree-vect-slp.c (vect_analyze_slp): Likewise.
17243         (vect_make_slp_decision): Likewise.
17244         (vect_detect_hybrid_slp): Likewise.
17245         (vect_slp_analyze_operations): Likewise.
17246         (vect_slp_bb): Likewise.
17247         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17248         (vectorizable_bswap): Likewise.
17249         (vectorizable_call): Likewise.
17250         (vectorizable_simd_clone_call): Likewise.
17251         (vectorizable_conversion): Likewise.
17252         (vectorizable_assignment): Likewise.
17253         (vectorizable_shift): Likewise.
17254         (vectorizable_operation): Likewise.
17255         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17257 2018-06-18  Martin Sebor  <msebor@redhat.com>
17259         PR tree-optimization/81384
17260         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17261         * builtins.c (expand_builtin_strnlen): New function.
17262         (expand_builtin): Call it.
17263         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17264         * builtins.def (BUILT_IN_STRNLEN): New.
17265         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17266         Warn for bounds in excess of maximum object size.
17267         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17268         single-value ranges.  Handle strnlen.
17269         (handle_builtin_strlen): Handle strnlen.
17270         (strlen_check_and_optimize_stmt): Same.
17271         * doc/extend.texi (Other Builtins): Document strnlen.
17273 2018-06-18  Maya Rashish  <coypu@sdf.org>
17275         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17276         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17277         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17279         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17280         here to ...
17281         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17283 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17285         * tree.c (escaped_string::escape): Replace cast to char * by
17286         const_cast<char *> (unescaped).
17288 2018-06-18  Nick Clifton  <nickc@redhat.com>
17290         PR 84195
17291         * tree.c (escaped_string): New class.  Converts an unescaped
17292         string into its escaped equivalent.
17293         (warn_deprecated_use): Use the new class to convert the
17294         deprecation message, if present.
17295         (test_escaped_strings): New self test.
17296         (test_c_tests): Add test_escaped_strings.
17297         * doc/extend.texi (deprecated): Add a note that the
17298         deprecation message is affected by the -fmessage-length
17299         option, and that control characters will be escaped.
17300         (#pragma GCC error): Document this pragma.
17301         (#pragma GCC warning): Likewise.
17302         * doc/invoke.texi (-fmessage-length): Document this option's
17303         effect on the #warning and #error preprocessor directives and
17304         the deprecated attribute.
17306 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17308         * tree.c (decl_value_expr_lookup): Revert latest change.
17309         (decl_value_expr_insert): Likewise.
17311 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
17313         * gimplify.c (nonlocal_vlas): Delete.
17314         (nonlocal_vla_vars): Likewise.
17315         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17316         referenced VLAs.
17317         (gimplify_body): Do not create and destroy nonlocal_vlas.
17318         * tree-nested.c: Include diagnostic.h.
17319         (use_pointer_in_frame): Tweak.
17320         (lookup_field_for_decl): Add assertion and declare the transformation.
17321         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17322         internal error when the reference is in a wrong context.  Do not
17323         create a debug decl by default.
17324         (note_nonlocal_block_vlas): Delete.
17325         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17326         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
17327         create a debug decl by default.
17328         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17329         call is in a wrong context.
17330         (fixup_vla_decls): New function.
17331         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
17332         debug variables were created.
17333         * tree.c (decl_value_expr_lookup): Add checking assertion.
17334         (decl_value_expr_insert): Likewise.
17336 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17338         PR middle-end/82479
17339         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
17340         * tree-scalar-evolution.c (interpret_expr): Likewise.
17341         (expression_expensive_p): Likewise.
17342         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
17343         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
17344         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
17345         (ssa_defined_by_minus_one_stmt_p): New.
17347 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17349         PR middle-end/64946
17350         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
17351         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
17352         * dojump.c (do_jump): Likewise.
17353         * expr.c (expand_expr_real_2): Check operand type's sign.
17354         * fold-const.c (const_unop): Handle ABSU_EXPR.
17355         (fold_abs_const): Likewise.
17356         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
17357         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
17358         (strip_sign_op_1): Likesise.
17359         * match.pd: Add new pattern to generate ABSU_EXPR.
17360         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
17361         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17362         * tree-eh.c (operation_could_trap_helper_p): Likewise.
17363         * tree-inline.c (estimate_operator_cost): Likewise.
17364         * tree-pretty-print.c (dump_generic_node): Likewise.
17365         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
17366         * tree.def (ABSU_EXPR): New.
17368 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
17370         PR middle-end/86095
17371         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
17372         documented as preserved for backward compatibility only.
17373         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
17375         PR rtl-optimization/86108
17376         * bb-reorder.c (create_forwarder_block): Renamed to ...
17377         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
17378         jump from new landing pad to the second part.
17379         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
17380         Adjust callers.
17382 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
17384         PR middle-end/85878
17385         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
17386         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
17387         Only call store_expr for halves if the mode is the same.
17389         PR middle-end/86123
17390         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
17391         Fix up comment formatting.
17393 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17395         * typed-splay-tree.h (typed_splay_tree::remove): New function.
17396         (typed_splay_tree::closure,
17397         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
17398         (typed_splay_tree::typed_splay_tree,
17399         typed_splay_tree::operator =): Declared private.
17400         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
17401         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
17402         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
17403         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
17404         typed_splay_tree::splay_tree_splay,
17405         typed_splay_tree::splay_tree_foreach_helper,
17406         typed_splay_tree::splay_tree_insert,
17407         typed_splay_tree::splay_tree_remove,
17408         typed_splay_tree::splay_tree_lookup,
17409         typed_splay_tree::splay_tree_predecessor,
17410         typed_splay_tree::splay_tree_successor,
17411         typed_splay_tree::splay_tree_min,
17412         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
17413         (typed_splay_tree::root, typed_splay_tree::comp,
17414         typed_splay_tree::delete_key,
17415         typed_splay_tree::delete_value): New data members.
17416         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
17417         typed_splay_tree::remove.
17419 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
17421         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
17422         -mginv and -mno-ginv to the assembler.
17423         * config/mips/mips.opt (-mcrc): New option.
17424         (-mginv): Likewise.
17425         * doc/invoke.text (-mcrc): Document.
17426         (-mginv): Likewise.
17428 2018-06-15  Nick Clifton  <nickc@redhat.com>
17430         PR 84195
17431         * tree.c (escaped_string): New class.  Converts an unescaped
17432         string into its escaped equivalent.
17433         (warn_deprecated_use): Use the new class to convert the
17434         deprecation message, if present.
17435         (test_escaped_strings): New self test.
17436         (test_c_tests): Add test_escaped_strings.
17437         * doc/extend.texi (deprecated): Add a note that the
17438         deprecation message is affected by the -fmessage-length
17439         option, and that control characters will be escaped.
17440         (#pragma GCC error): Document this pragma.
17441         (#pragma GCC warning): Likewise.
17442         * doc/invoke.texi (-fmessage-length): Document this option's
17443         effect on the #warning and #error preprocessor directives and
17444         the deprecated attribute.
17446 2018-06-15  Richard Biener  <rguenther@suse.de>
17448         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
17449         here, also noting vector size used.
17450         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
17451         size used in MSG_OPTIMIZED_LOCATIONS dump.
17452         (pass_slp_vectorize::execute): Adjust.
17454 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
17456         PR target/85968
17457         * config/arc/arc.c (arc_return_address_register): Fix
17458         if-condition.
17460 2018-06-15  Richard Biener  <rguenther@suse.de>
17462         PR middle-end/86159
17463         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
17464         leave useless conversion stripping to force_gimple_operand_gsi.
17465         (gimplify_build2): Likewise.
17466         (gimplify_build1): Likewise.
17468 2018-06-15  Richard Biener  <rguenther@suse.de>
17470         PR middle-end/86076
17471         * tree-cfg.c (move_stmt_op): unshare invariant addresses
17472         before adjusting their block.
17474 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17476         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
17477         multilibs for *-*-rtems*.
17478         * config/riscv/t-rtems: New file.
17480 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
17482         PR middle-end/86122
17483         * match.pd ((A +- CST1) +- CST2): Punt if last resort
17484         unsigned_type_for returns NULL.
17486         PR target/85945
17487         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
17488         subregs of multi-word pseudos unless the float mode has word size.
17490 2018-06-14  Richard Biener  <rguenther@suse.de>
17492         PR middle-end/86139
17493         * tree-vect-generic.c (build_word_mode_vector_type): Remove
17494         duplicate and harmful type_hash_canon.
17495         * tree.c (type_hash_canon): Assert we didn't find ourselves.
17497 2018-06-14  Richard Biener  <rguenther@suse.de>
17499         PR ipa/86124
17500         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
17501         NULL cgraph_node.
17503 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17505         * config/rtems.h (STDINT_LONG32): Define.
17507 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
17508             Prachi Godbole  <prachi.godbole@imgtec.com>
17510         * config/mips/mips-cpus.def: Define P6600.
17511         * config/mips/mips-tables.opt: Regenerate.
17512         * config/mips/mips.c (mips_ucbranch_type): New enum.
17513         (mips_rtx_cost_data): Add support for P6600.
17514         (mips_issue_rate): Likewise.
17515         (mips_multipass_dfa_lookahead): Likewise.
17516         (mips_avoid_hazard): Likewise.
17517         (mips_reorg_process_insns): Likewise.
17518         (mips_classify_branch_p6600): New function.
17519         * config/mips/mips.h (TUNE_P6600): New define.
17520         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
17521         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
17522         * config/mips/mips.md: Include p6600.md.
17523         (processor): Add p6600.
17524         * config/mips/p6600.md: New file.
17525         * doc/invoke.texi: Add p6600 to supported architectures.
17527 2018-06-13  Martin Sebor  <msebor@redhat.com>
17529         PR tree-optimization/86114
17530         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
17531         of integer types.
17532         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
17534 2018-06-13  Richard Biener  <rguenther@suse.de>
17536         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
17537         Properly set vector type of the intermediate stmt.
17538         * tree-vect-stmts.c (vectorizable_operation): The destination
17539         var always has vectype_out type.
17541 2018-06-13  Jeff Law  <law@redhat.com>
17543         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
17544         integer 0 for argument to print_rtl_with_bb.
17545         (rl78_reorg): Likewise.
17547 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
17549         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
17550         from rtx to rtx_insn *.
17551         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
17552         "label".
17553         (add_sched_insns_for_speculation): Likewise for local "target",
17554         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17555         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
17556         from rtx_insn ** to rtx_code_label **.
17557         (reorg_emit_nops): Likewise.
17558         (c6x_reorg): Likewise for local "call_labels".
17559         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
17560         rtx to rtx_insn *.
17561         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
17562         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
17563         the loops over LABEL_REFS.
17564         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
17565         braf_label.
17566         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17567         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
17568         (split_branches): Strengthen local "olabel" from rtx to
17569         rtx_insn *, adding a safe_as_a cast.
17570         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
17571         to "rtx_insn *".
17572         (add_insn_after): Likewise for first two params.
17573         (add_insn_before): Likewise.
17574         (remove_insn): Likewise for param.
17575         (emit_pattern_before_noloc): Likewise for second and third params.
17576         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
17577         (emit_call_insn_before_noloc): Likewise.
17578         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
17579         to "rtx_insn *".
17580         (emit_barrier_before): Likewise.
17581         (emit_label_before): Strengthen "label" param from "rtx" to
17582         "rtx_code_label *".  Strengthen "before" param from "rtx" to
17583         "rtx_insn *".
17584         (emit_insn_after_1): Strengthen "after" param from "rtx" to
17585         "rtx_insn *".
17586         (emit_pattern_after_noloc): Likewise.
17587         (emit_insn_after_noloc): Likewise.
17588         (emit_jump_insn_after_noloc): Likewise.
17589         (emit_call_insn_after_noloc): Likewise.
17590         (emit_debug_insn_after_noloc): Likewise.
17591         (emit_barrier_after): Likewise.
17592         (emit_label_after): Likewise for both params.
17593         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
17594         "loc" param from "int" to "location_t".
17595         (emit_insn_after_setloc): Likewise.
17596         (emit_jump_insn_after_setloc): Likewise.
17597         (emit_call_insn_after_setloc): Likewise.
17598         (emit_debug_insn_after_setloc): Likewise.
17599         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
17600         "loc" param from "int" to "location_t".
17601         (emit_pattern_before): Convert NULL_RTX to NULL.
17602         (emit_insn_before_setloc): Convert "loc" param from "int" to
17603         "location_t".
17604         (emit_jump_insn_before_setloc): Likewise.
17605         (emit_call_insn_before_setloc): Likewise.
17606         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
17607         rtx_insn *.  Convert "loc" param from "int" to "location_t".
17608         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
17609         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
17610         Convert 3rd param from "int" to "location_t".
17611         (emit_barrier_before, emit_barrier_after, next_real_insn):
17612         Strengthen param from rtx to rtx_insn *.
17613         (emit_label_before): Strengthen 1st param from "rtx" to
17614         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
17615         "rtx_insn *".
17616         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
17617         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
17618         Strengthen 2nd param from "rtx" to "rtx_insn *".
17619         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
17620         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
17621         Likewise. Convert 3rd param from "int" to "location_t".
17622         (emit_label_after): Strengthen 1st param from "rtx" to
17623         "rtx_code_label *".
17624         (next_real_insn, remove_insn): Strengthen param from "rtx" to
17625         "rtx_insn *".
17626         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
17627         from "rtx" to "rtx_insn *".
17629 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
17631         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
17632         bodies streamed in with -Q.
17633         * dumpfile.c (dump_files): Add lto-stream-out dump file.
17634         * dumpfile.h (tree_dump_index): Add lto_stream_out.
17635         * gimple-streamer-out.c: Include gimple-pretty-print.h
17636         (output_bb): Dump stmts streamed.
17637         * lto-section-out.c: Include print-tree.h
17638         (lto_begin_section): Dump sections created.
17639         (lto_output_decl_index): Dump decl encoded.
17640         * lto-streamer-out.c: Include print-tree.h
17641         (create_output_block): Dump output block created.
17642         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
17643         (output_function): Dump function output.
17644         (output_constructor): Dump constructor streamed.
17645         (write_global_stream): Output indexes encoded.
17646         (produce_asm_for_decls): Dump streams encoded.
17647         * lto-streamer.c (streamer_dump_file): New global var.
17648         * lto-streamer.h (streamer_dump_file): Declare.
17649         * passes.c (ipa_write_summaries): Initialize streamer dump.
17650         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
17651         in.
17653 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
17655         PR target/86048
17656         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
17657         offsets for register save directives.  Emit a second batch of save
17658         directives, if need be, when the function accesses prior frames.
17660 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17662         * config/arc/fpu.md (fmasf4): Force operand to register.
17663         (fnmasf4): Likewise.
17665 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17667         * config/arc/arc-protos.h (arc_pad_return): Remove.
17668         * config/arc/arc.c (machine_function): Remove force_short_suffix
17669         and size_reason.
17670         (arc_print_operand): Adjust printing of '&'.
17671         (arc_verify_short): Remove conditional printing of short suffix.
17672         (arc_final_prescan_insn): Remove reference to size_reason.
17673         (pad_return): New function.
17674         (arc_reorg): Call pad_return.
17675         (arc_pad_return): Remove.
17676         (arc_init_machine_status): Remove reference to force_short_suffix.
17677         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
17678         (attr length): When attribute iscompact is true force to 2
17679         regardless; in the case of maybe check if we want to force the
17680         instruction to have 4 bytes length.
17681         (nopv): Change it to generate 4 byte long nop as well.
17682         (blockage): New pattern.
17683         (simple_return): Remove call to arc_pad_return.
17684         (p_return_i): Likewise.
17686 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17688         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
17690 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17692         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
17693         ARC cores.
17695 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17697         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
17698         for ARC700 and ARCv2.
17700 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
17702         PR target/86076
17703         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
17704         operands[2] instead of operands[1].
17707 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
17709         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
17710         case, check whether the outer register overlaps an unallocatable
17711         register, not just whether it fits the required class.
17713 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
17715         * poly-int.h (can_div_trunc_p): Add new overload in which all values
17716         are poly_ints.
17717         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
17718         (memrefs_conflict_p): Likewise.
17719         (init_alias_analysis): Likewise.
17720         * cfgexpand.c (expand_debug_expr): Likewise.
17721         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
17722         * cse.c (fold_rtx): Likewise.
17723         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
17724         * expr.c (emit_block_move_hints): Likewise.
17725         (clear_storage_hints, push_block, emit_push_insn): Likewise.
17726         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
17727         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
17728         (emit_group_store): Likewise.
17729         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
17730         to read the PRE/POST_MODIFY increment.
17731         * calls.c (store_one_arg): Use strip_offset.
17732         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
17733         poly_int_rtx_p.
17734         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
17735         by a VEC_SELECT.
17736         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
17737         (simplify_binary_operation_1): Extend CONST_INT handling to
17738         poly_int_rtx_p.
17739         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
17740         than a HOST_WIDE_INT.
17741         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
17742         poly_int64.
17743         (adjust_mems, add_stores): Update accodingly.
17744         (vt_canonicalize_addr): Track polynomial offsets.
17745         (emit_note_insn_var_location): Likewise.
17746         (vt_add_function_parameter): Likewise.
17747         (vt_initialize): Likewise.
17749 2018-06-12  Jeff Law  <law@redhat.com>
17751         * config.gcc (alpha*-*-freebsd*): Remove.
17752         * config/alpha/freebsd.h: Remove.
17754 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
17756         PR other/69968
17757         * spellcheck-tree.c (levenshtein_distance): Rename to...
17758         (get_edit_distance): ...this, and update for underlying renaming.
17759         * spellcheck-tree.h (levenshtein_distance): Rename to...
17760         (get_edit_distance): ...this.
17761         * spellcheck.c (levenshtein_distance): Rename to...
17762         (get_edit_distance): ...this.  Convert from Levenshtein distance
17763         to Damerau-Levenshtein distance by supporting transpositions of
17764         adjacent characters.  Rename "v1" to "v_next" and "v0" to
17765         "v_one_ago".
17766         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
17767         (selftest::test_edit_distance_unit_test_oneway): ...this, and
17768         update for underlying renaming.
17769         (selftest::levenshtein_distance_unit_test): Rename to...
17770         (selftest::test_get_edit_distance_unit): ...this, and update for
17771         underlying renaming.
17772         (selftest::test_find_closest_string): Add example from PR 69968
17773         where transposition helps
17774         (selftest::test_metric_conditions): Update for renaming.
17775         (selftest::test_metric_conditions): Likewise.
17776         (selftest::spellcheck_c_tests): Likewise.
17777         * spellcheck.h (levenshtein_distance): Rename both overloads to...
17778         (get_edit_distance): ...this.
17779         (best_match::consider): Update for renaming.
17781 2018-06-12  Martin Sebor  <msebor@redhat.com>
17783         PR tree-optimization/85259
17784         * builtins.c (compute_objsize): Handle constant offsets.
17785         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
17786         true iff a warning has been issued.
17787         * gimple.h (gimple_nonartificial_location): New function.
17788         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
17789         gimple_nonartificial_location and handle -Wno-system-headers.
17790         (handle_builtin_stxncpy): Same.
17792 2018-06-12  Martin Sebor  <msebor@redhat.com>
17794         PR c/85931
17795         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
17797 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
17799         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17800         BUILTIN_VEC_XST entries for pointer to double and long long.
17802 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
17804         PR target/85990
17805         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17806         Update comments.
17807         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17808         Likewise.
17810 2018-06-12  Martin Liska  <mliska@suse.cz>
17812         * doc/options.texi: Document IntegerRange.
17814 2018-06-12  Martin Liska  <mliska@suse.cz>
17816         * config/i386/i386.opt: Make MPX-related options as Deprecated.
17817         * opt-functions.awk: Handle Deprecated flag.
17818         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
17819         and report error.
17820         (read_cmdline_option): Report warning for a deprecated option.
17821         * opts.h (struct cl_option): Add new field cl_deprecated.
17822         (CL_ERR_DEPRECATED): New.
17824 2018-06-12  Martin Liska  <mliska@suse.cz>
17826         * doc/options.texi: Document Deprecated option flag.
17828 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17830         * config/arc/arc-arch.h (arc_extras): New enum.
17831         (arc_cpu_t):Add field extra.
17832         (arc_cpu_types): Consider the extras.
17833         * config/arc/arc-cpus.def: Add extras info.
17834         * config/arc/arc-opts.h (processor_type): Consider extra field.
17835         * config/arc/arc.c (arc_override_options): Handle extra field.
17837 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17839         * config/arc/arc-arch.h: Update ARC_OPTX macro.
17840         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
17841         field.
17842         * config/arc/arc.c (arc_init): Update pic warning.
17843         (irq_range): Update irq range parsing warnings.
17844         (arc_override_options): Update various warning messages.
17845         (arc_handle_aux_attribute): Likewise.
17847 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
17849         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
17851 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17853         * doc/sourcebuild.texi: Document usage of line number 0 in verify
17854         compiler messages directives.
17856 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
17858         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
17859         * config/mips/mips-tables.opt: Regenerate.
17860         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
17861         mips64r6.
17862         * doc/invoke.texi: Document -march=i6500.
17864 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
17866         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
17867         (i6400_gpmul): Add cpu_unit.
17868         (i6400_gpdiv): Likewise.
17869         (i6400_msa_add_d): Update reservations.
17870         (i6400_msa_int_add) Likewise.
17871         (i6400_msa_short_logic3) Likewise.
17872         (i6400_msa_short_logic2) Likewise.
17873         (i6400_msa_short_logic) Likewise.
17874         (i6400_msa_move) Likewise.
17875         (i6400_msa_cmp) Likewise.
17876         (i6400_msa_short_float2) Likewise.
17877         (i6400_msa_div_d) Likewise.
17878         (i6400_msa_long_logic1) Likewise.
17879         (i6400_msa_long_logic2) Likewise.
17880         (i6400_msa_mult) Likewise.
17881         (i6400_msa_long_float2) Likewise.
17882         (i6400_msa_long_float4) Likewise.
17883         (i6400_msa_long_float5) Likewise.
17884         (i6400_msa_long_float8) Likewise.
17885         (i6400_fpu_fadd): Include frint type.
17886         (i6400_fpu_store): New define_insn_reservation.
17887         (i6400_fpu_load): Likewise.
17888         (i6400_fpu_move): Likewise.
17889         (i6400_fpu_fcmp): Likewise.
17890         (i6400_fpu_fmadd): Likewise.
17891         (i6400_int_mult): Include imul3nc type and update reservation.
17892         (i6400_int_div): Include idiv3 type and update reservation.
17893         (i6400_int_load): Update to check type not move_type.
17894         (i6400_int_store): Likewise.
17895         (i6400_int_prefetch): Set zero latency.
17897 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
17899         * gcc.c: Document new %@{...} sequence.
17900         (LINK_COMMAND_SPEC): Use it for the -L switches.
17901         (cpp_unique_options): Use it for the -I switches.
17902         (at_file_argbuf): New global variable.
17903         (in_at_file): Likewise.
17904         (alloc_args): Create at_file_argbuf.
17905         (clear_args): Truncate at_file_argbuf.
17906         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
17907         (open_at_file): New function.
17908         (close_at_file): Likewise.
17909         (create_at_file): Delete.
17910         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17911         <'o'>: Likewise.
17912         <'@'>: New case.
17913         (validate_switches_from_spec): Deal with %@{...} sequence.
17914         (validate_switches): Likewise.
17915         (driver::finalize): Call clear_args.
17917 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
17919         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17921 2018-06-11  Martin Sebor  <msebor@redhat.com>
17923         * doc/invoke.texi (-Wall): List -Wc++17-compat.
17924         (Wno-class-memaccess): Add @opindex.
17925         (Wno-templates, Wno-multiple-inheritance): Same.
17926         (Wno-virtual-inheritance, Wno-namespaces): Same.
17927         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17928         (Wno-format-overflow, Wno-format-truncation): Same.
17929         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17930         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17931         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17932         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17933         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17934         (Wno-misspelled-isr): Same.
17936 2018-06-11  Martin Sebor  <msebor@redhat.com>
17938         * PR tree-optimization/86083
17939         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17941 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
17943         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17945 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
17947         PR target/85755
17948         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17949         on the correct operand.
17950         (*movdi_internal64): Ditto.
17952 2018-06-11  Martin Liska  <mliska@suse.cz>
17954         PR tree-optimization/86089
17955         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17957 2018-06-11  Julia Koval  <julia.koval@intel.com>
17959         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17960         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17961         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17963 2018-06-11  Olivier Hainque  <hainque@adacore.com>
17965         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17966         for Ada with strict dwarf2.
17968 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
17970         PR target/85755
17971         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17972         addresses.
17974 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
17976         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17978 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
17980         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17981         TARGET_ELF.
17983 2018-06-08  Martin Liska  <mliska@suse.cz>
17985         * tree-cfg.h (debug_function): Fix argument type to match
17986         implementation.
17988 2018-06-08  Martin Liska  <mliska@suse.cz>
17990         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17991         Remove usage of MPX-related (and removed) fields.
17992         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17994 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
17996         * cfg.c (debug): Use TDF_NONE rather than 0.
17997         * cfghooks.c (debug): Likewise.
17998         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17999         (struct dump_option_value_info): Convert to...
18000         (struct kv_pair): ...this template type.
18001         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
18002         rather than 0.
18003         (optinfo_verbosity_options): Likewise.
18004         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
18005         OPTGROUP_NONE.
18006         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
18007         than int for "optgroup_flags" param.
18008         (dump_generic_expr_loc): Use dump_flags_t rather than int for
18009         "dump_kind" param.
18010         (dump_dec): Likewise.
18011         (dump_finish): Use TDF_NONE rather than 0.
18012         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
18013         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
18014         than 0.  Update for change to option_ptr.
18015         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
18016         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
18017         0.  Update for changes to optinfo_verbosity_options and
18018         optgroup_options.
18019         (opt_info_switch_p): Convert optgroup_flags from int to
18020         optgroup_flags_t.
18021         (dump_basic_block): Use dump_flags_t rather than int
18022         for "dump_kind" param.
18023         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
18024         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
18025         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
18026         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
18027         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
18028         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
18029         TDF_NONE): Convert from macros to...
18030         (enum dump_flag): ...this new enum.
18031         (dump_flags_t): Update to use enum.
18032         (operator|, operator&, operator~, operator|=, operator&=):
18033         Implement for dump_flags_t.
18034         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
18035         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
18036         Convert from macros to...
18037         (enum optgroup_flag): ...this new enum.
18038         (optgroup_flags_t): New typedef.
18039         (operator|, operator|=): Implement for optgroup_flags_t.
18040         (struct dump_file_info): Convert field "alt_flags" to
18041         dump_flags_t.  Convert field "optgroup_flags" to
18042         optgroup_flags_t.
18043         (dump_basic_block): Use dump_flags_t rather than int for param.
18044         (dump_generic_expr_loc): Likewise.
18045         (dump_dec): Likewise.
18046         (dump_register): Convert param "optgroup_flags" to
18047         optgroup_flags_t.
18048         (opt_info_enable_passes): Likewise.
18049         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
18050         than 0.
18051         * gimple-pretty-print.c (debug): Likewise.
18052         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
18053         (merged_store_group::apply_stores): Likewise.
18054         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
18055         * gimple.c (verify_gimple_pp): Likewise.
18056         * graphite-poly.c (print_pbb_body): Likewise.
18057         * passes.c (pass_manager::register_one_dump_file): Convert
18058         local "optgroup_flags" to optgroup_flags_t.
18059         * print-tree.c (print_node): Use TDF_NONE rather than 0.
18060         (debug): Likewise.
18061         (debug_body): Likewise.
18062         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
18063         to optgroup_flags_t.
18064         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
18065         than 0.
18066         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
18067         (convert_mult_to_fma): Likewise.
18068         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
18069         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
18070         * tree-vect-data-refs.c (dump_lower_bound): Convert param
18071         "dump_kind" to dump_flags_t.
18073 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
18075         * config/rs6000/rs6000.c (min, max): Delete.
18077 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
18079         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
18080         -mabi=spe and -mabi=no-spe.
18082 2018-06-08  Martin Liska  <mliska@suse.cz>
18084         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
18085         where we expect an existing summary.
18087 2018-06-08  Martin Liska  <mliska@suse.cz>
18089         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
18090         * ipa-inline.h (estimate_edge_growth): Likewise.
18092 2018-06-08  Martin Liska  <mliska@suse.cz>
18094         * cgraph.c (function_version_hasher::hash): Use
18095         cgraph_node::get_uid ().
18096         (function_version_hasher::equal):
18097         * cgraph.h (cgraph_node::get_uid): New method.
18098         * ipa-inline.c (update_caller_keys): Use
18099         cgraph_node::get_uid ().
18100         (update_callee_keys): Likewise.
18101         * ipa-utils.c (searchc): Likewise.
18102         (ipa_reduced_postorder): Likewise.
18103         * lto-cgraph.c (input_node): Likewise.
18104         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
18105         * symbol-summary.h (symtab_insertion): Likewise.
18106         (symtab_removal): Likewise.
18107         (symtab_duplication): Likewise.
18108         * tree-pretty-print.c (dump_function_header): Likewise.
18109         * tree-sra.c (convert_callers_for_node): Likewise.
18111 2018-06-08  Martin Liska  <mliska@suse.cz>
18113         * cgraph.c (symbol_table::create_edge): Always assign a new
18114         unique number.
18115         (symbol_table::free_edge): Do not recycle numbers.
18116         * cgraph.h (cgraph_edge::get): New method.
18117         * symbol-summary.h (symtab_removal): Use it.
18118         (symtab_duplication): Likewise.
18119         (call_summary::hashable_uid): Remove.
18121 2018-06-08  Martin Liska  <mliska@suse.cz>
18123         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
18124         (initialize_growth_caches): Remove.
18125         (free_growth_caches): Likewise.
18126         (do_estimate_edge_time): Use edge_growth_cache.
18127         (do_estimate_edge_size): Likewise.
18128         (do_estimate_edge_hints): Likewise.
18129         * ipa-inline.c (reset_edge_caches): Likewise.
18130         (recursive_inlining): Likewise.
18131         (inline_small_functions): Likewise.
18132         * ipa-inline.h (initialize_growth_caches): Remove.
18133         (estimate_edge_size): Likewise.
18134         (estimate_edge_time): Likewise.
18135         (estimate_edge_hints): Likewise.
18136         (reset_edge_growth_cache): Likewise.
18137         * symbol-summary.h (call_summary::remove): New method.
18139 2018-06-08  Martin Liska  <mliska@suse.cz>
18141         * ipa-cp.c (class edge_clone_summary): New summary.
18142         (grow_edge_clone_vectors): Remove.
18143         (ipcp_edge_duplication_hook): Remove.
18144         (class edge_clone_summary_t): New call_summary class.
18145         (ipcp_edge_removal_hook): Remove.
18146         (edge_clone_summary_t::duplicate): New function.
18147         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18148         (create_specialized_node): Likewise.
18149         (ipcp_driver): Initialize edge_clone_summaries and do not
18150         register hooks.
18152 2018-06-08  Martin Liska  <mliska@suse.cz>
18154         * symbol-summary.h (get): New function.
18155         (call_summary::m_initialize_when_cloning): New class member.
18157 2018-06-08  Martin Liska  <mliska@suse.cz>
18159         * cgraph.c (cgraph_node::remove): Do not recycle uid.
18160         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18161         (symbol_table::allocate_cgraph_symbol): Do not set uid.
18162         * passes.c (uid_hash_t): Record removed_nodes by their uids.
18163         (remove_cgraph_node_from_order): Use the removed_nodes set.
18164         (do_per_function_toporder): Likwise.
18165         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18166         instead of summary_uid.
18167         (symtab_removal): Likewise.
18168         (symtab_duplication): Likewise.
18170 2018-06-08  Martin Liska  <mliska@suse.cz>
18172         * ipa-cp.c (ipcp_store_bits_results): Use
18173         ipcp_transformation_sum.
18174         (ipcp_store_vr_results): Likewise.
18175         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18176         to ...
18177         (ipcp_transformation_initialize): ... this.
18178         (ipa_set_node_agg_value_chain):
18179         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18180         (write_ipcp_transformation_info): Likewise.
18181         (read_ipcp_transformation_info): Likewise.
18182         (ipcp_update_bits): Likewise.
18183         (ipcp_update_vr): Likewise.
18184         (ipcp_transform_function): Likewise.
18185         * ipa-prop.h: Rename ipcp_transformation_summary to
18186         ipcp_transformation.
18187         (class ipcp_transformation_t): New function summary.
18188         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18189         (ipa_get_agg_replacements_for_node): Likewise.
18191 2018-06-08  Martin Liska  <mliska@suse.cz>
18193         * ipa-pure-const.c (struct funct_state_d): Do it class instead
18194         of struct.
18195         (class funct_state_summary_t): New function_summary class.
18196         (has_function_state): Remove.
18197         (get_function_state): Likewise.
18198         (set_function_state): Likewise.
18199         (add_new_function): Likewise.
18200         (funct_state_summary_t::insert): New function.
18201         (duplicate_node_data): Remove.
18202         (remove_node_data): Remove.
18203         (funct_state_summary_t::duplicate): New function.
18204         (register_hooks): Create new funct_state_summaries.
18205         (pure_const_generate_summary): Use it.
18206         (pure_const_write_summary): Likewise.
18207         (pure_const_read_summary): Likewise.
18208         (propagate_pure_const): Likewise.
18209         (propagate_nothrow): Likewise.
18210         (dump_malloc_lattice): Likewise.
18211         (propagate_malloc): Likewise.
18212         (execute): Do not register hooks, just remove summary
18213         instead.
18214         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18215         constructor.
18217 2018-06-08  Martin Liska  <mliska@suse.cz>
18219         * ipa-reference.c (remove_node_data): Remove.
18220         (duplicate_node_data): Likewise.
18221         (class ipa_ref_var_info_summary_t): New class.
18222         (class ipa_ref_opt_summary_t): Likewise.
18223         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18224         (get_reference_optimization_summary): Use
18225         ipa_ref_opt_sum_summaries.
18226         (set_reference_vars_info): Remove.
18227         (set_reference_optimization_summary): Likewise.
18228         (ipa_init): Create summaries.
18229         (init_function_info): Use function summary.
18230         (ipa_ref_opt_summary_t::duplicate): New function.
18231         (ipa_ref_opt_summary_t::remove): New function.
18232         (get_read_write_all_from_node): Fix GNU coding style.
18233         (propagate): Use function summary.
18234         (write_node_summary_p): Fix GNU coding style.
18235         (stream_out_bitmap): Likewise.
18236         (ipa_reference_read_optimization_summary): Use function summary.
18237         (ipa_reference_c_finalize): Do not release hooks.
18239 2018-06-08  Martin Liska  <mliska@suse.cz>
18241         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18242         (analyze_function_body): Extract multiple calls of get_create.
18243         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18244         * ipa-inline.c (recursive_inlining): Use ::get method.
18245         * ipa-inline.h (estimate_edge_growth): Likewise.
18247 2018-06-08  Martin Liska  <mliska@suse.cz>
18249         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18250         HSA_INVALID.
18251         (hsa_function_summary::hsa_function_summary): Use the new enum
18252         value.
18253         (hsa_gpu_implementation_p): Use hsa_summaries::get.
18254         * hsa-gen.c (hsa_get_host_function): Likewise.
18255         (get_brig_function_name): Likewise.
18256         * ipa-hsa.c (process_hsa_functions): Likewise.
18257         (ipa_hsa_write_summary): Likewise.
18258         * symbol-summary.h (symtab_duplication): Use ::get function/
18259         (get): New function.
18261 2018-06-08  Martin Liska  <mliska@suse.cz>
18263         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18264         of get.
18265         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18266         (hsa_register_kernel): Likewise.
18267         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18268         * hsa-gen.c (hsa_get_host_function): Likewise.
18269         (get_brig_function_name): Likewise.
18270         (generate_hsa): Likewise.
18271         (pass_gen_hsail::execute): Likewise.
18272         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18273         (devirtualization_time_bonus): Likewise.
18274         (ipcp_propagate_stage): Likewise.
18275         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18276         (edge_set_predicate): Likewise.
18277         (evaluate_conditions_for_known_args): Likewise.
18278         (evaluate_properties_for_edge): Likewise.
18279         (ipa_fn_summary::reset): Likewise.
18280         (ipa_fn_summary_t::duplicate): Likewise.
18281         (dump_ipa_call_summary): Likewise.
18282         (ipa_dump_fn_summary): Likewise.
18283         (analyze_function_body): Likewise.
18284         (compute_fn_summary): Likewise.
18285         (estimate_edge_devirt_benefit): Likewise.
18286         (estimate_edge_size_and_time): Likewise.
18287         (estimate_calls_size_and_time): Likewise.
18288         (estimate_node_size_and_time): Likewise.
18289         (inline_update_callee_summaries): Likewise.
18290         (remap_edge_change_prob): Likewise.
18291         (remap_edge_summaries): Likewise.
18292         (ipa_merge_fn_summary_after_inlining): Likewise.
18293         (ipa_update_overall_fn_summary): Likewise.
18294         (read_ipa_call_summary): Likewise.
18295         (inline_read_section): Likewise.
18296         (write_ipa_call_summary): Likewise.
18297         (ipa_fn_summary_write): Likewise.
18298         (ipa_free_fn_summary): Likewise.
18299         * ipa-hsa.c (process_hsa_functions): Likewise.
18300         (ipa_hsa_write_summary): Likewise.
18301         (ipa_hsa_read_section): Likewise.
18302         * ipa-icf.c (sem_function::merge): Likewise.
18303         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18304         (do_estimate_edge_time): Likewise.
18305         (estimate_size_after_inlining): Likewise.
18306         (estimate_growth): Likewise.
18307         (growth_likely_positive): Likewise.
18308         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18309         (inline_call): Likewise.
18310         * ipa-inline.c (caller_growth_limits): Likewise.
18311         (can_inline_edge_p): Likewise.
18312         (can_inline_edge_by_limits_p): Likewise.
18313         (compute_uninlined_call_time): Likewise.
18314         (compute_inlined_call_time): Likewise.
18315         (want_inline_small_function_p): Likewise.
18316         (edge_badness): Likewise.
18317         (update_caller_keys): Likewise.
18318         (update_callee_keys): Likewise.
18319         (recursive_inlining): Likewise.
18320         (inline_small_functions): Likewise.
18321         (inline_to_all_callers_1): Likewise.
18322         (dump_overall_stats): Likewise.
18323         (early_inline_small_functions): Likewise.
18324         (early_inliner): Likewise.
18325         * ipa-inline.h (estimate_edge_growth): Likewise.
18326         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18327         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18328         * ipa-prop.h (IPA_NODE_REF): Likewise.
18329         (IPA_EDGE_REF): Likewise.
18330         * ipa-pure-const.c (malloc_candidate_p): Likewise.
18331         (propagate_malloc): Likewise.
18332         * ipa-split.c (execute_split_functions): Likewise.
18333         * symbol-summary.h: Rename get to get_create.
18334         (get): Likewise.
18335         (get_create): Likewise.
18336         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18338 2018-06-08  Martin Liska  <mliska@suse.cz>
18340         * symbol-summary.h (release): Move definition out of class
18341         declaration.
18342         (symtab_removal): Likewise.
18343         (symtab_duplication): Likewise.
18345 2018-06-08  Martin Liska  <mliska@suse.cz>
18347         * symbol-summary.h (function_summary): Move constructor
18348         implementation out of class declaration.
18349         (release): Likewise.
18350         (symtab_insertion): Likewise.
18351         (symtab_removal): Likewise.
18352         (symtab_duplication): Likewise.
18353         (get): Likewise.
18355 2018-06-08  Martin Liska  <mliska@suse.cz>
18357         * Makefile.in: Remove support for MPX (macros, related functions,
18358         fields in cgraph_node, ...).
18359         * builtin-types.def (BT_BND): Likewise.
18360         (BT_FN_BND_CONST_PTR): Likewise.
18361         (BT_FN_CONST_PTR_BND): Likewise.
18362         (BT_FN_VOID_PTR_BND): Likewise.
18363         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
18364         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
18365         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
18366         (expand_builtin_mempcpy_with_bounds): Likewise.
18367         (expand_builtin_memset_with_bounds): Likewise.
18368         (expand_builtin_memset_args): Likewise.
18369         (std_expand_builtin_va_start): Likewise.
18370         (expand_builtin): Likewise.
18371         (expand_builtin_with_bounds): Likewise.
18372         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
18373         (DEF_LIB_BUILTIN_CHKP): Likewise.
18374         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
18375         (DEF_CHKP_BUILTIN): Likewise.
18376         (BUILT_IN_MEMCPY): Likewise.
18377         (BUILT_IN_MEMMOVE): Likewise.
18378         (BUILT_IN_MEMPCPY): Likewise.
18379         (BUILT_IN_MEMSET): Likewise.
18380         (BUILT_IN_STPCPY): Likewise.
18381         (BUILT_IN_STRCAT): Likewise.
18382         (BUILT_IN_STRCHR): Likewise.
18383         (BUILT_IN_STRCPY): Likewise.
18384         (BUILT_IN_STRLEN): Likewise.
18385         (BUILT_IN_MEMCPY_CHK): Likewise.
18386         (BUILT_IN_MEMMOVE_CHK): Likewise.
18387         (BUILT_IN_MEMPCPY_CHK): Likewise.
18388         (BUILT_IN_MEMSET_CHK): Likewise.
18389         (BUILT_IN_STPCPY_CHK): Likewise.
18390         (BUILT_IN_STRCAT_CHK): Likewise.
18391         (BUILT_IN_STRCPY_CHK): Likewise.
18392         * calls.c (store_bounds): Likewise.
18393         (emit_call_1): Likewise.
18394         (special_function_p): Likewise.
18395         (maybe_warn_nonstring_arg): Likewise.
18396         (initialize_argument_information): Likewise.
18397         (finalize_must_preallocate): Likewise.
18398         (compute_argument_addresses): Likewise.
18399         (expand_call): Likewise.
18400         * cfgexpand.c (expand_call_stmt): Likewise.
18401         (expand_return): Likewise.
18402         (expand_gimple_stmt_1): Likewise.
18403         (pass_expand::execute): Likewise.
18404         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18405         (cgraph_node::remove): Likewise.
18406         (cgraph_node::dump): Likewise.
18407         (cgraph_node::verify_node): Likewise.
18408         * cgraph.h (chkp_function_instrumented_p): Likewise.
18409         (symtab_node::get_alias_target): Likewise.
18410         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
18411         (cgraph_local_p): Likewise.
18412         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
18413         (cgraph_edge::rebuild_references): Likewise.
18414         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
18415         (walk_polymorphic_call_targets): Likewise.
18416         (cgraph_node::expand_thunk): Likewise.
18417         (symbol_table::output_weakrefs): Likewise.
18418         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
18419         (ix86_handle_option): Likewise.
18420         * config/i386/constraints.md: Likewise.
18421         * config/i386/i386-builtin-types.def (BND): Likewise.
18422         (VOID): Likewise.
18423         (PVOID): Likewise.
18424         (ULONG): Likewise.
18425         * config/i386/i386-builtin.def (BDESC_END): Likewise.
18426         (BDESC_FIRST): Likewise.
18427         (BDESC): Likewise.
18428         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
18429         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
18430         * config/i386/i386.c (enum reg_class): Likewise.
18431         (ix86_target_string): Likewise.
18432         (ix86_option_override_internal): Likewise.
18433         (ix86_conditional_register_usage): Likewise.
18434         (ix86_valid_target_attribute_inner_p): Likewise.
18435         (ix86_set_indirect_branch_type): Likewise.
18436         (ix86_set_current_function): Likewise.
18437         (ix86_function_arg_regno_p): Likewise.
18438         (init_cumulative_args): Likewise.
18439         (ix86_function_arg_advance): Likewise.
18440         (ix86_function_arg): Likewise.
18441         (ix86_pass_by_reference): Likewise.
18442         (ix86_function_value_regno_p): Likewise.
18443         (ix86_function_value_1): Likewise.
18444         (ix86_function_value_bounds): Likewise.
18445         (ix86_return_in_memory): Likewise.
18446         (ix86_setup_incoming_vararg_bounds): Likewise.
18447         (ix86_va_start): Likewise.
18448         (indirect_thunk_need_prefix): Likewise.
18449         (print_reg): Likewise.
18450         (ix86_print_operand): Likewise.
18451         (ix86_expand_call): Likewise.
18452         (ix86_output_function_return): Likewise.
18453         (reg_encoded_number): Likewise.
18454         (BDESC_VERIFYS): Likewise.
18455         (ix86_init_mpx_builtins): Likewise.
18456         (ix86_init_builtins): Likewise.
18457         (ix86_emit_cmove): Likewise.
18458         (ix86_emit_move_max): Likewise.
18459         (ix86_expand_builtin): Likewise.
18460         (ix86_builtin_mpx_function): Likewise.
18461         (ix86_get_arg_address_for_bt): Likewise.
18462         (ix86_load_bounds): Likewise.
18463         (ix86_store_bounds): Likewise.
18464         (ix86_load_returned_bounds): Likewise.
18465         (ix86_store_returned_bounds): Likewise.
18466         (ix86_class_likely_spilled_p): Likewise.
18467         (ix86_hard_regno_mode_ok): Likewise.
18468         (x86_order_regs_for_local_alloc): Likewise.
18469         (ix86_mitigate_rop): Likewise.
18470         (ix86_bnd_prefixed_insn_p): Likewise.
18471         (ix86_mpx_bound_mode): Likewise.
18472         (ix86_make_bounds_constant): Likewise.
18473         (ix86_initialize_bounds): Likewise.
18474         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
18475         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
18476         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
18477         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
18478         (TARGET_CHKP_BOUND_MODE): Likewise.
18479         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
18480         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
18481         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
18482         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
18483         * config/i386/i386.h (TARGET_MPX): Likewise.
18484         (TARGET_MPX_P): Likewise.
18485         (VALID_BND_REG_MODE): Likewise.
18486         (FIRST_BND_REG): Likewise.
18487         (LAST_BND_REG): Likewise.
18488         (enum reg_class): Likewise.
18489         (BND_REG_P): Likewise.
18490         (BND_REGNO_P): Likewise.
18491         (BNDmode): Likewise.
18492         (ADJUST_INSN_LENGTH): Likewise.
18493         * config/i386/i386.md: Likewise.
18494         * config/i386/i386.opt: Likewise.
18495         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
18496         (defined): Likewise.
18497         (LINK_MPX): Likewise.
18498         (MPX_SPEC): Likewise.
18499         (LIBMPX_SPEC): Likewise.
18500         (LIBMPXWRAPPERS_SPEC): Likewise.
18501         (CHKP_SPEC): Likewise.
18502         * config/i386/predicates.md: Likewise.
18503         * dbxout.c (dbxout_type): Likewise.
18504         * doc/extend.texi: Likewise.
18505         * doc/invoke.texi: Likewise.
18506         * doc/md.texi: Likewise.
18507         * doc/tm.texi: Likewise.
18508         * doc/tm.texi.in: Likewise.
18509         * dwarf2out.c (is_base_type): Likewise.
18510         (gen_formal_types_die): Likewise.
18511         (gen_subprogram_die): Likewise.
18512         (gen_type_die_with_usage): Likewise.
18513         (gen_decl_die): Likewise.
18514         (dwarf2out_late_global_decl): Likewise.
18515         * expr.c (expand_assignment): Likewise.
18516         (emit_storent_insn): Likewise.
18517         (store_expr_with_bounds): Likewise.
18518         (store_expr): Likewise.
18519         (expand_expr_real_1): Likewise.
18520         * expr.h (store_expr_with_bounds): Likewise.
18521         * function.c (use_register_for_decl): Likewise.
18522         (struct bounds_parm_data): Likewise.
18523         (assign_parms_augmented_arg_list): Likewise.
18524         (assign_parm_find_entry_rtl): Likewise.
18525         (assign_parm_is_stack_parm): Likewise.
18526         (assign_parm_load_bounds): Likewise.
18527         (assign_bounds): Likewise.
18528         (assign_parms): Likewise.
18529         (expand_function_start): Likewise.
18530         * gcc.c (CHKP_SPEC): Likewise.
18531         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
18532         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
18533         (wrestrict_dom_walker::check_call): Likewise.
18534         * gimple.c (gimple_build_call_from_tree): Likewise.
18535         * gimple.h (enum gf_mask): Likewise.
18536         (gimple_call_with_bounds_p): Likewise.
18537         (gimple_call_set_with_bounds): Likewise.
18538         * gimplify.c (gimplify_init_constructor): Likewise.
18539         * ipa-cp.c (initialize_node_lattices): Likewise.
18540         (propagate_constants_across_call): Likewise.
18541         (find_more_scalar_values_for_callers_subset): Likewise.
18542         * ipa-hsa.c (process_hsa_functions): Likewise.
18543         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
18544         * ipa-icf.c (sem_function::merge): Likewise.
18545         * ipa-inline.c (early_inliner): Likewise.
18546         * ipa-pure-const.c (warn_function_noreturn): Likewise.
18547         (warn_function_cold): Likewise.
18548         (propagate_pure_const): Likewise.
18549         * ipa-ref.h (enum GTY): Likewise.
18550         * ipa-split.c (find_retbnd): Likewise.
18551         (consider_split): Likewise.
18552         (split_function): Likewise.
18553         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
18554         * ipa.c (walk_polymorphic_call_targets): Likewise.
18555         (symbol_table::remove_unreachable_nodes): Likewise.
18556         (process_references): Likewise.
18557         (cgraph_build_static_cdtor_1): Likewise.
18558         * lto-cgraph.c (lto_output_node): Likewise.
18559         (output_refs): Likewise.
18560         (compute_ltrans_boundary): Likewise.
18561         (input_overwrite_node): Likewise.
18562         (input_node): Likewise.
18563         (input_cgraph_1): Likewise.
18564         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
18565         * passes.c (pass_manager::execute_early_local_passes): Likewise.
18566         (class pass_chkp_instrumentation_passes): Likewise.
18567         (make_pass_chkp_instrumentation_passes): Likewise.
18568         * passes.def: Likewise.
18569         * rtl.h (struct GTY): Likewise.
18570         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
18571         * stor-layout.c (layout_type): Likewise.
18572         * symtab.c: Likewise.
18573         * target.def: Likewise.
18574         * targhooks.c (default_chkp_bound_type): Likewise.
18575         (default_chkp_bound_mode): Likewise.
18576         (default_builtin_chkp_function): Likewise.
18577         (default_chkp_function_value_bounds): Likewise.
18578         (default_chkp_make_bounds_constant): Likewise.
18579         (default_chkp_initialize_bounds): Likewise.
18580         * targhooks.h (default_chkp_bound_type): Likewise.
18581         (default_chkp_bound_mode): Likewise.
18582         (default_builtin_chkp_function): Likewise.
18583         (default_chkp_function_value_bounds): Likewise.
18584         (default_chkp_make_bounds_constant): Likewise.
18585         (default_chkp_initialize_bounds): Likewise.
18586         * toplev.c (compile_file): Likewise.
18587         (process_options): Likewise.
18588         * tree-core.h (DEF_BUILTIN): Likewise.
18589         (DEF_BUILTIN_CHKP): Likewise.
18590         * tree-inline.c (declare_return_variable): Likewise.
18591         (remap_gimple_stmt): Likewise.
18592         (copy_bb): Likewise.
18593         (initialize_inlined_parameters): Likewise.
18594         (expand_call_inline): Likewise.
18595         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
18596         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
18597         (make_pass_ipa_chkp_produce_thunks): Likewise.
18598         (make_pass_chkp): Likewise.
18599         (make_pass_chkp_opt): Likewise.
18600         (make_pass_chkp_instrumentation_passes): Likewise.
18601         * tree-pretty-print.c (dump_generic_node): Likewise.
18602         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
18603         * tree-ssa-dce.c (propagate_necessity): Likewise.
18604         (eliminate_unnecessary_stmts): Likewise.
18605         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
18606         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
18607         * tree-ssa-sccvn.h: Likewise.
18608         * tree-ssa-strlen.c (get_string_length): Likewise.
18609         (valid_builtin_call): Likewise.
18610         (adjust_last_stmt): Likewise.
18611         (handle_builtin_strchr): Likewise.
18612         (handle_builtin_strcpy): Likewise.
18613         (handle_builtin_stxncpy): Likewise.
18614         (handle_builtin_memcpy): Likewise.
18615         (handle_builtin_strcat): Likewise.
18616         (strlen_check_and_optimize_stmt): Likewise.
18617         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
18618         * tree-streamer-in.c: Likewise.
18619         * tree-streamer.c (record_common_node): Likewise.
18620         * tree.c (tree_code_size): Likewise.
18621         (wide_int_to_tree_1): Likewise.
18622         (type_contains_placeholder_1): Likewise.
18623         (build_common_tree_nodes): Likewise.
18624         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
18625         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
18626         (POINTER_BOUNDS_P): Likewise.
18627         (BOUNDED_TYPE_P): Likewise.
18628         (BOUNDED_P): Likewise.
18629         (CALL_WITH_BOUNDS_P): Likewise.
18630         (pointer_bounds_type_node): Likewise.
18631         * value-prof.c (gimple_ic): Likewise.
18632         * var-tracking.c (vt_add_function_parameters): Likewise.
18633         * varasm.c (make_decl_rtl): Likewise.
18634         (assemble_start_function): Likewise.
18635         (output_constant): Likewise.
18636         (maybe_assemble_visibility): Likewise.
18637         * varpool.c (ctor_for_folding): Likewise.
18638         * chkp-builtins.def: Remove.
18639         * ipa-chkp.c: Remove.
18640         * ipa-chkp.h: Remove.
18641         * rtl-chkp.c: Remove.
18642         * rtl-chkp.h: Remove.
18643         * tree-chkp-opt.c: Remove.
18644         * tree-chkp.c: Remove.
18645         * tree-chkp.h: Remove.
18647 2018-06-07  Carl Love  <cel@us.ibm.com>
18649         * config/rs6000/vsx.md (vextract_fp_from_shorth,
18650         vextract_fp_from_shortl): Add BE support.
18652 2018-06-07  Paul Koning  <ni1d@arrl.net>
18654         * compare-elim.c (try_merge_compare): Don't merge compare if
18655         address contains a side effect.
18656         (try_eliminate_compare): Likewise.
18658 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
18660         * config.gcc: Support "tremont".
18661         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
18662         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18663         PROCESSOR_TREMONT.
18664         * config/i386/i386.c (m_TREMONT): Define.
18665         (processor_target_table): Add "tremont".
18666         (PTA_TREMONT): Define.
18667         (ix86_lea_outperforms): Add TARGET_TREMONT.
18668         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
18669         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
18670         and M_INTEL_GOLDMONT_PLUS.
18671         (fold_builtin_cpu): Add "tremont".
18672         (ix86_add_stmt_cost): Add TARGET_TREMONT.
18673         (ix86_option_override_internal): Add "tremont".
18674         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
18675         (processor_type): Add PROCESSOR_TREMONT.
18676         * config/i386/x86-tune.def: Add m_TREMONT.
18677         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
18679 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18681         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
18682         symbol defined for msp430i* devices to be lower case.
18684 2018-06-07  Richard Biener  <rguenther@suse.de>
18686         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
18687         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
18688         Properly wrap signed arithmetic if overflow wraps.
18690 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
18692         PR tree-optimization/69615
18693         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
18694         of a cast from a same precision integral SSA_NAME in a bb dominated
18695         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
18696         cast to utype if rhs2 has already a compatible type.
18698 2018-06-07  Richard Biener  <rguenther@suse.de>
18700         PR tree-optimization/85935
18701         * graphite-scop-detection.c (find_params_in_bb): Analyze
18702         condition operands with respect to the correct loop.  Assert
18703         the analysis doesn't fail.
18705 2018-06-04  Carl Love  <cel@us.ibm.com>
18707         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
18708         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
18709         as it is slightly cheaper.
18710         (first_match_or_eos_index_<mode>):
18711         Calculate index using natural element order.
18712         (first_match_index_<mode>):
18713         Calculate index using natural element order.
18714         (first_match_or_eos_index_<mode>):
18715         Calculate index using natural order.
18716         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
18717         for BE and LE modes.
18718         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
18719         P9V_BUILTIN_VCLZLSBB_V16QI.
18720         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
18721         specific.
18723 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18725         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
18726         indentation and line wrap for many prototypes.  Add missing
18727         @smallexample directives around block of prototypes for vec_xl and
18728         vec_xst.
18730 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
18732         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
18733         track if we pass or return IEEE 128-bit floating point.
18734         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
18735         C++ mangling that is compatible with GCC 8.1.
18736         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
18737         (init_cumulative_args): Note if we pass or return IEEE 128-bit
18738         floating point types.
18739         (rs6000_function_arg_advance_1): Likewise.
18740         (rs6000_mangle_type): Optionally generate mangled names that match
18741         what GCC 8.1 generated for IEEE 128-bit floating point types.
18742         (rs6000_globalize_decl_name): If we have an external function that
18743         passes or returns IEEE 128-bit types, generate a weak reference
18744         from the mangled name used in GCC 8.1 to the current mangled
18745         name.
18746         (rs6000_init_builtins): Make __ibm128 use the long double type if
18747         long double is IBM extended double.  Make __float128 use the long
18748         double type if long double is IEEE 128-bit.
18750         PR target/85657
18751         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
18752         macro for __ibm128 built-in functions.
18753         (PACK_IF): Add __ibm128 pack/unpack functions.
18754         (UNPACK_IF): Likewise.
18755         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
18756         enable long double built-in functions if long double is IEEE
18757         128-bit floating point.
18758         (rs6000_invalid_builtin): Update long double built-in function
18759         error message.
18760         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
18761         functions, adjust the built-in function to use the long double
18762         built-in function if __ibm128 and long double are the same type.
18763         * doc/extend.texi (PowerPC builtins): Update documention for
18764         __builtin_{,un}pack_longdouble.  Add documentation for
18765         __builtin_{,un}pack_ibm128.
18767 2018-06-06  Jim Wilson  <jimw@sifive.com>
18769         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
18770         (struct machine_function): New field interrupt_mode.
18771         (riscv_handle_type_attribute): New function.  Add forward declaration.
18772         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
18773         (riscv_expand_epilogue): Check interrupt_mode field.
18774         (riscv_set_current_function): Check interrupt attribute args and
18775         set interrupt_mode field.
18776         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
18777         (riscv_sret, riscv_uret): New.
18778         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
18779         new arguments to interrupt attribute.
18781 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
18783         PR target/63177
18784         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
18785         Don't handle -mcpu=power8 if -mpower9-vector is also used.
18787 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18789         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
18790         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
18791         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18792         several redundant entries.
18794 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
18796         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
18797         type from "rtx" to "rtx_insn *".
18798         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
18799         for local "call_insn", removing cast.
18800         (ix86_expand_call): Likewise, introducing a "call_insn" local.
18802 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
18804         PR tree-optimization/86066
18805         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
18806         for BIT_INSERT_EXPR stores.
18808 2018-06-06  Richard Biener  <rguenther@suse.de>
18810         PR tree-optimization/86062
18811         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18812         component refs ontop
18813         of to be offsetted base.
18815 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18817         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
18818         to be static and remove check on interrupt attribute name.
18820 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18822         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18823         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
18825 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
18827         PR target/79924
18828         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
18829         second argument.
18830         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
18831         Remove second argument, change how error is called.
18832         (aarch64_layout_arg): Remove second argument from
18833         aarch64_err_no_fpadvsimd call.
18834         (aarch64_init_cumulative_args): Ditto.
18835         (aarch64_gimplify_va_arg_expr): Ditto.
18836         * config/aarch64/aarch64.md (mov<mode>): Ditto.
18838 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
18840         * config/i386/i386.md (simple_return_indirect_internal): New expander.
18841         (*simple_return_indirect_internal<mode>): Rename from
18842         simple_return_indirect_internal.  Use W mode iterator.
18843         (rstorssp): New expander.
18844         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
18845         (clrssbsy): New expander.
18846         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
18848 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18850         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
18851         __typeof__.
18852         (cmse_check_pointed_object): Likewise.
18854 2018-06-05  Martin Liska  <mliska@suse.cz>
18856         PR gcov-profile/47618
18857         * doc/invoke.texi: Document how -fprofile-dir format
18858         is extended.
18860 2018-06-05  Richard Biener  <rguenther@suse.de>
18862         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
18863         removal pretend DOM info isn't available so we do not update
18864         it and only remove edges, not dominated blocks.  Actually free
18865         DOM info in case we removed something.  Remove unreachable blocks.
18866         (mfb_keep_latches): Work with either DOM info or marked backedges.
18867         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
18868         first.  Mark backedges if DOM info isn't available.
18869         (Re-)compute DOM info after cleanup_control_flow_pre.
18871 2018-06-05  Richard Biener  <rguenther@suse.de>
18873         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
18874         (locus_discrim_hasher::hash): Adjust.
18875         (locus_discrim_hasher::equal): Likewise.
18876         (next_discriminator_for_locus): Work on line directly.
18877         (same_line_p): Pass in expanded locus1 as well.
18878         (assign_discriminators): Avoid redundant location expansions.
18880 2018-06-05  Richard Biener  <rguenther@suse.de>
18882         PR tree-optimization/86046
18883         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
18884         if required after clearing TREE_ADDRESSABLE.
18886 2018-06-05  Richard Biener  <rguenther@suse.de>
18888         PR tree-optimization/86047
18889         * tree-ssa-loop.c (for_each_index): Glob handling of all
18890         decls and constants and really handle all of them.
18892 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18894         PR target/81497
18895         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
18896         qualifier_void_pointer and qualifier_const_void_pointer.
18897         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
18898         (arm_init_builtins): Handle the above.
18899         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
18900         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
18901         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
18902         void intrinsics.
18904 2018-06-05  Martin Liska  <mliska@suse.cz>
18906         * auto-profile.c (read_autofdo_file): Do not use
18907         gcov_ctr_summary struct.
18908         (afdo_callsite_hot_enough_for_early_inline): Likewise.
18909         * coverage.c (struct counts_entry): Likewise.
18910         (read_counts_file): Read just single summary entry.
18911         (get_coverage_counts): Use gcov_summary struct.
18912         * coverage.h (get_coverage_counts): Likewise.
18913         * gcov-dump.c (dump_working_sets): Likewise.
18914         (tag_summary): Dump just single summary.
18915         * gcov-io.c (gcov_write_summary): Write just histogram
18916         summary.
18917         (gcov_read_summary): Read just single summary.
18918         (compute_working_sets): Use gcov_summary struct.
18919         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18920         of GCOV_COUNTERS_SUMMABLE.
18921         (GCOV_COUNTERS_SUMMABLE): Remove.
18922         (GCOV_FIRST_VALUE_COUNTER): Replace with
18923         GCOV_COUNTER_V_INTERVAL.
18924         (struct gcov_ctr_summary): Remove.
18925         (struct gcov_summary): Directly use fields of former
18926         gcov_ctr_summary.
18927         (compute_working_sets): Use gcov_summary struct.
18928         * gcov.c (read_count_file): Do not use ctrs fields.
18929         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18930         struct.
18931         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18932         struct.
18933         * profile.c: Likewise.
18934         * profile.h: Likewise.
18936 2018-06-05  Martin Liska  <mliska@suse.cz>
18938         PR gcov-profile/84846
18939         * gcov.c (output_lines): Print working directory only
18940         in intermediate format.
18942 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
18944         * config/s390/s390-builtin-types.def: Add void function type.
18945         * config/s390/s390-builtins.def: Use the function type for the
18946         tbeginc builtin.
18948 2018-06-04  Jim Wilson  <jimw@sifive.com>
18950         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18951         to int.
18952         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18953         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
18954         handle EH_RETURN_DATA_REGNO registers properly.
18955         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18956         (riscv_expand_epilogue): Update comment.  Change argument name and
18957         type.  Update code to use new name and type.  Pass new args to
18958         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
18959         EXCEPTION_RETURN.
18960         * config/riscv/riscv.md (NORMAL_RETURN): New.
18961         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18962         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18963         (eh_return): Call gen_eh_return_internal and emit barrier.
18964         (eh_return_internal): Call riscv_expand_epilogue.
18966 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
18968         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18969         bit_insertion field and declare can_be_merged_into method.
18970         (merged_store_group::can_be_merged_into): New method.
18971         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18972         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
18973         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18975 2018-06-04  Richard Biener  <rguenther@suse.de>
18977         PR tree-optimization/85955
18978         * builtins.c (fold_builtin_sincos): Convert pointers to
18979         destination to appropriate type before dereferencing.
18981 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
18983         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18985 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
18987         * expr.c (expand_expr_real_1): Force the operand into memory if
18988         its TYPE_MODE is BLKmode and if there is no integer mode for
18989         the number of bits being extracted.
18991 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
18993         PR target/85832
18994         PR target/86036
18995         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18996         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18998 2018-06-04  Richard Biener  <rguenther@suse.de>
19000         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
19001         (cleanup_tree_cfg_noloop): ... single caller.  Do
19002         start_recording_case_labels later.
19004 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
19006         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
19007         to _IMMINTRIN_H_INCLUDED.
19008         * config/i386/pconfigintrin.h: Ditto.
19009         * config/i386/waitpkgintrin.h: Ditto.
19010         * config/i386/immintrin.h: Add includes for sgxintrin.h,
19011         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
19012         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
19013         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
19014         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
19015         waitpkgintrin.h and cldemoteintrin.h.
19017 2018-06-04  Richard Biener  <rguenther@suse.de>
19019         PR tree-optimization/86038
19020         * tracer.c (find_best_successor): Check probability for
19021         being initialized, bail out if not.
19023 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
19025         PR target/86003
19026         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
19027         of bits to ignore when comparing architectures.
19029 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
19031         PR tree-optimization/69615
19032         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
19033         maximum or minimum of the type, try to merge it also as if
19034         range1 is + [-, x - 1] or + [x + 1, -].
19036         PR c++/86025
19037         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
19039 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
19041         PR tree-optimization/86034
19042         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
19043         the unsigned bitfield type in a bit insertion sequence if it does not
19044         have a larger precision than the bitfield size.
19045         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
19047 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
19049         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
19051 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19053         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
19054         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
19055         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
19056         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
19058 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
19060         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
19061         Disable -fdelete-null-pointer-checks for ELF toolchain.
19063 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19064             Kito Cheng  <kito.cheng@gmail.com>
19066         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
19067         (nds32le-*-*, nds32be-*-*): Integrate checking process.
19068         (nds32*-*-*): Add glibc and uclibc conditions.
19069         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
19070         (TARGET_EXCEPT_UNWIND_INFO): Define.
19071         * config/nds32/elf.h: New file.
19072         * config/nds32/linux.h: New file.
19073         * config/nds32/nds32-elf.opt: New file.
19074         * config/nds32/nds32-linux.opt: New file.
19075         * config/nds32/nds32-fp-as-gp.c
19076         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
19077         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
19078         TARGET_LINUX_ABI.
19079         (nds32_asm_file_end): Ditto.
19080         (nds32_print_operand): Ditto.
19081         (nds32_insert_attributes): Ditto.
19082         (nds32_init_libfuncs): New function.
19083         (TARGET_HAVE_TLS): Define.
19084         (TARGET_INIT_LIBFUNCS): Define.
19085         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
19086         spec content.
19087         (TARGET_ELF): Apply different mcmodel setting.
19088         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
19089         been migrated into elf.h and linux.h files.
19090         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
19091         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
19092         (mcmodel): The content has been migrated into nds32-elf.opt and
19093         nds32-linux.opt files.
19094         * config/nds32/t-elf: New file.
19095         * config/nds32/t-linux: New file.
19097 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
19098             Shiva Chen  <shiva0217@gmail.com>
19100         * config/nds32/constants.md (unspec_volatile_element): Add
19101         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
19102         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
19103         optimization.
19104         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
19105         (make_pass_nds32_fp_as_gp): Declare.
19106         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
19107         optmization pass.
19108         (nds32_asm_function_end_prologue): Remove unused asm output.
19109         (nds32_asm_function_begin_epilogue): Remove unused asm output.
19110         (nds32_asm_file_start): Output necessary fp_as_gp information.
19111         (nds32_option_override): Adjust register usage.
19112         (nds32_expand_prologue): Consider fp_as_gp situation.
19113         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
19114         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
19115         (epilogue): Ditto.
19116         (return): Ditto.
19117         (simple_return): Ditto.
19118         (omit_fp_begin): Output special directive for fp_as_gp.
19119         (omit_fp_end): Output special directive for fp_as_gp.
19120         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
19121         mforbid-fp-as-gp): New options.
19123 2018-06-01  Mark Wielaard  <mark@klomp.org>
19125         * dwarf2out.c (dwarf2out_finish): Remove generation of
19126         DW_AT_loclists_base.
19128 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
19130         * gimple-ssa-store-merging.c: Include gimple-fold.h.
19131         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19132         (struct merged_store_group): Add bit_insertion field.
19133         (dump_char_array): Use standard hexadecimal format.
19134         (merged_store_group::merged_store_group): Set bit_insertion to false.
19135         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
19136         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
19137         also print the mask in the dump file.
19138         (pass_store_merging::gate): Minor tweak.
19139         (imm_store_chain_info::coalesce_immediate): Fix wrong association
19140         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
19141         stores with INTEGER_CST stores.
19142         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19143         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19144         and use it throughout.  Generate bit insertion sequences if need be.
19145         (pass_store_merging::process_store): Remove redundant condition.
19146         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19148 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
19150         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19151         the 128-bit floating point types.  Fix function comment.
19153 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19155         * config/aarch64/aarch64-simd.md
19156         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19157         mnemonics.
19158         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19159         mnemonics.
19161 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19163         PR tree-optimization/85989
19164         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19165         variable.
19166         (backprop::intersect_uses): Check it when deciding whether this
19167         is a backedge reference.
19168         (backprop::process_block): Add each phi to m_visited_phis
19169         after visiting it, then clear it at the end.
19171 2018-06-01  Richard Biener  <rguenther@suse.de>
19173         * tree-vectorizer.h (vect_dr_stmt): New function.
19174         (vect_get_load_cost): Adjust.
19175         (vect_get_store_cost): Likewise.
19176         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19177         Use vect_dr_stmt instead of DR_SMTT.
19178         (vect_record_base_alignments): Likewise.
19179         (vect_calculate_target_alignment): Likewise.
19180         (vect_compute_data_ref_alignment): Likewise and make static.
19181         (vect_update_misalignment_for_peel): Likewise.
19182         (vect_verify_datarefs_alignment): Likewise.
19183         (vector_alignment_reachable_p): Likewise.
19184         (vect_get_data_access_cost): Likewise.  Pass down
19185         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19186         (vect_get_peeling_costs_all_drs): Likewise.
19187         (vect_peeling_hash_get_lowest_cost): Likewise.
19188         (vect_enhance_data_refs_alignment): Likewise.
19189         (vect_find_same_alignment_drs): Likewise.
19190         (vect_analyze_data_refs_alignment): Likewise.
19191         (vect_analyze_group_access_1): Likewise.
19192         (vect_analyze_group_access): Likewise.
19193         (vect_analyze_data_ref_access): Likewise.
19194         (vect_analyze_data_ref_accesses): Likewise.
19195         (vect_vfa_segment_size): Likewise.
19196         (vect_small_gap_p): Likewise.
19197         (vectorizable_with_step_bound_p): Likewise.
19198         (vect_prune_runtime_alias_test_list): Likewise.
19199         (vect_analyze_data_refs): Likewise.
19200         (vect_supportable_dr_alignment): Likewise.
19201         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19202         (vect_gen_prolog_loop_niters): Likewise.
19203         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19204         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19205         modify DR_STMT.
19206         (vect_recog_mask_conversion_pattern): Likewise.
19207         (vect_try_gather_scatter_pattern): Likewise.
19208         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19209         to vect_get_store_cost.
19210         (vect_get_store_cost): Get stmt_info instead of DR.
19211         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19212         (vect_get_load_cost): Get stmt_info instead of DR.
19214 2018-06-01  Richard Biener  <rguenther@suse.de>
19216         PR middle-end/86017
19217         * gimple-fold.c (var_decl_component_p): Also allow offsetted
19218         vars wrapped in MEM_REFs.
19220 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19222         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19223         Fix subreg tests so that we only return a choice between
19224         GENERAL_REGS and FP_REGS if the original classes included both.
19226 2018-06-01  Richard Biener  <rguenther@suse.de>
19228         PR ipa/85960
19229         * tree-ssa-structalias.c (get_function_part_constraint):
19230         Handle NULL fi->decl.
19231         (find_func_aliases_for_call): Properly handle indirect
19232         fi from direct call.
19233         (find_func_clobbers): Likewise.
19234         (ipa_pta_execute): Likewise.
19235         (create_variable_info_for): For functions that are ifunc_resolver
19236         resolve to a varinfo that contains the result of the resolver call.
19237         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19238         aliases.
19240 2018-05-31  Michael Collison  <michael.collison@arm.com>
19242         * config/aarch64/aarch64.md:
19243         (*fix_to_zero_extenddfdi2): New pattern.
19244         * gcc.target/aarch64/fix_extend1.c: New testcase.
19246 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
19248         PR middle-end/78809
19249         PR middle-end/83026
19250         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19251         and BUILT_IN_STRNCMP_EQ.
19252         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19253         BUILT_IN_STRNCMP_EQ.
19254         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19255         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19256         (gimple_fold_builtin): Likewise.
19257         * tree-ssa-strlen.c (compute_string_length): New function.
19258         (determine_min_obsize): New function.
19259         (handle_builtin_string_cmp): New function to handle calls to
19260         string compare functions.
19261         (strlen_optimize_stmt): Add handling to builtin string compare
19262         calls.
19263         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19264         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19265         * tree.c (build_common_builtin_nodes): Add new defines of
19266         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19268 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
19270         PR target/85984
19271         * bb-reorder.c (pass_partition_blocks::gate): Return false for
19272         functions with naked attribute.
19274 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
19276         * config/i386/sse.md (avx_vec_concat<mode>):
19277         Substitute concat_tg_mode mode attribute with xtg_mode.
19278         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19279         (concat_tg_mode): Remove mode attribute.
19281 2018-05-31  Martin Sebor  <msebor@redhat.com>
19283         PR c/82063
19284         * calls.c (alloc_max_size): Correct a logic error/typo.
19285         Treat excessive arguments as infinite.  Warn for invalid arguments.
19286         * doc/invoke.texi (-Walloc-size-larger-than): Update.
19288 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
19290         PR target/85829
19291         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19292         and movx for Haswell.
19294 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
19295             Cesar Philippidis  <cesar@codesourcery.com>
19297         PR middle-end/85879
19298         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19299         when emitting error on private/firstprivate reductions.
19300         * omp-low.c (lower_omp_target): Avoid reference-type processing
19301         on pointers for firstprivate clause.
19303 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
19305         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19306         (st1x2): Likewise.
19307         (st1x3): Likewise.
19308         * config/aarch64/aarch64-simd.md
19309         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19310         (aarch64_ld1_x3_<mode>): Likewise
19311         (aarch64_st1x2<VALLDIF:mode>): Likewise
19312         (aarch64_st1_x2_<mode>): Likewise
19313         (aarch64_st1x3<VALLDIF:mode>): Likewise
19314         (aarch64_st1_x3_<mode>): Likewise
19315         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19316         (vld1_s8_x3): Likewise.
19317         (vld1_u16_x3): Likewise.
19318         (vld1_s16_x3): Likewise.
19319         (vld1_u32_x3): Likewise.
19320         (vld1_s32_x3): Likewise.
19321         (vld1_u64_x3): Likewise.
19322         (vld1_s64_x3): Likewise.
19323         (vld1_f16_x3): Likewise.
19324         (vld1_f32_x3): Likewise.
19325         (vld1_f64_x3): Likewise.
19326         (vld1_p8_x3): Likewise.
19327         (vld1_p16_x3): Likewise.
19328         (vld1_p64_x3): Likewise.
19329         (vld1q_u8_x3): Likewise.
19330         (vld1q_s8_x3): Likewise.
19331         (vld1q_u16_x3): Likewise.
19332         (vld1q_s16_x3): Likewise.
19333         (vld1q_u32_x3): Likewise.
19334         (vld1q_s32_x3): Likewise.
19335         (vld1q_u64_x3): Likewise.
19336         (vld1q_s64_x3): Likewise.
19337         (vld1q_f16_x3): Likewise.
19338         (vld1q_f32_x3): Likewise.
19339         (vld1q_f64_x3): Likewise.
19340         (vld1q_p8_x3): Likewise.
19341         (vld1q_p16_x3): Likewise.
19342         (vld1q_p64_x3): Likewise.
19343         (vst1_s64_x2): Likewise.
19344         (vst1_u64_x2): Likewise.
19345         (vst1_f64_x2): Likewise.
19346         (vst1_s8_x2): Likewise.
19347         (vst1_p8_x2): Likewise.
19348         (vst1_s16_x2): Likewise.
19349         (vst1_p16_x2): Likewise.
19350         (vst1_s32_x2): Likewise.
19351         (vst1_u8_x2): Likewise.
19352         (vst1_u16_x2): Likewise.
19353         (vst1_u32_x2): Likewise.
19354         (vst1_f16_x2): Likewise.
19355         (vst1_f32_x2): Likewise.
19356         (vst1_p64_x2): Likewise.
19357         (vst1q_s8_x2): Likewise.
19358         (vst1q_p8_x2): Likewise.
19359         (vst1q_s16_x2): Likewise.
19360         (vst1q_p16_x2): Likewise.
19361         (vst1q_s32_x2): Likewise.
19362         (vst1q_s64_x2): Likewise.
19363         (vst1q_u8_x2): Likewise.
19364         (vst1q_u16_x2): Likewise.
19365         (vst1q_u32_x2): Likewise.
19366         (vst1q_u64_x2): Likewise.
19367         (vst1q_f16_x2): Likewise.
19368         (vst1q_f32_x2): Likewise.
19369         (vst1q_f64_x2): Likewise.
19370         (vst1q_p64_x2): Likewise.
19371         (vst1_s64_x3): Likewise.
19372         (vst1_u64_x3): Likewise.
19373         (vst1_f64_x3): Likewise.
19374         (vst1_s8_x3): Likewise.
19375         (vst1_p8_x3): Likewise.
19376         (vst1_s16_x3): Likewise.
19377         (vst1_p16_x3): Likewise.
19378         (vst1_s32_x3): Likewise.
19379         (vst1_u8_x3): Likewise.
19380         (vst1_u16_x3): Likewise.
19381         (vst1_u32_x3): Likewise.
19382         (vst1_f16_x3): Likewise.
19383         (vst1_f32_x3): Likewise.
19384         (vst1_p64_x3): Likewise.
19385         (vst1q_s8_x3): Likewise.
19386         (vst1q_p8_x3): Likewise.
19387         (vst1q_s16_x3): Likewise.
19388         (vst1q_p16_x3): Likewise.
19389         (vst1q_s32_x3): Likewise.
19390         (vst1q_s64_x3): Likewise.
19391         (vst1q_u8_x3): Likewise.
19392         (vst1q_u16_x3): Likewise.
19393         (vst1q_u32_x3): Likewise.
19394         (vst1q_u64_x3): Likewise.
19395         (vst1q_f16_x3): Likewise.
19396         (vst1q_f32_x3): Likewise.
19397         (vst1q_f64_x3): Likewise.
19398         (vst1q_p64_x3): Likewise.
19400 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19402         * config/msp430/msp430.c (msp430_output_labelref): Prepend
19403         user_label_prefix to name.
19405         * tree-core.h: Update comment about the format of NAME string
19406         passed to handler in attribute_spec.
19408         * config/msp430/msp430.md: Remove erroneous subreg expression from
19409         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
19410         zero_extend{q,h}isi2.
19412 2018-05-30  Borislav Petkov  <bp@suse.de>
19414         * doc/extend.texi: Document some architecture specific
19415         constraints and sort entries.
19417 2018-05-30  Martin Sebor  <msebor@redhat.com>
19419         PR middle-end/85369
19420         * builtins.c (expand_builtin_stpcpy_1): New function.
19421         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
19422         only if the former succeeds.
19424 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
19426         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
19427         in saphira.
19429 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19431         * doc/invoke.texi (-flinker-output): Document
19433 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19435         * passes.c (ipa_write_summaries): Only modify statements if body
19436         is in memory.
19437         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
19438         incrementally linking.
19439         (ipa_passes): Likewise.
19440         * lto-cgraph.c (lto_output_node): When incrementally linking do not
19441         pass down resolution info.
19442         * common.opt (flag_incremental_link): Update info.
19443         * gcc.c (plugin specs): Turn flinker-output=* to
19444         -plugin-opt=-linker-output-known
19445         * toplev.c (compile_file): Also cut compilation when doing incremental
19446         link.
19447         * flag-types. (enum lto_partition_model): Add
19448         LTO_LINKER_OUTPUT_NOLTOREL.
19449         (invoke.texi): Add -flinker-output docs.
19450         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
19451         link same way as WPA; do not stream in dead initializers.
19453         * dwarf2out.c (dwarf2out_die_ref_for_decl,
19454         darf2out_register_external_decl): Support incremental link.
19456 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19458         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
19460 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19462         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
19463         it down to simple_object_copy_lto_debug_sections.
19464         (run_gcc): Determine incremental LTO link time and configure
19465         lto1 into non-wpa mode, disable renaming of debug sections.
19467 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19469         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19470         descriptions of various incorrectly documented functions.
19472 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19474         Revert:
19475         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19476         address check not strict.
19478 2018-05-30  Richard Biener  <rguenther@suse.de>
19480         PR tree-optimization/85964
19481         * tracer.c (better_p): Drop initialized count check, we only
19482         call the function with initialized counts now.
19483         (find_best_successor): Do find a best edge if one
19484         has uninitialized count.
19485         (find_best_predecessor): Likewise.  Do BB frequency check only
19486         if count is initialized.
19488 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
19490         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
19491         (aarch64_ldrstr_offset_compare): New.
19492         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
19493         load/store orderings.
19494         (aarch64_gen_adjusted_ldpstp): Likewise.
19496 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
19498         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19499         Check for subset of GENERAL_REGS and FP_REGS.
19500         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
19501         r=w alternative.
19503 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
19505         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
19506         and wi::to_poly_offset.  Add the current offset and then check
19507         whether the sum fits, rather than using an unchecked addition of
19508         a checked term.  Check for a shwi rather than a uhwi.
19509         * expr.c (get_bit_range): Use tree_to_poly_uint64.
19510         (store_constructor): Use poly_int_tree_p.
19511         (expand_expr_real_1): Likewise.
19512         * function.c (assign_temp): Likewise.
19513         * fold-const.c (const_binop): Use poly_int_tree_p and
19514         wi::to_poly_offset.
19515         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
19516         division.
19517         * ipa-icf-gimple.c (func_checker::compare_operand): Use
19518         to_poly_offset for MEM offsets.
19519         * ipa-icf.c (sem_variable::equals): Likewise.
19520         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
19521         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
19522         wi::to_poly_offset for BIT_FIELD_REF offsets.
19523         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
19524         wi::to_poly_offset.
19525         * var-tracking.c (emit_note_insn_var_location): Use
19526         tree_to_poly_uint64.
19528 2018-05-29  Jim Wilson  <jimw@sifive.com>
19530         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
19532 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
19534         PR target/85950
19535         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
19536         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
19537         sequence.
19538         (sse4_1_round<mode>2): Use nonimmediate_operand
19539         for operand 1 predicate.
19541 2018-05-29  Martin Sebor  <msebor@redhat.com>
19542             Richard Biener  <rguenther@suse.de>
19544         PR testsuite/85888
19545         * calls.c (get_size_range): Call determine_value_range instead
19546         of get_value_range..
19547         * tree-vrp.h (determine_value_range): Declared new function.
19548         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
19550 2018-05-29  Richard Biener  <rguenther@suse.de>
19552         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
19553         sure to use non-pattern stmts for get_earlier_stmt arguments.
19554         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
19555         called on pattern stmts.
19556         (get_later_stmt): Likewise.
19558 2018-05-29  Martin Liska  <mliska@suse.cz>
19560         PR gcov-profile/85759
19561         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
19562         env variables.
19564 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
19566         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
19567         VEC_UNPACK_*_EXPR.
19568         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
19569         VEC_PACK_*_EXPR.
19571         PR target/85918
19572         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19573         VEC_PACK_FLOAT_EXPR): New tree codes.
19574         * tree-pretty-print.c (op_code_prio): Handle
19575         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19576         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19577         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19578         * tree-inline.c (estimate_operator_cost): Likewise.
19579         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
19580         * fold-const.c (const_binop): Likewise.
19581         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
19582         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19583         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19584         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
19585         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19586         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19587         * expr.c (expand_expr_real_2): Likewise.
19588         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
19589         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
19590         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
19591         optabs.
19592         * optabs.c (expand_widen_pattern_expr): For
19593         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
19594         sign from result type rather than operand's type.
19595         (expand_binop_directly): For vec_packu_float_optab and
19596         vec_packs_float_optab allow result type to be different from operand's
19597         type.
19598         * optabs-tree.c (optab_for_tree_code): Handle
19599         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19600         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
19601         * tree-vect-generic.c (expand_vector_operations_1):  Handle
19602         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19603         VEC_PACK_FLOAT_EXPR.
19604         * tree-vect-stmts.c (supportable_widening_operation): Handle
19605         FIX_TRUNC_EXPR.
19606         (supportable_narrowing_operation): Handle FLOAT_EXPR.
19607         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
19608         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
19609         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
19610         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
19611         mode attributes.
19612         (vec_pack<floatprefix>_float_<mode>): New expander.
19613         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
19614         attributes.
19615         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
19616         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
19617         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
19618         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
19619         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
19620         Document.
19621         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
19622         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
19623         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19624         VEC_PACK_FLOAT_EXPR): Document.
19626 2018-05-29  Richard Biener  <rguenther@suse.de>
19628         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
19629         member.
19630         (stmt_vec_info_vec): Make pointer.
19631         (init_stmt_vec_info_vec): Remove.
19632         (free_stmt_vec_info_vec): Likewise.
19633         (set_stmt_vec_info_vec): New function.
19634         (free_stmt_vec_infos): Likewise.
19635         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
19636         (set_vinfo_for_stmt): Likewise.
19637         (get_earlier_stmt): Likewise.
19638         (get_later_stmt): Likewise.
19639         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
19640         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
19641         (vec_info::~vec_info): Free stmt_vec_infos.
19642         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
19643         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
19644         (pass_slp_vectorize::execute): Likewise.
19645         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
19646         (free_stmt_vec_info_vec): Likewise.
19647         (set_stmt_vec_info_vec): New function.
19648         (free_stmt_vec_infos): Likewise.
19649         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
19650         the global stmt_vec_info_vec.
19651         * tree-parloops.c (gather_scalar_reductions): Use
19652         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
19653         vector.
19655 2018-05-29  Richard Biener  <rguenther@suse.de>
19657         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
19659 2018-05-29  Martin Liska  <mliska@suse.cz>
19660             David Malcolm  <dmalcolm@redhat.com>
19662         * vec.c (test_reverse): New.
19663         (vec_c_tests): Add new test.
19664         * vec.h (vl_ptr>::reverse): New function.
19666 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
19668         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
19670         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
19671         and later.
19673 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19675         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
19677 2018-05-28  Richard Biener  <rguenther@suse.de>
19679         PR tree-optimization/85933
19680         * tree-vect-data-refs.c (vect_record_base_alignments): Only
19681         look at stmts marked as vectorizable.
19683 2018-05-28  Richard Biener  <rguenther@suse.de>
19685         PR tree-optimization/85934
19686         * tree-vect-generic.c (expand_vector_operations_1): Hoist
19687         vector boolean check before scalar optimization.
19689 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
19691         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
19692         for armv5te.
19694 2018-05-28  Mark Wielaard  <mark@klomp.org>
19696         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
19697         if it is an expression containing a minus sign.
19699 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
19701         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
19703 2018-05-27  Paul Koning  <ni1d@arrl.net>
19705         * config/pdp11/pdp11.md (truncsihi2): Remove.
19707 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
19708             Chung-Ju Wu  <jasonwucj@gmail.com>
19710         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
19711         implementation.
19712         (unaligned_store_dw): Ditto.
19713         * config/nds32/nds32-memory-manipulation.c
19714         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
19715         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
19716         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
19717         (emit_setmem_word_loop): Rename to ...
19718         (emit_setmem_doubleword_loop): ... this.
19719         (nds32_gen_dup_4_byte_to_word_value): New function.
19720         (nds32_gen_dup_8_byte_to_double_word_value): New function.
19721         (nds32_expand_setmem_loop): Refine implementation.
19722         (nds32_expand_setmem_loop_v3m): Ditto.
19723         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
19724         pattern.
19726 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19728         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
19730 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19732         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
19733         (nds32_init_machine_status): Initialize machine->attr_naked_p and
19734         machine->attr_no_prologue_p.
19735         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
19736         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
19737         (nds32_expand_epilogue): Consider attr_naked_p.
19738         (nds32_expand_epilogue_v3pop): Likewise.
19739         (nds32_can_use_return_insn): Likewise.
19740         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
19741         attr_no_prologue_p fields.
19742         * config/nds32/nds32.opt (mret-in-naked-func): New option.
19744 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
19746         PR target/85918
19747         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19748         attributes.
19749         * config/i386/sse.md
19750         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
19751         Rename to ...
19752         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
19753         ... this.
19754         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
19755         Rename to ...
19756         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
19757         ... this.
19758         (*<floatsuffix>floatv2div2sf2): Rename to ...
19759         (*float<floatunssuffix>v2div2sf2): ... this.
19760         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
19761         (float<floatunssuffix>v2div2sf2_mask): ... this.
19762         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
19763         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
19764         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
19765         to ...
19766         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
19767         ... this.
19768         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19769         Rename to ...
19770         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19771         ... this.
19772         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19773         Rename to ...
19774         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19775         ... this.
19776         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
19777         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
19778         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
19779         gen_ufix_truncv8dfv8si2.
19780         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
19781         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
19782         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
19783         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
19784         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
19785         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
19786         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
19787         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
19789 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
19791         PR target/85900
19792         PR target/85345
19793         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
19795 2018-05-25  Jim Wilson  <jimw@sifive.com>
19797         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
19798         * config/riscv/riscv.c (struct machine_function): Add
19799         interrupt_handler_p and attribute_checked_p fields.
19800         (riscv_attribute_table): Add interrupt.
19801         (riscv_interrupt_type_p): New.
19802         (riscv_save_reg_p): Save extra regs for interrupt handler.
19803         (riscv_use_save_libcall): Return false  for interrupt handler.
19804         (riscv_first_stack_step): Add forward declaration.
19805         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
19806         for interrupt handler with large frame.  Use it for saved reg list.
19807         (riscv_expand_prologue): Move flag_stack_usage_info support to
19808         eliminate duplication.
19809         (riscv_expand_epilogue): Generate mret for interrupt handler.
19810         (riscv_epilogue_uses): New.
19811         (riscv_can_use_return_insn): Return false for interrupt handler.
19812         (riscv_function_ok_for_sibcall): Likewise.
19813         (riscv_set_current_function): Add interrupt handler support.
19814         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
19815         * config/riscv/riscv.md (UNSPECV_MRET): New.
19816         (GP_REGNUM): New.
19817         (riscv_frflags, riscv_fsflags): Use tab after opcode.
19818         (riscv_mret): New.
19819         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
19821 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
19823         PR tree-optimization/85712
19824         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
19825         this candidate has already been replaced in-situ by a copy.
19827 2018-05-25  Jason Merrill  <jason@redhat.com>
19829         PR c++/80485 - inline function non-zero address.
19830         * symtab.c (nonzero_address): Check DECL_COMDAT.
19832 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
19834         PR target/83628
19835         * config/alpha/alpha.md (ashlsi3): New insn pattern.
19836         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
19837         extension of SImode operation.  Use const123_operand predicate.
19838         (*saddsi_1): Remove.
19839         (*saddl_se_1): Ditto.
19840         (*ssubsi_1): Ditto.
19841         (*ssubl_se_1): Ditto.
19842         * config/alpha/predicates.md (const123_operand): New predicate.
19843         * config/alpha/constraints.md (P): Use IN_RANGE.
19845 2018-05-25  Richard Biener  <rguenther@suse.de>
19847         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
19848         defaulted to true.
19849         (ref_maybe_used_by_stmt_p): Likewise.
19850         (stmt_may_clobber_ref_p): Likewise.
19851         (stmt_may_clobber_ref_p_1): Likewise.
19852         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
19853         and pass it along.
19854         (ref_maybe_used_by_stmt_p): Likewise.
19855         (stmt_may_clobber_ref_p): Likewise.
19856         (stmt_may_clobber_ref_p_1): Likewise.
19857         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
19858         the alias oracle to disambiguate DRs with stmts DR analysis
19859         couldn't handle.
19860         (vect_analyze_data_refs): Do not give up on not analyzable
19861         DRs for BB vectorization.  Remove code truncating the dataref
19862         vector.
19864 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
19866         PR target/85832
19867         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19868         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
19869         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
19871 2018-05-25  Richard Biener  <rguenther@suse.de>
19873         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
19874         function, combining stmt data ref gathering and fatal analysis
19875         parts.
19876         (vect_analyze_data_refs): Remove now redudnant code and simplify.
19877         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
19878         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
19879         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
19880         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
19882 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19884         PR tree-optimization/85720
19885         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
19886         SCC if all partitions are builtins.
19887         (version_loop_by_alias_check): New parameter.  Generate cancelable
19888         runtime alias check if all partitions are builtins.
19889         (distribute_loop): Update call to above function.
19891 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19893         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
19894         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
19895         (parm_default_def_partition_arg): Ditto.
19896         (set_parm_default_def_partition): Ditto.
19897         (get_parm_default_def_partitions): Ditto and make it static.
19898         (get_undefined_value_partitions): Ditto and make it static.
19899         (remove_ssa_form): Refactor call to init_var_map here.
19900         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
19901         computation for loop region.
19902         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
19903         (register_default_def): Delete.
19904         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
19905         (parm_default_def_partition_arg): Ditto.
19906         (set_parm_default_def_partition): Ditto.
19907         (get_parm_default_def_partitions): Ditto and make it static.
19908         (get_undefined_value_partitions): Ditto and make it static.
19909         (coalesce_with_default, coalesce_with_default): Update comment.
19910         (create_coalesce_list_for_region): New func factored out from
19911         create_outofssa_var_map.
19912         (populate_coalesce_list_for_outofssa): New func factored out from
19913         create_outofssa_var_map and coalesce_ssa_name.
19914         (create_outofssa_var_map): Delete.
19915         (coalesce_ssa_name): Refactor to support live range computation.
19916         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19917         (get_parm_default_def_partitions): Delete.
19918         (get_undefined_value_partitions): Ditto.
19919         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19920         computation for loop region.
19921         (new_tree_live_info, loe_visit_block): Ditto.
19922         (live_worklist, set_var_live_on_entry): Ditto.
19923         (calculate_live_on_exit, verify_live_on_entry): Ditto.
19924         * tree-ssa-live.h (struct _var_map): New fields.
19925         (init_var_map): Change decl.
19926         (region_contains_p): New.
19928 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19930         * tree-ssa-live.h (live_merge_and_clear): Delete.
19932 2018-05-25  Richard Biener  <rguenther@suse.de>
19934         PR c++/85912
19935         * tree-dump.c (dequeue_and_dump): Remove access to removed
19936         operand 2 of a SWITCH_EXPR.
19938 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19940         * doc/sourcebuild.texi (vect_double_cond_arith): Include
19941         multiplication and division.
19942         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19943         (cond_udiv@var{m}, cond_umod@var{m}): Document.
19944         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19945         (cond_udiv_optab, cond_umod_optab): New optabs.
19946         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19947         (IFN_COND_RDIV): New internal functions.
19948         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19949         TRUNC_MOD_EXPR and RDIV_EXPR.
19950         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19951         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19952         New unspecs.
19953         (SVE_INT_BINARY): Include mult.
19954         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19955         (optab, sve_int_op): Handle mult.
19956         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19957         UNSPEC_COND_DIV.
19958         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19959         for SVE_INT_BINARY_SD.
19961 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19963         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19964         (optab, sve_int_op): Handle div and udiv.
19965         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19966         for SVE_INT_BINARY_SD.
19967         (*<optab><mode>3): New insn for the same.
19969 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19971         * tree-vect-patterns.c: Include predict.h.
19972         (vect_recog_divmod_pattern): Restrict check for division support
19973         to when optimizing for size.
19975 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19977         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19978         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19979         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19980         (gimple_match_op::set_op): Likewise.
19981         (gimple_resimplify4): Declare.
19982         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19983         (expr::gen_transform): Likewise.
19984         (decision_tree::gen): Generate a simplification routine for 4 operands.
19985         * gimple-match-head.c (gimple_simplify): Add an overload for
19986         4 operands.  In the top-level function, handle up to 4 call
19987         arguments and call gimple_resimplify4.
19988         (gimple_resimplify4): New function.
19989         (build_call_internal): Pass a fourth operand.
19990         (maybe_push_to_seq): Likewise.
19991         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19992         Fold VEC_COND_EXPRs of an operation and a default value into
19993         an IFN_COND_* function if possible.
19994         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19995         New unspecs.
19996         (SVE_COND_FP_BINARY): Include them.
19997         (optab, sve_fp_op): Handle them.
19998         (SVE_INT_BINARY_REV): New code iterator.
19999         (SVE_COND_FP_BINARY_REV): New int iterator.
20000         (commutative): New int attribute.
20001         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
20002         Declare.
20003         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
20004         function.
20005         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
20006         (*cond_<optab><mode>): New patterns for reversed operands.
20008 2018-05-25  Richard Biener  <rguenther@suse.de>
20010         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
20011         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
20012         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
20013         (STMT_VINFO_GROUPED_ACCESS): Adjust.
20014         * tree-vect-data-refs.c (everywhere): Adjust users.
20015         * tree-vect-loop.c (everywhere): Likewise.
20016         * tree-vect-slp.c (everywhere): Likewise.
20017         * tree-vect-stmts.c (everywhere): Likewise.
20018         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
20020 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20022         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
20023         Rename to...
20024         (gcc_cv_as_section_exclude): ... this.
20025         Try Solaris as #exclude syntax.
20026         * configure: Regenerate.
20027         * config.in: Regenerate.
20028         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
20029         SECTION_EXCLUDE.
20030         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
20031         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
20033         * varasm.c (default_elf_asm_named_section): Don't check if
20034         HAVE_GAS_SECTION_EXCLUDE is defined.
20036 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20038         * doc/md.texi: Update the documentation of the cond_* optabs
20039         to mention the new final operand.  Fix GET_MODE_NUNITS call.
20040         Describe the scalar case too.
20041         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
20042         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
20043         instead of 2.
20044         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
20045         (get_conditional_internal_fn): Update comment.
20046         * tree-vect-loop.c (vectorizable_reduction): Pass the original
20047         accumulator value as a final argument to conditional functions.
20048         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
20049         a define_expand and add an "else" operand.  Assert for now that
20050         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
20051         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
20052         (*cond_<optab><mode>): New patterns.
20053         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
20054         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20055         (UNSPEC_COND_EOR): Delete.
20056         (optab): Remove associated mappings.
20057         (SVE_INT_BINARY): New code iterator.
20058         (sve_int_op): Remove int attribute and add "minus" to the code
20059         attribute.
20060         (SVE_COND_INT_OP): Delete.
20061         (SVE_COND_FP_OP): Rename to...
20062         (SVE_COND_FP_BINARY): ...this.
20064 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
20066         * optabs.c (can_reuse_operands_p): New function.
20067         (maybe_legitimize_operands): Try to reuse the results for
20068         earlier operands.
20070 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
20072         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
20073         Add {q} suffix to insn mnemonic.
20075 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
20077         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
20078         (msp430_warn_func_return): New.
20080 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
20082         * fold-const.c (tree_nonzero_bits): New function.
20083         * fold-const.h (tree_nonzero_bits): Likewise.
20084         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
20085         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
20087 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
20089         PR target/85900
20090         PR target/85345
20091         * varasm.c (assemble_alias): Check ifunc_resolver only on
20092         FUNCTION_DECL.
20094 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
20096         PR target/85903
20097         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
20098         when memory input operand is handled.
20100 2018-05-24  Luis Machado  <luis.machado@linaro.org>
20102         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
20103         global.
20104         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
20106 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
20108         * match.pd: Delay FMA folds until after vectorization.
20110 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
20112         PR target/83009
20113         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20114         address check not strict.
20116 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
20118         * gimple-match.h (gimple_match_op): New class.
20119         (mprts_hook): Replace parameters with a gimple_match_op *.
20120         (maybe_build_generic_op): Likewise.
20121         (gimple_simplified_result_is_gimple_val): Replace parameters with
20122         a const gimple_match_op *.
20123         (gimple_simplify): Replace code_helper * and tree * parameters with
20124         a gimple_match_op * parameter.
20125         (gimple_resimplify1): Replace code_helper *, tree and tree *
20126         parameters with a gimple_match_op * parameter.
20127         (gimple_resimplify2): Likewise.
20128         (gimple_resimplify3): Likewise.
20129         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20130         parameters with a gimple_match_op * parameter.
20131         * gimple-match-head.c (gimple_simplify): Change prototypes of
20132         auto-generated functions to take a gimple_match_op * instead of
20133         separate code_helper * and tree * parameters.  Make the same
20134         change in the top-level overload and update calls to the
20135         gimple_resimplify routines.  Update calls to the auto-generated
20136         functions and to maybe_push_res_to_seq in the publicly-facing
20137         operation-specific gimple_simplify overloads.
20138         (gimple_match_op::MAX_NUM_OPS): Define.
20139         (gimple_resimplify1): Replace rcode and ops with a single res_op
20140         parameter.  Update call to gimple_simplify.
20141         (gimple_resimplify2): Likewise.
20142         (gimple_resimplify3): Likewise.
20143         (mprts_hook): Replace parameters with a gimple_match_op *.
20144         (maybe_build_generic_op): Likewise.
20145         (build_call_internal): Replace type, nargs and ops with
20146         a gimple_match_op *.
20147         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20148         with a single gimple_match_op *.  Update calls to mprts_hook,
20149         build_call_internal and gimple_simplified_result_is_gimple_val.
20150         Factor out code that is common to the tree_code and combined_fn cases.
20151         * genmatch.c (expr::gen_transform): Replace tem_code and
20152         tem_ops with a gimple_match_op called tem_op.  Update calls
20153         to the gimple_resimplify functions and maybe_push_res_to_seq.
20154         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20155         res_ops.  Update call to the gimple_resimplify functions.
20156         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20157         (decision_tree::gen): Make the functions take a gimple_match_op *
20158         called res_op instead of separate res_code and res_ops parameters.
20159         Update call accordingly.
20160         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20161         and ops with a single res_op parameter.  Update calls to
20162         maybe_build_generic_op and maybe_push_res_to_seq.
20163         (fold_stmt_1): Update calls to gimple_simplify and
20164         replace_stmt_with_simplification.
20165         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20166         and gimple_simplified_result_is_gimple_val.
20167         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20168         gimple_simplify.
20169         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20170         with a gimple_match_op *.
20171         (vn_nary_build_or_lookup): Likewise.  Update call to
20172         vn_nary_build_or_lookup_1.
20173         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20174         gimple_match_op *.  Update calls to the gimple_resimplify routines
20175         and to gimple_simplified_result_is_gimple_val.
20176         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20177         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20178         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20179         (visit_nary_op): Likewise.
20180         (visit_reference_op_load): Likewise.
20182 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20184         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20185         modifier for printing the step amount.
20187 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
20189         PR target/78849
20190         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20191         types.
20193 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
20195         * doc/sourcebuild.texi (Endianness): New subsubsection.
20197 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20199         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20200         <prefetch_dynamic_strides>: New const bool field.
20201         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20202         prefetch_dynamic_strides.
20203         (exynosm1_prefetch_tune): Likewise.
20204         (thunderxt88_prefetch_tune): Likewise.
20205         (thunderx_prefetch_tune): Likewise.
20206         (thunderx2t99_prefetch_tune): Likewise.
20207         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20208         false.
20209         (aarch64_override_options_internal): Update to set
20210         PARAM_PREFETCH_DYNAMIC_STRIDES.
20211         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20212         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20213         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20214         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20215         prefetch-dynamic-strides setting.
20217 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20219         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20220         <minimum_stride>: New const int field.
20221         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20222         minimum_stride field defaulting to -1.
20223         (exynosm1_prefetch_tune): Likewise.
20224         (thunderxt88_prefetch_tune): Likewise.
20225         (thunderx_prefetch_tune): Likewise.
20226         (thunderx2t99_prefetch_tune): Likewise.
20227         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20228         <default_opt_level>: Set to 3.
20229         (aarch64_override_options_internal): Update to set
20230         PARAM_PREFETCH_MINIMUM_STRIDE.
20231         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20232         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20233         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20234         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20235         stride is constant and is below the minimum stride threshold.
20237 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20239         * config/arm/arm-cpus.in (mode26): Delete.
20240         (armv4): Delete mode26 reference.
20241         * config/arm/arm.c (arm_configure_build_target): Delete use of
20242         isa_bit_mode26.
20244 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20246         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20247         New insn pattern.
20248         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20249         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
20250         for non-SSE modes.
20251         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
20252         (floatunsdidf2): Ditto.
20254 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20256         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20257         (fixuns_trunc<mode>si2_avx512f): Ditto.
20258         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20259         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20260         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20262 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20264         PR rtl-optimization/79985
20265         * df-scan.c (df_insn_refs_collect): Remove special case for
20266         global registers and asm statements.
20268 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20270         * extend.texi (Global Register Variables): Rewrite the bullet list.
20271         Note that the register is available for allocation. Note that access
20272         via inline asm must use constraints. Add note about async-signal
20273         handlers. Remove paragraph about automagic register selection.
20275 2018-05-23  Richard Biener  <rguenther@suse.de>
20277         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20278         of fixed offset from memset VN.
20280 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
20282         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20283         first_interp field.
20284         (alloc_cand_and_find_basis): Initialize first_interp field.
20285         (slsr_process_mul): Modify first_interp field.
20286         (slsr_process_add): Likewise.
20287         (slsr_process_cast): Modify first_interp field for each new
20288         interpretation.
20289         (slsr_process_copy): Likewise.
20290         (dump_candidate): Dump first_interp field.
20291         (replace_mult_candidate): Process all interpretations, not just
20292         subsequent ones.
20293         (replace_rhs_if_not_dup): Likewise.
20294         (replace_one_candidate): Likewise.
20296 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
20298         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20299         Add new boolean.
20300         (aarch64_needs_frame_chain): New function.
20301         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20303 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
20305         PR target/84882
20306         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20307         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20308         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20309         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20310         as true for strict-align.
20311         (aarch64_can_inline_p): Perform checks even when callee has no
20312         attributes to check for strict alignment.
20313         * doc/extend.texi (AArch64 Function Attributes): Document
20314         no-strict-align.
20315         * doc/invoke.texi: (AArch64 Options): Likewise.
20317 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
20319         PR tree-optimization/85853
20320         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20321         the handling of the root of the node to...
20322         (vect_slp_analyze_node_operations_1): ...this new function,
20323         and run the whole thing with the child nodes' def types
20324         set according to their SLP node's def type.
20326 2018-05-23  Richard Biener  <rguenther@suse.de>
20328         PR middle-end/85874
20329         * tree-data-ref.c (create_runtime_alias_checks): Defer
20330         and ignore overflow warnings.
20332 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
20334         PR tree-optimization/85822
20335         * tree-vrp.c (is_masked_range_test): Fix handling of negative
20336         constants.
20338 2018-05-23  Richard Biener  <rguenther@suse.de>
20340         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20341         memset constants via native_interpret_expr.
20343 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
20345         PR target/85345
20346         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
20347         attribute.
20348         (cgraph_node::create_alias): Likewise.
20349         (cgraph_node::get_availability): Check ifunc_resolver instead
20350         of looking up ifunc attribute.
20351         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
20352         * varasm.c (do_assemble_alias): Likewise.
20353         (assemble_alias): Likewise.
20354         (default_binds_local_p_3): Likewise.
20355         * cgraph.h (cgraph_node): Add ifunc_resolver.
20356         (cgraph_node::only_called_directly_or_aliased_p): Return false
20357         for IFUNC resolver.
20358         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
20359         attribute.
20360         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
20361         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
20362         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
20363         instead of looking up ifunc attribute.
20365 2018-05-22  Luis Machado  <luis.machado@linaro.org>
20367         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
20369 2018-05-22  Martin Sebor  <msebor@redhat.com>
20371         PR middle-end/85359
20372         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
20373         only when expasion succeeds.
20374         (expand_builtin_strcmp): Same.
20375         (expand_builtin_strncmp): Same.
20377 2018-05-22  Martin Sebor  <msebor@redhat.com>
20379         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
20381 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
20382             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20384         * config/aarch64/aarch64-ldpstp.md: Replace uses of
20385         aarch64_mem_pair_operand with memory_operand and delete operand swapping
20386         code.
20387         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20388         Add check for legitimate_address.
20389         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
20390         (aarch64_swap_ldrstr_operands): New.
20391         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
20392         Define prototype.
20394 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
20395             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20397         * config/aarch64/aarch64.md: New patterns to generate stp
20398         and ldp.
20399         (store_pair_sw, store_pair_dw): New patterns to generate stp for
20400         single words and double words.
20401         (load_pair_sw, load_pair_dw): Likewise.
20402         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
20403         Delete.
20404         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
20405         Delete.
20406         * config/aarch64/aarch64-ldpstp.md: Modify peephole
20407         for different mode ldpstp and add peephole for merged zero stores.
20408         Likewise for loads.
20409         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20410         Add size check.
20411         (aarch64_gen_store_pair): Rename calls to match new patterns.
20412         (aarch64_gen_load_pair): Rename calls to match new patterns.
20413         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
20414         (load_pair<DREG:mode><DREG2:mode>): ... This.
20415         (store_pair<mode>): Rename to...
20416         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
20417         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
20418         New mode iterators.
20419         (V_INT_EQUIV): Handle SImode.
20420         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
20421         New predicate.
20423 2018-05-22  Martin Sebor  <msebor@redhat.com>
20425         PR c/85623
20426         * calls.c (maybe_warn_nonstring_arg): Use string length to set
20427         or ajust the presumed bound on an operation to avoid unnecessary
20428         warnings.
20430 2018-05-22  Martin Sebor  <msebor@redhat.com>
20432         PR tree-optimization/85826
20433         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
20434         assuming that a DECL necesarily has a constant size.
20436 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
20438         PR middle-end/85862
20439         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
20441 2018-05-22  Richard Biener  <rguenther@suse.de>
20443         PR tree-optimization/85834
20444         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
20445         non-constant and non-zero memset arguments.
20447 2018-05-22  Martin Liska  <mliska@suse.cz>
20449         PR ipa/85607
20450         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
20452 2018-05-22  Richard Biener  <rguenther@suse.de>
20454         PR tree-optimization/85863
20455         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
20456         comparisons when vectype is specified.
20457         (vectorizable_condition): Do not specify vectype for
20458         vect_is_simple_cond when SLP vectorizing.
20460 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
20462         PR target/85657
20463         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
20464         define __ibm128 as long double.
20465         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
20466         as a distinct type when IEEE 128-bit support is enabled.
20467         (init_float128_ieee): Fix up conversions between IFmode and IEEE
20468         128-bit types to use the correct functions.
20469         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
20470         convert between 128-bit floating point types that have different
20471         modes but the same representation, instead of using gen_lowpart to
20472         makean alias.
20473         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
20474         KFmode.
20475         (IFKF_reg): New attributes to give the register constraints for
20476         IFmode and KFmode.
20477         (extend<mode>tf2_internal): New insns to mark an explicit
20478         conversion between 128-bit floating point types that have a
20479         different mode but share the same representation.
20481 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
20483         PR tree-optimization/85814
20484         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
20485         a null return from get_strinfo when unsharing the next
20486         strinfo in the chain.
20488 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
20490         PR gcc/84923
20491         * varasm.c (weak_finish): Clean up weak_decls.
20493 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20495         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
20496         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
20497         UNSPEC_UADALP values.
20498         * config/aarch64/iterators.md (ABAL): New int iterator.
20499         (ABDL2): Likewise.
20500         (ADALP): Likewise.
20501         (sur): Add mappings for the above.
20502         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
20503         New define_insn.
20504         (aarch64_<sur>abal<mode>_4): Likewise.
20505         (aarch64_<sur>adalp<mode>_3): Likewise.
20506         (<sur>sadv16qi): New define_expand.
20508 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
20510         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
20511         (*movdf_internal): Ditto.
20512         (*rcpsf2_sse): Ditto.
20513         (*rsqrtsf2_sse): Ditto.
20514         (*sqrt<mode>2_sse): Ditto.
20516 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
20518         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
20519         eor3q<mode>4.
20520         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
20521         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
20522         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
20523         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
20524         vbcaxq_s64): New.
20525         * config/aarch64/arm_neon.h: Likewise.
20526         * config/aarch64/iterators.md (VQ_I): New.
20528 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
20530         * config.gcc: Add arc/t-multilib-linux to tmake_file for
20531         arc*-*-linux*.
20532         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
20533         MULTILIB_DIRNAMES
20535 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
20537         * config/nds32/constraints.md (S): New constraint.
20538         * config/nds32/nds32.md (call_internal): Use constraint S.
20539         (call_value_internal): Likewise.
20540         (sibcall_internal): Likewise.
20541         (sibcall_value_internal): Likewise.
20543 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
20544             Chung-Ju Wu  <jasonwucj@gmail.com>
20546         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
20547         into consideration.
20549 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
20550             Chung-Ju Wu  <jasonwucj@gmail.com>
20552         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
20553         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
20554         (nds32_rtx_costs_impl): Simplify.
20555         (nds32_address_cost_impl): Simplify.
20556         (nds32_init_rtx_costs): New function.
20557         (nds32_rtx_costs_speed_prefer): Likewise.
20558         (nds32_rtx_costs_size_prefer): Likewise.
20559         (nds32_address_cost_speed_prefer): Likewise.
20560         (nds32_address_cost_speed_fwprop): Likewise.
20561         (nds32_address_cost_size_prefer): Likewise.
20562         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
20563         * config/nds32/nds32.c (nds32_option_override): Use
20564         nds32_init_rtx_costs function.
20566 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
20568         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
20569         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
20570         (TARGET_PIPELINE_N8): Likewise.
20571         (TARGET_PIPELINE_N10): Likewise.
20572         (TARGET_PIPELINE_N13): Likewise.
20573         (TARGET_PIPELINE_GRAYWOLF): Likewise.
20575 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
20577         * config/nds32/nds32-fpu.md: Update copyright year.
20579 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20581         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
20583 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20585         * config/nds32/nds32.c
20586         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
20587         * config/nds32/nds32.opt (minline-asm-r15): New option.
20589 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20591         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
20592         MASK_HW_ABS.
20593         * config/nds32/nds32.md (abssi2): New pattern.
20595 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
20597         * config/i386/i386.md (rex64namesuffix): New mode attribute.
20598         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
20599         Merge insn pattern from sse_cvtsi2ss<round_name> and
20600         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
20601         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
20602         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
20603         using SWI48 mode iterator.
20604         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
20605         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
20606         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
20607         pattern from sse_cvttss2si<round_saeonly_name>
20608         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
20609         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
20610         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
20611         using SWI48 mode iterator.
20612         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
20613         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
20614         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
20615         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
20616         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
20617         using SWI48 mode iterator.
20618         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
20619         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
20620         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
20621         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
20622         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
20623         SWI48 mode iterator.
20624         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
20625         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
20626         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
20627         pattern from sse_cvttsd2si<round_saeonly_name>
20628         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
20630 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20632         * config/nds32/nds32-md-auxiliary.c
20633         (nds32_valid_smw_lwm_base_p): Refine.
20634         (nds32_output_smw_single_word): Refine.
20635         (nds32_output_smw_double_word): New.
20636         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
20638 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20640         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
20641         (nds32_output_stack_pop): Refine.
20642         (nds32_expand_unaligned_load): Refine.
20643         (nds32_expand_unaligned_store): Refine.
20645 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
20646             Chung-Ju Wu  <jasonwucj@gmail.com>
20648         * config/nds32/constants.md: Add TP_REGNUM constant.
20649         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
20650         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
20651         UNSPEC_ADD32.
20652         * config/nds32/nds32-doubleword.md: Consider flag_pic.
20653         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
20654         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
20655         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
20656         and PIC code generation.
20657         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
20658         code generation.
20659         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
20660         optimization.
20661         * config/nds32/nds32.md: Support TLS and PIC.
20662         * config/nds32/nds32.c: Support TLS and PIC.
20663         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
20664         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
20665         predicate.
20667 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20669         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
20670         mode with E_ prefix.
20672 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
20673             Chung-Ju Wu  <jasonwucj@gmail.com>
20675         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
20676         * config/nds32/nds32-md-auxiliary.c
20677         (symbolic_reference_mentioned_p): New.
20678         (nds32_legitimize_ict_address): New.
20679         (nds32_expand_ict_move): New.
20680         (nds32_indirect_call_referenced_p): New.
20681         (nds32_symbol_binds_local_p): Delete.
20682         (nds32_long_call_p): Modify.
20683         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
20684         * config/nds32/nds32-protos.h
20685         (symbolic_reference_mentioned_p): Declare.
20686         (nds32_legitimize_ict_address): Declare.
20687         (nds32_expand_ict_move): Declare.
20688         (nds32_indirect_call_referenced_p): Declare.
20689         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
20690         (nds32_relax_group): Use nds32_ict_const_p as condition.
20691         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
20692         (nds32_asm_file_start): Output ict_model directive in asm code.
20693         (nds32_legitimate_address_p): Consider indirect call.
20694         (nds32_print_operand): Consider indirect call.
20695         (nds32_print_operand_address): Consider indirect call.
20696         (nds32_insert_attributes): Handle "indirect_call" attribute.
20697         (TARGET_LEGITIMATE_ADDRESS_P): Define.
20698         (TARGET_LEGITIMATE_CONSTANT_P): Define.
20699         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
20700         (TARGET_DELEGITIMIZE_ADDRESS): Define.
20701         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
20702         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
20703         (TARGET_ICT_MODEL_SMALL): Define.
20704         (TARGET_ICT_MODEL_LARGE): Define.
20705         * config/nds32/nds32.md (movsi): Consider ict model.
20706         (call, call_value): Consider ict model.
20707         (sibcall, sibcall_value): Consider ict model.
20708         * config/nds32/nds32.opt (mict-model): New option.
20709         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
20710         model.
20712 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
20713             Monk Chiang  <sh.chiang04@gmail.com>
20714             Jim Wilson <jimw@sifive.com>
20716         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
20717         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
20718         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
20719         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
20720         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
20721         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
20722         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
20723         compute save_libcall_adjustment properly.
20724         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
20725         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
20726         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
20727         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
20728         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
20729         (ABI_SPEC): Handle mabi=ilp32e.
20730         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
20731         (RVE): Add RVE mask.
20732         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
20733         <-march>: Add rv32e as an example.
20735 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
20737         PR c++/82899
20738         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
20739         (intra_create_variable_infos): Handle C++ constructors.
20741 2018-05-18  Martin Liska  <mliska@suse.cz>
20743         * passes.def: Remove a redundant pass.
20745 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
20747         PR bootstrap/85838
20748         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
20750 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20752         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
20753         (ARMv4): Update.
20754         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
20755         (ARMv6m): Update.
20756         (armv2, armv2a, armv3, armv3m): Delete architectures.
20757         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
20758         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
20759         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
20760         Delete cpus.
20761         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
20762         (*mulsidi3adddi): Likewise.
20763         (mulsidi3): Likewise.
20764         (*mulsidi3_nov6): Likewise.
20765         (umulsidi3): Likewise.
20766         (umulsidi3_nov6): Likewise.
20767         (umaddsidi4): Likewise.
20768         (*umulsidi3adddi): Likewise.
20769         (smulsi3_highpart): Likewise.
20770         (*smulsi3_highpart_nov6): Likewise.
20771         (umulsi3_highpart): Likewise.
20772         (*umulsi3_highpart_nov6): Likewise.
20773         * config/arm/arm.h (arm_arch3m): Delete.
20774         * config/arm/arm.c (arm_arch3m): Delete.
20775         (arm_option_override_internal): Update armv3-related comment.
20776         (arm_configure_build_target): Delete use of isa_bit_mode32.
20777         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
20778         (arm_rtx_costs_internal): Delete check of arm_arch3m.
20779         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
20780         (mulsa3): Likewise.
20781         (mulusa3): Likewise.
20782         * config/arm/arm-protos.h (arm_arch3m): Delete.
20783         * config/arm/arm-tables.opt: Regenerate.
20784         * config/arm/arm-tune.md: Likewise.
20785         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
20786         deleted architectures.
20788 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20790         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
20791         (armv5t, armv5te): New features.
20792         (ARMv5, ARMv5e): Delete fgroups.
20793         (ARMv5t, ARMv5te): Adjust for above changes.
20794         (ARMv6m): Likewise.
20795         (armv5, armv5e): Delete arches.
20796         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
20797         arm_arch5.
20798         (*call_reg_arm): Likewise.
20799         (*call_value_reg_armv5): Likewise.
20800         (*call_value_reg_arm): Likewise.
20801         (*call_symbol): Likewise.
20802         (*call_value_symbol): Likewise.
20803         (*sibcall_insn): Likewise.
20804         (*sibcall_value_insn): Likewise.
20805         (clzsi2): Likewise.
20806         (prefetch): Likewise.
20807         (define_split and define_peephole2 dependent on arm_arch5):
20808         Likewise.
20809         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
20810         arm_arch5e.
20811         (TARGET_ARM_QBIT): Likewise.
20812         (TARGET_DSP_MULTIPLY): Likewise.
20813         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
20814         (arm_arch5, arm_arch5e): Delete.
20815         (arm_arch5t, arm_arch5te): Declare.
20816         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
20817         (arm_arch5t): Declare.
20818         (arm_option_reconfigure_globals): Update for the above.
20819         (arm_options_perform_arch_sanity_checks): Update comment, replace
20820         use of arm_arch5 with arm_arch5t.
20821         (use_return_insn): Likewise.
20822         (arm_emit_call_insn): Likewise.
20823         (output_return_instruction): Likewise.
20824         (arm_final_prescan_insn): Likewise.
20825         (arm_coproc_builtin_available): Likewise.
20826         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
20827         arm_arch5e with arm_arch5t and arm_arch5te.
20828         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
20829         (arm_arch5t, arm_arch5te): Declare.
20830         * config/arm/arm-tables.opt: Regenerate.
20831         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
20832         * config/arm/t-multilib: Likewise.
20833         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
20834         instead of arm_arch5.
20835         (*call_reg_thumb1): Likewise.
20836         (*call_value_reg_thumb1_v5): Likewise.
20837         (*call_value_reg_thumb1): Likewise.
20838         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
20839         unreachable path.
20840         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
20842 2018-05-18  Martin Liska  <mliska@suse.cz>
20844         PR gcov-profile/84846
20845         * doc/gcov.texi: Document -t option of gcov tool.
20847 2018-05-18  Martin Liska  <mliska@suse.cz>
20849         PR gcov-profile/84846
20850         * gcov.c (print_usage): Add new -t option.
20851         (process_args): Handle the option.
20852         (generate_results): Use stdout as output when requested by
20853         the option.
20855 2018-05-18  Martin Liska  <mliska@suse.cz>
20857         PR gcov-profile/84846
20858         * coverage.c (coverage_init): Write PWD to .gcno file.
20859         * doc/gcov.texi: Document how working directory is printed.
20860         * gcov-dump.c (dump_gcov_file): Print PWD.
20861         * gcov.c (output_intermediate_file): Likewise.
20862         (read_graph_file): Read PWD string.
20863         (output_lines): Print PWD.
20865 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20867         PR middle-end/85817
20868         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
20869         for retval and return false if all args to phi are zero.
20871 2018-05-18  Richard Biener  <rguenther@suse.de>
20873         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
20874         method.
20875         (evrp_dom_walker::before_dom_children): Call it.
20877 2018-05-18  Richard Biener  <rguenther@suse.de>
20879         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
20880         results when processing array refs with variable index.
20882 2018-05-18  Toon Moene  <toon@moene.org>
20884         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
20885         directly after that of -floop-interchange. Indicate that both
20886         options are enabled by default when specifying -O3.
20888 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20890         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
20891         iterator.  Delete separate integer-mode vec_set<mode> expander.
20892         (aarch64_simd_vec_setv2di): Delete.
20893         (vec_setv2di): Delete.
20894         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
20895         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
20896         the "w, r" alternative.
20898 2018-05-18  Martin Liska  <mliska@suse.cz>
20900         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
20901         * tree-pass.h (make_pass_lower_switch_O0): New function.
20902         * tree-switch-conversion.c (node_has_low_bound): Remove.
20903         (node_has_high_bound): Likewise.
20904         (node_is_bounded): Likewise.
20905         (class pass_lower_switch): Make it a template type and create
20906         two instances.
20907         (pass_lower_switch::execute): Add template argument.
20908         (make_pass_lower_switch): New function.
20909         (make_pass_lower_switch_O0): New function.
20910         (do_jump_if_equal): Remove.
20911         (emit_case_nodes): Simplify to just handle all 3 cases and leave
20912         all the hard work to tree optimization passes.
20914 2018-05-18  Martin Liska  <mliska@suse.cz>
20916         * dbgcnt.c (limit_low): Renamed from limit.
20917         (limit_high): New variable.
20918         (dbg_cnt_is_enabled): Check for upper limit.
20919         (dbg_cnt): Adjust dumping.
20920         (dbg_cnt_set_limit_by_index): Add new argument for high
20921         value.
20922         (dbg_cnt_set_limit_by_name): Likewise.
20923         (dbg_cnt_process_single_pair): Parse new format.
20924         (dbg_cnt_process_opt): Use strtok.
20925         (dbg_cnt_list_all_counters): Remove 'value' and add
20926         'limit_high'.
20927         * doc/invoke.texi: Document changes.
20929 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
20931         * doc/sourcebuild.texi (scalar_all_fma): Document.
20932         * tree.def (FMA_EXPR): Delete.
20933         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20934         * internal-fn.c (ternary_direct): New macro.
20935         (expand_ternary_optab_fn): Likewise.
20936         (direct_ternary_optab_supported_p): Likewise.
20937         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20938         * builtins.c (fold_builtin_fma): Delete.
20939         (fold_builtin_3): Don't call it.
20940         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20941         * expr.c (expand_expr_real_2): Likewise.
20942         * fold-const.c (operand_equal_p): Likewise.
20943         (fold_ternary_loc): Likewise.
20944         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20945         * gimple.c (DEFTREECODE): Likewise.
20946         * gimplify.c (gimplify_expr): Likewise.
20947         * optabs-tree.c (optab_for_tree_code): Likewise.
20948         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20949         * tree-eh.c (operation_could_trap_p): Likewise.
20950         (stmt_could_throw_1_p): Likewise.
20951         * tree-inline.c (estimate_operator_cost): Likewise.
20952         * tree-pretty-print.c (dump_generic_node): Likewise.
20953         (op_code_prio): Likewise.
20954         * tree-ssa-loop-im.c (stmt_cost): Likewise.
20955         * tree-ssa-operands.c (get_expr_operands): Likewise.
20956         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20957         * fold-const-call.h (fold_fma): Delete.
20958         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20959         CFN_FNMA and CFN_FNMS.
20960         (fold_fma): Delete.
20961         * genmatch.c (combined_fn): New enum.
20962         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20963         (commutative_op): New function.
20964         (commutate): Use it.  Handle more than 2 operands.
20965         (dt_operand::gen_gimple_expr): Use commutative_op.
20966         (parser::parse_expr): Allow :c to be used with non-binary
20967         operators if the commutative operand is known.
20968         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20969         CFN_FMS, CFN_FNMA and CFN_FNMS.
20970         (backprop::process_assign_use): Remove FMA_EXPR handling.
20971         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20972         (gen_hsa_fma): New function.
20973         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20974         IFN_FNMA and IFN_FNMS.
20975         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20976         * gimple-fold.h (follow_all_ssa_edges): Declare.
20977         * gimple-fold.c (follow_all_ssa_edges): New function.
20978         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20979         gimple_build interface and use follow_all_ssa_edges to fold the result.
20980         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20981         instead of checking for optabs directly.
20982         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20983         rather than FMA_EXPRs.
20984         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20985         call to IFN_FMA instead of an FMA_EXPR.
20987 2018-05-17  Jim Wilson  <jimw@sifive.com>
20989         * expr.c (do_tablejump): When converting index to Pmode, if we have a
20990         sign extended promoted subreg, and the range does not have the sign bit
20991         set, then do a sign extend.
20993         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20994         test, check for sign extended subreg and/or constant operands, and
20995         do a sign extend in that case.
20997 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
20999         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
21000         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
21001         Add untyped.
21002         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
21003         Change logics_shift_reg to logics_shift_imm.
21004         (thunderx2t99_fp_loadpair_basic): Delete.
21005         (thunderx2t99_fp_storepair_basic): Delete.
21006         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
21007         (thunderx2t99_asimd_polynomial): Delete.
21008         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
21009         and neon_fp_mul_d_scalar_q.
21010         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
21011         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
21012         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
21013         (thunderx2t99_asimd_lut): Add missing tbl types.
21014         (thunderx2t99_asimd_ext): Delete.
21015         (thunderx2t99_asimd_load1_1_mult): Delete.
21016         (thunderx2t99_asimd_load1_2_mult): Delete.
21017         (thunderx2t99_asimd_load1_ldp): New.
21018         (thunderx2t99_asimd_load1): New.
21019         (thunderx2t99_asimd_load2): Add missing *load2* types.
21020         (thunderx2t99_asimd_load3): New.
21021         (thunderx2t99_asimd_load4): New.
21022         (thunderx2t99_asimd_store1_1_mult): Delete.
21023         (thunderx2t99_asimd_store1_2_mult): Delete.
21024         (thunderx2t99_asimd_store2_mult): Delete.
21025         (thunderx2t99_asimd_store2_onelane): Delete.
21026         (thunderx2t99_asimd_store_stp): New.
21027         (thunderx2t99_asimd_store1): New.
21028         (thunderx2t99_asimd_store2): New.
21029         (thunderx2t99_asimd_store3): New.
21030         (thunderx2t99_asimd_store4): New.
21032 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
21034         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
21035         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
21037 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
21038             Segher Boessenkool  <segher@kernel.crashing.org>
21040         PR target/85698
21041         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
21042         operand.
21044 2018-05-17  Richard Biener  <rguenther@suse.de>
21046         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
21047         for pruning loop and prune defs feeding only already visited PHIs.
21049 2018-05-17  Richard Biener  <rguenther@suse.de>
21051         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
21053 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
21054             Richard Biener  <rguenther@suse.de>
21056         PR tree-optimization/85793
21057         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
21058         for VMAT_ELEMENTWISE.
21060 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
21062         * internal-fn.h (lookup_internal_fn): Declare
21063         * internal-fn.c (lookup_internal_fn): New function.
21064         * gimple.c (gimple_build_call_from_tree): Handle calls to
21065         internal functions.
21066         * gimple-pretty-print.c (dump_gimple_call): Print "." before
21067         internal function names.
21068         * tree-pretty-print.c (dump_generic_node): Likewise.
21069         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
21071 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
21073         * gimple-fold.h (gimple_build): Make the function forms take
21074         combined_fn rather than built_in_function.
21075         (gimple_simplify): Likewise.
21076         * gimple-match-head.c (gimple_simplify): Likewise.
21077         * gimple-fold.c (gimple_build): Likewise.
21078         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
21079         rather than gimple_build_call_internal.
21080         (get_initial_defs_for_reduction): Likewise.
21081         (vect_create_epilog_for_reduction): Likewise.
21082         (vectorizable_live_operation): Likewise.
21084 2018-05-17  Martin Liska  <mliska@suse.cz>
21086         * gimple-ssa-sprintf.c (format_directive): Do not use
21087         space in between 'G_' and '('.
21089 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
21091         PR target/85323
21092         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
21093         even if the mask is not all ones.
21095         PR target/85323
21096         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
21097         vector.
21098         (ix86_gimple_fold_builtin): Likewise.
21100         PR target/85323
21101         * config/i386/i386.c: Include tree-vector-builder.h.
21102         (ix86_vector_shift_count): New function.
21103         (ix86_fold_builtin): Fold shift builtins by scalar count.
21104         (ix86_gimple_fold_builtin): Likewise.
21106         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
21107         _mm512_setzero): New intrinsics.
21109 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
21110             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21112         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
21113         code generation for cases where splatting a value is not useful.
21114         * simplify-rtx.c (simplify_ternary_operation): Simplify
21115         vec_merge across a vec_duplicate and a paradoxical subreg forming
21116         a vector mode to a vec_concat.
21118 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
21120         * config.gcc: Support "goldmont-plus".
21121         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21122         "goldmont-plus".
21123         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21124         PROCESSOR_GOLDMONT_PLUS.
21125         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21126         (processor_target_table): Add "goldmont-plus".
21127         (PTA_GOLDMONT_PLUS): Define.
21128         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21129         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21130         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21131         (fold_builtin_cpu): Add "goldmont-plus".
21132         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21133         (ix86_option_override_internal): Add "goldmont-plus".
21134         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21135         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21136         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21137         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21139 2018-05-17  Richard Biener  <rguenther@suse.de>
21141         PR tree-optimization/85757
21142         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21143         remove defs that only feed that PHI from further processing.
21145 2018-05-16  Jim Wilson  <jimw@sifive.com>
21147         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21148         asterisk to name.
21149         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21151 2018-05-16  Mark Wielaard  <mark@klomp.org>
21153         * dwarf2out.c (count_index_strings): New function.
21154         (output_indirect_strings): Call count_index_strings and generate
21155         header for dwarf_version >= 5.
21157 2018-05-16  Mark Wielaard  <mark@klomp.org>
21159         * dwarf2out.c (dwarf_FORM): New function.
21160         (set_indirect_string): Use dwarf_FORM.
21161         (reset_indirect_string): Likewise.
21162         (size_of_die): Likewise.
21163         (value_format): Likewise.
21164         (output_die): Likewise.
21165         (add_skeleton_AT_string): Likewise.
21166         (output_macinfo_op): Likewise.
21167         (index_string): Likewise.
21168         (output_index_string_offset): Likewise.
21169         (output_index_string): Likewise.
21170         (count_index_strings): Likewise.
21172 2018-05-16  Carl Love  <cel@us.ibm.com>
21174         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21175         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21177 2018-05-16  Martin Jambor  <mjambor@suse.cz>
21179         * ipa-prop.c (ipa_free_all_edge_args): Remove.
21180         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21182 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
21184         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21185         (fnma<mode>4): Likewise.
21186         (fms<mode>4): Likewise.
21187         (fnms<mode>4): Likewise.
21188         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21189         (aarch64_fnma<mode>4): Likewise.
21190         (aarch64_fms<mode>4): Likewise.
21191         (aarch64_fnms<mode>4): Likewise.
21192         (aarch64_fnmadd<mode>4): Likewise.
21194 2018-05-16  Jason Merrill  <jason@redhat.com>
21196         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
21198 2018-05-16  Richard Biener  <rguenther@suse.de>
21200         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21201         (dump_stmt_cost): Declare.
21202         (add_stmt_cost): Dump cost we add.
21203         (add_stmt_costs): New function.
21204         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21205         No longer exported.
21206         (vect_analyze_stmt): Adjust prototype.
21207         (vectorizable_condition): Likewise.
21208         (vectorizable_live_operation): Likewise.
21209         (vectorizable_reduction): Likewise.
21210         (vectorizable_induction): Likewise.
21211         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21212         cost vector to pass to vectorizable_ and record afterwards.
21213         (vect_model_reduction_cost): Take cost vector argument and adjust.
21214         (vect_model_induction_cost): Likewise.
21215         (vectorizable_reduction): Likewise.
21216         (vectorizable_induction): Likewise.
21217         (vectorizable_live_operation): Likewise.
21218         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21219         SLP_TREE_NUMBER_OF_VEC_STMTS.
21220         (vect_analyze_slp_cost_1): Remove.
21221         (vect_analyze_slp_cost): Likewise.
21222         (vect_slp_analyze_node_operations): Take visited args and
21223         a target cost vector.  Avoid processing already visited stmt sets.
21224         (vect_slp_analyze_operations): Use a local cost vector to gather
21225         costs and register those of non-discarded instances.
21226         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21227         (vect_schedule_slp_instance): Remove copying of
21228         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
21229         zero.
21230         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21231         adding cost.  Record cost entry location.
21232         (vect_prologue_cost_for_slp_op): Function to compute cost of
21233         a constant or invariant generated for SLP vect in the prologue,
21234         split out from vect_analyze_slp_cost_1.
21235         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
21236         (vect_model_promotion_demotion_cost): Likewise.
21237         (vect_model_store_cost): Likewise, make static.
21238         (vect_model_load_cost): Likewise.
21239         (vectorizable_bswap): Add cost vector arg and adjust.
21240         (vectorizable_call): Likewise.
21241         (vectorizable_simd_clone_call): Likewise.
21242         (vectorizable_conversion): Likewise.
21243         (vectorizable_assignment): Likewise.
21244         (vectorizable_shift): Likewise.
21245         (vectorizable_operation): Likewise.
21246         (vectorizable_store): Likewise.
21247         (vectorizable_load): Likewise.
21248         (vectorizable_condition): Likewise.
21249         (vectorizable_comparison): Likewise.
21250         (can_vectorize_live_stmts): Likewise.
21251         (vect_analyze_stmt): Likewise.
21252         (vect_transform_stmt): Adjust calls to vectorizable_*.
21253         * tree-vectorizer.c: Include gimple-pretty-print.h.
21254         (dump_stmt_cost): New function.
21256 2018-05-16  Richard Biener  <rguenther@suse.de>
21258         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21259         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21260         * tree-ssa-dse.c: Include tree-ssa-loop.h.
21261         (check_name): New callback.
21262         (dse_classify_store): Track cycles via a visited bitmap of PHI
21263         defs and simplify handling of in-loop and across loop dead stores
21264         and properly fail for loop-variant refs.  Handle byte-tracking with
21265         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21266         limiting the walk.
21268 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
21270         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21271         (vect_get_mask_type_for_stmt): Likewise.
21272         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21273         split out from...
21274         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
21275         to determine the statement's vector type and the vector type that
21276         should be used for calculating nunits.  Deal with cases in which
21277         the type has to be deferred.
21278         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21279         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21280         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21281         (vect_determine_vf_for_stmt): New functions, split out from...
21282         (vect_determine_vectorization_factor): ...here.
21283         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21284         (vect_get_mask_type_for_stmt): New functions, split out from
21285         vect_determine_vectorization_factor.
21287 2018-05-16  Richard Biener  <rguenther@suse.de>
21289         * tree-cfg.c (verify_gimple_assign_ternary): Properly
21290         verify the [VEC_]COND_EXPR embedded comparison.
21292 2018-05-15  Martin Sebor  <msebor@redhat.com>
21294         PR tree-optimization/85753
21295         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21296         RECORD_TYPE in addition to ARRAY_TYPE.
21298 2018-05-15  Martin Sebor  <msebor@redhat.com>
21300         PR middle-end/85643
21301         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21303 2018-05-15  Richard Biener  <rguenther@suse.de>
21305         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21306         add by_clobber_p one.  Change algorithm to collect all defs
21307         representing uses we need to walk and try reducing them to
21308         a single one before failing.
21309         (dse_dom_walker::dse_optimize_stmt): Adjust.
21311 2018-05-13  Mark Wielaard  <mark@klomp.org>
21313         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21314         (size_of_loc_descr): Likewise.
21315         (output_loc_operands): Likewise.
21316         (output_loc_operands_raw): Likewise.
21317         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21318         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21319         (hash_loc_operands): Likewise.
21320         (compare_loc_operands): Likewise.
21322 2018-05-14  Mark Wielaard  <mark@klomp.org>
21324         * dwarf2out.c (count_index_addrs): New function.
21325         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21327 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21329         PR tree-optimization/83648
21330         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21331         return value as malloc candidate.
21333 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21335         PR ipa/85734
21336         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
21337         param as true in call to suggest_attribute.
21339 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
21341         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
21342         -mreadonly-in-sdata.
21344 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21346         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
21347         New pattern.
21348         (aarch64_crypto_aesd_fused): Likewise.
21350 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
21352         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
21353         (movsi_aarch64): Likewise.
21354         (load_pairsi): Likewise.
21355         (load_pairdi): Likewise.
21356         (store_pairsi): Likewise.
21357         (store_pairdi): Likewise.
21358         (load_pairsf): Likewise.
21359         (load_pairdf): Likewise.
21360         (store_pairsf): Likewise.
21361         (store_pairdf): Likewise.
21362         (zero_extend): Likewise.
21363         (trunc): Swap alternatives.
21364         (fcvt_target): Add '?' to prefer w over r.
21366 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
21368         PR target/85756
21369         * config/i386/i386.md: Disallow non-commutative arithmetics in
21370         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
21371         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
21372         in the peephole2 before it.
21374 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
21376         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
21377         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
21378         (ix86_handle_option): Handle -mcldemote.
21379         * config.gcc: New header.
21380         * config/i386/cldemoteintrin.h: New file.
21381         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
21382         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21383         -mcldemote.
21384         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21385         OPTION_MASK_ISA_CLDEMOTE.
21386         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
21387         (ix86_valid_target_attribute_inner_p): Ditto.
21388         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
21389         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
21390         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
21391         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
21392         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
21393         (cldemote): New.
21394         * config/i386/i386.opt: Add -mcldemote.
21395         * config/i386/x86intrin.h: New header.
21396         * doc/invoke.texi: Add -mcldemote.
21398 2018-05-14  Richard Biener  <rguenther@suse.de>
21400         * doc/match-and-simplify.texi: Adjust :s documentation.
21402 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
21404         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
21405         intended memcpy size.
21406         (REORDER_45): Likewise.
21408 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
21410         * sort.cc: New file.
21411         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
21412         * vec.c (qsort_chk): Use gcc_qsort.
21413         * Makefile.in (OBJS-libcommon): Add sort.o.
21414         (build/sort.o): New target.  Use it...
21415         (BUILD_RTL): ... here, and...
21416         (build/gencfn-macros): ... here, and...
21417         (build/genmatch): ... here.
21419 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
21420             Chung-Ju Wu  <jasonwucj@gmail.com>
21422         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
21423         * config/nds32/nds32-graywolf.md: New file.
21424         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
21425         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
21426         pipeline.
21427         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
21428         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
21429         * config/nds32/nds32.md (pipeline_model): Add graywolf.
21430         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
21431         * config/nds32/pipelines.md: Include n15 settings.
21433 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
21434             Chung-Ju Wu  <jasonwucj@gmail.com>
21436         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
21437         * config/nds32/nds32-n13.md: New file.
21438         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
21439         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
21440         pipeline.
21441         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
21442         * config/nds32/nds32.md (pipeline_model): Add n13.
21443         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
21444         * config/nds32/pipelines.md: Include n13 settings.
21446 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
21447             Chung-Ju Wu  <jasonwucj@gmail.com>
21449         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
21450         * config/nds32/nds32-n10.md: New file.
21451         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
21452         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
21453         pipeline.
21454         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
21455         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
21456         * config/nds32/nds32.md (pipeline_model): Add n10.
21457         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
21458         * config/nds32/pipelines.md: Include n10 settings.
21460 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
21461             Kito Cheng  <kito.cheng@gmail.com>
21462             Chung-Ju Wu  <jasonwucj@gmail.com>
21464         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
21465         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21466         Add enum values for DSP extension instructions.
21467         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
21468         New constraints.
21469         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
21470         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
21471         New code iterators.
21472         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
21473         * config/nds32/nds32-dspext.md: New file for DSP implementation.
21474         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
21475         * config/nds32/nds32-intrinsic.md: Likewise.
21476         * config/nds32/nds32_intrinsic.h: Likewise.
21477         * config/nds32/nds32-md-auxiliary.c: Likewise.
21478         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
21479         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
21480         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
21481         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
21482         * config/nds32/nds32-protos.h: New declarations for DSP extension.
21483         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
21484         TYPE_DMAC in switch statement.
21485         * config/nds32/nds32.c: New checking and implementation for DSP
21486         extension instructions.
21487         * config/nds32/nds32.h: Likewise.
21488         * config/nds32/nds32.md: Likewise.
21489         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
21490         * config/nds32/predicates.md: Implement new predicates for DSP
21491         extension.
21493 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
21495         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
21496         Reformat alternatives and attributes so it is easier to identify
21497         which constraints/attributes go with which instruction.
21498         (mov<mode>_hardfloat32, FMOVE64): Likewise.
21499         (mov<mode>_softfloat32, FMOVE64): Likewise.
21500         (mov<mode>_hardfloat64, FMOVE64): Likewise.
21501         (mov<mode>_softfloat64, FMOVE64): Likewise.
21503 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21505         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21506         subsection.
21507         (Basic PowerPC Built-in Functions): The new name of the
21508         subsection previously known as "PowerPC Built-in Functions".
21509         (Basic PowerPC Built-in Functions Available on all Configurations):
21510         New subsubsection.
21511         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
21512         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
21513         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
21514         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
21516 2018-05-11  Martin Jambor  <mjambor@suse.cz>
21518         PR ipa/85655
21519         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
21520         single const.
21522 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
21524         PR target/85733
21525         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
21527 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
21529         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
21530         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
21531         (ix86_handle_option): Handle -mwaitpkg.
21532         * config.gcc: New header.
21533         * config/i386/cpuid.h (bit_WAITPKG): New bit.
21534         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
21535         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
21536         function type.
21537         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21538         OPTION_MASK_ISA_WAITPKG.
21539         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
21540         (ix86_option_override_internal): Add PTA_WAITPKG.
21541         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
21542         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
21543         IX86_BUILTIN_TPAUSE.
21544         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
21545         __builtin_ia32_umwait and __builtin_ia32_tpause.
21546         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
21547         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
21548         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
21549         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
21550         UNSPECV_TPAUSE): New.
21551         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
21552         * config/i386/i386.opt: Add -mwaitpkg.
21553         * config/i386/waitpkgintrin.h: New file.
21554         * config/i386/x86intrin.h: New header.
21555         * doc/invoke.texi: Add -mwaitpkg.
21557 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
21559         PR target/85606
21560         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
21561         equivalent.
21562         (cortex-m0): Use armv6s-m isa.
21563         (cortex-m0plus): Likewise.
21564         (cortex-m1): Likewise.
21565         (cortex-m0.small-multiply): Likewise.
21566         (cortex-m0plus.small-multiply): Likewise.
21567         (cortex-m1.small-multiply): Likewise.
21569 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
21570             Jakub Jelinek  <jakub@redhat.com>
21572         PR tree-optimization/85692
21573         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
21574         source permute as well.
21576 2018-05-11  Martin Liska  <mliska@suse.cz>
21578         PR sanitizer/85556
21579         * doc/extend.texi: Document LLVM style format for no_sanitize
21580         attribute.
21582 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21584         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
21585         mode_supports_vsx_dform_quad to mode_supports_dq_form.
21586         (mode_supports_vsx_dform_quad): Likewise.
21587         (mode_supports_vmx_dform): Move these functions to be next to the
21588         other mode_supports functions.
21589         (mode_supports_dq_form): Likewise.
21590         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
21591         mode_supports_dq_form.
21592         (reg_offset_addressing_ok_p): Likewise.
21593         (offsettable_ok_by_alignment): Likewise.
21594         (rs6000_legitimate_offset_address_p): Likewise.
21595         (legitimate_lo_sum_address_p): Likewise.
21596         (rs6000_legitimize_address): Likewise.
21597         (rs6000_legitimize_reload_address): Likewise.
21598         (rs6000_secondary_reload_inner): Likewise.
21599         (rs6000_preferred_reload_class): Likewise.
21600         (rs6000_output_move_128bit): Likewise.
21602 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
21604         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
21605         Generate SImode target register for null target.
21606         <case IX86_BUILTIN_XGETBV>: Ditto.
21607         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
21608         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
21610 2018-05-10  Carl Love  <cel@us.ibm.com>
21612         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21613         dcbtt and dcbtstt if operands[2] is 0.
21615 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
21617         PR target/85693
21618         * config/i386/sse.md (usadv64qi): New expander.
21620 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
21622         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
21623         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
21624         -maltivec=be support.
21625         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
21626         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
21627         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
21628         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
21629         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
21630         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
21631         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
21632         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
21633         altivec_vsumsws): Adjust.
21634         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
21635         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
21636         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
21637         support.
21638         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
21639         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
21640         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
21641         (altivec_lve<VI_char>x): Delete expand.
21642         (*altivec_lve<VI_char>x_internal): Rename to...
21643         (altivec_lve<VI_char>x): ... this.
21644         (altivec_lvxl_<mode>): Delete expand.
21645         (*altivec_lvxl_<mode>_internal): Rename to ...
21646         (altivec_lvxl_<mode>): ... this.
21647         (altivec_stvxl_<mode>): Delete expand.
21648         (*altivec_stvxl_<mode>_internal): Rename to ...
21649         (altivec_stvxl_<mode>): ... this.
21650         (altivec_stve<VI_char>x): Delete expand.
21651         (*altivec_stve<VI_char>x_internal): Rename to ...
21652         (altivec_stve<VI_char>x): ... this.
21653         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
21654         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
21655         reduc_plus_scal_<mode>): Adjust.
21656         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
21657         comment.
21658         (rs6000_cpu_cpp_builtins): Adjust.
21659         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
21660         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
21661         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
21662         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
21663         -maltivec=be support.
21664         (rs6000_split_vec_extract_var): Adjust.
21665         (rs6000_split_v4si_init): Adjust.
21666         (swap_selector_for_mode): Delete.
21667         (altivec_expand_lvx_be, altivec_expand_stvx_be,
21668         altivec_expand_stvex_be): Delete.
21669         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
21670         -maltivec=be support.
21671         (rs6000_gimple_fold_builtin): Ditto.
21672         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
21673         Adjust.
21674         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
21675         (TARGET_DIRECT_MOVE_64BIT): Adjust.
21676         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
21677         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
21678         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
21679         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
21680         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
21681         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
21682         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
21683         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
21684         anonymous split): Adjust.
21685         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
21686         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
21688 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
21690         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
21691         when --with-gxx-include-dir is also specified.
21692         * configure: Regenerate.
21694 2018-05-09  Jim Wilson  <jimw@sifive.com>
21696         PR target/84797
21697         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
21698         * config/riscv/t-withmultilib: New.
21699         * config/riscv/withmultilib.h: New.
21700         * doc/install.texi: Document RISC-V --with-multilib-list support.
21702 2018-05-09  Richard Biener  <rguenther@suse.de>
21704         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
21705         vector.
21706         (vect_bb_vectorization_profitable_p): Adjust.  Compute
21707         actual scalar cost using the cost vector and the add_stmt_cost
21708         machinery.
21710 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21712         PR rtl-optimization/85645
21713         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
21714         in the REG_CFA_REGISTER note for LR, don't leave it empty.
21716 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21718         PR rtl-optimization/85645
21719         * shrink-wrap.c (spread_components): Return a boolean saying if
21720         anything was changed.
21721         (try_shrink_wrapping_separate): Iterate spread_components until
21722         nothing changes anymore.
21724 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21726         PR rtl-optimization/85645
21727         * regrename.c (build_def_use): Also kill the chains that include the
21728         destination of a REG_CFA_REGISTER note.
21730 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21732         PR rtl-optimization/85645
21733         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
21734         insn that has a REG_CFA_REGISTER note.
21736 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
21738         * cfgexpand.c (expand_clobber): New function.
21739         (expand_gimple_stmt_1): Use it.
21740         * tree-vect-stmts.c (vect_clobber_variable): New function,
21741         split out from...
21742         (vectorizable_simd_clone_call): ...here.
21743         (vectorizable_store): Emit a clobber either side of an
21744         IFN_STORE_LANES sequence.
21745         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
21747 2018-05-09  Tom de Vries  <tom@codesourcery.com>
21749         PR target/85626
21750         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
21751         (define_insn "trap_if_false"): Add exit after trap.
21753 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
21755         PR rtl-optimization/85638
21756         * bb-reorder.c: Include common/common-target.h.
21757         (create_forwarder_block): New function extracted from...
21758         (fix_up_crossing_landing_pad): ...here.  Rename into...
21759         (dw2_fix_up_crossing_landing_pad): ...this.
21760         (sjlj_fix_up_crossing_landing_pad): New function.
21761         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
21762         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
21763         from both partitions and exit the loop after one iteration.
21765 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21767         Revert:
21768         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21769         subsection.
21770         (Basic PowerPC Built-in Functions): The new name of the
21771         subsection previously known as "PowerPC Built-in Functions".
21772         (Basic PowerPC Built-in Functions Available on all Configurations):
21773         New subsubsection.
21774         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21775         subsubsection.
21776         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21777         subsubsection.
21778         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21779         subsubsection.
21780         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21781         subsubsection.
21783 2018-05-08  Jim Wilson  <jimw@sifive.com>
21785         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
21786         (LD_EMUL_SUFFIX): New.
21787         (LINK_SPEC): Use it.
21789 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21791         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21792         subsection.
21793         (Basic PowerPC Built-in Functions): The new name of the
21794         subsection previously known as "PowerPC Built-in Functions".
21795         (Basic PowerPC Built-in Functions Available on all Configurations):
21796         New subsubsection.
21797         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21798         subsubsection.
21799         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21800         subsubsection.
21801         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21802         subsubsection.
21803         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21804         subsubsection.
21806 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
21808         PR target/85683
21809         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
21810         after cmpelim optimization.
21812 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
21814         * config.gcc: Support "goldmont".
21815         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
21816         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21817         PROCESSOR_GOLDMONT.
21818         * config/i386/i386.c (m_GOLDMONT): Define.
21819         (processor_target_table): Add "goldmont".
21820         (PTA_GOLDMONT): Define.
21821         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
21822         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
21823         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
21824         (fold_builtin_cpu): Add "goldmont".
21825         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
21826         (ix86_option_override_internal): Add "goldmont".
21827         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
21828         (processor_type): Add PROCESSOR_GOLDMONT.
21829         * config/i386/i386.md: Add CPU "glm".
21830         * config/i386/glm.md: New file.
21831         * config/i386/x86-tune.def: Add m_GOLDMONT.
21832         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
21834 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
21836         PR target/85572
21837         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
21838         E_V4DImode.
21839         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
21840         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
21841         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
21843         PR target/85317
21844         * config/i386/i386.c (ix86_fold_builtin): Handle
21845         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
21847         PR target/85480
21848         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
21849         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
21851 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
21853         PR target/85658
21854         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
21855         (check_arch): Likewise.
21856         (check_fpu): Return the result rather than printing it.
21857         (end arch): Fix operator precedence.
21858         (end cpu): Likewise.
21859         (END): Print the result from check_fpu.
21861 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
21862             Alan Hayward  <alan.hayward@arm.com>
21863             David Sherwood  <david.sherwood@arm.com>
21865         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
21866         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
21867         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
21868         (*fcmuo<mode>_and): New patterns.
21870 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
21872         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
21873         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
21874         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
21875         (cmp_op, sve_imm_con): New code attributes.
21876         (SVE_COND_INT_CMP, imm_con): Delete.
21877         (cmp_op): Remove above unspecs from int attribute.
21878         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
21879         to...
21880         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
21881         comparison-specific unspecs.
21882         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
21883         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
21884         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
21885         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
21886         (*vec_fcm<cmp_op><mode>): Rename to...
21887         (*fcm<cmp_op><mode>): ...this and adjust likewise.
21888         (*vec_fcmuo<mode>): Rename to...
21889         (*fcmuo<mode>): ...this and adjust likewise.
21890         (*pred_fcm<cmp_op><mode>): New pattern.
21891         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
21892         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
21893         functions.
21894         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
21895         and UNORDERED.
21896         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
21897         (aarch64_emit_sve_predicated_cond): New function.
21898         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
21899         (aarch64_emit_unspec_cond_or): Replace with...
21900         (aarch64_emit_sve_or_conds): ...this new function.  Use
21901         aarch64_emit_sve_ptrue_op for the individual comparisons and
21902         aarch64_emit_binop to OR them together.
21903         (aarch64_emit_inverted_unspec_cond): Replace with...
21904         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
21905         aarch64_emit_sve_ptrue_op for the comparison and
21906         aarch64_emit_unop to invert the result.
21907         (aarch64_expand_sve_vec_cmp_float): Update after the above
21908         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
21910 2018-05-07  Nathan Sidwell  <nathan@acm.org>
21912         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21913         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21914         (Backwards Compatibility): Likewise.
21916 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21918         PR bootstrap/85681
21919         Revert:
21920         2018-05-07  Luis Machado  <luis.machado@linaro.org>
21922         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21923         <prefetch_dynamic_strides>: New const bool field.
21924         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21925         prefetch_dynamic_strides.
21926         (exynosm1_prefetch_tune): Likewise.
21927         (thunderxt88_prefetch_tune): Likewise.
21928         (thunderx_prefetch_tune): Likewise.
21929         (thunderx2t99_prefetch_tune): Likewise.
21930         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21931         to false.
21932         (aarch64_override_options_internal): Update to set
21933         PARAM_PREFETCH_DYNAMIC_STRIDES.
21934         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21935         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21936         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21937         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21938         prefetch-dynamic-strides setting.
21940         2018-05-07  Luis Machado  <luis.machado@linaro.org>
21942         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21943         <minimum_stride>: New const int field.
21944         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21945         minimum_stride field.
21946         (exynosm1_prefetch_tune): Likewise.
21947         (thunderxt88_prefetch_tune): Likewise.
21948         (thunderx_prefetch_tune): Likewise.
21949         (thunderx2t99_prefetch_tune): Likewise.
21950         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21951         (aarch64_override_options_internal): Update to set
21952         PARAM_PREFETCH_MINIMUM_STRIDE.
21953         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21954         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21955         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21956         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21957         stride is constant and is below the minimum stride threshold.
21959 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21961         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21962         to 512.
21964 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21966         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21967         <prefetch_dynamic_strides>: New const bool field.
21968         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21969         prefetch_dynamic_strides.
21970         (exynosm1_prefetch_tune): Likewise.
21971         (thunderxt88_prefetch_tune): Likewise.
21972         (thunderx_prefetch_tune): Likewise.
21973         (thunderx2t99_prefetch_tune): Likewise.
21974         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21975         to false.
21976         (aarch64_override_options_internal): Update to set
21977         PARAM_PREFETCH_DYNAMIC_STRIDES.
21978         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21979         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21980         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21981         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21982         prefetch-dynamic-strides setting.
21984 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21986         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21987         <minimum_stride>: New const int field.
21988         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21989         minimum_stride field.
21990         (exynosm1_prefetch_tune): Likewise.
21991         (thunderxt88_prefetch_tune): Likewise.
21992         (thunderx_prefetch_tune): Likewise.
21993         (thunderx2t99_prefetch_tune): Likewise.
21994         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21995         (aarch64_override_options_internal): Update to set
21996         PARAM_PREFETCH_MINIMUM_STRIDE.
21997         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21998         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21999         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
22000         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
22001         stride is constant and is below the minimum stride threshold.
22003 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
22005         PR c++/85659
22006         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
22007         the type is addressable.  Don't force op into register if it has
22008         BLKmode.
22010 2018-05-05  Roland McGrath  <mcgrathr@google.com>
22012         PR other/77609
22013         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
22014         any section for which we don't know a specific type it should have,
22015         regardless of name.  Previously this was done only for the exact
22016         names ".init_array", ".fini_array", and ".preinit_array".
22017         (default_elf_asm_named_section): Add comment about
22018         relationship with default_section_type_flags and SECTION_NOTYPE.
22019         (get_section): Don't consider it a type conflict if one side has
22020         SECTION_NOTYPE and the other doesn't, as long as neither has the
22021         SECTION_BSS et al used in the default_section_type_flags logic.
22023 2018-05-05  Tom de Vries  <tom@codesourcery.com>
22025         PR target/85653
22026         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
22027         (workaround_barsyncs): New function.
22028         (nvptx_reorg): Use workaround_barsyncs.
22029         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22030         (define_expand "nvptx_membar_cta"): New define_expand.
22031         (define_insn "*nvptx_membar_cta"): New insn.
22033 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
22035         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
22036         To improve optimization opportunities.
22037         * builtin-types.def: The new needed builtin types for the above.
22039 2018-05-04  Richard Biener  <rguenther@suse.de>
22041         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
22042         * gimple-ssa-store-merging.c
22043         (imm_store_chain_info::output_merged_store): Remove redundant create,
22044         release split_store vector contents on failure.
22045         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
22046         scalar stmt vector on cache hit.
22048 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
22050         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22051         Xilinx FP support.
22052         * config.gcc (powerpc-xilinx-eabi*): Remove.
22053         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
22054         support.
22055         (fusion_addis_mem_combo_load): Ditto.
22056         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
22057         FP support.
22058         (rs6000_cpu_cpp_builtins): Ditto.
22059         * config/rs6000/rs6000-linux.c
22060         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
22061         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
22062         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
22063         support.
22064         (rs6000_setup_reg_addr_masks): Ditto.
22065         (rs6000_init_hard_regno_mode_ok): Ditto.
22066         (rs6000_option_override_internal): Ditto.
22067         (legitimate_lo_sum_address_p): Ditto.
22068         (rs6000_legitimize_address): Ditto.
22069         (rs6000_legitimize_reload_address): Ditto.
22070         (rs6000_legitimate_address_p): Ditto.
22071         (abi_v4_pass_in_fpr): Ditto.
22072         (setup_incoming_varargs): Ditto.
22073         (rs6000_gimplify_va_arg): Ditto.
22074         (rs6000_split_multireg_move): Ditto.
22075         (rs6000_savres_strategy): Ditto.
22076         (rs6000_emit_prologue_components): Ditto.
22077         (rs6000_emit_epilogue_components): Ditto.
22078         (rs6000_emit_prologue): Ditto.
22079         (rs6000_emit_epilogue): Ditto.
22080         (rs6000_elf_file_end): Ditto.
22081         (rs6000_function_value): Ditto.
22082         (rs6000_libcall_value): Ditto.
22083         * config/rs6000/rs6000.h: Ditto.
22084         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
22085         (TARGET_MINMAX): ... this.  New.
22086         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
22087         * config/rs6000/rs6000.md: Remove Xilinx FP support.
22088         (*movsi_internal1_single): Delete.
22089         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
22090         mfpu=, mxilinx-fpu): Delete.
22091         * config/rs6000/singlefp.h: Delete.
22092         * config/rs6000/sysv4.h: Remove Xilinx FP support.
22093         * config/rs6000/t-rs6000: Ditto.
22094         * config/rs6000/t-xilinx: Delete.
22095         * config/rs6000/titan.md: Adjust for fp_type removal.
22096         * config/rs6000/vsx.md: Remove Xilinx FP support.
22097         (VStype_simple): Delete.
22098         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
22099         * config/rs6000/xfpu.h: Delete.
22100         * config/rs6000/xfpu.md: Delete.
22101         * config/rs6000/xilinx.h: Delete.
22102         * config/rs6000/xilinx.opt: Delete.
22103         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
22104         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
22106 2018-05-04  Tom de Vries  <tom@codesourcery.com>
22108         PR libgomp/85639
22109         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
22110         if ignore == 0.
22112 2018-05-04  Richard Biener  <rguenther@suse.de>
22114         PR middle-end/85627
22115         * tree-complex.c (update_complex_assignment): We are always in SSA form.
22116         (expand_complex_div_wide): Likewise.
22117         (expand_complex_operations_1): Likewise.
22118         (expand_complex_libcall): Preserve EH info of the original stmt.
22119         (tree_lower_complex): Handle removed blocks.
22120         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
22121         on complex multiplication and division libcall builtins.
22123 2018-05-04  Richard Biener  <rguenther@suse.de>
22125         PR middle-end/85574
22126         * fold-const.c (negate_expr_p): Restrict negation of operand
22127         zero of a division to when we know that can happen without
22128         overflow.
22129         (fold_negate_expr_1): Likewise.
22131 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
22133         PR libstdc++/85466
22134         * real.h (real_nextafter): Declare.
22135         * real.c (real_nextafter): New function.
22136         * fold-const-call.c (fold_const_nextafter): New function.
22137         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22138         CASE_CFN_NEXTTOWARD.
22139         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22140         even when arg1_mode is different from arg0_mode.
22142 2018-05-03  Nathan Sidwell  <nathan@acm.org>
22144         * doc/extend.texi (Deprecated Features): Remove
22145         -ffriend-injection.
22146         (Backwards Compatibility): Likewise.
22147         * doc/invoke.texi (C++ Language Options): Likewise.
22148         (C++ Dialect Options): Likewise.
22150 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
22152         PR target/85530
22153         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22154         _mm512_mask_mullox_epi64): New intrinsics.
22156 2018-05-03  Tom de Vries  <tom@codesourcery.com>
22158         PR testsuite/85106
22159         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22160         dump files): Add offload-tree.
22162 2018-05-03  Richard Biener  <rguenther@suse.de>
22164         PR tree-optimization/85615
22165         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22166         to loops not nested in BBs loop father to avoid creating multi-entry
22167         loops.
22169 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22171         PR tree-optimization/70291
22172         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22173         arguments.  Change return type to tree.  Emit libcall as a new
22174         statement rather than replacing existing one when inplace_p is true.
22175         (expand_complex_multiplication_components): New function.
22176         (expand_complex_multiplication): Expand floating-point complex
22177         multiplication using the above.
22178         (expand_complex_division): Rename inner_type parameter to type.
22179         Update expand_complex_libcall call-site.
22180         (expand_complex_operations_1): Update expand_complex_multiplication
22181         and expand_complex_division call-sites.
22183 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22185         PR target/85582
22186         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22187         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22188         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22189         the highest significant bit of the shift count mask is clear.  In
22190         check whether and[sq]i3 is needed verify that all significant bits
22191         of the shift count other than the highest are set.
22193 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22195         PR libgomp/82428
22196         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22197         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22198         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22199         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22200         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22201         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22202         __builtin_goacc_parlevel_size.
22204 2018-05-02  Richard Biener  <rguenther@suse.de>
22206         PR tree-optimization/85597
22207         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22208         do not use split vect_get_vec_defs call but call vect_get_slp_defs
22209         directly.
22211 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22213         PR testsuite/85106
22214         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22215         dump files): Add ltrans-tree.
22217 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22219         PR testsuite/85106
22220         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22221         dump files): Add wpa-ipa.
22223 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
22225         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
22226         powerpc*-*-linux*paired* target.
22227         * config/rs6000/750cl.h: Delete.
22228         * config/rs6000/paired.h: Delete.
22229         * config/rs6000/paired.md: Delete.
22230         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22231         float support.
22232         * config/rs6000/rs6000-builtin.def: Remove paired float support.
22233         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22234         comment.  Remove paired float support.
22235         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22236         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22237         VECTOR_PAIRED.
22238         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22239         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22240         declarations.
22241         * config/rs6000/rs6000.c: Remove paired float support.
22242         (paired_expand_vector_init, paired_expand_vector_move,
22243         paired_emit_vector_compare, paired_emit_vector_cond_expr,
22244         (paired_expand_lv_builtin, paired_expand_stv_builtin,
22245         paired_expand_builtin, paired_expand_predicate_builtin,
22246         paired_init_builtins): Delete.
22247         * config/rs6000/rs6000.h: Remove paired float support.
22248         * config/rs6000/rs6000.md: Remove paired float support.
22249         (move_from_CR_ov_bit): Delete.
22250         * config/rs6000/rs6000.opt (mpaired): Delete.
22251         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22252         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22254 2018-05-02  Richard Biener  <rguenther@suse.de>
22256         PR middle-end/85567
22257         * gimplify.c (gimplify_save_expr): When in SSA form allow
22258         SAVE_EXPRs to compute to SSA vars.
22260 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22262         PR target/85582
22263         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22264         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22265         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22266         clobber operands[2], instead use a new pseudo.  Formatting fixes.
22268 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
22270         PR tree-optimization/85586
22271         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22272         exit early for statements in the same group if the accesses are
22273         not strided.
22275 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22277         PR lto/85451
22278         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22279         error message.
22281 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
22283         PR tree-optimization/85143
22284         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22286 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22288         PR lto/85451
22289         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22290         not found" error message.
22292 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22294         PR other/83786
22295         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22296         * vec.c (test_ordered_remove_if): New function.
22297         (vec_c_tests): Call test_ordered_remove_if.
22298         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22299         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22300         * tree-vect-patterns.c (vect_pattern_recog_1): Use
22301         VEC_ORDERED_REMOVE_IF.
22303 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22305         PR tree-optimization/82665
22306         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22307         pointer subtraction where arguments come from a memchr call.
22309 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
22311         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22312         --push-state --as-needed and --pop-state instead of --as-needed and
22313         --no-as-needed if ld supports it.
22314         * configure: Regenerated.
22316         PR web/85578
22317         * doc/install.texi2html: Replace _002d with - and _002a with * in
22318         generated html files using sed.
22320 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22322         PR c++/85523
22323         * gcc-rich-location.c (blank_line_before_p): New function.
22324         (use_new_line): New function.
22325         (gcc_rich_location::add_fixit_insert_formatted): New function.
22326         * gcc-rich-location.h
22327         (gcc_rich_location::add_fixit_insert_formatted): New function.
22329 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22331         * selftest.c (assert_streq): Rename "expected" and "actual" to
22332         "val1" and "val2".  Extend NULL-handling to cover both inputs
22333         symmetrically, while still requiring both to be non-NULL for a pass.
22334         * selftest.h (assert_streq): Rename "expected" and "actual" to
22335         "val1" and "val2".
22336         (ASSERT_EQ): Likewise.
22337         (ASSERT_EQ_AT): Likewise.
22338         (ASSERT_KNOWN_EQ): Likewise.
22339         (ASSERT_KNOWN_EQ_AT): Likewise.
22340         (ASSERT_NE): Likewise.
22341         (ASSERT_MAYBE_NE): Likewise.
22342         (ASSERT_MAYBE_NE_AT): Likewise.
22343         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
22344         the assertion to pass.
22345         (ASSERT_STREQ_AT): Likewise.
22347 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
22349         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
22350         interaction with -pie.
22352 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22354         * selftest.h: Fix alphabetization of per-source-file selftest
22355         declarations.
22357 2018-04-30  Jason Merrill  <jason@redhat.com>
22359         PR c++/61982 - dead stores to destroyed objects.
22360         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
22361         of clobber.
22363 2018-04-30  Jason Merrill  <jason@redhat.com>
22365         * tree.c (build_clobber): New.
22366         * tree.h: Declare it.
22367         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
22369 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22371         * diagnostic-show-locus.c (layout::layout): Update for
22372         location_get_source_line returning a char_span.
22373         (struct char_span): Move to input.h.
22374         (struct correction): Update for fields in char_span becoming
22375         private.
22376         (struct source_line): Update for location_get_source_line
22377         returning a char_span.
22378         (layout::print_line): Likewise.
22379         * edit-context.c (edited_file::print_content): Likewise.
22380         (edited_file::print_diff_hunk): Likewise.
22381         (edited_file::print_run_of_changed_lines): Likewise.
22382         (edited_file::get_num_lines): Likewise.
22383         (edited_line::edited_line): Likewise.
22384         * final.c (asm_show_source): Likewise.
22385         * input.c (location_get_source_line): Convert return type
22386         from const char * to char_span, losing the final "line_len"
22387         param.
22388         (dump_location_info): Update for the above.
22389         (get_substring_ranges_for_loc): Likewise.  Use a char_span
22390         when handling the literal within the line.
22391         (test_reading_source_line): Update for location_get_source_line
22392         returning a char_span.
22393         * input.h (class char_span): Move here from
22394         diagnostic-show-locus.c, converting from a struct to a class.
22395         Make data members private.
22396         (char_span::operator bool): New.
22397         (char_span::length): New.
22398         (char_span::get_buffer): New.
22399         (char_span::operator[]): New.
22400         (char_span::subspan): Make const.
22401         (char_span::xstrdup): New.
22402         (location_get_source_line): Convert return type from const char *
22403         to char_span, losing the final "line_size" param.
22405 2018-04-30  Jan Hubicka  <jh@suse.cz>
22407         * lto-wrapper.c (ltrans_priorities): New static var.
22408         (cmp_priority): New.
22409         (run_gcc): Read priorities and if doing parallel build order
22410         the Makefile by them.
22412 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22414         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
22416 2018-04-30  Richard Biener  <rguenther@suse.de>
22418         * tree-cfg.c (verify_address): Remove base argument, add
22419         flag whether to check TREE_ADDRESSABLE and do that.
22420         (verify_expr): Remove.
22421         (verify_types_in_gimple_reference): Add pieces from verify_expr.
22422         (verify_gimple_assign_single): Likewise.
22423         (verify_gimple_switch): Likewise.
22424         (verify_expr_location_1): Dereference tp once.  Add (disabled)
22425         piece from verify_expr.
22426         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
22428 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
22430         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
22432 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
22434         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
22435         (small_data_pattern): Likewise.
22436         (arc_rewrite_small_data): Likewise.
22437         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
22438         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
22439         (get_symbol_alignment): New function.
22440         (legitimate_small_data_address_p): Likewise.
22441         (legitimate_scaled_address): Update, call
22442         legitimate_small_data_address_p.
22443         (output_sdata): New static variable.
22444         (arc_print_operand): Update how we handle small data operands.
22445         (arc_print_operand_address): Likewise.
22446         (arc_legitimate_address_p): Update, use
22447         legitimate_small_data_address_p.
22448         (arc_rewrite_small_data_p): Remove.
22449         (arc_rewrite_small_data_1): Likewise.
22450         (arc_rewrite_small_data): Likewise.
22451         (small_data_pattern): Likewise.
22452         (compact_sda_memory_operand): Update to use
22453         legitimate_small_data_address_p and get_symbol_alignment.
22454         (prepare_move_operands): Don't rewite sdata pattern.
22455         (prepare_extend_operands): Remove.
22456         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
22457         pattern.
22458         (zero_extendqisi2): Likewise.
22459         (zero_extendhisi2): Likewise.
22460         (extendqihi2): Likewise.
22461         (extendqisi2): Likewise.
22462         (extendhisi2): Likewise.
22463         (addsi3): Likewise.
22464         (subsi3): Likewise.
22465         (andsi3): Likewise.
22466         * config/arc/constraints.md (Usd): Change it to memory constraint.
22468 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
22470         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
22471         as source of std instructions.
22472         * config/arc/arc.md (movsi_insn): Update pattern predicate to
22473         allow 6-bit constants as source for store instructions.
22474         (movdi_insn): Update instruction pattern to allow 6-bit constants
22475         as source for store instructions.
22477 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
22479         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
22481 2018-04-30  Nathan Sidwell  <nathan@acm.org>
22482             Sandra Loosemore <sandra@codesourcery.com>
22484         * dumpfile.c (dump_open): Allow '-' for stdout.
22485         * doc/invoke.texi (Developer Options): Document dump filename
22486         determination early.  Document stdin/stdout selection.
22488 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
22490         Microblaze Target: PIC data text relative
22492         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
22493         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
22494         Add declaration.
22495         * config/microblaze/microblaze.h (microblaze_constant_address_p):
22496         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
22497         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
22498         New addressing mode for data-text relative position indepenedent code.
22499         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
22500         'ADDRESS_SYMBOLIC_TXT_REL'.
22501         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
22502         (microblaze_legitimate_pic_operand): Exclude function calls from
22503         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
22504         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
22505         addresses cases.
22506         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22507         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22508         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
22509         for 'address + offset'.
22510         (microblaze_expand_prologue): Add new function prologue call for
22511         'r20' assignation.
22512         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
22513         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
22514         table in case of TARGET_PIC_DATA_TEXT_REL.
22515         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
22516         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
22517         Add new macros 'UNSPEC_TEXT',
22518         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
22519         + exclude function calls from 'UNSPEC_PLT' in case of data text
22520         relative mode.
22521         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22522         new target hook for generating address diff vector tables in case of
22523         flag_pic.
22524         * doc/tm.texi : Regenerate.
22525         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
22526         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
22527         of addr diff vector generation.
22528         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22529         target hook definition.
22530         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
22531         Add default function for generate_pic_addr_diff_vec -> flag_pic.
22532         * doc/invoke.texi (Add new pic option): Add new microblaze pic
22533         option for data text relative.
22535 2018-04-30  Richard Biener  <rguenther@suse.de>
22537         * tree-chrec.h (evolution_function_is_constant_p): Remove
22538         redundant check.
22539         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
22541 2018-04-30  Richard Biener  <rguenther@suse.de>
22543         PR bootstrap/85571
22544         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
22546 2018-04-30  Richard Biener  <rguenther@suse.de>
22548         PR tree-optimization/28364
22549         PR tree-optimization/85275
22550         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
22551         copying first exit test.
22553 2018-04-28  Mark Wielaard  <mark@klomp.org>
22555         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
22556         dwarf_version >= 5.
22557         (dwarf_AT): Handle DW_AT_addr_base.
22558         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
22560 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
22562         PR target/84431
22563         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
22564         (*ashl<dwi>3_doubleword_mask_1): Ditto.
22565         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
22566         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
22568 2018-04-28  Richard Biener  <rguenther@suse.de>
22570         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
22571         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
22572         to reflect use.  Only add interesting stmts.
22574 2018-04-27  Martin Jambor  <mjambor@suse.cz>
22576         PR ipa/85549
22577         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
22578         the jump function allows for passing through aggregate values.
22580 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
22582         * input.h (in_system_header_at): Convert from macro to inline
22583         function.
22584         (from_macro_expansion_at): Likewise.
22585         (from_macro_definition_at): Likewise.
22587 2018-04-27  Jeff Law  <law@redhat.com>
22589         * config.gcc: Mark tile* targets as deprecated/obsolete.
22591 2018-04-27  Richard Biener  <rguenther@suse.de>
22593         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
22594         fix for ILP32.
22596 2018-04-27  Richard Biener  <rguenther@suse.de>
22598         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
22600 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
22602         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
22603         with Yd constraint. Set "preferred_for_speed" attribute from
22604         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
22605         with Yd constraint.
22606         (*movdi_internal): Ditto.
22607         (movti_interunit splitters): Remove
22608         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
22609         (movdi_interunit splitters): Ditto.
22610         * config/i386/constraints.md (Ye): Remove.
22611         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
22613 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22615         PR target/85512
22616         * config/aarch64/constraints.md (Usg): Limit to 31.
22617         (Usj): Limit to 63.
22619 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
22621         PR tree-optimization/85529
22622         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
22623         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
22624         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
22625         zero extension or masking of the MSB bit.
22626         (optimize_range_tests): Add FIRST_BB argument, pass it through
22627         to optimize_range_tests_var_bound.
22628         (maybe_optimize_range_tests, reassociate_bb): Adjust
22629         optimize_range_tests callers.
22631 2018-04-26  Richard Biener  <rguenther@suse.de>
22632             Jakub Jelinek  <jakub@redhat.com>
22634         * cgraph.h (symbol_table): Just declare debug method here.
22635         * symtab.c (symbol_table::debug): Define.
22637 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
22639         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
22641 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
22643         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
22644         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
22645         (*movdi_internal): Substitute Yi and Yj constraint with x
22646         and Ym and Yn constraint with y constraint.  Update "isa"
22647         attribute and set "preferred_for_speed" attribute from
22648         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
22649         (*movsi_internal): Ditto.
22650         (*movdf_internal): Ditto.
22651         (*movsf_internal): Ditto.
22652         (*zero_extendsidi2): Ditto.
22653         * config/i386/sse.md (vec_set<mode>_0): Ditto.
22654         (sse2_loadld): Ditto.
22655         (*vec_extract<ssevecmodelower>_0): Ditto.
22656         (*vec_extractv4si_0_zext_sse4): Ditto.
22657         (vec_concatv2di): Ditto.
22658         (*vec_dup<mode>): Ditto.
22659         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
22660         * config/i386/constraints.md (Yi): Remove.
22661         (Yj): Remove.
22662         (Ym): Remove.
22663         (Yn): Remove.
22665 2018-04-26  Nathan Sidwell  <nathan@acm.org>
22667         * dumpfile.c (dump_open): New.
22668         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
22669         (dump_finish): Detect stdio/stderr by value not name.
22671 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
22673         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
22675 2018-04-26  Tom de Vries  <tom@codesourcery.com>
22677         PR target/84952
22678         * config/nvptx/nvptx.c (verify_neutering_jumps)
22679         (verify_neutering_labels): New function
22680         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
22682 2018-04-26  Tom de Vries  <tom@codesourcery.com>
22684         PR target/84025
22685         * config/nvptx/nvptx.c (needs_neutering_p): New function.
22686         (nvptx_single): Use needs_neutering_p to skip over insns that do not
22687         need neutering.
22689 2018-04-26  Richard Biener <rguenther@suse.de>
22690             Tom de Vries  <tom@codesourcery.com>
22692         PR lto/85422
22693         * lto-streamer-out.c (output_function): Fixup loops if required to match
22694         discovery done in the reader.
22696 2018-04-26  Richard Biener  <rguenther@suse.de>
22698         PR tree-optimization/85116
22699         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
22700         have a loop exit from the single latch predecessor.  Remove
22701         case of header with just condition.
22702         (ch_base::copy_headers): Exclude infinite loops from any
22703         processing.
22704         (pass_ch::execute): Record exits.
22706 2018-04-26  Richard Biener  <rguenther@suse.de>
22708         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
22709         prologue cost vector and pass it to vect_get_load_cost.
22710         (vect_get_peeling_costs_all_drs): Likewise.
22711         (vect_peeling_hash_get_lowest_cost): Likewise.
22712         (vect_enhance_data_refs_alignment): Likewise.
22714 2018-04-26  Richard Biener  <rguenther@suse.de>
22716         PR middle-end/85450
22717         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
22718         checking of integer<->pointer conversions.
22719         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
22720         sign-/zero-extending pointer types.
22721         (expand_omp_for_static_chunk): Likewise.
22723 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
22724             Jean Lee  <xiaoyur347@gmail.com>
22726         * config/mips/mips.c (mips_asan_shadow_offset): New function.
22727         (TARGET_ASAN_SHADOW_OFFSET): Define.
22728         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
22729         true for -fsanitize=address.
22731 2018-04-25  Mark Wielaard  <mark@klomp.org>
22733         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
22734         shorter ones.
22736 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
22738         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
22739         than "alu", remove explicit "memory" and "imm_disp" attributes.
22740         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
22742         PR middle-end/85414
22743         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
22744         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
22745         gen_lowpart_no_emit.
22747 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
22749         PR target/85473
22750         * config/i386/i386.c (ix86_expand_builtin): Change memory
22751         operand to XI, extend p0 to Pmode.
22752         * config/i386/i386.md: Change unspec volatile and operand
22753         1 mode to XI, change operand 0 mode to P.
22755 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22757         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
22758         GET_MODE_MASK before any checking.
22759         (nds32_can_use_bset_p): Likewise.
22760         (nds32_can_use_btgl_p): Likewise.
22762 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22764         * config/nds32/nds32-doubleword.md: New define_split pattern for
22765         illegal register number.
22767 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22769         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
22771 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22773         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
22775 2018-04-25  Richard Biener  <rguenther@suse.de>
22777         * lto-streamer.h (LTO_major_version): Bump to 8.
22779 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
22781         * BASE-VER: Set to 9.0.0.
22783 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
22785         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
22786         in __abskf2 and __powikf2.
22788 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22790         PR target/85512
22791         * config/aarch64/constraints.md (Usg, Usj): New constraints.
22792         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
22793         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
22794         Use the above on operand 2.  Reindent.
22795         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
22797 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
22799         PR target/85485
22800         * common/config/i386/i386-common.c (ix86_handle_option): Don't
22801         handle OPT_mcet.
22802         * config/i386/i386.opt (mcet): Removed.
22803         * doc/install.texi: Remove -mcet documentation.
22804         * doc/invoke.texi: Likewise.
22806 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
22808         PR target/85485
22809         * doc/install.texi: Remove -mcet from bootstrap-cet.
22811 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22813         PR target/85511
22814         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
22815         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
22816         if TARGET_64BIT.
22818         PR target/85503
22819         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
22820         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
22821         containing a CONST_VECTOR.
22823 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
22825         * doc/install.texi: Update newlib dependency for nvptx.
22827 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22829         PR target/85508
22830         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
22831         instead of INTVAL when shifting x left.
22833 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
22835         PR tree-optimization/85478
22836         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
22837         vect_grouped_store_supported for single element vectors.
22839 2018-04-24  Richard Biener  <rguenther@suse.de>
22841         PR target/85491
22842         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
22843         load cost increase to the case of non-constant step.
22845 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22847         PR target/84828
22848         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
22849         destination if any_malformed_asm.
22851 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
22853         PR middle-end/85496
22854         * expr.c (store_field): In the bitfield case, if the value comes from
22855         a function call and is returned in registers by means of a PARALLEL,
22856         do not change the mode of the temporary unless BLKmode and VOIDmode.
22858 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
22860         PR rtl-optimization/85423
22861         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
22862         dependencies to debug insns when the previous insn is non-debug.
22864 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
22866         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
22867         enums into a single definition.
22868         (fls): Fix predicates and printing.
22869         (seti): Likewise.
22871 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
22873         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
22874         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
22875         and short u6 immediate.
22876         (check_if_valid_sleep_operand): Remove.
22877         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
22879 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22881         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
22882         flag_always_save_lp condition.
22883         * config/nds32/nds32.opt (malways-save-lp): New option.
22885 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22887         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
22888         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
22889         * config/nds32/nds32.h
22890         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
22891         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
22893 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22895         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
22896         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
22898 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22899             Chung-Ju Wu  <jasonwucj@gmail.com>
22901         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
22902         Declare.
22903         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
22904         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
22906 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22908         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22910 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22912         * config/nds32/nds32-protos.h (nds32_data_alignment,
22913         nds32_local_alignment): Declare.
22914         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22915         nds32_local_alignment): New functions.
22916         (TARGET_CONSTANT_ALIGNMENT): Define.
22917         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22919 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22921         * config/nds32/nds32.c
22922         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22923         (TARGET_MODES_TIEABLE_P): Likewise.
22925 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22927         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22928         level Ofast and Og.
22930 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
22931             Chung-Ju Wu  <jasonwucj@gmail.com>
22933         * config/nds32/constants.md (unspec_volatile_element): Add enum values
22934         for unaligned access.
22935         * config/nds32/nds32-intrinsic.c: Implementation of expanding
22936         unaligned access.
22937         * config/nds32/nds32-intrinsic.md: Likewise.
22938         * config/nds32/nds32_intrinsic.h: Likewise.
22939         * config/nds32/nds32.h (nds32_builtins): Likewise.
22940         * config/nds32/nds32.opt (munaligned-access): New option.
22941         * config/nds32/nds32.c (nds32_asm_file_start): Display
22942         flag_unaligned_access status.
22944 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
22946         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22947         -mno-relax is present.
22948         * config/riscv/linux.h (LINK_SPEC): Ditto.
22950 2018-04-20  Martin Sebor  <msebor@redhat.com>
22952         PR c/85365
22953         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22954         for null pointers.
22955         (gimple_fold_builtin_stxcpy_chk): Same.
22956         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22958 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
22960         PR target/85456
22961         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22962         __powikf2 when long double is IEEE 128-bit.
22964 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
22966         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22967         step to make sure stack always aligned.
22969 2018-04-20  Carl Love  <cel@us.ibm.com>
22971         PR target/83402
22972         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22973         size check for arg0.
22975 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
22976             Tom de Vries  <tom@codesourcery.com>
22978         PR target/85445
22979         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22980         Emit insns for calls too.
22981         (nvptx_find_par): Always look for worker-level predecessor insn.
22982         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
22983         calls.
22984         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22985         (nvptx_process_pars): Propagate frames for calls.
22987 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
22989         PR target/85469
22990         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22991         Removed.
22992         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22993         (ix86_handle_option): Don't handle OPT_mibt.
22994         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22995         __SHSTK__.
22996         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22997         has_ibt and ibt.
22998         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22999         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
23000         (ix86_target_macros): Define __CET__ with flag_cf_protection
23001         for -fcf-protection.
23002         * config/i386/i386.c (isa2_opts): Remove -mibt.
23003         * config/i386/i386.h (TARGET_IBT): Removed.
23004         (TARGET_IBT_P): Likewise.
23005         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
23006         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
23007         * config/i386/i386.opt (mcet): Update help message.
23008         (mshstk): Likewise.
23009         (mibt): Removed.
23010         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
23011         -mcet as an alias for -mshstk.
23013 2018-04-20  Richard Biener <rguenther@suse.de>
23015         PR middle-end/85475
23016         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
23017         complexity by forcing a single use of the multiply operand.
23019 2018-04-20  Martin Jambor  <mjambor@suse.cz>
23021         ipa/85449
23022         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
23023         recursion dependency to only apply to non-clones.
23025 2018-04-20  Martin Jambor  <mjambor@suse.cz>
23027         ipa/85447
23028         * ipa-cp.c (create_specialized_node): Check that clones of
23029         self-recursive edges exist during IPA-CP.
23031 2018-04-19  Toon Moene  <toon@moene.org>
23033         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
23034         by -O3.
23036 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23038         PR tree-optimization/85467
23039         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
23040         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
23041         VECTOR_CST element to type.
23043 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23045         PR target/85397
23046         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
23047         * config/i386/i386.md (builtin_setjmp_setup): Removed.
23048         (builtin_longjmp): Likewise.
23049         (save_stack_nonlocal): New pattern.
23050         (restore_stack_nonlocal): Likewise.
23052 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23054         PR target/85404
23055         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23056         Replace ASM_OUTPUT_LABEL with fprintf.
23058 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
23060         PR target/85417
23061         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23062         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
23063         * config/i386/i386-c.c (ix86_target_macros_internal): Also
23064         define __IBT__ and __SHSTK__ for -fcf-protection.
23065         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
23066         TARGET_IBT.
23067         (ix86_trampoline_init): Likewise.
23068         (x86_output_mi_thunk): Likewise.
23069         (ix86_notrack_prefixed_insn_p): Likewise.
23070         (ix86_option_override_internal): Don't disallow -fcf-protection.
23071         * config/i386/i386.md (rdssp<mode>): Also enable for
23072         -fcf-protection.
23073         (incssp<mode>): Likewise.
23074         (nop_endbr): Likewise.
23075         * config/i386/i386.opt (mcet): Change help message to built-in
23076         functions only.
23077         (mibt): Likewise.
23078         (mshstk): Likewise.
23079         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
23080         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
23081         enable CET built-in functions.
23083 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
23085         * common/config/i386/i386-common.c
23086         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
23087         OPTION_MASK_ISA_MOVDIRI_UNSET,
23088         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
23089         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
23090         * config.gcc (movdirintrin.h): New header.
23091         * config/i386/cpuid.h (bit_MOVDIRI,
23092         bit_MOVDIR64B): New bits.
23093         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
23094         and -mmvodir64b.
23095         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
23096         (VOID, PVOID, PCVOID)): New function types.
23097         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
23098         __builtin_ia32_directstoreu_u64,
23099         __builtin_ia32_movdir64b): New builtins.
23100         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
23101         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
23102         and -mmovdiri.
23103         (ix86_valid_target_attribute_inner_p): Ditto.
23104         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
23105         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
23106         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
23107         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
23108         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
23109         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
23110         (movdiri<mode>, movdir64b_<mode>): New.
23111         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
23112         * config/i386/immintrin.h: Include movdirintrin.h.
23113         * config/i386/movdirintrin.h: New file.
23114         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
23116 2018-04-19  Richard Biener  <rguenther@suse.de>
23118         PR middle-end/85455
23119         * cfg.c (clear_bb_flags): When loop state says we have
23120         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
23122 2018-04-19  Richard Biener  <rguenther@suse.de>
23124         PR tree-optimization/84737
23125         * tree-vect-data-refs.c (vect_copy_ref_info): New function
23126         copying restrict info.
23127         (vect_setup_realignment): Use it.
23128         * tree-vectorizer.h (vect_copy_ref_info): Declare.
23129         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23130         the first DR to all generated stores.
23131         (vectorizable_load): Likewise for loads.
23133 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23135         PR tree-optimization/85446
23136         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23137         the integral and pointer types to have the same precision.
23139         * doc/install.texi: Document --disable-cet being the default and
23140         --enable-cet=auto.
23142 2018-04-18  Martin Liska  <mliska@suse.cz>
23144         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23145         style.
23147 2018-04-18  Martin Liska  <mliska@suse.cz>
23149         Revert
23150         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
23152         PR ipa/83983
23153         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23154         arguments if they are comparable.
23156 2018-04-18  Martin Liska  <mliska@suse.cz>
23158         Revert
23159         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23161         PR lto/84805
23162         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23163         incomplete types.
23165 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
23167         PR target/85388
23168         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23169         ENDBR after calling __morestack.
23171 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
23173         PR jit/85384
23174         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23175         by using gcc_base_ver to generate a gcc_driver_version, and use
23176         it when generating GCC_DRIVER_NAME.
23177         * configure: Regenerate.
23179 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
23181         PR target/81084
23182         * config.gcc: Obsolete powerpc*-*-*spe*.
23184 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23186         PR debug/84637
23187         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23188         (stabstr_D): Change type of unum from unsigned int to
23189         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
23190         type.
23192 2018-04-17  Jim Wilson  <jimw@sifive.com>
23194         PR 84856
23195         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23196         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23197         Set arg_pointer_offset after using pretend_args_size.
23199 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23201         PR rtl-optimization/85431
23202         * dse.c (record_store): Ignore zero width stores.
23204         PR sanitizer/85230
23205         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
23206         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23207         __builtin_stack_restore rather than after it.
23208         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23209         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23210         argument instead of virtual_dynamic_stack_rtx.
23212 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23214         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23215         New prototype.
23216         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23217         Add note to error message to explain internal mapping of overloaded
23218         built-in function name to non-overloaded built-in function name.
23219         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23220         function.
23222 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23224         PR target/85424
23225         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23226         where the inputs overlap with the output.
23228 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23230         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23231         (=v, v) alternative and explicit "memory" attribute.
23232         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
23233         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23234         attributes.
23235         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23236         "sselog1" type instead of "sselog".
23237         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23238         "sselog".  Remove explicit "memory" attribute.
23239         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23240         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23241         attributes.
23242         (vec_extract_hi_v32hi): Merge all alternatives into one, use
23243         "sselog1" type instead of "sselog".  Remove explicit "memory"
23244         attribute.
23245         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23246         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23247         attribute.
23248         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23249         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23250         attributes.
23251         (vec_extract_hi_v64qi): Merge all alternatives into one, use
23252         "sselog1" type instead of "sselog".  Remove explicit "memory"
23253         attribute.
23254         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23255         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23256         attribute.
23258         PR target/85430
23259         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23261         PR middle-end/85414
23262         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23263         on a SUBREG.
23265 2018-04-17  Martin Jambor  <mjambor@suse.cz>
23267         PR ipa/85421
23268         * ipa-cp.c (create_specialized_node): Call
23269         expand_all_artificial_thunks if necessary.
23271 2018-04-17  Martin Liska  <mliska@suse.cz>
23273         PR lto/85405
23274         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23275         in message, remote space in between '_G' and '('.
23277 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23279         PR target/85281
23280         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23281         avx512f_vmcmp<mode>3<round_saeonly_name>,
23282         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23283         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23284         avx512f_rndscale<mode><round_saeonly_name>,
23285         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23286         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23287         Use %<iptr>2 instead of %2 for -masm=intel.
23288         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23289         avx512f_vcvttss2usi<round_saeonly_name>,
23290         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23291         -masm=intel.
23292         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23293         avx512f_vcvttsd2usi<round_saeonly_name>,
23294         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23295         Use %q1 instead of %1 for -masm=intel.
23296         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23297         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23298         of %3 for -masm=intel.
23299         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23300         -masm=intel.
23301         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23302         -masm=intel.
23303         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23304         -masm=intel.
23305         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23306         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23307         %g1.
23308         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23309         -masm=intel.
23310         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23311         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23312         %g1 and one with %0 and %1.
23313         (avx512er_vmrcp28<mode><round_saeonly_name>,
23314         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23315         %1 for -masm=intel.
23316         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23317         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23318         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23319         of %0 and %{%4%} for -masm=intel.
23320         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23321         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23322         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23323         order of %0 and %{%5%}%{z%} for -masm=intel.
23325 2018-04-17  Jan Hubicka  <jh@suse.cz>
23327         PR lto/85405
23328         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23330 2018-04-17  Martin Liska  <mliska@suse.cz>
23332         PR ipa/85329
23333         * multiple_target.c (create_dispatcher_calls): Set apostrophes
23334         for target_clone error message.  Make default implementation
23335         clone to be a local declaration.
23336         (separate_attrs): Add new argument and check for an empty
23337         string.
23338         (expand_target_clones): Handle it.
23339         (ipa_target_clone): Make redirection just for target_clones
23340         functions.
23342 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
23343             Tom de Vries  <tom@codesourcery.com>
23345         PR middle-end/84955
23346         * omp-expand.c (expand_oacc_for): Add dummy false branch for
23347         tiled basic blocks without omp continue statements.
23349 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
23351         PR target/83660
23352         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
23353         vec_extract expression as having side effects to make sure it gets
23354         a cleanup point.
23356 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
23358         PR target/85403
23359         * config/i386/i386.c (get_builtin_code_for_version): Check
23360         error_mark_node.
23362 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
23364         PR target/84331
23365         * config.gcc: Support "skylake".
23366         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23367         PROCESSOR_SKYLAKE.
23368         * config/i386/i386.c (m_SKYLAKE): Define.
23369         (processor_target_table): Add "skylake".
23370         (ix86_option_override_internal): Add "skylake".
23371         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
23372         PROCESSOR_CANNONLAKE.
23373         (get_builtin_code_for_version): Fix priority for
23374         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
23375         PROCESSOR_SKYLAKE-AVX512.
23376         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
23377         (processor_type): Add PROCESSOR_SKYLAKE.
23379 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
23380             Jason Merrill  <jason@redhat.com>
23382         PR c++/85112
23383         * convert.c (convert_to_integer_1): Use direct recursion for
23384         enumeral types and types with a precision less than the number
23385         of bits in their mode.
23387 2018-04-16  Julia Koval  <julia.koval@intel.com>
23389         PR target/84413
23390         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
23391         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
23393 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
23395         PR target/85293
23396         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
23397         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
23398         and -mno-direct-move.
23400 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
23402         PR target/83402
23403         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
23404         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
23405         Ensure negative shifts result in {0}.
23407 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
23409         PR rtl-optimization/79916
23410         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
23411         regs (if any) to define how to gnerate SD moves when LRA is in
23412         progress.
23414 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
23416         PR rtl-optimization/85393
23417         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
23418         * except.c (expand_dw2_landing_pad_for_region): Make static.
23419         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
23420         a label and unconditional jump to old_bb, rather than
23421         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
23422         basic block.
23424         PR rtl-optimization/85376
23425         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
23426         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
23427         instead of a specific value.
23429 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
23430             Bin Cheng  <bin.cheng@arm.com>
23432         PR tree-optimization/82965
23433         PR tree-optimization/83991
23434         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
23435         by_profile_only parameter.
23436         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
23437         information if the loop was predicted to iterate too many times.
23438         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
23440 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
23442         PR lto/71991
23443         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
23444         always inline.
23446 2018-04-13  Martin Liska  <mliska@suse.cz>
23447             Jakub Jelinek  <jakub@redhat.com>
23449         PR middle-end/81657
23450         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
23451         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
23452         * builtins.c (expand_builtin_memory_copy_args): Use
23453         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
23454         handle dest_addr == pc_rtx.
23456 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
23458         PR target/85291
23459         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
23460         asked to not generate direct moves.
23461         (fix_trunc<mode>si2_stfiwx): Similar.
23462         (fix_trunc<mode>si2_internal): Similar.
23464 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
23466         PR debug/83157
23467         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
23468         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
23469         lookup if dest in some wider mode is known to be const0_rtx and
23470         if so, record permanent equivalence for it to be ZERO_EXTEND of
23471         the narrower mode destination.
23473 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
23475         * lto-streamer-out.c (output_function): Revert 259346.
23476         * omp-expand.c (expand_oacc_for): Likewise.
23478 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
23480         PR rtl-optimization/85354
23481         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
23482         * sel-sched.c (sel_global_init): ... here.
23484 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
23486         PR target/85238
23487         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
23488         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
23489         mode for PE-COFF targets.
23490         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
23491         (i386_pe_asm_lto_end): Likewise.
23492         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
23493         (TARGET_ASM_LTO_END): Likewise.
23494         * config/i386/winnt.c (saved_debug_info_level): New static variable.
23495         (i386_pe_asm_lto_start): New function.
23496         (i386_pe_asm_lto_end): Likewise.
23498 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
23499             Richard Biener  <rguenther@suse.de>
23501         PR middle-end/84955
23502         * lto-streamer-out.c (output_function): Fix CFG loop state before
23503         streaming out.
23504         * omp-expand.c (expand_oacc_for): Handle calls to internal
23505         functions like regular functions.
23507 2018-04-12  Richard Biener  <rguenther@suse.de>
23509         PR lto/85371
23510         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
23511         for the early LTO debug to properly generate references to it
23512         during DIE emission.  Do not re-use that for the skeleton for
23513         split-dwarf.
23514         (dwarf2out_early_finish): Likewise.
23516 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
23518         PR target/85328
23519         * config/i386/sse.md
23520         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
23521         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
23522         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
23523         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
23524         and output is a reg, avoid creating invalid lowpart subreg, but
23525         instead split into a 512-bit move.  Don't split if not AVX512VL,
23526         input is xmm16+ reg and output is a mem.
23527         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
23528         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
23529         xmm16+ reg and output is a mem.
23531 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23533         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
23534         also for flag_dwarf2_cfi_asm.
23536 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
23538         PR rtl-optimization/85342
23539         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
23540         a bool scalar var inside of the loop instead.  Don't try to update
23541         recog_data.operand after failed apply_change_group.
23543 2018-04-12  Tom de Vries  <tom@codesourcery.com>
23545         PR target/85296
23546         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
23547         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
23548         array with flexible array member as array without given dimension.
23549         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
23550         argument for undefined param to true.
23552 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
23554         PR target/85321
23555         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23556         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
23557         from PowerPC section.
23558         * config/rs6000/sysv4.opt (mcall-): Improve help text.
23559         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
23560         help text that is too long.
23561         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
23562         help text that is too long.
23563         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
23564         help text that is too long.
23566 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
23568         * config/alpha/alpha.md (stack_probe_internal): Rename
23569         from "probe_stack".  Update all callers.
23571 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
23573         PR rtl-optimization/84566
23574         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
23575         sched_macro_fuse_insns.
23577 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
23579         PR target/84301
23580         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
23581         (compute_block_dependences): ... from here.
23583 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
23585         PR tree-optimization/85331
23586         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
23587         from int to HOST_WIDE_INT.
23589 2018-04-11  Martin Jambor  <mjambor@suse.cz>
23591         PR ipa/84149
23592         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
23593         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
23594         not the same as the source val.
23595         (cgraph_edge_brings_value_p): New parameter.
23596         (gather_edges_for_value): Pass destination value to
23597         cgraph_edge_brings_value_p.
23598         (perhaps_add_new_callers): Likewise.
23599         (get_info_about_necessary_edges): Likewise and exclude values brought
23600         only by self-recursive edges.
23601         (create_specialized_node): Redirect only clones of self-calling edges.
23602         (+self_recursive_pass_through_p): New function.
23603         (find_more_scalar_values_for_callers_subset): Use it.
23604         (find_aggregate_values_for_callers_subset): Likewise.
23605         (known_aggs_to_agg_replacement_list): Removed.
23606         (decide_whether_version_node): Re-calculate known constants for all
23607         remaining context clones.
23609 2018-04-11  Richard Biener  <rguenther@suse.de>
23611         PR lto/85339
23612         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
23613         from early DWARF output.
23614         (dwarf2out_early_finish): Output line info unconditionally into
23615         early DWARF and add reference to it.
23617 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
23619         PR target/85281
23620         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
23621         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
23622         other than V2DFmode using iptr mode attribute.
23623         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
23625 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
23627         PR rtl-optimization/84659
23628         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
23630 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
23632         PR debug/85302
23633         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
23634         SIZEP is NULL.
23635         (output_loc_list): Pass address of a dummy size variable even in the
23636         locview handling loop.
23637         (index_location_lists): Add comment on why skip_loc_list_entry can't
23638         call size_of_locs.
23640 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23642         PR target/85261
23643         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
23644         into register.
23646 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
23648         PR target/85321
23649         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23650         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
23651         and -mstring-compare-inline-limit.
23653 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
23655         PR target/85287
23656         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
23657         for stack clash protection in a register whenever we need it to be in
23658         a register.
23660 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
23662         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
23663         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
23665 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
23667         PR target/85321
23668         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
23669         the help text.
23670         (mlong-double-): Ditto.
23671         * config/rs6000/sysv4.opt (msdata=): Ditto.
23672         (mtls-size=): Ditto.
23674 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23676         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
23677         erroneous entries for
23678         "vector int vec_ldl (int, long int *)", and
23679         "vector unsigned int vec_ldl (int, unsigned long int *)".
23680         Add comments and entries for
23681         "vector bool char vec_ldl (int, bool char *)",
23682         "vector bool short vec_ldl (int, bool short *)",
23683         "vector bool int vec_ldl (int, bool int *)",
23684         "vector bool long long vec_ldl (int, bool long long *)",
23685         "vector pixel vec_ldl (int, pixel *)",
23686         "vector long long vec_ldl (int, long long *)",
23687         "vector unsigned long long vec_ldl (int, unsigned long long *)".
23688         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
23689         type tree bool_long_long_type_node and correct definition of
23690         bool_V2DI_type_node to make reference to this new type tree.
23691         (rs6000_mangle_type): Replace erroneous reference to
23692         bool_long_type_node with bool_long_long_type_node.
23693         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
23694         comments to emphasize sign distinctions for char and int types and
23695         replace RS6000_BTI_bool_long constant with
23696         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
23697         use of RS6000_BTI_pixel.
23698         (bool_long_type_node): Remove this macro definition.
23699         (bool_long_long_type_node): New macro definition
23701 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
23703         PR rtl-optimization/85300
23704         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
23705         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
23706         simplify_unary_operation fails.
23708 2018-04-10  Martin Liska  <mliska@suse.cz>
23710         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
23711         cgraph_edge and ipa_ref.
23713 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
23715         PR target/85177
23716         PR target/85255
23717         * config/i386/sse.md
23718         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
23719         computation of the VEC_MERGE selector from mask.
23720         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
23721         Fix decoding of the VEC_MERGE selector into mask.
23723 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
23725         PR tree-optimization/85286
23726         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
23728 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
23730         * final.c (final_1): Set insn_last_address as well as
23731         insn_current_address.
23733 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23735         PR target/85173
23736         * explow.c (emit_stack_probe): Call validize_mem on memory location
23737         before passing it to gen_probe_stack.  Create address operand and
23738         legitimize it for the probe_stack_address case.
23740 2018-04-09  Jan Hubicka  <jh@suse.cz>
23742         PR lto/85078
23743         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
23744         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
23745         * tree.c (free_lang_data_in_type): Fix handling of binfos;
23746         walk basetypes.
23747         (free_lang_data): Rebuild type inheritance graph.
23749 2018-04-09  Martin Sebor  <msebor@redhat.com>
23751         * invoke.texi (-finline-small-functions): Mention other optimization
23752         options.
23753         (-findirect-inlining, -fpartial-inlining): Same.
23754         (-finline-functions-called-once): Same.
23755         (-freorder-blocks-and-partition): Same.
23757 2018-04-09  Jan Hubicka  <jh@suse.cz>
23759         PR rtl/84058
23760         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
23761         jumps; choose last target that matches the criteria (i.e.
23762         no partition changes for non-crossing jumps).
23763         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
23764         support for redirecting crossing jumps to non-crossing.
23766 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
23768         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
23769         also for naked functions.
23771 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
23773         * config/arc/arc.md (add_shift): New pattern.
23774         (add_shift2): Likewise.
23775         (sub_shift): Likewise.
23776         (sub_shift_cmp0_noout): Likewise.
23777         (compare_si_ashiftsi): Likewise.
23778         (xbfu_cmp0_noout): New combine pattern.
23779         (xbfu_cmp0"): Likewise.
23780         (movsi_set_cc_insn): Place the predicable variant first.
23781         (commutative_binary_cmp0_noout): Remove clobber.
23782         (commutative_binary_cmp0): New pattern.
23783         (noncommutative_binary_cmp0): Likewise.
23784         (noncommutative_binary_cmp0_noout): Likewise.
23785         (noncommutative_binary_comparison_result_used): Removed.
23786         (rsub_cmp0): New pattern.
23787         (rsub_cmp0_noout): Likewise.
23788         (extzvsi): Changed, keep only meaningful variants.
23789         (SQH, SEZ): New iterators.
23790         (SQH_postfix): New mode attribute.
23791         (SEZ_prefix): New code attribute.
23792         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
23793         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
23794         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
23795         of numerical value.
23796         (noncommutative_operator): Check the availability of barrel
23797         shifter option.
23799 2018-04-09  Richard Biener  <rguenther@suse.de>
23801         PR tree-optimization/85284
23802         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
23803         Only use the niter constraining form of simple_iv when the exit
23804         is always executed.
23806 2018-04-09  Tom de Vries  <tom@codesourcery.com>
23808         PR target/84041
23809         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23810         (define_expand "*memory_barrier"): New define_expand.
23811         (define_insn "memory_barrier"): New insn.
23813 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23815         PR rtl-optimization/80463
23816         PR rtl-optimization/83972
23817         PR rtl-optimization/83480
23819         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
23820         correct producer for the insn.
23821         (tidy_control_flow): Fixup seqnos in case of debug insns.
23823 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23825         PR rtl-optimization/83913
23827         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
23828         different sched-times when merging exprs.
23830 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23832         PR rtl-optimization/83962
23834         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
23835         tidy_fallthru_edge and tidy_control_flow.
23837 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23839         PR rtl-optimization/83530
23841         * sel-sched.c (force_next_insn): New global variable.
23842         (remove_insn_for_debug): When force_next_insn is true, also leave only
23843         next insn in the ready list.
23844         (sel_sched_region): When the region wasn't scheduled, make another pass
23845         over it with force_next_insn set to 1.
23847 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
23849         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
23850         into tm_file.
23851         * config/nds32/constants.md (unspec_volatile_element): Add enum values
23852         for interrupt control.
23853         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23854         functions for interrupt control.
23855         * config/nds32/nds32-intrinsic.md: Likewise.
23856         * config/nds32/nds32_intrinsic.h: Likewise.
23857         * config/nds32/nds32.h (nds32_builtins): Likewise.
23859 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
23861         * config/nds32/nds32.c (nds32_init_machine_status,
23862         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
23863         strict_aligned_p field.
23864         (nds32_expand_to_rtl_hook): New function.
23865         (TARGET_EXPAND_TO_RTL_HOOK): Define.
23866         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
23868 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23869             Chung-Ju Wu  <jasonwucj@gmail.com>
23871         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
23872         * config/nds32/nds32-n7.md: New file.
23873         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
23874         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
23875         pipeline.
23876         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
23877         * config/nds32/nds32.md (pipeline_model): Add n7.
23878         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
23879         * config/nds32/pipelines.md: Include n7 settings.
23881 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23882             Chung-Ju Wu  <jasonwucj@gmail.com>
23884         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
23885         * config/nds32/nds32-e8.md: New file.
23886         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
23887         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
23888         pipeline.
23889         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
23890         * config/nds32/nds32.md (pipeline_model): Add e8.
23891         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
23892         * config/nds32/pipelines.md: Include e8 settings.
23894 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23895             Chung-Ju Wu  <jasonwucj@gmail.com>
23897         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
23898         * config/nds32/nds32-n8.md: New file.
23899         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
23900         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
23901         pipeline.
23902         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
23903         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
23904         * config/nds32/nds32.md (pipeline_model): Add n8.
23905         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
23906         * config/nds32/pipelines.md: Include n8 settings.
23908 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23909             Chung-Ju Wu  <jasonwucj@gmail.com>
23911         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23912         * config/nds32/nds32-n9-2r1w.md: New file.
23913         * config/nds32/nds32-n9-3r2w.md: New file.
23914         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23915         nds32_register_ports): New or modify for cpu n9.
23916         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23917         pipeline.
23918         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23919         * config/nds32/nds32-utils.c: New file.
23920         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23921         TARGET_MUL_SLOW): Define.
23922         * config/nds32/nds32.md (pipeline_model): New attribute.
23923         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23924         New options that support cpu n9.
23925         * config/nds32/pipelines.md: Include n9 settings.
23926         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23928 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
23930         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23931         information if necessary.
23932         (output_cond_branch_compare_zero): Likewise.
23933         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23934         (nds32_target_alignment): Refine for alignment.
23935         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23936         (FUNCTION_BOUNDARY): Modify.
23937         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23938         align case.
23939         * config/nds32/nds32.opt (malways-align, malign-functions): New.
23941 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
23943         * config/nds32/constants.md (unspec_volatile_element): Add values for
23944         TLB operation and data prefetch.
23945         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23946         functions for TLB operation and data prefetch.
23947         * config/nds32/nds32-intrinsic.md: Likewise.
23948         * config/nds32/nds32_intrinsic.h: Likewise.
23949         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23950         (nds32_print_operand): Likewise.
23951         * config/nds32/nds32.h (nds32_builtins): Likewise.
23953 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
23954         Andrew Pinski <pinsika@gcc.gnu.org>
23956         PR middle-end/82976
23957         * match.pd: Use constant_boolean_node of correct type instead of
23958         boolean_true_node or boolean_false_node for simplifying
23959         pointer comparisons to zero.
23961 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
23963         PR tree-optimization/80021
23964         * tree.c (verify_type_variant): Make error call in verify_variant_match
23965         translatable and remove final full stop.
23967 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23969         * config/nds32/constants.md (unspec_volatile_element): Add
23970         UNSPEC_VOLATILE_EH_RETURN.
23971         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23972         nds32_output_stack_pop): Support dwarf exception handling process.
23973         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23974         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23975         exception handling process.
23976         (nds32_compute_stack_frame): Likewise.
23977         (nds32_return_addr_rtx): Likewise.
23978         (nds32_initial_elimination_offset): Likewise.
23979         (nds32_expand_prologue): Likewise.
23980         (nds32_expand_epilogue): Likewise.
23981         (nds32_dynamic_chain_address): New function.
23982         * config/nds32/nds32.h (machine_function): Add fields for dwarf
23983         exception handling.
23984         (DYNAMIC_CHAIN_ADDRESS): Define.
23985         (EH_RETURN_DATA_REGNO): Define.
23986         (EH_RETURN_STACKADJ_RTX): Define.
23987         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23988         patterns for dwarf exception handling.
23990 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23992         * config/nds32/nds32.h: Clean up obsolete macros.
23994 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23996         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23997         Add enum values for particular instructions.
23998         * config/nds32/nds32-intrinsic.c: Implementation of expanding
23999         particular intrinsic functions.
24000         * config/nds32/nds32-intrinsic.md: Likewise.
24001         * config/nds32/nds32_intrinsic.h: Likewise.
24002         * config/nds32/nds32.h (nds32_builtins): Likewise.
24003         * config/nds32/nds32.md (type): Add pbsad and pbsada.
24004         (btst, ave): New patterns for particular instructions.
24006 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24008         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24009         Add enum values for atomic load/store and memory sync.
24010         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
24011         and memory sync.
24012         * config/nds32/nds32-intrinsic.md: Likewise.
24013         * config/nds32/nds32_intrinsic.h: Likewise.
24014         * config/nds32/nds32.h (nds32_builtins): Likewise.
24016 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
24018         PR tree-optimization/85257
24019         * fold-const.c (native_encode_vector): If not all elts could fit
24020         and off is -1, return 0 rather than offset.
24021         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
24022         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
24023         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
24024         adjust buffer in native_interpret_expr call.
24026 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24028         * config/nds32/constants.md (unspec_volatile_element): Add cache
24029         control enum values.
24030         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
24031         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
24032         * config/nds32/nds32.c (nds32_cctl_names): New.
24033         (nds32_print_operand): Handle cache control register names.
24034         * config/nds32/nds32.h (nds32_builtins): New enum values.
24035         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
24036         macros.
24037         * config/nds32/nds32.md (type): Add mmu.
24038         * config/nds32/pipelines.md (simple_insn): Add mmu.
24040 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24042         * config/nds32/nds32.md (type): Remove call.
24043         * config/nds32/pipelines.md (simple_insn): Likewise.
24045 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24047         * config/nds32/constants.md (unspec_volatile_element): Add
24048         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
24049         UNSPEC_VOLATILE_FMFCFG.
24050         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
24051         description for fmfcfg and fmfcsr.
24052         (bdesc_1arg): Add fmtcsr.
24053         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
24054         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
24055         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
24056         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
24057         unspec_fmfcfg): New patterns.
24058         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
24059         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
24060         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
24061         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
24062         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24063         __nds32__fmfcfg): Define.
24065 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
24067         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
24068         intrinsic register names.
24069         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
24070         intrinsic register enum values and macros.
24072 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
24074         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
24075         for load/store addressing form.
24076         (nds32_print_operand_address): Likewise.
24078 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
24080         PR target/85196
24081         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
24082         based on LABEL_REF.  Remove useless assertion.
24083         (pic_address_needs_scratch): Fix formatting.
24084         (sparc_legitimize_pic_address): Minor tweaks.
24085         (sparc_delegitimize_address): Adjust assertion accordingly.
24086         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
24087         into symbolic_operand.
24088         (movsi_high_pic_label_ref): Likewise.
24089         (movsi_lo_sum_pic_label_ref): Likewise.
24090         (movdi_pic_label_ref): Likewise.
24091         (movdi_high_pic_label_ref): Likewise.
24092         (movdi_lo_sum_pic_label_ref): Likewise.
24094 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
24096         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
24097         custom LIB_SPEC setup.
24099 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
24100             Kito Cheng  <kito.cheng@gmail.com>
24102         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
24103         * config/riscv/freebsd.h: New.
24105 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24107         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
24108         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
24109         file.
24111 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24112             Kito Cheng  <kito.cheng@gmail.com>
24114         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
24115         nds32_output_call, nds32_symbol_binds_local_p): New functions.
24116         * config/nds32/nds32-protos.h (nds32_output_call,
24117         nds32_output_return): Declare.
24118         * config/nds32/nds32.md: Refine all the call and return patterns.
24120 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24122         PR debug/85252
24123         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
24124         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24126         PR rtl-optimization/84872
24127         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24128         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24129         EDGE_CROSSING edge.
24131 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
24133         * expr.c (copy_blkmode_to_reg): Revert 254862.
24134         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24136 2018-04-06  Richard Biener  <rguenther@suse.de>
24138         PR middle-end/85244
24139         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24140         after seeing a component reference with an adjacent field.  Treat
24141         refs to arrays at struct end of external decls similar to
24142         refs to unconstrained commons.
24144 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24146         PR sanitizer/85213
24147         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24148         look through SAVE_EXPRs with non-side-effects argument.  Adjust
24149         recursive calls.
24150         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24151         save_p here.
24153 2018-04-06  Richard Biener  <rguenther@suse.de>
24155         PR middle-end/85180
24156         * alias.c (find_base_term): New wrapper around find_base_term
24157         unwinding CSELIB_VAL_PTR changes.
24158         (find_base_term): Do not restore CSELIB_VAL_PTR during the
24159         recursion.
24161 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24163         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24164         instructions.
24165         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24166         constant definitions.
24167         ("nop"): lr 0,0 -> nopr r0
24168         ("nop_lr0", "nop_lr1"): New insn definitions.
24170 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24172         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24173         NDS32_V3PUSH_AVAILABLE_P macro.
24175 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
24176             Chung-Ju Wu  <jasonwucj@gmail.com>
24178         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24179         (nds32*-*-*): Add float and fpu_config into supported_defaults.
24180         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24181         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24182         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24183         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24184         * config/nds32/constraints.md: New constraints and checking for hard
24185         float configuration.
24186         * config/nds32/iterators.md: New mode iterator and attribute for hard
24187         float configuration.
24188         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24189         patterns.
24190         * config/nds32/nds32-fpu.md: New file.
24191         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24192         deal with hard float code generation.
24193         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24194         ARCH_V3S.
24195         (abi_type, float_reg_number): New enum type.
24196         * config/nds32/nds32-predicates.c: New predicates for hard float.
24197         * config/nds32/nds32-protos.h: Declare functions for hard float.
24198         * config/nds32/nds32.c: Implementation for hard float configuration.
24199         * config/nds32/nds32.h: Definitions for hard float configuration.
24200         * config/nds32/nds32.md: Include hard float machine description and
24201         modify patterns for hard float configuration.
24202         * config/nds32/nds32.opt: New options for hard float configuration.
24203         * config/nds32/predicates.md: New predicates for hard float
24204         configuration.
24206 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
24208         * common/config/nds32/nds32-common.c
24209         (nds32_option_optimization_table): Enable -mreleax-hint by default.
24211 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
24213         PR middle-end/85195
24214         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24215         CONSTRUCTOR_ELT (ctor, ...)->value.
24217 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
24219         PR target/85193
24220         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24222 2018-04-05  Tom de Vries  <tom@codesourcery.com>
24224         PR target/85204
24225         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24226         cond jump.
24228 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24229             Kito Cheng  <kito.cheng@gmail.com>
24231         * config/nds32/constraints.md (U33): Fine-tune checking condition.
24232         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24233         * config/nds32/nds32.h (nds32_16bit_address_type): Add
24234         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24236 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24237             Kito Cheng  <kito.cheng@gmail.com>
24239         * config/nds32/constraints.md (Ufe): New memory constraint.
24240         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24241         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24242         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24243         operands.
24244         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24245         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24247 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24249         * config/nds32/nds32.md: Use optimize_size in the condition for
24250         alu-shift instructions.
24252 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24254         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24256 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24258         * config/nds32/nds32.md (negsi2): Refine pattern.
24260 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24261             Chung-Ju Wu  <jasonwucj@gmail.com>
24263         * config/nds32/iterators.md (shift_rotate): New code iterator.
24264         (shift): New code attribute.
24265         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24266         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24267         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24268         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24269         bit-wise operations.
24270         (andsi3, *andsi3): Ditto.
24271         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24272         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24273         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24274         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24275         nds32_ior_operand, nds32_xor_operand): New predicates.
24277 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24279         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24280         (addsi3, subsi3): ... this.
24282 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24284         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24286 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24288         * config/nds32/nds32.md: Adjust indention.
24290 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24292         * config/nds32/nds32.md (feature): New attribute.
24294 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24296         * config/nds32/nds32.md (subtype): New attribute.
24298 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24300         PR target/85203
24301         * config/arm/arm-builtins.c (arm_expand_builtin): Change
24302         expansion to perform a bitwise AND of the argument followed by a
24303         boolean negation of the result.
24305 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
24307         PR rtl-optimization/84878
24308         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24309         the basic block.  Assert the use reference is not artificial and that
24310         it has an associated insn.
24312 2018-04-04  Michael Matz  <matz@suse.de>
24314         * builtins.c (compute_objsize): Pass correct operand
24315         to array_at_struct_end_p.
24317 2018-04-04  Richard Biener  <rguenther@suse.de>
24319         PR lto/85176
24320         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24321         from contexts for DINFO_LEVEL_TERSE and below.
24323 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24325         * config/nds32/nds32-doubleword.md (move_<mode>): Require
24326         resiter_operand condition.
24327         * config/nds32/nds32.md (*move<mode>): Ditto.
24329 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24330             Monk Chiang  <sh.chiang04@gmail.com>
24332         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
24334 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24336         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
24338 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24339             Kito Cheng  <kito.cheng@gmail.com>
24341         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
24342         nds32_cond_code_str, output_cond_branch,
24343         output_cond_branch_compare_zero, nds32_expand_cbranch,
24344         nds32_expand_cstore, nds32_expand_movcc,
24345         nds32_output_cbranchsi4_equality_zero,
24346         nds32_output_cbranchsi4_equality_reg,
24347         nds32_output_cbranchsi4_equality_reg_or_const_int,
24348         nds32_output_cbranchsi4_greater_less_zero: New functions.
24349         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
24350         nds32_expand_cstore, nds32_expand_movcc,
24351         nds32_output_cbranchsi4_equality_zero,
24352         nds32_output_cbranchsi4_equality_reg,
24353         nds32_output_cbranchsi4_equality_reg_or_const_int,
24354         nds32_output_cbranchsi4_greater_less_zero): Declare.
24355         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
24356         nds32_rimm11s_operand): New predicates.
24357         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
24358         * config/nds32/nds32.md: Rewrite all the branch and conditional move
24359         patterns.
24361 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24363         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
24364         * config/nds32/nds32.md: Ditto.
24365         * config/nds32/pipelines.md: Ditto.
24367 2018-04-04  Richard Biener  <rguenther@suse.de>
24369         PR tree-optimization/85168
24370         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
24371         propagating abnormals.
24373 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24375         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
24377 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24378             Kito Cheng  <kito.cheng@gmail.com>
24380         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
24381         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
24382         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
24383         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
24384         * config/nds32/nds32.md (sibcall_internal): New.
24385         (sibcall_register): Remove.
24386         (sibcall_immediate): Remove.
24387         (sibcall_value_internal): New.
24388         (sibcall_value_register): Remove.
24389         (sibcall_value_immediate): Remove.
24390         * config/nds32/predicates.md (nds32_general_register_operand): New.
24391         (nds32_call_address_operand): New.
24393 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
24395         PR rtl-optimization/85167
24396         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
24397         bb_defs if *split_p, instead preinitialize it to NULL.
24399         PR tree-optimization/85156
24400         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
24401         evaluating the argument multiple times.
24403 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
24405         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
24406         than vector.
24407         (_mm_cvtpd_ps): Likewise.
24408         (_mm_cvttpd_epi32): Likewise.
24409         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
24410         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
24411         vector, pixel, and bool following altivec.h include.
24413 2018-04-03  Martin Sebor  <msebor@redhat.com>
24415         * doc/extend.texi (Common Function Attributes): Clarify.
24416         (const attribute): Likewise.
24417         (pure attribute): Likewise.
24419 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
24421         PR target/85169
24422         * config/i386/i386.c (ix86_expand_vector_set): Use
24423         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
24425 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
24427         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
24428         instructions when changing rounding bits to preserve precision bits
24429         in the x87 control word.
24431 2018-04-03  Martin Liska  <mliska@suse.cz>
24433         PR tree-optimization/82491
24434         * rtl.h (strip_offset_and_add): Replace += suboffset with
24435         poly_uint64 () + suboffset.
24437 2018-03-29  Martin Liska  <mliska@suse.cz>
24438             Martin Jambor  <mjambor@suse.cz>
24440         PR ipa/84947
24441         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
24442         param_type is not an integral or pointer type.
24444 2018-04-03  Richard Biener  <rguenther@suse.de>
24446         * sese.h (recompute_all_dominators): Remove.
24448 2018-04-02  Martin Sebor  <msebor@redhat.com>
24450         * doc/invoke.texi (-Wrestrict): Fix typos.
24452 2018-04-02  Jim Wilson  <jimw@sifive.com>
24454         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
24455         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
24456         (<optab>di3, <optab>si3_extend): Likewise.
24457         (<optab>si3_mask, <optab>si3_mask_1): New.
24458         (<optab>di3_mask, <optab>di3_mask_1): New.
24459         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
24460         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
24461         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
24463 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
24465         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
24466         example.
24468 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
24470         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
24471         (nds32_canonicalize_comparison): New function.
24473 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
24474             Kito Cheng  <kito.cheng@gmail.com>
24475             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
24477         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
24478         * config/nds32/constants.md (unspec_volatile_element): Add
24479         UNSPEC_VOLATILE_RELAX_GROUP.
24480         * config/nds32/nds32-relax-opt.c: New file.
24481         * config/nds32/nds32-predicates.c
24482         (nds32_symbol_load_store_p): New function.
24483         * config/nds32/nds32-protos.h
24484         (nds32_symbol_load_store_p): Declare function.
24485         (make_pass_nds32_relax_opt): Declare new rtl pass function.
24486         * config/nds32/nds32.c
24487         (nds32_register_pass): New function to register pass.
24488         (nds32_register_passes): New function to register passes.
24489         * config/nds32/nds32.md (relax_group): New pattern.
24490         * config/nds32/nds32.opt (mrelax-hint): New option.
24491         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
24493 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
24495         * config/nds32/t-nds32: Modify files dependency.
24497 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
24499         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
24500         (PROFILE_HOOK): Define its implementation.
24502 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
24504         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
24505         type and 32-bit size.
24507 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
24509         PR middle-end/85090
24510         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
24511         (V_128_256): New mode iterator.
24512         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
24513         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
24514         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
24515         of V.
24516         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
24517         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
24519 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
24521         PR target/83315
24522         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
24523         NaN inputs correctly.
24525 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
24527         PR target/80546
24528         * config/rs6000/vsx.md (??r): New mode attribute.
24529         (*vsx_mov<mode>_64bit): Use it.
24530         (*vsx_mov<mode>_32bit): Likewise.
24532 2018-03-30  Martin Sebor  <msebor@redhat.com>
24534         PR tree-optimization/84818
24535         * builtins.c (check_access): Use warning_n.
24537 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24539         PR target/83822
24540         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
24541         condition.
24542         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
24543         condition.
24545 2018-03-30  Julia Koval  <julia.koval@intel.com>
24547         PR target/84413
24548         * x86-tune.def (movx, partial_reg_dependency): Enable for
24549         m_SKYLAKE_AVX512.
24551 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
24553         PR inline-asm/84985
24554         * lra-constraints.c (process_alt_operands): Move setting
24555         this_alternative_matches below.
24557 2018-03-29  Martin Liska  <mliska@suse.cz>
24559         PR lto/84995.
24560         * doc/invoke.texi: Document how LTO works with debug info.
24561         Describe auto-load support of binutils.  Mention 'x86-64'
24562         as valid option value of -march option.
24564 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
24566         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
24568         PR c/85094
24569         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
24570         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
24571         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
24572         checking.
24574 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
24576         PR target/84912
24577         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
24578         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
24579         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
24580         for RS6000_BTM_POWERPC64.
24581         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
24582         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
24583         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
24584         definition.
24585         (DIVDE): Use it.
24586         (DIVDEU): Likewise.
24588 2018-03-28  Carl Love  <cel@us.ibm.com>
24590         Revert
24591         2017-09-27  Carl Love  <cel@us.ibm.com>
24593         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
24594         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
24595         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
24596         fctiw instruction.
24598 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24600         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
24601         instead of __vector bool.
24602         (_mm_max_pu8): Likewise.
24603         (_mm_min_pi16): Likewise.
24605 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
24607         PR target/84912
24608         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
24609         (DIVWEUO): Likewise.
24610         (DIVDEO): Likewise.
24611         (DIVDEUO): Likewise.
24612         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
24613         DIVWEUO and DIVDEUO.
24614         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
24615         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
24616         (div_extend): Likewise.
24617         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
24618         builtin function.
24619         (__builtin_divweuo): Likewise.
24620         (__builtin_divdeo): Likewise.
24621         (__builtin_divdeuo): Likewise.
24623 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
24625         PR target/85095
24626         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
24627         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
24629         PR tree-optimization/82004
24630         * gimple-match-head.c (optimize_pow_to_exp): New function.
24631         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
24632         Don't fold to exp if optimize_pow_to_exp is false.
24634 2018-03-28  Martin Liska  <mliska@suse.cz>
24636         PR other/84819
24637         * calls.c (initialize_argument_information): Fix trailing space.
24638         * common.opt: Fix typo and provide better explanation for
24639         -fsanitize-coverage option.
24640         * config/i386/i386.opt: Fix typo.
24642 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
24643             Martin Liska  <mliska@suse.cz>
24645         PR sanitizer/85081
24646         * gimplify.c (asan_poison_variable): Don't do the check for
24647         gimplify_omp_ctxp here.
24648         (gimplify_decl_expr): Do it here.
24649         (gimplify_target_expr): Likewise.
24651 2018-03-28  Martin Liska  <mliska@suse.cz>
24653         PR target/84988
24654         * config/i386/i386.c (ix86_function_arg_advance): Do not call
24655         chkp_type_bounds_count if MPX is not enabled.
24657 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
24659         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
24661 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
24663         PR target/84914
24664         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
24665         function to create the function decl for complex long double
24666         multiply and divide for -mabi=ieeelongdouble.
24667         (init_float128_ieee): Call it.
24669 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
24671         PR target/85044
24672         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
24673         -fcf-protection=branch -mibt.
24674         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
24676 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24678         PR target/81863
24679         * config/arm/arm.c (arm_valid_symbolic_address): Handle
24680         arm_word_relocations.
24682 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
24684         PR target/85056
24685         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
24686         extern array declarations.
24688 2018-03-27  Richard Biener  <rguenther@suse.de>
24690         PR middle-end/84067
24691         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
24692         explicit single_use checks.
24694 2018-03-27  Richard Biener  <rguenther@suse.de>
24696         PR tree-optimization/85082
24697         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
24698         Valueize the VUSE.
24700 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24702         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
24703         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
24704         Turn on fasynchronous-unwind-tables and funwind-tables.
24706 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
24708         PR target/85073
24709         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
24710         (*bmi_blsr_<mode>_ccz): Ditto.
24712 2018-03-26  Tom de Vries  <tom@codesourcery.com>
24714         PR tree-optimization/85063
24715         * omp-general.c (offloading_function_p): New function.  Factor out
24716         of ...
24717         * omp-offload.c (pass_omp_target_link::gate): ... here.
24718         * omp-general.h (offloading_function_p): Declare.
24719         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
24720         with attribute omp declare target for offloading functions.
24722 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
24724         PR tree-optimization/84005
24725         * tree-data-ref.h (get_base_for_alignment): Declare.
24726         * tree-data-ref.c (get_base_for_alignment_1): New function.
24727         (get_base_for_alignment): Likewise.
24728         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24729         get_base_for_alignment to find a suitable base object, instead
24730         of always using drb->base_address.
24732 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
24734         PR inline-asm/85022
24735         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
24736         known size by default.
24738 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
24740         PR inline-asm/85030
24741         * lra-constraints.c (process_alt_operands): Don't match BLKmode
24742         and non BLKmode operands.
24744 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24746         PR target/85026
24747         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
24748         Clean up attributes.
24750 2018-03-23  Richard Biener  <rguenther@suse.de>
24752         PR debug/85020
24753         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
24754         we are going to emit early debug for LTO.
24756 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
24758         PR inline-asm/85034
24759         * function.c (match_asm_constraints_1): Don't optimize if input
24760         doesn't satisfy general_operand predicate for output's mode.
24762         PR inline-asm/85022
24763         * alias.c (write_dependence_p): Don't require for x_canonicalized
24764         non-VOIDmode if x has VOIDmode.
24766         PR sanitizer/85029
24767         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
24768         just don't try to optimize it rather than assert it never happens.
24770 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24772         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
24773         macro expansions for definition of ST_INTERNAL_<mode> and
24774         LD_INTERNAL_<mode> builtins.
24775         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
24776         Remove prototype.
24777         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
24778         function.
24779         (altivec_expand_st_builtin): Likewise.
24780         (altivec_expand_builtin): Remove calls to deleted functions.
24781         (rs6000_address_for_altivec): Delete this function.
24782         * config/rs6000/vector.md: Remove expands for
24783         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
24785 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
24787         PR target/84826
24788         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
24789         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
24790         re-computing once computed.
24791         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
24792         (arm_init_machine_status): Initialize
24793         machine->static_chain_stack_bytes.
24795 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24797         PR target/84760
24798         * doc/extend.texi: Add four new prototypes for vec_ld.
24799         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
24800         definitions for more logical presentation.
24801         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
24802         entries for V1TI variants of __builtin_altivec_ld builtin.
24803         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
24804         handling of V1TI variant of LVX icode pattern.
24805         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
24806         (rs6000_gimple_fold_builtin): Likewise.
24807         (altivec_init_builtins): Add code to define
24808         __builtin_altivec_lvx_v1ti function.
24810 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
24812         PR inline-asm/84941
24813         * function.c (match_asm_constraints_1): Don't do the optimization
24814         if input isn't a REG, SUBREG, MEM or constant.
24816 2018-03-22  Tom de Vries  <tom@codesourcery.com>
24818         PR tree-optimization/84956
24819         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
24820         bb_has_abnormal_pred.
24822 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
24824         PR sanitizer/85018
24825         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
24826         DECL_INITIAL (decl) to decl at the end.
24827         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
24828         adjust the comment.
24830 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
24832         * doc/extend.texi (__builtin_tgmath): Document when complex
24833         integer types are treated as _Complex _Float64.
24835 2018-03-21  Tom de Vries  <tom@codesourcery.com>
24837         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
24839 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24841         PR tree-optimization/84960
24842         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
24843         if it is ENTRY block, move them into single succ of ENTRY in that case.
24845 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
24847         PR tree-optimization/84811
24848         * poly-int.h (poly_span_traits): Remove the T3 parameter and
24849         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
24850         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
24851         (known_subrange_p): Update accordingly.  Cast each value involved
24852         in the size comparison, rather than casting the result of the
24853         subtraction.
24855 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24857         PR tree-optimization/84982
24858         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
24859         by flipping the least significant bit rather than all bits from
24860         bitpos to bitpos + bitsize - 1.
24862 2018-03-21  Nathan Sidwell  <nathan@acm.org>
24864         * doc/extend.texi (Deprecated Features): Remove mention of
24865         long-deleted deprecations.
24867 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24869         PR jit/84288
24870         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
24871         * configure: Regenerate.
24873 2018-03-21  Tom de Vries  <tom@codesourcery.com>
24875         PR tree-optimization/83126
24876         * tree-parloops.c (num_phis): New function.
24877         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
24879 2018-03-21  Nathan Sidwell  <nathan@acm.org>
24881         * doc/extend.texi (Deprecated Features): Update deprecated flags,
24882         mention anon-struct/union members and trailing attributes.
24884 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
24886         PR tree-optimization/84969
24887         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
24888         builtin memset partitions if they set different rhs values.
24890 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24892         PR rtl-optimization/84989
24893         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
24894         VEC_DUPLICATE with scalar result mode.
24896 2018-03-21  Martin Liska  <mliska@suse.cz>
24898         PR ipa/84963
24899         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
24900         not intended return statement.
24902 2018-03-21  Martin Liska  <mliska@suse.cz>
24904         PR target/84988
24905         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
24906         (chkp_find_bound_slots_1): Limit number of iterations.
24908 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
24910         PR target/84838
24911         * Minor grammar fixes for x86 options.
24913 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24915         PR debug/84875
24916         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24917         holding REG_CFA_RESTORE notes, instead turn them into a USE.
24919 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
24921         PR target/83789
24922         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24923         (altivec_lvx_<mode>_1op): Likewise.
24924         (altivec_stvx_<mode>_2op): Likewise.
24925         (altivec_stvx_<mode>_1op): Likewise.
24926         (altivec_lvx_<VM2:mode>): New define_expand.
24927         (altivec_stvx_<VM2:mode>): Likewise.
24928         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24929         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24930         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24931         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24932         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24933         (rs6000_gen_lvx): Likewise.
24934         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24935         (altivec_expand_stv_builtin): Likewise.
24936         (altivec_expand_builtin): Likewise.
24937         * config/rs6000/vector.md: Likewise.
24939 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24941         PR target/82518
24942         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24943         BYTES_BIG_ENDIAN.
24945 2018-03-20  Richard Biener  <rguenther@suse.de>
24947         PR target/84986
24948         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24949         sign-conversions as zero, fall back to standard scalar_stmt
24950         cost for the rest.
24952 2018-03-20  Martin Liska  <mliska@suse.cz>
24954         PR ipa/84825
24955         * predict.c (rebuild_frequencies): Handle case when we have
24956         PROFILE_ABSENT, but flag_guess_branch_prob is false.
24958 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24960         PR target/84990
24961         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24962         flag_section_anchors.
24963         * varasm.c (use_blocks_for_decl_p): Remove hack for
24964         dw2_force_const_mem.
24966         PR target/84845
24967         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24968         to ...
24969         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
24970         be created, use lowpart_subreg of operands[0] rather than operands[0]
24971         itself.
24972         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24973         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24974         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24975         and n constraint instead of aarch64_shift_imm_di and Usd.
24976         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24977         (*aarch64_<optab>_reg_minus<mode>3): ... this.
24979 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
24981         PR target/82989
24982         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24983         to favor GPR over NEON registers.
24984         (<shift>di3_neon): Likewise.
24986 2018-03-20  Tom de Vries  <tom@codesourcery.com>
24988         PR target/84952
24989         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24990         (nvptx_process_pars): Emit bar.sync asap and alap.
24992 2018-03-20  Tom de Vries  <tom@codesourcery.com>
24994         PR target/84954
24995         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24996         seen_label if seen_label is already set.
24998 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
25000         PR target/84945
25001         * config/i386/i386.c (fold_builtin_cpu): For features above 31
25002         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
25003         Use 1U instead of 1.  Formatting fixes.
25005         PR c/84953
25006         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
25007         instead of TREE_TYPE (s1) for the return value.
25009 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
25011         PR tree-optimization/84946
25012         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
25013         bitsize + bitsize in poly_uint64 rather than poly_int64.
25015         PR sanitizer/78651
25016         * dwarf2asm.c: Include fold-const.c.
25017         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
25018         of decl rather than decl itself.
25020         PR rtl-optimization/84643
25021         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
25023 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
25025         PR sanitizer/78651
25026         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
25027         calling assemble_variable.
25029 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
25031         PR target/81647
25032         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
25033         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
25035 2018-03-19  Jim Wilson  <jimw@sifive.com>
25037         PR bootstrap/84856
25038         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
25039         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
25040         (riscv_first_stack_step): Likewise.
25041         (riscv_option_override): Use STACK_BOUNDARY instead of
25042         MIN_STACK_BOUNDARY.
25043         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
25044         MIN_STACK_BOUNDARY.
25045         (BIGGEST_ALIGNMENT): Set to 128.
25046         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
25047         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
25048         STACK_BOUNDARY.
25050 2018-03-19  Richard Biener  <rguenther@suse.de>
25052         PR tree-optimization/84933
25053         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
25054         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
25056 2018-03-19  Richard Biener  <rguenther@suse.de>
25058         PR tree-optimization/84859
25059         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
25060         (cond_if_else_store_replacement): Perform sinking operation on
25061         single-store BBs regardless of MAX_STORES_TO_SINK setting.
25062         Generalize what a BB with a single eligible store is.
25064 2018-03-19  Richard Biener  <rguenther@suse.de>
25066         PR tree-optimization/84929
25067         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
25068         chrec_is_positive against non-chrec arg.
25070 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
25072         PR target/84711
25073         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
25075 2018-03-18  Martin Liska  <mliska@suse.cz>
25077         PR rtl-optimization/84635
25078         * regrename.c (build_def_use): Use matches_mode only when
25079         matches >= 0.
25081 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
25083         PR tree-optimization/84913
25084         * tree-vect-loop.c (vectorizable_reduction): Don't try to
25085         vectorize chains of COND_EXPRs.
25087 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25089         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
25091 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25093         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
25095 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
25097         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
25099 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
25100             Kito Cheng  <kito.cheng@gmail.com>
25102         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
25103         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
25104         (nds32_adjust_reg_alloc_order): New function.
25105         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
25107 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
25109         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
25110         nds32_print_operand, nds32_print_operand_address): Use
25111         HOST_WIDE_INT_PRINT_DEC instead.
25113 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
25115         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
25117 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
25119         PR target/84902
25120         * config/i386/i386.c (initial_ix86_tune_features,
25121         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
25122         unsigned long long.
25123         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
25124         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25125         rather than 1u << ix86_tune.  Formatting fix.
25126         (ix86_option_override_internal): Change ix86_arch_mask from
25127         unsigned int to unsigned HOST_WIDE_INT, initialize to
25128         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25129         (ix86_function_specific_restore): Likewise.
25131 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25133         PR target/84899
25134         * postreload.c (reload_combine_recognize_pattern): Perform
25135         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25136         truncate_int_for_mode the result for the destination's mode.
25138         PR c/84909
25139         * hsa-gen.c (mem_type_for_type): Fix comment typo.
25140         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25141         Likewise.
25142         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25143         Likewise.
25145 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
25147         PR target/84876
25148         * lra-assigns.c (lra_split_hard_reg_for): Don't use
25149         regno_allocno_class_array and sorted_pseudos.
25150         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25151         insns where regno is used.
25153 2018-03-16  Martin Liska  <mliska@suse.cz>
25155         PR ipa/84833
25156         * multiple_target.c (create_dispatcher_calls): Redirect
25157         reference in the symbol table.
25159 2018-03-16  Martin Liska  <mliska@suse.cz>
25161         PR ipa/84722
25162         * multiple_target.c (create_dispatcher_calls): Redirect also
25163         an alias.
25165 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25167         PR c++/79937
25168         PR c++/82410
25169         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25170         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25171         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25173 2018-03-16  Julia Koval  <julia.koval@intel.com>
25175         * doc/invoke.texi (Skylake Server): Add CLWB.
25176         Cannonlake): Remove CLWB.
25178 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25180         PR tree-optimization/84841
25181         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25182         1 << 3.
25183         (FLOAT_ONE_CONST_TYPE): Define.
25184         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25185         (sort_by_operand_rank): Put entries with higher constant_type last
25186         rather than first to match comments.
25188 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
25190         * config/nios2/nios2.md (movsi_internal): Fix thinko in
25191         split predicate.
25193 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25195         PR c++/79085
25196         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25197         check and use address of target always.
25199 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
25201         PR target/84574
25202         * config/i386/i386.c (indirect_thunk_needed): Update comments.
25203         (indirect_thunk_bnd_needed): Likewise.
25204         (indirect_thunks_used): Likewise.
25205         (indirect_thunks_bnd_used): Likewise.
25206         (indirect_return_needed): New.
25207         (indirect_return_bnd_needed): Likewise.
25208         (output_indirect_thunk_function): Add a bool argument for
25209         function return.
25210         (output_indirect_thunk_function): Don't generate alias for
25211         function return thunk.
25212         (ix86_code_end): Call output_indirect_thunk_function to generate
25213         function return thunks.
25214         (ix86_output_function_return): Set indirect_return_bnd_needed
25215         and indirect_return_needed instead of indirect_thunk_bnd_needed
25216         and indirect_thunk_needed.
25218 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
25220         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25221         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25222         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25224 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
25225             Paul Hua <paul.hua.gm@gmail.com>
25227         PR c/84852
25228         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25230 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
25232         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25233         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25234         resp. SFmode cases.
25236 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
25238         PR target/84711
25239         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25240         instead of GET_MODE_SIZE when comparing Units.
25242 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
25244         PR target/68256
25245         * varasm.c (hash_section): Return an unchangeble hash value
25246         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25247         Return !aarch64_can_use_per_function_literal_pools_p ().
25249 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25251         PR target/84860
25252         * optabs.c (emit_conditional_move): Pass address of cmode's copy
25253         rather than address of cmode as last argument to prepare_cmp_insn.
25255 2018-03-15  Julia Koval  <julia.koval@intel.com>
25257         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25258         F_AVX512VNNI, F_AVX512BITALG): New.
25260 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
25262         PR target/83451
25263         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
25264         insn for floating-point loads and stores.
25266 2018-03-14  Carl Love  <cel@us.ibm.com>
25268         * config/rs6000/rs6000-c.c: Add macro definitions for
25269         ALTIVEC_BUILTIN_VEC_PERMXOR.
25270         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25271         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25272         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25273         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25274         UNSPEC_VPERMXOR.
25275         * config/doc/extend.texi: Add prototypes for vec_permxor.
25277 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
25279         PR c/84852
25280         * diagnostic-show-locus.c (class layout_point): Convert m_line
25281         from int to linenum_type.
25282         (line_span::comparator): Use linenum "compare" function when
25283         comparing line numbers.
25284         (test_line_span): New function.
25285         (layout_range::contains_point): Convert param "row" from int to
25286         linenum_type.
25287         (layout_range::intersects_line_p): Likewise.
25288         (layout::will_show_line_p): Likewise.
25289         (layout::print_source_line): Likewise.
25290         (layout::should_print_annotation_line_p): Likewise.
25291         (layout::print_annotation_line): Likewise.
25292         (layout::print_leading_fixits): Likewise.
25293         (layout::annotation_line_showed_range_p): Likewise.
25294         (struct line_corrections): Likewise for field m_row.
25295         (line_corrections::line_corrections): Likewise for param "row".
25296         (layout::print_trailing_fixits): Likewise.
25297         (layout::get_state_at_point): Likewise.
25298         (layout::get_x_bound_for_row): Likewise.
25299         (layout::print_line): Likewise.
25300         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25301         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25302         * input.c (selftest::test_linenum_comparisons): New function.
25303         (selftest::input_c_tests): Call it.
25304         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25305         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25306         * selftest.h (ASSERT_GT): New macro.
25307         (ASSERT_GT_AT): New macro.
25308         (ASSERT_LT): New macro.
25309         (ASSERT_LT_AT): New macro.
25311 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
25313         PR rtl-optimization/84780
25314         * combine.c (distribute_links): Don't make a link based on pc_rtx.
25316 2018-03-14  Martin Liska  <mliska@suse.cz>
25318         * tree.c (record_node_allocation_statistics): Use
25319         get_stats_node_kind.
25320         (get_stats_node_kind): New function extracted from
25321         record_node_allocation_statistics.
25322         (free_node): Use get_stats_node_kind.
25324 2018-03-14  Richard Biener  <rguenther@suse.de>
25326         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25327         that the value-set of ANTIC_IN doesn't grow.
25329         Revert
25330         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25331         member.
25332         (BB_VISITED_WITH_VISITED_SUCCS): New define.
25333         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25335 2018-03-14  Julia Koval  <julia.koval@intel.com>
25337         * config.gcc (icelake-client, icelake-server): New.
25338         (icelake): Remove.
25339         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
25340         (initial_ix86_arch_features): Ditto.
25341         (PTA_SKYLAKE): Add SGX.
25342         (PTA_ICELAKE): Remove.
25343         (PTA_ICELAKE_CLIENT): New.
25344         (PTA_ICELAKE_SERVER): New.
25345         (ix86_option_override_internal): Split up icelake on icelake client and
25346         icelake server.
25347         (get_builtin_code_for_version): Ditto.
25348         (fold_builtin_cpu): Ditto.
25349         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
25350         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
25351         * config/i386/i386.h (processor_type): Ditto.
25352         * doc/invoke.texi: Ditto.
25354 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
25356         PR sanitizer/83392
25357         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
25358         INTEGER_CST offset, add it together with bitpos / 8 and
25359         sign extend based on POINTER_SIZE.
25361         PR target/84844
25362         Revert
25363         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
25365         PR target/78090
25366         * config/i386/constraints.md (Yc): New register constraint.
25367         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
25368         Use Yc constraint for alternative 2 of operand 0.  Remove
25369         preferred_for_speed attribute.
25371 2018-03-14  Richard Biener  <rguenther@suse.de>
25373         PR tree-optimization/84830
25374         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
25375         with the old one to avoid oscillations.
25377 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
25379         PR target/83712
25380         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
25381         pseudos.
25382         (assign_by_spills): Return a flag of reload assignment failure.
25383         Do not process the reload assignment failures.  Do not spill other
25384         reload pseudos if they has the same reg class.  Update n if
25385         necessary.
25386         (lra_assign): Add a return arg.  Set up from the result of
25387         assign_by_spills call.
25388         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25389         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25390         usage_insns if it is not NULL.
25391         (spill_hard_reg_in_range): New function.
25392         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25393         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25394         function prototypes.
25395         (lra_assign): Change prototype.
25396         * lra.c (lra): Add code to deal with fails by splitting hard reg
25397         live ranges.
25399 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
25401         * config/riscv/riscv.opt (mrelax): New option.
25402         * config/riscv/riscv.c (riscv_file_start): Emit ".option
25403         "norelax" when riscv_mrelax is disabled.
25404         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
25406 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25408         PR target/84743
25409         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
25410         reassociation for int modes.
25412 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
25414         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
25415         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
25416         for big-endian.
25417         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
25418         * config/aarch64/aarch64-sve.md
25419         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
25420         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
25421         (*extend<mode><Vwide>2): Rename to...
25422         (aarch64_sve_extend<mode><Vwide>2): ...this.
25423         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
25424         renaming the old pattern to...
25425         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
25426         unsigned packs.
25427         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
25428         define_expand, renaming the old pattern to...
25429         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
25430         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
25431         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
25432         account when deciding which SVE instruction the optab should use.
25433         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
25435 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
25437         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
25438         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
25439         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
25440         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
25441         (tlsdesc_small_<mode>): Turn a define_expand and use
25442         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
25443         (tlsdesc_small_advsimd_<mode>): ...this.
25444         (tlsdesc_small_sve_<mode>): New pattern.
25446 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
25448         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
25449         (UNSPEC_UMUL_HIGHPART): New constants.
25450         (MUL_HIGHPART): New int iteraor.
25451         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
25452         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
25453         define_expand.
25454         (*<su>mul<mode>3_highpart): New define_insn.
25456 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
25458         PR lto/84805
25459         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25460         incomplete types.
25462 2018-03-13  Martin Liska  <mliska@suse.cz>
25464         PR ipa/84658.
25465         * (sem_item_optimizer::sem_item_optimizer): Initialize new
25466         vector.
25467         (sem_item_optimizer::~sem_item_optimizer): Release it.
25468         (sem_item_optimizer::merge_classes): Register variable aliases.
25469         (sem_item_optimizer::fixup_pt_set): New function.
25470         (sem_item_optimizer::fixup_points_to_sets): Likewise.
25471         * ipa-icf.h: Declare new variables and functions.
25473 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
25475         PR middle-end/84834
25476         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
25477         integer_pow2p@2 and test integer_pow2p in condition.
25478         (A < 0 ? C : 0): Similarly for @1.
25480         PR middle-end/84831
25481         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
25482         characters starting at p contain '\0' character, don't look beyond
25483         that.
25485         PR target/84827
25486         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
25487         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
25489         PR target/84828
25490         * reg-stack.c (change_stack): Change update_end var from int to
25491         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
25492         also call set_block_for_insn on the newly added insns and rescan.
25494         PR target/84786
25495         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
25496         on the last operand.
25498         PR c++/84704
25499         * tree.c (stabilize_reference_1): Return save_expr (e) for
25500         STATEMENT_LIST even if it doesn't have side-effects.
25502 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
25504         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
25506 2018-03-12  Renlin Li  <renlin.li@arm.com>
25508         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
25509         aarch64_output_scalar_simd_mov_immediate.
25511 2018-03-12  Martin Sebor  <msebor@redhat.com>
25513         PR tree-optimization/83456
25514         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
25515         for perfectly overlapping calls to memcpy.
25516         (gimple_fold_builtin_memory_chk): Same.
25517         (gimple_fold_builtin_strcpy): Handle no-warning.
25518         (gimple_fold_builtin_stxcpy_chk): Same.
25519         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
25521 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
25523         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
25524         parameter.  Use it for SFmode.
25525         (rs6000_function_arg_advance_1): Adjust.
25526         (rs6000_function_arg): Adjust.
25527         (rs6000_gimplify_va_arg): Pass false for that new parameter.
25529 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
25531         PR rtl-optimization/84169
25532         PR rtl-optimization/84780
25533         * combine.c (can_combine_p): Check for a 2-insn combination whether
25534         the destination register is used between the two insns, too.
25536 2018-03-12  Richard Biener  <rguenther@suse.de>
25538         PR tree-optimization/84803
25539         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
25540         for refs DR analysis didn't process.
25542 2018-03-12  Richard Biener  <rguenther@suse.de>
25544         PR tree-optimization/84777
25545         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
25546         force-vectorize loops ignore whether we are optimizing for size.
25548 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25550         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
25551         (TARGET_MD_ASM_ADJUST): Define.
25553 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
25554             Kito Cheng  <kito.cheng@gmail.com>
25555             Chung-Ju Wu  <jasonwucj@gmail.com>
25557         * config/nds32/nds32.c (nds32_compute_stack_frame,
25558         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
25559         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
25560         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
25561         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
25562         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
25563         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
25564         * config/nds32/nds32.md (prologue, epilogue): Use macro
25565         NDS32_V3PUSH_AVAILABLE_P to do checking.
25567 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
25569         PR debug/58150
25570         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
25571         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
25572         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
25573         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
25574         addition of most attributes on !orig_type_die or the attribute not
25575         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
25577 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
25578             Chung-Ju Wu  <jasonwucj@gmail.com>
25580         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
25581         __NDS32_VH__ macro.
25582         * config/nds32/nds32.opt (mvh): New option.
25584 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
25585             Chung-Ju Wu  <jasonwucj@gmail.com>
25587         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
25588         function.
25589         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
25590         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
25591         definition.
25593 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
25594             Chung-Ju Wu  <jasonwucj@gmail.com>
25596         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
25597         function.
25598         * config/nds32/nds32-multiple.md (strlensi): New pattern.
25599         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
25601 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
25602             Kito Cheng  <kito.cheng@gmail.com>
25603             Chung-Ju Wu  <jasonwucj@gmail.com>
25605         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
25606         UNSPEC_FFMISM and UNSPEC_FLMISM.
25607         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
25608         for ffb, ffmism and flmism.
25609         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
25610         (unspec_ffmism): Ditto.
25611         (unspec_flmism): Ditto.
25612         (nds32_expand_builtin_impl): Check if string extension is available.
25613         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
25614         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
25616 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
25618         Reverting patch:
25619         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25621         PR target/83712
25622         * lra-assigns.c (assign_by_spills): Return a flag of reload
25623         assignment failure.  Do not process the reload assignment
25624         failures.  Do not spill other reload pseudos if they has the same
25625         reg class.
25626         (lra_assign): Add a return arg.  Set up from the result of
25627         assign_by_spills call.
25628         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25629         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25630         usage_insns if it is not NULL.
25631         (spill_hard_reg_in_range): New function.
25632         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25633         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25634         function prototypes.
25635         (lra_assign): Change prototype.
25636         * lra.c (lra): Add code to deal with fails by splitting hard reg
25637         live ranges.
25639 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
25641         PR target/84807
25642         * config/i386/i386.opt: Replace Enforcment with Enforcement.
25644 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
25646         PR debug/84620
25647         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
25648         (dw_val_node): Add val_symbolic_view.
25649         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
25650         (symview_upper_bound): New.
25651         (new_line_info_table): Initialize symviews_since_reset.
25652         (dwarf2out_source_line): Count symviews_since_reset and set
25653         symview_upper_bound.
25654         (dw_val_equal_p): Handle symview.
25655         (add_AT_symview): New.
25656         (print_dw_val): Handle symview.
25657         (attr_checksum, attr_checksum_ordered): Likewise.
25658         (same_dw_val_p, size_of_die): Likewise.
25659         (value_format, output_die): Likewise.
25660         (add_high_low_attributes): Use add_AT_symview for entry_view.
25661         (dwarf2out_finish): Reset symview_upper_bound, clear
25662         zero_view_p.
25664 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
25666         PR target/83969
25667         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
25668         Add strict argument and use it.
25669         (rs6000_split_multireg_move): Update for new strict argument.
25670         (mem_operand_gpr): Disallow all non-offsettable addresses.
25671         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
25673 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
25675         PR target/84772
25676         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
25677         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
25678         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
25680         PR c++/84767
25681         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
25682         decl, use remap_type if we want to use the type.
25684 2018-03-09  Martin Sebor  <msebor@redhat.com>
25686         PR tree-optimization/84526
25687         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25688         Remove dead code.
25689         (builtin_access::generic_overlap): Be prepared to handle non-array
25690         base objects.
25692 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
25694         PR rtl-optimization/84682
25695         * lra-constraints.c (process_address_1): Check is_address flag
25696         for address constraints.
25697         (process_alt_operands): Likewise.
25698         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
25699         preprocess_constraints.
25700         * recog.h (preprocess_constraints): Add oploc parameter.
25701         Adjust callers.
25702         * recog.c (preprocess_constraints): Test address_operand for
25703         CT_ADDRESS constraints.
25705 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25707         PR target/83712
25708         * lra-assigns.c (assign_by_spills): Return a flag of reload
25709         assignment failure.  Do not process the reload assignment
25710         failures.  Do not spill other reload pseudos if they has the same
25711         reg class.
25712         (lra_assign): Add a return arg.  Set up from the result of
25713         assign_by_spills call.
25714         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25715         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25716         usage_insns if it is not NULL.
25717         (spill_hard_reg_in_range): New function.
25718         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25719         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25720         function prototypes.
25721         (lra_assign): Change prototype.
25722         * lra.c (lra): Add code to deal with fails by splitting hard reg
25723         live ranges.
25725 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25727         PR target/83193
25728         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
25729         Accept complain bool parameter.  Only emit errors if it is true.
25730         (arm_parse_cpu_option_name): Likewise.
25731         (arm_target_thumb_only): Adjust callers of the above.
25732         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
25733         prototype to take a default true bool parameter.
25734         (arm_parse_arch_option_name): Likewise.
25736 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
25737             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
25739         PR jit/64089
25740         PR jit/84288
25741         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
25742         * configure: Regenerate.
25743         * configure.ac ("linker --version-script option"): New.
25744         ("linker soname option"): New.
25746 2018-03-09  Richard Biener  <rguenther@suse.de>
25748         PR tree-optimization/84775
25749         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
25750         immediate uses of predicate stmts and mark them modified.
25752         Revert
25753         PR tree-optimization/84178
25754         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25755         to caller.
25756         (version_loop_for_if_conversion): Delay update_ssa call.
25757         (tree_if_conversion): Delay update_ssa until after predicate
25758         insertion.
25760 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
25762         PR target/84763
25763         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
25764         when the function accesses prior frames.
25766 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
25768         PR debug/84456
25769         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
25770         gen_llsym, otherwise call maybe_gen_llsym.
25772         PR inline-asm/84742
25773         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
25774         has ',' character inside of it.
25776 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25778         PR target/84748
25779         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
25780         as clobbering CC_REGNUM.
25782 2018-03-08  Richard Biener  <rguenther@suse.de>
25784         PR middle-end/84552
25785         * tree-scalar-evolution.c: Include tree-into-ssa.h.
25786         (follow_copies_to_constant): Do not follow SSA names registered
25787         for update.
25789 2018-03-08  Richard Biener  <rguenther@suse.de>
25791         PR tree-optimization/84178
25792         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25793         to caller.
25794         (version_loop_for_if_conversion): Delay update_ssa call.
25795         (tree_if_conversion): Delay update_ssa until after predicate
25796         insertion.
25798 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
25800         PR tree-optimization/84178
25801         * tree-if-conv.c (release_bb_predicate): Remove the
25802         the assertion that the stmts have NULL use_ops.
25803         Discard the statements, asserting that they haven't
25804         yet been added to a BB.
25806 2018-03-08  Richard Biener  <rguenther@suse.de>
25808         PR tree-optimization/84746
25809         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
25810         (phi_translate): Pass in destination ANTIC_OUT set.
25811         (phi_translate_1): Likewise.  For a simplified result lookup
25812         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
25813         (phi_translate_set): Adjust.
25814         (do_pre_regular_insertion): Likewise.
25815         (do_pre_partial_partial_insertion): Likewise.
25817 2018-03-08  Martin Liska  <mliska@suse.cz>
25819         PR gcov-profile/84735
25820         * doc/gcov.texi: Document usage of profile files.
25821         * gcov-io.h: Document changes in the format.
25823 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
25825         PR debug/84404
25826         PR debug/84408
25827         * dwarf2out.c (struct dw_line_info_table): Update comments for
25828         view == -1.
25829         (FORCE_RESET_NEXT_VIEW): New.
25830         (FORCE_RESETTING_VIEW_P): New.
25831         (RESETTING_VIEW_P): Check for -1 too.
25832         (ZERO_VIEW_P): Likewise.
25833         (new_line_info_table): Force-reset next view.
25834         (dwarf2out_begin_function): Likewise.
25835         (dwarf2out_source_line): Simplify zero_view_p initialization.
25836         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
25837         view directly.  Omit view when omitting .loc at line 0.
25839 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
25841         PR tree-optimization/84740
25842         * tree-switch-conversion.c (process_switch): Call build_constructors
25843         only if info.phi_count is non-zero.
25845         PR tree-optimization/84739
25846         * tree-tailcall.c (find_tail_calls): Check call arguments against
25847         DECL_ARGUMENTS (current_function_decl) rather than
25848         DECL_ARGUMENTS (func) when checking for tail recursion.
25850 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
25852         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
25853         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
25854         Volker Reichelt's entry and add entries for people that perform
25855         GCC fuzzy testing and report numerous bugs.
25857 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
25859         PR target/82411
25860         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
25861         readonly data in sdata, if that is disabled.
25862         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
25863         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
25864         -mreadonly-in-sdata option.
25866 2018-03-07  Martin Sebor  <msebor@redhat.com>
25868         PR tree-optimization/84468
25869         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
25870         basic block when looking for nul assignment.
25872 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
25874         PR target/84277
25875         * except.h (output_function_exception_table): Adjust prototype.
25876         * except.c (output_function_exception_table): Remove FNNAME parameter
25877         and add SECTION parameter.  Ouput one part of the table at a time.
25878         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
25879         the first part of the exception table and emit unwind directives.
25880         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
25881         (i386_pe_seh_cold_init): Likewise.
25882         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
25883         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
25884         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
25885         (ix86_output_call_insn): Emit a nop in one more case for SEH.
25886         * config/i386/winnt.c: Include except.h.
25887         (struct seh_frame_state): Add reg_offset, after_prologue and
25888         in_cold_section fields.
25889         (i386_pe_seh_end_prologue): Set seh->after_prologue.
25890         (i386_pe_seh_cold_init): New function.
25891         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
25892         to seh->in_cold_section.
25893         (seh_emit_push): Record the offset of the push.
25894         (seh_emit_save): Record the offet of the save.
25895         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
25896         Test seh->after_prologue to disregard the epilogue.
25897         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
25898         (i386_pe_end_cold_function): New function.
25900 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
25902         PR fortran/84565
25903         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
25904         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
25906         PR c++/84704
25907         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
25908         on tmp_var.
25909         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25910         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25912         PR middle-end/84723
25913         * multiple_target.c: Include tree-inline.h and intl.h.
25914         (expand_target_clones): Diagnose and fail if node->definition and
25915         !tree_versionable_function_p (node->decl).
25917 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
25919         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25920         sprint_ul.
25921         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25922         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25923         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25925 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
25927         PR target/84710
25928         * combine.c (try_combine): Use reg_or_subregno instead of handling
25929         just paradoxical SUBREGs and REGs.
25931 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
25933         * config/arc/arc.c (arc_finalize_pic): Remove function.
25934         (arc_must_save_register): We use single base PIC register, remove
25935         checks to save/restore the PIC register.
25936         (arc_expand_prologue): Likewise.
25937         * config/arc/arc-protos.h (arc_set_default_type_attributes):
25938         Remove.
25939         (arc_verify_short): Likewise.
25940         (arc_attr_type): Likewise.
25941         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25942         (walk_stores): Likewise.
25943         (arc_address_cost): Make it static.
25944         (arc_verify_short): Likewise.
25945         (branch_dest): Likewise.
25946         (arc_attr_type): Likewise.
25947         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25948         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25949         (arc_final_prescan_insn): Remove inserting the nops due to
25950         hardware hazards.  It is done in reorg step.
25951         (insn_length_variant_t): Remove.
25952         (insn_length_parameters_t): Likewise.
25953         (arc_insn_length_parameters): Likewise.
25954         (arc_get_insn_variants): Likewise.
25955         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25957 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
25959         PR inline-asm/84683
25960         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25961         assertion failure.
25963         PR tree-optimization/84687
25964         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25965         on new_node->decl.
25966         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25968 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25970         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25971         Rename to ppc_speculation_barrier.
25972         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25973         __builtin_ppc_speculation_barrier.
25975 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
25977         PR target/84700
25978         * combine.c (combine_simplify_rtx): Don't try to simplify if
25979         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25980         are equal to x.
25982 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
25984         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25985         to 32 bytes when compiling for POWER9.
25987 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
25989         PR target/84564
25990         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25991         regparm >= 3 with no arg reg available also for calls with
25992         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
25994         PR target/84524
25995         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25996         orig,vex.
25997         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
25999 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
26001         PR target/84264
26002         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
26004 2018-03-05  Richard Biener  <rguenther@suse.de>
26006         PR tree-optimization/84486
26007         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
26008         When inserting a __builtin_assume_aligned call set the LHS
26009         SSA name alignment info accordingly.
26011 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
26013         PR tree-optimization/84114
26014         * config/aarch64/aarch64.c (aarch64_reassociation_width)
26015         Avoid reassociation of FLOAT_MODE addition.
26017 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
26019         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
26020         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
26021         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
26022         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
26023         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
26024         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
26025         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
26026         and -mwbnoinvd.
26027         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
26028         __builtin_ia32_wbinvd): New builtins.
26029         (SPECIAL_ARGS2): New.
26030         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
26031         (SPECIAL_ARGS2): New.
26032         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
26033         (ix86_valid_target_attribute_inner_p): Ditto.
26034         (ix86_init_mmx_sse_builtins): Add special_args2.
26035         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
26036         TARGET_WBNOINVD_P): New.
26037         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
26038         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
26039         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
26040         * config/i386/immintrin.h (_wbinvd): New intrinsic.
26041         * config/i386/pconfigintrin.h: New file.
26042         * config/i386/wbnoinvdintrin.h: Ditto.
26043         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
26044         wbnoinvdintrin.h.
26045         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
26047 2018-03-05  Richard Biener  <rguenther@suse.de>
26049         PR tree-optimization/84670
26050         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26051         member.
26052         (BB_VISITED_WITH_VISITED_SUCCS): New define.
26053         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26054         (compute_antic_aux): Only assert the number of values in ANTIC_IN
26055         doesn't grow if all successors (recursively) were visited at least
26056         once.
26058 2018-03-05  Richard Biener  <rguenther@suse.de>
26060         PR tree-optimization/84650
26061         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
26062         if executed in the loop pipeline.
26064 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
26066         * doc/configfiles.texi (Configuration Files): Move info about
26067         conditionalizing $target-protos.h to...
26068         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
26069         differs from $target-protos.h.
26071 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
26072             Chung-Ju Wu  <jasonwucj@gmail.com>
26074         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
26075         * config/nds32/nds32-multiple.md (setmemsi): Define.
26076         * config/nds32/nds32-memory-manipulation.c
26077         (nds32_gen_dup_4_byte_to_word_value): New.
26078         (emit_setmem_word_loop): New.
26079         (emit_setmem_byte_loop): New.
26080         (nds32_expand_setmem_loop): New.
26081         (nds32_expand_setmem_loop_v3m): New.
26082         (nds32_expand_setmem_unroll): New.
26083         (nds32_expand_setmem): New.
26085 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26086             Chung-Ju Wu  <jasonwucj@gmail.com>
26088         * config/nds32/nds32-memory-manipulation.c
26089         (nds32_emit_load_store): New.
26090         (nds32_emit_post_inc_load_store): New.
26091         (nds32_emit_mem_move): New.
26092         (nds32_emit_mem_move_block): New.
26093         (nds32_expand_movmemsi_loop_unknown_size): New.
26094         (nds32_expand_movmemsi_loop_known_size): New.
26095         (nds32_expand_movmemsi_loop): New.
26096         (nds32_expand_movmemsi_unroll): New.
26097         (nds32_expand_movmemqi): Rename ...
26098         (nds32_expand_movmemsi): ... to this.
26099         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
26100         (movmemsi): ... to this.
26101         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
26102         (nds32_expand_movmemsi): ... to this.
26104 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26105             Monk Chiang  <sh.chiang04@gmail.com>
26106             Chung-Ju Wu  <jasonwucj@gmail.com>
26108         * config/nds32/nds32-protos.h
26109         (nds32_expand_load_multiple): New arguments.
26110         (nds32_expand_store_multiple): Ditto.
26111         (nds32_valid_multiple_load_store): Rename ...
26112         (nds32_valid_multiple_load_store_p): ... to this.
26113         * config/nds32/nds32-memory-manipulation.c
26114         (nds32_expand_load_multiple): Refine implementation.
26115         (nds32_expand_store_multiple): Ditto.
26116         * config/nds32/nds32-multiple.md
26117         (load_multiple): Update nds32_expand_load_multiple interface.
26118         (store_multiple): Update nds32_expand_store_multiple interface.
26119         * config/nds32/nds32-predicates.c
26120         (nds32_valid_multiple_load_store): Rename ...
26121         (nds32_valid_multiple_load_store_p): ... to this and refine
26122         implementation.
26123         * config/nds32/predicates.md
26124         (nds32_load_multiple_and_update_address_operation): New predicate.
26125         (nds32_store_multiple_and_update_address_operation): New predicate.
26127 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26128             Chung-Ju Wu  <jasonwucj@gmail.com>
26130         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26131         (combo): New attribute.
26132         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26134 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
26136         * config/nds32/nds32.opt: Change -mcmodel= default value.
26138 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
26139             Monk Chiang  <sh.chiang04@gmail.com>
26140             Chung-Ju Wu  <jasonwucj@gmail.com>
26142         * config/nds32/constants.md (unspec_element): New enum.
26143         * config/nds32/constraints.md (Umw): New constraint.
26144         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26145         * config/nds32/nds32-intrinsic.md: Likewise.
26146         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26147         (nds32_valid_smw_lwm_base_p): New.
26148         (nds32_output_smw_single_word): New.
26149         (nds32_output_lmw_single_word): New.
26150         (nds32_expand_unaligned_load): New.
26151         (nds32_expand_unaligned_store): New.
26152         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26153         (nds32_output_smw_single_word): Declare.
26154         (nds32_output_lmw_single_word): Declare.
26155         (nds32_expand_unaligned_load): Declare.
26156         (nds32_expand_unaligned_store): Declare.
26157         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26158         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26159         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26160         NDS32_BUILTIN_UASTORE_DW.
26161         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26162         predicate.
26164 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
26165             Kito Cheng  <kito.cheng@gmail.com>
26166             Chung-Ju Wu  <jasonwucj@gmail.com>
26168         * config/nds32/nds32-intrinsic.c
26169         (nds32_expand_builtin_null_ftype_reg): Delete.
26170         (nds32_expand_builtin_reg_ftype_imm): Ditto.
26171         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26172         (nds32_read_argument): New.
26173         (nds32_legitimize_target): Ditto.
26174         (nds32_legitimize_argument): Ditto.
26175         (nds32_check_constant_argument): Ditto.
26176         (nds32_expand_unop_builtin): Ditto.
26177         (nds32_expand_unopimm_builtin): Ditto.
26178         (nds32_expand_binop_builtin): Ditto.
26179         (nds32_builtin_decl_impl): Ditto.
26180         (builtin_description): Ditto.
26181         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26182         (nds32_init_builtins_impl): Ditto.
26183         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26184         (nds32_builtin_decl): New.
26185         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26186         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26188 2018-03-02  Jeff Law  <law@redhat.com>
26190         * reorg.c (stop_search_p): Handle DEBUG_INSN.
26191         (redundant_insn, fill_simple_delay_slots): Likewise.
26192         (fill_slots_from_thread): Likewise.
26193         * resource.c (mark_referenced_resources): Likewise.
26194         (mark_set_resources, find_dead_or_set_registers): Likewise.
26196 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26198         * substring-locations.h (format_warning_va): Formatting fix for
26199         ATTRIBUTE_GCC_DIAG.
26200         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26201         argument.
26202         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26203         * substring-locations.c: Include intl.h.
26204         (format_warning_va): Turned into small wrapper around
26205         format_warning_n_va, renamed to ...
26206         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26207         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26208         use ngettext.
26209         (format_warning_at_substring_n): New function.
26210         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26211         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
26212         format_warning_at_substring with just a shorter name instead of
26213         const function pointer.
26214         (fmtwarn_n): New function.
26215         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26216         appropriate, get rid of all the fmtstr temporaries, move conditionals
26217         with G_() wrapped string literals directly into fmtwarn arguments,
26218         cast dir.len to (int), formatting fixes.
26220 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
26222         * doc/invoke.texi: Remove "Cilk Plus" references.
26224 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26225             Richard Biener  <rguenther@suse.de>
26227         PR ipa/84628
26228         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26229         for error or warning attributes if CALL_FROM_THUNK_P is set.
26230         Formatting fixes.
26232 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26234         PR target/56540
26235         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26236         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26238         PR target/56540
26239         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26240         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26242         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26243         instead of -1U in last predictors element's probability member.
26245 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
26247         PR ipa/83983
26248         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26249         arguments if they are comparable.
26251 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26253         PR tree-optimization/84634
26254         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26255         masks and masked_loop_p with a single loop_masks, making sure it's
26256         null for bb vectorization.
26258 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26260         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26261         (vect_analyze_data_ref_access): Use loop->safe_len rather than
26262         loop->force_vectorize to check whether there is no alias.
26264 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26266         PR target/84614
26267         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26268         prototypes.
26269         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26270         comments.
26271         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26272         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26273         instead of a loop around prev_real_insn.
26274         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26275         prev_real_insn.
26277         PR inline-asm/84625
26278         * config/i386/i386.c (ix86_print_operand): Use conditional
26279         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26280         zero vector.
26282 2018-03-02  Richard Biener  <rguenther@suse.de>
26284         PR tree-optimization/84427
26285         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26286         (bitmap_set_subtract_values): Rewrite to handle multiple
26287         exprs per value.
26288         (clean): Likewise.
26289         (prune_clobbered_mems): Likewise.
26290         (phi_translate): Take edge instead of pred/phiblock.
26291         (phi_translate_1): Likewise.
26292         (phi_translate_set): Likewise.  Insert all translated
26293         exprs for a value into the set, keeping possibly multiple
26294         expressions per value.
26295         (compute_antic_aux): Adjust for phi_translate changes.
26296         When intersecting union the expressions and prune those
26297         not in the final value set, keeping possibly multiple
26298         expressions per value.  Do not use value-insertion
26299         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26300         all expressions.  Add verification that the value-sets
26301         only shrink during iteration.
26302         (compute_partial_antic_aux): Adjust for the phi_translate changes.
26303         (do_pre_regular_insertion): Likewise.
26304         (do_pre_partial_partial_insertion): Likewise.
26306 2018-03-02  Richard Biener  <rguenther@suse.de>
26308         PR target/82005
26309         * config/darwin.c (saved_debug_info_level): New static global.
26310         (darwin_asm_lto_start): Disable debug info generation for LTO out.
26311         (darwin_asm_lto_end): Restore debug info generation settings.
26313 2018-03-01  Martin Liska  <mliska@suse.cz>
26315         PR sanitizer/82484
26316         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26317         volatile arguments.
26319 2018-03-01  Richard Biener  <rguenther@suse.de>
26321         PR debug/84645
26322         * dwarf2out.c (gen_variable_die): Properly handle late VLA
26323         type annotation with LTO when debug was disabled at compile-time.
26325 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
26327         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26328         XINT with INTVAL.
26329         (mips_final_postscan_insn): Likewise.
26331 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
26333         PR rtl-optimization/84528
26334         * alias.c (init_alias_target): Add commentary.
26335         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
26336         a unique base value if the frame pointer is not eliminated
26337         to the stack pointer.
26339 2018-03-01  Tom de Vries  <tom@codesourcery.com>
26341         PR rtl-optimization/83327
26342         * lra-int.h (hard_regs_spilled_into): Declare.
26343         * lra.c (hard_regs_spilled_into): Define.
26344         (init_reg_info): Init hard_regs_spilled_into.
26345         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
26346         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
26347         (process_bb_lives): Handle hard_regs_spilled_into.
26348         (lra_create_live_ranges_1): Before doing liveness propagation, clear
26349         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
26351 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
26353         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
26354         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
26355         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
26356         * config/rs6000/aix72.h: New file.
26358 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
26360         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
26361         instead of warning_at with conditional singular and plural messages
26362         where possible.
26364         PR target/52991
26365         * stor-layout.c (update_alignment_for_field): For
26366         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
26367         && !DECL_PACKED (field), do the alignment update, just use
26368         only desired_align instead of MAX (type_align, desired_align)
26369         as the alignment.
26370         (place_field): Don't do known_align < desired_align handling
26371         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
26372         is non-NULL, instead do it after rli->prev_field handling and
26373         only if not within a bitfield word.  For DECL_PACKED (field)
26374         use type_align of BITS_PER_UNIT.
26376 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
26378         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
26379         superfluous parentheses and trailing spaces.
26381 2018-02-28  Richard Biener  <rguenther@suse.de>
26383         PR tree-optimization/84584
26384         * graphite-scop-detection.c (scop_detection::add_scop): Discard
26385         SCoPs with fake exit edge.
26387 2018-02-28  Martin Liska  <mliska@suse.cz>
26389         PR testsuite/84597
26390         * timevar.c (timer::print): Fix format to properly print 100%
26391         values.
26393 2018-02-28  Richard Biener  <rguenther@suse.de>
26395         PR middle-end/84607
26396         * genmatch.c (capture_info::walk_match): Do not mark
26397         captured expressions without operands as expr_p given
26398         they act more like predicates and should be subject to
26399         "lost tail" side-effect preserving.
26401 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
26403         PR rtl-optimization/81611
26404         * auto-inc-dec.c (attempt_change): Move dead note from
26405         mem_insn if it's the next use of regno
26406         (find_address): Take address use of reg holding
26407         non-incremented value.  Add parm to limit search to the named
26408         reg only.
26409         (merge_in_block): Attempt to use a mem insn that is the next
26410         use of the original regno.
26412 2018-02-27  Martin Sebor  <msebor@redhat.com>
26414         PR c++/83871
26415         * doc/invoke.texi (-Wmissing-attributes): New option.
26416         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
26418 2018-02-27  Martin Sebor  <msebor@redhat.com>
26420         PR translation/84207
26421         * diagnostic-core.h (warning_n, error_n, inform_n): Change
26422         n argument to unsigned HOST_WIDE_INT.
26423         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
26424         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
26425         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
26426         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
26428 2018-02-27  Richard Biener  <rguenther@suse.de>
26430         PR tree-optimization/84512
26431         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
26432         Do not use the estimate returned from record_stmt_cost for
26433         the scalar iteration cost but sum properly using add_stmt_cost.
26435 2018-02-27  Richard Biener  <rguenther@suse.de>
26437         PR tree-optimization/84466
26438         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26439         Adjust last change to less strictly validate use operands.
26441 2018-02-27  Martin Liska  <mliska@suse.cz>
26443         PR gcov-profile/84548
26444         * gcov.c (process_file): Allow partial overlap and consider it
26445         also as group functions.
26446         (output_lines): Properly calculate range of lines for a group.
26448 2018-02-27  Martin Liska  <mliska@suse.cz>
26450         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
26451         'ggc' suffixes.  Change first column width.
26452         (timer::print): Fix formatting of the column.
26454 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
26456         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
26457         preserve inline entry blocks for the sake of debug inline
26458         entry point markers alone.
26459         (remove_unused_locals): Suggest in comments a better place to
26460         force the preservation of inline entry blocks that are
26461         otherwise unused, but do not preserve them.
26463 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
26465         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
26467 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
26469         PR target/84039
26470         * config/i386/constraints.md (Bs): Replace
26471         ix86_indirect_branch_register with
26472         TARGET_INDIRECT_BRANCH_REGISTER.
26473         (Bw): Likewise.
26474         * config/i386/i386.md (indirect_jump): Likewise.
26475         (tablejump): Likewise.
26476         (*sibcall_memory): Likewise.
26477         (*sibcall_value_memory): Likewise.
26478         Peepholes of indirect call and jump via memory: Likewise.
26479         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
26480         (*sibcall_value_GOT_32): Likewise.
26481         * config/i386/predicates.md (indirect_branch_operand): Likewise.
26482         (GOT_memory_operand): Likewise.
26483         (call_insn_operand): Likewise.
26484         (sibcall_insn_operand): Likewise.
26485         (GOT32_symbol_operand): Likewise.
26486         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
26488 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
26490         PR rtl-optimization/83496
26491         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
26492         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
26493         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
26494         redundant insn, if any.
26495         (relax_delay_slots): Likewise.
26496         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
26498 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
26500         PR tree-optimization/83965
26501         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
26502         that grouped statements are part of a reduction chain.  Return
26503         true if the statement is not marked as a reduction itself but
26504         is part of a group.
26505         (vect_recog_dot_prod_pattern): Don't check whether the statement
26506         is part of a group here.
26507         (vect_recog_sad_pattern): Likewise.
26508         (vect_recog_widen_sum_pattern): Likewise.
26510 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
26512         PR debug/84545
26513         * final.c (rest_of_clean_state): Also look for calls inside sequences.
26515 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
26517         PR target/84530
26518         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
26519         the bool argument.
26520         (ix86_output_indirect_function_return): New prototype.
26521         (ix86_split_simple_return_pop_internal): Likewise.
26522         * config/i386/i386.c (indirect_return_via_cx): New.
26523         (indirect_return_via_cx_bnd): Likewise.
26524         (indirect_thunk_name): Handle return va CX_REG.
26525         (output_indirect_thunk_function): Create alias for
26526         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
26527         (ix86_output_indirect_jmp): Remove the bool argument.
26528         (ix86_output_indirect_function_return): New function.
26529         (ix86_split_simple_return_pop_internal): Likewise.
26530         * config/i386/i386.md (*indirect_jump): Don't pass false
26531         to ix86_output_indirect_jmp.
26532         (*tablejump_1): Likewise.
26533         (simple_return_pop_internal): Change it to define_insn_and_split.
26534         Call ix86_split_simple_return_pop_internal to split it for
26535         -mfunction-return=.
26536         (simple_return_indirect_internal): Call
26537         ix86_output_indirect_function_return instead of
26538         ix86_output_indirect_jmp.
26540 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
26542         PR bootstrap/84405
26543         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
26544         memset and value initialization afterwards.
26546 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
26548         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
26550 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
26552         PR target/84521
26553         * common/config/aarch64/aarch64-common.c
26554         (aarch_option_optimization_table[]): Switch
26555         off fomit-frame-pointer
26557 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
26558             Chung-Ju Wu  <jasonwucj@gmail.com>
26560         * config/nds32/nds32-multiple.md (load_multiple): Disallow
26561         volatile memory.
26562         (store_multiple): Ditto.
26564 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
26566         * config.gcc: Add --with-cpu support for nds32 target.
26567         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
26568         * config/nds32/nds32.opt: Add -mcpu= option.
26570 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
26572         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
26573         isel=yes): Warn for these deprecated options.
26575 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
26577         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
26578         ISA_2_5_MASKS_EMBEDDED.
26580 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
26582         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
26583         p->max as pointers rather than using iterative_hash_expr.
26585 2018-02-23  Carl Love  <cel@us.ibm.com>
26587         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
26588         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
26589         BU_P8V_OVERLOAD_2.
26590         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
26591         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
26592         P8V_BUILTIN_VEC_VUNSIGNED2.
26594 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
26596         PR target/81572
26597         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
26598         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
26599         LRA_UNKNOWN_ALT.
26600         * lra-constraints.c (curr_insn_transform): Set up
26601         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
26602         LRA_UNKNOWN_ALT.
26603         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
26604         * lra-eliminations.c (spill_pseudos): Ditto.
26605         (process_insn_for_elimination): Ditto.
26606         * lra-lives.c (reg_early_clobber_p): Use the new macros.
26607         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
26608         LRA_NON_CLOBBERED_ALT.
26610 2018-02-22  Martin Sebor  <msebor@redhat.com>
26612         PR tree-optimization/84480
26613         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
26614         to maybe_diag_stxncpy_trunc.  Call it.
26615         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
26616         from gimple_fold_builtin_strcpy.  Print inlining stack.
26617         (handle_builtin_stxncpy): Print inlining stack.
26618         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
26620 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
26622         PR target/84176
26623         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
26624         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
26625         and -fcheck-pointer-bounds are used together.
26626         (indirect_thunk_prefix): New enum.
26627         (indirect_thunk_need_prefix): New function.
26628         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
26629         "_nt" instead of "_bnd" for NOTRACK prefix.
26630         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
26631         (output_indirect_thunk_function): Likewise.
26632         (): Likewise.
26633         (ix86_code_end): Update output_indirect_thunk_function calls.
26634         (ix86_output_indirect_branch_via_reg): Replace
26635         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
26636         (ix86_output_indirect_branch_via_push): Likewise.
26637         (ix86_output_function_return): Likewise.
26638         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
26639         incompatible with -fcf-protection=branch and
26640         -fcheck-pointer-bounds.
26642 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
26644         PR target/83335
26645         * config/aarch64/aarch64.c (aarch64_print_address_internal):
26646         Change gcc_assert call to output_operand_lossage.
26648 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
26650         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
26652 2018-02-22  DJ Delorie  <dj@redhat.com>
26653             Sebastian Perta  <sebastian.perta@renesas.com>
26654             Oleg Endo  <olegendo@gcc.gnu.org>
26656         * config/rx/rx.c (rx_rtx_costs): New function.
26657         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
26659 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26661         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
26663 2018-02-22  Martin Liska  <mliska@suse.cz>
26665         PR driver/83193
26666         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
26667         Add "native" as a possible value.
26669 2018-02-22  Martin Liska  <mliska@suse.cz>
26671         PR driver/83193
26672         * config/i386/i386.c (ix86_option_override_internal):
26673         Add "native" as a possible value for -march and -mtune.
26675 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
26677         PR target/84502
26678         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
26679         to all type variants.
26681         PR tree-optimization/84503
26682         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
26683         width as info->bitpos + info->bitsize - start.
26684         (merged_store_group::merge_overlapping): Simplify width computation.
26685         (check_no_overlap): New function.
26686         (imm_store_chain_info::try_coalesce_bswap): Compute expected
26687         start + width and last_order of the group, fail if check_no_overlap
26688         fails.
26689         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
26690         to group if check_no_overlap fails.
26692 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
26694         * config/rs6000/altivec.md: Delete contraint arguments to
26695         define_expand, define_split, and define_peephole2, and in
26696         define_insn_and_split if always unused.
26697         * config/rs6000/darwin.md: Ditto.
26698         * config/rs6000/dfp.md: Ditto.
26699         * config/rs6000/rs6000.md: Ditto.
26700         * config/rs6000/sync.md: Ditto.
26701         * config/rs6000/vector.md: Ditto.
26702         * config/rs6000/vsx.md: Ditto.
26704 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
26706         * config/rs6000/altivec.md: Write output control strings as braced
26707         blocks instead of double-quoted strings.
26708         * config/rs6000/darwin.md: Ditto.
26709         * config/rs6000/rs6000.md: Ditto.
26710         * config/rs6000/vector.md: Ditto.
26711         * config/rs6000/vsx.md: Ditto.
26713 2018-02-21  Jason Merrill  <jason@redhat.com>
26715         PR c++/84314 - ICE with templates and fastcall attribute.
26716         * attribs.c (build_type_attribute_qual_variant): Remove assert.
26718 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
26720         * ipa-cp.c (determine_versionability): Fix comment typos.
26722 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
26724         PR c/84229
26725         * ipa-cp.c (determine_versionability): Do not version functions caling
26726         va_arg_pack.
26728 2018-02-21  Martin Liska  <mliska@suse.cz>
26730         PR driver/83193
26731         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
26732         Add "native" as a possible value.
26733         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
26734         the macro when native cpu detection is available.
26736 2018-02-21  Martin Liska  <mliska@suse.cz>
26738         PR driver/83193
26739         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
26740         Add "native" as a possible value.
26741         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
26742         when native cpu detection is available.
26744 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
26745             Martin Sebor  <msebor@redhat.com>
26747         PR tree-optimization/84478
26748         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
26749         false.
26750         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
26751         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
26752         support which is conservatively correct, for 2 only stay conservative
26753         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
26754         argument to the 2 argument get_range_strlen, adjust 6 arg
26755         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
26756         false.
26757         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
26758         (gimple_fold_builtin_strlen): Pass true as last argument to
26759         get_range_strlen.
26761 2018-02-20  Martin Sebor  <msebor@redhat.com>
26763         PR middle-end/84095
26764         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
26765         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
26766         (builtin_memref::builtin_memref): Factor out parts into
26767         set_base_and_offset and call it.
26769 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
26771         PR middle-end/84406
26772         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
26773         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
26774         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
26775         search at the associated MODE_INT.
26777 2018-02-20  Jeff Law  <law@redhat.com>
26779         PR middle-end/82123
26780         PR tree-optimization/81592
26781         PR middle-end/79257
26782         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
26783         for range data rather than using global data.
26784         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
26785         range data rather than using global data.
26786         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
26787         pass it to children as needed.
26788         (struct directive::fmtresult): Similarly.
26789         (struct directive::set_width): Similarly.
26790         (struct directive::set_precision): Similarly.
26791         (format_integer, format_directive, parse_directive): Similarly.
26792         (format_none): Accept unnamed vr_values parameter.
26793         (format_percent, format_floating, format_character): Similarly.
26794         (format_string, format_plain): Similarly.
26795         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
26796         the EVRP range analyzer for range data rather than using global data.
26797         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
26798         gimple-ssa-evrp-analyze.h
26799         (class sprintf_dom_walker): Add after_dom_children member function.
26800         Add evrp_range_analyzer member.
26801         (sprintf_dom_walker::before_dom_children): Call into the EVRP
26802         range analyzer as needed.
26803         (sprintf_dom_walker::after_dom_children): New member function.
26804         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
26805         if not optimizing.
26806         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
26807         (evrp_range_analyzer::pop_to_marker): Likewise.
26809 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
26811         PR tree-optimization/84419
26812         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
26813         with the required type if its current type is compatible but
26814         different.
26816 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
26818         PR middle-end/82004
26819         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
26820         after vectorization.
26822 2018-02-20  Martin Liska  <mliska@suse.cz>
26824         PR driver/83193
26825         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
26826         possible values if we don't have a hint.
26828 2018-02-20  Martin Liska  <mliska@suse.cz>
26830         PR c/84310
26831         PR target/79747
26832         * final.c (shorten_branches): Build align_tab array with one
26833         more element.
26834         * opts.c (finish_options): Add alignment option limit check.
26835         (MAX_CODE_ALIGN): Likewise.
26836         (MAX_CODE_ALIGN_VALUE): Likewise.
26837         * doc/invoke.texi: Document maximum allowed option value for
26838         all -falign-* options.
26840 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
26842         PR target/84146
26843         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
26844         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
26845         * var-tracking.c (emit_note_insn_var_location): Remove all references
26846         to NOTE_INSN_CALL_ARG_LOCATION.
26847         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
26848         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
26849         Use copy_rtx_if_shared.
26850         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
26851         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
26852         (dwarf2out_var_location): Remove handling of
26853         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
26854         on call_insn.
26855         * final.c (final_scan_insn): Remove all references to
26856         NOTE_INSN_CALL_ARG_LOCATION.
26857         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
26858         before dumping final insns.
26859         * except.c (emit_note_eh_region_end): Remove all references to
26860         NOTE_INSN_CALL_ARG_LOCATION.
26861         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
26862         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
26863         * config/arc/arc.c (hwloop_optimize): Likewise.
26864         * config/arm/arm.c (create_fix_barrier): Likewise.
26865         * config/s390/s390.c (s390_chunkify_start): Likewise.
26866         * config/sh/sh.c (find_barrier): Likewise.
26867         * config/i386/i386.c (rest_of_insert_endbranch,
26868         ix86_seh_fixup_eh_fallthru): Likewise.
26869         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
26870         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
26871         * config/frv/frv.c (frv_function_prologue): Likewise.
26872         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
26873         reg note.
26874         (note_outside_basic_block_p): Remove all references to
26875         NOTE_INSN_CALL_ARG_LOCATION.
26876         * gengtype.c (adjust_field_rtx_def): Likewise.
26877         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
26878         Likewise.
26879         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
26880         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
26882         PR c++/84444
26883         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
26884         is ADDR_EXPR.
26886         PR tree-optimization/84452
26887         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
26888         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
26889         is NULL.
26891 2018-02-19  Martin Liska  <mliska@suse.cz>
26893         PR sanitizer/82183
26894         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
26896 2018-02-19  Martin Liska  <mliska@suse.cz>
26897             Richard Sandiford  <richard.sandiford@linaro.org>
26899         PR tree-optimization/82491
26900         * gimple-fold.c (get_base_constructor): Make earlier bail out
26901         to prevent ubsan.
26903 2018-02-19  Carl Love  <cel@us.ibm.com>
26905         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
26906         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
26907         BU_P8V_OVERLOAD_1.
26908         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
26909         P8V_BUILTIN_VEC_NEG.
26911 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
26913         * config/rl78/rl78.md (movdf): New define expand.
26915 2018-02-19  Martin Liska  <mliska@suse.cz>
26917         PR other/80589
26918         * doc/invoke.texi: Fix typo.
26919         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26921 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
26923         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26924         handle rs6000_single_float and rs6000_double_float specially for
26925         e500 family CPUs.
26927 2018-02-16  Jeff Law  <law@redhat.com>
26929         * config/rx/rx.c (add_pop_cfi_notes): New function.;
26930         (pop_regs): Use it.
26932 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
26934         PR ipa/84425
26935         * ipa-inline.c (inline_small_functions): Fix a typo.
26937 2018-02-16  Nathan Sidwell  <nathan@acm.org>
26939         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26941 2018-02-16  Carl Love  <cel@us.ibm.com>
26943         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26944         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26945         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26946         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26947         expansion to P8V_BUILTIN_VEC_FLOAT2.
26949 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
26951         PR rtl-optimization/70023
26952         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26953         src_regno into account.
26955 2018-02-16  Carl Love  <cel@us.ibm.com>
26957         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26958         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26959         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26960         * config/rs6000/rs6000.c: Remove case statements for
26961         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26962         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26963         and P9V_BUILTIN_VEC_VINSERT4B.
26964         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26965         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26966         * config/rs6000/vsx.md:
26967         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26968         vec_insert4b.
26970 2018-02-16  Carl Love  <cel@us.ibm.com>
26972         * config/rs6000/altivec.h: Add builtin names vec_extract4b
26973         vec_insert4b.
26974         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26975         definitions.
26976         * config/rs6000/rs6000-c.c: Add the definitions for
26977         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26978         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26979         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26980         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
26981         definition for insert4b and define insn *insert3b_internal.
26982         * doc/extend.texi: Add documentation for vec_extract4b.
26984 2018-02-16  Nathan Sidwell  <nathan@acm.org>
26986         * doc/extend.texi (Backwards Compatibility): Mention friend
26987         injection.  Note for-scope is deprecated.
26988         * doc/invoke.texi (-ffriend-injection): Deprecate.
26990 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
26992         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26993         that moved to I2, also allow destinations that are a paradoxical
26994         subreg (instead of a normal reg).
26996 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
26998         PR target/83831
26999         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
27000         to QImode.
27002 2018-02-16  Richard Biener  <rguenther@suse.de>
27004         PR tree-optimization/84037
27005         PR tree-optimization/84016
27006         PR target/82862
27007         * config/i386/i386.c (ix86_builtin_vectorization_cost):
27008         Adjust vec_construct for the fact we need additional higher latency
27009         128bit inserts for AVX256 and AVX512 vector builds.
27010         (ix86_add_stmt_cost): Scale vector construction cost for
27011         elementwise loads.
27013 2018-02-16  Richard Biener  <rguenther@suse.de>
27015         PR tree-optimization/84417
27016         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
27017         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
27018         (non_rewritable_lvalue_p): Likewise, use poly-ints.
27020 2018-02-16  Martin Liska  <mliska@suse.cz>
27022         PR sanitizer/84307
27023         * internal-fn.def (ASAN_CHECK): Set proper flags.
27024         (ASAN_MARK): Likewise.
27026 2018-02-16  Julia Koval  <julia.koval@intel.com>
27028         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
27029         from PTA_CANNONLAKE.
27031 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
27033         PR target/84272
27034         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
27035         Use ++iter rather than iter++ for std::list iterators.
27036         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
27037         defer deleting them until all nodes in the forest are processed.  Do
27038         free even leaf nodes.  Change to_process into auto_vec.
27040         PR bootstrap/84405
27041         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
27042         * vec.h (vec_default_construct): Use memset instead of placement new
27043         if BROKEN_VALUE_INITIALIZATION is defined.
27044         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
27045         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
27046         is defined.
27048         PR rtl-optimization/83723
27049         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
27050         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
27051         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
27052         recursive calls.
27053         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
27054         callers.
27055         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
27057 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
27059         PR rtl-optimization/81443
27060         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
27061         from inner REGs to paradoxical SUBREGs.
27063 2018-02-16  Richard Biener  <rguenther@suse.de>
27065         PR tree-optimization/84399
27066         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27067         For operands we can analyze at their definition make sure we can
27068         analyze them at each use as well.
27070 2018-02-16  Richard Biener  <rguenther@suse.de>
27072         PR tree-optimization/84190
27073         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
27074         volatile accesses if the decl isn't volatile.
27076 2018-02-15  Jason Merrill  <jason@redhat.com>
27078         PR c++/84314 - ICE with templates and fastcall attribute.
27079         * attribs.c (build_type_attribute_qual_variant): Don't clobber
27080         TYPE_CANONICAL on an existing type.
27082 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
27084         PR tree-optimization/84383
27085         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
27086         dstoff nor call operand_equal_p if dstbase is NULL.
27088         PR tree-optimization/84334
27089         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
27090         also a CONSTANT_CLASS_P, punt.
27092 2018-02-14  Jim Wilson  <jimw@sifive.com>
27094         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
27095         first SMALL_OPERAND check.  New local min_second_step.  Move assert
27096         to where locals are set.  Add TARGET_RVC support.
27097         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
27099 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
27101         * doc/invoke.texi: Correct -Wformat-overflow code sample.
27103 2018-02-14  Martin Sebor  <msebor@redhat.com>
27105         PR tree-optimization/83698
27106         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
27107         arrays constrain the offset range to their bounds.
27108         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
27109         (builtin_access::overlap): Avoid setting the size of overlap if it's
27110         already been set.
27111         (maybe_diag_overlap): Also consider arrays when deciding what values
27112         of offsets to include in diagnostics.
27114 2018-02-14  Martin Sebor  <msebor@redhat.com>
27116         PR c/84108
27117         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
27118         that correspond to the kind of a declaration.
27120 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
27122         PR target/83984
27123         * config/pa/pa.md: Load address of PIC label using the linkage table
27124         if the label is nonlocal.
27126 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27128         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27129         warning message if user requests -maltivec=be.
27130         * doc/invoke.texi: Document deprecation of -maltivec=be.
27132 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
27134         PR target/84220
27135         * config/rs6000/rs6000-c.c: Update definitions for
27136         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27137         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27139 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27141         PR target/84239
27142         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27143         add _get_ssp intrinsics. Remove argument from
27144         __builtin_ia32_rdssp[d|q].
27145         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27146         * config/i386/i386-builtin.def: Remove argument from
27147         __builtin_ia32_rdssp[d|q].
27148         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27149         ix86_expand_special_args_builtin for _rdssp[d|q].
27150         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27151         Clear register before usage.
27152         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27153         Add documentation for new _get_ssp and _inc_ssp intrinsics.
27155 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
27157         PR tree-optimization/84357
27158         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27159         operand 1 of an ARRAY_REF too.
27161 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
27163         PR target/83831
27164         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27165         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27166         declarations.
27167         (set_of_reg): New struct.
27168         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27169         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27170         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27171         functions.
27172         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27173         Split into bitclr, bitset, bitinvert patterns if appropriate.
27174         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27175         use rx_fuse_in_memory_bitop.
27176         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27177         to named insn, correct maximum insn length.
27179 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
27181         PR target/79242
27182         * machmode.def: Define a complex mode for PARTIAL_INT.
27183         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27184         MODE_PARTIAL_INT.
27185         * doc/rtl.texi: Document CSPImode.
27186         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27187         handling.
27188         (msp430_hard_regno_nregs_with_padding): Likewise.
27190 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
27192         PR target/84279
27193         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27195 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
27197         PR rtl-optimization/84169
27198         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
27199         we generated a parallel as new i3 and we split that to new i2 and i3
27200         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
27201         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
27202         those to i2, not i1.  Partially rewrite this scan code.
27204 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27206         PR c/82210
27207         * stor-layout.c (place_field): For variable length fields, adjust
27208         offset_align afterwards not just based on the field's alignment,
27209         but also on the size.
27211         PR middle-end/84309
27212         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27213         of exps and logs in the use_exp2 case.
27215 2018-02-13  Jeff Law  <law@redhat.com>
27217         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27218         entry for "vector".
27220         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27221         ARGS as unused.
27223 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
27225         PR debug/84342
27226         PR debug/84319
27227         * common.opt (gas-loc-support, gas-locview-support): New.
27228         (ginline-points, ginternal-reset-location-views): New.
27229         * doc/invoke.texi: Document them.  Use @itemx where intended.
27230         (gvariable-location-views): Adjust.
27231         * target.def (reset_location_view): New.
27232         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27233         (TARGET_RESET_LOCATION_VIEW): New.
27234         * doc/tm.texi: Rebuilt.
27235         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27236         (dwarf2out_default_as_locview_support): New.
27237         (output_asm_line_debug_info): Use option variables.
27238         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27239         (output_loc_list): Likewise.
27240         (add_high_low_attributes): Check option variables.
27241         Don't output entry view attribute in strict mode.
27242         (gen_inlined_subroutine_die): Check option variables.
27243         (dwarf2out_inline_entry): Likewise.
27244         (init_sections_and_labels): Likewise.
27245         (dwarf2out_early_finish): Likewise.
27246         (maybe_reset_location_view): New, from...
27247         (dwarf2out_var_location): ... here.  Call it.
27248         * debug.h (dwarf2out_default_as_loc_support): Declare.
27249         (dwarf2out_default_as_locview_support): Declare.
27250         * hooks.c (hook_int_rtx_insn_0): New.
27251         * hooks.h (hook_int_rtx_insn_0): Declare.
27252         * toplev.c (process_options): Take -gas-loc-support and
27253         -gas-locview-support from dwarf2out.  Enable
27254         -gvariable-location-views by default only with locview
27255         assembler support.  Enable -ginternal-reset-location-views by
27256         default only if the target defines the corresponding hook.
27257         Enable -ginline-points by default if location views are
27258         enabled; force it disabled if statement frontiers are
27259         disabled.
27260         * tree-inline.c (expand_call_inline): Check option variables.
27261         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27263 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
27265         PR tree-optimization/84321
27266         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27267         handling.  Also check whether the anti-range contains any values
27268         that satisfy the mask; switch to a VR_RANGE if not.
27270 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
27272         PR sanitizer/84340
27273         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27275 2018-02-13  Martin Jambor  <mjambor@suse.cz>
27277         PR c++/83990
27278         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27279         of call statements, also set location of a load to a temporary.
27281 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
27283         * config/rl78/rl78.c (add_vector_labels): New function.
27284         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27285         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27286         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27287         which checks that no arguments are passed.
27288         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27289         * doc/extend.texi: Documentation for the new attribute.
27291 2018-02-13  Andreas Schwab  <schwab@suse.de>
27293         * config/riscv/linux.h (CPP_SPEC): Define.
27295 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27297         PR target/84335
27298         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27299         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27300         OPTION_MASK_ISA_AES as first argument to def_builtin_const
27301         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27302         instead of OPTION_MASK_ISA_PCLMUL as first argument to
27303         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27304         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27305         temporarily for AES and PCLMUL builtins.
27307         PR tree-optimization/84339
27308         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27309         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27310         Formatting fixes.
27312         PR middle-end/84309
27313         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27314         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27315         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27316         inline function.
27317         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27318         inline function.
27319         * omp-simd-clone.h: New file.
27320         * omp-simd-clone.c: Include omp-simd-clone.h.
27321         (expand_simd_clones): No longer static.
27322         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27323         cgraph.h and omp-simd-clone.h.
27324         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27325         (vect_recog_widen_shift_pattern): Formatting fix.
27326         (vect_pattern_recog_1): Don't check optab for calls.
27328         PR target/84336
27329         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27330         operands[2] into a REG before using gen_lowpart on it.
27332 2018-02-12  Jeff Law  <law@redhat.com>
27334         PR target/83760
27335         * config/sh/sh.c (find_barrier): Consider a sibling call
27336         a barrier as well.
27338         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
27339         successfully back substituting a reg.
27341 2018-02-12  Richard Biener  <rguenther@suse.de>
27343         PR tree-optimization/84037
27344         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
27345         parameter, move visited init to caller.
27346         (vect_slp_analyze_operations): Separate cost from validity
27347         check, initialize visited once for all instances.
27348         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
27349         for all instances.
27350         * tree-vect-stmts.c (vect_model_simple_cost): Make early
27351         out an assert.
27352         (vect_model_promotion_demotion_cost): Likewise.
27353         (vectorizable_bswap): Guard cost modeling with !slp_node
27354         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
27355         SLP stmts.
27356         (vectorizable_call): Likewise.
27357         (vectorizable_conversion): Likewise.
27358         (vectorizable_assignment): Likewise.
27359         (vectorizable_shift): Likewise.
27360         (vectorizable_operation): Likewise.
27361         (vectorizable_store): Likewise.
27362         (vectorizable_load): Likewise.
27363         (vectorizable_condition): Likewise.
27364         (vectorizable_comparison): Likewise.
27366 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
27368         PR sanitizer/84307
27369         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
27370         (ASAN_MARK): Fix fnspec to account for return value, change pointer
27371         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
27373 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
27375         PR middle-end/83665
27376         * params.def (inline-min-speedup): Increase from 8 to 15.
27377         (max-inline-insns-auto): Decrease from 40 to 30.
27378         * ipa-split.c (consider_split): Add some buffer for function to
27379         be considered inlining candidate.
27380         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
27381         default values.
27383 2018-02-12  Richard Biener  <rguenther@suse.de>
27385         PR tree-optimization/84037
27386         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
27387         matched stmts if we cannot swap the non-matched ones.
27389 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
27391         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
27392         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
27393         _mm_maskz_scalef_round_ss): New intrinsics.
27394         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
27395         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
27396         __builtin_ia32_scalefss_round): Remove.
27397         (__builtin_ia32_scalefsd_mask_round,
27398         __builtin_ia32_scalefss_mask_round): New intrinsics.
27399         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
27400         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
27401         ((match_operand:VF_128 2 "<round_nimm_predicate>"
27402         "<round_constraint>")): Changed to ...
27403         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
27404         "<round_scalar_constraint>")): ... this.
27405         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
27406         %0, %1, %2<round_op3>}"): Changed to ...
27407         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
27408         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
27409         %2<round_scalar_mask_op3>}"): ... this.
27410         * config/i386/subst.md (round_scalar_nimm_predicate): New.
27412 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
27414         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
27415         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
27416         (_mm_maskz_sqrt_round_ss): New intrinsics.
27417         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
27418         (__builtin_ia32_sqrtsd_mask_round)
27419         (__builtin_ia32_sqrtss_mask_round): New builtins.
27420         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
27421         (__builtin_ia32_sqrtss_round): Remove.
27422         (__builtin_ia32_sqrtsd_mask_round)
27423         (__builtin_ia32_sqrtss_mask_round): New builtins.
27424         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
27425         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
27426         ((match_operand:VF_128 1 "vector_operand"
27427         "xBm,<round_constraint>")): Changed to ...
27428         ((match_operand:VF_128 1 "vector_operand"
27429         "xBm,<round_scalar_constraint>")): ... this.
27430         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
27431         %0, %2, %<iptr>1<round_op3>}): Changed to ...
27432         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
27433         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
27434         %<iptr>1<round_scalar_mask_op3>}): ... this.
27435         ((set_attr "prefix" "<round_prefix>")): Changed to ...
27436         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
27438 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
27440         PR target/84266
27441         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
27442         Cast vec_cmpeq result to correct type.
27443         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
27444         Cast vec_cmpgt result to correct type.
27446 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
27448         * final.c (final_scan_insn_1): Renamed from...
27449         (final_scan_insn): ... this.  New wrapper, to recover
27450         seen from the outermost call in recursive ones.
27451         * config/sparc/sparc.c (output_return): Drop seen from call.
27452         (output_sibcall): Likewise.
27453         * config/visium/visium.c (output_branch): Likewise.
27455 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
27457         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
27458         function label.
27460 2018-02-10  Alan Modra  <amodra@gmail.com>
27462         PR target/84300
27463         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
27464         Specify LR as an input.
27466 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
27468         PR sanitizer/83987
27469         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
27470         remove_member_access_dummy_vars): New functions.
27471         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
27472         lower_omp_1, execute_lower_omp): Use them.
27474         PR rtl-optimization/84308
27475         * shrink-wrap.c (spread_components): Release todo vector.
27477 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
27479         PR rtl-optimization/57193
27480         * ira-color.c (struct allocno_color_data): Add member
27481         conflict_allocno_hard_prefs.
27482         (update_conflict_allocno_hard_prefs): New.
27483         (bucket_allocno_compare_func): Add a preference based on
27484         conflict_allocno_hard_prefs.
27485         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
27486         (color_allocnos): Remove a dead code.  Initiate
27487         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
27489 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
27491         PR target/84226
27492         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
27493         constraint from =wa to wa.  Avoid a subreg on the output operand,
27494         instead use a pseudo and subreg it in a move.
27495         (p9_xxbrd_<mode>): Changed to ...
27496         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
27497         (p9_xxbrd_v2df): New expander.
27498         (p9_xxbrw_<mode>): Changed to ...
27499         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
27500         (p9_xxbrw_v4sf): New expander.
27502 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
27504         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
27506 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
27508         PR target/83926
27509         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
27510         multiply in 32-bit mode.
27511         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
27512         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
27513         mode.
27515 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
27517         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
27518         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
27519         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
27520         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
27522 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
27524         PR lto/84213
27525         * dwarf2out.c (is_trivial_indirect_ref): New function.
27526         (dwarf2out_late_global_decl): Do not generate a location
27527         attribute for variables that have a non-trivial DECL_VALUE_EXPR
27528         and that are not defined in the current unit.
27530 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
27532         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
27533         instead of a libcall for UNORDERED.
27535 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
27537         PR target/82641
27538         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
27539         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
27541 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27543         PR target/PR84295
27544         * config/s390/s390.c (s390_set_current_function): Invoke
27545         s390_indirect_branch_settings also if fndecl didn't change.
27547 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
27549         * config/rs6000/rs6000.md (blockage): Set length to zero.
27551 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
27553         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
27555 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
27557         PR sanitizer/84285
27558         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
27559         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
27560         -static-lib*san.
27562         PR debug/84252
27563         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
27564         PARALLEL incoming that failed vt_get_decl_and_offset check.
27566         PR middle-end/84237
27567         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
27568         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
27569         TREE_READONLY bit.
27570         (get_variable_section): For decls in named .bss* sections pass true as
27571         second argument to bss_initializer_p.
27573 2018-02-09  Marek Polacek  <polacek@redhat.com>
27574             Jakub Jelinek  <jakub@redhat.com>
27576         PR c++/83659
27577         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
27578         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
27579         Sync some changes from cxx_fold_indirect_ref.
27581 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
27583         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
27584         markers.
27585         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
27586         (BLOCK_INLINE_ENTRY_LABEL): New.
27587         (dwarf2out_var_location): Disregard inline entry markers.
27588         (inline_entry_data): New struct.
27589         (inline_entry_data_hasher): New hashtable type.
27590         (inline_entry_data_hasher::hash): New.
27591         (inline_entry_data_hasher::equal): New.
27592         (inline_entry_data_table): New variable.
27593         (add_high_low_attributes): Add DW_AT_entry_pc and
27594         DW_AT_GNU_entry_view attributes if a pending entry is found
27595         in inline_entry_data_table.  Add old entry_pc attribute only
27596         if debug nonbinding markers are disabled.
27597         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
27598         markers are enabled.
27599         (block_within_block_p, dwarf2out_inline_entry): New.
27600         (dwarf2out_finish): Check that no entries remained in
27601         inline_entry_data_table.
27602         * final.c (reemit_insn_block_notes): Handle inline entry notes.
27603         (final_scan_insn, notice_source_line): Likewise.
27604         (rest_of_clean_state): Skip inline entry markers.
27605         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
27606         markers.
27607         * gimple.c (gimple_build_debug_inline_entry): New.
27608         * gimple.h (enum gimple_debug_subcode): Add
27609         GIMPLE_DEBUG_INLINE_ENTRY.
27610         (gimple_build_debug_inline_entry): Declare.
27611         (gimple_debug_inline_entry_p): New.
27612         (gimple_debug_nonbind_marker_p): Adjust.
27613         * insn-notes.def (INLINE_ENTRY): New.
27614         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
27615         inline entry marker notes.
27616         (print_insn): Likewise.
27617         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
27618         (INSN_DEBUG_MARKER_KIND): Likewise.
27619         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
27620         * tree-inline.c (expand_call_inline): Build and insert
27621         debug_inline_entry stmt.
27622         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
27623         inline entry blocks early, if nonbind markers are enabled.
27624         (dump_scope_block): Dump fragment info.
27625         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
27626         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
27627         (gimple_build_debug_inline_entry): New.
27628         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
27629         Enable/disable inline entry points too.
27630         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
27631         (DEBUG_INSN): Describe inline entry markers.
27633         * common.opt (gvariable-location-views): New.
27634         (gvariable-location-views=incompat5): New.
27635         * config.in: Rebuilt.
27636         * configure: Rebuilt.
27637         * configure.ac: Test assembler for view support.
27638         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
27639         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
27640         * dwarf2out.c (var_loc_view): New typedef.
27641         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
27642         (dwarf2out_locviews_in_attribute): New.
27643         (dwarf2out_locviews_in_loclist): New.
27644         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
27645         (enum dw_line_info_opcode): Add LI_adv_address.
27646         (struct dw_line_info_table): Add view.
27647         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
27648         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
27649         (zero_view_p): New variable.
27650         (ZERO_VIEW_P): New macro.
27651         (output_asm_line_debug_info): New.
27652         (struct var_loc_node): Add view.
27653         (add_AT_view_list, AT_loc_list): New.
27654         (add_var_loc_to_decl): Add view param.  Test it against last.
27655         (new_loc_list): Add view params.  Record them.
27656         (AT_loc_list_ptr): Handle loc and view lists.
27657         (view_list_to_loc_list_val_node): New.
27658         (print_dw_val): Handle dw_val_class_view_list.
27659         (size_of_die): Likewise.
27660         (value_format): Likewise.
27661         (loc_list_has_views): New.
27662         (gen_llsym): Set vl_symbol too.
27663         (maybe_gen_llsym, skip_loc_list_entry): New.
27664         (dwarf2out_maybe_output_loclist_view_pair): New.
27665         (output_loc_list): Output view list or entries too.
27666         (output_view_list_offset): New.
27667         (output_die): Handle dw_val_class_view_list.
27668         (output_dwarf_version): New.
27669         (output_compilation_unit_header): Use it.
27670         (output_skeleton_debug_sections): Likewise.
27671         (output_rnglists, output_line_info): Likewise.
27672         (output_pubnames, output_aranges): Update version comments.
27673         (output_one_line_info_table): Output view numbers in asm comments.
27674         (dw_loc_list): Determine current endview, pass it to new_loc_list.
27675         Call maybe_gen_llsym.
27676         (loc_list_from_tree_1): Adjust.
27677         (add_AT_location_description): Create view list attribute if
27678         needed, check it's absent otherwise.
27679         (convert_cfa_to_fb_loc_list): Adjust.
27680         (maybe_emit_file): Call output_asm_line_debug_info for test.
27681         (dwarf2out_var_location): Reset views as needed.  Precompute
27682         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
27683         attribute.  Set view.
27684         (new_line_info_table): Reset next view.
27685         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
27686         (dwarf2out_source_line): Likewise.  Output view resets and labels to
27687         the assembler, or select appropriate line info opcodes.
27688         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
27689         (optimize_string_length): Catch it.  Adjust.
27690         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
27691         dw_val_class_view_list, and remove it if no longer needed.
27692         (hash_loc_list): Hash view numbers.
27693         (loc_list_hasher::equal): Compare them.
27694         (optimize_location_lists): Check whether a view list symbol is
27695         needed, and whether the locview attribute is present, and
27696         whether they match.  Remove the locview attribute if no longer
27697         needed.
27698         (index_location_lists): Call skip_loc_list_entry for test.
27699         (dwarf2out_finish): Call output_asm_line_debug_info for test.
27700         Use output_dwarf_version.
27701         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
27702         (struct dw_val_node): Add val_view_list.
27703         * final.c (SEEN_NEXT_VIEW): New.
27704         (set_next_view_needed): New.
27705         (clear_next_view_needed): New.
27706         (maybe_output_next_view): New.
27707         (final_start_function): Rename to...
27708         (final_start_function_1): ... this.  Take pointer to FIRST,
27709         add SEEN parameter.  Emit param bindings in the initial view.
27710         (final_start_function): Reintroduce SEEN-less interface.
27711         (final): Rename to...
27712         (final_1): ... this.  Take SEEN parameter.  Output final pending
27713         next view at the end.
27714         (final): Reintroduce seen-less interface.
27715         (final_scan_insn): Output pending next view before switching
27716         sections or ending a block.  Mark the next view as needed when
27717         outputting variable locations.  Notify debug backend of section
27718         changes, and of location view changes.
27719         (rest_of_handle_final): Adjust.
27720         * toplev.c (process_options): Autodetect value for debug variable
27721         location views option.  Warn on incompat5 without -gdwarf-5.
27722         * doc/invoke.texi (gvariable-location-views): New.
27723         (gvariable-location-views=incompat5): New.
27724         (gno-variable-location-views): New.
27726 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
27728         PR tree-optimization/84136
27729         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
27730         that the result of find_edge is non-NULL.
27732 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
27734         PR target/83008
27735         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
27736         storing integer register in SImode.  Fix cost of 256 and 512
27737         byte aligned SSE register store.
27739 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
27741         * config/i386/i386.c (ix86_multiplication_cost): Fix
27742         multiplication cost for TARGET_AVX512DQ.
27744 2018-02-08  Marek Polacek  <polacek@redhat.com>
27746         PR tree-optimization/84238
27747         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
27748         get_range_strlen.
27750 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27752         PR tree-optimization/84265
27753         * tree-vect-stmts.c (vectorizable_store): Don't treat
27754         VMAT_CONTIGUOUS accesses as grouped.
27755         (vectorizable_load): Likewise.
27757 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27759         PR tree-optimization/81635
27760         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
27761         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
27762         (test_round_for_mask): New functions.
27763         (wide_int_cc_tests): Call test_round_for_mask.
27764         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
27765         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
27766         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
27767         range returned by get_range_info.
27769 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
27771         PR ipa/81360
27772         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
27773         * symtab.c: Include builtins.h
27774         (symtab_node::output_to_lto_symbol_table_p): Move here
27775         from lto-streamer-out.c:output_symbol_p.
27776         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
27777         (output_symbol_p): Move all logic to symtab.c
27778         (produce_symtab): Update.
27780 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27782         * config/s390/s390-opts.h (enum indirect_branch): Define.
27783         * config/s390/s390-protos.h (s390_return_addr_from_memory)
27784         (s390_indirect_branch_via_thunk)
27785         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
27786         (enum s390_indirect_branch_type): Define.
27787         * config/s390/s390.c (struct s390_frame_layout, struct
27788         machine_function): Remove.
27789         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
27790         (indirect_branch_table_label_no, indirect_branch_table_name):
27791         Define variables.
27792         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
27793         (enum s390_indirect_branch_option): Define.
27794         (s390_return_addr_from_memory): New function.
27795         (s390_handle_string_attribute): New function.
27796         (s390_attribute_table): Add new attribute handler.
27797         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
27798         (s390_indirect_branch_via_thunk): New function.
27799         (s390_indirect_branch_via_inline_thunk): New function.
27800         (s390_function_ok_for_sibcall): When jumping via thunk disallow
27801         sibling call optimization for non z10 compiles.
27802         (s390_emit_call): Force indirect branch target to be a single
27803         register.  Add r1 clobber for non-z10 compiles.
27804         (s390_emit_epilogue): Emit return jump via return_use expander.
27805         (s390_reorg): Handle JUMP_INSNs as execute targets.
27806         (s390_option_override_internal): Perform validity checks for the
27807         new command line options.
27808         (s390_indirect_branch_attrvalue): New function.
27809         (s390_indirect_branch_settings): New function.
27810         (s390_set_current_function): Invoke s390_indirect_branch_settings.
27811         (s390_output_indirect_thunk_function):  New function.
27812         (s390_code_end): Implement target hook.
27813         (s390_case_values_threshold): Implement target hook.
27814         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
27815         macros.
27816         * config/s390/s390.h (struct s390_frame_layout)
27817         (struct machine_function): Move here from s390.c.
27818         (TARGET_INDIRECT_BRANCH_NOBP_RET)
27819         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
27820         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
27821         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
27822         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
27823         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
27824         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
27825         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
27826         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
27827         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
27828         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
27829         (mnemonic attribute): Add values which aren't recognized
27830         automatically.
27831         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
27832         pattern for branch conversion.  Fix mnemonic attribute.
27833         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
27834         indirect branch via thunk if requested.
27835         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
27836         ("*indirect_jump"): Disable for branch conversion using out of
27837         line thunks.
27838         ("indirect_jump_via_thunk<mode>_z10")
27839         ("indirect_jump_via_thunk<mode>")
27840         ("indirect_jump_via_inlinethunk<mode>_z10")
27841         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
27842         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
27843         ("casesi_jump_via_inlinethunk<mode>_z10")
27844         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
27845         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
27846         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
27847         ("*indirect2_jump"): Disable for branch conversion.
27848         ("casesi_jump"): Turn into expander and expand patterns for branch
27849         conversion.
27850         ("return_use"): New expander.
27851         ("*return"): Emit return via thunk and rename it to ...
27852         ("*return<mode>"): ... this one.
27853         * config/s390/s390.opt: Add new options and and enum for the
27854         option values.
27856 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27858         * lra-constraints.c (match_reload): Unconditionally use
27859         gen_lowpart_SUBREG, rather than selecting between that
27860         and equivalent gen_rtx_SUBREG code.
27862 2018-02-08  Richard Biener  <rguenther@suse.de>
27864         PR tree-optimization/84233
27865         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
27866         changed flag instead of boguously re-using phi_inserted.
27868 2018-02-08  Martin Jambor  <mjambor@suse.cz>
27870         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
27871         static local variables.
27873 2018-02-08  Richard Biener  <rguenther@suse.de>
27875         PR tree-optimization/84278
27876         * tree-vect-stmts.c (vectorizable_store): When looking for
27877         smaller vector types to perform grouped strided loads/stores
27878         make sure the mode is supported by the target.
27879         (vectorizable_load): Likewise.
27881 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
27883         * config/aarch64/aarch64.c (aarch64_components_for_bb):
27884         Increase LDP/STP opportunities by adding adjacent callee-saves.
27886 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
27888         PR rtl-optimization/84068
27889         PR rtl-optimization/83459
27890         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
27892 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
27894         PR tree-optimization/84224
27895         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
27896         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
27897         non-zero arguments.
27899 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
27901         PR target/84113
27902         * config/rs6000/altivec.md (*restore_world): Remove LR use.
27903         * config/rs6000/predicates.md (restore_world_operation): Adjust op
27904         count, remove one USE.
27906 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
27908         * doc/install.texi (Configuration): Document the
27909         --with-long-double-format={ibm,ieee} PowerPC configuration
27910         options.
27912         PR target/84154
27913         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27914         Convert from define_expand to be define_insn_and_split.  Rework
27915         float/double/_Float128 conversions to QI/HI/SImode to work with
27916         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
27917         conversions to QI/HImode types did a store and then a load to
27918         truncate the value.  For conversions to VSX registers, don't split
27919         the insn, instead emit the code directly.  Use the code iterator
27920         any_fix to combine signed and unsigned conversions.
27921         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27922         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27923         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27924         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27925         (fix_<mode>di2_hw): Likewise.
27926         (fixuns_<mode>di2_hw): Likewise.
27927         (fix_<mode>si2_hw): Likewise.
27928         (fixuns_<mode>si2_hw): Likewise.
27929         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27930         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27931         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27932         fix<uns>_trunc<SFDF:mode>si2_p8.
27933         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27934         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27935         (fix<uns>_<mode>_mem): Likewise.
27936         (fctiw<u>z_<mode>_mem): Likewise.
27937         (fix<uns>_<mode>_mem): Likewise.
27938         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27939         the register allocator from doing a direct move to the GPRs to do
27940         a store, and instead use the ISA 3.0 store byte/half-word from
27941         vector register instruction.  For IEEE 128-bit floating point,
27942         also optimize stores of 32-bit ints.
27943         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27945 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
27947         * genextract.c (push_pathstr_operand): New function to support
27948         [a-zA-Z].
27949         (walk_rtx): Call push_pathstr_operand.
27950         (print_path): Support [a-zA-Z].
27952 2018-02-07  Richard Biener  <rguenther@suse.de>
27954         PR tree-optimization/84037
27955         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27956         (cse_and_gimplify_to_preheader): Declare.
27957         (vect_get_place_in_interleaving_chain): Likewise.
27958         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27959         ivexpr_map.
27960         (_loop_vec_info::~_loop_vec_info): Delete it.
27961         (cse_and_gimplify_to_preheader): New function.
27962         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27963         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27964         (vectorizable_load): Likewise.  For grouped stores always base
27965         the IV on the first element.
27966         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27967         condition before gimplifying.
27969 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
27971         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27972         *DIV_EXPR and *MOD_EXPR.
27974 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
27976         PR target/84248
27977         * config/i386/i386.c (ix86_option_override_internal): Mask out
27978         the CF_SET bit when checking -fcf-protection.
27980 2018-02-07  Tom de Vries  <tom@codesourcery.com>
27982         PR libgomp/84217
27983         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27984         enough.
27986 2018-02-07  Richard Biener  <rguenther@suse.de>
27988         PR tree-optimization/84204
27989         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27990         this place.
27992         PR tree-optimization/84205
27993         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27994         special-case isl_ast_op_zdiv_r.
27996         PR tree-optimization/84223
27997         * graphite-scop-detection.c (gather_bbs::before_dom_children):
27998         Only add conditions from within the region.
27999         (gather_bbs::after_dom_children): Adjust.
28001 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
28003         PR target/84209
28004         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
28005         * config/avr/avr.md: Only post-reload split REG-REG moves if
28006         either register is GENERAL_REG_P.
28008 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
28010         PR tree-optimization/84235
28011         * tree-ssa-scopedtables.c
28012         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
28013         if the subtraction is performed in floating point type where NaNs are
28014         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
28015         build 1.  Formatting fix.
28017 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
28019         PR target/84146
28020         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
28021         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
28022         and skip it regardless of bb boundaries.  Use CALL_P macro,
28023         don't test INSN_P (insn) together with CALL_P or JUMP_P check
28024         unnecessarily, formatting fix.
28026 2018-02-06  Michael Collison  <michael.collison@arm.com>
28028         * config/arm/thumb2.md:
28029         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
28030         (*thumb_mov_notscc): Ditto.
28032 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
28034         PR target/84154
28035         * config/rs6000/rs6000.md (su code attribute): Use "u" for
28036         unsigned_fix, not "s".
28038 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28040         * configure.ac (gcc_fn_eh_frame_ro): New function.
28041         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
28042         correct .eh_frame permissions.
28043         * configure: Regenerate.
28045 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
28047         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
28048         irrelevant options.
28050 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28052         * config/rs6000/rs6000.c (rs6000_option_override_internal):
28053         Display warning message for -mno-speculate-indirect-jumps.
28055 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
28057         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
28058         Undocumented.
28059         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
28061 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
28063         PR tree-optimization/84225
28064         * tree-eh.c (find_trapping_overflow): Only call
28065         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
28067 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28069         PR target/84145
28070         * config/i386/i386.c: Reimplement the check of possible options
28071         -mibt/-mshstk conbination. Change error messages.
28072         * doc/invoke.texi: Fix a typo: remove extra '='.
28074 2018-02-06  Marek Polacek  <polacek@redhat.com>
28076         PR tree-optimization/84228
28077         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
28079 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
28081         PR target/82641
28082         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
28083         emitted arch directives.
28084         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
28085         __ARM_FEATURE_COPROC before changing architectures.
28087 2018-02-06  Richard Biener  <rguenther@suse.de>
28089         * config/i386/i386.c (print_reg): Fix typo.
28090         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
28092 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
28094         * configure: Regenerate.
28096 2018-02-05  Martin Sebor  <msebor@redhat.com>
28098         PR tree-optimization/83369
28099         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
28100         inlining context.
28102 2018-02-05  Martin Liska  <mliska@suse.cz>
28104         * doc/invoke.texi: Cherry-pick upstream r323995.
28106 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
28108         * ira.c (ira_init_register_move_cost): Adjust comment.
28110 2018-02-05  Martin Liska  <mliska@suse.cz>
28112         PR gcov-profile/84137
28113         * doc/gcov.texi: Fix typo in documentation.
28115 2018-02-05  Martin Liska  <mliska@suse.cz>
28117         PR gcov-profile/83879
28118         * doc/gcov.texi: Document necessity of --dynamic-list-data when
28119         using dlopen functionality.
28121 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
28123         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
28124         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28125         _mm_maskz_range_ss, _mm_mask_range_round_ss,
28126         _mm_maskz_range_round_ss): New intrinsics.
28127         (__builtin_ia32_rangesd128_round)
28128         (__builtin_ia32_rangess128_round): Remove.
28129         (__builtin_ia32_rangesd128_mask_round,
28130         __builtin_ia32_rangess128_mask_round): New builtins.
28131         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28132         __builtin_ia32_rangess128_round): Remove.
28133         (__builtin_ia32_rangesd128_mask_round,
28134         __builtin_ia32_rangess128_mask_round): New builtins.
28135         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28136         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28137         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28138         "<round_saeonly_constraint>")): Changed to ...
28139         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28140         "<round_saeonly_scalar_constraint>")): ... this.
28141         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28142         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28143         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28144         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28145         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28147 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
28149         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28150         options.
28151         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28152         Remove all values except native, 8540 and 8548.
28154 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
28156         * config/i386/i386.c (ix86_output_function_return): Pass
28157         INVALID_REGNUM, instead of -1, as invalid register number to
28158         indirect_thunk_name and output_indirect_thunk.
28160 2018-02-02  Julia Koval  <julia.koval@intel.com>
28162         * config.gcc: Add -march=icelake.
28163         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28164         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28165         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28166         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28167         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28168         (processor_target_table): Add icelake.
28169         (ix86_option_override_internal): Handle new PTAs.
28170         (get_builtin_code_for_version): Handle icelake.
28171         (M_INTEL_COREI7_ICELAKE): New.
28172         (fold_builtin_cpu): Handle icelake.
28173         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28174         * doc/invoke.texi: Add -march=icelake.
28176 2018-02-02  Julia Koval  <julia.koval@intel.com>
28178         * config/i386/i386.c (ix86_option_override_internal): Change flags type
28179         to wide_int_bitmask.
28180         * wide-int-bitmask.h: New.
28182 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28184         PR target/84066
28185         * config/i386/i386.md: Replace Pmode with word_mode in
28186         builtin_setjmp_setup and builtin_longjmp to support x32.
28188 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
28190         PR target/56010
28191         PR target/83743
28192         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28193         #include "opts.h".
28194         (rs6000_supported_cpu_names): New static variable.
28195         (linux_cpu_translation_table): Likewise.
28196         (elf_platform) <cpu>: Define new static variable and use it.
28197         Translate kernel AT_PLATFORM name to canonical name if needed.
28198         Error if platform name is unknown.
28200 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
28202         PR target/84089
28203         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28205 2018-02-01  Jeff Law  <law@redhat.com>
28207         PR target/84128
28208         * config/i386/i386.c (release_scratch_register_on_entry): Add new
28209         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
28210         the scratch if RELEASE_VIA_POP is false.
28211         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28212         If we have to save a temporary register, decrement SIZE appropriately.
28213         Pass new arguments to release_scratch_register_on_entry.
28214         (ix86_adjust_stack_and_probe): Likewise.
28215         (ix86_emit_probe_stack_range): Pass new arguments to
28216         release_scratch_register_on_entry.
28218 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
28220         PR rtl-optimization/84157
28221         * combine.c (change_zero_ext): Use REG_P predicate in
28222         front of HARD_REGISTER_P predicate.
28224 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
28226         * config/avr/avr.c (avr_option_override): Move disabling of
28227         -fdelete-null-pointer-checks to...
28228         * common/config/avr/avr-common.c (avr_option_optimization_table):
28229         ...here.
28231 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28233         PR tree-optimization/81635
28234         * tree-data-ref.c (split_constant_offset_1): For types that
28235         wrap on overflow, try to use range info to prove that wrapping
28236         cannot occur.
28238 2018-02-01  Renlin Li  <renlin.li@arm.com>
28240         PR target/83370
28241         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28242         TAILCALL_ADDR_REGS.
28243         (aarch64_register_move_cost): Likewise.
28244         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28245         TAILCALL_ADDR_REGS.
28246         (REG_CLASS_NAMES): Likewise.
28247         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28248         TAILCALL_ADDR_REGS. Remove IP registers.
28249         * config/aarch64/aarch64.md (Ucs): Update register constraint.
28251 2018-02-01  Richard Biener  <rguenther@suse.de>
28253         * domwalk.h (dom_walker::dom_walker): Add additional constructor
28254         for specifying RPO order and allow NULL for that.
28255         * domwalk.c (dom_walker::dom_walker): Likewise.
28256         (dom_walker::walk): Handle NULL RPO order.
28257         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28258         in RPO order.
28259         (rewrite_update_dom_walker): Likewise.
28260         (mark_def_dom_walker): Likewise.
28262 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28264         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28265         (aarch64_maybe_expand_sve_subreg_move): Declare.
28266         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28267         * config/aarch64/predicates.md (aarch64_any_register_operand): New
28268         predicate.
28269         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28270         that are semantically a reverse operation.
28271         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28272         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28273         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28274         functions.
28275         (aarch64_can_change_mode_class): For big-endian, forbid changes
28276         between two SVE modes if they have different element sizes.
28278 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28280         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28281         the TImode handling for big-endian targets.
28283 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28285         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28286         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
28287         not just bytes.
28288         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28289         Remove BSWAP handing for big-endian targets and use the form of
28290         LD1RQ appropariate for the mode.
28292 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28294         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28295         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28296         duplicated element.
28298 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28300         PR tearget/83845
28301         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28302         check for operands that need to go through aarch64_sve_reload_be.
28304 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
28306         PR tree-optimization/81661
28307         PR tree-optimization/84117
28308         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28309         * tree-eh.c: Include gimplify.h.
28310         (find_trapping_overflow, replace_trapping_overflow,
28311         rewrite_to_non_trapping_overflow): New functions.
28312         * tree-vect-loop.c: Include tree-eh.h.
28313         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28314         * tree-data-ref.c: Include tree-eh.h.
28315         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28317 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
28319         PR rtl-optimization/84123
28320         * combine.c (change_zero_ext): Check if hard register satisfies
28321         can_change_dest_mode before calling gen_lowpart_SUBREG.
28323 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
28325         PR target/82444
28326         * ira.c (ira_init_register_move_cost): Remove assert.
28328 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28330         PR rtl-optimization/84071
28331         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28332         * doc/tm.texi: Regenerate.
28334 2018-01-31  Richard Biener  <rguenther@suse.de>
28336         PR tree-optimization/84132
28337         * tree-data-ref.c (analyze_miv_subscript): Properly
28338         check whether evolution_function_is_affine_multivariate_p
28339         before calling gcd_of_steps_may_divide_p.
28341 2018-01-31  Julia Koval  <julia.koval@intel.com>
28343         PR target/83618
28344         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28345         * config/i386/i386.md (rdpid_rex64) New.
28346         (rdpid): Make 32bit only.
28348 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
28350         PR lto/84105
28351         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
28352         an IDENTIFIER_NODE for FUNCTION_TYPE's.
28354 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28356         Revert
28357         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28359         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28361 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28363         PR rtl-optimization/84071
28364         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
28365         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
28367 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
28369         * config/arc/arc.c (arc_handle_aux_attribute): New function.
28370         (arc_attribute_table): Add 'aux' attribute.
28371         (arc_in_small_data_p): Consider aux like variables.
28372         (arc_is_aux_reg_p): New function.
28373         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
28374         (arc_get_aux_arg): New function.
28375         (prepare_move_operands): Handle aux-register access.
28376         (arc_handle_aux_attribute): New function.
28377         * doc/extend.texi (ARC Variable attributes): Add subsection.
28379 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
28381         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
28382         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
28383         (arc_attribute_table): Add 'uncached' attribute.
28384         (arc_print_operand): Print '.di' flag for uncached memory
28385         accesses.
28386         (arc_in_small_data_p): Do not consider for small data the uncached
28387         types.
28388         (arc_is_uncached_mem_p): New function.
28389         * config/arc/predicates.md (compact_store_memory_operand): Check
28390         for uncached memory accesses.
28391         (nonvol_nonimm_operand): Likewise.
28392         * doc/extend.texi (ARC Type Attribute): New subsection.
28394 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
28396         PR c/84100
28397         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
28398         falign-loops=): Add Optimization flag.
28400 2018-01-30  Jeff Law  <law@redhat.com>
28402         PR target/84064
28403         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
28404         INT_REGISTERS_SAVED.  Check it prior to calling
28405         get_scratch_register_on_entry.
28406         (ix86_adjust_stack_and_probe): Similarly.
28407         (ix86_emit_probe_stack_range): Similarly.
28408         (ix86_expand_prologue): Corresponding changes.
28410 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28412         PR target/40411
28413         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
28414         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
28416 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
28418         PR target/84112
28419         * lra-constraints.c (curr_insn_transform): Process AND in the
28420         address.
28422 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
28424         PR rtl-optimization/83986
28425         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
28426         dependence against last_pending_memory_flush in addition to
28427         pending_jump_insns.
28429 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
28431         PR tree-optimization/81611
28432         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
28433         copies.
28435 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28437         PR target/83758
28438         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
28439         a reg rtx.
28441 2018-01-30  Richard Biener  <rguenther@suse.de>
28442             Jakub Jelinek  <jakub@redhat.com>
28444         PR tree-optimization/84111
28445         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
28446         inner loops added during recursion, as they don't have up-to-date
28447         SSA form.
28449 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
28451         PR ipa/81360
28452         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
28453         (can_inline_edge_by_limits_p): ... here.
28454         (can_early_inline_edge_p, check_callers,
28455         update_caller_keys, update_callee_keys, recursive_inlining,
28456         add_new_edges_to_heap, speculation_useful_p,
28457         inline_small_functions,
28458         inline_small_functions, flatten_function,
28459         inline_to_all_callers_1): Update.
28461 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
28463         * profile-count.c (profile_count::combine_with_ipa_count): Handle
28464         zeros correctly.
28466 2018-01-30  Richard Biener  <rguenther@suse.de>
28468         PR tree-optimization/83008
28469         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
28470         invariant and constant vector uses in stmts when they need
28471         more than one stmt.
28473 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28475         PR bootstrap/84017
28476         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
28477         * configure: Regenerate.
28479 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
28481         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
28482         pattern.
28483         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
28484         Use gen_rtx_REG rather than gen_lowpart.
28486 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
28488         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
28489         rather than 0 when creating partial subregs.
28491 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
28493         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
28494         of usage.
28496 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
28498         PR target/81550
28499         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
28500         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
28501         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
28502         flags.  This restores the settings used before the 2017-07-24.
28503         Turning off pre increment/decrement/modify allows IVOPTS to
28504         optimize DF/SF loops where the index is an int.
28506 2018-01-29  Richard Biener  <rguenther@suse.de>
28507             Kelvin Nilsen  <kelvin@gcc.gnu.org>
28509         PR bootstrap/80867
28510         * tree-vect-stmts.c (vectorizable_call): Don't call
28511         targetm.vectorize_builtin_md_vectorized_function if callee is
28512         NULL.
28514 2018-01-22  Carl Love  <cel@us.ibm.com>
28516         * doc/extend.tex: Fix typo in second arg in
28517         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
28519 2018-01-29  Richard Biener  <rguenther@suse.de>
28521         PR tree-optimization/84086
28522         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
28523         (flush_ssaname_freelist): When SSA names were released reset
28524         the SCEV hash table.
28526 2018-01-29  Richard Biener  <rguenther@suse.de>
28528         PR tree-optimization/84057
28529         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
28530         removed paths when removing edges.
28532 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
28534         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
28535         -mfunction-return=@var{choice}.
28537 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28539         PR diagnostic/84034
28540         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
28541         Handle CR like TAB.
28542         (layout::print_source_line): Likewise.
28543         (test_get_line_width_without_trailing_whitespace): Add test cases.
28545 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
28547         PR middle-end/84040
28548         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
28549         debug insns.
28551 2018-01-26  Jim Wilson  <jimw@sifive.com>
28553         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
28555         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
28556         specified.
28558 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28560         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
28561         and CMP + SUB-immediate -> SUBS.
28563 2018-01-26  Martin Sebor  <msebor@redhat.com>
28565         PR tree-optimization/83896
28566         * tree-ssa-strlen.c (get_string_len): Rename...
28567         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
28568         Avoid assuming length is constant.
28569         (handle_char_store): Use HOST_WIDE_INT for string length.
28571 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
28573         PR target/81763
28574         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
28575         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
28577 2018-01-26  Richard Biener  <rguenther@suse.de>
28579         PR rtl-optimization/84003
28580         * dse.c (record_store): Only record redundant stores when
28581         the earlier store aliases at least all accesses the later one does.
28583 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
28585         PR rtl-optimization/83985
28586         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
28587         REG_CFA_RESTORE insns.
28588         (delete_unmarked_insns): Don't ignore separate shrink wrapping
28589         REG_CFA_RESTORE insns here.
28591         PR c/83989
28592         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
28593         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
28595 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28597         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
28598         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
28599         (arc_init): Likewise.
28600         (arc_override_options): Likewise.
28601         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
28602         value.
28603         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
28604         support.
28605         * config/arc/arc.h (TARGET_DBNZ): Define.
28606         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
28607         properly set the tune attribute.
28608         (dbnz): Use TARGET_DBNZ guard.
28609         * config/arc/arc.opt (mtune): Add core3 option.
28611 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28613         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
28614         recognize new pic like addresses.
28615         (arc_delegitimize_address): Clean up.
28617 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28619         * config/arc/arc-arches.def: Option mrf16 valid for all
28620         architectures.
28621         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
28622         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
28623         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
28624         * config/arc/arc-tables.opt: Regenerate.
28625         * config/arc/arc.c (arc_conditional_register_usage): Handle
28626         reduced register file case.
28627         (arc_file_start): Set must have build attributes.
28628         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
28629         mrf16 option value.
28630         * config/arc/arc.opt (mrf16): Add new option.
28631         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
28632         * config/arc/genmultilib.awk: Handle new mrf16 option.
28633         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
28634         * config/arc/t-multilib: Regenerate.
28635         * doc/invoke.texi (ARC Options): Document mrf16 option.
28637 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28639         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
28640         * config/arc/arc.c (arc_handle_secure_attribute): New function.
28641         (arc_attribute_table): Add 'secure_call' attribute.
28642         (arc_print_operand): Print secure call operand.
28643         (arc_function_ok_for_sibcall): Don't optimize tail calls when
28644         secure.
28645         (arc_is_secure_call_p): New function.  * config/arc/arc.md
28646         (call_i): Add support for sjli instruction.
28647         (call_value_i): Likewise.
28648         * config/arc/constraints.md (Csc): New constraint.
28650 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28651             John Eric Martin  <John.Martin@emmicro-us.com>
28653         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
28654         * config/arc/arc.c (_arc_jli_section): New struct.
28655         (arc_jli_section): New type.
28656         (rc_jli_sections): New static variable.
28657         (arc_handle_jli_attribute): New function.
28658         (arc_attribute_table): Add jli_always and jli_fixed attribute.
28659         (arc_file_end): New function.
28660         (TARGET_ASM_FILE_END): Define.
28661         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
28662         (arc_add_jli_section): New function.
28663         (jli_call_scan): Likewise.
28664         (arc_reorg): Call jli_call_scan.
28665         (arc_output_addsi): Remove 'S' from printing asm operand.
28666         (arc_is_jli_call_p): New function.
28667         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
28668         operand.
28669         (movhi_insn): Likewise.
28670         (movsi_insn): Likewise.
28671         (movsi_set_cc_insn): Likewise.
28672         (loadqi_update): Likewise.
28673         (load_zeroextendqisi_update): Likewise.
28674         (load_signextendqisi_update): Likewise.
28675         (loadhi_update): Likewise.
28676         (load_zeroextendhisi_update): Likewise.
28677         (load_signextendhisi_update): Likewise.
28678         (loadsi_update): Likewise.
28679         (loadsf_update): Likewise.
28680         (movsicc_insn): Likewise.
28681         (bset_insn): Likewise.
28682         (bxor_insn): Likewise.
28683         (bclr_insn): Likewise.
28684         (bmsk_insn): Likewise.
28685         (bicsi3_insn): Likewise.
28686         (cmpsi_cc_c_insn): Likewise.
28687         (movsi_ne): Likewise.
28688         (movsi_cond_exec): Likewise.
28689         (clrsbsi2): Likewise.
28690         (norm_f): Likewise.
28691         (normw): Likewise.
28692         (swap): Likewise.
28693         (divaw): Likewise.
28694         (flag): Likewise.
28695         (sr): Likewise.
28696         (kflag): Likewise.
28697         (ffs): Likewise.
28698         (ffs_f): Likewise.
28699         (fls): Likewise.
28700         (call_i): Remove 'S' asm letter, add jli instruction.
28701         (call_value_i): Likewise.
28702         * config/arc/arc.op (mjli-always): New option.
28703         * config/arc/constraints.md (Cji): New constraint.
28704         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
28705         operand.
28706         (subsf3_fpx): Likewise.
28707         (mulsf3_fpx): Likewise.
28708         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
28709         asm operand.
28710         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
28711         function attrbutes.
28712         * doc/invoke.texi (ARC): Document mjli-always option.
28714 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
28716         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
28717         avoid addition with 0 and use incw and decw where possible.
28719 2018-01-26  Richard Biener  <rguenther@suse.de>
28721         PR tree-optimization/81082
28722         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
28723         association if it requires casting to unsigned.
28724         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
28725         from fold_plusminus_mult_expr to catch important cases late when
28726         range info is available.
28728 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28730         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
28731         * configure.ac (hidden_linkonce): New test.
28732         * configure: Regenerate.
28733         * config.in: Regenerate.
28735 2018-01-26  Julia Koval  <julia.koval@intel.com>
28737         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
28738         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
28739         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
28740         _mm_mask_bitshuffle_epi64_mask): Fix type.
28741         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
28742         USI_FTYPE_V4DI_V4DI_USI): Remove.
28743         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
28744         __builtin_ia32_vpshufbitqmb256_mask,
28745         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
28746         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
28747         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
28749 2018-01-26  Alan Modra  <amodra@gmail.com>
28751         PR target/84033
28752         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
28753         UNSPEC_VBPERMQ.  Sort other unspecs.
28755 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
28757         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
28759 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
28761         PR middle-end/83055
28762         * predict.c (drop_profile): Do not push/pop cfun; update also
28763         node->count.
28764         (handle_missing_profiles): Fix logic looking for zero profiles.
28766 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
28768         PR middle-end/83977
28769         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
28770         on functions with #pragma omp declare simd or functions with simd
28771         attribute.
28772         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
28773         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
28774         Remove trailing \n from warning_at calls.
28776 2018-01-25  Tom de Vries  <tom@codesourcery.com>
28778         PR target/84028
28779         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28780         for neutered workers.
28782 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
28784         PR target/68467
28785         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
28786         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
28788 2018-01-24  Jeff Law  <law@redhat.com>
28790         PR target/83994
28791         * i386.c (get_probe_interval): Move to earlier point.
28792         (ix86_compute_frame_layout): If -fstack-clash-protection and
28793         the frame is larger than the probe interval, then use pushes
28794         to save registers rather than reg->mem moves.
28795         (ix86_expand_prologue): Remove conditional for int_registers_saved
28796         assertion.
28798 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
28800         PR target/84014
28801         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
28802         min/max for never referenced object.
28804 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
28806         PR middle-end/83977
28807         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
28808         here.
28809         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
28810         attributes from DECL_ATTRIBUTES (decl) without affecting
28811         DECL_ATTRIBUTES (current_function_decl).
28812         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
28813         functions with non-NULL DECL_ABSTRACT_ORIGIN.
28815 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
28817         PR tree-optimization/83979
28818         * fold-const.c (fold_comparison): Use constant_boolean_node
28819         instead of boolean_{true,false}_node.
28821 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
28823         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
28824         with zero counts.
28826 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28828         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28829         Simplify the clause that sets the length attribute.
28830         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28831         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
28832         clause that sets the length attribute.
28833         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28835 2018-01-24  Tom de Vries  <tom@codesourcery.com>
28837         PR target/83589
28838         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
28839         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
28840         Add strict parameter.
28841         (prevent_branch_around_nothing): Insert dummy insn between branch to
28842         label and label with no ptx insn inbetween.
28843         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
28845 2018-01-24  Tom de Vries  <tom@codesourcery.com>
28847         PR target/81352
28848         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28849         for neutered threads in warp.
28850         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
28852 2018-01-24  Richard Biener  <rguenther@suse.de>
28854         PR tree-optimization/83176
28855         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
28856         operands.
28858 2018-01-24  Richard Biener  <rguenther@suse.de>
28860         PR tree-optimization/82819
28861         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
28862         code generating pluses that are no-ops in the target precision.
28864 2018-01-24  Richard Biener  <rguenther@suse.de>
28866         PR middle-end/84000
28867         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
28869 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28871         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
28872         to merge probabilities.
28873         * predict.c (probably_never_executed): Also mark as cold functions
28874         with global 0 profile and guessed local profile.
28875         * profile-count.c (profile_probability::combine_with_count): New
28876         member function.
28877         * profile-count.h (profile_probability::operator*,
28878         profile_probability::operator*=, profile_probability::operator/,
28879         profile_probability::operator/=): Reduce precision to adjusted
28880         and set value to guessed on contradictory divisions.
28881         (profile_probability::combine_with_freq): Remove.
28882         (profile_probability::combine_wiht_count): Declare.
28883         (profile_count::force_nonzero):: Set to adjusted.
28884         (profile_count::probability_in):: Set quality to adjusted.
28885         * tree-ssa-tail-merge.c (replace_block_by): Use
28886         combine_with_count.
28888 2018-01-23  Andrew Waterman  <andrew@sifive.com>
28889             Jim Wilson  <jimw@sifive.com>
28891         * config/riscv/riscv.c (riscv_stack_boundary): New.
28892         (riscv_option_override): Set riscv_stack_boundary.  Handle
28893         riscv_preferred_stack_boundary_arg.
28894         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
28895         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
28896         (STACK_BOUNDARY): Set to riscv_stack_boundary.
28897         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
28898         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
28899         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
28901 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
28903         PR target/83905
28904         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
28905         of struct ix86_frame.
28906         (ix86_expand_epilogue): Likewise.  Add a local variable for
28907         the reg_save_offset field in struct ix86_frame.
28909 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
28911         PR tree-optimization/82604
28912         * tree-loop-distribution.c (enum partition_kind): New enum item
28913         PKIND_PARTIAL_MEMSET.
28914         (partition_builtin_p): Support above new enum item.
28915         (generate_code_for_partition): Ditto.
28916         (compute_access_range): Differentiate cases that equality can be
28917         proven at all loops, the innermost loops or no loops.
28918         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28919         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
28920         (finalize_partitions, distribute_loop): Don't fuse partition of
28921         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28922         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28923         parloop is enabled.
28925 2018-01-23  Martin Liska  <mliska@suse.cz>
28927         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28928         order to ignore the predictor.
28929         (PRED_POLYMORPHIC_CALL): Likewise.
28930         (PRED_RECURSIVE_CALL): Likewise.
28932 2018-01-23  Martin Liska  <mliska@suse.cz>
28934         * tree-profile.c (tree_profiling): Print function header to
28935         aware reader which function we are working on.
28936         * value-prof.c (gimple_find_values_to_profile): Do not print
28937         not interesting value histograms.
28939 2018-01-23  Martin Liska  <mliska@suse.cz>
28941         * profile-count.h (enum profile_quality): Add
28942         profile_uninitialized as the first value. Do not number values
28943         as they are zero based.
28944         (profile_count::verify): Update sanity check.
28945         (profile_probability::verify): Likewise.
28947 2018-01-23  Nathan Sidwell  <nathan@acm.org>
28949         * doc/invoke.texi (ffor-scope): Deprecate.
28951 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28953         PR tree-optimization/83510
28954         * domwalk.c (set_all_edges_as_executable): New function.
28955         (dom_walker::dom_walker): Convert bool param
28956         "skip_unreachable_blocks" to enum reachability.  Move setup of
28957         edge flags to set_all_edges_as_executable and only do it when
28958         reachability is REACHABLE_BLOCKS.
28959         * domwalk.h (enum dom_walker::reachability): New enum.
28960         (dom_walker::dom_walker): Convert bool param
28961         "skip_unreachable_blocks" to enum reachability.
28962         (set_all_edges_as_executable): New decl.
28963         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
28964         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28965         "reachability".
28966         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28967         but converting true to REACHABLE_BLOCKS.
28968         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28969         * tree-vrp.c
28970         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28971         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28972         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28973         REACHABLE_BLOCKS.
28974         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28975         if check_all_array_refs will be called.
28977 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28979         * tree.c (selftest::test_location_wrappers): Add more test
28980         coverage.
28982 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28984         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28985         (selftest::test_bit_in_range): Likewise.
28987 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
28989         PR testsuite/83888
28990         * doc/sourcebuild.texi (vect_float): Say that the selector
28991         only describes the situation when -funsafe-math-optimizations is on.
28992         (vect_float_strict): Document.
28994 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
28996         PR tree-optimization/83965
28997         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28998         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28999         instead of checking only for a reduction.
29000         (vect_recog_widen_sum_pattern): Likewise.
29002 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29004         * predict.c (probably_never_executed): Only use precise profile info.
29005         (compute_function_frequency): Skip after inlining hack since we now
29006         have quality checking.
29008 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
29010         * profile-count.h (profile_probability::very_unlikely,
29011         profile_probability::unlikely, profile_probability::even): Set
29012         precision to guessed.
29014 2018-01-23  Richard Biener  <rguenther@suse.de>
29016         PR tree-optimization/83963
29017         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
29018         Properly terminate dominator walk when crossing the exit edge not
29019         when visiting its source block.
29021 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
29023         PR c++/83918
29024         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
29025         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
29027 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
29029         PR tree-optimization/83957
29030         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
29031         semicolon after for body surrounded by braces.
29033         PR tree-optimization/83081
29034         * profile-count.h (profile_probability::split): New method.
29035         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
29036         Use profile_probability::split.
29037         (do_compare_rtx_and_jump): Fix adjustment of probabilities
29038         when splitting a single conditional jump into 2.
29040 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
29042         PR tree-optimization/69452
29043         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
29044         decl.
29046 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29048         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
29049         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
29050         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
29052 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29054         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
29055         declaration.
29056         * config/rl78/rl78.md (movdi): New define_expand.
29057         * config/rl78/rl78.c (rl78_split_movdi): New function.
29059 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
29061         PR target/83862
29062         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
29063         no longer used.
29064         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
29065         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
29066         128-bit to produce an UNSPEC move to get the double word with the
29067         signbit and then a shift directly to do signbit.
29068         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
29069         implementation with a new version that just does either a direct
29070         move or a regular move.  Move memory interface to separate insns.
29071         Move insns so they are next to the expander.
29072         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
29073         with signbit move.  Split big and little endian case.
29074         (signbit<mode>2_dm_mem_le): Likewise.
29075         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
29076         (signbit<mode>2_dm2): Likewise.
29078 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29080         * config/rl78/rl78.md (anddi3): New define_expand.
29082 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29084         * config/rl78/rl78.md (umindi3): New define_expand.
29086 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29088         * config/rl78/rl78.md (smindi3): New define_expand.
29090 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29092         * config/rl78/rl78.md (smaxdi3): New define_expand.
29094 2018-01-22  Carl Love  <cel@us.ibm.com>
29096         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
29097         LVX_V1TI): Add macro expansion.
29098         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
29099         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
29100         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
29101         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
29102         Change check to determine if the instruction is a byte reversing
29103         entry.  Fix typo in comment.
29104         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
29105         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
29106         Add def_builtin calls for new builtins.
29107         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
29108         Add define_insn expansion.
29110 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29112         * config/rl78/rl78.md (umaxdi3): New define_expand.
29114 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
29116         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
29117         for non-QImode registers.
29119 2018-01-22  Richard Biener  <rguenther@suse.de>
29121         PR tree-optimization/83963
29122         * graphite-scop-detection.c (scop_detection::get_sese): Delay
29123         including the loop exit block.
29124         (scop_detection::merge_sese): Likewise.
29125         (scop_detection::add_scop): Do it here instead.
29127 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29129         * doc/sourcebuild.texi (arm_softfloat): Document.
29131 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
29133         PR gcc/77734
29134         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29135         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29136         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29138 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29139             David Edelsohn  <dje.gcc@gmail.com>
29141         PR target/83946
29142         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29143         Change "crset eq" to "crset 2".
29144         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29145         (*call_indirect_aix<mode>_nospec): Likewise.
29146         (*call_value_indirect_aix<mode>_nospec): Likewise.
29147         (*call_indirect_elfv2<mode>_nospec): Likewise.
29148         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29149         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29150         change assembly output from . to $.
29151         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29152         (indirect_jump<mode>_nospec): Change assembly output from . to $.
29153         (*tablejump<mode>_internal1_nospec): Likewise.
29155 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
29157         PR target/80870
29158         * config/sh/sh_optimize_sett_clrt.cc:
29159         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29161 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
29163         PR tree-optimization/83940
29164         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29165         offset_dt to vect_constant_def rather than vect_unknown_def_type.
29166         (vect_check_load_store_mask): Add a mask_dt_out parameter and
29167         use it to pass back the definition type.
29168         (vect_check_store_rhs): Likewise rhs_dt_out.
29169         (vect_build_gather_load_calls): Add a mask_dt argument and use
29170         it instead of a call to vect_is_simple_use.
29171         (vectorizable_store): Update calls to vect_check_load_store_mask
29172         and vect_check_store_rhs.  Use the dt returned by the latter instead
29173         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
29174         instead of calls to vect_is_simple_use.  Pass the scalar rather
29175         than the vector operand to vect_is_simple_use when handling
29176         second and subsequent copies of an rhs value.
29177         (vectorizable_load): Update calls to vect_check_load_store_mask
29178         and vect_build_gather_load_calls.  Use the cached mask_dt and
29179         gs_info.offset_dt instead of calls to vect_is_simple_use.
29181 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
29183         PR middle-end/83945
29184         * tree-emutls.c: Include gimplify.h.
29185         (lower_emutls_2): New function.
29186         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29187         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29188         it before further processing.
29190         PR target/83930
29191         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29192         UINTVAL (trueop1) instead of INTVAL (op1).
29194 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
29196         PR debug/81570
29197         PR debug/83728
29198         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29199         INCOMING_FRAME_SP_OFFSET if not defined.
29200         (scan_trace): Add ENTRY argument.  If true and
29201         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29202         emit a note to adjust the CFA offset.
29203         (create_cfi_notes): Adjust scan_trace callers.
29204         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29205         INCOMING_FRAME_SP_OFFSET in the CIE.
29206         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29207         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29208         Likewise.
29209         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29210         * doc/tm.texi: Regenerated.
29212 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29214         PR rtl-optimization/83147
29215         * lra-constraints.c (remove_inheritance_pseudos): Use
29216         lra_substitute_pseudo_within_insn.
29218 2018-01-19  Tom de Vries  <tom@codesourcery.com>
29219             Cesar Philippidis  <cesar@codesourcery.com>
29221         PR target/83920
29222         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29224 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
29226         PR target/83790
29227         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29228         spaces for function labels.
29230 2018-01-19  Martin Liska  <mliska@suse.cz>
29232         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29233         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29234         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29235         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29236         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29237         (PRED_CONST_RETURN): Change from 69 to 65.
29238         (PRED_NULL_RETURN): Change from 91 to 71.
29239         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29240         (PRED_LOOP_GUARD): Change from 66 to 73.
29242 2018-01-19  Martin Liska  <mliska@suse.cz>
29244         * predict.c (predict_insn_def): Add new assert.
29245         (struct branch_predictor): Change type to signed integer.
29246         (test_prediction_value_range): Amend test to cover
29247         PROB_UNINITIALIZED.
29248         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29249         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29250         (PRED_LOOP_ITERATIONS_MAX): Likewise.
29251         (PRED_LOOP_IV_COMPARE): Likewise.
29252         * predict.h (PROB_UNINITIALIZED): Define new constant.
29254 2018-01-19  Martin Liska  <mliska@suse.cz>
29256         * predict.c (dump_prediction): Add new format for
29257         analyze_brprob.py script which is enabled with -details
29258         suboption.
29259         * profile-count.h (precise_p): New function.
29261 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29263         PR tree-optimization/83922
29264         * tree-vect-loop.c (vect_verify_full_masking): Return false if
29265         there are no statements that need masking.
29266         (vect_active_double_reduction_p): New function.
29267         (vect_analyze_loop_operations): Use it when handling phis that
29268         are not in the loop header.
29270 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29272         PR tree-optimization/83914
29273         * tree-vect-loop.c (vectorizable_induction): Don't convert
29274         init_expr or apply the peeling adjustment for inductions
29275         that are nested within the vectorized loop.
29277 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29279         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29280         instead of NEG.
29282 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29284         PR sanitizer/81715
29285         PR testsuite/83882
29286         * function.h (gimplify_parameters): Add gimple_seq * argument.
29287         * function.c: Include gimple.h and options.h.
29288         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29289         for the added local temporaries if needed.
29290         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29291         if there are any parameter cleanups, wrap whole body into a
29292         try/finally with the cleanups.
29294 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
29296         PR target/82964
29297         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29298         Use GET_MODE_CLASS for scalar floating point.
29300 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29302         PR ipa/82256
29303         patch by PaX Team
29304         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29305         Fix call of call_cgraph_insertion_hooks.
29307 2018-01-18  Martin Sebor  <msebor@redhat.com>
29309         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29311 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29313         PR ipa/83619
29314         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29315         frequencies.
29317 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
29319         PR other/70268
29320         * common.opt: (-ffile-prefix-map): New option.
29321         * opts.c (common_handle_option): Defer it.
29322         * opts-global.c (handle_common_deferred_options): Handle it.
29323         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29324         * file-prefix-map.h: New file.
29325         (remap_debug_filename, add_debug_prefix_map): ...here.
29326         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29327         * final.c (debug_prefix_map, add_debug_prefix_map
29328         remap_debug_filename): Move to...
29329         * file-prefix-map.c: New file.
29330         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29331         generalize, get rid of alloca(), use strrchr() instead of strchr().
29332         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
29333         Implement in terms of add_prefix_map().
29334         (remap_macro_filename, remap_debug_filename): Implement in term of
29335         remap_filename().
29336         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
29337         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
29338         * dbxout.c: Include file-prefix-map.h.
29339         * varasm.c: Likewise.
29340         * vmsdbgout.c: Likewise.
29341         * xcoffout.c: Likewise.
29342         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
29343         * doc/cppopts.texi (-fmacro-prefix-map): Document.
29344         * doc/invoke.texi (-ffile-prefix-map): Document.
29345         (-fdebug-prefix-map): Update description.
29347 2018-01-18  Martin Liska  <mliska@suse.cz>
29349         * config/i386/i386.c (indirect_thunk_name): Document that also
29350         lfence is emitted.
29351         (output_indirect_thunk): Document why both instructions
29352         (pause and lfence) are generated.
29354 2018-01-18  Richard Biener  <rguenther@suse.de>
29356         PR tree-optimization/83887
29357         * graphite-scop-detection.c
29358         (scop_detection::get_nearest_dom_with_single_entry): Remove.
29359         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
29360         (scop_detection::merge_sese): Re-implement with a flood-fill
29361         algorithm that properly finds a SESE region if it exists.
29363 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29365         PR c/61240
29366         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
29367         pointer_diff optimizations use view_convert instead of convert.
29369 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29371         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29372         Generate different code for -mno-speculate-indirect-jumps.
29373         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29374         (*call_indirect_aix<mode>): Disable for
29375         -mno-speculate-indirect-jumps.
29376         (*call_indirect_aix<mode>_nospec): New define_insn.
29377         (*call_value_indirect_aix<mode>): Disable for
29378         -mno-speculate-indirect-jumps.
29379         (*call_value_indirect_aix<mode>_nospec): New define_insn.
29380         (*sibcall_nonlocal_sysv<mode>): Generate different code for
29381         -mno-speculate-indirect-jumps.
29382         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29384 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
29386         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
29387         long double type, set the flags for noting the default long double
29388         type, even if we don't pass or return a long double type.
29390 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
29392         PR ipa/83051
29393         * ipa-inline.c (flatten_function): Do not overwrite final inlining
29394         failure.
29396 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
29398         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
29399         support for merge[hl].
29400         (fold_mergehl_helper): New helper function.
29401         (tree-vector-builder.h): New #include for tree_vector_builder usage.
29402         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
29403         (altivec_vmrglw_direct): Add xxmrglw insn.
29405 2018-01-17  Andrew Waterman  <andrew@sifive.com>
29407         * config/riscv/riscv.c (riscv_conditional_register_usage): If
29408         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
29410 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
29412         PR lto/83121
29413         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
29414         call the lto_location_cache before reading the
29415         DECL_SOURCE_LOCATION of the types.
29417 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
29418             Richard Sandiford  <richard.sandiford@linaro.org>
29420         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
29421         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
29422         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
29423         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
29424         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
29425         Add declaration.
29426         * config/aarch64/constraints.md (aarch64_movti_operand):
29427         Limit immediates.
29428         * config/aarch64/predicates.md (Uti): Add new constraint.
29430 2018-01-17  Carl Love  <cel@us.ibm.com>
29432         * config/rs6000/vsx.md (define_expand xl_len_r,
29433         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
29434         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
29435         lxvll.
29436         (define_expand, define_insn): Move the shift left from  the
29437         define_insn to the define_expand for lxvl and stxvl instructions.
29438         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
29439         and XL_LEN_R definitions to PURE.
29441 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
29443         * config/i386/i386.c (indirect_thunk_name): Declare regno
29444         as unsigned int.  Compare regno with INVALID_REGNUM.
29445         (output_indirect_thunk): Ditto.
29446         (output_indirect_thunk_function): Ditto.
29447         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
29448         in the call to output_indirect_thunk_function.
29450 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
29452         PR middle-end/83884
29453         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
29454         rather than the size of inner_type to determine the stack slot size
29455         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
29457 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
29459         PR target/83546
29460         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
29461         to PTA_SILVERMONT.
29463 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
29465         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
29466         endian Linux systems to optionally enable multilibs for selecting
29467         the long double type if the user configured an explicit type.
29468         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
29469         have no long double multilibs if not defined.
29470         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
29471         warn if the user used -mabi={ieee,ibm}longdouble and we built
29472         multilibs for long double.
29473         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
29474         appropriate multilib option.
29475         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
29476         multilib options.
29477         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
29478         for building long double multilibs.
29479         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
29481 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
29483         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
29484         copies.
29486         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
29487         64 bits.
29488         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
29489         128 bits.
29491         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
29492         variables.
29494         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
29495         return value.
29497 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
29499         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
29500         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
29502 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29504         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
29505         different rtl trees depending on TARGET_64BIT.
29506         (rs6000_gen_lvx): Likewise.
29508 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
29510         * config/visium/visium.md (nop): Tweak comment.
29511         (hazard_nop): Likewise.
29513 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29515         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
29516         -mspeculate-indirect-jumps.
29517         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
29518         for -mno-speculate-indirect-jumps.
29519         (*call_indirect_elfv2<mode>_nospec): New define_insn.
29520         (*call_value_indirect_elfv2<mode>): Disable for
29521         -mno-speculate-indirect-jumps.
29522         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
29523         (indirect_jump): Emit different RTL for
29524         -mno-speculate-indirect-jumps.
29525         (*indirect_jump<mode>): Disable for
29526         -mno-speculate-indirect-jumps.
29527         (*indirect_jump<mode>_nospec): New define_insn.
29528         (tablejump): Emit different RTL for
29529         -mno-speculate-indirect-jumps.
29530         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
29531         (tablejumpsi_nospec): New define_expand.
29532         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
29533         (tablejumpdi_nospec): New define_expand.
29534         (*tablejump<mode>_internal1): Disable for
29535         -mno-speculate-indirect-jumps.
29536         (*tablejump<mode>_internal1_nospec): New define_insn.
29537         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
29538         option.
29540 2018-01-16  Artyom Skrobov tyomitch@gmail.com
29542         * caller-save.c (insert_save): Drop unnecessary parameter.  All
29543         callers updated.
29545 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
29546             Richard Biener  <rguenth@suse.de>
29548         PR libgomp/83590
29549         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
29550         return early, inline manually is_gimple_sizepos.  Make sure if we
29551         call gimplify_expr we don't end up with a gimple constant.
29552         * tree.c (variably_modified_type_p): Don't return true for
29553         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
29554         * gimplify.h (is_gimple_sizepos): Remove.
29556 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29558         PR tree-optimization/83857
29559         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
29560         vectorizable_live_operation for pure SLP statements.
29561         (vectorizable_live_operation): Handle PHIs.
29563 2018-01-16  Richard Biener  <rguenther@suse.de>
29565         PR tree-optimization/83867
29566         * tree-vect-stmts.c (vect_transform_stmt): Precompute
29567         nested_in_vect_loop_p since the scalar stmt may get invalidated.
29569 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
29571         PR c/83844
29572         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
29573         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
29574         If off is not INTEGER_CST, issue a may not be aligned warning
29575         rather than isn't aligned.  Use isn%'t rather than isn't.
29576         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
29577         into MULT_EXPR.
29578         <case MULT_EXPR>: Improve the case when bottom and one of the
29579         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
29580         operand, in that case check if the other operand is multiple of
29581         bottom divided by the INTEGER_CST operand.
29583 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29585         PR target/83858
29586         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
29587         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
29588         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
29589         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
29590         * config/pa/pa.c (pa_function_arg_advance): Likewise.
29591         (pa_function_arg, pa_arg_partial_bytes): Likewise.
29592         (pa_function_arg_size): New function.
29594 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29596         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
29597         in a separate statement.
29599 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29601         PR tree-optimization/83847
29602         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
29603         group gathers and scatters.
29605 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
29607         PR rtl-optimization/86620
29608         * params.def (max-sched-ready-insns): Bump minimum value to 1.
29610         PR rtl-optimization/83213
29611         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
29612         to last if both are JUMP_INSNs.
29614         PR tree-optimization/83843
29615         * gimple-ssa-store-merging.c
29616         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
29617         store_immediate_info for bswap/nop orig_stores.
29619 2018-01-15  Andrew Waterman  <andrew@sifive.com>
29621         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
29622         !TARGET_MUL.
29623         <UDIV>: Increase cost if !TARGET_DIV.
29625 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29627         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
29628         (define_attr "cr_logical_3op"): New.
29629         (cceq_ior_compare): Adjust.
29630         (cceq_ior_compare_complement): Adjust.
29631         (*cceq_rev_compare): Adjust.
29632         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
29633         (is_cracked_insn): Adjust.
29634         (insn_must_be_first_in_group): Adjust.
29635         * config/rs6000/40x.md: Adjust.
29636         * config/rs6000/440.md: Adjust.
29637         * config/rs6000/476.md: Adjust.
29638         * config/rs6000/601.md: Adjust.
29639         * config/rs6000/603.md: Adjust.
29640         * config/rs6000/6xx.md: Adjust.
29641         * config/rs6000/7450.md: Adjust.
29642         * config/rs6000/7xx.md: Adjust.
29643         * config/rs6000/8540.md: Adjust.
29644         * config/rs6000/cell.md: Adjust.
29645         * config/rs6000/e300c2c3.md: Adjust.
29646         * config/rs6000/e500mc.md: Adjust.
29647         * config/rs6000/e500mc64.md: Adjust.
29648         * config/rs6000/e5500.md: Adjust.
29649         * config/rs6000/e6500.md: Adjust.
29650         * config/rs6000/mpc.md: Adjust.
29651         * config/rs6000/power4.md: Adjust.
29652         * config/rs6000/power5.md: Adjust.
29653         * config/rs6000/power6.md: Adjust.
29654         * config/rs6000/power7.md: Adjust.
29655         * config/rs6000/power8.md: Adjust.
29656         * config/rs6000/power9.md: Adjust.
29657         * config/rs6000/rs64.md: Adjust.
29658         * config/rs6000/titan.md: Adjust.
29660 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29662         * config/i386/predicates.md (indirect_branch_operand): Rewrite
29663         ix86_indirect_branch_register logic.
29665 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29667         * config/i386/constraints.md (Bs): Update
29668         ix86_indirect_branch_register check.  Don't check
29669         ix86_indirect_branch_register with GOT_memory_operand.
29670         (Bw): Likewise.
29671         * config/i386/predicates.md (GOT_memory_operand): Don't check
29672         ix86_indirect_branch_register here.
29673         (GOT32_symbol_operand): Likewise.
29675 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29677         * config/i386/predicates.md (constant_call_address_operand):
29678         Rewrite ix86_indirect_branch_register logic.
29679         (sibcall_insn_operand): Likewise.
29681 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29683         * config/i386/constraints.md (Bs): Replace
29684         ix86_indirect_branch_thunk_register with
29685         ix86_indirect_branch_register.
29686         (Bw): Likewise.
29687         * config/i386/i386.md (indirect_jump): Likewise.
29688         (tablejump): Likewise.
29689         (*sibcall_memory): Likewise.
29690         (*sibcall_value_memory): Likewise.
29691         Peepholes of indirect call and jump via memory: Likewise.
29692         * config/i386/i386.opt: Likewise.
29693         * config/i386/predicates.md (indirect_branch_operand): Likewise.
29694         (GOT_memory_operand): Likewise.
29695         (call_insn_operand): Likewise.
29696         (sibcall_insn_operand): Likewise.
29697         (GOT32_symbol_operand): Likewise.
29699 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
29701         PR middle-end/83837
29702         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
29703         type rather than type addr's type points to.
29704         (expand_omp_atomic_mutex): Likewise.
29705         (expand_omp_atomic): Likewise.
29707 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29709         PR target/83839
29710         * config/i386/i386.c (output_indirect_thunk_function): Use
29711         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
29712         for  __x86_return_thunk.
29714 2018-01-15  Richard Biener  <rguenther@suse.de>
29716         PR middle-end/83850
29717         * expmed.c (extract_bit_field_1): Fix typo.
29719 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29721         PR target/83687
29722         * config/arm/iterators.md (VF): New mode iterator.
29723         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
29724         Remove integer-related logic from pattern.
29725         (neon_vabd<mode>_3): Likewise.
29727 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
29729         PR middle-end/82694
29730         * common.opt (fstrict-overflow): No longer an alias.
29731         (fwrapv-pointer): New option.
29732         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
29733         also for pointer types based on flag_wrapv_pointer.
29734         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
29735         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
29736         opts->x_flag_wrapv got set.
29737         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
29738         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
29739         POINTER_TYPE_OVERFLOW_UNDEFINED.
29740         * match.pd: Likewise in address comparison pattern.
29741         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
29743 2018-01-15  Richard Biener  <rguenther@suse.de>
29745         PR lto/83804
29746         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
29747         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
29748         Reset type names to their identifier if their TYPE_DECL doesn't
29749         have linkage (and thus is used for ODR and devirt).
29750         (save_debug_info_for_decl): Remove.
29751         (save_debug_info_for_type): Likewise.
29752         (add_tree_to_fld_list): Adjust.
29753         * tree-pretty-print.c (dump_generic_node): Make dumping of
29754         type names more robust.
29756 2018-01-15  Richard Biener  <rguenther@suse.de>
29758         * BASE-VER: Bump to 8.0.1.
29760 2018-01-14  Martin Sebor  <msebor@redhat.com>
29762         PR other/83508
29763         * builtins.c (check_access): Avoid warning when the no-warning bit
29764         is set.
29766 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
29768         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
29769         * ira-color (allocno_hard_regs_compare): Likewise.
29771 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
29773         PR target/83013
29774         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
29775         Use .pushsection/.popsection.
29777 2018-01-14  Martin Sebor  <msebor@redhat.com>
29779         PR c++/81327
29780         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
29782 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
29784         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
29785         entry from extra_headers.
29786         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
29787         extra_headers, make the list bitwise identical to the i?86-*-* one.
29789 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29791         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
29792         -mcmodel=large with -mindirect-branch=thunk,
29793         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
29794         -mfunction-return=thunk-extern.
29795         * doc/invoke.texi: Document -mcmodel=large is incompatible with
29796         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
29797         -mfunction-return=thunk and -mfunction-return=thunk-extern.
29799 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29801         * config/i386/i386.c (print_reg): Print the name of the full
29802         integer register without '%'.
29803         (ix86_print_operand): Handle 'V'.
29804         * doc/extend.texi: Document 'V' modifier.
29806 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29808         * config/i386/constraints.md (Bs): Disallow memory operand for
29809         -mindirect-branch-register.
29810         (Bw): Likewise.
29811         * config/i386/predicates.md (indirect_branch_operand): Likewise.
29812         (GOT_memory_operand): Likewise.
29813         (call_insn_operand): Likewise.
29814         (sibcall_insn_operand): Likewise.
29815         (GOT32_symbol_operand): Likewise.
29816         * config/i386/i386.md (indirect_jump): Call convert_memory_address
29817         for -mindirect-branch-register.
29818         (tablejump): Likewise.
29819         (*sibcall_memory): Likewise.
29820         (*sibcall_value_memory): Likewise.
29821         Disallow peepholes of indirect call and jump via memory for
29822         -mindirect-branch-register.
29823         (*call_pop): Replace m with Bw.
29824         (*call_value_pop): Likewise.
29825         (*sibcall_pop_memory): Replace m with Bs.
29826         * config/i386/i386.opt (mindirect-branch-register): New option.
29827         * doc/invoke.texi: Document -mindirect-branch-register option.
29829 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29831         * config/i386/i386-protos.h (ix86_output_function_return): New.
29832         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
29833         set function_return_type.
29834         (indirect_thunk_name): Add ret_p to indicate thunk for function
29835         return.
29836         (output_indirect_thunk_function): Pass false to
29837         indirect_thunk_name.
29838         (ix86_output_indirect_branch_via_reg): Likewise.
29839         (ix86_output_indirect_branch_via_push): Likewise.
29840         (output_indirect_thunk_function): Create alias for function
29841         return thunk if regno < 0.
29842         (ix86_output_function_return): New function.
29843         (ix86_handle_fndecl_attribute): Handle function_return.
29844         (ix86_attribute_table): Add function_return.
29845         * config/i386/i386.h (machine_function): Add
29846         function_return_type.
29847         * config/i386/i386.md (simple_return_internal): Use
29848         ix86_output_function_return.
29849         (simple_return_internal_long): Likewise.
29850         * config/i386/i386.opt (mfunction-return=): New option.
29851         (indirect_branch): Mention -mfunction-return=.
29852         * doc/extend.texi: Document function_return function attribute.
29853         * doc/invoke.texi: Document -mfunction-return= option.
29855 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29857         * config/i386/i386-opts.h (indirect_branch): New.
29858         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
29859         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
29860         with local indirect jump when converting indirect call and jump.
29861         (ix86_set_indirect_branch_type): New.
29862         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
29863         (indirectlabelno): New.
29864         (indirect_thunk_needed): Likewise.
29865         (indirect_thunk_bnd_needed): Likewise.
29866         (indirect_thunks_used): Likewise.
29867         (indirect_thunks_bnd_used): Likewise.
29868         (INDIRECT_LABEL): Likewise.
29869         (indirect_thunk_name): Likewise.
29870         (output_indirect_thunk): Likewise.
29871         (output_indirect_thunk_function): Likewise.
29872         (ix86_output_indirect_branch_via_reg): Likewise.
29873         (ix86_output_indirect_branch_via_push): Likewise.
29874         (ix86_output_indirect_branch): Likewise.
29875         (ix86_output_indirect_jmp): Likewise.
29876         (ix86_code_end): Call output_indirect_thunk_function if needed.
29877         (ix86_output_call_insn): Call ix86_output_indirect_branch if
29878         needed.
29879         (ix86_handle_fndecl_attribute): Handle indirect_branch.
29880         (ix86_attribute_table): Add indirect_branch.
29881         * config/i386/i386.h (machine_function): Add indirect_branch_type
29882         and has_local_indirect_jump.
29883         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
29884         to true.
29885         (tablejump): Likewise.
29886         (*indirect_jump): Use ix86_output_indirect_jmp.
29887         (*tablejump_1): Likewise.
29888         (simple_return_indirect_internal): Likewise.
29889         * config/i386/i386.opt (mindirect-branch=): New option.
29890         (indirect_branch): New.
29891         (keep): Likewise.
29892         (thunk): Likewise.
29893         (thunk-inline): Likewise.
29894         (thunk-extern): Likewise.
29895         * doc/extend.texi: Document indirect_branch function attribute.
29896         * doc/invoke.texi: Document -mindirect-branch= option.
29898 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
29900         PR ipa/83051
29901         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
29903 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
29905         * ipa-inline.c (want_inline_small_function_p): Return false if
29906         inlining has already failed with CIF_FINAL_ERROR.
29907         (update_caller_keys): Call want_inline_small_function_p before
29908         can_inline_edge_p.
29909         (update_callee_keys): Likewise.
29911 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29913         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29914         New function.
29915         (rs6000_quadword_masked_address_p): Likewise.
29916         (quad_aligned_load_p): Likewise.
29917         (quad_aligned_store_p): Likewise.
29918         (const_load_sequence_p): Add comment to describe the outer-most loop.
29919         (mimic_memory_attributes_and_flags): New function.
29920         (rs6000_gen_stvx): Likewise.
29921         (replace_swapped_aligned_store): Likewise.
29922         (rs6000_gen_lvx): Likewise.
29923         (replace_swapped_aligned_load): Likewise.
29924         (replace_swapped_load_constant): Capitalize argument name in
29925         comment describing this function.
29926         (rs6000_analyze_swaps): Add a third pass to search for vector loads
29927         and stores that access quad-word aligned addresses and replace
29928         with stvx or lvx instructions when appropriate.
29929         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29930         New function prototype.
29931         (rs6000_quadword_masked_address_p): Likewise.
29932         (rs6000_gen_lvx): Likewise.
29933         (rs6000_gen_stvx): Likewise.
29934         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29935         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29936         when memory address is aligned.
29937         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29938         this split to select lvx instruction when memory address is aligned.
29939         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29940         instruction when memory address is aligned.
29941         (*vsx_le_perm_load_v16qi): Likewise.
29942         (four unnamed splitters): Modify to select the stvx instruction
29943         when memory is aligned.
29945 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
29947         * predict.c (determine_unlikely_bbs): Handle correctly BBs
29948         which appears in the queue multiple times.
29950 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29951             Alan Hayward  <alan.hayward@arm.com>
29952             David Sherwood  <david.sherwood@arm.com>
29954         * tree-vectorizer.h (vec_lower_bound): New structure.
29955         (_loop_vec_info): Add check_nonzero and lower_bounds.
29956         (LOOP_VINFO_CHECK_NONZERO): New macro.
29957         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29958         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29959         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29960         fields.  Make seg_len the distance travelled, not including the
29961         access size.
29962         (dr_direction_indicator): Declare.
29963         (dr_zero_step_indicator): Likewise.
29964         (dr_known_forward_stride_p): Likewise.
29965         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29966         tree-ssanames.h.
29967         (runtime_alias_check_p): Allow runtime alias checks with
29968         variable strides.
29969         (operator ==): Compare access_size and align.
29970         (prune_runtime_alias_test_list): Rework for new distinction between
29971         the access_size and seg_len.
29972         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
29973         segment lengths.
29974         (get_segment_min_max): New function.
29975         (create_intersect_range_checks): Use it.
29976         (dr_step_indicator): New function.
29977         (dr_direction_indicator): Likewise.
29978         (dr_zero_step_indicator): Likewise.
29979         (dr_known_forward_stride_p): Likewise.
29980         * tree-loop-distribution.c (data_ref_segment_size): Return
29981         DR_STEP * (niters - 1).
29982         (compute_alias_check_pairs): Update call to the dr_with_seg_len
29983         constructor.
29984         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29985         (vect_preserves_scalar_order_p): New function, split out from...
29986         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
29987         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29988         (vect_vfa_access_size): New function.
29989         (vect_vfa_align): Likewise.
29990         (vect_compile_time_alias): Take access_size_a and access_b arguments.
29991         (dump_lower_bound): New function.
29992         (vect_check_lower_bound): Likewise.
29993         (vect_small_gap_p): Likewise.
29994         (vectorizable_with_step_bound_p): Likewise.
29995         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29996         depencies if the vectorization factor is 1.  Convert the checks
29997         for nonzero steps into checks on the bounds of DR_STEP.  Try using
29998         a bunds check for variable steps if the minimum required step is
29999         relatively small. Update calls to the dr_with_seg_len
30000         constructor and to vect_compile_time_alias.
30001         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
30002         function.
30003         (vect_loop_versioning): Call it.
30004         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
30005         when retrying.
30006         (vect_estimate_min_profitable_iters): Account for any bounds checks.
30008 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30009             Alan Hayward  <alan.hayward@arm.com>
30010             David Sherwood  <david.sherwood@arm.com>
30012         * doc/sourcebuild.texi (vect_scatter_store): Document.
30013         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
30014         optabs.
30015         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
30016         Document.
30017         * genopinit.c (main): Add supports_vec_scatter_store and
30018         supports_vec_scatter_store_cached to target_optabs.
30019         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
30020         IFN_MASK_SCATTER_STORE.
30021         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
30022         functions.
30023         * internal-fn.h (internal_store_fn_p): Declare.
30024         (internal_fn_stored_value_index): Likewise.
30025         * internal-fn.c (scatter_store_direct): New macro.
30026         (expand_scatter_store_optab_fn): New function.
30027         (direct_scatter_store_optab_supported_p): New macro.
30028         (internal_store_fn_p): New function.
30029         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
30030         IFN_MASK_SCATTER_STORE.
30031         (internal_fn_mask_index): Likewise.
30032         (internal_fn_stored_value_index): New function.
30033         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
30034         for scatter stores.
30035         * optabs-query.h (supports_vec_scatter_store_p): Declare.
30036         * optabs-query.c (supports_vec_scatter_store_p): New function.
30037         * tree-vectorizer.h (vect_get_store_rhs): Declare.
30038         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
30039         true for scatter stores.
30040         (vect_gather_scatter_fn_p): Handle scatter stores too.
30041         (vect_check_gather_scatter): Consider using scatter stores if
30042         supports_vec_scatter_store_p.
30043         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
30044         scatter stores too.
30045         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30046         internal_fn_stored_value_index.
30047         (check_load_store_masking): Handle scatter stores too.
30048         (vect_get_store_rhs): Make public.
30049         (vectorizable_call): Use internal_store_fn_p.
30050         (vectorizable_store): Handle scatter store internal functions.
30051         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
30052         when deciding whether the end of the group has been reached.
30053         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
30054         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
30055         (mask_scatter_store<mode>): New insns.
30057 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30058             Alan Hayward  <alan.hayward@arm.com>
30059             David Sherwood  <david.sherwood@arm.com>
30061         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
30062         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
30063         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
30064         function.
30065         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
30066         Use vect_truncate_gather_scatter_offset if we can't treat the
30067         operation as a normal gather load or scatter store.
30068         (get_group_load_store_type): Take the gather_scatter_info
30069         as argument.  Try using a gather load or scatter store for
30070         single-element groups.
30071         (get_load_store_type): Update calls to get_group_load_store_type
30072         and vect_use_strided_gather_scatters_p.
30074 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30075             Alan Hayward  <alan.hayward@arm.com>
30076             David Sherwood  <david.sherwood@arm.com>
30078         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
30079         optional tree argument.
30080         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
30081         null target hooks.
30082         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
30083         but continue to use the current value as a fallback.
30084         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
30085         to compare the updates.
30086         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
30087         (get_load_store_type): Use it when handling a strided access.
30088         (vect_get_strided_load_store_ops): New function.
30089         (vect_get_data_ptr_increment): Likewise.
30090         (vectorizable_load): Handle strided gather loads.  Always pass
30091         a step to vect_create_data_ref_ptr and bump_vector_ptr.
30093 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30094             Alan Hayward  <alan.hayward@arm.com>
30095             David Sherwood  <david.sherwood@arm.com>
30097         * doc/md.texi (gather_load@var{m}): Document.
30098         (mask_gather_load@var{m}): Likewise.
30099         * genopinit.c (main): Add supports_vec_gather_load and
30100         supports_vec_gather_load_cached to target_optabs.
30101         * optabs-tree.c (init_tree_optimization_optabs): Use
30102         ggc_cleared_alloc to allocate target_optabs.
30103         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
30104         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
30105         functions.
30106         * internal-fn.h (internal_load_fn_p): Declare.
30107         (internal_gather_scatter_fn_p): Likewise.
30108         (internal_fn_mask_index): Likewise.
30109         (internal_gather_scatter_fn_supported_p): Likewise.
30110         * internal-fn.c (gather_load_direct): New macro.
30111         (expand_gather_load_optab_fn): New function.
30112         (direct_gather_load_optab_supported_p): New macro.
30113         (direct_internal_fn_optab): New function.
30114         (internal_load_fn_p): Likewise.
30115         (internal_gather_scatter_fn_p): Likewise.
30116         (internal_fn_mask_index): Likewise.
30117         (internal_gather_scatter_fn_supported_p): Likewise.
30118         * optabs-query.c (supports_at_least_one_mode_p): New function.
30119         (supports_vec_gather_load_p): Likewise.
30120         * optabs-query.h (supports_vec_gather_load_p): Declare.
30121         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
30122         and memory_type field.
30123         (NUM_PATTERNS): Bump to 15.
30124         * tree-vect-data-refs.c: Include internal-fn.h.
30125         (vect_gather_scatter_fn_p): New function.
30126         (vect_describe_gather_scatter_call): Likewise.
30127         (vect_check_gather_scatter): Try using internal functions for
30128         gather loads.  Recognize existing calls to a gather load function.
30129         (vect_analyze_data_refs): Consider using gather loads if
30130         supports_vec_gather_load_p.
30131         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30132         (vect_get_gather_scatter_offset_type): Likewise.
30133         (vect_convert_mask_for_vectype): Likewise.
30134         (vect_add_conversion_to_patterm): Likewise.
30135         (vect_try_gather_scatter_pattern): Likewise.
30136         (vect_recog_gather_scatter_pattern): New pattern recognizer.
30137         (vect_vect_recog_func_ptrs): Add it.
30138         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30139         internal_fn_mask_index and internal_gather_scatter_fn_p.
30140         (check_load_store_masking): Take the gather_scatter_info as an
30141         argument and handle gather loads.
30142         (vect_get_gather_scatter_ops): New function.
30143         (vectorizable_call): Check internal_load_fn_p.
30144         (vectorizable_load): Likewise.  Handle gather load internal
30145         functions.
30146         (vectorizable_store): Update call to check_load_store_masking.
30147         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30148         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30149         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30150         (aarch64_gather_scale_operand_d): New predicates.
30151         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30152         (mask_gather_load<mode>): New insns.
30154 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30155             Alan Hayward  <alan.hayward@arm.com>
30156             David Sherwood  <david.sherwood@arm.com>
30158         * optabs.def (fold_left_plus_optab): New optab.
30159         * doc/md.texi (fold_left_plus_@var{m}): Document.
30160         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30161         * internal-fn.c (fold_left_direct): Define.
30162         (expand_fold_left_optab_fn): Likewise.
30163         (direct_fold_left_optab_supported_p): Likewise.
30164         * fold-const-call.c (fold_const_fold_left): New function.
30165         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30166         * tree-parloops.c (valid_reduction_p): New function.
30167         (gather_scalar_reductions): Use it.
30168         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30169         (vect_finish_replace_stmt): Declare.
30170         * tree-vect-loop.c (fold_left_reduction_fn): New function.
30171         (needs_fold_left_reduction_p): New function, split out from...
30172         (vect_is_simple_reduction): ...here.  Accept reductions that
30173         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30174         (vect_force_simple_reduction): Also store the reduction type in
30175         the assignment's STMT_VINFO_REDUC_TYPE.
30176         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30177         (merge_with_identity): New function.
30178         (vect_expand_fold_left): Likewise.
30179         (vectorize_fold_left_reduction): Likewise.
30180         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
30181         scalar phi in place for it.  Check for target support and reject
30182         cases that would reassociate the operation.  Defer the transform
30183         phase to vectorize_fold_left_reduction.
30184         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30185         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30186         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30188 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30190         * tree-if-conv.c (predicate_mem_writes): Remove redundant
30191         call to ifc_temp_var.
30193 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30194             Alan Hayward  <alan.hayward@arm.com>
30195             David Sherwood  <david.sherwood@arm.com>
30197         * target.def (legitimize_address_displacement): Take the original
30198         offset as a poly_int.
30199         * targhooks.h (default_legitimize_address_displacement): Update
30200         accordingly.
30201         * targhooks.c (default_legitimize_address_displacement): Likewise.
30202         * doc/tm.texi: Regenerate.
30203         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30204         as an argument, moving assert of ad->disp == ad->disp_term to...
30205         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
30206         Try calling targetm.legitimize_address_displacement before expanding
30207         the address rather than afterwards, and adjust for the new interface.
30208         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30209         Match the new hook interface.  Handle SVE addresses.
30210         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30211         new hook interface.
30213 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30215         * Makefile.in (OBJS): Add early-remat.o.
30216         * target.def (select_early_remat_modes): New hook.
30217         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30218         * doc/tm.texi: Regenerate.
30219         * targhooks.h (default_select_early_remat_modes): Declare.
30220         * targhooks.c (default_select_early_remat_modes): New function.
30221         * timevar.def (TV_EARLY_REMAT): New timevar.
30222         * passes.def (pass_early_remat): New pass.
30223         * tree-pass.h (make_pass_early_remat): Declare.
30224         * early-remat.c: New file.
30225         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30226         function.
30227         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30229 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30230             Alan Hayward  <alan.hayward@arm.com>
30231             David Sherwood  <david.sherwood@arm.com>
30233         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30234         vfm1 with a bound_epilog parameter.
30235         (vect_do_peeling): Update calls accordingly, and move the prologue
30236         call earlier in the function.  Treat the base bound_epilog as 0 for
30237         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
30238         this base when peeling for gaps.
30239         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30240         with fully-masked loops.
30241         (vect_estimate_min_profitable_iters): Handle the single peeled
30242         iteration in that case.
30244 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30245             Alan Hayward  <alan.hayward@arm.com>
30246             David Sherwood  <david.sherwood@arm.com>
30248         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30249         single-element interleaving even if the size is not a power of 2.
30250         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30251         accesses for single-element interleaving if the group size is
30252         not a power of 2.
30254 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30255             Alan Hayward  <alan.hayward@arm.com>
30256             David Sherwood  <david.sherwood@arm.com>
30258         * doc/md.texi (fold_extract_last_@var{m}): Document.
30259         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30260         * optabs.def (fold_extract_last_optab): New optab.
30261         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30262         * internal-fn.c (fold_extract_direct): New macro.
30263         (expand_fold_extract_optab_fn): Likewise.
30264         (direct_fold_extract_optab_supported_p): Likewise.
30265         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30266         * tree-vect-loop.c (vect_model_reduction_cost): Handle
30267         EXTRACT_LAST_REDUCTION.
30268         (get_initial_def_for_reduction): Do not create an initial vector
30269         for EXTRACT_LAST_REDUCTION reductions.
30270         (vectorizable_reduction): Leave the scalar phi in place for
30271         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
30272         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
30273         epilogue code for EXTRACT_LAST_REDUCTION and defer the
30274         transform phase to vectorizable_condition.
30275         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30276         split out from...
30277         (vect_finish_stmt_generation): ...here.
30278         (vect_finish_replace_stmt): New function.
30279         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30280         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30281         pattern.
30282         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30284 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30285             Alan Hayward  <alan.hayward@arm.com>
30286             David Sherwood  <david.sherwood@arm.com>
30288         * doc/md.texi (extract_last_@var{m}): Document.
30289         * optabs.def (extract_last_optab): New optab.
30290         * internal-fn.def (EXTRACT_LAST): New internal function.
30291         * internal-fn.c (cond_unary_direct): New macro.
30292         (expand_cond_unary_optab_fn): Likewise.
30293         (direct_cond_unary_optab_supported_p): Likewise.
30294         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30295         loops using EXTRACT_LAST.
30296         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30297         (extract_last_<mode>): ...this optab.
30298         (vec_extract<mode><Vel>): Update accordingly.
30300 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30301             Alan Hayward  <alan.hayward@arm.com>
30302             David Sherwood  <david.sherwood@arm.com>
30304         * target.def (empty_mask_is_expensive): New hook.
30305         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30306         * doc/tm.texi: Regenerate.
30307         * targhooks.h (default_empty_mask_is_expensive): Declare.
30308         * targhooks.c (default_empty_mask_is_expensive): New function.
30309         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30310         if the target says that empty masks are expensive.
30311         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30312         New function.
30313         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30315 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30316             Alan Hayward  <alan.hayward@arm.com>
30317             David Sherwood  <david.sherwood@arm.com>
30319         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30320         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30321         (vect_use_loop_mask_for_alignment_p): New function.
30322         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30323         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30324         niters_skip argument.  Make sure that the first niters_skip elements
30325         of the first iteration are inactive.
30326         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30327         Update call to vect_set_loop_masks_directly.
30328         (get_misalign_in_elems): New function, split out from...
30329         (vect_gen_prolog_loop_niters): ...here.
30330         (vect_update_init_of_dr): Take a code argument that specifies whether
30331         the adjustment should be added or subtracted.
30332         (vect_update_init_of_drs): Likewise.
30333         (vect_prepare_for_masked_peels): New function.
30334         (vect_do_peeling): Skip prologue peeling if we're using a mask
30335         instead.  Update call to vect_update_inits_of_drs.
30336         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30337         mask_skip_niters.
30338         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
30339         alignment.  Do not include the number of peeled iterations in
30340         the minimum threshold in that case.
30341         (vectorizable_induction): Adjust the start value down by
30342         LOOP_VINFO_MASK_SKIP_NITERS iterations.
30343         (vect_transform_loop): Call vect_prepare_for_masked_peels.
30344         Take the number of skipped iterations into account when calculating
30345         the loop bounds.
30346         * tree-vect-stmts.c (vect_gen_while_not): New function.
30348 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30349             Alan Hayward  <alan.hayward@arm.com>
30350             David Sherwood  <david.sherwood@arm.com>
30352         * doc/sourcebuild.texi (vect_fully_masked): Document.
30353         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
30354         default value to 0.
30355         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
30356         split out from...
30357         (vect_analyze_loop_2): ...here. Don't check the vectorization
30358         factor against the number of loop iterations if the loop is
30359         fully-masked.
30361 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30362             Alan Hayward  <alan.hayward@arm.com>
30363             David Sherwood  <david.sherwood@arm.com>
30365         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
30366         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
30367         (dump_groups): Update accordingly.
30368         (iv_use::mem_type): New member variable.
30369         (address_p): New function.
30370         (record_use): Add a mem_type argument and initialize the new
30371         mem_type field.
30372         (record_group_use): Add a mem_type argument.  Use address_p.
30373         Remove obsolete null checks of base_object.  Update call to record_use.
30374         (find_interesting_uses_op): Update call to record_group_use.
30375         (find_interesting_uses_cond): Likewise.
30376         (find_interesting_uses_address): Likewise.
30377         (get_mem_type_for_internal_fn): New function.
30378         (find_address_like_use): Likewise.
30379         (find_interesting_uses_stmt): Try find_address_like_use before
30380         calling find_interesting_uses_op.
30381         (addr_offset_valid_p): Use the iv mem_type field as the type
30382         of the addressed memory.
30383         (add_autoinc_candidates): Likewise.
30384         (get_address_cost): Likewise.
30385         (split_small_address_groups_p): Use address_p.
30386         (split_address_groups): Likewise.
30387         (add_iv_candidate_for_use): Likewise.
30388         (autoinc_possible_for_pair): Likewise.
30389         (rewrite_groups): Likewise.
30390         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
30391         (determine_group_iv_cost): Update after split of USE_ADDRESS.
30392         (get_alias_ptr_type_for_ptr_address): New function.
30393         (rewrite_use_address): Rewrite address uses in calls that were
30394         identified by find_address_like_use.
30396 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30397             Alan Hayward  <alan.hayward@arm.com>
30398             David Sherwood  <david.sherwood@arm.com>
30400         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
30401         TARGET_MEM_REFs.
30402         * gimple-expr.h (is_gimple_addressable: Likewise.
30403         * gimple-expr.c (is_gimple_address): Likewise.
30404         * internal-fn.c (expand_call_mem_ref): New function.
30405         (expand_mask_load_optab_fn): Use it.
30406         (expand_mask_store_optab_fn): Likewise.
30408 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30409             Alan Hayward  <alan.hayward@arm.com>
30410             David Sherwood  <david.sherwood@arm.com>
30412         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
30413         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
30414         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
30415         (cond_umax@var{mode}): Document.
30416         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
30417         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
30418         (cond_umin_optab, cond_umax_optab): New optabs.
30419         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
30420         (COND_IOR, COND_XOR): New internal functions.
30421         * internal-fn.h (get_conditional_internal_fn): Declare.
30422         * internal-fn.c (cond_binary_direct): New macro.
30423         (expand_cond_binary_optab_fn): Likewise.
30424         (direct_cond_binary_optab_supported_p): Likewise.
30425         (get_conditional_internal_fn): New function.
30426         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
30427         Cope with reduction statements that are vectorized as calls rather
30428         than assignments.
30429         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
30430         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
30431         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
30432         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
30433         (UNSPEC_COND_EOR): New unspecs.
30434         (optab): Add mappings for them.
30435         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
30436         (sve_int_op, sve_fp_op): New int attributes.
30438 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30439             Alan Hayward  <alan.hayward@arm.com>
30440             David Sherwood  <david.sherwood@arm.com>
30442         * optabs.def (while_ult_optab): New optab.
30443         * doc/md.texi (while_ult@var{m}@var{n}): Document.
30444         * internal-fn.def (WHILE_ULT): New internal function.
30445         * internal-fn.h (direct_internal_fn_supported_p): New override
30446         that takes two types as argument.
30447         * internal-fn.c (while_direct): New macro.
30448         (expand_while_optab_fn): New function.
30449         (convert_optab_supported_p): Likewise.
30450         (direct_while_optab_supported_p): New macro.
30451         * wide-int.h (wi::udiv_ceil): New function.
30452         * tree-vectorizer.h (rgroup_masks): New structure.
30453         (vec_loop_masks): New typedef.
30454         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
30455         and fully_masked_p.
30456         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
30457         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
30458         (vect_max_vf): New function.
30459         (slpeel_make_loop_iterate_ntimes): Delete.
30460         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
30461         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
30462         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
30463         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
30464         internal-fn.h, stor-layout.h and optabs-query.h.
30465         (vect_set_loop_mask): New function.
30466         (add_preheader_seq): Likewise.
30467         (add_header_seq): Likewise.
30468         (interleave_supported_p): Likewise.
30469         (vect_maybe_permute_loop_masks): Likewise.
30470         (vect_set_loop_masks_directly): Likewise.
30471         (vect_set_loop_condition_masked): Likewise.
30472         (vect_set_loop_condition_unmasked): New function, split out from
30473         slpeel_make_loop_iterate_ntimes.
30474         (slpeel_make_loop_iterate_ntimes): Rename to..
30475         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
30476         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
30477         (vect_do_peeling): Update call accordingly.
30478         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
30479         loops.
30480         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30481         mask_compare_type, can_fully_mask_p and fully_masked_p.
30482         (release_vec_loop_masks): New function.
30483         (_loop_vec_info): Use it to free the loop masks.
30484         (can_produce_all_loop_masks_p): New function.
30485         (vect_get_max_nscalars_per_iter): Likewise.
30486         (vect_verify_full_masking): Likewise.
30487         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
30488         retries, and free the mask rgroups before retrying.  Check loop-wide
30489         reasons for disallowing fully-masked loops.  Make the final decision
30490         about whether use a fully-masked loop or not.
30491         (vect_estimate_min_profitable_iters): Do not assume that peeling
30492         for the number of iterations will be needed for fully-masked loops.
30493         (vectorizable_reduction): Disable fully-masked loops.
30494         (vectorizable_live_operation): Likewise.
30495         (vect_halve_mask_nunits): New function.
30496         (vect_double_mask_nunits): Likewise.
30497         (vect_record_loop_mask): Likewise.
30498         (vect_get_loop_mask): Likewise.
30499         (vect_transform_loop): Handle the case in which the final loop
30500         iteration might handle a partial vector.  Call vect_set_loop_condition
30501         instead of slpeel_make_loop_iterate_ntimes.
30502         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
30503         (check_load_store_masking): New function.
30504         (prepare_load_store_mask): Likewise.
30505         (vectorizable_store): Handle fully-masked loops.
30506         (vectorizable_load): Likewise.
30507         (supportable_widening_operation): Use vect_halve_mask_nunits for
30508         booleans.
30509         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
30510         (vect_gen_while): New function.
30511         * config/aarch64/aarch64.md (umax<mode>3): New expander.
30512         (aarch64_uqdec<mode>): New insn.
30514 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30515             Alan Hayward  <alan.hayward@arm.com>
30516             David Sherwood  <david.sherwood@arm.com>
30518         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
30519         (reduc_xor_scal_optab): New optabs.
30520         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
30521         (reduc_xor_scal_@var{m}): Document.
30522         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
30523         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
30524         internal functions.
30525         * fold-const-call.c (fold_const_call): Handle them.
30526         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
30527         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
30528         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
30529         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
30530         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
30531         (UNSPEC_XORV): New unspecs.
30532         (optab): Add entries for them.
30533         (BITWISEV): New int iterator.
30534         (bit_reduc_op): New int attributes.
30536 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30537             Alan Hayward  <alan.hayward@arm.com>
30538             David Sherwood  <david.sherwood@arm.com>
30540         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
30541         * internal-fn.def (VEC_SHL_INSERT): New internal function.
30542         * optabs.def (vec_shl_insert_optab): New optab.
30543         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
30544         (duplicate_and_interleave): Likewise.
30545         * tree-vect-loop.c: Include internal-fn.h.
30546         (neutral_op_for_slp_reduction): New function, split out from
30547         get_initial_defs_for_reduction.
30548         (get_initial_def_for_reduction): Handle option 2 for variable-length
30549         vectors by loading the neutral value into a vector and then shifting
30550         the initial value into element 0.
30551         (get_initial_defs_for_reduction): Replace the code argument with
30552         the neutral value calculated by neutral_op_for_slp_reduction.
30553         Use gimple_build_vector for constant-length vectors.
30554         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
30555         but the first group_size elements have a neutral value.
30556         Use duplicate_and_interleave otherwise.
30557         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
30558         Update call to get_initial_defs_for_reduction.  Handle SLP
30559         reductions for variable-length vectors by creating one vector
30560         result for each scalar result, with the elements associated
30561         with other scalar results stubbed out with the neutral value.
30562         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
30563         Require IFN_VEC_SHL_INSERT for double reductions on
30564         variable-length vectors, or SLP reductions that have
30565         a neutral value.  Require can_duplicate_and_interleave_p
30566         support for variable-length unchained SLP reductions if there
30567         is no neutral value, such as for MIN/MAX reductions.  Also require
30568         the number of vector elements to be a multiple of the number of
30569         SLP statements when doing variable-length unchained SLP reductions.
30570         Update call to vect_create_epilog_for_reduction.
30571         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
30572         and remove initial values.
30573         (duplicate_and_interleave): Make public.
30574         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
30575         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
30577 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30578             Alan Hayward  <alan.hayward@arm.com>
30579             David Sherwood  <david.sherwood@arm.com>
30581         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
30582         (can_duplicate_and_interleave_p): New function.
30583         (vect_get_and_check_slp_defs): Take the vector of statements
30584         rather than just the current one.  Remove excess parentheses.
30585         Restriction rejectinon of vect_constant_def and vect_external_def
30586         for variable-length vectors to boolean types, or types for which
30587         can_duplicate_and_interleave_p is false.
30588         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
30589         (duplicate_and_interleave): New function.
30590         (vect_get_constant_vectors): Use gimple_build_vector for
30591         constant-length vectors and suitable variable-length constant
30592         vectors.  Use duplicate_and_interleave for other variable-length
30593         vectors.  Don't defer the update when inserting new statements.
30595 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30596             Alan Hayward  <alan.hayward@arm.com>
30597             David Sherwood  <david.sherwood@arm.com>
30599         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
30600         min_profitable_iters doesn't go negative.
30602 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30603             Alan Hayward  <alan.hayward@arm.com>
30604             David Sherwood  <david.sherwood@arm.com>
30606         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
30607         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
30608         * optabs.def (vec_mask_load_lanes_optab): New optab.
30609         (vec_mask_store_lanes_optab): Likewise.
30610         * internal-fn.def (MASK_LOAD_LANES): New internal function.
30611         (MASK_STORE_LANES): Likewise.
30612         * internal-fn.c (mask_load_lanes_direct): New macro.
30613         (mask_store_lanes_direct): Likewise.
30614         (expand_mask_load_optab_fn): Handle masked operations.
30615         (expand_mask_load_lanes_optab_fn): New macro.
30616         (expand_mask_store_optab_fn): Handle masked operations.
30617         (expand_mask_store_lanes_optab_fn): New macro.
30618         (direct_mask_load_lanes_optab_supported_p): Likewise.
30619         (direct_mask_store_lanes_optab_supported_p): Likewise.
30620         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
30621         parameter.
30622         (vect_load_lanes_supported): Likewise.
30623         * tree-vect-data-refs.c (strip_conversion): New function.
30624         (can_group_stmts_p): Likewise.
30625         (vect_analyze_data_ref_accesses): Use it instead of checking
30626         for a pair of assignments.
30627         (vect_store_lanes_supported): Take a masked_p parameter.
30628         (vect_load_lanes_supported): Likewise.
30629         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
30630         vect_store_lanes_supported and vect_load_lanes_supported.
30631         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
30632         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
30633         parameter.  Don't allow gaps for masked accesses.
30634         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
30635         and vect_load_lanes_supported.
30636         (get_load_store_type): Take a masked_p parameter and update
30637         call to get_group_load_store_type.
30638         (vectorizable_store): Update call to get_load_store_type.
30639         Handle IFN_MASK_STORE_LANES.
30640         (vectorizable_load): Update call to get_load_store_type.
30641         Handle IFN_MASK_LOAD_LANES.
30643 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30644             Alan Hayward  <alan.hayward@arm.com>
30645             David Sherwood  <david.sherwood@arm.com>
30647         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
30648         modes for SVE.
30649         * config/aarch64/aarch64-protos.h
30650         (aarch64_sve_struct_memory_operand_p): Declare.
30651         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
30652         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
30653         (VPRED, vpred): Handle SVE structure modes.
30654         * config/aarch64/constraints.md (Utx): New constraint.
30655         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
30656         (aarch64_sve_struct_nonimmediate_operand): New predicates.
30657         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
30658         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
30659         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
30660         structure modes.  Split into pieces after RA.
30661         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
30662         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
30663         New patterns.
30664         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
30665         SVE structure modes.
30666         (aarch64_classify_address): Likewise.
30667         (sizetochar): Move earlier in file.
30668         (aarch64_print_operand): Handle SVE register lists.
30669         (aarch64_array_mode): New function.
30670         (aarch64_sve_struct_memory_operand_p): Likewise.
30671         (TARGET_ARRAY_MODE): Redefine.
30673 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30674             Alan Hayward  <alan.hayward@arm.com>
30675             David Sherwood  <david.sherwood@arm.com>
30677         * target.def (array_mode): New target hook.
30678         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
30679         * doc/tm.texi: Regenerate.
30680         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
30681         * hooks.c (hook_optmode_mode_uhwi_none): New function.
30682         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
30683         targetm.array_mode.
30684         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
30685         type sizes.
30687 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30688             Alan Hayward  <alan.hayward@arm.com>
30689             David Sherwood  <david.sherwood@arm.com>
30691         * fold-const.c (fold_binary_loc): Check the argument types
30692         rather than the result type when testing for a vector operation.
30694 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30696         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
30697         * doc/tm.texi: Regenerate.
30699 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30700             Alan Hayward  <alan.hayward@arm.com>
30701             David Sherwood  <david.sherwood@arm.com>
30703         * doc/invoke.texi (-msve-vector-bits=): Document new option.
30704         (sve): Document new AArch64 extension.
30705         * doc/md.texi (w): Extend the description of the AArch64
30706         constraint to include SVE vectors.
30707         (Upl, Upa): Document new AArch64 predicate constraints.
30708         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
30709         enum.
30710         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
30711         (msve-vector-bits=): New option.
30712         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
30713         SVE when these are disabled.
30714         (sve): New extension.
30715         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
30716         modes.  Adjust their number of units based on aarch64_sve_vg.
30717         (MAX_BITSIZE_MODE_ANY_MODE): Define.
30718         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
30719         aarch64_addr_query_type.
30720         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
30721         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
30722         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
30723         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
30724         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
30725         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
30726         (aarch64_simd_imm_zero_p): Delete.
30727         (aarch64_check_zero_based_sve_index_immediate): Declare.
30728         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30729         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30730         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30731         (aarch64_sve_float_mul_immediate_p): Likewise.
30732         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30733         rather than an rtx.
30734         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
30735         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
30736         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
30737         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
30738         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
30739         (aarch64_regmode_natural_size): Likewise.
30740         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
30741         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
30742         left one place.
30743         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
30744         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
30745         for VG and the SVE predicate registers.
30746         (V_ALIASES): Add a "z"-prefixed alias.
30747         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
30748         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
30749         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
30750         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
30751         (REG_CLASS_NAMES): Add entries for them.
30752         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
30753         and the predicate registers.
30754         (aarch64_sve_vg): Declare.
30755         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
30756         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
30757         (REGMODE_NATURAL_SIZE): Define.
30758         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
30759         SVE macros.
30760         * config/aarch64/aarch64.c: Include cfgrtl.h.
30761         (simd_immediate_info): Add a constructor for series vectors,
30762         and an associated step field.
30763         (aarch64_sve_vg): New variable.
30764         (aarch64_dbx_register_number): Handle VG and the predicate registers.
30765         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
30766         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
30767         (VEC_ANY_DATA, VEC_STRUCT): New constants.
30768         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
30769         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
30770         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
30771         (aarch64_get_mask_mode): New functions.
30772         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
30773         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
30774         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
30775         predicate modes and predicate registers.  Explicitly restrict
30776         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
30777         to store a vector mode if it is recognized by
30778         aarch64_classify_vector_mode.
30779         (aarch64_regmode_natural_size): New function.
30780         (aarch64_hard_regno_caller_save_mode): Return the original mode
30781         for predicates.
30782         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
30783         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
30784         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
30785         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
30786         functions.
30787         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
30788         does not overlap dest if the function is frame-related.  Handle
30789         SVE constants.
30790         (aarch64_split_add_offset): New function.
30791         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
30792         them aarch64_add_offset.
30793         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
30794         and update call to aarch64_sub_sp.
30795         (aarch64_add_cfa_expression): New function.
30796         (aarch64_expand_prologue): Pass extra temporary registers to the
30797         functions above.  Handle the case in which we need to emit new
30798         DW_CFA_expressions for registers that were originally saved
30799         relative to the stack pointer, but now have to be expressed
30800         relative to the frame pointer.
30801         (aarch64_output_mi_thunk): Pass extra temporary registers to the
30802         functions above.
30803         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
30804         IP0 and IP1 values for SVE frames.
30805         (aarch64_expand_vec_series): New function.
30806         (aarch64_expand_sve_widened_duplicate): Likewise.
30807         (aarch64_expand_sve_const_vector): Likewise.
30808         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
30809         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
30810         into the register, rather than emitting a SET directly.
30811         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
30812         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
30813         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
30814         (offset_9bit_signed_scaled_p): New functions.
30815         (aarch64_replicate_bitmask_imm): New function.
30816         (aarch64_bitmask_imm): Use it.
30817         (aarch64_cannot_force_const_mem): Reject expressions involving
30818         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
30819         (aarch64_classify_index): Handle SVE indices, by requiring
30820         a plain register index with a scale that matches the element size.
30821         (aarch64_classify_address): Handle SVE addresses.  Assert that
30822         the mode of the address is VOIDmode or an integer mode.
30823         Update call to aarch64_classify_symbol.
30824         (aarch64_classify_symbolic_expression): Update call to
30825         aarch64_classify_symbol.
30826         (aarch64_const_vec_all_in_range_p): New function.
30827         (aarch64_print_vector_float_operand): Likewise.
30828         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
30829         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
30830         and the FP immediates 1.0 and 0.5.
30831         (aarch64_print_address_internal): Handle SVE addresses.
30832         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
30833         (aarch64_regno_regclass): Handle predicate registers.
30834         (aarch64_secondary_reload): Handle big-endian reloads of SVE
30835         data modes.
30836         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
30837         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
30838         (aarch64_convert_sve_vector_bits): New function.
30839         (aarch64_override_options): Use it to handle -msve-vector-bits=.
30840         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30841         rather than an rtx.
30842         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
30843         Handle SVE vector and predicate modes.  Accept VL-based constants
30844         that need only one temporary register, and VL offsets that require
30845         no temporary registers.
30846         (aarch64_conditional_register_usage): Mark the predicate registers
30847         as fixed if SVE isn't available.
30848         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
30849         Return true for SVE vector and predicate modes.
30850         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
30851         rather than an unsigned int.  Handle SVE modes.
30852         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
30853         SVE modes.
30854         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
30855         if SVE is enabled.
30856         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30857         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30858         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30859         (aarch64_sve_float_mul_immediate_p): New functions.
30860         (aarch64_sve_valid_immediate): New function.
30861         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
30862         Explicitly reject structure modes.  Check for INDEX constants.
30863         Handle PTRUE and PFALSE constants.
30864         (aarch64_check_zero_based_sve_index_immediate): New function.
30865         (aarch64_simd_imm_zero_p): Delete.
30866         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
30867         vector modes.  Accept constants in the range of CNT[BHWD].
30868         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
30869         ask for an Advanced SIMD mode.
30870         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
30871         (aarch64_simd_vector_alignment): Handle SVE predicates.
30872         (aarch64_vectorize_preferred_vector_alignment): New function.
30873         (aarch64_simd_vector_alignment_reachable): Use it instead of
30874         the vector size.
30875         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
30876         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
30877         functions.
30878         (MAX_VECT_LEN): Delete.
30879         (expand_vec_perm_d): Add a vec_flags field.
30880         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
30881         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
30882         (aarch64_evpc_ext): Don't apply a big-endian lane correction
30883         for SVE modes.
30884         (aarch64_evpc_rev): Rename to...
30885         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
30886         (aarch64_evpc_rev_global): New function.
30887         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
30888         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
30889         MAX_VECT_LEN.
30890         (aarch64_evpc_sve_tbl): New function.
30891         (aarch64_expand_vec_perm_const_1): Update after rename of
30892         aarch64_evpc_rev.  Handle SVE permutes too, trying
30893         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
30894         than aarch64_evpc_tbl.
30895         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
30896         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
30897         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
30898         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
30899         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
30900         (aarch64_expand_sve_vcond): New functions.
30901         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
30902         of aarch64_vector_mode_p.
30903         (aarch64_dwarf_poly_indeterminate_value): New function.
30904         (aarch64_compute_pressure_classes): Likewise.
30905         (aarch64_can_change_mode_class): Likewise.
30906         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
30907         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
30908         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
30909         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30910         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30911         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30912         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30913         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30914         constraints.
30915         (Dn, Dl, Dr): Accept const as well as const_vector.
30916         (Dz): Likewise.  Compare against CONST0_RTX.
30917         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30918         of "vector" where appropriate.
30919         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30920         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30921         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30922         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30923         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30924         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30925         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30926         (v_int_equiv): Extend to SVE modes.
30927         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30928         mode attributes.
30929         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30930         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30931         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30932         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30933         (SVE_COND_FP_CMP): New int iterators.
30934         (perm_hilo): Handle the new unpack unspecs.
30935         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30936         attributes.
30937         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30938         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30939         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30940         (aarch64_equality_operator, aarch64_constant_vector_operand)
30941         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30942         (aarch64_sve_nonimmediate_operand): Likewise.
30943         (aarch64_sve_general_operand): Likewise.
30944         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30945         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30946         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30947         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30948         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30949         (aarch64_sve_float_arith_immediate): Likewise.
30950         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30951         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30952         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30953         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30954         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30955         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30956         (aarch64_sve_float_arith_operand): Likewise.
30957         (aarch64_sve_float_arith_with_sub_operand): Likewise.
30958         (aarch64_sve_float_mul_operand): Likewise.
30959         (aarch64_sve_vec_perm_operand): Likewise.
30960         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30961         (aarch64_mov_operand): Accept const_poly_int and const_vector.
30962         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30963         as well as const_vector.
30964         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30965         in file.  Use CONST0_RTX and CONSTM1_RTX.
30966         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
30967         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30968         Use aarch64_simd_imm_zero.
30969         * config/aarch64/aarch64-sve.md: New file.
30970         * config/aarch64/aarch64.md: Include it.
30971         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30972         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30973         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30974         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30975         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30976         (sve): New attribute.
30977         (enabled): Disable instructions with the sve attribute unless
30978         TARGET_SVE.
30979         (movqi, movhi): Pass CONST_POLY_INT operaneds through
30980         aarch64_expand_mov_immediate.
30981         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30982         CNT[BHSD] immediates.
30983         (movti): Split CONST_POLY_INT moves into two halves.
30984         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30985         Split additions that need a temporary here if the destination
30986         is the stack pointer.
30987         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30988         (*add<mode>3_poly_1): New instruction.
30989         (set_clobber_cc): New expander.
30991 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30993         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30994         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
30995         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30996         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30997         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
30998         Change innermode from fixed_mode_size to machine_mode.
30999         (simplify_subreg): Update call accordingly.  Handle a constant-sized
31000         subreg of a variable-length CONST_VECTOR.
31002 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
31003             Alan Hayward  <alan.hayward@arm.com>
31004             David Sherwood  <david.sherwood@arm.com>
31006         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
31007         (add_offset_to_base): New function, split out from...
31008         (create_mem_ref): ...here.  When handling a scale other than 1,
31009         check first whether the address is valid without the offset.
31010         Add it into the base if so, leaving the index and scale as-is.
31012 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
31014         PR c++/83778
31015         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
31016         fold_for_warn before checking if arg2 is INTEGER_CST.
31018 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
31020         * config/rs6000/predicates.md (load_multiple_operation): Delete.
31021         (store_multiple_operation): Delete.
31022         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
31023         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
31024         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
31025         guarded by TARGET_STRING.
31026         (rs6000_output_load_multiple): Delete.
31027         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
31028         OPTION_MASK_STRING / TARGET_STRING handling.
31029         (print_operand) <'N', 'O'>: Add comment that these are unused now.
31030         (const rs6000_opt_masks) <"string">: Change mask to 0.
31031         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
31032         (MASK_STRING): Delete.
31033         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
31034         parts.  Simplify.
31035         (load_multiple): Delete.
31036         (*ldmsi8): Delete.
31037         (*ldmsi7): Delete.
31038         (*ldmsi6): Delete.
31039         (*ldmsi5): Delete.
31040         (*ldmsi4): Delete.
31041         (*ldmsi3): Delete.
31042         (store_multiple): Delete.
31043         (*stmsi8): Delete.
31044         (*stmsi7): Delete.
31045         (*stmsi6): Delete.
31046         (*stmsi5): Delete.
31047         (*stmsi4): Delete.
31048         (*stmsi3): Delete.
31049         (movmemsi_8reg): Delete.
31050         (corresponding unnamed define_insn): Delete.
31051         (movmemsi_6reg): Delete.
31052         (corresponding unnamed define_insn): Delete.
31053         (movmemsi_4reg): Delete.
31054         (corresponding unnamed define_insn): Delete.
31055         (movmemsi_2reg): Delete.
31056         (corresponding unnamed define_insn): Delete.
31057         (movmemsi_1reg): Delete.
31058         (corresponding unnamed define_insn): Delete.
31059         * config/rs6000/rs6000.opt (mno-string): New.
31060         (mstring): Replace by deprecation warning stub.
31061         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
31063 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
31065         * regrename.c (regrename_do_replace): If replacing the same
31066         reg multiple times, try to reuse last created gen_raw_REG.
31068         PR debug/81155
31069         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
31070         main to workaround a bug in GDB.
31072 2018-01-12  Tom de Vries  <tom@codesourcery.com>
31074         PR target/83737
31075         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
31077 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
31079         PR rtl-optimization/80481
31080         * ira-color.c (get_cap_member): New function.
31081         (allocnos_conflict_by_live_ranges_p): Use it.
31082         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
31083         (setup_slot_coalesced_allocno_live_ranges): Ditto.
31085 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
31087         PR target/83628
31088         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31089         (*saddl_se_1): Ditto.
31090         (*ssubsi_1): Ditto.
31091         (*ssubl_se_1): Ditto.
31093 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31095         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
31096         rather than wi::to_widest for DR_INITs.
31097         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
31098         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
31099         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
31100         INTEGER_CSTs.
31101         (vect_analyze_group_access_1): Note that here.
31103 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31105         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
31106         polynomial type sizes.
31108 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
31110         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
31111         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
31112         (gimple_add_tmp_var): Likewise.
31114 2018-01-12  Martin Liska  <mliska@suse.cz>
31116         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
31117         (gimple_alloc_sizes): Likewise.
31118         (dump_gimple_statistics): Use PRIu64 in printf format.
31119         * gimple.h: Change uint64_t to int.
31121 2018-01-12  Martin Liska  <mliska@suse.cz>
31123         * tree-core.h: Use uint64_t instead of int.
31124         * tree.c (tree_node_counts): Likewise.
31125         (tree_node_sizes): Likewise.
31126         (dump_tree_statistics): Use PRIu64 in printf format.
31128 2018-01-12  Martin Liska  <mliska@suse.cz>
31130         * Makefile.in: As qsort_chk is implemented in vec.c, add
31131         vec.o to linkage of gencfn-macros.
31132         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31133         passing the info to record_node_allocation_statistics.
31134         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31135         and pass the info.
31136         * ggc-common.c (struct ggc_usage): Add operator== and use
31137         it in operator< and compare function.
31138         * mem-stats.h (struct mem_usage): Likewise.
31139         * vec.c (struct vec_usage): Remove operator< and compare
31140         function. Can be simply inherited.
31142 2018-01-12  Martin Jambor  <mjambor@suse.cz>
31144         PR target/81616
31145         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31146         * tree-ssa-math-opts.c: Include domwalk.h.
31147         (convert_mult_to_fma_1): New function.
31148         (fma_transformation_info): New type.
31149         (fma_deferring_state): Likewise.
31150         (cancel_fma_deferring): New function.
31151         (result_of_phi): Likewise.
31152         (last_fma_candidate_feeds_initial_phi): Likewise.
31153         (convert_mult_to_fma): Added deferring logic, split actual
31154         transformation to convert_mult_to_fma_1.
31155         (math_opts_dom_walker): New type.
31156         (math_opts_dom_walker::after_dom_children): New method, body moved
31157         here from pass_optimize_widening_mul::execute, added deferring logic
31158         bits.
31159         (pass_optimize_widening_mul::execute): Moved most of code to
31160         math_opts_dom_walker::after_dom_children.
31161         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31162         * config/i386/i386.c (ix86_option_override_internal): Added
31163         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31165 2018-01-12  Richard Biener  <rguenther@suse.de>
31167         PR debug/83157
31168         * dwarf2out.c (gen_variable_die): Do not reset old_die for
31169         inline instance vars.
31171 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
31173         PR target/81819
31174         * config/rx/rx.c (rx_is_restricted_memory_address):
31175         Handle SUBREG case.
31177 2018-01-12  Richard Biener  <rguenther@suse.de>
31179         PR tree-optimization/80846
31180         * target.def (split_reduction): New target hook.
31181         * targhooks.c (default_split_reduction): New function.
31182         * targhooks.h (default_split_reduction): Declare.
31183         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31184         target requests first reduce vectors by combining low and high
31185         parts.
31186         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31187         (get_vectype_for_scalar_type_and_size): Export.
31188         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31189         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31190         * doc/tm.texi: Regenerate.
31191         * config/i386/i386.c (ix86_split_reduction): Implement
31192         TARGET_VECTORIZE_SPLIT_REDUCTION.
31194 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31196         PR target/83368
31197         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31198         in PIC mode except for TARGET_VXWORKS_RTP.
31199         * config/sparc/sparc.c: Include cfgrtl.h.
31200         (TARGET_INIT_PIC_REG): Define.
31201         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31202         (sparc_pic_register_p): New predicate.
31203         (sparc_legitimate_address_p): Use it.
31204         (sparc_legitimize_pic_address): Likewise.
31205         (sparc_delegitimize_address): Likewise.
31206         (sparc_mode_dependent_address_p): Likewise.
31207         (gen_load_pcrel_sym): Remove 4th parameter.
31208         (load_got_register): Adjust call to above.  Remove obsolete stuff.
31209         (sparc_expand_prologue): Do not call load_got_register here.
31210         (sparc_flat_expand_prologue): Likewise.
31211         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31212         (sparc_use_pseudo_pic_reg): New function.
31213         (sparc_init_pic_reg): Likewise.
31214         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31215         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31217 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
31219         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31220         Add item for branch_cost.
31222 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31224         PR rtl-optimization/83565
31225         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31226         not extend the result to a larger mode for rotate operations.
31227         (num_sign_bit_copies1): Likewise.
31229 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31231         PR target/40411
31232         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31233         -symbolic.
31234         Use values-Xc.o for -pedantic.
31235         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31237 2018-01-12  Martin Liska  <mliska@suse.cz>
31239         PR ipa/83054
31240         * ipa-devirt.c (final_warning_record::grow_type_warnings):
31241         New function.
31242         (possible_polymorphic_call_targets): Use it.
31243         (ipa_devirt): Likewise.
31245 2018-01-12  Martin Liska  <mliska@suse.cz>
31247         * profile-count.h (enum profile_quality): Use 0 as invalid
31248         enum value of profile_quality.
31250 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
31252         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31253         -mext-string options.
31255 2018-01-12  Richard Biener  <rguenther@suse.de>
31257         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31258         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31259         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31260         Likewise.
31261         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31263 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
31265         * configure.ac (--with-long-double-format): Add support for the
31266         configuration option to change the default long double format on
31267         PowerPC systems.
31268         * config.gcc (powerpc*-linux*-*): Likewise.
31269         * configure: Regenerate.
31270         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31271         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31272         used without modification.
31274 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31276         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31277         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31278         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31279         MISC_BUILTIN_SPEC_BARRIER.
31280         (rs6000_init_builtins): Likewise.
31281         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31282         enum value.
31283         (speculation_barrier): New define_insn.
31284         * doc/extend.texi: Document __builtin_speculation_barrier.
31286 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31288         PR target/83203
31289         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31290         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31291         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31292         iterators.
31293         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
31294         integral modes instead of "ss" and "sd".
31295         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31296         vectors with 32-bit and 64-bit elements.
31297         (vecdupssescalarmodesuffix): New mode attribute.
31298         (vec_dup<mode>): Use it.
31300 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
31302         PR target/83330
31303         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31304         frame if argument is passed on stack.
31306 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31308         PR target/82682
31309         * ree.c (combine_reaching_defs): Optimize also
31310         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31311         reg2=any_extend(exp); reg1=reg2;, formatting fix.
31313 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31315         PR middle-end/83189
31316         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31318 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31320         PR middle-end/83718
31321         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31322         after they are computed.
31324 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
31326         PR tree-optimization/83695
31327         * gimple-loop-linterchange.cc
31328         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31329         reset cached scev information after interchange.
31330         (pass_linterchange::execute): Remove call to scev_reset_htab.
31332 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31334         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
31335         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
31336         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
31337         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
31338         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
31339         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
31340         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
31341         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
31342         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
31343         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
31344         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
31345         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
31346         (V_lane_reg): Likewise.
31347         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
31348         New define_expand.
31349         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
31350         (vfmal_lane_low<mode>_intrinsic,
31351         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
31352         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
31353         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
31354         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
31355         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
31356         vfmsl_lane_high<mode>_intrinsic): New define_insns.
31358 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31360         * config/arm/arm-cpus.in (fp16fml): New feature.
31361         (ALL_SIMD): Add fp16fml.
31362         (armv8.2-a): Add fp16fml as an option.
31363         (armv8.3-a): Likewise.
31364         (armv8.4-a): Add fp16fml as part of fp16.
31365         * config/arm/arm.h (TARGET_FP16FML): Define.
31366         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
31367         when appropriate.
31368         * config/arm/arm-modes.def (V2HF): Define.
31369         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
31370         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
31371         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
31372         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
31373         vfmsl_low, vfmsl_high): New set of builtins.
31374         * config/arm/iterators.md (PLUSMINUS): New code iterator.
31375         (vfml_op): New code attribute.
31376         (VFMLHALVES): New int iterator.
31377         (VFML, VFMLSEL): New mode attributes.
31378         (V_reg): Define mapping for V2HF.
31379         (V_hi, V_lo): New mode attributes.
31380         (VF_constraint): Likewise.
31381         (vfml_half, vfml_half_selector): New int attributes.
31382         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
31383         define_expand.
31384         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
31385         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
31386         New define_insn.
31387         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
31388         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
31389         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
31390         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
31391         documentation.
31392         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
31393         Document new effective target and option set.
31395 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31397         * config/arm/arm-cpus.in (armv8_4): New feature.
31398         (ARMv8_4a): New fgroup.
31399         (armv8.4-a): New arch.
31400         * config/arm/arm-tables.opt: Regenerate.
31401         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
31402         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
31403         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
31404         Add matching rules for -march=armv8.4-a and extensions.
31405         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
31407 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
31409         PR target/81821
31410         * config/rx/rx.md (BW): New mode attribute.
31411         (sync_lock_test_and_setsi): Add mode suffix to insn output.
31413 2018-01-11  Richard Biener  <rguenther@suse.de>
31415         PR tree-optimization/83435
31416         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
31417         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
31418         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
31420 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31421             Alan Hayward  <alan.hayward@arm.com>
31422             David Sherwood  <david.sherwood@arm.com>
31424         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
31425         field.
31426         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
31427         (aarch64_print_address_internal): Use it to check for a zero offset.
31429 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31430             Alan Hayward  <alan.hayward@arm.com>
31431             David Sherwood  <david.sherwood@arm.com>
31433         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
31434         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
31435         Return a poly_int64 rather than a HOST_WIDE_INT.
31436         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
31437         rather than a HOST_WIDE_INT.
31438         * config/aarch64/aarch64.h (aarch64_frame): Protect with
31439         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
31440         hard_fp_offset, frame_size, initial_adjust, callee_offset and
31441         final_offset from HOST_WIDE_INT to poly_int64.
31442         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
31443         to_constant when getting the number of units in an Advanced SIMD
31444         mode.
31445         (aarch64_builtin_vectorized_function): Check for a constant number
31446         of units.
31447         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
31448         GET_MODE_SIZE.
31449         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
31450         attribute instead of GET_MODE_NUNITS.
31451         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
31452         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
31453         GET_MODE_SIZE for fixed-size registers.
31454         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
31455         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
31456         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
31457         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
31458         (aarch64_print_operand, aarch64_print_address_internal)
31459         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
31460         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
31461         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
31462         Handle polynomial GET_MODE_SIZE.
31463         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
31464         wider than SImode without modification.
31465         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
31466         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
31467         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
31468         passing and returning SVE modes.
31469         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
31470         rather than GEN_INT.
31471         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
31472         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
31473         (aarch64_allocate_and_probe_stack_space): Likewise.
31474         (aarch64_layout_frame): Cope with polynomial offsets.
31475         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
31476         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
31477         polynomial offsets.
31478         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
31479         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
31480         poly_int64 rather than a HOST_WIDE_INT.
31481         (aarch64_get_separate_components, aarch64_process_components)
31482         (aarch64_expand_prologue, aarch64_expand_epilogue)
31483         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
31484         (aarch64_anchor_offset): New function, split out from...
31485         (aarch64_legitimize_address): ...here.
31486         (aarch64_builtin_vectorization_cost): Handle polynomial
31487         TYPE_VECTOR_SUBPARTS.
31488         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
31489         GET_MODE_NUNITS.
31490         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
31491         number of elements from the PARALLEL rather than the mode.
31492         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
31493         rather than GET_MODE_BITSIZE.
31494         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
31495         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
31496         (aarch64_expand_vec_perm_const_1): Handle polynomial
31497         d->perm.length () and d->perm elements.
31498         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
31499         Apply to_constant to d->perm elements.
31500         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
31501         polynomial CONST_VECTOR_NUNITS.
31502         (aarch64_move_pointer): Take amount as a poly_int64 rather
31503         than an int.
31504         (aarch64_progress_pointer): Avoid temporary variable.
31505         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
31506         the mode attribute instead of GET_MODE.
31508 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31509             Alan Hayward  <alan.hayward@arm.com>
31510             David Sherwood  <david.sherwood@arm.com>
31512         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
31513         x exists before using it.
31514         (aarch64_add_constant_internal): Rename to...
31515         (aarch64_add_offset_1): ...this.  Replace regnum with separate
31516         src and dest rtxes.  Handle the case in which they're different,
31517         including when the offset is zero.  Replace scratchreg with an rtx.
31518         Use 2 additions if there is no spare register into which we can
31519         move a 16-bit constant.
31520         (aarch64_add_constant): Delete.
31521         (aarch64_add_offset): Replace reg with separate src and dest
31522         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
31523         Use aarch64_add_offset_1.
31524         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
31525         an rtx rather than an int.  Take the delta as a poly_int64
31526         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
31527         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
31528         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
31529         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
31530         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
31531         and aarch64_add_sp.
31532         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
31533         aarch64_add_constant.
31535 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31537         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
31538         Use scalar_float_mode.
31540 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31542         * config/aarch64/aarch64-simd.md
31543         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
31544         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
31545         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
31546         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
31547         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
31548         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
31549         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
31550         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
31551         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
31552         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
31554 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31556         PR target/83514
31557         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
31558         targ_options->x_arm_arch_string is non NULL.
31560 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
31562         * config/aarch64/aarch64.h
31563         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
31565 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
31567         PR target/82096
31568         * expmed.c (emit_store_flag_force): Swap if const op0
31569         and change VOIDmode to mode of op0.
31571 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31573         PR rtl-optimization/83761
31574         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
31575         than bytes to mode_for_size.
31577 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31579         PR middle-end/83189
31580         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
31581         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
31582         profile.
31584 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31586         PR middle-end/83575
31587         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
31588         when in layout mode.
31589         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
31590         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
31591         partition fixup.
31593 2018-01-10  Michael Collison  <michael.collison@arm.com>
31595         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
31596         * config/aarch64/aarch64-option-extension.def: Add
31597         AARCH64_OPT_EXTENSION of 'fp16fml'.
31598         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31599         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
31600         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
31601         * config/aarch64/constraints.md (Ui7): New constraint.
31602         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
31603         (VFMLA_SEL_W): Ditto.
31604         (f16quad): Ditto.
31605         (f16mac1): Ditto.
31606         (VFMLA16_LOW): New int iterator.
31607         (VFMLA16_HIGH): Ditto.
31608         (UNSPEC_FMLAL): New unspec.
31609         (UNSPEC_FMLSL): Ditto.
31610         (UNSPEC_FMLAL2): Ditto.
31611         (UNSPEC_FMLSL2): Ditto.
31612         (f16mac): New code attribute.
31613         * config/aarch64/aarch64-simd-builtins.def
31614         (aarch64_fmlal_lowv2sf): Ditto.
31615         (aarch64_fmlsl_lowv2sf): Ditto.
31616         (aarch64_fmlalq_lowv4sf): Ditto.
31617         (aarch64_fmlslq_lowv4sf): Ditto.
31618         (aarch64_fmlal_highv2sf): Ditto.
31619         (aarch64_fmlsl_highv2sf): Ditto.
31620         (aarch64_fmlalq_highv4sf): Ditto.
31621         (aarch64_fmlslq_highv4sf): Ditto.
31622         (aarch64_fmlal_lane_lowv2sf): Ditto.
31623         (aarch64_fmlsl_lane_lowv2sf): Ditto.
31624         (aarch64_fmlal_laneq_lowv2sf): Ditto.
31625         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
31626         (aarch64_fmlalq_lane_lowv4sf): Ditto.
31627         (aarch64_fmlsl_lane_lowv4sf): Ditto.
31628         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
31629         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
31630         (aarch64_fmlal_lane_highv2sf): Ditto.
31631         (aarch64_fmlsl_lane_highv2sf): Ditto.
31632         (aarch64_fmlal_laneq_highv2sf): Ditto.
31633         (aarch64_fmlsl_laneq_highv2sf): Ditto.
31634         (aarch64_fmlalq_lane_highv4sf): Ditto.
31635         (aarch64_fmlsl_lane_highv4sf): Ditto.
31636         (aarch64_fmlalq_laneq_highv4sf): Ditto.
31637         (aarch64_fmlsl_laneq_highv4sf): Ditto.
31638         * config/aarch64/aarch64-simd.md:
31639         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
31640         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31641         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
31642         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31643         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
31644         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
31645         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
31646         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
31647         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
31648         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
31649         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
31650         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
31651         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
31652         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
31653         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
31654         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
31655         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
31656         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
31657         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
31658         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
31659         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
31660         (vfmlsl_low_u32): Ditto.
31661         (vfmlalq_low_u32): Ditto.
31662         (vfmlslq_low_u32): Ditto.
31663         (vfmlal_high_u32): Ditto.
31664         (vfmlsl_high_u32): Ditto.
31665         (vfmlalq_high_u32): Ditto.
31666         (vfmlslq_high_u32): Ditto.
31667         (vfmlal_lane_low_u32): Ditto.
31668         (vfmlsl_lane_low_u32): Ditto.
31669         (vfmlal_laneq_low_u32): Ditto.
31670         (vfmlsl_laneq_low_u32): Ditto.
31671         (vfmlalq_lane_low_u32): Ditto.
31672         (vfmlslq_lane_low_u32): Ditto.
31673         (vfmlalq_laneq_low_u32): Ditto.
31674         (vfmlslq_laneq_low_u32): Ditto.
31675         (vfmlal_lane_high_u32): Ditto.
31676         (vfmlsl_lane_high_u32): Ditto.
31677         (vfmlal_laneq_high_u32): Ditto.
31678         (vfmlsl_laneq_high_u32): Ditto.
31679         (vfmlalq_lane_high_u32): Ditto.
31680         (vfmlslq_lane_high_u32): Ditto.
31681         (vfmlalq_laneq_high_u32): Ditto.
31682         (vfmlslq_laneq_high_u32): Ditto.
31683         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
31684         (AARCH64_FL_FOR_ARCH8_4): New.
31685         (AARCH64_ISA_F16FML): New ISA flag.
31686         (TARGET_F16FML): New feature flag for fp16fml.
31687         (doc/invoke.texi): Document new fp16fml option.
31689 2018-01-10  Michael Collison  <michael.collison@arm.com>
31691         * config/aarch64/aarch64-builtins.c:
31692         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
31693         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31694         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
31695         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
31696         (AARCH64_ISA_SHA3): New ISA flag.
31697         (TARGET_SHA3): New feature flag for sha3.
31698         * config/aarch64/iterators.md (sha512_op): New int attribute.
31699         (CRYPTO_SHA512): New int iterator.
31700         (UNSPEC_SHA512H): New unspec.
31701         (UNSPEC_SHA512H2): Ditto.
31702         (UNSPEC_SHA512SU0): Ditto.
31703         (UNSPEC_SHA512SU1): Ditto.
31704         * config/aarch64/aarch64-simd-builtins.def
31705         (aarch64_crypto_sha512hqv2di): New builtin.
31706         (aarch64_crypto_sha512h2qv2di): Ditto.
31707         (aarch64_crypto_sha512su0qv2di): Ditto.
31708         (aarch64_crypto_sha512su1qv2di): Ditto.
31709         (aarch64_eor3qv8hi): Ditto.
31710         (aarch64_rax1qv2di): Ditto.
31711         (aarch64_xarqv2di): Ditto.
31712         (aarch64_bcaxqv8hi): Ditto.
31713         * config/aarch64/aarch64-simd.md:
31714         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
31715         (aarch64_crypto_sha512su0qv2di): Ditto.
31716         (aarch64_crypto_sha512su1qv2di): Ditto.
31717         (aarch64_eor3qv8hi): Ditto.
31718         (aarch64_rax1qv2di): Ditto.
31719         (aarch64_xarqv2di): Ditto.
31720         (aarch64_bcaxqv8hi): Ditto.
31721         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
31722         (vsha512h2q_u64): Ditto.
31723         (vsha512su0q_u64): Ditto.
31724         (vsha512su1q_u64): Ditto.
31725         (veor3q_u16): Ditto.
31726         (vrax1q_u64): Ditto.
31727         (vxarq_u64): Ditto.
31728         (vbcaxq_u16): Ditto.
31729         * config/arm/types.md (crypto_sha512): New type attribute.
31730         (crypto_sha3): Ditto.
31731         (doc/invoke.texi): Document new sha3 option.
31733 2018-01-10  Michael Collison  <michael.collison@arm.com>
31735         * config/aarch64/aarch64-builtins.c:
31736         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
31737         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31738         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
31739         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
31740         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
31741         (AARCH64_ISA_SM4): New ISA flag.
31742         (TARGET_SM4): New feature flag for sm4.
31743         * config/aarch64/aarch64-simd-builtins.def
31744         (aarch64_sm3ss1qv4si): Ditto.
31745         (aarch64_sm3tt1aq4si): Ditto.
31746         (aarch64_sm3tt1bq4si): Ditto.
31747         (aarch64_sm3tt2aq4si): Ditto.
31748         (aarch64_sm3tt2bq4si): Ditto.
31749         (aarch64_sm3partw1qv4si): Ditto.
31750         (aarch64_sm3partw2qv4si): Ditto.
31751         (aarch64_sm4eqv4si): Ditto.
31752         (aarch64_sm4ekeyqv4si): Ditto.
31753         * config/aarch64/aarch64-simd.md:
31754         (aarch64_sm3ss1qv4si): Ditto.
31755         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
31756         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
31757         (aarch64_sm4eqv4si): Ditto.
31758         (aarch64_sm4ekeyqv4si): Ditto.
31759         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
31760         (sm3part_op): Ditto.
31761         (CRYPTO_SM3TT): Ditto.
31762         (CRYPTO_SM3PART): Ditto.
31763         (UNSPEC_SM3SS1): New unspec.
31764         (UNSPEC_SM3TT1A): Ditto.
31765         (UNSPEC_SM3TT1B): Ditto.
31766         (UNSPEC_SM3TT2A): Ditto.
31767         (UNSPEC_SM3TT2B): Ditto.
31768         (UNSPEC_SM3PARTW1): Ditto.
31769         (UNSPEC_SM3PARTW2): Ditto.
31770         (UNSPEC_SM4E): Ditto.
31771         (UNSPEC_SM4EKEY): Ditto.
31772         * config/aarch64/constraints.md (Ui2): New constraint.
31773         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
31774         * config/arm/types.md (crypto_sm3): New type attribute.
31775         (crypto_sm4): Ditto.
31776         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
31777         (vsm3tt1aq_u32): Ditto.
31778         (vsm3tt1bq_u32): Ditto.
31779         (vsm3tt2aq_u32): Ditto.
31780         (vsm3tt2bq_u32): Ditto.
31781         (vsm3partw1q_u32): Ditto.
31782         (vsm3partw2q_u32): Ditto.
31783         (vsm4eq_u32): Ditto.
31784         (vsm4ekeyq_u32): Ditto.
31785         (doc/invoke.texi): Document new sm4 option.
31787 2018-01-10  Michael Collison  <michael.collison@arm.com>
31789         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
31790         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
31791         (AARCH64_FL_FOR_ARCH8_4): New.
31792         (AARCH64_FL_V8_4): New flag.
31793         (doc/invoke.texi): Document new armv8.4-a option.
31795 2018-01-10  Michael Collison  <michael.collison@arm.com>
31797         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31798         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
31799         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
31800         * config/aarch64/aarch64-option-extension.def: Add
31801         AARCH64_OPT_EXTENSION of 'sha2'.
31802         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
31803         (crypto): Disable sha2 and aes if crypto disabled.
31804         (crypto): Enable aes and sha2 if enabled.
31805         (simd): Disable sha2 and aes if simd disabled.
31806         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
31807         New flags.
31808         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
31809         (TARGET_SHA2): New feature flag for sha2.
31810         (TARGET_AES): New feature flag for aes.
31811         * config/aarch64/aarch64-simd.md:
31812         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
31813         conditional on TARGET_AES.
31814         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
31815         (aarch64_crypto_sha1hsi): Make pattern conditional
31816         on TARGET_SHA2.
31817         (aarch64_crypto_sha1hv4si): Ditto.
31818         (aarch64_be_crypto_sha1hv4si): Ditto.
31819         (aarch64_crypto_sha1su1v4si): Ditto.
31820         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
31821         (aarch64_crypto_sha1su0v4si): Ditto.
31822         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
31823         (aarch64_crypto_sha256su0v4si): Ditto.
31824         (aarch64_crypto_sha256su1v4si): Ditto.
31825         (doc/invoke.texi): Document new aes and sha2 options.
31827 2018-01-10  Martin Sebor  <msebor@redhat.com>
31829         PR tree-optimization/83781
31830         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
31831         as string arrays.
31833 2018-01-11  Martin Sebor  <msebor@gmail.com>
31834             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31836         PR tree-optimization/83501
31837         PR tree-optimization/81703
31839         * tree-ssa-strlen.c (get_string_cst): Rename...
31840         (get_string_len): ...to this.  Handle global constants.
31841         (handle_char_store): Adjust.
31843 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
31844             Jim Wilson  <jimw@sifive.com>
31846         * config/riscv/riscv-protos.h (riscv_output_return): New.
31847         * config/riscv/riscv.c (struct machine_function): New naked_p field.
31848         (riscv_attribute_table, riscv_output_return),
31849         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
31850         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
31851         (riscv_compute_frame_info): Only compute frame->mask if not a naked
31852         function.
31853         (riscv_expand_prologue): Add early return for naked function.
31854         (riscv_expand_epilogue): Likewise.
31855         (riscv_function_ok_for_sibcall): Return false for naked function.
31856         (riscv_set_current_function): New.
31857         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
31858         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
31859         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
31860         * doc/extend.texi (RISC-V Function Attributes): New.
31862 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
31864         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
31865         check for 128-bit long double before checking TCmode.
31866         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
31867         128-bit long doubles before checking TFmode or TCmode.
31868         (FLOAT128_IBM_P): Likewise.
31870 2018-01-10  Martin Sebor  <msebor@redhat.com>
31872         PR tree-optimization/83671
31873         * builtins.c (c_strlen): Unconditionally return zero for the empty
31874         string.
31875         Use -Warray-bounds for warnings.
31876         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
31877         for non-constant array indices with COMPONENT_REF, arrays of
31878         arrays, and pointers to arrays.
31879         (gimple_fold_builtin_strlen): Determine and set length range for
31880         non-constant character arrays.
31882 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
31884         PR middle-end/81897
31885         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
31886         empty blocks.
31888 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
31890         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
31892 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
31894         PR target/83399
31895         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
31896         VECTOR_MEM_ALTIVEC_OR_VSX_P.
31897         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
31898         indexed_or_indirect_operand predicate.
31899         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
31900         (*vsx_le_perm_load_v8hi): Likewise.
31901         (*vsx_le_perm_load_v16qi): Likewise.
31902         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
31903         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
31904         (*vsx_le_perm_store_v8hi): Likewise.
31905         (*vsx_le_perm_store_v16qi): Likewise.
31906         (eight unnamed splitters): Likewise.
31908 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
31910         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31911         * config/rs6000/emmintrin.h: Likewise.
31912         * config/rs6000/mmintrin.h: Likewise.
31913         * config/rs6000/xmmintrin.h: Likewise.
31915 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
31917         PR c++/43486
31918         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31919         "public_flag".
31920         * tree.c (tree_nop_conversion): Return true for location wrapper
31921         nodes.
31922         (maybe_wrap_with_location): New function.
31923         (selftest::check_strip_nops): New function.
31924         (selftest::test_location_wrappers): New function.
31925         (selftest::tree_c_tests): Call it.
31926         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31927         (maybe_wrap_with_location): New decl.
31928         (EXPR_LOCATION_WRAPPER_P): New macro.
31929         (location_wrapper_p): New inline function.
31930         (tree_strip_any_location_wrapper): New inline function.
31932 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
31934         PR target/83735
31935         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31936         stack_realign_offset for the largest alignment of stack slot
31937         actually used.
31938         (ix86_find_max_used_stack_alignment): New function.
31939         (ix86_finalize_stack_frame_flags): Use it.  Set
31940         max_used_stack_alignment if we don't realign stack.
31941         * config/i386/i386.h (machine_function): Add
31942         max_used_stack_alignment.
31944 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
31946         * config/arm/arm.opt (-mbranch-cost): New option.
31947         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31948         account.
31950 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
31952         PR target/83629
31953         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31954         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31956 2018-01-10  Richard Biener  <rguenther@suse.de>
31958         PR debug/83765
31959         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31960         early out so it also covers the case where we have a non-NULL
31961         origin.
31963 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
31965         PR tree-optimization/83753
31966         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31967         for non-strided grouped accesses if the number of elements is 1.
31969 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31971         PR target/81616
31972         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31973         * i386.h (TARGET_USE_GATHER): Define.
31974         * x86-tune.def (X86_TUNE_USE_GATHER): New.
31976 2018-01-10  Martin Liska  <mliska@suse.cz>
31978         PR bootstrap/82831
31979         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31980         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31981         partitioning.
31982         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31983         CLEANUP_NO_PARTITIONING is not set.
31985 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
31987         * doc/rtl.texi: Remove documentation of (const ...) wrappers
31988         for vectors, as a partial revert of r254296.
31989         * rtl.h (const_vec_p): Delete.
31990         (const_vec_duplicate_p): Don't test for vector CONSTs.
31991         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31992         * expmed.c (make_tree): Likewise.
31994         Revert:
31995         * common.md (E, F): Use CONSTANT_P instead of checking for
31996         CONST_VECTOR.
31997         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31998         checking for CONST_VECTOR.
32000 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32002         PR middle-end/83575
32003         * predict.c (force_edge_cold): Handle in more sane way edges
32004         with no prediction.
32006 2018-01-09  Carl Love  <cel@us.ibm.com>
32008         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
32009         V4SI, V4SF types.
32010         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
32011         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
32012         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
32013         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
32014         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
32015         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
32016         * config/rs6000/rs6000-protos.h: Add extern defition for
32017         rs6000_generate_float2_double_code.
32018         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
32019         function.
32020         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
32021         (float2_v2df): Add define_expand.
32023 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
32025         PR target/83628
32026         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
32027         op_mode in the force_to_mode call.
32029 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32031         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
32032         instead of checking each element individually.
32033         (aarch64_evpc_uzp): Likewise.
32034         (aarch64_evpc_zip): Likewise.
32035         (aarch64_evpc_ext): Likewise.
32036         (aarch64_evpc_rev): Likewise.
32037         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
32038         instead of checking each element individually.  Return true without
32039         generating rtl if
32040         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
32041         whether all selected elements come from the same input, instead of
32042         checking each element individually.  Remove calls to gen_rtx_REG,
32043         start_sequence and end_sequence and instead assert that no rtl is
32044         generated.
32046 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32048         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
32049         order of HIGH and CONST checks.
32051 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
32053         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
32054         if the destination isn't an SSA_NAME.
32056 2018-01-09  Richard Biener  <rguenther@suse.de>
32058         PR tree-optimization/83668
32059         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
32060         move prologue...
32061         (canonicalize_loop_form): ... here, renamed from ...
32062         (canonicalize_loop_closed_ssa_form): ... this and amended to
32063         swap successor edges for loop exit blocks to make us use
32064         the RPO order we need for initial schedule generation.
32066 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
32068         PR tree-optimization/64811
32069         * match.pd: When optimizing comparisons with Inf, avoid
32070         introducing or losing exceptions from comparisons with NaN.
32072 2018-01-09  Martin Liska  <mliska@suse.cz>
32074         PR sanitizer/82517
32075         * asan.c (shadow_mem_size): Add gcc_assert.
32077 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
32079         Don't save registers in main().
32081         PR target/83738
32082         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
32083         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
32084         * config/avr/avr.c (avr_set_current_function): Don't error if
32085         naked, OS_task or OS_main are specified at the same time.
32086         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
32087         OS_main.
32088         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
32089         attribute.
32090         * common/config/avr/avr-common.c (avr_option_optimization_table):
32091         Switch on -mmain-is-OS_task for optimizing compilations.
32093 2018-01-09  Richard Biener  <rguenther@suse.de>
32095         PR tree-optimization/83572
32096         * graphite.c: Include cfganal.h.
32097         (graphite_transform_loops): Connect infinite loops to exit
32098         and remove fake edges at the end.
32100 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32102         * ipa-inline.c (edge_badness): Revert accidental checkin.
32104 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
32106         PR ipa/80763
32107         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
32108         symbols; not inline clones.
32110 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
32112         PR target/83507
32113         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
32114         hard registers.  Formatting fixes.
32116         PR preprocessor/83722
32117         * gcc.c (try_generate_repro): Pass
32118         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
32119         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
32120         do_report_bug.
32122 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
32123             Kito Cheng  <kito.cheng@gmail.com>
32125         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32126         (riscv_leaf_function_p): Delete.
32127         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32129 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32131         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32132         function.
32133         (do_ifelse): New function.
32134         (do_isel): New function.
32135         (do_sub3): New function.
32136         (do_add3): New function.
32137         (do_load_mask_compare): New function.
32138         (do_overlap_load_compare): New function.
32139         (expand_compare_loop): New function.
32140         (expand_block_compare): Call expand_compare_loop() when appropriate.
32141         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32142         option description.
32143         (-mblock-compare-inline-loop-limit): New option.
32145 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32147         PR target/83677
32148         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32149         Reverse order of second and third operands in first alternative.
32150         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32151         of first and second elements in UNSPEC_VPERMR vector.
32152         (altivec_expand_vec_perm_le): Likewise.
32154 2018-01-08  Jeff Law  <law@redhat.com>
32156         PR rtl-optimizatin/81308
32157         * tree-switch-conversion.c (cfg_altered): New file scoped static.
32158         (process_switch): If group_case_labels makes a change, then set
32159         cfg_altered.
32160         (pass_convert_switch::execute): If a switch is converted, then
32161         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
32163         PR rtl-optimization/81308
32164         * recog.c (split_all_insns): Conditionally cleanup the CFG after
32165         splitting insns.
32167 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
32169         PR target/83663 - Revert r255946
32170         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32171         generation for cases where splatting a value is not useful.
32172         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32173         across a vec_duplicate and a paradoxical subreg forming a vector
32174         mode to a vec_concat.
32176 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32178         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32179         -march=armv8.3-a variants.
32180         * config/arm/t-multilib: Likewise.
32181         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
32183 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32185         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32186         to generate rtl.
32187         (cceq_ior_compare_complement): Give it a name so I can use it, and
32188         change boolean_or_operator predicate to boolean_operator so it can
32189         be used to generate a crand.
32190         (eqne): New code iterator.
32191         (bd/bd_neg): New code_attrs.
32192         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32193         a single define_insn.
32194         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32195         decrement (bdnzt/bdnzf/bdzt/bdzf).
32196         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32197         with the new names of the branch decrement patterns, and added the
32198         names of the branch decrement conditional patterns.
32200 2018-01-08  Richard Biener  <rguenther@suse.de>
32202         PR tree-optimization/83563
32203         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32204         cache.
32206 2018-01-08  Richard Biener  <rguenther@suse.de>
32208         PR middle-end/83713
32209         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32211 2018-01-08  Richard Biener  <rguenther@suse.de>
32213         PR tree-optimization/83685
32214         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32215         references to abnormals.
32217 2018-01-08  Richard Biener  <rguenther@suse.de>
32219         PR lto/83719
32220         * dwarf2out.c (output_indirect_strings): Handle empty
32221         skeleton_debug_str_hash.
32222         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32224 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32226         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32227         (emit_store_direct): Likewise.
32228         (arc_trampoline_adjust_address): Likewise.
32229         (arc_asm_trampoline_template): New function.
32230         (arc_initialize_trampoline): Use asm_trampoline_template.
32231         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32232         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32233         * config/arc/arc.md (flush_icache): Delete pattern.
32235 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32237         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32238         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32239         munaligned-access.
32241 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32243         PR target/83681
32244         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32245         by not USED_FOR_TARGET.
32246         (make_pass_resolve_sw_modes): Likewise.
32248 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32250         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32251         USED_FOR_TARGET.
32253 2018-01-08  Richard Biener  <rguenther@suse.de>
32255         PR middle-end/83580
32256         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32258 2018-01-08  Richard Biener  <rguenther@suse.de>
32260         PR middle-end/83517
32261         * match.pd ((t * 2) / 2) -> t): Add missing :c.
32263 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
32265         PR middle-end/81897
32266         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32267         basic blocks with a small number of successors.
32268         (convert_control_dep_chain_into_preds): Improve handling of
32269         forwarder blocks.
32270         (dump_predicates): Split apart into...
32271         (dump_pred_chain): ...here...
32272         (dump_pred_info): ...and here.
32273         (can_one_predicate_be_invalidated_p): Add debugging printfs.
32274         (can_chain_union_be_invalidated_p): Improve check for invalidation
32275         of paths.
32276         (uninit_uses_cannot_happen): Avoid unnecessary if
32277         convert_control_dep_chain_into_preds yielded nothing.
32279 2018-01-06  Martin Sebor  <msebor@redhat.com>
32281         PR tree-optimization/83640
32282         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32283         subtracting negative offset from size.
32284         (builtin_access::overlap): Adjust offset bounds of the access to fall
32285         within the size of the object if possible.
32287 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
32289         PR rtl-optimization/83699
32290         * expmed.c (extract_bit_field_1): Restrict the vector usage of
32291         extract_bit_field_as_subreg to cases in which the extracted
32292         value is also a vector.
32294         * lra-constraints.c (process_alt_operands): Test for the equivalence
32295         substitutions when detecting a possible reload cycle.
32297 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
32299         PR debug/83480
32300         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32301         by default if flag_selective_schedling{,2}.  Formatting fixes.
32303         PR rtl-optimization/83682
32304         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32305         if it has non-VECTOR_MODE element mode.
32306         (vec_duplicate_p): Likewise.
32308         PR middle-end/83694
32309         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32310         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32312 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32314         PR target/83604
32315         * config/i386/i386-builtin.def
32316         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32317         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32318         Require also OPTION_MASK_ISA_AVX512F in addition to
32319         OPTION_MASK_ISA_GFNI.
32320         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32321         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32322         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32323         to OPTION_MASK_ISA_GFNI.
32324         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32325         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32326         OPTION_MASK_ISA_AVX512BW.
32327         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32328         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32329         addition to OPTION_MASK_ISA_GFNI.
32330         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32331         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32332         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
32333         to OPTION_MASK_ISA_GFNI.
32334         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
32335         a requirement for all ISAs rather than any of them with a few
32336         exceptions.
32337         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
32338         processing.
32339         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
32340         bitmasks to be enabled with 3 exceptions, instead of requiring any
32341         enabled ISA with lots of exceptions.
32342         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
32343         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
32344         Change avx512bw in isa attribute to avx512f.
32345         * config/i386/sgxintrin.h: Add license boilerplate.
32346         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
32347         to __AVX512F__ and __AVX512VL to __AVX512VL__.
32348         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
32349         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
32350         defined.
32351         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
32352         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
32353         temporarily sse2 rather than sse if not enabled already.
32355         PR target/83604
32356         * config/i386/sse.md (VI248_VLBW): Rename to ...
32357         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
32358         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
32359         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
32360         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
32361         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
32362         mode iterator instead of VI248_VLBW.
32364 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
32366         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
32367         (record_modified): Skip clobbers; add debug output.
32368         (param_change_prob): Use sreal frequencies.
32370 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
32372         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
32373         punt for user-aligned variables.
32375 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
32377         * tree-chrec.c (chrec_contains_symbols): Return true for
32378         POLY_INT_CST.
32380 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
32382         PR target/82439
32383         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
32384         of (x|y) == x for BICS pattern.
32386 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32388         PR tree-optimization/83605
32389         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
32390         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
32391         can throw.
32393 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32395         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
32396         * config/epiphany/rtems.h: New file.
32398 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32399             Uros Bizjak  <ubizjak@gmail.com>
32401         PR target/83554
32402         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
32403         QIreg_operand instead of register_operand predicate.
32404         * config/i386/i386.c (ix86_rop_should_change_byte_p,
32405         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
32406         comments instead of -fmitigate[-_]rop.
32408 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
32410         PR bootstrap/81926
32411         * cgraphunit.c (symbol_table::compile): Switch to text_section
32412         before calling assembly_start debug hook.
32413         * run-rtl-passes.c (run_rtl_passes): Likewise.
32414         Include output.h.
32416 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32418         * tree-vrp.c (extract_range_from_binary_expr_1): Check
32419         range_int_cst_p rather than !symbolic_range_p before calling
32420         extract_range_from_multiplicative_op_1.
32422 2018-01-04  Jeff Law  <law@redhat.com>
32424         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
32425         redundant test in assertion.
32427 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32429         * doc/rtl.texi: Document machine_mode wrapper classes.
32431 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32433         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
32434         using tree_to_uhwi.
32436 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32438         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
32439         the VEC_PERM_EXPR fold to fail.
32441 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32443         PR debug/83585
32444         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
32445         to switched_sections.
32447 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32449         PR target/83680
32450         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
32451         test for d.testing.
32453 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
32455         PR target/83387
32456         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
32457         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
32459 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32461         PR debug/83666
32462         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
32463         is BLKmode and bitpos not zero or mode change is needed.
32465 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32467         PR target/83675
32468         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
32469         TARGET_VIS2.
32471 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
32473         PR target/83628
32474         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
32475         instead of MULT rtx.  Update all corresponding splitters.
32476         (*saddl_se): Ditto.
32477         (*ssub<modesuffix>): Ditto.
32478         (*ssubl_se): Ditto.
32479         (*cmp_sadd_di): Update split patterns.
32480         (*cmp_sadd_si): Ditto.
32481         (*cmp_sadd_sidi): Ditto.
32482         (*cmp_ssub_di): Ditto.
32483         (*cmp_ssub_si): Ditto.
32484         (*cmp_ssub_sidi): Ditto.
32485         * config/alpha/predicates.md (const23_operand): New predicate.
32486         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
32487         Look for ASHIFT, not MULT inner operand.
32488         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
32490 2018-01-04  Martin Liska  <mliska@suse.cz>
32492         PR gcov-profile/83669
32493         * gcov.c (output_intermediate_file): Add version to intermediate
32494         gcov file.
32495         * doc/gcov.texi: Document new field 'version' in intermediate
32496         file format. Fix location of '-k' option of gcov command.
32498 2018-01-04  Martin Liska  <mliska@suse.cz>
32500         PR ipa/82352
32501         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
32503 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32505         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
32507 2018-01-03  Martin Sebor  <msebor@redhat.com>
32509         PR tree-optimization/83655
32510         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
32511         checking calls with invalid arguments.
32513 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32515         * tree-vect-stmts.c (vect_get_store_rhs): New function.
32516         (vectorizable_mask_load_store): Delete.
32517         (vectorizable_call): Return false for masked loads and stores.
32518         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
32519         instead of gimple_assign_rhs1.
32520         (vectorizable_load): Handle IFN_MASK_LOAD.
32521         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
32523 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32525         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
32526         split out from..,
32527         (vectorizable_mask_load_store): ...here.
32528         (vectorizable_load): ...and here.
32530 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32532         * tree-vect-stmts.c (vect_build_all_ones_mask)
32533         (vect_build_zero_merge_argument): New functions, split out from...
32534         (vectorizable_load): ...here.
32536 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32538         * tree-vect-stmts.c (vect_check_store_rhs): New function,
32539         split out from...
32540         (vectorizable_mask_load_store): ...here.
32541         (vectorizable_store): ...and here.
32543 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32545         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
32546         split out from...
32547         (vectorizable_mask_load_store): ...here.
32549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32551         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
32552         (vect_model_store_cost): Take a vec_load_store_type instead of a
32553         vect_def_type.
32554         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
32555         (vect_model_store_cost): Take a vec_load_store_type instead of a
32556         vect_def_type.
32557         (vectorizable_mask_load_store): Update accordingly.
32558         (vectorizable_store): Likewise.
32559         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
32561 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32563         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
32564         IFN_MASK_LOAD calls here rather than...
32565         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
32567 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32568             Alan Hayward  <alan.hayward@arm.com>
32569             David Sherwood  <david.sherwood@arm.com>
32571         * expmed.c (extract_bit_field_1): For vector extracts,
32572         fall back to extract_bit_field_as_subreg if vec_extract
32573         isn't available.
32575 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32576             Alan Hayward  <alan.hayward@arm.com>
32577             David Sherwood  <david.sherwood@arm.com>
32579         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
32580         they are variable or constant sized.
32581         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
32582         slots for constant-sized data.
32584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32585             Alan Hayward  <alan.hayward@arm.com>
32586             David Sherwood  <david.sherwood@arm.com>
32588         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
32589         handling COND_EXPRs with boolean comparisons, try to find a better
32590         basis for the mask type than the boolean itself.
32592 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32594         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
32595         is calculated and how it can be overridden.
32596         * genmodes.c (max_bitsize_mode_any_mode): New variable.
32597         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
32598         if defined.
32599         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
32600         if nonzero.
32602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32603             Alan Hayward  <alan.hayward@arm.com>
32604             David Sherwood  <david.sherwood@arm.com>
32606         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
32607         Remove the mode argument.
32608         (aarch64_simd_valid_immediate): Remove the mode and inverse
32609         arguments.
32610         * config/aarch64/iterators.md (bitsize): New iterator.
32611         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
32612         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
32613         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
32614         aarch64_simd_valid_immediate.
32615         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
32616         (aarch64_reg_or_bic_imm): Likewise.
32617         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
32618         with an insn_type enum and msl with a modifier_type enum.
32619         Replace element_width with a scalar_mode.  Change the shift
32620         to unsigned int.  Add constructors for scalar_float_mode and
32621         scalar_int_mode elements.
32622         (aarch64_vect_float_const_representable_p): Delete.
32623         (aarch64_can_const_movi_rtx_p)
32624         (aarch64_simd_scalar_immediate_valid_for_move)
32625         (aarch64_simd_make_constant): Update call to
32626         aarch64_simd_valid_immediate.
32627         (aarch64_advsimd_valid_immediate_hs): New function.
32628         (aarch64_advsimd_valid_immediate): Likewise.
32629         (aarch64_simd_valid_immediate): Remove mode and inverse
32630         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
32631         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
32632         and aarch64_float_const_representable_p on the result.
32633         (aarch64_output_simd_mov_immediate): Remove mode argument.
32634         Update call to aarch64_simd_valid_immediate and use of
32635         simd_immediate_info.
32636         (aarch64_output_scalar_simd_mov_immediate): Update call
32637         accordingly.
32639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32640             Alan Hayward  <alan.hayward@arm.com>
32641             David Sherwood  <david.sherwood@arm.com>
32643         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
32644         (mode_nunits): Likewise CONST_MODE_NUNITS.
32645         * machmode.def (ADJUST_NUNITS): Document.
32646         * genmodes.c (mode_data::need_nunits_adj): New field.
32647         (blank_mode): Update accordingly.
32648         (adj_nunits): New variable.
32649         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
32650         parameter.
32651         (emit_mode_size_inline): Set need_bytesize_adj for all modes
32652         listed in adj_nunits.
32653         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
32654         listed in adj_nunits.  Don't emit case statements for such modes.
32655         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
32656         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
32657         nothing if adj_nunits is nonnull.
32658         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
32659         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
32660         (emit_mode_fbit): Update use of print_maybe_const_decl.
32661         (emit_move_size): Likewise.  Treat the array as non-const
32662         if adj_nunits.
32663         (emit_mode_adjustments): Handle adj_nunits.
32665 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32667         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
32668         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
32669         (VECTOR_MODES): Use it.
32670         (make_vector_modes): Take the prefix as an argument.
32672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32673             Alan Hayward  <alan.hayward@arm.com>
32674             David Sherwood  <david.sherwood@arm.com>
32676         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
32677         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
32678         for MODE_VECTOR_BOOL.
32679         * machmode.def (VECTOR_BOOL_MODE): Document.
32680         * genmodes.c (VECTOR_BOOL_MODE): New macro.
32681         (make_vector_bool_mode): New function.
32682         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
32683         MODE_VECTOR_BOOL.
32684         * lto-streamer-in.c (lto_input_mode_table): Likewise.
32685         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
32686         Likewise.
32687         * stor-layout.c (int_mode_for_mode): Likewise.
32688         * tree.c (build_vector_type_for_mode): Likewise.
32689         * varasm.c (output_constant_pool_2): Likewise.
32690         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
32691         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
32692         for MODE_VECTOR_BOOL.
32693         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
32694         of mode class checks.
32695         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
32696         instead of a list of mode class checks.
32697         (expand_vector_scalar_condition): Likewise.
32698         (type_for_widest_vector_mode): Handle BImode as an inner mode.
32700 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32701             Alan Hayward  <alan.hayward@arm.com>
32702             David Sherwood  <david.sherwood@arm.com>
32704         * machmode.h (mode_size): Change from unsigned short to
32705         poly_uint16_pod.
32706         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
32707         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32708         or if measurement_type is not polynomial.
32709         (fixed_size_mode::includes_p): Check for constant-sized modes.
32710         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
32711         return a poly_uint16 rather than an unsigned short.
32712         (emit_mode_size): Change the type of mode_size from unsigned short
32713         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
32714         (emit_mode_adjustments): Cope with polynomial vector sizes.
32715         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32716         for GET_MODE_SIZE.
32717         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32718         for GET_MODE_SIZE.
32719         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
32720         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
32721         * caller-save.c (setup_save_areas): Likewise.
32722         (replace_reg_with_saved_mem): Likewise.
32723         * calls.c (emit_library_call_value_1): Likewise.
32724         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
32725         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
32726         (gen_lowpart_for_combine): Likewise.
32727         * convert.c (convert_to_integer_1): Likewise.
32728         * cse.c (equiv_constant, cse_insn): Likewise.
32729         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
32730         (cselib_subst_to_values): Likewise.
32731         * dce.c (word_dce_process_block): Likewise.
32732         * df-problems.c (df_word_lr_mark_ref): Likewise.
32733         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
32734         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
32735         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
32736         (rtl_for_decl_location): Likewise.
32737         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
32738         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
32739         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
32740         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
32741         (expand_expr_real_1): Likewise.
32742         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
32743         (pad_below): Likewise.
32744         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32745         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
32746         * ira.c (get_subreg_tracking_sizes): Likewise.
32747         * ira-build.c (ira_create_allocno_objects): Likewise.
32748         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
32749         (ira_sort_regnos_for_alter_reg): Likewise.
32750         * ira-costs.c (record_operand_costs): Likewise.
32751         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
32752         (resolve_simple_move): Likewise.
32753         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
32754         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
32755         (lra_constraints): Likewise.
32756         (CONST_POOL_OK_P): Reject variable-sized modes.
32757         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
32758         (add_pseudo_to_slot, lra_spill): Likewise.
32759         * omp-low.c (omp_clause_aligned_alignment): Likewise.
32760         * optabs-query.c (get_best_extraction_insn): Likewise.
32761         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32762         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
32763         (expand_mult_highpart, valid_multiword_target_p): Likewise.
32764         * recog.c (offsettable_address_addr_space_p): Likewise.
32765         * regcprop.c (maybe_mode_change): Likewise.
32766         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
32767         * regrename.c (build_def_use): Likewise.
32768         * regstat.c (dump_reg_info): Likewise.
32769         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
32770         (find_reloads, find_reloads_subreg_address): Likewise.
32771         * reload1.c (eliminate_regs_1): Likewise.
32772         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
32773         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
32774         (simplify_binary_operation_1, simplify_subreg): Likewise.
32775         * targhooks.c (default_function_arg_padding): Likewise.
32776         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
32777         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
32778         (verify_gimple_assign_ternary): Likewise.
32779         * tree-inline.c (estimate_move_cost): Likewise.
32780         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32781         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
32782         (get_address_cost_ainc): Likewise.
32783         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32784         (vect_supportable_dr_alignment): Likewise.
32785         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32786         (vectorizable_reduction): Likewise.
32787         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
32788         (vectorizable_operation, vectorizable_load): Likewise.
32789         * tree.c (build_same_sized_truth_vector_type): Likewise.
32790         * valtrack.c (cleanup_auto_inc_dec): Likewise.
32791         * var-tracking.c (emit_note_insn_var_location): Likewise.
32792         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
32793         (ADDR_VEC_ALIGN): Likewise.
32795 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32796             Alan Hayward  <alan.hayward@arm.com>
32797             David Sherwood  <david.sherwood@arm.com>
32799         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
32800         unsigned short.
32801         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32802         or if measurement_type is polynomial.
32803         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
32804         * combine.c (make_extraction): Likewise.
32805         * dse.c (find_shift_sequence): Likewise.
32806         * dwarf2out.c (mem_loc_descriptor): Likewise.
32807         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
32808         (extract_bit_field, extract_low_bits): Likewise.
32809         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
32810         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
32811         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
32812         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
32813         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32814         * reload.c (find_reloads): Likewise.
32815         * reload1.c (alter_reg): Likewise.
32816         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
32817         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
32818         * tree-if-conv.c (predicate_mem_writes): Likewise.
32819         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
32820         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
32821         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
32822         * valtrack.c (dead_debug_insert_temp): Likewise.
32823         * varasm.c (mergeable_constant_section): Likewise.
32824         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
32826 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32827             Alan Hayward  <alan.hayward@arm.com>
32828             David Sherwood  <david.sherwood@arm.com>
32830         * expr.c (expand_assignment): Cope with polynomial mode sizes
32831         when assigning to a CONCAT.
32833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32834             Alan Hayward  <alan.hayward@arm.com>
32835             David Sherwood  <david.sherwood@arm.com>
32837         * machmode.h (mode_precision): Change from unsigned short to
32838         poly_uint16_pod.
32839         (mode_to_precision): Return a poly_uint16 rather than an unsigned
32840         short.
32841         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
32842         or if measurement_type is not polynomial.
32843         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
32844         in which the mode is already known to be a scalar_int_mode.
32845         * genmodes.c (emit_mode_precision): Change the type of mode_precision
32846         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
32847         initializer.
32848         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32849         for GET_MODE_PRECISION.
32850         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32851         for GET_MODE_PRECISION.
32852         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
32853         as polynomial.
32854         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
32855         (expand_field_assignment, make_extraction): Likewise.
32856         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
32857         (get_last_value): Likewise.
32858         * convert.c (convert_to_integer_1): Likewise.
32859         * cse.c (cse_insn): Likewise.
32860         * expr.c (expand_expr_real_1): Likewise.
32861         * lra-constraints.c (simplify_operand_subreg): Likewise.
32862         * optabs-query.c (can_atomic_load_p): Likewise.
32863         * optabs.c (expand_atomic_load): Likewise.
32864         (expand_atomic_store): Likewise.
32865         * ree.c (combine_reaching_defs): Likewise.
32866         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
32867         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
32868         * tree.h (type_has_mode_precision_p): Likewise.
32869         * ubsan.c (instrument_si_overflow): Likewise.
32871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32872             Alan Hayward  <alan.hayward@arm.com>
32873             David Sherwood  <david.sherwood@arm.com>
32875         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
32876         polynomial numbers of units.
32877         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
32878         (valid_vector_subparts_p): New function.
32879         (build_vector_type): Remove temporary shim and take the number
32880         of units as a poly_uint64 rather than an int.
32881         (build_opaque_vector_type): Take the number of units as a
32882         poly_uint64 rather than an int.
32883         * tree.c (build_vector_from_ctor): Handle polynomial
32884         TYPE_VECTOR_SUBPARTS.
32885         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
32886         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
32887         (build_vector_from_val): If the number of units is variable,
32888         use build_vec_duplicate_cst for constant operands and
32889         VEC_DUPLICATE_EXPR otherwise.
32890         (make_vector_type): Remove temporary is_constant ().
32891         (build_vector_type, build_opaque_vector_type): Take the number of
32892         units as a poly_uint64 rather than an int.
32893         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
32894         VECTOR_CST_NELTS.
32895         * cfgexpand.c (expand_debug_expr): Likewise.
32896         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
32897         (store_constructor, expand_expr_real_1): Likewise.
32898         (const_scalar_mask_from_tree): Likewise.
32899         * fold-const-call.c (fold_const_reduction): Likewise.
32900         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
32901         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
32902         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
32903         (fold_relational_const): Likewise.
32904         (native_interpret_vector): Likewise.  Change the size from an
32905         int to an unsigned int.
32906         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
32907         TYPE_VECTOR_SUBPARTS.
32908         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
32909         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32910         duplicating a non-constant operand into a variable-length vector.
32911         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32912         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32913         * ipa-icf.c (sem_variable::equals): Likewise.
32914         * match.pd: Likewise.
32915         * omp-simd-clone.c (simd_clone_subparts): Likewise.
32916         * print-tree.c (print_node): Likewise.
32917         * stor-layout.c (layout_type): Likewise.
32918         * targhooks.c (default_builtin_vectorization_cost): Likewise.
32919         * tree-cfg.c (verify_gimple_comparison): Likewise.
32920         (verify_gimple_assign_binary): Likewise.
32921         (verify_gimple_assign_ternary): Likewise.
32922         (verify_gimple_assign_single): Likewise.
32923         * tree-pretty-print.c (dump_generic_node): Likewise.
32924         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32925         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32926         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32927         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32928         (vect_shift_permute_load_chain): Likewise.
32929         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32930         (expand_vector_condition, optimize_vector_constructor): Likewise.
32931         (lower_vec_perm, get_compute_type): Likewise.
32932         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32933         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32934         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32935         (vect_recog_mask_conversion_pattern): Likewise.
32936         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32937         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32938         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32939         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32940         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32941         (vectorizable_shift, vectorizable_operation, vectorizable_store)
32942         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32943         (supportable_widening_operation): Likewise.
32944         (supportable_narrowing_operation): Likewise.
32945         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32946         Likewise.
32947         * varasm.c (output_constant): Likewise.
32949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32950             Alan Hayward  <alan.hayward@arm.com>
32951             David Sherwood  <david.sherwood@arm.com>
32953         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32954         so that both the length == 3 and length != 3 cases set up their
32955         own permute vectors.  Add comments explaining why we know the
32956         number of elements is constant.
32957         (vect_permute_load_chain): Likewise.
32959 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32960             Alan Hayward  <alan.hayward@arm.com>
32961             David Sherwood  <david.sherwood@arm.com>
32963         * machmode.h (mode_nunits): Change from unsigned char to
32964         poly_uint16_pod.
32965         (ONLY_FIXED_SIZE_MODES): New macro.
32966         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32967         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32968         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32969         New typedefs.
32970         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32971         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32972         or if measurement_type is not polynomial.
32973         * genmodes.c (ZERO_COEFFS): New macro.
32974         (emit_mode_nunits_inline): Make mode_nunits_inline return a
32975         poly_uint16.
32976         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32977         Use ZERO_COEFFS when emitting initializers.
32978         * data-streamer.h (bp_pack_poly_value): New function.
32979         (bp_unpack_poly_value): Likewise.
32980         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32981         for GET_MODE_NUNITS.
32982         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32983         for GET_MODE_NUNITS.
32984         * tree.c (make_vector_type): Remove temporary shim and make
32985         the real function take the number of units as a poly_uint64
32986         rather than an int.
32987         (build_vector_type_for_mode): Handle polynomial nunits.
32988         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32989         * emit-rtl.c (const_vec_series_p_1): Likewise.
32990         (gen_rtx_CONST_VECTOR): Likewise.
32991         * fold-const.c (test_vec_duplicate_folding): Likewise.
32992         * genrecog.c (validate_pattern): Likewise.
32993         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32994         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32995         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32996         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32997         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32998         * rtlanal.c (subreg_get_info): Likewise.
32999         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33000         (vect_grouped_load_supported): Likewise.
33001         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
33002         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
33003         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
33004         (simplify_const_unary_operation, simplify_binary_operation_1)
33005         (simplify_const_binary_operation, simplify_ternary_operation)
33006         (test_vector_ops_duplicate, test_vector_ops): Likewise.
33007         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
33008         instead of CONST_VECTOR_NUNITS.
33009         * varasm.c (output_constant_pool_2): Likewise.
33010         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
33011         explicit-encoded elements in the XVEC for variable-length vectors.
33013 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33015         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
33017 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33018             Alan Hayward  <alan.hayward@arm.com>
33019             David Sherwood  <david.sherwood@arm.com>
33021         * coretypes.h (fixed_size_mode): Declare.
33022         (fixed_size_mode_pod): New typedef.
33023         * builtins.h (target_builtins::x_apply_args_mode)
33024         (target_builtins::x_apply_result_mode): Change type to
33025         fixed_size_mode_pod.
33026         * builtins.c (apply_args_size, apply_result_size, result_vector)
33027         (expand_builtin_apply_args_1, expand_builtin_apply)
33028         (expand_builtin_return): Update accordingly.
33030 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33032         * cse.c (hash_rtx_cb): Hash only the encoded elements.
33033         * cselib.c (cselib_hash_rtx): Likewise.
33034         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
33035         CONST_VECTOR encoding.
33037 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33038             Jeff Law  <law@redhat.com>
33040         PR target/83641
33041         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
33042         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
33043         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
33044         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
33046         PR target/83641
33047         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
33048         explicitly probe *sp in a noreturn function if there were any callee
33049         register saves or frame pointer is needed.
33051 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33053         PR debug/83621
33054         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
33055         BLKmode for ternary, binary or unary expressions.
33057         PR debug/83645
33058         * var-tracking.c (delete_vta_debug_insn): New inline function.
33059         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
33060         insns from get_insns () to NULL instead of each bb separately.
33061         Use delete_vta_debug_insn.  No longer static.
33062         (vt_debug_insns_local, variable_tracking_main_1): Adjust
33063         delete_vta_debug_insns callers.
33064         * rtl.h (delete_vta_debug_insns): Declare.
33065         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
33066         instead of variable_tracking_main.
33068 2018-01-03  Martin Sebor  <msebor@redhat.com>
33070         PR tree-optimization/83603
33071         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
33072         arguments past the endof the argument list in functions declared
33073         without a prototype.
33074         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
33075         Avoid checking when arguments are null.
33077 2018-01-03  Martin Sebor  <msebor@redhat.com>
33079         PR c/83559
33080         * doc/extend.texi (attribute const): Fix a typo.
33081         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
33082         issuing -Wsuggest-attribute for void functions.
33084 2018-01-03  Martin Sebor  <msebor@redhat.com>
33086         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
33087         offset_int::from instead of wide_int::to_shwi.
33088         (maybe_diag_overlap): Remove assertion.
33089         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
33090         * gimple-ssa-sprintf.c (format_directive): Same.
33091         (parse_directive): Same.
33092         (sprintf_dom_walker::compute_format_length): Same.
33093         (try_substitute_return_value): Same.
33095 2018-01-03  Jeff Law  <law@redhat.com>
33097         PR middle-end/83654
33098         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
33099         non-constant residual for zero at runtime and avoid probing in
33100         that case.  Reorganize code for trailing problem to mirror handling
33101         of the residual.
33103 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
33105         PR tree-optimization/83501
33106         * tree-ssa-strlen.c (get_string_cst): New.
33107         (handle_char_store): Call get_string_cst.
33109 2018-01-03  Martin Liska  <mliska@suse.cz>
33111         PR tree-optimization/83593
33112         * tree-ssa-strlen.c: Include tree-cfg.h.
33113         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
33114         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
33115         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
33116         to false.
33117         (strlen_dom_walker::before_dom_children): Call
33118         gimple_purge_dead_eh_edges. Dump tranformation with details
33119         dump flags.
33120         (strlen_dom_walker::before_dom_children): Update call by adding
33121         new argument cleanup_eh.
33122         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
33124 2018-01-03  Martin Liska  <mliska@suse.cz>
33126         PR ipa/83549
33127         * cif-code.def (VARIADIC_THUNK): New enum value.
33128         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33129         thunks.
33131 2018-01-03  Jan Beulich  <jbeulich@suse.com>
33133         * sse.md (mov<mode>_internal): Tighten condition for when to use
33134         vmovdqu<ssescalarsize> for TI and OI modes.
33136 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33138         Update copyright years.
33140 2018-01-03  Martin Liska  <mliska@suse.cz>
33142         PR ipa/83594
33143         * ipa-visibility.c (function_and_variable_visibility): Skip
33144         functions with noipa attribure.
33146 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33148         * gcc.c (process_command): Update copyright notice dates.
33149         * gcov-dump.c (print_version): Ditto.
33150         * gcov.c (print_version): Ditto.
33151         * gcov-tool.c (print_version): Ditto.
33152         * gengtype.c (create_file): Ditto.
33153         * doc/cpp.texi: Bump @copying's copyright year.
33154         * doc/cppinternals.texi: Ditto.
33155         * doc/gcc.texi: Ditto.
33156         * doc/gccint.texi: Ditto.
33157         * doc/gcov.texi: Ditto.
33158         * doc/install.texi: Ditto.
33159         * doc/invoke.texi: Ditto.
33161 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33163         * vector-builder.h (vector_builder::m_full_nelts): Change from
33164         unsigned int to poly_uint64.
33165         (vector_builder::full_nelts): Update prototype accordingly.
33166         (vector_builder::new_vector): Likewise.
33167         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33168         (vector_builder::operator ==): Likewise.
33169         (vector_builder::finalize): Likewise.
33170         * int-vector-builder.h (int_vector_builder::int_vector_builder):
33171         Take the number of elements as a poly_uint64 rather than an
33172         unsigned int.
33173         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33174         from unsigned int to poly_uint64.
33175         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33176         (vec_perm_indices::new_vector): Likewise.
33177         (vec_perm_indices::length): Likewise.
33178         (vec_perm_indices::nelts_per_input): Likewise.
33179         (vec_perm_indices::input_nelts): Likewise.
33180         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33181         number of elements per input as a poly_uint64 rather than an
33182         unsigned int.  Use the original encoding for variable-length
33183         vectors, rather than clamping each individual element.
33184         For the second and subsequent elements in each pattern,
33185         clamp the step and base before clamping their sum.
33186         (vec_perm_indices::series_p): Handle polynomial element counts.
33187         (vec_perm_indices::all_in_range_p): Likewise.
33188         (vec_perm_indices_to_tree): Likewise.
33189         (vec_perm_indices_to_rtx): Likewise.
33190         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33191         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33192         (tree_vector_builder::new_binary_operation): Handle polynomial
33193         element counts.  Return false if we need to know the number
33194         of elements at compile time.
33195         * fold-const.c (fold_vec_perm): Punt if the number of elements
33196         isn't known at compile time.
33198 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33200         * vec-perm-indices.h (vec_perm_builder): Change element type
33201         from HOST_WIDE_INT to poly_int64.
33202         (vec_perm_indices::element_type): Update accordingly.
33203         (vec_perm_indices::clamp): Handle polynomial element_types.
33204         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33205         (vec_perm_indices::all_in_range_p): Likewise.
33206         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33207         than shwi trees.
33208         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33209         polynomial vec_perm_indices element types.
33210         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33211         * fold-const.c (fold_vec_perm): Likewise.
33212         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33213         * tree-vect-generic.c (lower_vec_perm): Likewise.
33214         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33215         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33216         element type to HOST_WIDE_INT.
33218 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33219             Alan Hayward  <alan.hayward@arm.com>
33220             David Sherwood  <david.sherwood@arm.com>
33222         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33223         rather than an int.  Use plus_constant.
33224         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33225         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33227 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33228             Alan Hayward  <alan.hayward@arm.com>
33229             David Sherwood  <david.sherwood@arm.com>
33231         * calls.c (emit_call_1, expand_call): Change struct_value_size from
33232         a HOST_WIDE_INT to a poly_int64.
33234 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33235             Alan Hayward  <alan.hayward@arm.com>
33236             David Sherwood  <david.sherwood@arm.com>
33238         * calls.c (load_register_parameters): Cope with polynomial
33239         mode sizes.  Require a constant size for BLKmode parameters
33240         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
33241         forces a parameter to be padded at the lsb end in order to
33242         fill a complete number of words, require the parameter size
33243         to be ordered wrt UNITS_PER_WORD.
33245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33246             Alan Hayward  <alan.hayward@arm.com>
33247             David Sherwood  <david.sherwood@arm.com>
33249         * reload1.c (spill_stack_slot_width): Change element type
33250         from unsigned int to poly_uint64_pod.
33251         (alter_reg): Treat mode sizes as polynomial.
33253 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33254             Alan Hayward  <alan.hayward@arm.com>
33255             David Sherwood  <david.sherwood@arm.com>
33257         * reload.c (complex_word_subreg_p): New function.
33258         (reload_inner_reg_of_subreg, push_reload): Use it.
33260 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33261             Alan Hayward  <alan.hayward@arm.com>
33262             David Sherwood  <david.sherwood@arm.com>
33264         * lra-constraints.c (process_alt_operands): Reject matched
33265         operands whose sizes aren't ordered.
33266         (match_reload): Refer to this check here.
33268 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33269             Alan Hayward  <alan.hayward@arm.com>
33270             David Sherwood  <david.sherwood@arm.com>
33272         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33273         that the mode size is in the set {1, 2, 4, 8, 16}.
33275 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33276             Alan Hayward  <alan.hayward@arm.com>
33277             David Sherwood  <david.sherwood@arm.com>
33279         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33280         Use plus_constant instead of gen_rtx_PLUS.
33282 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33283             Alan Hayward  <alan.hayward@arm.com>
33284             David Sherwood  <david.sherwood@arm.com>
33286         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33287         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33288         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33289         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33290         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33291         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33292         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33293         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33294         * config/i386/i386.c (ix86_push_rounding): ...this new function.
33295         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33296         a poly_int64.
33297         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33298         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33299         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33300         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33301         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33302         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33303         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33304         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33305         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33306         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33307         function.
33308         * expr.c (emit_move_resolve_push): Treat the input and result
33309         of PUSH_ROUNDING as a poly_int64.
33310         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33311         (emit_push_insn): Likewise.
33312         * lra-eliminations.c (mark_not_eliminable): Likewise.
33313         * recog.c (push_operand): Likewise.
33314         * reload1.c (elimination_effects): Likewise.
33315         * rtlanal.c (nonzero_bits1): Likewise.
33316         * calls.c (store_one_arg): Likewise.  Require the padding to be
33317         known at compile time.
33319 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33320             Alan Hayward  <alan.hayward@arm.com>
33321             David Sherwood  <david.sherwood@arm.com>
33323         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33324         Use plus_constant instead of gen_rtx_PLUS.
33326 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33327             Alan Hayward  <alan.hayward@arm.com>
33328             David Sherwood  <david.sherwood@arm.com>
33330         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33331         rather than an int.
33333 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33334             Alan Hayward  <alan.hayward@arm.com>
33335             David Sherwood  <david.sherwood@arm.com>
33337         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
33338         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
33339         via stack temporaries.  Treat the mode size as polynomial too.
33341 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33342             Alan Hayward  <alan.hayward@arm.com>
33343             David Sherwood  <david.sherwood@arm.com>
33345         * expr.c (expand_expr_real_2): When handling conversions involving
33346         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
33347         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
33348         as a poly_uint64 too.
33350 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33351             Alan Hayward  <alan.hayward@arm.com>
33352             David Sherwood  <david.sherwood@arm.com>
33354         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
33356 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33357             Alan Hayward  <alan.hayward@arm.com>
33358             David Sherwood  <david.sherwood@arm.com>
33360         * combine.c (can_change_dest_mode): Handle polynomial
33361         REGMODE_NATURAL_SIZE.
33362         * expmed.c (store_bit_field_1): Likewise.
33363         * expr.c (store_constructor): Likewise.
33364         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
33365         and polynomial REGMODE_NATURAL_SIZE.
33366         (gen_lowpart_common): Likewise.
33367         * reginfo.c (record_subregs_of_mode): Likewise.
33368         * rtlanal.c (read_modify_subreg_p): Likewise.
33370 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33371             Alan Hayward  <alan.hayward@arm.com>
33372             David Sherwood  <david.sherwood@arm.com>
33374         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
33375         numbers of elements.
33377 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33378             Alan Hayward  <alan.hayward@arm.com>
33379             David Sherwood  <david.sherwood@arm.com>
33381         * match.pd: Cope with polynomial numbers of vector elements.
33383 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33384             Alan Hayward  <alan.hayward@arm.com>
33385             David Sherwood  <david.sherwood@arm.com>
33387         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
33388         in a POINTER_PLUS_EXPR.
33390 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33391             Alan Hayward  <alan.hayward@arm.com>
33392             David Sherwood  <david.sherwood@arm.com>
33394         * omp-simd-clone.c (simd_clone_subparts): New function.
33395         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
33396         (ipa_simd_modify_function_body): Likewise.
33398 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33399             Alan Hayward  <alan.hayward@arm.com>
33400             David Sherwood  <david.sherwood@arm.com>
33402         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
33403         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
33404         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
33405         (expand_vector_condition, vector_element): Likewise.
33406         (subparts_gt): New function.
33407         (get_compute_type): Use subparts_gt.
33408         (count_type_subparts): Delete.
33409         (expand_vector_operations_1): Use subparts_gt instead of
33410         count_type_subparts.
33412 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33413             Alan Hayward  <alan.hayward@arm.com>
33414             David Sherwood  <david.sherwood@arm.com>
33416         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
33417         (vect_compile_time_alias): ...this new function.  Do the calculation
33418         on poly_ints rather than trees.
33419         (vect_prune_runtime_alias_test_list): Update call accordingly.
33421 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33422             Alan Hayward  <alan.hayward@arm.com>
33423             David Sherwood  <david.sherwood@arm.com>
33425         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
33426         numbers of units.
33427         (vect_schedule_slp_instance): Likewise.
33429 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33430             Alan Hayward  <alan.hayward@arm.com>
33431             David Sherwood  <david.sherwood@arm.com>
33433         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
33434         constant and extern definitions for variable-length vectors.
33435         (vect_get_constant_vectors): Note that the number of units
33436         is known to be constant.
33438 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33439             Alan Hayward  <alan.hayward@arm.com>
33440             David Sherwood  <david.sherwood@arm.com>
33442         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
33443         of units as polynomial.  Choose between WIDE and NARROW based
33444         on multiple_p.
33446 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33447             Alan Hayward  <alan.hayward@arm.com>
33448             David Sherwood  <david.sherwood@arm.com>
33450         * tree-vect-stmts.c (simd_clone_subparts): New function.
33451         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
33453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33454             Alan Hayward  <alan.hayward@arm.com>
33455             David Sherwood  <david.sherwood@arm.com>
33457         * tree-vect-stmts.c (vectorizable_call): Treat the number of
33458         vectors as polynomial.  Use build_index_vector for
33459         IFN_GOMP_SIMD_LANE.
33461 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33462             Alan Hayward  <alan.hayward@arm.com>
33463             David Sherwood  <david.sherwood@arm.com>
33465         * tree-vect-stmts.c (get_load_store_type): Treat the number of
33466         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
33467         for variable-length vectors.
33468         (vectorizable_mask_load_store): Treat the number of units as
33469         polynomial, asserting that it is constant if the condition has
33470         already been enforced.
33471         (vectorizable_store, vectorizable_load): Likewise.
33473 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33474             Alan Hayward  <alan.hayward@arm.com>
33475             David Sherwood  <david.sherwood@arm.com>
33477         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
33478         of units as polynomial.  Punt if we can't tell at compile time
33479         which vector contains the final result.
33481 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33482             Alan Hayward  <alan.hayward@arm.com>
33483             David Sherwood  <david.sherwood@arm.com>
33485         * tree-vect-loop.c (vectorizable_induction): Treat the number
33486         of units as polynomial.  Punt on SLP inductions.  Use an integer
33487         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
33488         cast of such a series for variable-length floating-point
33489         reductions.
33491 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33492             Alan Hayward  <alan.hayward@arm.com>
33493             David Sherwood  <david.sherwood@arm.com>
33495         * tree.h (build_index_vector): Declare.
33496         * tree.c (build_index_vector): New function.
33497         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
33498         of units as polynomial, forcibly converting it to a constant if
33499         vectorizable_reduction has already enforced the condition.
33500         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
33501         to create a {1,2,3,...} vector.
33502         (vectorizable_reduction): Treat the number of units as polynomial.
33503         Choose vectype_in based on the largest scalar element size rather
33504         than the smallest number of units.  Enforce the restrictions
33505         relied on above.
33507 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33508             Alan Hayward  <alan.hayward@arm.com>
33509             David Sherwood  <david.sherwood@arm.com>
33511         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
33512         number of units as polynomial.
33514 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33515             Alan Hayward  <alan.hayward@arm.com>
33516             David Sherwood  <david.sherwood@arm.com>
33518         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
33519         * target.def (autovectorize_vector_sizes): Return the vector sizes
33520         by pointer, using vector_sizes rather than a bitmask.
33521         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
33522         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
33523         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
33524         Likewise.
33525         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
33526         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
33527         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
33528         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
33529         * omp-general.c (omp_max_vf): Likewise.
33530         * omp-low.c (omp_clause_aligned_alignment): Likewise.
33531         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
33532         * tree-vect-loop.c (vect_analyze_loop): Likewise.
33533         * tree-vect-slp.c (vect_slp_bb): Likewise.
33534         * doc/tm.texi: Regenerate.
33535         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
33536         to a poly_uint64.
33537         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
33538         the vector size as a poly_uint64 rather than an unsigned int.
33539         (current_vector_size): Change from an unsigned int to a poly_uint64.
33540         (get_vectype_for_scalar_type): Update accordingly.
33541         * tree.h (build_truth_vector_type): Take the size and number of
33542         units as a poly_uint64 rather than an unsigned int.
33543         (build_vector_type): Add a temporary overload that takes
33544         the number of units as a poly_uint64 rather than an unsigned int.
33545         * tree.c (make_vector_type): Likewise.
33546         (build_truth_vector_type): Take the number of units as a poly_uint64
33547         rather than an unsigned int.
33549 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33550             Alan Hayward  <alan.hayward@arm.com>
33551             David Sherwood  <david.sherwood@arm.com>
33553         * target.def (get_mask_mode): Take the number of units and length
33554         as poly_uint64s rather than unsigned ints.
33555         * targhooks.h (default_get_mask_mode): Update accordingly.
33556         * targhooks.c (default_get_mask_mode): Likewise.
33557         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
33558         * doc/tm.texi: Regenerate.
33560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33561             Alan Hayward  <alan.hayward@arm.com>
33562             David Sherwood  <david.sherwood@arm.com>
33564         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
33565         * omp-general.c (omp_max_vf): Likewise.
33566         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
33567         (expand_omp_simd): Handle polynomial safelen.
33568         * omp-low.c (omplow_simd_context): Add a default constructor.
33569         (omplow_simd_context::max_vf): Change from int to poly_uint64.
33570         (lower_rec_simd_input_clauses): Update accordingly.
33571         (lower_rec_input_clauses): Likewise.
33573 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33574             Alan Hayward  <alan.hayward@arm.com>
33575             David Sherwood  <david.sherwood@arm.com>
33577         * tree-vectorizer.h (vect_nunits_for_cost): New function.
33578         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
33579         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
33580         (vect_analyze_slp_cost): Likewise.
33581         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
33582         (vect_model_load_cost): Likewise.
33584 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33585             Alan Hayward  <alan.hayward@arm.com>
33586             David Sherwood  <david.sherwood@arm.com>
33588         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
33589         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
33590         from an unsigned int * to a poly_uint64_pod *.
33591         (calculate_unrolling_factor): New function.
33592         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
33594 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33595             Alan Hayward  <alan.hayward@arm.com>
33596             David Sherwood  <david.sherwood@arm.com>
33598         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
33599         from an unsigned int to a poly_uint64.
33600         (_loop_vec_info::slp_unrolling_factor): Likewise.
33601         (_loop_vec_info::vectorization_factor): Change from an int
33602         to a poly_uint64.
33603         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
33604         (vect_get_num_vectors): New function.
33605         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
33606         (vect_get_num_copies): Use vect_get_num_vectors.
33607         (vect_analyze_data_ref_dependences): Change max_vf from an int *
33608         to an unsigned int *.
33609         (vect_analyze_data_refs): Change min_vf from an int * to a
33610         poly_uint64 *.
33611         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33612         than an unsigned HOST_WIDE_INT.
33613         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
33614         (vect_analyze_data_ref_dependence): Change max_vf from an int *
33615         to an unsigned int *.
33616         (vect_analyze_data_ref_dependences): Likewise.
33617         (vect_compute_data_ref_alignment): Handle polynomial vf.
33618         (vect_enhance_data_refs_alignment): Likewise.
33619         (vect_prune_runtime_alias_test_list): Likewise.
33620         (vect_shift_permute_load_chain): Likewise.
33621         (vect_supportable_dr_alignment): Likewise.
33622         (dependence_distance_ge_vf): Take the vectorization factor as a
33623         poly_uint64 rather than an unsigned HOST_WIDE_INT.
33624         (vect_analyze_data_refs): Change min_vf from an int * to a
33625         poly_uint64 *.
33626         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
33627         vfm1 as a poly_uint64 rather than an int.  Make the same change
33628         for the returned bound_scalar.
33629         (vect_gen_vector_loop_niters): Handle polynomial vf.
33630         (vect_do_peeling): Likewise.  Update call to
33631         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
33632         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
33633         be constant.
33634         * tree-vect-loop.c (vect_determine_vectorization_factor)
33635         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
33636         (vect_get_known_peeling_cost): Likewise.
33637         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
33638         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
33639         (vect_transform_loop): Likewise.  Use the lowest possible VF when
33640         updating the upper bounds of the loop.
33641         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
33642         rather than an int.
33643         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
33644         polynomial unroll factors.
33645         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
33646         (vect_make_slp_decision): Likewise.
33647         (vect_supported_load_permutation_p): Likewise, and polynomial
33648         vf too.
33649         (vect_analyze_slp_cost): Handle polynomial vf.
33650         (vect_slp_analyze_node_operations): Likewise.
33651         (vect_slp_analyze_bb_1): Likewise.
33652         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33653         than an unsigned HOST_WIDE_INT.
33654         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
33655         (vectorizable_load): Handle polynomial vf.
33656         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
33657         a poly_uint64.
33658         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
33660 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33661             Alan Hayward  <alan.hayward@arm.com>
33662             David Sherwood  <david.sherwood@arm.com>
33664         * match.pd: Handle bit operations involving three constants
33665         and try to fold one pair.
33667 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33669         * tree-vect-loop-manip.c: Include gimple-fold.h.
33670         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
33671         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
33672         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
33673         Add a path that uses a step of VF instead of 1, but disable it
33674         for now.
33675         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
33676         and niters_no_overflow parameters.  Update calls to
33677         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
33678         Create a new SSA name if the latter choses to use a ste other
33679         than zero, and return it via niters_vector_mult_vf_var.
33680         * tree-vect-loop.c (vect_transform_loop): Update calls to
33681         vect_do_peeling, vect_gen_vector_loop_niters and
33682         slpeel_make_loop_iterate_ntimes.
33683         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
33684         (vect_gen_vector_loop_niters): Update declarations after above changes.
33686 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
33688         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
33689         128-bit round to integer instructions.
33690         (ceil<mode>2): Likewise.
33691         (btrunc<mode>2): Likewise.
33692         (round<mode>2): Likewise.
33694 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33696         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
33697         unaligned VSX load/store on P8/P9.
33698         (expand_block_clear): Allow the use of unaligned VSX
33699         load/store on P8/P9.
33701 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33703         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
33704         New function.
33705         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
33706         swap associated with both a load and a store.
33708 2018-01-02  Andrew Waterman  <andrew@sifive.com>
33710         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
33711         * config/riscv/riscv.md (clear_cache): Use it.
33713 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
33715         * web.c: Remove out-of-date comment.
33717 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33719         * expr.c (fixup_args_size_notes): Check that any existing
33720         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
33721         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
33722         (emit_single_push_insn): ...here.
33724 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33726         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
33727         (const_vector_encoded_nelts): New function.
33728         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
33729         (const_vector_int_elt, const_vector_elt): Declare.
33730         * emit-rtl.c (const_vector_int_elt_1): New function.
33731         (const_vector_elt): Likewise.
33732         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
33733         of CONST_VECTOR_ELT.
33735 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33737         * expr.c: Include rtx-vector-builder.h.
33738         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
33739         directly on the tree encoding.
33740         (const_vector_from_tree): Likewise.
33741         * optabs.c: Include rtx-vector-builder.h.
33742         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
33743         sequence of "u" values.
33744         * vec-perm-indices.c: Include rtx-vector-builder.h.
33745         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
33746         directly on the vec_perm_indices encoding.
33748 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33750         * doc/rtl.texi (const_vector): Describe new encoding scheme.
33751         * Makefile.in (OBJS): Add rtx-vector-builder.o.
33752         * rtx-vector-builder.h: New file.
33753         * rtx-vector-builder.c: Likewise.
33754         * rtl.h (rtx_def::u2): Add a const_vector field.
33755         (CONST_VECTOR_NPATTERNS): New macro.
33756         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
33757         (CONST_VECTOR_DUPLICATE_P): Likewise.
33758         (CONST_VECTOR_STEPPED_P): Likewise.
33759         (CONST_VECTOR_ENCODED_ELT): Likewise.
33760         (const_vec_duplicate_p): Check for a duplicated vector encoding.
33761         (unwrap_const_vec_duplicate): Likewise.
33762         (const_vec_series_p): Check for a non-duplicated vector encoding.
33763         Say that the function only returns true for integer vectors.
33764         * emit-rtl.c: Include rtx-vector-builder.h.
33765         (gen_const_vec_duplicate_1): Delete.
33766         (gen_const_vector): Call gen_const_vec_duplicate instead of
33767         gen_const_vec_duplicate_1.
33768         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
33769         (gen_const_vec_duplicate): Use rtx_vector_builder.
33770         (gen_const_vec_series): Likewise.
33771         (gen_rtx_CONST_VECTOR): Likewise.
33772         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
33773         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33774         Build a new vector rather than modifying a CONST_VECTOR in-place.
33775         (handle_special_swappables): Update call accordingly.
33776         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
33777         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33778         Build a new vector rather than modifying a CONST_VECTOR in-place.
33779         (handle_special_swappables): Update call accordingly.
33781 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33783         * simplify-rtx.c (simplify_const_binary_operation): Use
33784         CONST_VECTOR_ELT instead of XVECEXP.
33786 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33788         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
33789         the selector elements to be different from the data elements
33790         if the selector is a VECTOR_CST.
33791         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
33792         ssizetype for the selector.
33794 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33796         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
33797         before testing each element individually.
33798         * tree-vect-generic.c (lower_vec_perm): Likewise.
33800 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33802         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
33803         * selftest-run-tests.c (selftest::run_tests): Call it.
33804         * vector-builder.h (vector_builder::operator ==): New function.
33805         (vector_builder::operator !=): Likewise.
33806         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
33807         (vec_perm_indices::all_from_input_p): New function.
33808         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33809         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
33810         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
33811         instead of reading the VECTOR_CST directly.  Detect whether both
33812         vector inputs are the same before constructing the vec_perm_indices,
33813         and update the number of inputs argument accordingly.  Use the
33814         utility functions added above.  Only construct sel2 if we need to.
33816 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33818         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
33819         the broadcast of the low byte.
33820         (expand_mult_highpart): Use an explicit encoding for the permutes.
33821         * optabs-query.c (can_mult_highpart_p): Likewise.
33822         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
33823         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33824         (vectorizable_bswap): Likewise.
33825         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
33826         explicit encoding for the power-of-2 permutes.
33827         (vect_permute_store_chain): Likewise.
33828         (vect_grouped_load_supported): Likewise.
33829         (vect_permute_load_chain): Likewise.
33831 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33833         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
33834         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
33835         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
33836         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33837         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
33838         (vect_gen_perm_mask_any): Likewise.
33840 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33842         * int-vector-builder.h: New file.
33843         * vec-perm-indices.h: Include int-vector-builder.h.
33844         (vec_perm_indices): Redefine as an int_vector_builder.
33845         (auto_vec_perm_indices): Delete.
33846         (vec_perm_builder): Redefine as a stand-alone class.
33847         (vec_perm_indices::vec_perm_indices): New function.
33848         (vec_perm_indices::clamp): Likewise.
33849         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
33850         (vec_perm_indices::new_vector): New function.
33851         (vec_perm_indices::new_expanded_vector): Update for new
33852         vec_perm_indices class.
33853         (vec_perm_indices::rotate_inputs): New function.
33854         (vec_perm_indices::all_in_range_p): Operate directly on the
33855         encoded form, without computing elided elements.
33856         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
33857         encoding.  Update for new vec_perm_indices class.
33858         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
33859         the given vec_perm_builder.
33860         (expand_vec_perm_var): Update vec_perm_builder constructor.
33861         (expand_mult_highpart): Use vec_perm_builder instead of
33862         auto_vec_perm_indices.
33863         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
33864         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
33865         or double series encoding as appropriate.
33866         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
33867         vec_perm_indices instead of auto_vec_perm_indices.
33868         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33869         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33870         (vect_permute_store_chain): Likewise.
33871         (vect_grouped_load_supported): Likewise.
33872         (vect_permute_load_chain): Likewise.
33873         (vect_shift_permute_load_chain): Likewise.
33874         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33875         (vect_transform_slp_perm_load): Likewise.
33876         (vect_schedule_slp_instance): Likewise.
33877         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33878         (vectorizable_mask_load_store): Likewise.
33879         (vectorizable_bswap): Likewise.
33880         (vectorizable_store): Likewise.
33881         (vectorizable_load): Likewise.
33882         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
33883         vec_perm_indices instead of auto_vec_perm_indices.  Use
33884         tree_to_vec_perm_builder to read the vector from a tree.
33885         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
33886         vec_perm_builder instead of a vec_perm_indices.
33887         (have_whole_vector_shift): Use vec_perm_builder and
33888         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
33889         truncation to calc_vec_perm_mask_for_shift.
33890         (vect_create_epilog_for_reduction): Likewise.
33891         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
33892         from auto_vec_perm_indices to vec_perm_indices.
33893         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33894         instead of changing individual elements.
33895         (aarch64_vectorize_vec_perm_const): Use new_vector to install
33896         the vector in d.perm.
33897         * config/arm/arm.c (expand_vec_perm_d::perm): Change
33898         from auto_vec_perm_indices to vec_perm_indices.
33899         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33900         instead of changing individual elements.
33901         (arm_vectorize_vec_perm_const): Use new_vector to install
33902         the vector in d.perm.
33903         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
33904         Update vec_perm_builder constructor.
33905         (rs6000_expand_interleave): Likewise.
33906         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
33907         (rs6000_expand_interleave): Likewise.
33909 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33911         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33912         to qimode could truncate the indices.
33913         * optabs.c (expand_vec_perm_var): Likewise.
33915 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33917         * Makefile.in (OBJS): Add vec-perm-indices.o.
33918         * vec-perm-indices.h: New file.
33919         * vec-perm-indices.c: Likewise.
33920         * target.h (vec_perm_indices): Replace with a forward class
33921         declaration.
33922         (auto_vec_perm_indices): Move to vec-perm-indices.h.
33923         * optabs.h: Include vec-perm-indices.h.
33924         (expand_vec_perm): Delete.
33925         (selector_fits_mode_p, expand_vec_perm_var): Declare.
33926         (expand_vec_perm_const): Declare.
33927         * target.def (vec_perm_const_ok): Replace with...
33928         (vec_perm_const): ...this new hook.
33929         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33930         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33931         * doc/tm.texi: Regenerate.
33932         * optabs.def (vec_perm_const): Delete.
33933         * doc/md.texi (vec_perm_const): Likewise.
33934         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33935         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33936         expand_vec_perm for constant permutation vectors.  Assert that
33937         the mode of variable permutation vectors is the integer equivalent
33938         of the mode that is being permuted.
33939         * optabs-query.h (selector_fits_mode_p): Declare.
33940         * optabs-query.c: Include vec-perm-indices.h.
33941         (selector_fits_mode_p): New function.
33942         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33943         is defined, instead of checking whether the vec_perm_const_optab
33944         exists.  Use targetm.vectorize.vec_perm_const instead of
33945         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
33946         fit in the vector mode before using a variable permute.
33947         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33948         vec_perm_indices instead of an rtx.
33949         (expand_vec_perm): Replace with...
33950         (expand_vec_perm_const): ...this new function.  Take the selector
33951         as a vec_perm_indices rather than an rtx.  Also take the mode of
33952         the selector.  Update call to shift_amt_for_vec_perm_mask.
33953         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33954         Use vec_perm_indices::new_expanded_vector to expand the original
33955         selector into bytes.  Check whether the indices fit in the vector
33956         mode before using a variable permute.
33957         (expand_vec_perm_var): Make global.
33958         (expand_mult_highpart): Use expand_vec_perm_const.
33959         * fold-const.c: Includes vec-perm-indices.h.
33960         * tree-ssa-forwprop.c: Likewise.
33961         * tree-vect-data-refs.c: Likewise.
33962         * tree-vect-generic.c: Likewise.
33963         * tree-vect-loop.c: Likewise.
33964         * tree-vect-slp.c: Likewise.
33965         * tree-vect-stmts.c: Likewise.
33966         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33967         Delete.
33968         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33969         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33970         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33971         (aarch64_vectorize_vec_perm_const): ...this new function.
33972         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33973         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33974         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33975         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33976         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33977         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33978         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33979         into...
33980         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
33981         check for NEON modes.
33982         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33983         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33984         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33985         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33986         into...
33987         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
33988         the old VEC_PERM_CONST conditions.
33989         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33990         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33991         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33992         (ia64_vectorize_vec_perm_const_ok): Merge into...
33993         (ia64_vectorize_vec_perm_const): ...this new function.
33994         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33995         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33996         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33997         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33998         * config/mips/mips.c (mips_expand_vec_perm_const)
33999         (mips_vectorize_vec_perm_const_ok): Merge into...
34000         (mips_vectorize_vec_perm_const): ...this new function.
34001         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
34002         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
34003         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
34004         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
34005         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
34006         (rs6000_expand_vec_perm_const): Delete.
34007         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
34008         Delete.
34009         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34010         (altivec_expand_vec_perm_const_le): Take each operand individually.
34011         Operate on constant selectors rather than rtxes.
34012         (altivec_expand_vec_perm_const): Likewise.  Update call to
34013         altivec_expand_vec_perm_const_le.
34014         (rs6000_expand_vec_perm_const): Delete.
34015         (rs6000_vectorize_vec_perm_const_ok): Delete.
34016         (rs6000_vectorize_vec_perm_const): New function.
34017         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34018         an element count and rtx array.
34019         (rs6000_expand_extract_even): Update call accordingly.
34020         (rs6000_expand_interleave): Likewise.
34021         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
34022         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
34023         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
34024         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
34025         (rs6000_expand_vec_perm_const): Delete.
34026         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34027         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34028         (altivec_expand_vec_perm_const_le): Take each operand individually.
34029         Operate on constant selectors rather than rtxes.
34030         (altivec_expand_vec_perm_const): Likewise.  Update call to
34031         altivec_expand_vec_perm_const_le.
34032         (rs6000_expand_vec_perm_const): Delete.
34033         (rs6000_vectorize_vec_perm_const_ok): Delete.
34034         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
34035         reference to the SPE evmerge intructions.
34036         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34037         an element count and rtx array.
34038         (rs6000_expand_extract_even): Update call accordingly.
34039         (rs6000_expand_interleave): Likewise.
34040         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
34041         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
34042         new function.
34043         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34045 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34047         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
34048         vector mode and that that mode matches the mode of the data
34049         being permuted.
34050         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
34051         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
34052         directly using expand_vec_perm_1 when forcing selectors into
34053         registers.
34054         (expand_vec_perm_var): New function, split out from expand_vec_perm.
34056 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34058         * optabs-query.h (can_vec_perm_p): Delete.
34059         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
34060         * optabs-query.c (can_vec_perm_p): Split into...
34061         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
34062         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
34063         particular selector is valid.
34064         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34065         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34066         (vect_grouped_load_supported): Likewise.
34067         (vect_shift_permute_load_chain): Likewise.
34068         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34069         (vect_transform_slp_perm_load): Likewise.
34070         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34071         (vectorizable_bswap): Likewise.
34072         (vect_gen_perm_mask_checked): Likewise.
34073         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
34074         implementations of variable permutation vectors into account
34075         when deciding which selector to use.
34076         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
34077         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
34078         with a false third argument.
34079         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
34080         to test whether the constant selector is valid and can_vec_perm_var_p
34081         to test whether a variable selector is valid.
34083 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34085         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
34086         * optabs-query.c (can_vec_perm_p): Likewise.
34087         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
34088         instead of vec_perm_indices.
34089         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
34090         (vect_gen_perm_mask_checked): Likewise,
34091         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
34092         (vect_gen_perm_mask_checked): Likewise,
34094 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
34096         * optabs-query.h (qimode_for_vec_perm): Declare.
34097         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
34098         (qimode_for_vec_perm): ...this new function.
34099         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
34101 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34103         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
34104         does not have a conditional at the top.
34106 2018-01-02  Richard Biener  <rguenther@suse.de>
34108         * ipa-inline.c (big_speedup_p): Fix expression.
34110 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
34112         PR target/81616
34113         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
34114         for generic 4->6.
34116 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
34118         PR target/81616
34119         Generic tuning.
34120         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
34121         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
34122         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
34123         cond_taken_branch_cost 3->4.
34125 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
34127         PR tree-optimization/83581
34128         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34129         TODO_cleanup_cfg if any changes have been made.
34131         PR middle-end/83608
34132         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34133         convert_modes if target mode has the right side, but different mode
34134         class.
34136         PR middle-end/83609
34137         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34138         last argument when extracting from CONCAT.  If either from_real or
34139         from_imag is NULL, use expansion through memory.  If result is not
34140         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34141         the parts directly to inner mode, if even that fails, use expansion
34142         through memory.
34144         PR middle-end/83623
34145         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34146         check for bswap in mode rather than HImode and use that in expand_unop
34147         too.
34149 Copyright (C) 2018 Free Software Foundation, Inc.
34151 Copying and distribution of this file, with or without modification,
34152 are permitted in any medium without royalty provided the copyright
34153 notice and this notice are preserved.