Fix thinko in transition to memop_ret type (PR middle-end/88246).
[official-gcc.git] / gcc / ChangeLog
blob02c2403baf8e21db42af550f20d99bb8b295b541
1 2018-11-29  Martin Liska  <mliska@suse.cz>
3         PR middle-end/88246
4         * builtins.c (expand_movstr): Fix thinko introduced
5         when switching to the new enum.
7 2018-11-29  qing zhao  <qing.zhao@oracle.com>
9         * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
10         * common.opt: Add -flive-patching flag.
11         * doc/invoke.texi: Document -flive-patching.
12         * flag-types.h (enum live_patching_level): New enum.
13         * ipa-inline.c (can_inline_edge_p): Disable external functions from
14         inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
15         * opts.c (control_options_for_live_patching): New function.
16         (finish_options): Make flag_live_patching incompatible with flag_lto.
17         Control IPA optimizations based on different levels of 
18         flag_live_patching.
20 2018-11-29  Giuliano Belinassi  <giuliano.belinassi@usp.br>
22         * match.pd (sinh (atanh (x))): New simplification rules.
23         (cosh (atanh (x))): Likewise.
25 2018-11-29  Jakub Jelinek  <jakub@redhat.com>
27         PR target/54700
28         * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
29         (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
30         (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
31         *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
32         *<sse4_1_avx2>_pblendvb_lt): New define_insns.
34         PR target/88152
35         * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
36         * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
37         * match.pd (define_predicates): Add uniform_integer_cst_p.
38         (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
39         so that it works also for vector comparisons with uniform constants
40         with INTEGER_CST element.
42         PR target/88234
43         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
44         vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
45         in unsigned_type_for instead of vector integral type where overflow
46         doesn't wrap.
48 2018-11-29  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
50         There can be at most one .resolver clone per function
51         * config/rs6000/rs6000.c (make_resolver_func): Generate
52         resolver symbol with clone_function_name instead of
53         clone_function_name_numbered.
55 2018-11-29  Richard Biener  <rguenther@suse.de>
57         PR tree-optimization/88243
58         * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
59         type of all pattern-sequence stmts to vect_internal_def.
61 2018-11-29  Andre Vieira  <andre.simoesdiasvieira@arm.com>
63         PR target/88224
64         * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
65         (cortex-r7, cortex-r8): Update default and add new configuration.
66         * doc/invoke.texi (armv7-r): Add two new vfp options.
67         (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
68         support this option.
70 2018-11-29  Alan Modra  <amodra@gmail.com>
72         * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
73         double split for targets other than Darwin.
75 2018-11-29  Alan Modra  <amodra@gmail.com>
77         * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
79 2018-11-29  Alan Modra  <amodra@gmail.com>
81         * config/rs6000/predicates.md (easy_fp_constant): Remove code
82         dealing with integers in const_double.  Assert on unexpected
83         modes.  Delete superfluous ABI_V4 test.
84         * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
85         Don't call easy_fp_constant for Pmode.
86         (rs6000_hash_constant): Remove code dealing with integers in
87         const_double.
88         (rs6000_legitimate_constant_p): Likewise.
89         (output_toc): Formatting, use CONST_DOUBLE_P.
91 2018-11-29  Alan Modra  <amodra@gmail.com>
93         * config/rs6000/constraints.md (G, H): Comment on purpose of
94         constraint.  Correct mode comments and "G" mode test.
95         * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
96         alternative handling "F".  Add length attr.  Formatting.
97         (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
98         alternative, and move "F" to separate alternative.  Correct
99         insn lengths.
101 2018-11-29  Alan Modra  <amodra@gmail.com>
103         * config/rs6000/predicates.md (easy_vector_constant): Don't call
104         easy_fp_constant.
106 2018-11-29  Alan Modra  <amodra@gmail.com>
108         * config.in (HAVE_AS_PLTSEQ): Add.
109         * config/rs6000/predicates.md (indirect_call_operand): New.
110         * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
111         (rs6000_sibcall_sysv): Declare.
112         * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
113         CALL_LONG for -fno-plt.
114         (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
115         (rs6000_indirect_call_template_1): Emit .reloc directives for
116         UNSPEC_PLTSEQ calls.
117         (rs6000_pltseq_template): New function.
118         (rs6000_longcall_ref): Add arg parameter.  Use PLT16 insns if
119         relocs supported by assembler.  Move SYMBOL_REF test to callers.
120         (rs6000_call_aix): Adjust rs6000_longcall_ref call.  Package
121         insns in UNSPEC_PLTSEQ, preserving original func_desc.
122         (rs6000_call_sysv): Likewise.
123         (rs6000_sibcall_sysv): New function.
124         * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
125         * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
126         UNSPEC_PLT16_LO): New.
127         (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
128         (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
129         cookie in constraints.  Test explicitly for flags in length attr.
130         Handle unspec operand 1.
131         (call_value_indirect_nonlocal_sysv): Likewise.
132         (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
133         (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
134         (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
135         (sibcall_indirect_nonlocal_sysv): New pattern.
136         (sibcall_value_indirect_nonlocal_sysv): Likewise.
137         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
138         call alternatives.
139         * configure.ac: Check for gas plt sequence marker support.
140         * configure: Regenerate.
142 2018-11-29  Alan Modra  <amodra@gmail.com>
144         * config/rs6000/predicates.md (unspec_tls): New.
145         * config/rs6000/rs6000-protos.h (rs6000_call_template),
146         (rs6000_sibcall_template): Update prototype.
147         (rs6000_longcall_ref): Delete.
148         (rs6000_call_sysv): Declare.
149         * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
150         (global_tlsarg): New variable.
151         (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
152         handling.
153         (print_operand): Extract UNSPEC_TLSGD address operand.
154         (rs6000_call_template, rs6000_sibcall_template): Remove arg
155         parameter, extract from second call operand instead.
156         (rs6000_longcall_ref): Make static, localize vars.
157         (rs6000_call_aix): Rename parameter to reflect new usage.  Take
158         tlsarg from global_tlsarg.  Don't create unused rtl or nop insns.
159         (rs6000_sibcall_aix): Rename parameter to reflect new usage.  Take
160         tlsarg from global_tlsarg.
161         (rs6000_call_sysv): New function.
162         * config/rs6000/rs6000.md: Adjust rs6000_call_template and
163         rs6000_sibcall_template throughout.
164         (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
165         (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
166         (tls_gdld_nomark): New insn.
167         (tls_gd): Swap operand order.  Simplify mode selection.
168         (tls_gd_high, tls_gd_low): Swap operand order.
169         (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
170         Simplify mode selection.
171         (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
172         (call, call_value): Don't assert for second call operand.
173         Use rs6000_call_sysv.
175 2018-11-29  Alan Modra  <amodra@gmail.com>
177         * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
178         (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
179         (call_value_nonlocal_darwin64): Remove constraints from second call
180         arg, the rounded_stack_size_rtx arg.
181         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
182         (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
183         (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
184         (call_value_local64, call_indirect_nonlocal_sysv),
185         (call_nonlocal_sysv, call_nonlocal_sysv_secure),
186         (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
187         (call_value_nonlocal_sysv_secure, call_local_aix),
188         (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
189         (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
190         (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
191         (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
192         (sibcall_value_aix): Likewise.
194 2018-11-29  Alan Modra  <amodra@gmail.com>
196         * config/rs6000/rs6000.md (TLSmode): Delete mode iterator.  Replace
197         with P throughout except for call mems which should use SI.
198         (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
199         attributes.  Replace with bits, mode and ptrload respectively.
201 2018-11-29  Alan Modra  <amodra@gmail.com>
203         * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
204         (rs6000_indirect_sibcall_template): Declare.
205         * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
206         (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
207         New functions.
208         * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
209         (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
210         (call_indirect_aix, call_value_indirect_aix): Use
211         rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
212         call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
213         handle both speculation and non-speculation cases.
214         (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
215         (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
217 2018-11-29  Alan Modra  <amodra@gmail.com>
219         * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
220         (rs6000_sibcall_template): Declare.
221         (macho_call_template): Rename from output_call.
222         * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
223         (rs6000_call_template, rs6000_sibcall_template): Likewise.
224         (macho_call_template): Rename from output_call.
225         * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
226         (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
227         (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
228         (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
229         (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
230         (call_value_nonlocal_aix): Use rs6000_call_template and update
231         occurrences of output_call to macho_call_template.
232         (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
233         (sibcall_value_aix): Use rs6000_sibcall_template.
235 2018-11-28  Aaron Sawdey  <acsawdey@linux.ibm.com>
237         * config/rs6000/rs6000-string.c (expand_block_clear): Change how
238         we determine if unaligned vsx is ok.
240 2018-11-28  Jan Hubicka  <jh@suse.cz>
242         * predict.c (determine_unlikely_bbs): Forward declare; also determine
243         edges that are always known to be taken because it is only likely
244         edge out of given BB.
245         (tree_estimate_probability): Call before profile guessing to get bit
246         of extra precision.
248 2018-11-28  Jan Hubicka  <jh@suse.cz>
250         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
251         profile_probability::always better.
253 2018-11-28  Jan Hubicka  <jh@suse.cz>
255         * profile-count.h (profile_count::split): Give better result when
256         splitting profile_probability::always.
258 2018-11-28  Vladimir Makarov  <vmakarov@redhat.com>
260         PR target/88207
261         * ira-costs.c (scan_one_insn): Process subregs when updating costs
262         for pseudos and allocnos from insn.
264 2018-11-28  David Edelsohn  <dje.gcc@gmail.com>
266         * config/rs6000/aix72.h: Update to match aix71.h changes.
268 2018-11-28  Jeff Law  <law@redhat.com>
270         * config/h8300/constraints.md: Add "C" constraint for call insns.
271         * config/h8300/h8300.md (call, call_value): Turn into a define_expand
272         and define_insn pair.  Move invalid call targets into a register in
273         the expander and fix constraints in the matching pattern.
274         * config/h8300/predicates.md (call_expander_operand): Renamed from
275         call_insn_operand.  Reject things we shouldn't be trying to handle.
276         (call_insn_operand): New predicate for use by the call/call_value
277         insns.
278         (small_call_insn_operand): Update appropriately.
280 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
282         * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
283         calls to strtok with strtok_r.
285 2018-11-28  Richard Biener  <rguenther@suse.de>
287         PR tree-optimization/88223
288         * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
289         over a stored-same value may-alias store make sure to consider
290         partial overlaps which are valid when TBAA reasonings do not
291         apply and byte-granular overlaps are possible at all.
293 2018-11-28  Richard Biener  <rguenther@suse.de>
295         PR tree-optimization/88217
296         * vr-values.c (vr_values::extract_range_from_phi_node): Make
297         sure to handle results > +INF and < -INF correctly when
298         trying to drop down to +INF - 1 or -INF + 1.
300 2018-11-28  Alan Modra  <amodra@gmail.com>
302         * xcoffout.c (do_block): Signed/unsigned warning fix.
304 2018-11-28  Richard Biener  <rguenther@suse.de>
306         PR tree-optimization/79351
307         * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
308         empty CONSTRUCTORs ensure the store is at a constant position.
310 2018-11-28  Richard Biener  <rguenther@suse.de>
312         PR tree-optimization/88229
313         * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
314         is an INTEGER_CST before accessing it so.
316 2018-11-28  Sam Tebbs  <sam.tebbs@arm.com>
318         * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
320 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
322         PR target/88189
323         * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
324         SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1.  Formatting fixes.
325         * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
327 2018-11-27  Martin Liska  <mliska@suse.cz>
329         * gcov.c (generate_results): Append current_working_directory
330         only when exists.
332 2018-11-27  Mike Gulick  <mgulick@mathworks.com>
334         PR preprocessor/83173
335         * input.c (dump_location_info): Dump reason and included_from
336         fields from line_map_ordinary struct.  Fix indentation when
337         location > 5 digits.
338         * diagnostic-show-locus.c (num_digits, num_digits): Move to
339         diagnostic.c to allow it to be utilized by input.c.
340         * diagnostic.c (num_digits, selftest::test_num_digits): Moved
341         here.
342         (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
343         * diagnostic.h (num_digits): Add extern definition.
345 2018-11-27  Fredrik Noring  <noring@nocrew.org>
347         * config/mips/mips.c (mips_reorg_process_insns)
348         (mips_option_override): Handle `-mfix-r5900'.
349         * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
350         `mno-fix-r5900'.
351         * config/mips/mips.opt (mfix-r5900): New option.
352         * doc/invoke.texi: Document the `r5900' processor name, and
353         `-mfix-r5900' and `-mno-fix-r5900' options.
355 2018-11-27  Jakub Jelinek  <jakub@redhat.com>
357         PR target/88188
358         * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
359         output_operand_lossage instead of gcc_assert.
360         <case 't'>: Likewise.
361         <case 'z'>: Likewise.
362         <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
364 2018-11-27  Jeff Law  <law@redhat.com>
366         * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
367         in call to move_by_pieces.
369         * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
370         to move_by_pieces.
372         * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
373         call to move_by_pieces.
375         * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
376         in call to move_by_pieces.
378         * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
379         RETURN_BEGIN in call to move_by_pieces.
380         (microblaze_expand_block_move): Likewise.
382 2018-11-27  Tamar Christina  <tamar.christina@arm.com>
384         * doc/md.texi (xorsign): Document it.
386 2018-11-27  Martin Liska  <mliska@suse.cz>
388         * config/gnu-user.h (TARGET_F951_OPTIONS): New.
389         * gcc.c (find_fortran_preinclude_file): New function
390         to handle Fortran pre-include.
392 2018-11-27  Martin Liska  <mliska@suse.cz>
394         * asan.c (asan_emit_stack_protection): Use new enum values
395         instead of int constants.
396         * builtins.c (expand_builtin_memory_copy_args): Replace int
397         type with memop_ret enum type.
398         (expand_builtin_mempcpy_args): Likewise.
399         (expand_builtin_memcpy): Use new enum values
400         instead of int constants. Likewise.
401         (expand_builtin_mempcpy): Likewise.
402         (expand_movstr): Likewise.
403         (expand_builtin_strcpy_args): Likewise.
404         (expand_builtin_stpcpy_1): Likewise.
405         (expand_builtin_strncpy): Likewise.
406         (expand_builtin_memset_args): Likewise.
407         * expr.c (move_by_pieces_d::finish_endp): Rename to ...
408         (move_by_pieces_d::finish_retmode): ... this.
409         (move_by_pieces): Change last argument type to memop_ret.
410         (store_by_pieces): Use new enum values
411         instead of int constants.
412         (emit_block_move_hints): Likewise.
413         (emit_push_insn): Likewise.
414         (store_expr): Likewise.
415         * expr.h (store_by_pieces): Change int to newly added enum
416         type.
417         * rtl.h (enum memop_ret): Define.
418         (move_by_pieces): Use the enum type.
420 2018-11-27  Alan Modra  <amodra@gmail.com>
422         * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
423         cpu here.
424         (ASM_CPU_SPEC): Do so here.  Rewrite using if .. else if .. specs
425         form.  Error on missing -mcpu case.
426         * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
427         (asm_names <!_AIX>): Add missing cpus.  Update NULL case.  Apply
428         PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
429         * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
430         else if .. specs form.  Error on missing -mcpu case.  Don't output
431         duplicate -maltivec.  Apply PR63177 fix for -mcpu=powerpc64le.
433 2018-11-26  David Malcolm  <dmalcolm@redhat.com>
435         * dump-context.h (dump_context::dump_loc): Convert 1st param from
436         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
437         const dump_location_t & to const dump_user_location_t &.
438         (dump_context::dump_loc_immediate): Convert 2nd param from
439         const dump_location_t & to const dump_user_location_t &.
440         (dump_context::dump_gimple_stmt): Convert 1st param from
441         dump_flags_t to const dump_metadata_t &.
442         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
443         2nd param from const dump_location_t & to
444         const dump_user_location_t &.
445         (dump_context::dump_gimple_expr): Convert 1st param from
446         dump_flags_t to const dump_metadata_t &.
447         (dump_context::dump_gimple_expr_loc): Likewise; convert
448         2nd param from const dump_location_t & to
449         const dump_user_location_t &.
450         (dump_context::dump_generic_expr): Convert 1st param from
451         dump_flags_t to const dump_metadata_t &.
452         (dump_context::dump_generic_expr_loc): Likewise; convert
453         2nd param from const dump_location_t & to
454         const dump_user_location_t &.
455         (dump_context::dump_printf_va): Convert 1st param from
456         dump_flags_t to const dump_metadata_t &.
457         (dump_context::dump_printf_loc_va): Likewise; convert
458         2nd param from const dump_location_t & to
459         const dump_user_location_t &.
460         (dump_context::dump_dec): Convert 1st param from
461         dump_flags_t to const dump_metadata_t &.
462         (dump_context::dump_symtab_node): Likewise.
463         (dump_context::begin_scope): Split out 2nd param into
464         user and impl locations.
465         (dump_context::ensure_pending_optinfo): Add metadata param.
466         (dump_context::begin_next_optinfo): Replace dump_location_t param
467         with metadata and user location.
468         * dumpfile.c (dump_context::dump_loc): Convert 1st param from
469         dump_flags_t to const dump_metadata_t &.  Convert 2nd param from
470         const dump_location_t & to const dump_user_location_t &.
471         (dump_context::dump_loc_immediate): Convert 2nd param from
472         const dump_location_t & to const dump_user_location_t &.
473         (dump_context::dump_gimple_stmt): Convert 1st param from
474         dump_flags_t to const dump_metadata_t &.
475         (dump_context::void dump_gimple_stmt_loc): Likewise; convert
476         2nd param from const dump_location_t & to
477         const dump_user_location_t &.
478         (dump_context::dump_gimple_expr): Convert 1st param from
479         dump_flags_t to const dump_metadata_t &.
480         (dump_context::dump_gimple_expr_loc): Likewise; convert
481         2nd param from const dump_location_t & to
482         const dump_user_location_t &.
483         (dump_context::dump_generic_expr): Convert 1st param from
484         dump_flags_t to const dump_metadata_t &.
485         (dump_context::dump_generic_expr_loc): Likewise; convert
486         2nd param from const dump_location_t & to
487         const dump_user_location_t &.
488         (dump_context::dump_printf_va): Convert 1st param from
489         dump_flags_t to const dump_metadata_t &.
490         (dump_context::dump_printf_loc_va): Likewise; convert
491         2nd param from const dump_location_t & to
492         const dump_user_location_t &.
493         (dump_context::dump_dec): Convert 1st param from
494         dump_flags_t to const dump_metadata_t &.
495         (dump_context::dump_symtab_node): Likewise.
496         (dump_context::begin_scope): Split out 2nd param into
497         user and impl locations.
498         (dump_context::ensure_pending_optinfo): Add metadata param.
499         (dump_context::begin_next_optinfo): Replace dump_location_t param
500         with metadata and user location.
501         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
502         const dump_metadata_t &.
503         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
504         const dump_location_t & to const dump_user_location_t &.
505         (dump_gimple_expr): Convert 1st param from dump_flags_t to
506         const dump_metadata_t &.
507         (dump_gimple_expr_loc): Likewise; convert 2nd param from
508         const dump_location_t & to const dump_user_location_t &.
509         (dump_generic_expr): Convert 1st param from dump_flags_t to
510         const dump_metadata_t &.
511         (dump_generic_expr_loc): Likewise; convert 2nd param from
512         const dump_location_t & to const dump_user_location_t &.
513         (dump_printf): Convert 1st param from dump_flags_t to
514         const dump_metadata_t &.
515         (dump_printf_loc): Likewise; convert 2nd param from
516         const dump_location_t & to const dump_user_location_t &.
517         (dump_dec): Convert 1st param from dump_flags_t to
518         const dump_metadata_t &.
519         (dump_symtab_node): Likewise.
520         (dump_begin_scope): Split out 2nd param into user and impl
521         locations.
522         (selftest::assert_impl_location_eq): New function.
523         (ASSERT_IMPL_LOCATION_EQ): New macro.
524         (selftest::test_impl_location): Update to use
525         ASSERT_IMPL_LOCATION_EQ.
526         (selftest::test_capture_of_dump_calls): Convert "loc" to
527         dump_user_location_t.  Add ASSERT_IMPL_LOCATION_EQ throughout,
528         verifying line numbers of dump emissions.
529         * dumpfile.h (class dump_metadata_t): New class.
530         (dump_printf): Convert 1st param from dump_flags_t to
531         const dump_metadata_t &.
532         (dump_printf_loc): Likewise; convert 2nd param from
533         const dump_location_t & to const dump_user_location_t &.
534         (dump_generic_expr_loc): Likewise.
535         (dump_generic_expr): Convert 1st param from dump_flags_t to
536         const dump_metadata_t &.
537         (dump_gimple_stmt_loc): Likewise; convert 2nd param from
538         const dump_location_t & to const dump_user_location_t &.
539         (dump_gimple_stmt): Convert 1st param from dump_flags_t to
540         const dump_metadata_t &.
541         (dump_gimple_expr_loc): Likewise; convert 2nd param from
542         const dump_location_t & to const dump_user_location_t &.
543         (dump_gimple_expr): Convert 1st param from dump_flags_t to
544         const dump_metadata_t &.
545         (dump_symtab_node): Likewise.
546         (dump_dec): Likewise.
547         (dump_begin_scope): Split out 2nd param into user and impl
548         locations.
549         (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
550         location and impl_location, and capture the impl_location.
551         (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
552         * loop-unroll.c (report_unroll): Update for changes to
553         dump_printf_loc and dump_printf.
554         * opt-problem.cc (opt_problem::opt_problem): Update for change to
555         dump_loc.
556         * optinfo-emit-json.cc
557         (selftest::test_building_json_from_dump_calls): Convert "loc" from
558         dump_location_t to dump_user_location_t.
559         * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
560         dump_loc_immediate.
561         * profile.c (compute_branch_probabilities): Update for change to
562         dump_printf_loc.
563         * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
564         * tree-vect-slp.c (vect_print_slp_tree): Update for change to
565         dump_printf_loc.
567 2018-11-27  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
569         * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
570         and check_effective_target_ptr_eq_long.
572 2018-11-27  Alan Modra  <amodra@gmail.com>
574         * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
575         (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
576         (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
577         (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
578         (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
579         * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
580         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
581         (ASM_APP_ON, ASM_APP_OFF): Don't define.
582         * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
583         * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
584         * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
585         * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
586         (LINK_GCC_C_SEQUENCE_SPEC): Undef.
587         * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
588         * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
589         (GNU_USER_TARGET_CRTN): Redefine.
590         (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
591         (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
592         (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
593         (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
594         (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
595         (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
596         (LINK_EH_SPEC): Don't define.
598 2018-11-26  Martin Sebor  <msebor@redhat.com>
600         PR 87756
601         * expr.c (string_constant): Handle top-level decls of all character
602         types and subobjects of narrow character type.
604 2018-11-27  Alan Modra  <amodra@gmail.com>
606         * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
607         * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
608         GNU_USER_TARGET_OS_CPP_BUILTINS.
609         (RS6000_ABI_NAME): Define.
610         * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
611         GNU_USER_TARGET_OS_CPP_BUILTINS.
612         (MUSL_DYNAMIC_LINKER32): Undef before defining.
613         (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
614         (CHOOSE_DYNAMIC_LINKER): Don't define.
615         (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
616         * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
617         (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
618         not already defined.
619         (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
620         TARGET_OS_CPP_BUILTINS.
622 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
624         * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
626 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
628         PR target/88195
629         * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
630         and !TARGET_64BIT, return NULL_TREE.
632         PR c++/86900
633         * dwarf2out.c (secname_for_decl): For functions with
634         DECL_SECTION_NAME if in_cold_section_p, try to return
635         current_function_section's name if it is a named section.
637 2018-11-26  Maya Rashish  <coypu@sdf.org>
639         PR target/58397
640         * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
641         * config/x-netbsd: New file.
642         * config/host-netbsd: New file.
644 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
646         * doc/sourcebuild.texi: Document check_effective_target_size20plus.
647         Clarify documentation for check_effective_target_size32plus.
649 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
651         * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
652         and modify expand_strncmp_vec_sequence.
653         (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
654         (generate_6432_conversion): New function.
655         (expand_block_compare): Add support for vsx.
656         (expand_block_compare_gpr): New function.
657         * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
658         default limit to 63 because of more compact vsx code.
660 2018-11-26  Uros Bizjak  <ubizjak@gmail.com>
662         PR target/88178
663         * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
664         for registers for which no debug information can be generated.
665         Use INVALID_REGNUM for non-existent registers.
666         (dbx64_register_map): Ditto.
667         (svr4_dbx_register_map): Ditto.
669 2018-11-26  Sandra Loosemore  <sandra@codesourcery.com>
671         PR c/57182
672         * doc/invoke.texi (Optimize Options): Document that
673         -freorder-functions also uses "hot" and "cold" attributes.
675 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
677         * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
679 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
681         * config/arm/types.md (mul64): Rename to...
682         (widen_mul64): ... This.
683         * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
684         * config/arm/cortex-a15.md: Likewise.
685         * config/arm/cortex-a5.md: Likewise.
686         * config/arm/cortex-a53.md: Likewise.
687         * config/arm/cortex-a57.md: Likewise.
688         * config/arm/cortex-a7.md: Likewise.
689         * config/arm/cortex-m4.md: Likewise.
690         * config/arm/exynos-m1.md: Likewise.
691         * config/arm/marvell-pj4.md: Likewise.
692         * config/arm/xgene1.md: Likewise.
694 2018-11-26  Richard Biener  <rguenther@suse.de>
696         PR tree-optimization/88182
697         * tree-vect-loop.c (vectorizable_reduction): Pick up single
698         correct reduc_def_info.
699         * tree-vect-slp.c (vect_analyze_slp_instance): Set
700         STMT_VINFO_REDUC_DEF of the first stmt.
702 2018-11-26  Andreas Krebbel  <krebbel@linux.ibm.com>
704         * doc/invoke.texi: Document z14/arch12 -march option.
706 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
708         PR c/57166
709         * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
710         (Warning Options): Likewise.
712 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
714         PR web/79738
715         * doc/extend.texi (Common Function Attributes): Clarify that
716         functions with "const" attribute can read const global variables.
718 2018-11-26  Alan Modra  <amodra@gmail.com>
720         * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
722 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
724         PR other/54265
725         * doc/extend.texi (Common Variable Attributes): Use preferred
726         placement of type attributes in examples, plus whitespace fixes.
727         (Type Attributes): Clarify why placement of attributes
728         immediately after struct/union/enum keyword is preferred.
729         (Common Type Attributes): Use preferred placement of type
730         attributes in examples, plus more whitespace fixes.
732 2018-11-25  Paul Koning  <ni1d@arrl.net>
734         * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
736 2018-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
738         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
739         attributes): Document d_runtime.
741 2018-11-25  Vladimir Makarov  <vmakarov@redhat.com>
743         PR bootstrap/88157
744         * ira-costs.c (record_operand_costs): Initiate register move cost
745         for mode.
747 2018-11-23  Jeff Law  <law@redhat.com>
749         PR rtl-optimization/87468
750         * tree-ssa-threadupdate.c (create_block_for_threading): Clear
751         EDGE_IGNORE on all outgoing edges of the duplicate block.
753 2018-11-23  Vladimir Makarov  <vmakarov@redhat.com>
755         PR bootstrap/88157
756         * ira-costs.c (record_operand_costs): Use bigger hard reg class if
757         its mode does not fit to the original class.
759 2018-11-23  Martin Sebor  <msebor@redhat.com>
761         PR tree-optimization/87756
762         * expr.c (string_constant): Synthesize a string literal from
763         the address of a constant character.
764         * tree.c (build_string_literal): Add an argument.
765         * tree.h (build_string_literal): Same.
767 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
769         * config/aarch64/aarch64-cores.def: Define emag.
770         * config/aarch64/aarch64-tune.md: Regenerated with emag.
771         * config/aarch64/aarch64.c (emag_tunings): New struct.
772         * doc/invoke.texi: Document mtune value.
774 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
775             Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
777         * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
778         for GCC 9.
779         * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
780         prefetch tunings.
781         * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
782         costs.
783         * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
784         for XGene1.
786 2018-11-23  Richard Biener  <rguenther@suse.de>
788         PR tree-optimization/88149
789         * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
790         the case where there are two different def types for the
791         same operand at different operand position in the same stmt.
793 2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
795         * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
796         gen_atomic_compare_swap_1.
797         (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
798         (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
799         (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
800         (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
801         (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
802         checks.
803         * config/arm/arm.md (neon_vext<mode>),
804         (neon_vrev64<mode>, neon_vrev32<mode>),
805         (neon_vrev16<mode>, neon_vtrn<mode>_internal),
806         (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
807         before the pattern name.
808         * config/arm/sync.md:
809         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
810         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
812 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
814         PR tree-optimization/86614
815         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
816         if TREE_NO_WARNING is set on ref.ref.
818 2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
819             Alan Coopersmith  <alan.coopersmith@oracle.com>
821         PR c/53608
822         * doc/extend.texi (Designated Inits): Clarify handling of multiple
823         initializers for unions.
825 2018-11-22  Jan Hubicka  <jh@suse.cz>
827         PR lto/88142
828         * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
829         parameters; do not warn here.
830         (odr_subtypes_equivalent_p): Likewise.
831         (warn_odr): Fix typo.
832         (warn_types_mismatch): Do not output confused warnings on integer types.
833         (odr_types_equivalent_p): Update.
835 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
837         * config/i386/i386.c (ix86_option_override_internal,
838         ix86_can_inline_p, classify_argument, construct_container,
839         ix86_expand_prologue, ix86_expand_split_stack_prologue,
840         ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
841         expand_setmem_epilogue_via_loop, promote_duplicated_reg,
842         ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
843         Formatting fixes.
845         * config/i386/i386.c (ix86_option_override_internal): For
846         stack_protector_guard related options, use opts_set->x_ instead
847         of global_options_set. and prefix options with opts->x_ .  Move
848         defaults for offset and reg into else block.
850 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
852         * config/i386/i386.c (ix86_check_avx_upper_register):
853         Return true for all SSE registers with mode bitsize > 128.
855 2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
857         PR rtl-optimization/87718
858         * ira-costs.c: Remove trailing white-spaces.
859         (record_operand_costs): Add a special treatment for moves
860         involving a hard register.
862 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
864         * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
865         (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
867 2018-11-22  Martin Liska  <mliska@suse.cz>
869         * common/config/i386/i386-common.c (processor_names): Add
870         static assert and add missing "znver2".
871         (ix86_get_valid_option_values): Add checking assert for null
872         values and add "native" value if feasible.
873         * config/i386/i386.h: Do not declare size of processor_names.
874         * common/config/i386/i386-common.c:
875         * config/i386/i386.c: Add static assert for size
876         of processor_cost_table.
878 2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
880         * target-insns.def (stack_protect_combined_set): Define new standard
881         pattern name.
882         (stack_protect_combined_test): Likewise.
883         * cfgexpand.c (stack_protect_prologue): Try new
884         stack_protect_combined_set pattern first.
885         * function.c (stack_protect_epilogue): Try new
886         stack_protect_combined_test pattern first.
887         * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
888         parameters to control which register to use as PIC register and force
889         reloading PIC register respectively.  Insert in the stream of insns if
890         possible.
891         (legitimize_pic_address): Expose above new parameters in prototype and
892         adapt recursive calls accordingly.  Use pic_reg if non null instead of
893         cached one.
894         (arm_load_pic_register): Add pic_reg parameter and use it if non null.
895         (arm_legitimize_address): Adapt to new legitimize_pic_address
896         prototype.
897         (thumb_legitimize_address): Likewise.
898         (arm_emit_call_insn): Adapt to require_pic_register prototype change.
899         (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
900         (thumb1_expand_prologue): Likewise.
901         * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
902         change.
903         (arm_load_pic_register): Likewise.
904         * config/arm/predicated.md (guard_addr_operand): New predicate.
905         (guard_operand): New predicate.
906         * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
907         prototype change.
908         (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
909         prototype change.
910         (stack_protect_combined_set): New expander..
911         (stack_protect_combined_set_insn): New insn_and_split pattern.
912         (stack_protect_set_insn): New insn pattern.
913         (stack_protect_combined_test): New expander.
914         (stack_protect_combined_test_insn): New insn_and_split pattern.
915         (arm_stack_protect_test_insn): New insn pattern.
916         * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
917         * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
918         (UNSPEC_SP_TEST): Likewise.
919         * doc/md.texi (stack_protect_combined_set): Document new standard
920         pattern name.
921         (stack_protect_set): Clarify that the operand for guard's address is
922         legal.
923         (stack_protect_combined_test): Document new standard pattern name.
924         (stack_protect_test): Clarify that the operand for guard's address is
925         legal.
927 2018-11-22  Richard Biener  <rguenther@suse.de>
929         PR tree-optimization/88148
930         * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
931         valueization callback parameter and handle it.
932         * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
933         * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
935 2018-11-22  Richard Biener  <rguenther@suse.de>
937         PR lto/87229
938         PR lto/88112
939         * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
940         which can appear in size expressions.
941         * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
942         CALL_EXPR_BY_DESCRIPTOR.
943         (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
944         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
945         CALL_EXPR_BY_DESCRIPTOR.
946         (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
948         Revert
949         PR lto/87229
950         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
951         sizepos values.
953 2018-11-22  Richard Biener  <rguenther@suse.de>
955         PR tree-optimization/88069
956         * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
957         apply to default defs.
959 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
961         PR target/85644
962         PR target/86832
963         * config/i386/i386.c (ix86_option_override_internal): Default
964         ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
965         is defined.
966         * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
967         stack_protect_test, stack_protect_test_<mode>): Use empty condition
968         instead of TARGET_SSP_TLS_GUARD.
970 2018-11-22  Martin Liska  <mliska@suse.cz>
972         PR sanitizer/88017
973         * config/i386/i386.c (ix86_option_override_internal): Error
974         about usage -mabi=ms and -fsanitize=thread.
976 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
978         Revert the revert:
979         2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
981         Revert:
982         2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
984         * lra-spills.c (lra_final_code_change): Remove useless move insns.
986 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
988         PR middle-end/88129
989         * function.c (expand_function_end): Do not emit extra blockage insn.
991 2018-11-21  Lokesh Janghel  <lokeshjanghel91@gmail.com>
993         PR target/85667
994         * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
995         of FIRST_SSE_REG for 4 or 8 byte modes.
997 2018-11-21  Jan Hubicka  <jh@suse.cz>
999         PR lto/87957
1000         * tree.c (fld_decl_context): Break out from ...
1001         (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1002         DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1003         (fld_incomplete_type_of): Build copy of TYP_DECL.
1004         * ipa-devirt.c (free_enum_values): Rename to ...
1005         (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1006         and TREE_TYPEs of TYPE_DECLs.
1007         (get_odr_type): Initialize odr_vtable_hash if needed.
1009 2018-11-21  Alexandre Oliva <oliva@adacore.com>
1011         * final.c (compute_discriminator): Declare.  Renamed from...
1012         (maybe_set_discriminator): ... this.  Set and return a local.
1013         (override_discriminator): New.
1014         (final_scan_insn_1): Set it.
1015         (notice_source_line): Adjust.  Always set discriminator.
1017 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1019         PR target/87839
1020         * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1021         rIJ constraint for aarch64_plus_operand rather than rn.
1023 2018-11-21  Renlin Li  <renlin.li@arm.com>
1025         PR middle-end/84877
1026         * explow.h (get_dynamic_stack_size): Declare it as external.
1027         * explow.c (record_new_stack_level): Remove function static attribute.
1028         * function.c (assign_stack_local_1): Dynamically align the stack slot
1029         addr for parameter copy on the stack.
1031 2018-11-21  Richard Biener  <rguenther@suse.de>
1033         PR bootstrap/88133
1034         * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1035         * Makefile.in (bitmap.o-warn): Remove again.
1037 2018-11-20  Jeff Law  <law@redhat.com>
1039         PR tree-optimization/88069
1040         * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1041         degenerate virtual PHIs.
1043 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1045         PR target/87317
1046         * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1047         nonimmediate_operand with register_operand.
1048         (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1049         (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1050         (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1051         (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1052         (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1053         (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1054         (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1055         (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1056         (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1057         (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1058         (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1059         (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1060         (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1061         (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1062         (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1063         (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1064         (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1065         (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1066         (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1067         (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1068         (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1069         (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1070         (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1071         (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1072         (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1073         (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1074         (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1076 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
1078         * read-rtl.c (apply_subst_iterator): Handle define_split and
1079         define_insn_and_split.
1081 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
1083         PR rtl-optimization/87817
1084         * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1085         *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1086         in the pattern to avoid triggering UB when operands[2] is zero.
1087         (tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
1088         (*tbm_bextri_<mode>): ... this.
1090 2018-11-21  Tom de Vries  <tdevries@suse.de>
1092         PR driver/79855
1093         * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1094         period.
1096 2018-11-21  Andreas Krebbel  <krebbel@linux.ibm.com>
1098         * configure.ac: Add check for Binutils to determine whether vector
1099         load/store alignments hints are being supported.
1100         * config.in: Regenerate.
1101         * configure: Regenerate.
1102         * config/s390/s390.c (print_operand): Support new output
1103         modifier A.
1104         * config/s390/s390.md ("movti"): Append alignment hint output
1105         using the new output modifier 'A'.
1106         * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1107         ("*vec_ti_to_v1ti"): Likewise.
1109 2018-11-20  Martin Sebor  <msebor@redhat.com>
1111         * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1113 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1115         PR lto/84044
1116         * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1117         compare ENUM values.
1119 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
1121         PR tree-optimization/87895
1122         * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1123         or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1124         (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1125         redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1126         has any preds and always use EDGE_PRED (, 0).
1128 2018-11-20  Uros Bizjak  <ubizjak@gmail.com>
1130         PR target/88070
1131         * mode-switching.c (create_pre_exit): After reload, always split the
1132         fallthrough edge to the exit block.
1134 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1136         * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1137         * tree.c (build_array_type_1): Forward declare.
1138         (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1139         (fld_type_variant): Likewise.
1140         (fld_simplified_types): New hash.
1141         (fld_process_array_type): New function.
1142         (fld_incomplete_type_of): Handle array and enumeration types.
1143         (fld_simplified_type): Handle simplification of arrays.
1144         (free_lang_data): Allocate and free simplified types hash.
1146 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1148         PR lto/87957
1149         * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1150         when sybtype already violates ODR.
1151         (get_odr_type): Do not ICE when insert is false and type duplicate
1152         is not registered yet.
1153         (register_odr_type): Be sure to register subtypes first.
1155 2018-11-20  Andreas Krebbel  <krebbel@linux.ibm.com>
1157         * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1158         DImode parts of the target operand.
1160 2018-11-20  Nathan Sidwell  <nathan@acm.org>
1162         PR 87926
1163         * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1165 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1167         PR lto/87997
1168         * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1169         type checking to...
1170         (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1172 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
1174         PR ipa/87706
1175         * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1176         * ipa.c (possible_inline_candidate_p): Break out from ..
1177         (process_references): ... here ; drop before_inlining_p;
1178         cleanup handling of alises.
1179         (walk_polymorphic_call_targets): Likewise.
1180         (symbol_table::remove_unreachable_nodes): Likewise.
1181         * passes.c (pass_data_ipa_remove_symbols): New structure.
1182         (pass_ipa_remove_symbols): New pass.
1183         (make_pass_ipa_remove_symbols): New function.
1184         * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1185         * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1187 2018-11-20  Richard Biener  <rguenther@suse.de>
1189         * tree-vect-stmts.c (vectorizable_condition): Do not get
1190         at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
1191         pointless vect_is_simple_use calls.
1193 2018-11-20  Richard Biener  <rguenther@suse.de>
1195         PR tree-optimization/88074
1196         * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1197         backedges.
1199 2018-11-20  Richard Biener  <rguenther@suse.de>
1201         PR tree-optimization/88069
1202         * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1203         virtual PHI arguments.
1205 2018-11-20  Ilya Leoshkevich  <iii@linux.ibm.com>
1207         PR target/88083
1208         * config/s390/s390.md: Skip LT(G) peephole when literal pool is
1209         involved.
1210         * rtl.h (contains_constant_pool_address_p): New function.
1211         * rtlanal.c (contains_constant_pool_address_p): Likewise.
1213 2018-11-20  Richard Biener  <rguenther@suse.de>
1215         PR middle-end/83215
1216         * alias.c (component_uses_parent_alias_set_from): Remove
1217         alias-set zero and TYPE_TYPELESS_STORAGE case both already
1218         handled in other ways.
1220 2018-11-20  Richard Biener  <rguenther@suse.de>
1222         PR tree-optimization/88087
1223         * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
1224         call fntype.
1225         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
1226         call fntype.
1228 2018-11-20  Richard Biener  <rguenther@suse.de>
1230         PR middle-end/88089
1231         * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
1233 2018-11-19  Jan Hubicka  <hubicka@ucw.cz>
1235         PR lto/87957
1236         * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
1238 2018-11-19  Sandra Loosemore  <sandra@codesourcery.com>
1240         PR driver/50250
1241         * doc/invoke.texi (Link Options): Mention shared libraries
1242         in documentation for the -l option.  Simplify discussion and
1243         point to the system linker documentation for details.
1245 2018-11-19  Peter Bergner  <bergner@linux.ibm.com>
1247         PR rtl-optimization/88033
1248         * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
1249         to itself.  Use HARD_REGISTER_NUM_P.
1251 2018-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1253         * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
1254         of the loop if vf is non-constant.
1256 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
1258         PR tree-optimization/87025
1259         * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
1260         immediately after creating the scope optinfo.
1261         (selftest::test_pr87025): New function.
1262         (selftest::dumpfile_c_tests): Call it.
1263         * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
1264         that we're not popping the top-level records array.
1265         * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
1266         not changing the kind of a "scope" optinfo.
1268 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
1270         PR tree-optimization/87025
1271         * dump-context.h: Include "optinfo.h".
1272         (class optrecord_json_writer): New forward decl.
1273         (dump_context::forcibly_enable_optinfo_p): Delete.
1274         (dump_context::optinfo_enabled_p): New member function.
1275         (dump_context::optimization_records_enabled_p): New member
1276         function.
1277         (dump_context::set_json_writer): New member function.
1278         (dump_context::emit_optinfo): New member function.
1279         (dump_context::m_forcibly_enable_optinfo): Delete.
1280         (dump_context::m_json_writer): New member data.
1281         * dumpfile.c (dump_context::set_json_writer): New member function.
1282         (dump_context::finish_any_json_writer): New member function.
1283         (dump_context::end_scope): Replace call to
1284         optimization_records_maybe_pop_dump_scope with call to
1285         m_json_writer->pop_scope.
1286         (dump_context::optinfo_enabled_p): New member function.
1287         (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
1288         to dump_context::emit_optinfo.
1289         (dump_context::emit_optinfo): New member function.
1290         (temp_dump_context::temp_dump_context): Replace
1291         m_forcibly_enable_optinfo with call to set_json_writer.
1292         (temp_dump_context::~temp_dump_context): Clean up any json writer.
1293         * optinfo-emit-json.cc (class optrecord_json_writer): Move to
1294         optinfo-emit-json.h
1295         (the_json_writer): Delete.
1296         (optimization_records_start): Delete.
1297         (optimization_records_finish): Delete.
1298         (optimization_records_enabled_p): Delete, in favor of
1299         dump_context::optimization_records_enabled_p.
1300         (optimization_records_maybe_record_optinfo): Delete.
1301         (optimization_records_maybe_pop_dump_scope): Delete.
1302         * optinfo-emit-json.h: Include "json.h".  Delete forward
1303         decl of opt_pass.
1304         (optimization_records_start): Delete.
1305         (optimization_records_finish): Delete.
1306         (optimization_records_enabled_p): Delete.
1307         (optimization_records_maybe_record_optinfo): Delete.
1308         (optimization_records_maybe_pop_dump_scope): Delete.
1309         (class optrecord_json_writer): Move here from
1310         optinfo-emit-json.cc.
1311         * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
1312         to optinfo::emit with call to dump_context::emit_optinfo.
1313         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1314         (optinfo_enabled_p): Delete, in favor of
1315         dump_context::optinfo_enabled_p.
1316         (optinfo_wants_inlining_info_p): Update for conversion o
1317         optimization_records_enabled_p to a member function of
1318         dump_context.
1319         * optinfo.h (optinfo_enabled_p): Delete, in favor of
1320         dump_context::optinfo_enabled_p.
1321         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1322         * toplev.c: Include "dump-context.h".
1323         (compile_file): Replace call to optimization_records_finish with
1324         dump_context::finish_any_json_writer.
1325         (do_compile): Replace call to optimization_records_start with
1326         conditionally creating a optrecord_json_writer for the
1327         dump_context.
1329 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
1331         PR tree-optimization/88071
1332         * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
1333         of false as last argument to gsi_remove.
1334         * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
1335         false as last argument to gsi_replace.
1337         PR debug/87039
1338         * omp-expand.c: Don't include debug.h.
1339         (adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
1340         from innermost outer parallel, task, teams or target that has a
1341         child_fn set, or, if there is no such outer region, use
1342         current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
1343         whether a suitable BLOCK is found or not.
1344         (expand_parallel_call, expand_teams_call): Don't call
1345         adjust_context_and_scope here.
1346         (grid_expand_target_grid_body): Revert 2017-01-25 changes.
1347         (expand_omp_taskreg, expand_omp_target): Likewise.  Call
1348         adjust_context_and_scope.
1349         * dwarf2out.c (dwarf2out_early_global_decl): For
1350         decl_function_context recurse instead of calling dwarf2out_decl.
1352 2018-11-20  Eric Botcazou  <ebotcazou@adacore.com>
1354         PR rtl-optimization/85925
1355         * rtl.h (word_register_operation_p): New predicate.
1356         * combine.c (record_dead_and_set_regs_1): Only apply specific handling
1357         for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
1358         * rtlanal.c (nonzero_bits1): Likewise.  Adjust couple of comments.
1359         (num_sign_bit_copies1): Likewise.
1361 2018-11-19  Richard Biener  <rguenther@suse.de>
1363         PR lto/87229
1364         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1365         sizepos values.
1367 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
1369         * compare-elim.c (struct comparison): Add not_in_a field.
1370         (is_not): New static function.
1371         (strip_not): Likewise.
1372         (conforming_compare): Handle a NOT in the first operand.
1373         (can_eliminate_compare): Likewise.
1374         (find_comparison_dom_walker::before_dom_children): Likewise.
1375         (try_eliminate_compare): Likewise.
1376         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
1377         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
1379 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
1381         * doc/extend.texi (Common Type Attributes): Fix typos.
1383 2018-11-19  Martin Liska  <mliska@suse.cz>
1385         PR gcov-profile/88045
1386         * coverage.c (coverage_begin_function): Add assert.
1388 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
1390         PR other/40498
1391         * doc/extend.texi (Common Function Attributes): Document that
1392         no_instrument_function applies to -p and -pg, too.
1393         * doc/invoke.texi (Instrumentation Options): Add cross-references
1394         to docs for -p, -pg, and -finstrument-functions.
1396 2018-11-18  Alan Modra  <amodra@gmail.com>
1398         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
1399         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
1400         (GNU_USER_TARGET_CRTN): Define.
1401         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
1402         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
1404 2018-11-18  Alan Modra  <amodra@gmail.com>
1406         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
1407         !HAVE_LD_PIE variant.
1408         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
1410 2018-11-17  Nick Clifton  <nickc@redhat.com>
1411             Sandra Loosemore  <sandra@codesourcery.com>
1413         PR driver/31357
1414         * doc/invoke.texi (Overall Options): Document that --help and
1415         --help=<value> options cannot be combined.
1417 2018-11-17  Jim Wilson  <jimw@sifive.com>
1419         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
1420         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
1421         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
1422         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
1423         to step2 if frame_pointer_needed and step1 is 0.
1425 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
1427         PR c++/4225
1428         * doc/cpp.texi (System Headers): Add note about implicit
1429         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
1431 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
1433         PR c++/4025
1434         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
1435         -fno-implicit-templates.
1437 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
1439         PR tree-optimization/87546
1440         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
1441         min_precision variable, initially set it to orig_precision, only does
1442         something if op_type's precision is <= min_precision and update
1443         min_precision whenever calling set_op.
1445 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
1447         PR ipa/87957
1448         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
1450 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
1452         * doc/invoke.texi (Option Summary): Fix whitespace and line
1453         breaks in @gccoptlist environments.
1454         (Warning Options): Likewise.
1455         (Optimize Options): Likewise.
1456         (PowerPC SPE Options): Likewise.
1457         (RS/6000 and PowerPC Options): Likewise.
1459 2018-11-16  Jeff Law  <law@redhat.com>
1461         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
1462         gcc_assert.
1464 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
1466         PR middle-end/23197
1467         * doc/invoke.texi (Optimize Options): Update options enabled by
1468         fprofile-generate, -fprofile-use, and -fauto-profile.
1470 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1472         PR target/87927
1473         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
1474         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
1475         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
1476         the byte_op hook.
1477         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
1478         * targhooks.c (default_print_patchable_function_entry): Assert
1479         asm_int_op does not return a NULL string.
1480         * varasm.c (integer_asm_op): Return the op for a partial int type
1481         when the requested size does not correspond to an integer type.
1482         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
1483         * doc/tm.texi: Regenerate.
1485 2018-11-12  Jason Merrill  <jason@redhat.com>
1487         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
1489 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
1491         * config/rs6000/constraints.md (wF constraint): Remove power9
1492         fusion documentation.  Just document wF's use for power8 fusion.
1493         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
1494         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
1495         fusion support to require the upper 12 bits to be all 0's or all
1496         1's.
1497         (fusion_gpr_mem_load): Add comment.
1498         (fusion_addis_mem_combo_load): Remove power9 fusion support.
1499         (fusion_addis_mem_combo_store): Delete.
1500         (fusion_offsettable_mem_operand): Delete.
1501         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
1502         power8 fusion here.
1503         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
1504         (POWERPC_MASKS): Delete power9 fusion.
1505         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
1506         (fusion_p9_p): Delete.
1507         (expand_fusion_p9_load): Delete.
1508         (expand_fusion_p9_store): Delete.
1509         (emit_fusion_p9_load): Delete.
1510         (emit_fusion_p9_store): Delete.
1511         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
1512         fusion support.
1513         (rs6000_option_override_internal): Set power8 fusion based on
1514         whether we are tuning for power8.  Delete power9 fusion support.
1515         (rs6000_opt_masks): Delete -mpower9-fusion switch.
1516         (emit_fusion_load): Rename emit_fusion_load_store to
1517         emit_fusion_load, and drop fusion store support.  Update callers.
1518         (emit_fusion_load_store): Likewise.
1519         (emit_fusion_gpr_load): Likewise.
1520         (fusion_p9_p): Delete.
1521         (expand_fusion_p9_load): Delete.
1522         (expand_fusion_p9_store): Delete.
1523         (emit_fusion_p9_load): Delete.
1524         (emit_fusion_p9_store): Delete.
1525         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
1526         (GPR_FUSION): Delete.
1527         (FPR_FUSION): Delete.
1528         (power9 fusion peephole2s): Delete.
1529         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
1530         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
1531         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
1532         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
1533         (fusion_p9_<mode>_constant): Delete.
1534         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
1535         power9 fusion switch.
1536         * doc/md.texi (PowerPC constraints): Update wF constraint
1537         documentation for power8 fusion only.
1539 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
1541         PR rtl-optimization/87475
1542         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
1543         CROSSING_JUMP_P insns.
1544         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
1546 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
1548         PR target/88051
1549         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
1550         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
1551         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
1553 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
1555         PR middle-end/88032
1556         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
1557         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
1559 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
1561         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
1562         location_t parameter.
1563         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1564         (switch_decision_tree::do_jump_if_equal): Likewise.
1565         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
1566         of switch statement to emit_case_nodes.
1567         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
1568         set it on the newly built GIMPLE comparison statement.
1569         (switch_decision_tree::do_jump_if_equal): Likewise.
1570         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
1571         in calls to do_jump_if_equal as well as recursive calls.
1573 2018-11-16  Andi Kleen  <ak@linux.intel.com>
1575         * config/i386/i386.md: Allow memory operands to ptwrite.
1577 2018-11-16  Michael Matz  <matz@suse.de>
1579         * system.h (PRsa): New macro.
1580         (SIZE_AMOUNT): Cast number to uint64_t.
1581         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
1582         (pool_usage::dump_footer): Likewise and also use PRIu64.
1583         * bitmap.h (bitmap_usage::dump): Likewise.
1584         * ggc-common.c (ggc_usage::dump): Likewise.
1585         * ggc-page.c (ggc_print_statistics): Likewise.
1586         * input.c (dump_line_table_statistics): Likewise.
1587         * mem-stats.h (mem_usage::dump): Likewise.
1588         (mem_usage::dump_footer): Likewise.
1589         * rtl.c (dump_rtx_statistics): Likewise.
1590         * tree-cfg.c (dump_cfg_stats): Likewise.
1591         * tree-dfa.c (dump_dfa_stats): Likewise.
1592         * tree-phinodes.c (phinodes_print_statistics): Likewise.
1593         * tree-ssanames (ssanames_print_statistics): Likewise.
1594         * vec.c (vec_usage::dump): Likewise.
1595         (vec_usage::dump_footer): Likewise.
1597 2018-11-16  Richard Biener  <rguenther@suse.de>
1599         PR tree-optimization/88011
1600         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
1601         replacing set_value_range_to_undefined and
1602         set_value_range_to_varying with method calls.
1604 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1606         * config/s390/s390.md
1607         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
1608         assembler.
1609         (*r<noxa>sbg_<mode>_sll): Likewise.
1610         (*r<noxa>sbg_<mode>_srl): Likewise.
1611         (*r<noxa>sbg_sidi_srl): New pattern.
1613 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
1615         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
1616         Default to TARGET_VXWORKS_RTP.
1617         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1618         of TARGET_VXWORKS_RTP.
1619         * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
1620         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1621         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
1623 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
1625         PR c++/25759
1626         * doc/extend.texi (Common Type Attributes): Make it explicit
1627         that attribute "packed" can apply to C++ classes.
1629 2018-11-15  Martin Sebor  <msebor@redhat.com>
1631         PR c++/87541
1632         PR c++/87542
1633         * tree.c (type_argument_type): New function.
1634         * tree.h (type_argument_type): Declare it.
1635         * gcc/doc/extend.texi (alloc_align): Update and clarify.
1636         (alloc_size, nonnull, sentinel): Same.
1638 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
1639             Kwok Cheung Yeung  <kcy@codesourcery.com>
1641         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
1642         int_mode_for_size fails.
1643         (vectorizable_load): Likewise.
1645 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1647         * doc/ux.texi (Group logically-related diagnostics): Move
1648         discussion of auto_diagnostic_group into this new subsection.
1649         Give an example of where this grouping is used.
1651 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1653         PR other/19165
1654         * Makefile.in (OBJS): Move json.o to...
1655         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
1656         * common.opt (fdiagnostics-format=): New option.
1657         (diagnostics_output_format): New enum.
1658         * diagnostic-format-json.cc: New file.
1659         * diagnostic.c (default_diagnostic_final_cb): New function, taken
1660         from start of diagnostic_finish.
1661         (diagnostic_initialize): Initialize final_cb to
1662         default_diagnostic_final_cb.
1663         (diagnostic_finish): Move "being treated as errors" messages to
1664         default_diagnostic_final_cb.  Call any final_cb.
1665         (default_diagnostic_finalizer): Add diagnostic_t param.
1666         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
1667         diagnostic_finalizer callback.
1668         * diagnostic.h (enum diagnostics_output_format): New enum.
1669         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
1670         (struct diagnostic_context): Add "final_cb".
1671         (default_diagnostic_finalizer): Add diagnostic_t param.
1672         (diagnostic_output_format_init): New decl.
1673         * doc/invoke.texi (-fdiagnostics-format): New option.
1674         * dwarf2out.c (gen_producer_string): Ignore
1675         OPT_fdiagnostics_format_.
1676         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
1677         * lto-wrapper.c (append_diag_options): Ignore it.
1678         * opts.c (common_handle_option): Handle it.
1680 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1682         PR tree-optimization/88015
1683         * graphite-isl-ast-to-gimple.c
1684         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
1685         for dump_enabled_p.
1686         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
1688 2018-11-15  Richard Biener  <rguenther@suse.de>
1690         PR middle-end/88029
1691         * gimple.c (gimple_call_flags): Union flags from decl, type
1692         and call fntype.
1693         * trans-mem.c (is_tm_pure_call): Simplify.
1695 2018-11-15  Richard Biener  <rguenther@suse.de>
1697         PR tree-optimization/88031
1698         * tree-vect-loop.c (vectorizable_reduction): Move check
1699         for multiple types earlier so we get the expected dump.
1700         Simplify calls to vectorizable_condition.
1701         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
1702         * tree-vect-stmts.c (vectorizable_condition): Instead of
1703         reduc_def and reduc_index take just a flag.  Simplify
1704         code-generation now that we can rely on the defs being set up.
1705         (vectorizable_comparison): Remove unused argument.
1707 2018-11-15  Richard Biener  <rguenther@suse.de>
1709         PR tree-optimization/88030
1710         * tree-complex.c (need_eh_cleanup): New global.
1711         (update_complex_assignment): Mark blocks that need EH update.
1712         (expand_complex_comparison): Likewise.
1713         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1714         perform EH cleanup and schedule CFG cleanup if that did anything.
1716 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
1718         PR rtl-optimization/88018
1719         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1720         on the presence of fallthru edge, rather than if it is a USE or not.
1722 2018-11-15  Richard Biener  <rguenther@suse.de>
1724         PR middle-end/87917
1725         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
1726         analyze_subscript_affine_affine properly.
1728 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1730         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
1731         (GLIBC_DYNAMIC_LINKER): Define.
1732         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
1734 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
1736         PR tree-optimization/84648
1737         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
1738         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
1739         by calling adjust_cond_for_loop_until_wrap.
1741 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
1743         PR other/56334
1744         * doc/extend.texi (Common Function Attributes): Clarify linker
1745         restrictions on "aligned" attribute.
1746         (Common Variable Attributes): Likewise.  Mention that linker
1747         restrictions don't apply to stack-allocated variables.
1749 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1751         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
1752         as an lvalue.
1754 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
1756         PR lto/55102
1757         PR lto/56700
1758         * doc/invoke.texi (Optimize Options): Remove bad example about
1759         interaction between -flto and -O.  Replace it with a note that
1760         you need to compile with -O and not just link.  Copy-edit -flto
1761         discussion to reduce verbiage and improve flow.
1763 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
1765         PR middle-end/59658
1766         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
1767         also suppress many optimizations.  Alphabetize option lists for
1768         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
1769         correct documentation for those options to say that.
1770         * opts.c (default_options_table): Sort table by level and option
1771         name, to make it easier to correlate to the manual.
1773 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
1775         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
1776         printing of the names of segment registers.
1778 2018-11-14  Nathan Sidwell  <nathan@acm.org>
1780         PR debug/88006
1781         PR debug/87462
1782         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1783         type list.
1785 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
1787         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1789 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1791         P1236R1 - Signed integers are two's complement
1792         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1794         PR bootstrap/86739
1795         * hash-map.h (hash_map::iterator::reference_pair): New class.
1796         (hash_map::iterator::operator*): Return it rather than std::pair.
1798 2018-11-14  Jeff Law  <law@redhat.com>
1800         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1801         iff the operand is a constant.
1803 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
1805         * gimple-ssa-evrp-analyze.c
1806         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1807         ignore_equivs_equal_p to equal_p.
1808         * ipa-cp.c (meet_with_1): Use equal_p instead of
1809         ignore_equivs_equal_p.
1810         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1811         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1812         (value_range::operator==): Remove.
1813         (value_range::operator!=): Remove.
1814         (vrp_prop::visit_stmt): Use equal_p.
1815         * tree-vrp.h (value_range): Remove operator==, operator!=,
1816         ignore_equivs_equal_p.
1817         * vr-values.c (update_value_range): Use equal_p.
1819 2018-11-14  Michael Matz  <matz@suse.de>
1821         PR middle-end/86575
1822         * gimplify.c (collect_fallthrough_labels): Add new argument,
1823         return location via that, don't modify statements.
1824         (warn_implicit_fallthrough_r): Adjust call, don't use
1825         statement location directly.
1827 2018-11-14  Richard Biener  <rguenther@suse.de>
1829         PR middle-end/87985
1830         * tree-data-ref.c (split_constant_offset): Add wrapper
1831         allocating a cache hash-map.
1832         (split_constant_offset_1): Cache results of expanding
1833         expressions from SSA def stmts.
1835 2018-11-14  Richard Biener  <rguenther@suse.de>
1837         PR middle-end/88021
1838         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1839         to lambda_int.
1840         (lambda_vector_mult_const): Likewise.
1841         (lambda_matrix_right_hermite): Use lambda_int temporaries.
1843 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
1844             Jackson Woodruff  <jackson.woodruff@arm.com>
1846         PR 71026/tree-optimization
1847         * match.pd: Simplify floating point comparisons.
1849 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1851         PR rtl-optimization/87817
1852         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1853         last argument has low 8 bits clear, fold to 0.
1855 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
1857         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1858         MAX_OFILE_ALIGNMENT as needed.
1860 2018-11-14  Richard Biener  <rguenther@suse.de>
1862         PR tree-optimization/88019
1863         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1864         COND_EXPR arguments to non-trapping overflow.
1866 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
1868         * config/arc/arc.h (reg_class): Reorder registers classes, remove
1869         unused register classes.
1870         (REG_CLASS_NAMES): Likewise.
1871         (REG_CLASS_CONTENTS): Likewise.
1872         (FIXED_REGISTERS): Make lp_count fixed.
1873         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1874         (PROGRAM_COUNTER_REGNO): Remove.
1875         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
1876         register classes, use constants for register numbers, remove
1877         reg_class_contents references.
1878         (arc_process_double_reg_moves): Add asserts.
1879         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
1880         lra_in_progress predicate.
1881         (arc_init_reg_tables): Remove unused register classes.
1882         (arc_register_move_cost): Likewise.
1883         (arc_preferred_reload_class): Likewise.
1884         (hwloop_optimize): Update rtx patterns involving lp_count register.
1885         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
1886         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
1887         CHEAP_CORE_REGS.  Former one will be used for LRA.
1888         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
1889         one will be used for LRA.
1890         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
1891         one will be used for LRA.
1892         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
1893         Former one will be used for LRA.
1894         ("f"): Delete constraint.
1895         ("k"): Likewise.
1896         ("e"): Likewise.
1897         ("l"): Change it from register constraint to constraint.
1898         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
1899         (movhi_insn): Likewise.
1900         (movsi_insn): Update pattern.
1901         (arc_lp): Likewise.
1902         (dbnz): Likewise.
1903         (stack_tie): Remove 'b' constraint letter.
1904         (R4_REG): Define.
1905         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
1906         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
1907         (R57_REG, R59_REG, PCL_REG): Likewise.
1908         (ILINK1_REGNUM): Renamed to ILINK1_REG.
1909         (ILINK2_REGNUM): Renamed to ILINK2_REG.
1910         (Rgp): Remove.
1911         (SP_REGS): Likewise.
1912         (Rcw): Remove unused reg classes.
1913         * config/arc/predicates.md (dest_reg_operand): Just default on
1914         register_operand predicate.
1915         (mpy_dest_reg_operand): Likewise.
1916         (move_dest_operand): Use macros instead of constants.
1917         * config/arc/arc.opt (mlra): Switch to lra as default.
1919 2018-11-14  Richard Biener  <rguenther@suse.de>
1921         PR tree-optimization/87974
1922         * tree-vect-loop.c (vectorizable_reduction): When computing
1923         the vectorized reduction PHI vector type ignore constant
1924         and external defs.
1926 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1928         PR tree-optimization/87977
1929         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
1930         stmt, build a new one and replace the old one with it.  Formatting fix.
1931         Call release_ssa_name (x) if !has_other_use and !delete_div.
1932         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
1933         verify lhs of stmt is still def.
1935 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
1937         PR rtl-optimization/87507
1938         * lower-subreg.c (operand_for_swap_move_operator): New function.
1939         (simple_move): Strip simple operators.
1940         (find_pseudo_copy): Likewise.
1941         (resolve_operand_for_swap_move_operator): New function.
1942         (resolve_simple_move): Strip simple operators and swap operands.
1944 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
1946         PR tree-optimization/87898
1947         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
1948         (ipa_simd_modify_function_body): Remove debug stmts where the first
1949         argument was changed into a non-decl.
1951 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
1953         PR rtl-optimization/87899
1954         * lra-lives.c (start_living): Update white space in comment.
1955         (enum point_type): New.
1956         (sparseset_contains_pseudos_p): New function.
1957         (update_pseudo_point): Likewise.
1958         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
1959         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
1960         handling.  Move early exit after adding conflicts.
1961         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
1962         if regno is already live.  Remove all handling of program points.
1963         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
1964         after adding conflicts.  Remove all handling of program points and
1965         ignore_reg_for_conflicts.
1966         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
1967         and do not guard call to mark_pseudo_live.
1968         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
1969         and do not guard call to mark_pseudo_dead.
1970         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
1971         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
1972         Use new function update_pseudo_point.  Handle register copies by
1973         removing the source register from the live set.  Handle INOUT operands.
1974         Update to the next program point using the unused_set, dead_set and
1975         start_dying sets.
1976         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
1978 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
1980         * builtins.c: Replace "source_location" with "location_t".
1981         * diagnostic-show-locus.c: Likewise.
1982         * diagnostic.c: Likewise.
1983         * dumpfile.c: Likewise.
1984         * gcc-rich-location.h: Likewise.
1985         * genmatch.c: Likewise.
1986         * gimple.h: Likewise.
1987         * gimplify.c: Likewise.
1988         * input.c: Likewise.
1989         * input.h: Likewise.  Eliminate the typedef.
1990         * omp-expand.c: Likewise.
1991         * selftest.h: Likewise.
1992         * substring-locations.h (get_source_location_for_substring):
1993         Rename to...
1994         (get_location_within_string): ...this.
1995         * tree-cfg.c: Replace "source_location" with "location_t".
1996         * tree-cfgcleanup.c: Likewise.
1997         * tree-diagnostic.c: Likewise.
1998         * tree-into-ssa.c: Likewise.
1999         * tree-outof-ssa.c: Likewise.
2000         * tree-parloops.c: Likewise.
2001         * tree-phinodes.c: Likewise.
2002         * tree-phinodes.h: Likewise.
2003         * tree-ssa-loop-ivopts.c: Likewise.
2004         * tree-ssa-loop-manip.c: Likewise.
2005         * tree-ssa-phiopt.c: Likewise.
2006         * tree-ssa-phiprop.c: Likewise.
2007         * tree-ssa-threadupdate.c: Likewise.
2008         * tree-ssa.c: Likewise.
2009         * tree-ssa.h: Likewise.
2010         * tree-vect-loop-manip.c: Likewise.
2012 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
2014         * doc/extend.texi: Fix typo in the weakref description.
2016 2018-11-13  Richard Biener  <rguenther@suse.de>
2018         PR tree-optimization/86991
2019         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2020         group building until we have successfully detected the SLP
2021         reduction.
2022         (vect_is_simple_reduction): Remove fixup code here.
2024 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2026         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2027         (dump_gimple_stmt): Use it.
2028         (dump_gimple_stmt_loc): Likewise.
2029         (dump_gimple_expr): Likewise.
2030         (dump_gimple_expr_loc): Likewise.
2031         (dump_generic_expr): Likewise.
2032         (dump_generic_expr_loc): Likewise.
2033         (dump_printf): Likewise.
2034         (dump_printf_loc): Likewise.
2035         (dump_dec): Likewise.
2036         (dump_dec): Likewise.
2037         (dump_hex): Likewise.
2038         (dump_symtab_node): Likewise.
2039         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2040         Guard dump call with dump_enabled_p.
2041         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2042         * graphite-optimize-isl.c (optimize_isl): Likewise.
2043         * graphite.c (graphite_transform_loops): Likewise.
2044         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2045         * tree-parloops.c (parallelize_loops): Likewise.
2046         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2047         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2048         (vect_prune_runtime_alias_test_list): Likewise.
2049         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2050         (vect_estimate_min_profitable_iters): Likewise.
2051         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2052         (vect_build_slp_tree_2): Likewise.
2053         (vect_supported_load_permutation_p): Likewise.
2054         (vect_slp_analyze_operations): Likewise.
2055         (vect_slp_analyze_bb_1): Likewise.
2056         (vect_slp_bb): Likewise.
2057         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2058         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2059         (pass_slp_vectorize::execute): Likewise.
2060         (increase_alignment): Likewise.
2062 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2064         PR ipa/87955
2065         * ipa-inline.c (report_inline_failed_reason): Guard calls to
2066         cl_target_option_print_diff and cl_optimization_print_diff with
2067         if (dump_file).
2069 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2071         * doc/invoke.texi (-fsave-optimization-record): Note that the
2072         output is compressed.
2073         * optinfo-emit-json.cc: Include <zlib.h>.
2074         (optrecord_json_writer::write): Compress the output.
2076 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
2078         * tree-vrp.c (value_range_base::dump): Dump type.
2079         Do not use INF nomenclature for 1-bit types.
2080         (dump_value_range): Group all variants to common dumping code.
2081         (debug): New overloaded functions for value_ranges.
2082         (value_range_base::dump): Remove no argument version.
2083         (value_range::dump): Same.
2085 2018-11-13  Richard Biener  <rguenther@suse.de>
2087         PR tree-optimization/87931
2088         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2089         nested cycles we support to latch computations vectorizable_reduction
2090         handles.
2092 2018-11-13  Martin Liska  <mliska@suse.cz>
2094         PR tree-optimization/87885
2095         * cfghooks.c (account_profile_record): Rename
2096         to ...
2097         (profile_record_check_consistency): ... this.
2098         Calculate missing num_mismatched_freq_in.
2099         (profile_record_account_profile): New function
2100         that calculates time and size of a function.
2101         * cfghooks.h (struct profile_record): Remove
2102         all tuples.
2103         (struct cfg_hooks): Remove after_pass flag.
2104         (account_profile_record): Rename to ...
2105         (profile_record_check_consistency): ... this.
2106         (profile_record_account_profile): New.
2107         * cfgrtl.c (rtl_account_profile_record): Remove
2108         after_pass flag.
2109         * passes.c (check_profile_consistency): Do only
2110         checking.
2111         (account_profile): Calculate size and time of
2112         function only.
2113         (pass_manager::dump_profile_report): Reformat
2114         output.
2115         (execute_one_ipa_transform_pass): Call
2116         consistency check before clean upand call account_profile
2117         after a clean up is done.
2118         (execute_one_pass): Call check_profile_consistency and
2119         account_profile instead of using after_pass flag..
2120         * tree-cfg.c (gimple_account_profile_record): Likewise.
2122 2018-11-13  Martin Liska  <mliska@suse.cz>
2124         PR sanitizer/87930
2125         * config/i386/i386.c (ix86_option_override_internal): Error
2126         about usage -mabi=ms and -fsanitize={,kernel-}address.
2128 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2130         * config/aarch64/aarch64.c
2131         (aarch64_vectorize_preferred_vector_alignment): Change return type to
2132         poly_uint64.
2133         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2134         alignment being a poly int.
2135         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2136         return type to poly_uint64.
2137         * target.def (default_preferred_vector_alignment): Likewise.
2138         * targhooks.c (default_preferred_vector_alignment): Likewise.
2139         * targhooks.h (default_preferred_vector_alignment): Likewise.
2140         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2141         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2142         poly int.
2143         (vect_update_misalignment_for_peel): Likewise.
2144         (vect_enhance_data_refs_alignment): Likewise.
2145         (vect_find_same_alignment_drs): Likewise.
2146         (vect_duplicate_ssa_name_ptr_info): Likewise.
2147         (vect_setup_realignment): Likewise.
2148         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2149         poly_uint64.
2150         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2151         mask with a compile time variable vector alignment.
2152         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2153         int.
2154         (vect_do_peeling): Exit early if vector alignment is not constant.
2155         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2156         a poly int.
2157         (vectorizable_store): Likewise.
2158         (vectorizable_load): Likweise.
2159         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2160         poly_uint64.
2161         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2162         poly int.
2163         (vect_can_force_dr_alignment_p): Change alignment parameter type to
2164         poly_uint64.
2166 2018-11-13  Richard Biener  <rguenther@suse.de>
2168         PR tree-optimization/87962
2169         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2170         detect outer reduction for disqualifying in-loop uses.
2172 2018-11-13  Richard Biener  <rguenther@suse.de>
2174         PR tree-optimization/87967
2175         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2176         for constants for the scalar loop.
2178 2018-11-13  Alan Modra  <amodra@gmail.com>
2180         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2181         integer constants when -mcmodel=medium.
2183 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2185         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2186         * config/arc/elf.h (PROFILE_HOOK): Define.
2187         * config/arc/linux.h (PROFILE_HOOK): Likewise.
2189 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2191         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2192         jump table data in the text section.
2194 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2196         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2197         to fit the eh_return pattern.
2198         * config/arc/arc.md (eh_return): Define.
2199         (VUNSPEC_ARC_EH_RETURN): Likewise.
2200         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2201         new implementation.
2202         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2205 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2207         * common/config/arc/arc-common.c (arc_option_optimization_table):
2208         Millicode optimization is default on for size optimizations.
2209         * config/arc/arc-protos.h (arc_check_multi): New function.
2210         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
2211         (ENTER_LEAVE_START_REG): Define.
2212         (ENTER_LEAVE_END_REG): Likewise.
2213         (arc_override_options): Disable millicode when long calls option
2214         is on.
2215         (arc_frame_info): Change it from int to bool.
2216         (arc_compute_frame_size): Clean up.
2217         (arc_save_restore): Remove.
2218         (frame_save_reg): New function.
2219         (frame_restore_reg): Likewise.
2220         (arc_enter_leave_p): Likewise.
2221         (arc_save_callee_saves): Likewise.
2222         (arc_restore_callee_saves): Likewise.
2223         (arc_save_callee_enter): Likewise.
2224         (arc_restore_callee_leave): Likewise.
2225         (arc_save_callee_milli): Likewise.
2226         (arc_restore_callee_milli): Likewise.
2227         (arc_expand_prologue): Reimplement to emit enter/leave
2228         instructions.
2229         (arc_expand_epilogue): Likewise.
2230         (arc_check_multi): New function.
2231         * config/arc/arc.md (push_multi_fp): New pattern.
2232         (push_multi_fp_blink): Likewise.
2233         (pop_multi_fp): Likewise.
2234         (pop_multi_fp_blink): Likewise.
2235         (pop_multi_fp_ret): Likewise.
2236         (pop_multi_fp_blink_ret): Likewise.
2237         * config/arc/arc.opt (mmillicode): Update option.
2238         (mcode-density-frame): New option.
2239         * config/arc/predicates.md (push_multi_operand): New predicate.
2240         (pop_multi_operand): Likewise.
2241         * doc/invoke.texi (ARC): Update ARC options information.
2244 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
2246         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
2247         * config/arc/arc.c (operands_ok_ldd_std): New function.
2248         (mem_ok_for_ldd_std): Likewise.
2249         (gen_operands_ldd_std): Likewise.
2250         * config/arc/arc.md: Add peephole2 rules for std/ldd.
2252 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
2254         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
2255         test on stack_usage_file.
2256         (lang_dependent_init): Do not open the .su file if generating LTO.
2258 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
2260         PR rtl-optimization/87918
2261         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
2262         simplify_gen_relational rather than simplify_gen_binary.
2264 2018-11-13  Richard Biener  <rguenther@suse.de>
2266         * tree-ssanames.h (set_range_info): Use value_range_base.
2267         (get_range_info): Likewise.
2268         * tree-ssanames.c (set_range_info): Likewise.
2269         (get_range_info): Likewise.
2270         * tree-vrp.c (value_range_base::union_helper): Split
2271         out common parts of value_range[_base]::union_.
2272         (value_range_base::union_): Update.
2273         (value_range::union_): Likewise.
2274         (determine_value_range_1): Use value_range_base.
2275         (determine_value_range): Likewise.
2276         * tree-vrp.h (value_range_base::union_helper): Move ...
2277         (value_range::union_helper): ... from here.
2279 2018-11-13  Alan Modra  <amodra@gmail.com>
2281         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
2282         offset for PRE_DEC.
2283         (rs6000_secondary_reload_gpr): Don't call find_replacement.
2285 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
2287         PR middle-end/59634
2288         * doc/invoke.texi (Optimize Options): Clarify that the
2289         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
2290         apply to data cache size.
2292 2018-11-13  Alan Modra  <amodra@gmail.com>
2294         * config/rs6000/predicates.md (logical_const_operand),
2295         (logical_operand): Correct comment.
2296         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
2298 2018-11-13  Alan Modra  <amodra@gmail.com>
2300         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
2302 2018-11-13  Alan Modra  <amodra@gmail.com>
2304         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
2305         description.
2306         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
2307         covered by alternative.
2308         (movcc_internal1): Ignore h for register preference.
2309         (mov<mode>_hardfloat64): Likewise.
2310         (mov<mode>_softfloat): Ignore c, l, h for register preference.
2312 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
2314         PR preprocessor/47823
2315         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
2316         documentation to...
2317         (Pragmas): ...here.
2318         * doc/extend.texi (Pragmas): Note additional pragmas documented
2319         in the CPP manual.
2321 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
2323         PR middle-end/86677
2324         PR middle-end/87528
2325         * tree-scalar-evolution.c (expression_expensive_p): Make
2326         BUILTIN POPCOUNT as expensive when backend does not define it.
2328 2018-11-12  Fredrik Noring  <noring@nocrew.org>
2330         * config.gcc: Update with-llsc defaults for MIPS r5900.
2332 2018-11-12  Martin Liska  <mliska@suse.cz>
2334         PR gcov-profile/87442
2335         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
2336         options.
2337         * doc/invoke.texi: Document them.
2338         * tree-profile.c (parse_profile_filter): New.
2339         (parse_profile_file_filtering): Likewise.
2340         (release_profile_file_filtering): Likewise.
2341         (include_source_file_for_profile): Likewise.
2342         (tree_profiling): Filter source files based on the
2343         newly added options.
2345 2018-11-12  Martin Liska  <mliska@suse.cz>
2347         PR target/87903
2348         * doc/extend.texi: Add missing values for __builtin_cpu_is and
2349         __builtin_cpu_supports for x86 target.
2351 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
2353         PR middle-end/21110
2354         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
2355         have to be Pmode.
2356         (Arithmetic): Likewise for "lo_sum".
2358 2018-11-12  Renlin Li  <renlin.li@arm.com>
2360         PR target/87815
2361         * dse.c (get_stored_val): Add check for compile-time constantness
2362         of gap.
2364 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
2366         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
2367         (ARMv8_5a): New fgroup.
2368         (armv8.5-a): New arch.
2369         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
2370         sb and predres.
2371         * config/arm/arm-tables.opt: Regenerate.
2372         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
2373         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
2374         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
2375         Add matching rules for -march=armv8.5-a and extensions.
2376         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
2377         Add sb and predres to all armv8-a except armv8.5-a.
2379 2018-11-12  Richard Biener  <rguenther@suse.de>
2381         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
2382         overload for single value.
2383         (value_range[_base]::set_nonnull): New.
2384         (value_range[_base]::set_null): Likewise.
2385         (value_range): Document bitmap copying behavior, mark
2386         copy constructor and assignment operator deleted.
2387         (value_range::move): New.
2388         (value_range::set_and_canonicalize): Default bitmap to zero.
2389         (set_value_range_to_nonnull): Remove.
2390         (set_value_range_to_null): Likewise.
2391         (set_value_range): Likewise.
2392         (set_value_range_to_value): Likewise.
2393         (extract_range_from_unary_expr): Work on value_range_base.
2394         (extract_range_from_binary_expr_1): Likewise.  Rename to...
2395         (extract_range_from_binary_expr): ... this.
2396         * tree-vrp.c (value_range::update): Clear equiv bitmap
2397         if required.
2398         (value_range::move): New, move equiv bitmap.
2399         (value_range_base::set_undefined): Avoid assignment.
2400         (value_range::set_undefined): Likewise.
2401         (value_range_base::set_varying): Likewise.
2402         (value_range::set_varying): Likewise.
2403         (set_value_range): Remove.
2404         (value_range_base::set): New overload for value.
2405         (value_range::set): Likewise.
2406         (set_value_range_to_nonnull): Remove.
2407         (value_range_base::set_nonnull): New.
2408         (value_range::set_nonnull): Likewise.
2409         (set_value_range_to_null): Remove.
2410         (value_range_base::set_null): New.
2411         (value_range::set_null): Likewise.
2412         (range_is_null): Work on value_range_base.
2413         (range_is_nonnull): Likewise.
2414         (ranges_from_anti_range): Likewise.
2415         (extract_range_into_wide_ints): Likewise.
2416         (extract_range_from_multiplicative_op): Likewise.
2417         (extract_range_from_binary_expr): Likewise.  Update for API changes.
2418         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
2419         handling.
2420         (value_range::intersect_helper): Avoid copy and assignment.
2421         (value_range::union_helper): Likewise.
2422         (determine_value_range_1): Adjust.
2423         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
2424         Avoid assignment by using move.
2425         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
2426         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2427         Likewise.
2428         * tree-ssanames.c (get_range_info): Likewise.
2429         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
2430         * vr-values.c (vr_values::get_value_range): Adjust.
2431         (vr_values::update_value_range): Likewise.
2432         (symbolic_range_based_on_p): Work on value_range_base.
2433         (vr_values::extract_range_from_binary_expr): Use value_range_base.
2434         (vr_values::extract_range_from_unary_expr): Likewise.
2435         (vr_values::extract_range_from_cond_expr): Avoid assignment.
2436         (vr_values::extract_range_from_comparison): Adjust.
2437         (vr_values::check_for_binary_op_overflow): Use value_range_base.
2438         (vr_values::extract_range_basic): Adjust.
2439         (vr_values::adjust_range_with_scev): Likewise.
2440         (vr_values::vrp_visit_assignment_or_call): Likewise.
2441         (vr_values::get_vr_for_comparison): Change API to avoid
2442         assignment and copy construction.
2443         (vr_values::compare_name_with_value): Adjust accordingly.
2444         (vr_values::compare_names): Likewise.
2445         (vr_values::extract_range_from_phi_node): Avoid assignment and
2446         bogus in-place modify of equiv bitmap.
2447         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
2448         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
2449         for extract_range_from_unary_expr API change.
2450         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
2452 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
2454         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
2456 2018-11-12  Richard Biener  <rguenther@suse.de>
2458         * tree-vrp.h (value_range_base::symbolic_p,
2459         value_range_base::constant_p, value_range_base::zero_p,
2460         value_range_base::singleton_p): Move from value_range.
2461         (value_range::dump): Add.
2462         * gimple-ssa-evrp-analyze.c
2463         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
2464         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
2465         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2466         Use set_varying.
2467         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
2468         (value_range::constant_p): Likewise.
2469         (value_range::singleton_p): Likewise.
2470         (value_range_base::dump): Add.
2471         (set_value_range_to_undefined): Remove.
2472         (set_value_range_to_varying): Likewise.
2473         (range_int_cst_p): Take value_range_base argument.
2474         (range_int_cst_singleton_p): Likewise.
2475         (value_range_constant_singleton): Likewise.
2476         (vrp_set_zero_nonzero_bits): Likewise.
2477         (extract_range_from_multiplicative_op): Use set_varying.
2478         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
2479         (extract_range_from_unary_expr): Likewise.
2480         (dump_value_range_base): Change to overload of dump_value_range.
2481         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
2482         (vrp_prop::visit_stmt): Likewise.
2483         (value_range::intersect_helper): Likewise.
2484         (value_range::union_helper): Likewise.
2485         (determine_value_range_1): Likewise.
2487 2018-11-12  Richard Biener  <rguenther@suse.de>
2489         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
2490         (set_value_range_to_null): Likewise.
2491         * vr-values.c (vr_values::extract_range_from_comparison):
2492         Clear equiv for constant singleton ranges.
2494 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
2496         * config/i386/sse.md: Combine VFIXUPIMM* patterns
2497         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2498         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2499         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
2500         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2501         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2502         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
2504 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
2506         PR c/69502
2507         * doc/extend.texi (Common Type Attributes): For the align type
2508         attribute, copy language about decreasing alignment from the
2509         corresponding variable attribute.
2511 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2513         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
2514         -frounding-math.
2516 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
2518         PR c++/43105
2519         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
2520         -frtti and -fno-rtti code.
2522 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
2524         PR c/26366
2525         * doc/extend.texi (Other Builtins): Document probability associated
2526         with __builtin_expect.
2528 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
2530         PR target/87928
2531         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2532         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2533         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2534         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2536 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2538         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
2540 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
2542         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2544 2018-11-11  Richard Biener  <rguenther@suse.de>
2546         * tree-vrp.h (class value_range_base): New base class for
2547         value_range containing all but the m_equiv member.
2548         (dump_value_range_base): Add.
2549         (range_includes_zero_p): Work on value_range_base.
2550         * tree-vrp.c (value_range_base::set): Split out base handling
2551         from...
2552         (value_range::set): this.
2553         (value_range::set_equiv): New.
2554         (value_range_base::value_range_base): New constructors.
2555         (value_range_base::check): Split out base handling from...
2556         (value_range::check): this.
2557         (value_range::equal_p): Refactor in terms of
2558         ignore_equivs_equal_p which is now member of the base.
2559         (value_range_base::set_undefined): New.
2560         (value_range_base::set_varying): Likewise.
2561         (value_range_base::dump):Split out base handling from...
2562         (value_range::dump): this.
2563         (value_range_base::set_and_canonicalize): Split out base handling
2564         from...
2565         (value_range::set_and_canonicalize): this.
2566         (value_range_base::union_): New.
2567         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
2568         for m_vr.
2569         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
2570         instead of value_range everywhere.
2571         (ipcp_vr_lattice::print): Use dump_value_range_base.
2572         (ipcp_vr_lattice::meet_with): Adjust.
2573         (ipcp_vr_lattice::meet_with_1): Likewise.
2574         (ipa_vr_operation_and_type_effects): Likewise.
2575         (propagate_vr_across_jump_function): Likewise.
2576         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
2577         (ipa_get_value_range): Likewise.
2578         (ipa_set_jfunc_vr): Likewise.
2579         (ipa_compute_jump_functions_for_edge): Likewise.
2581 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
2583         PR middle-end/65703
2584         * doc/invoke.texi (Optimize Options): Add @opindex entries
2585         for the positive forms of -fno-xxx and -mno-xxx options
2586         that were lacking them.
2588 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
2590         * combine.c (make_more_copies): Only make an intermediate copy if the
2591         dest of a move is a pseudo.
2593 2018-11-09  Maya Rashish  <coypu@sdf.org>
2595         PR target/87221
2596         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
2597         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2599 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
2601         PR driver/41179
2602         PR middle-end/65703
2603         * doc/invoke.texi (Optimize Options): Clarify default behavior
2604         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2606 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2608         PR tree-optimization/87940
2609         * expr.c (string_constant): Don't strip NOPS in subexpressions.
2610         Fold PLUS_EXPR correctly.
2612 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
2614         PR target/87762
2615         * config/s390/s390.c (s390_safe_relative_long_p): New function.
2616         (annotate_constant_pool_refs): Skip insns which support
2617         relative addressing.
2618         (annotate_constant_pool_refs_1): New helper function.
2619         (find_constant_pool_ref): Skip insns which support relative
2620         addression.
2621         (find_constant_pool_ref_1): New helper function.
2622         (replace_constant_pool_ref): Skip insns which support
2623         relative addressing.
2624         (replace_constant_pool_ref_1): New helper function.
2625         (s390_mainpool_start): Adapt to the new signature.
2626         (s390_mainpool_finish): Likewise.
2627         (s390_chunkify_start): Likewise.
2628         (s390_chunkify_finish): Likewise.
2629         (pass_s390_early_mach::execute): Likewise.
2630         (s390_prologue_plus_offset): Likewise.
2631         (s390_emit_prologue): Likewise.
2632         (s390_emit_epilogue): Likewise.
2634 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
2636         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
2637         but unsupported lastprivate with conditional modifier.
2639 2018-11-09  Jeff Law  <law@redhat.com>
2641         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
2642         unused argument better.  Add gcc_unreachable to silence warning.
2644 2018-11-09  Martin Sebor  <msebor@redhat.com>
2646         PR middle-end/81824
2647         * attribs.c (has_attribute): New helper function.
2648         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
2649         * attribs.h (decls_mismatched_attributes): Declare.
2650         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
2651         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
2652         * common.opt (-Wattribute-alias): Take an argument.
2653         (-Wno-attribute-alias): New option.
2654         * doc/extend.texi (Common Function Attributes): Document copy.
2655         (Common Variable Attributes): Same.
2656         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
2657         (-Wattribute-alias): Document new option argument.
2659 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
2661         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
2662         matching criteria.  Remove unused array initializer.
2664 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
2665             Jinsong Ji  <jji@us.ibm.com>
2667         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
2668         constraints by introducing a new temporary.
2669         (_mm_cvtss_si64): Likewise.
2671 2018-11-09  Martin Liska  <mliska@suse.cz>
2673         * common.opt: Add -fipa-stack-alignment flag.
2674         * doc/invoke.texi: Document it.
2675         * final.c (rest_of_clean_state): Guard stack
2676         shrinking with flag.
2678 2018-11-09  Martin Liska  <mliska@suse.cz>
2680         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
2681         to ...
2682         (ipa_discover_variable_flags): ... this.
2683         * common.opt: Come up with new flag -fipa-reference-addressable.
2684         * doc/invoke.texi: Document it.
2685         * ipa-reference.c (propagate): Call the renamed fn.
2686         * ipa-visibility.c (whole_program_function_and_variable_visibility):
2687         Likewise.
2688         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
2689         ...
2690         (ipa_discover_variable_flags): ... this.  Discover
2691         non-addressable variables only with the newly added flag.
2692         * opts.c: Enable the newly added flag with -O1 and higher
2693         optimization level.
2695 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
2697         * json.cc (selftest::test_writing_literals): Fix comment.
2699 2018-11-09  Martin Liska  <mliska@suse.cz>
2701         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
2702         string to a stack buffer.
2703         (aarch64_parse_cpu): Likewise.
2704         (aarch64_parse_tune): Likewise.
2706 2018-11-09  Richard Biener  <rguenther@suse.de>
2708         PR tree-optimization/87953
2709         * tree-vect-loop.c (vectorizable_reduction): For analysis
2710         always pass ops[0] to vectorizable_condition.
2712 2018-11-09  Stafford Horne  <shorne@gmail.com>
2713             Richard Henderson  <rth@twiddle.net>
2714             Joel Sherrill  <joel@rtems.org>
2716         * common/config/or1k/or1k-common.c: New file.
2717         * config/or1k/*: New.
2718         * config.gcc (or1k*-*-*): New.
2719         * configure.ac (or1k*-*-*): New test for openrisc tls.
2720         * configure: Regenerated.
2721         * doc/install.texi: Document OpenRISC triplets.
2722         * doc/invoke.texi: Document OpenRISC arguments.
2723         * doc/md.texi: Document OpenRISC.
2725 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
2727         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
2728         (arm7tdmi-s): Delete CPU.
2729         (arm710t): Add aliases for arm720t and arm740t.
2730         (arm720t, arm740t): Delete CPUs.
2731         (arm920t): Add aliases for arm920, arm922t and arm940t.
2732         (arm920, arm922t, arm940t): Delete CPUs.
2733         (arm10tdmi): Add alias for arm1020t.
2734         (arm1020t): Delete CPU.
2735         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
2736         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
2737         (arm10e): Add aliases for arm1020e and arm1022e.
2738         (arm1020e, arm1022e): Delete CPU.
2739         * config/arm/arm.md (generic_sched): Remove entries that are now
2740         handled by aliases.
2741         (generic_vfp): Likewise.
2742         * config/arm/arm1020e.md: Simplify tuning selection based on alias
2743         changes.
2744         * config/arm/arm-tune.md: Regenerated.
2745         * config/arm/arm-tables.opt: Regenerated.
2747 2018-11-09  Richard Biener  <rguenther@suse.de>
2749         PR tree-optimization/87621
2750         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
2751         op with only phi inputs.
2752         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
2753         (ch_base::copy_headers): Run CSE on copied loop headers.
2754         (pass_ch_vect::process_loop_p): Simplify.
2756 2018-11-09  Alexandre Oliva <oliva@adacore.com>
2758         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
2759         for non-w64 x86_64 biarch.
2761 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
2763         PR rtl-optimization/86438
2764         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
2765         of in_b for the compare if in_b is SET_DEST.
2767         PR target/87793
2768         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
2769         non-toplevel UNSPEC.
2771 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2773         * tree-vrp.c (value_range::check): Do not access internals
2774         directly.
2775         (value_range::singleton_p): Same.
2776         (value_range::type): Same.
2777         (vrp_finalize): Use value_range API.
2779 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2781         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2783 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2785         * vr-values.c (vr_values::get_value_range): Use value_range API
2786         instead of piecing together ranges.
2787         (vr_values::update_value_range): Same.
2789 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2791         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2792         of performing ad-hoc calculations.
2793         * tree-ssanames.c (set_range_info): New overloaded function
2794         accepting value_range &.
2795         (get_range_info): Same.
2796         * tree-ssanames.h (set_range_info_raw): Remove.
2797         (set_range_info): New prototype.
2798         (get_range_info): Same.
2799         * tree-vrp.h (value_range::null_p): Rename to zero_p.
2800         * tree-vrp.c (value_range::null_p): Same.
2802 2018-11-09  Jan Hubicka  <jh@suse.cz>
2804         * tree.c (fld_type_variant_equal_p): Test user align flag.
2805         (flt_type_variant): Copy user align flag.
2806         (fld_incomplete_type_of): Clear it.
2808 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2810         * config/arm/neon.md (div<mode>3): New pattern.
2812 2018-11-08  Andi Kleen  <ak@linux.intel.com>
2814         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2815         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2816         (ix86_handle_option): Handle OPT_mptwrite.
2817         * config/i386/cpuid.h (bit_PTWRITE): Add.
2818         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2819         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2820         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2821         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2822         (ix86_option_override_internal): Handle PTA_PTWRITE.
2823         (ix86_valid_target_attribute_inner_p): Define ptwrite.
2824         (def_builtin2): Force UINT64 to be 64bit only.
2825         * config/i386/i386.h (TARGET_PTWRITE): Add.
2826         (TARGET_PTWRITE_P): Add.
2827         (PTA_PTWRITE): Add.
2828         * config/i386/i386.md: Define ptwrite.
2829         * config/i386/i386.opt: Add -mptwrite.
2830         * config/i386/immintrin.h (_ptwrite64): Add.
2831         (_ptwrite32): Add
2832         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2833         * doc/invoke.texi: Document -mptwrite.
2835 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
2837         PR rtl-optimization/87600
2838         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2839         * lra-constraints.c (process_alt_operands): Skip illegal hard
2840         register usage.  Prefer reloading non hard register operands.
2842 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
2844         PR other/36572
2845         * doc/invoke.texi (Optimize Options): Clarify default behavior
2846         for -fno-sched-interblock and -fno-sched-spec.
2848 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
2850         * collect2.c (linker_select):  Add USE_LLD_LD.
2851         (ld_suffixes): Add ld.lld.
2852         (main): Handle -fuse-ld=lld.
2853         * common.opt (-fuse-ld=lld): New option.
2854         * doc/invoke.texi (-fuse-ld=lld): Document.
2855         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2857 2018-11-08  Paul Koning  <ni1d@arrl.net>
2859         * config/pdp11/constraints.md: Add "Z" series constraints for use
2860         with pre-dec and post-inc addressing.
2861         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2862         (pdp11_expand_operands): Add int argument (word count).
2863         (pdp11_sp_frame_offset): Delete.
2864         (pdp11_cmp_length): New function.
2865         (pushpop_regeq): New function.
2866         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2867         Add hook.
2868         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2869         frame layout.
2870         (pdp11_initial_elimination_offset): Ditto.
2871         (pdp11_expand_operands): Add word count argument.  Bugfixes.
2872         (output_move_multiple): Change how pointer adjustment is done.
2873         (pdp11_gen_int_label): Correct format.
2874         (output_ascii): Ditto.
2875         (pdp11_asm_output_var): Add code for DEC assembler case.
2876         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
2877         value.
2878         (legitimate_const_double_p): Ditto.
2879         (pdp11_register_move_cost): Adjust for new register classes.
2880         (pdp11_regno_reg_class): Ditto.
2881         (expand_block_move): Delete.
2882         (pushpop_regeq): New function.
2883         (pdp11_legitimate_address_p): Bugfix in check for constant
2884         offset.
2885         (pdp11_sp_frame_offset): Delete.
2886         (pdp11_reg_save_size): New helper function for new frame layout.
2887         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
2888         (pdp11_expand_shift): Bugfix in check for constant shift count.
2889         (pdp11_shift_length): Ditto.
2890         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
2891         (pdp11_cmp_length): New function.
2892         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
2893         some compile options.
2894         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
2895         (CALL_USED_REGISTERS): Ditto.
2896         (ELIMINABLE_REGS): Ditto.
2897         (REGISTER_NAMES): Ditto.
2898         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
2899         constraints.
2900         (REG_CLASS_NAMES): Ditto.
2901         (REG_CLASS_CONTENTS): Ditto.  Also remove
2902         HARD_FRAME_POINTER_REGNUM.
2903         (CPU_REG_CLASS): New macro.
2904         (CLASS_MAX_NREGS): Adjust for new register classes.
2905         (FUNCTION_PROFILER): Make no-op.
2906         (may_call_alloca): Remove unused declaration.
2907         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
2908         (ASM_OUTPUT_SKIP): Fix format.
2909         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
2910         (HARD_FRAME_POINTER_REGNUM): Remove.
2911         (return): Delete.
2912         (*rts): Rename.  Remove epilogue related checks.
2913         (cmpsi, cmpdi): New insn.
2914         (cbranch<mode>4): Change to apply to SI and DI modes as well.
2915         (mov<mode>): Change constraints to enforce that push/pop
2916         destination cannot use the same register as source.
2917         (*mov<mode><cc_cc>): Ditto.
2918         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
2919         at assembly output rather than as RTL expander.
2920         (zero_extendqihi2): Bugfix in check for same registers.
2921         (adddi3_nocc): Bugfix in check for constant operand.
2922         (addsi3_nocc): Ditto.
2923         (subdi3_nocc): Ditto.
2924         (subsi3_nocc): Ditto.
2925         (negdi2_nocc): Copy input to pdp11_expand_operands.
2926         (negsi2_nocc): Ditto.
2927         (bswap2_nocc): Ditto.
2928         * config/pdp11/pdp11.opt (mlra): Fix documentation.
2929         * config/pdp11/t-pdp11: Use -Os.
2931 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
2933         * config/arm/parsecpu.awk (/alias/): New parsing rule.
2934         (/begin cpu/): Check that the cpu name hasn't been previously defined.
2935         (gen_comm_data): Print out CPU alias tables.
2936         (check_cpu): Match aliases when checking the CPU name.
2937         * config/arm/arm-protos.h (cpu_alias): New structure.
2938         (cpu_option): Add entry for aliases.
2939         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
2940         strongarm1100 and strongarm1110.
2941         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
2942         (config/arm/arm-generic.md): Remove redundant references to
2943         strongarm110, strongarm1100 and strongarm1110.
2944         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2945         Scan aliases for additional hints.
2946         (arm_parse_cpu_option_name): Also match a cpu name against the list
2947         of aliases.
2948         * config/arm/arm-tables.opt: Regenerated.
2949         * config/arm/arm-tune.md: Regenerated.
2951 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
2953         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2954         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2955         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2956         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2957         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2958         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2959         * gengtype.c (open_base_files): Add omp-general.h.
2960         * gimple.c (gimple_build_omp_critical):
2961         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
2962         gimple_omp_taskgroup_set_clauses.
2963         (gimple_build_omp_atomic_load): Add mo argument, call
2964         gimple_omp_atomic_set_memory_order.
2965         (gimple_build_omp_atomic_store): Likewise.
2966         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
2967         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
2968         instead of GSS_OMP.
2969         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
2970         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
2971         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
2972         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
2973         different value for GF_OMP_ATOMIC_NEED_VALUE.
2974         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
2975         comments.
2976         (struct gimple_statement_omp_single_layout): And remove here.
2977         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
2978         than gimple_statement_omp_single_layout.
2979         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
2980         GIMPLE_OMP_TEAMS.
2981         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
2982         (gimple_omp_subcode): Formatting fix.
2983         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
2984         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
2985         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
2986         gimple_omp_teams_host, gimple_omp_teams_set_host,
2987         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
2988         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
2989         gimple_omp_taskgroup_set_clauses): New inline functions.
2990         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
2991         (gimple_build_omp_atomic_store): Likewise.
2992         (gimple_omp_atomic_seq_cst_p): Remove.
2993         (gimple_omp_atomic_memory_order): New function.
2994         (gimple_omp_atomic_set_seq_cst): Remove.
2995         (gimple_omp_atomic_set_memory_order): New function.
2996         (gimple_build_omp_taskgroup): Add clauses argument.
2997         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
2998         (dump_gimple_omp_task): Print taskwait with depend clauses.
2999         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3000         dump_omp_atomic_memory_order.
3001         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3002         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3003         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3004         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3005         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3006         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3007         ORT_UNTIED_TASKLOOP enumerators.
3008         (enum gimplify_defaultmap_kind): New.
3009         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3010         target_map_pointers_as_0len_arrays members, add defaultmap.
3011         (new_omp_context): Initialize defaultmap member.
3012         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3013         (maybe_fold_stmt): Don't fold even in host teams regions.
3014         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3015         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
3016         ctx->omp_firstprivatize_variable.
3017         (omp_add_variable): Don't add private/firstprivate for VLAs in
3018         ORT_TASKGROUP.
3019         (omp_default_clause): Print "taskloop" rather than "task" if
3020         ORT_*TASKLOOP.
3021         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3022         Handle new defaultmap clause kinds.
3023         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
3024         iterator to be lastprivate or private.  Fix up diagnostics if linear
3025         is used on collapse>1 simd iterator.
3026         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3027         (gimplify_omp_depend): New function.
3028         (gimplify_scan_omp_clauses): Add shared clause on parallel for
3029         combined parallel master taskloop{, simd} if taskloop has
3030         firstprivate, lastprivate or reduction clause.  Handle
3031         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
3032         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
3033         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
3034         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
3035         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
3036         lastprivate.
3037         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
3038         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3039         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
3040         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3041         (gimplify_omp_task): Handle taskwait with depend clauses.
3042         (gimplify_omp_for): Add shared clause on parallel for combined
3043         parallel master taskloop{, simd} if taskloop has firstprivate,
3044         lastprivate or reduction clause.  Use ORT_TASKLOOP or
3045         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
3046         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
3047         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
3048         __for_end and __for_range temporaries on OMP_PARALLEL for
3049         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
3050         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3051         sandwiched in between two taskloops.
3052         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3053         instead of ctx->omp_firstprivatize_variable.
3054         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3055         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
3056         host teams, use gimplify_and_return_first etc. for body like
3057         for target or target data constructs, and at the end call
3058         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3059         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3060         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3061         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3062         gimple_omp_atomic_set_seq_cst calls.
3063         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3064         case, handle taskgroup clauses.
3065         * lto-streamer-out.c (hash_tree): Handle
3066         OMP_CLAUSE_{TASK,IN}_REDUCTION.
3067         * Makefile.in (GTFILES): Add omp-general.h.
3068         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3069         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3070         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3071         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3072         BUILT_IN_GOMP_LOOP_DOACROSS_START,
3073         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3074         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3075         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3076         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3077         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3078         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3079         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3080         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3081         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3082         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3083         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3084         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3085         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3086         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3087         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3088         * omp-expand.c (workshare_safe_to_combine_p): Return false for
3089         non-worksharing loops.
3090         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3091         (determine_parallel_type): Don't combine parallel with worksharing
3092         which has _reductemp_ clause.
3093         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3094         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3095         if there is nonmonotonic modifier or if there is no modifier and no
3096         ordered clause.  For dynamic and guided schedule without monotonic
3097         and nonmonotonic modifier, default to nonmonotonic.
3098         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
3099         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3100         task reductions.
3101         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3102         there are any reduction clauses.
3103         (expand_taskwait_call): New function.
3104         (expand_teams_call): New function.
3105         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3106         expand_teams_call for it.  Formatting fix.  Handle taskwait with
3107         depend clauses.
3108         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
3109         of worksharing loops with task reductions.
3110         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3111         expansion of worksharing loops with task reductions.
3112         (expand_omp_sections): Handle expansion of sections with task
3113         reductions.
3114         (expand_omp_synch): For host teams call expand_omp_taskreg.
3115         (omp_memory_order_to_memmodel): New function.
3116         (expand_omp_atomic_load, expand_omp_atomic_store,
3117         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3118         instead of gimple_omp_atomic_seq_cst_p.
3119         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3120         depend clauses as a standalone directive.
3121         * omp-general.c (enum omp_requires): New variable.
3122         (omp_extract_for_data): Initialize have_reductemp member.  Allow
3123         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3124         GT_EXPR loops depending on incr sign.  Formatting fixes.
3125         * omp-general.h (struct omp_for_data): Add have_reductemp member.
3126         (enum omp_requires): New enum.
3127         (omp_requires_mask): Declare.
3128         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3129         Fix comment typos.
3130         * omp-low.c (struct omp_context): Add task_reductions and
3131         task_reduction_map fields.
3132         (is_host_teams_ctx): New function.
3133         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3134         (use_pointer_for_field): Use is_global_var instead of
3135         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3136         in outer contexts.
3137         (build_outer_var_ref): Ignore taskgroup outer contexts.
3138         (delete_omp_context): Release task_reductions and task_reduction_map.
3139         (scan_sharing_clauses): Don't add any fields for reduction clause on
3140         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
3141         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3142         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
3143         Handle OMP_CLAUSE_NONTEMPORAL.
3144         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3145         needed.
3146         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3147         clauses with task modifier.
3148         (scan_omp_task): Handle taskwait with depend clauses.
3149         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3150         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3151         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3152         (scan_omp_for): Fix comment formatting.
3153         (scan_omp_teams): Handle host teams constructs.
3154         (check_omp_nesting_restrictions): Allow teams with no outer
3155         OpenMP context.  Adjust diagnostics for teams strictly nested into
3156         some explicit OpenMP construct other than target.  Allow OpenMP atomics
3157         inside of simd regions.
3158         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3159         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3160         taskreg_nesting_level while scanning host teams construct.
3161         (task_reduction_read): New function.
3162         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3163         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3164         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
3165         second argument create_tmp_var if it is NULL.  Don't ignore shared
3166         clauses in is_host_teams_ctx contexts.  Handle
3167         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3168         clauses.
3169         (lower_reduction_clauses): Ignore reduction clauses with task
3170         modifier.  Remove second argument create_tmp_var if it is NULL.
3171         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3172         (lower_send_clauses): Ignore reduction clauses with task modifier.
3173         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
3174         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
3175         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3176         rely that it is the last stmt in body so far.  Ignore outer taskgroup
3177         contexts.
3178         (omp_task_reductions_find_first, omp_task_reduction_iterate,
3179         lower_omp_task_reductions): New functions.
3180         (lower_omp_sections): Handle reduction clauses with taskgroup
3181         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
3182         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3183         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
3184         modifiers.
3185         (lower_omp_taskgroup): Handle taskgroup reductions.
3186         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3187         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3188         (lower_depend_clauses): If there are any
3189         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3190         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
3191         seen, assume lowering is done already and return early.  Set kind
3192         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3193         (lower_omp_taskreg): Handle reduction clauses with task modifier on
3194         parallel construct.  Handle reduction clause on taskloop construct.
3195         Handle taskwait with depend clauses.
3196         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3197         for host teams constructs.
3198         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3199         nontemporal and _reductemp_ clause entries.
3200         (omp_clause_code_name): Likewise.
3201         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3202         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3203         * tree-core.h (enum omp_clause_code): Add
3204         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3205         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3206         (struct tree_base): Add omp_atomic_memory_order field into union.
3207         Remove OMP_ATOMIC_SEQ_CST comment.
3208         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3209         and OMP_CLAUSE_DEPEND_DEPOBJ.
3210         (struct tree_omp_clause): Add subcode.defaultmap_kind.
3211         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
3212         OpenMP constructs with body and clauses operands.
3213         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
3214         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
3215         (OMP_TASKGROUP_CLAUSES): Define.
3216         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
3217         OMP_CLAUSE__LOOPTEMP_.
3218         (OMP_ATOMIC_SEQ_CST): Remove.
3219         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
3220         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
3221         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
3222         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
3223         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
3224         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
3225         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
3226         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
3227         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
3228         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
3229         Define.
3230         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
3231         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3232         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
3233         (convert_local_omp_clauses): Likewise.  Remove useless test.
3234         * tree-parloops.c (create_call_for_reduction_1): Pass
3235         OMP_MEMORY_ORDER_RELAXED as new argument to
3236         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
3237         * tree-pretty-print.c (dump_omp_iterators): New function.
3238         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
3239         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
3240         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
3241         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
3242         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
3243         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
3244         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
3245         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3246         (dump_omp_atomic_memory_order): New function.
3247         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
3248         taskwait with depend clauses.
3249         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
3250         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
3251         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
3252         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
3253         write_ts_omp_clause_tree_pointers): Likewise.
3255 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3257         PR ipa/86395
3258         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
3259         "-missed", "-note", and "-all" sub-options.
3260         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
3261         API.
3262         (can_early_inline_edge_p): Likewise.
3263         (want_early_inline_function_p): Likewise.
3264         (want_inline_self_recursive_call_p): Likewise.
3265         (recursive_inlining): Likewise.
3266         (inline_small_functions): Likewise.
3267         (flatten_function): Likewise.
3268         (ipa_inline): Likewise.
3269         (inline_always_inline_functions): Likewise.
3270         (early_inline_small_functions): Likewise.
3271         (early_inliner): Likewise.
3272         * tree-inline.c (expand_call_inline): Likewise.
3274 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3276         * pretty-print.c (pp_format): Handle %f.
3277         (selftest::test_pp_format): Add test of %f.
3278         * pretty-print.h (pp_double): New macro.
3280 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3282         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
3283         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
3284         (dump_pretty_printer::decode_format): Implement "%C" for
3285         cgraph_node *.
3286         (selftest::test_capture_of_dump_calls): Rename "where" to
3287         "stmt_loc".  Convert test_decl to a function decl and set its
3288         location.  Add a symbol_table_test RAII instance and a
3289         cgraph_node, using it to test "%C" and dump_symtab_node.
3291 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
3293         PR middle-end/87916
3294         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
3296 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3298         * cgraph.c: Include "selftest.h".
3299         (saved_symtab): New variable.
3300         (selftest::symbol_table_test::symbol_table_test): New ctor.
3301         (selftest::symbol_table_test::~symbol_table_test): New dtor.
3302         (selftest::test_symbol_table_test): New test.
3303         (selftest::cgraph_c_tests): New.
3304         * cgraph.h (saved_symtab): New decl.
3305         (selftest::symbol_table_test): New class.
3306         * selftest-run-tests.c (selftest::run_tests): Call
3307         selftest::cgraph_c_tests.
3308         * selftest.h (selftest::cgraph_c_tests): New decl.
3310 2018-11-08  Richard Biener  <rguenther@suse.de>
3312         * tree-data-ref.h (lambda_int): New typedef.
3313         (lambda_vector_gcd): Adjust.
3314         (lambda_vector_new): Likewise.
3315         (lambda_matrix_new): Likewise.
3316         * tree-data-ref.c  (print_lambda_vector): Adjust.
3318 2018-11-08  Richard Biener  <rguenther@suse.de>
3320         PR tree-optimization/87929
3321         * tree-complex.c (expand_complex_comparison): Clean EH.
3323 2018-11-08  Martin Liska  <mliska@suse.cz>
3325         * doc/extend.texi: Reword.
3326         * predict.c (expr_expected_value_1): Likewise.
3328 2018-11-08  Richard Biener  <rguenther@suse.de>
3330         PR tree-optimization/87913
3331         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
3332         of extreme values to ordered comparisons.
3334 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
3336         PR middle-end/42726
3337         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
3339 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
3341         * doc/invoke.texi: Remove leading dash from @opindex entries
3342         throughout the file.
3344 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
3346         PR driver/80828
3347         * doc/invoke.texi (Option Summary): Add -e and --entry.
3348         (Link Options): Likewise.
3350 2018-11-07  Nathan Sidwell  <nathan@acm.org>
3352         PR 87926
3353         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
3354         --disable-checking bootstrap.
3356 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3358         * configure: Regenerated.
3360 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3362         PR c/87691
3363         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
3364         to the mode of the widest field iff the widest field has mode class
3365         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
3366         reference.
3368 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
3370         * common.opt: Add -Wattribute-warning.
3371         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
3372         * expr.c (expand_expr_real_1): Add new attribute to warning_at
3373         call to allow user configure behavior of "warning" attribute.
3375 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
3377         * target.def: Put @: after every vs., e.g., and i.e. where it is
3378         followed by whitespace.
3379         * doc/extend.texi: Ditto.
3380         * doc/fragments.texi: Ditto.
3381         * doc/gimple.texi: Ditto.
3382         * doc/implement-c.texi: Ditto.
3383         * doc/install.texi: Ditto.
3384         * doc/invoke.texi: Ditto.
3385         * doc/md.texi: Ditto.
3386         * doc/plugins.texi: Ditto.
3387         * doc/rtl.texi: Ditto.
3388         * doc/sourcebuild.texi: Ditto.
3389         * doc/tm.texi.in: Ditto.
3390         * doc/ux.texi: Ditto.
3391         * doc/tm.texi: Regenerate.
3393 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3395         * config/arm/arm-cpus.in (ares): New entry.
3396         * config/arm/arm-tables.opt: Regenerate.
3397         * config/arm/arm-tune.md: Likewise.
3398         * doc/invoke.texi (ARM Options): Document ares.
3400 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3402         * config/aarch64/aarch64-cores.def (ares): Define.
3403         * config/aarch64/aarch64-tune.md: Regenerate.
3404         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
3406 2018-11-07  Jan Hubicka  <jh@suse.cz>
3408         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
3409         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
3410         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
3411         TYPE_DECL.
3413 2018-11-07  Richard Biener  <rguenther@suse.de>
3415         PR tree-optimization/87914
3416         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
3417         of nested cycles.
3418         (vectorizable_reduction): Handle shifts and rotates by dispatching
3419         to vectorizable_shift.
3420         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
3421         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
3422         def cases.
3423         (vectorizable_shift): Export and handle being called as
3424         vect_nested_cycle.
3425         (vect_analyze_stmt): Call vectorizable_shift after
3426         vectorizable_reduction.
3427         * tree-vectorizer.h (vectorizable_shift): Declare.
3429 2018-11-07  Jan Hubicka  <jh@suse.cz>
3431         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
3432         than const decls in TREE_VALUE of enum.
3433         (dump_type_inheritance_graph): Improve duplicate dumping.
3434         (free_enum_values): New.
3435         (build_type_inheritance_graph): Use it.
3436         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
3437         which are not main variants or not ODR types.
3438         (verify_type_variant): Expect variants to have no TYPE_VALUES.
3440 2018-11-07  Richard Biener  <rguenther@suse.de>
3442         * ipa-inline.c (want_inline_small_function_p): Compute
3443         big_speedup_p lazily and last.
3445 2018-11-07  Jan Hubicka  <jh@suse.cz>
3447         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
3448         building incomplete variant of complete type.
3449         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
3450         variant of complete type.
3452 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3454         * config/mips/mips.c: Fix typo in documentation of
3455         mips_loongson_ext2_prefetch_cookie.
3456         (mips_option_override): fix brain twister logical.
3457         * config/mips/mips.h: Fix typo in documentation of
3458         ISA_HAS_CTZ_CTO and define pattern.
3459         * config/mips/mips.md (prefetch): Hoist EXT2 above
3460         the 2EF/EXT block.
3461         (prefetch_indexed): Hoist EXT2 above the EXT block.
3463 2018-11-07  Jan Hubicka  <jh@suse.cz>
3465         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
3466         return and parameter types of function and method types.
3467         (free_lang_data_in_cgraph): Update.
3469 2018-11-07  Martin Liska  <mliska@suse.cz>
3471         PR rtl-optimization/87868
3472         * postreload-gcse.c (eliminate_partially_redundant_load): Set
3473         threshold to max_count if we would overflow.
3474         * profile-count.h: Make max_count a public constant.
3476 2018-11-07  Martin Liska  <mliska@suse.cz>
3478         * mem-stats.h: Fix GNU coding style.
3480 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3482         * config/mips/gs264e.md: New.
3483         * config/mips/mips-cpus.def: Define gs264e.
3484         * config/mips/mips-tables.opt: Regenerate.
3485         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3486         gs264e.
3487         (mips_issue_rate): Add support for gs264e.
3488         (mips_multipass_dfa_lookahead): Likewise.
3489         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
3490         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
3491         (MIPS_ASE_MSA_SPEC): New.
3492         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
3493         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
3494         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
3495         * config/mips/mips.md: Include gs264e.md.
3496         (processor): Add gs264e.
3497         * config/mips/mips.opt (MSA): Use Mask instead of Var.
3498         * doc/invoke.texi: Add gs264e to supported architectures.
3500 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3502         * config/mips/gs464e.md: New.
3503         * config/mips/mips-cpus.def: Define gs464e.
3504         * config/mips/mips-tables.opt: Regenerate.
3505         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3506         gs464e.
3507         (mips_issue_rate): Add support for gs464e.
3508         (mips_multipass_dfa_lookahead): Likewise.
3509         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
3510         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
3511         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
3512         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
3513         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
3514         * config/mips/mips.md: Include gs464e.md.
3515         (processor): Add gs464e.
3516         * doc/invoke.texi: Add gs464e to supported architectures.
3518 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3520         * config/mips/loongson3a.md: Rename to ...
3521         * config/mips/gs464.md: ... here.
3522         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
3523         as an alias of gs464 processor.
3524         * config/mips/mips-tables.opt: Regenerate.
3525         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
3526         instead of PROCESSOR_LOONGSON_3A.
3527         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
3528         TUNE_LOONGSON_3A.
3529         (mips_option_override): Enable MMI and EXT for gs464.
3530         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
3531         Rename TUNE_LOONGSON_3A to TUNE_GS464.
3532         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
3533         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
3534         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
3535         TARGET_LOONGSON_3A.
3536         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
3537         (processor): Add gs464;
3538         * doc/invoke.texi: Add gs464 to supported architectures.
3540 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3542         * config/mips/mips-protos.h
3543         (mips_loongson_ext2_prefetch_cookie): New prototype.
3544         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
3545         (mips_option_override): Enable TARGET_LOONGSON_EXT when
3546         TARGET_LOONGSON_EXT2 is true.
3547         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
3548         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
3549         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
3550         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
3551         TARGET_LOONGSON_EXT2.
3552         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
3553         (define_insn "ctz<mode>2"): New insn pattern.
3554         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
3555         (define_insn "prefetch_indexed_<mode>"): Include
3556         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
3557         * config/mips/mips.opt (-mloongson-ext2): Add option.
3558         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
3560 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3562         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
3563         __mips_loongson_ext.
3564         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
3565         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
3566         -mloongson-ext.
3567         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
3568         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
3569         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
3570         instead of TARGET_LOONGSON_3A.
3571         * config/mips/mips.opt (-mloongson-ext): Add option.
3572         * gcc/doc/invoke.texi (-mloongson-ext): Document.
3574 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
3576         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
3577         * config/mips/loongson.md: Move to ...
3578         * config/mips/loongson-mmi.md: here; Adjustment.
3579         * config/mips/loongson.h: Move to ...
3580         State as deprecated. Include loongson-mmiintrin.h for back
3581         compatibility and warning.
3582         * config/mips/loongson-mmiintrin.h: ... here.
3583         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
3584         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
3585         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3586         (mips_option_override): Make sure MMI use hard float;
3587         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
3588         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
3589         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
3590         TARGET_LOONGSON_VECTORS.
3591         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
3592         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
3593         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
3594         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
3595         -mloongson-mmi.
3596         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
3597         TARGET_LOONGSON_VECTORS.
3598         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
3599         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3600         (Loongson MMI patterns): Include loongson-mmi.md instead of
3601         loongson.md.
3602         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
3603         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
3605 2018-11-07  Richard Biener  <rguenther@suse.de>
3607         PR lto/87906
3608         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
3609         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
3611 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
3613         PR rtl-optimization/87874
3614         * lra.c (lra_substitute_pseudo): Do not create a subreg for
3615         const wide ints.
3617 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
3619         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
3620         if not in indexed or indirect form.
3621         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
3622         (bswap<mode>2_store): Ditto.
3624 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
3626         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
3627         the UNSPEC.
3629 2018-11-06  Richard Biener  <rguenther@suse.de>
3631         PR tree-optimization/86850
3632         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
3633         instead of src.m_vec.
3635 2018-11-06  Jan Hubicka  <jh@suse.cz>
3637         * tree.c (fld_simplified_type_name): Break out form ...
3638         (free_lang_data_in_type): ... here.
3639         (fld_type_variant_equal_p): Use it.
3641 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3643         * config/default-d.c: Include memmodel.h.
3645         * config/sol2-d.c: New file.
3646         * config/t-sol2 (sol2-d.o): New rule.
3647         * config.gcc <*-*-solaris2*>: Set d_target_objs,
3648         target_has_targetdm.
3650 2018-11-06  Jan Hubicka  <jh@suse.cz>
3652         * tree.c (fld_type_variant): Also copy alignment; be sure that
3653         new variant is equal.
3655 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3657         PR target/87762
3658         * config/s390/s390.md: Add relative_long attribute.
3660 2018-11-06  Jan Hubicka  <jh@suse.cz>
3662         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
3663         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
3664         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
3665         stream TYPE_NEEDS_CONSTRUCTING.
3666         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
3667         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
3669 2018-11-06  Richard Biener  <rguenther@suse.de>
3671         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
3672         dump-scope ...
3673         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
3675 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3677         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
3678         REG_CLASS_CONTENTS[GEN_REGS].
3679         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
3681 2018-11-06  Jan Hubicka  <jh@suse.cz>
3683          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
3685 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3687         PR sanitizer/80953
3688         * config/sol2.h (ASAN_CC1_SPEC): Define.
3689         (LD_WHOLE_ARCHIVE_OPTION): Define.
3690         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
3691         (ASAN_REJECT_SPEC): Provide default.
3692         (LIBASAN_EARLY_SPEC): Define.
3693         (LIBTSAN_EARLY_SPEC): Define.
3694         (LIBLSAN_EARLY_SPEC): Define.
3695         * config/i386/sol2.h (CC1_SPEC): Redefine.
3696         (ASAN_REJECT_SPEC): Define.
3698         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
3699         (TARGET_ASAN_SHADOW_OFFSET): Define.
3700         (sparc_asan_shadow_offset): New function.
3701         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
3702         (ASAN_REJECT_SPEC): Define.
3704 2018-11-06  Jan Hubicka  <jh@suse.cz>
3706         * tree.c (fld_type_variant): Copy canonical type.
3707         (fld_incomplete_type_of): Check that canonical types looks sane;
3708         copy canonical type.
3709         (verify_type): Accept when incomplete type has complete canonical type.
3711 2018-11-06  Jan Hubicka  <jh@suse.cz>
3713         * tree.c (free_lang_data): Reset overwite_assembler_name,
3714         print_xnode, print_decl, print_type and print_identifier of
3715         langhooks.
3717 2018-11-06  Richard Biener  <rguenther@suse.de>
3719         PR tree-optimization/87889
3720         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3721         Do nothing if old and new arg are the same
3723 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
3725         PR target/87723
3726         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
3727         attributes for operands 3 and 4.
3729 2018-11-06  Richard Biener  <rguenther@suse.de>
3731         PR middle-end/18041
3732         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
3733         matching bitfield insertion.
3735 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
3737         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
3738         (reg_next_debug_use): New.
3739         (attempt_change): Propagate adjusted expression into affected
3740         debug insns.
3741         (merge_in_block): Track uses in debug insns.
3742         (pass_inc_dec::execute): Allocate and release
3743         reg_next_debug_use.
3745 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
3747         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
3748         (_mm512_fixupimm_round_pd): Update parameters and builtin.
3749         (_mm512_maskz_fixupimm_round_pd): Ditto.
3750         (_mm512_fixupimm_round_ps): Ditto.
3751         (_mm512_maskz_fixupimm_round_ps): Ditto.
3752         (_mm_fixupimm_round_sd): Ditto.
3753         (_mm_maskz_fixupimm_round_sd): Ditto.
3754         (_mm_fixupimm_round_ss): Ditto.
3755         (_mm_maskz_fixupimm_round_ss): Ditto.
3756         (_mm512_fixupimm_pd): Ditto.
3757         (_mm512_maskz_fixupimm_pd): Ditto.
3758         (_mm512_fixupimm_ps): Ditto.
3759         (_mm512_maskz_fixupimm_ps): Ditto.
3760         (_mm_fixupimm_sd): Ditto.
3761         (_mm_maskz_fixupimm_sd): Ditto.
3762         (_mm_fixupimm_ss): Ditto.
3763         (_mm_maskz_fixupimm_ss): Ditto.
3764         (_mm512_mask_fixupimm_round_pd): Update builtin.
3765         (_mm512_mask_fixupimm_round_ps): Ditto.
3766         (_mm_mask_fixupimm_round_sd): Ditto.
3767         (_mm_mask_fixupimm_round_ss): Ditto.
3768         (_mm512_mask_fixupimm_pd): Ditto.
3769         (_mm512_mask_fixupimm_ps): Ditto.
3770         (_mm_mask_fixupimm_sd): Ditto.
3771         (_mm_mask_fixupimm_ss): Ditto.
3772         * config/i386/avx512vlintrin.h:
3773         (_mm256_fixupimm_pd): Update parameters and builtin.
3774         (_mm256_maskz_fixupimm_pd): Ditto.
3775         (_mm256_fixupimm_ps): Ditto.
3776         (_mm256_maskz_fixupimm_ps): Ditto.
3777         (_mm_fixupimm_pd): Ditto.
3778         (_mm_maskz_fixupimm_pd): Ditto.
3779         (_mm_fixupimm_ps): Ditto.
3780         (_mm_maskz_fixupimm_ps): Ditto.
3781         (_mm256_mask_fixupimm_pd): Update builtin.
3782         (_mm256_mask_fixupimm_ps): Ditto.
3783         (_mm_mask_fixupimm_pd): Ditto.
3784         (_mm_mask_fixupimm_ps): Ditto.
3785         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3786         * config/i386/i386-builtin.def: Update builtin definitions.
3787         * config/i386/i386.c: Handle new builtin types and remove useless ones.
3788         * config/i386/sse.md: Update VFIXUPIMM* patterns.
3789         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3790         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3791         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3792         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3793         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3794         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3795         * config/i386/subst.md:
3796         (round_saeonly_sd_mask_operand4): Add new subst_attr.
3797         (round_saeonly_sd_mask_op4): Ditto.
3798         (round_saeonly_expand_operand5): Ditto.
3799         (round_saeonly_expand): Update.
3801 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
3803         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3805 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
3807         PR rtl-optimization/87871
3808         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3810 2018-11-05  Paul Koning  <ni1d@arrl.net>
3812         * doc/sourcebuild.texi (target attributes): Document new "inf"
3813         effective target keyword.
3815 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3817         * config/s390/s390.c (s390_register_move_cost): Increase costs for
3818         moves involving the CC reg.
3820 2018-11-05  Richard Biener  <rguenther@suse.de>
3822         PR tree-optimization/87873
3823         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3824         argument.
3825         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3826         * tree-vect-loop.c (vect_transform_loop): When splitting the
3827         loop exit also create forwarder PHIs for constants.
3828         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3829         Handle constant to_arg, add extra checking we match up the correct
3830         PHIs.
3832 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3834         * config/s390/s390.md: QImode and HImode for load on condition.
3836 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3838         * config/s390/predicates.md: Fix typo.
3839         * config/s390/s390.md: Allow immediates for load on condition.
3841 2018-11-05  Martin Liska  <mliska@suse.cz>
3843         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3844         * bitmap.h (struct bitmap_usage): Likewise.
3845         * ggc-common.c (SCALE): Remove.
3846         (LABEL): Likewise.
3847         (struct ggc_usage): Use SIZE_AMOUNT. And update
3848         compare method.
3849         * ggc-page.c (SCALE): Remove.
3850         (STAT_LABEL): Remove.
3851         (ggc_print_statistics): Use SIZE_AMOUNT.
3852         * gimple.h (SCALE): Remove.
3853         (LABEL): Likewise.
3854         * input.c (ONE_K): Remove.
3855         (ONE_M): Likewise.
3856         (SCALE): Likewise.
3857         (STAT_LABEL): Likewise.
3858         (FORMAT_AMOUNT): Likewise.
3859         (dump_line_table_statistics): Use SIZE_AMOUNT.
3860         * mem-stats.h (struct mem_usage): Likewise.
3861         * rtl.c (dump_rtx_statistics): Likewise.
3862         (rtx_alloc_counts): Change type to size_t.
3863         (rtx_alloc_sizes): Likewise.
3864         (rtx_count_cmp): New.
3865         (dump_rtx_statistics): Sort first based on counts.
3866         * tree.c (tree_nodes_cmp): New.
3867         (tree_codes_cmp): New.
3868         (dump_tree_statistics): Sort first based on counts.
3869         * system.h (ONE_K): New.
3870         (ONE_M): Likewise.
3871         (SIZE_SCALE): Likewise.
3872         (SIZE_LABEL): Likewise.
3873         (SIZE_AMOUNT): Likewise.
3874         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
3875         * tree-dfa.c (dump_dfa_stats): Likewise.
3876         * tree-phinodes.c (phinodes_print_statistics): Likewise.
3877         * tree-ssanames.c (ssanames_print_statistics): Likewise.
3878         * tree.c (dump_tree_statistics): Likewise.
3879         * vec.c (struct vec_usage): Likewise.
3880         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
3881         trigger a -Werror=format-overflow with
3882         --enable-gather-detailed-stats.
3884 2018-11-05  Martin Liska  <mliska@suse.cz>
3886         * mem-stats.h (mem_alloc_description::release_instance_overhead):
3887         Return T *.
3888         * vec.c (struct vec_usage): Register m_element_size.
3889         (vec_prefix::register_overhead): New arguments: elements and
3890         element_size.
3891         (vec_prefix::release_overhead): Subtract elements.
3892         * vec.h (struct vec_prefix): Change signature.
3893         (va_heap::reserve): Pass proper arguments.
3894         (va_heap::release): Likewise.
3896 2018-11-05  Martin Liska  <mliska@suse.cz>
3898         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
3899         style.
3900         * vec.c: Likewise.
3902 2018-11-05  Richard Biener  <rguenther@suse.de>
3904         * tree-scalar-evolution.h (final_value_replacement_loop): Update
3905         prototype.
3906         * tree-scalar-evolution.c (final_value_replacement_loop): Return
3907         whether anything was done.
3908         (scev_const_prop): Remove constant propagation part, fold
3909         remains into ...
3910         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
3911         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
3912         conditionally.
3914 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
3916         PR tree-optimization/87859
3917         * gimple-ssa-store-merging.c (struct merged_store_group): Add
3918         only_constants and first_nonmergeable_order members.
3919         (merged_store_group::merged_store_group): Initialize them.
3920         (merged_store_group::do_merge): Clear only_constants member if
3921         adding something other than INTEGER_CST store.
3922         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
3923         stores with order >= first_nonmergeable_order.  Use
3924         merged_store->only_constants instead of always recomputing it.
3925         Set merged_store->first_nonmergeable_order if we've skipped any
3926         stores.  Attempt to merge overlapping INTEGER_CST stores that
3927         we would otherwise skip.
3929         PR sanitizer/87837
3930         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
3932 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
3934         PR target/87853
3935         * config/i386/emmintrin.h (__v16qs): New to cope with option
3936         -funsigned-char.
3937         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
3938         (_mm_cmplt_epi8): Likewise.
3939         (_mm_cmpgt_epi8): Likewise.
3941 2018-11-05  Richard Biener  <rguenther@suse.de>
3943         PR rtl-optimization/87852
3944         * fwprop.c (use_killed_between): Only consider single-defs of the
3945         use whose definition statement dominates the use.
3947 2018-11-05  Martin Liska  <mliska@suse.cz>
3949         PR web/87829
3950         * doc/invoke.texi: Remove options that are
3951         not disabled with -Os.
3953 2018-11-05  Martin Liska  <mliska@suse.cz>
3955         PR c/87811
3956         * doc/extend.texi: Update constrain about the last argument
3957         of __builtin_expect_with_probability.
3959 2018-11-05  Martin Liska  <mliska@suse.cz>
3961         PR c/87811
3962         * predict.c (expr_expected_value_1): Verify
3963         that last argument is a real constants and emit
3964         error.
3966 2018-11-05  Martin Liska  <mliska@suse.cz>
3968         PR gcov-profile/77698
3969         * ipa-profile.c (ipa_profile): Adjust hotness threshold
3970         only in LTO mode.
3972 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3974         PR tree-optimization/86572
3975         * builtins.c (c_strlen): Handle negative offsets in a safe way.
3977 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3979         PR tree-optimization/87672
3980         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
3981         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
3983 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
3985         PR middle-end/58372
3986         * cfgexpand.c (pass_expand::execute): Move the call to
3987         finish_eh_generation in front of the call to expand_stack_alignment.
3989 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
3991         * common/config/i386/i386-common.c (processor_alias_table): Add
3992         znver2 entry.
3993         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
3994         (case ${target}): Add znver2.
3995         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
3996         -march=native recognize znver2 processors.
3997         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
3998         * config/i386/i386.c (m_znver2): New definition.
3999         (m_ZNVER): New definition.
4000         (m_AMD_MULTIPLE): Includes m_znver2.
4001         (processor_cost_table): Add znver2 entry.
4002         (processor_target_table): Add znver2 entry.
4003         (get_builtin_code_for_version): Set priority for
4004         PROCESSOR_ZNVER2.
4005         (processor_model): Add M_AMDFAM17H_ZNVER2.
4006         (arch_names_table): Ditto.
4007         (ix86_reassociation_width): Include znver2.
4008         * config/i386/i386.h (TARGET_znver2): New definition.
4009         (struct ix86_size_cost): Add TARGET_ZNVER2.
4010         (enum processor_type): Add PROCESSOR_ZNVER2.
4011         * config/i386/i386.md (define_attr "cpu"): Add znver2.
4012         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4013         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4014         (ix86_adjust_cost): Add znver2.
4015         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
4016         * gcc/doc/extend.texi: Add details about znver2.
4017         * gcc/doc/invoke.texi: Add details about znver2.
4019 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
4021         PR target/87079
4023         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4024         pattern.
4026 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4028         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4029         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4031 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
4033         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4034         shrink-wrapping when -mtrack-speculation.
4036 2018-11-02  Richard Biener  <rguenther@suse.de>
4038         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4039         (pop_cost_one_pair): Do not free pair.
4040         (pop_best_coalesce): Likewise.
4041         (create_coalesce_list): Initialize obstack.
4042         (delete_coalesce_list): Free obstack.
4043         (find_coalesce_pair): Obstack-allocate coalesce pairs.
4044         (add_cost_one_coalesce): Likewise.
4045         (struct live_track): Remove bitmap pointer indirections.
4046         (new_live_track): Adjust.
4047         (delete_live_track): Likewise.
4048         (live_track_remove_partition): Likewise.
4049         (live_track_add_partition): Likewise.
4050         (live_track_live_p): Likewise.
4051         (live_track_process_def): Likewise.
4052         (live_track_clear_base_vars): Likewise.
4054 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4056         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4057         * configure: Regenerate.
4058         * config.in: Regenerate.
4059         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4060         HAVE_AS_REGISTER_PSEUDO_OP guard.
4061         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4062         !HAVE_AS_REGISTER_PSEUDO_OP support.
4063         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4064         guard.
4066 2018-11-02  Richard Biener  <rguenther@suse.de>
4068         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4069         with is_type_die.
4071 2018-11-02  Richard Biener  <rguenther@suse.de>
4073         PR tree-optimization/87776
4074         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4075         executable when iterating but running into rpo-vn-max-loop-depth
4076         and not eliding the iteration.
4078 2018-11-30  Jan Hubicka  <jh@suse.cz>
4080         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4081         TYPE_DECL.
4083 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
4085         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4086         prototype.
4087         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4088         Combine with rs6000_address_for_fpconvert.
4089         (rs6000_address_for_fpconvert): Combine with
4090         rs6000_force_indexed_or_indirect_mem.
4091         (rs6000_expand_vector_init): Change function call from
4092         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4093         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4094         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4095         (floatsi<mode>2_lfiwax_mem): Ditto.
4096         (floatunssi<mode>2_lfiwzx): Ditto.
4097         (floatunssi<mode>2_lfiwzx_mem): Ditto.
4098         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4099         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4100         (fix_trunc<mode>si2_stfiwx): Ditto.
4101         (fixuns_trunc<mode>si2_stfiwx): Ditto.
4102         (float_<mode>si2_hw): Ditto.
4103         (floatuns_<mode>si2_hw): Ditto.
4104         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4105         (vsx_splat_<mode>): Ditto.
4107 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
4109         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4110         at end of assembler input text.
4111         * configure: Regenerate.
4113 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
4115         PR tree-optimization/87826
4116         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4117         negative or larger or equal to type's precision.
4119 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
4121         * opts.c (default_options_table): Do not enable
4122         OPT_fdelayed_branch at -Og.
4123         * doc/invoke.texi (-fdelayed-branch): Document it.
4125 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4127         * optabs-libfuncs.c (build_libfunc_function_visibility):
4128         New, split out from...
4129         (build_libfunc_function): ... here.
4130         (init_one_libfunc_visibility): New, split out from ...
4131         (init_one_libfunc): ... here.
4133         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4134         scratch register need not be early-clobber.  Document the reason
4135         why we cannot use ST<OP>.
4137 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
4139         PR bootstrap/82856
4140         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
4141         line for second argument of AC_DEFINE_UNQUOTED.
4142         * doc/install.texi (Tools/packages necessary for modifying GCC):
4143         Update to autoconf 2.69 and automake 1.15.1.
4144         * aclocal.m4, config.in, configure: Regenerate.
4146 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
4148         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4149         initialization.
4151 2018-10-31  Martin Liska  <mliska@suse.cz>
4153         PR driver/83193
4154         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4155         Add new argument invalid_extension.
4156         (aarch64_get_all_extension_candidates): New function.
4157         (aarch64_rewrite_selected_cpu): Add NULL to function call.
4158         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4159         new argument.
4160         (aarch64_get_all_extension_candidates): New function.
4161         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4162         argument invalid_extension.
4163         (aarch64_parse_cpu): Likewise.
4164         (aarch64_print_hint_for_extensions): New function.
4165         (aarch64_validate_mcpu): Provide hint about invalid extension.
4166         (aarch64_validate_march): Likewise.
4167         (aarch64_handle_attr_arch): Pass new argument.
4168         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4169         (aarch64_handle_attr_isa_flags): Likewise.
4171 2018-10-31  Richard Biener  <rguenther@suse.de>
4173         PR middle-end/70359
4174         PR middle-end/86270
4175         * tree-outof-ssa.c (insert_backedge_copies): Restrict
4176         copy generation to useful cases.  Place the copy before
4177         the definition of the backedge value when possible.
4179 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4181         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4182         * config/arc/arc.c (arc_active_insn): New function.
4183         (check_store_cacheline_hazard): Likewise.
4184         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4185         (arc_override_options): Disable delay slot scheduler for older
4186         A7.
4187         (arc_store_addr_hazard_p): New implementation, old one renamed to
4188         ...
4189         (arc_store_addr_hazard_internal_p): Renamed.
4190         (arc_reorg): Don't combine into brcc instructions which are part
4191         of hardware hazard solution.
4192         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4193         (tune_arc700): Likewise.
4194         * config/arc/arc.opt (arc7xx): New tune value.
4195         * config/arc/arc700.md: Improve A7 scheduler.
4197 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4199         * config/arc/arc.c (arc_override_options): Remove
4200         TARGET_COMPACT_CASESI.
4201         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4202         (CASE_VECTOR_MODE): Likewise.
4203         (CASE_VECTOR_PC_RELATIVE): Likewise.
4204         (CASE_VECTOR_SHORTEN_MODE): Likewise.
4205         (CASE_VECTOR_SHORTEN_MODE1): Delete.
4206         (ADDR_VEC_ALIGN): Update.
4207         (ASM_OUTPUT_CASE_LABEL): Undefine.
4208         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
4209         (TARGET_BI_BIH): Define.
4210         (DEFAULT_BRANCH_INDEX): Likewise.
4211         * config/arc/arc.md (casesi): Rework to accept BI/BIH
4212         instructions, remove compact_casesi use case.
4213         (casesi_compact_jump): Remove.
4214         (casesi_dispatch): New pattern.
4215         * config/arc/arc.opt: Add mbranch-index option. Deprecate
4216         compact_casesi option.
4217         * doc/invoke.texi: Document mbranch-index option.
4219 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4221         * config/arc/arc.c (arc_get_tp): Remove function.
4222         (arc_emit_call_tls_get_addr): Likewise.
4223         (arc_call_tls_get_addr): New function.
4224         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
4225         * config/arc/arc.md (tls_load_tp_soft): Remove.
4226         (tls_gd_get_addr): Likewise.
4228 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
4230         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4231         (mulsi3_600_lib): Remove pattern.
4232         (umulsi3_highpart_600_lib_le): Likewise.
4233         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
4234         (umulsidi3): Remove call to umulsidi3_600_lib.
4235         (umulsidi3_600_lib): Remove pattern.
4236         (peephole2): Remove peephole using the above deprecated patterns.
4238 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
4240         PR target/87374
4241         * config/arm/arm.c (arm_option_check_internal): Disable the combined
4242         use of -mslow-flash-data and -mword-relocations.
4243         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
4244         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
4245         flag_pic.
4246         * doc/invoke.texi (-mword-relocations): Mention conflict with
4247         -mslow-flash-data.
4248         (-mslow-flash-data): Reciprocally.
4250 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
4252         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
4253         16-byte modes held in GP registers to use an even regno.
4255         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
4256         (aarch64_atomic_ldop_supported_p): Remove.
4257         (aarch64_gen_atomic_ldop): Remove.
4258         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
4259         Fully expand LSE operations here.
4260         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
4261         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
4262         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
4263         and use ATOMIC_LDOP instead; use register_operand for the input;
4264         drop the split and emit insns directly.
4265         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
4266         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
4267         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
4269         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
4270         (aarch64_gen_atomic_ldop): Don't call it.
4271         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
4272         Use aarch64_reg_or_zero.
4273         (aarch64_atomic_exchange<ALLI>): Likewise.
4274         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
4275         operand 0; use aarch64_reg_or_zero for input; merge ...
4276         (@aarch64_atomic_swp<ALLI>): ... this and remove.
4278         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
4279         (aarch64_split_compare_and_swap): Use it.
4280         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
4281         test oldval against the proper predicate.
4282         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
4283         Use nonmemory_operand for expected.
4284         (cas_short_expected_pred): New.
4285         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
4286         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
4287         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
4288         (aarch64_plushi_operand): New.
4290         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
4291         Force oldval into the rval register for TARGET_LSE; emit the compare
4292         during initial expansion so that it may be deleted if unused.
4293         (aarch64_gen_atomic_cas): Remove.
4294         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
4295         Change =&r to +r for operand 0; use match_dup for operand 2;
4296         remove is_weak and mod_f operands as unused.  Drop the split
4297         and merge with...
4298         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
4299         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
4300         (@aarch64_atomic_cas<GPI>): Similarly.
4302 2018-10-31  Richard Biener  <rguenther@suse.de>
4304         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
4305         using ABSU_EXPR.
4307 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4309         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
4310         * config/aarch64/aarch64.md: Include saphira.md
4311         * config/aarch64/saphira.md: New file for pipeline description.
4313 2018-10-30  Martin Sebor  <msebor@redhat.com>
4315         PR middle-end/87041
4316         * gimple-ssa-sprintf.c (format_directive): Use %G to include
4317         inlining context.
4318         (sprintf_dom_walker::compute_format_length):
4319         Avoid setting POSUNDER4K here.
4320         (get_destination_size): Handle null argument values.
4321         (get_user_idx_format): New function.
4322         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
4323         functions, including user-defined with attribute format printf.
4324         Use %G to include inlining context.
4325         Set POSUNDER4K here.
4327 2018-10-30  Jan Hubicka  <jh@suse.cz>
4329         * params.def (lto-partitions): Bump from 32 to 128.
4331 2018-10-30  Jan Hubicka  <jh@suse.cz>
4333         * tree.c
4334         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
4335         head in file.
4336         (free_lang_data_in_type): Forward declare.
4337         (fld_type_variant_equal_p): New function.
4338         (fld_type_variant): New function
4339         (fld_incomplete_types): New hash.
4340         (fld_incomplete_type_of): New function
4341         (fld_simplfied-type): New function.
4342         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
4343         (free_lang_data): Allocate and free fld_incomplete_type; update call
4344         of free_lang_data_in_decl.
4346 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
4348         * gcov.c (output_lines): Remove duplicate line.
4350 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
4352         * config/rs6000/rs6000.md (bswapdi2): Force address into register
4353         if not in indexed or indirect form.
4354         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
4355         (bswapdi2_store): Ditto.
4356         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
4357         helper function.
4358         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
4359         Prototype for helper function.
4361 2018-10-30  Martin Sebor  <msebor@redhat.com>
4363         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
4364         (target, pragma GCC optimize, pragma GCC target): Ditto.
4366 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
4368         * doc/extend.texi: Fix prototype and description of
4369         __builtin_expect_with_probability.
4371 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
4373         * cgraph.h (clone_function_name_1): Replaced by new
4374           clone_function_name_numbered that takes name as string; for
4375           privatize_symbol_name_1 use only.
4376           (clone_function_name): Renamed to
4377           clone_function_name_numbered to be explicit about numbering.
4378           (clone_function_name): New two-argument function that does
4379           not number its output.
4380           (clone_function_name): New three-argument function that
4381           takes a number to append to its output.
4382         * cgraphclones.c (duplicate_thunk_for_node):
4383           (clone_function_name_1): Renamed.
4384           (clone_function_name_numbered): Two new functions.
4385           (clone_function_name): Improved documentation.
4386           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
4387         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
4388         * final.c (final_scan_insn_1): Use the new clone_function_name
4389           without numbering.
4390         * multiple_target.c (create_dispatcher_calls): Ditto.
4391           (create_target_clone): Ditto.
4392         * omp-expand.c (grid_expand_target_grid_body): Ditto.
4393         * omp-low.c (create_omp_child_function_name): Ditto.
4394         * omp-simd-clone.c (simd_clone_create): Ditto.
4395         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
4396           new clone_function_name without numbering.
4398 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
4400         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
4401         Assert that the allocation size is not zero.
4403 2018-10-30  Richard Biener  <rguenther@suse.de>
4405         PR tree-optimization/87800
4406         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
4407         non-induction or reduction PHIs.
4409 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
4411         * config/aarch64/falkor-tag-collision-avoidance.c
4412         (execute_tag_collision_avoidance): Call df_note_add_problem.
4414 2018-10-30  Martin Liska  <mliska@suse.cz>
4416         * doc/extend.texi: Fix typo in documentation
4417         of __builtin_expect_with_probability.
4419 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
4421         PR c++/87721
4422         * input.c (get_substring_ranges_for_loc): Detect if
4423         linemap_resolve_location gives us a NULL map, and reject
4424         this case.
4426 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
4428         * config.gcc (xstormy16-*-elf): Set tm_d_file.
4430 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
4431             Martin Sebor  <msebor@redhat.com>
4432             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
4434         * doc/ux.texi (Quoting): New subsection, adapted from material at
4435         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
4436         MartinSebor and ManuelLopezIbanez.
4437         (Fix-it hints): Note that fix-it hints shouldn't be marked for
4438         translation.
4440 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
4442         PR middle-end/87469
4443         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
4444         max value.
4446 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
4448         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
4450 2018-10-29  Paul Koning  <ni1d@arrl.net>
4452         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
4454 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
4456         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
4457         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
4458         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
4459         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
4460         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
4461         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
4462         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
4463         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
4464         Change 'vector' to '__vector'.
4465         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
4466         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
4467         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
4468         _mm_avg_pu16): Likewise.  And, whitespace corrections.
4470 2018-10-29  Richard Biener  <rguenther@suse.de>
4472         PR tree-optimization/87785
4473         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
4474         internal defs.
4476 2018-10-29  Olivier Hainque  <hainque@adacore.com>
4478         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
4480 2018-10-29  Olivier Hainque  <hainque@adacore.com>
4482         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
4483         ports configuration macro, defaults to "gnu".
4484         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
4485         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
4487 2018-10-29  Olivier Hainque  <hainque@adacore.com>
4489         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
4491 2018-10-29  Richard Biener  <rguenther@suse.de>
4493         PR tree-optimization/87790
4494         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
4495         (vect_make_slp_decision): Adjust.
4496         (vect_slp_analyze_bb_1): Likewise.
4497         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
4498         edges.
4500 2018-10-29  Richard Biener  <rguenther@suse.de>
4502         PR tree-optimization/87785
4503         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
4504         and processing.
4505         (vect_build_slp_tree): Likewise.
4506         (vect_gather_slp_loads): New function.
4507         (vect_analyze_slp_instance): Gather loads separately from the
4508         SLP tree build.
4510 2018-10-29  Martin Liska  <mliska@suse.cz>
4512         * Makefile.in: Make dependency to json.o.
4513         * doc/gcov.texi: Document new JSON format, remove
4514         old intermediate format documentation.
4515         * gcov.c (struct function_info): Come up with m_name and
4516         m_demangled_name.
4517         (function_info::function_info): Initialize it.
4518         (function_info::~function_info): Release it.
4519         (main): Rename flag_intermediate_format to flag_json_format.
4520         (print_usage): Describe --json-format.
4521         (process_args): Set flag_json_format.
4522         (output_intermediate_line): Remove.
4523         (output_intermediate_json_line): Likewise.
4524         (get_gcov_intermediate_filename): Return new extension
4525         ".gcov.json.gz".
4526         (output_intermediate_file): Implement JSON emission.
4527         (output_json_intermediate_file): Implement JSON emission.
4528         (generate_results): Use ::get_name for function name.
4529         Handle JSON output file.
4530         (read_graph_file): Use ::get_name instead of cplus_demangle.
4531         (read_count_file): Likewise.
4532         (solve_flow_graph): Likewise.
4533         (add_line_counts): Likewise.
4534         (accumulate_line_counts): Use new flag_json_format.
4535         (output_function_details): Use ::get_name instead of cplus_demangle.
4536         (output_lines): Likewise.
4537         * json.cc (test_writing_literals): Add new tests.
4538         * json.h (class literal): Add new boolean constructor.
4540 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
4542         PR rtl-optimization/87701
4543         PR rtl-optimization/87780
4544         * combine.c (make_more_copies): Rewrite.
4546 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
4548         * doc/generic.texi (ABSU_EXPR): Document.
4549         * match.pd (absu(x)*absu(x) -> x*x): Handle.
4550         (absu(absu(X)) -> absu(X)): Likewise.
4551         (absu(-X) -> absu(X)): Likewise.
4552         (absu(X)  where X is nonnegative -> X): Likewise.
4554 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
4556         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
4557         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
4558         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
4559         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
4560         (s-tm-texi): Also check timestamp on d-target.def.
4561         (generated_files): Add TM_D_H and d-target-hooks-def.h.
4562         (build/genhooks.o): Also depend on D_TARGET_DEF.
4563         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
4564         variables.
4565         * config/aarch64/aarch64-d.c: New file.
4566         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
4567         Define.
4568         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
4569         prototype.
4570         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
4571         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
4572         * config/arm/arm-d.c: New file.
4573         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
4574         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
4575         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4576         * config/arm/t-arm (arm-d.o): New rule.
4577         * config/default-d.c: New file.
4578         * config/glibc-d.c: New file.
4579         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4580         * config/i386/i386-d.c: New file.
4581         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
4582         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
4583         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4584         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
4585         * config/i386/t-i386 (i386-d.o): New rule.
4586         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4587         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4588         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
4589         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4590         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4591         * config/mips/mips-d.c: New file.
4592         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
4593         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
4594         * config/mips/t-mips (mips-d.o): New rule.
4595         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4596         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4597         * config/powerpcspe/powerpcspe-d.c: New file.
4598         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
4599         New prototype.
4600         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4601         Support GNU D by using 0 as the language type.
4602         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
4603         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
4604         * config/riscv/riscv-d.c: New file.
4605         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
4606         prototype.
4607         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
4608         * config/riscv/t-riscv (riscv-d.o): New rule.
4609         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4610         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4611         * config/rs6000/rs6000-d.c: New file.
4612         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
4613         prototype.
4614         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4615         Support GNU D by using 0 as the language type.
4616         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
4617         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
4618         * config/s390/s390-d.c: New file.
4619         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
4620         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
4621         * config/s390/t-s390 (s390-d.o): New rule.
4622         * config/sparc/sparc-d.c: New file.
4623         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
4624         prototype.
4625         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
4626         * config/sparc/t-sparc (sparc-d.o): New rule.
4627         * config/t-glibc (glibc-d.o): New rule.
4628         * configure: Regenerated.
4629         * configure.ac (tm_d_file): New variable.
4630         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
4631         * doc/contrib.texi (Contributors): Add self for the D frontend.
4632         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
4633         * doc/install.texi (Configuration): Mention libphobos as an option for
4634         --enable-shared.  Mention d as an option for --enable-languages.
4635         (Testing): Mention check-d as a target.
4636         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
4637         name suffixes.  Mention d as a -x option.
4638         * doc/sourcebuild.texi (Top Level): Mention libphobos.
4639         * doc/standards.texi (Standards): Add section on D language.
4640         * doc/tm.texi: Regenerated.
4641         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
4642         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
4643         * dwarf2out.c (is_dlang): New function.
4644         (gen_compile_unit_die): Use DW_LANG_D for D.
4645         (declare_in_namespace): Return module die for D, instead of adding
4646         extra declarations into the namespace.
4647         (gen_namespace_die): Generate DW_TAG_module for D.
4648         (gen_decl_die): Handle CONST_DECLSs for D.
4649         (dwarf2out_decl): Likewise.
4650         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
4651         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
4652         kinds of aggregates.
4653         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
4654         * genhooks.c: Include d/d-target.def.
4656 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
4658         PR target/85669
4659         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
4660         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
4661         (STACK_DYNAMIC_OFFSET): Likewise.
4663 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
4665         PR target/80024
4666         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
4667         error message.
4669 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
4671         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
4672         return type and other typos.
4674 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4676         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
4677         a shorter sequence with fewer branches.
4678         (emit_final_str_compare_gpr): Ditto.
4680 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4682         * config/rs6000/tmmintrin.h: New file.
4683         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
4685 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4687         * config/rs6000/mmintrin.h: Enable 32bit compilation.
4688         * config/rs6000/xmmintrin.h: Likewise.
4690 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4692         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
4694 2018-10-26  Richard Biener  <rguenther@suse.de>
4696         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
4697         and wrapper.
4698         (vect_mark_slp_stmts_relevant): Likewise.
4699         (vect_detect_hybrid_slp_stmts): Likewise.
4700         (vect_bb_slp_scalar_cost): Likewise.
4701         (vect_remove_slp_scalar_calls): Likewise.
4703 2018-10-26  Jan Hubicka  <jh@suse.cz>
4705         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
4706         (warn_types_mismatch): Fix walk of DECL_NAME.
4707         (odr_types_equivalent_p): Fix overactive assert.
4709 2018-10-26  Richard Biener  <rguenther@suse.de>
4711         PR tree-optimization/87105
4712         * tree-vectorizer.h (_slp_tree::refcnt): New member.
4713         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
4714         refcnt.
4715         (vect_create_new_slp_node): Initialize refcnt to one.
4716         (bst_traits): Move.
4717         (scalar_stmts_set_t, bst_fail): Remove.
4718         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
4719         (vect_build_slp_tree): Add bst_map argument and lookup
4720         already created SLP nodes.
4721         (vect_print_slp_tree): Handle a SLP graph, print SLP node
4722         addresses.
4723         (vect_slp_rearrange_stmts): Handle a SLP graph.
4724         (vect_analyze_slp_instance): Adjust and free SLP nodes from
4725         the CSE map.  Fix indenting.
4726         (vect_schedule_slp_instance): Add short-cut.
4728 2018-10-26  Martin Liska  <mliska@suse.cz>
4730         PR testsuite/86158
4731         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
4732         addr_expr and not with pointers.
4734 2018-10-26  Jan Hubicka  <jh@suse.cz>
4736         * tree.c (free_lang_data_in_type): Only check main variants.
4737         * ipa-devirt.c (warn_odr): Make static.
4738         (types_same_for_odr): Drop strict variant.
4739         (types_odr_comparable): Likewise.
4740         (odr_or_derived_type_p): Look for main variants.
4741         (odr_name_hasher::equal): Cleanup comment.
4742         (odr_subtypes_equivalent): Add warn and warned arguments; check main
4743         variants.
4744         (type_variants_equivalent_p): break out from ...
4745         (odr_types_equivalent): ... here; go for main variants where needed.
4746         (warn_odr): ... here; turn static.
4747         (warn_types_mismatch): Compare mangled names of main variants.
4748         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
4749         (type_with_linkage_p): Sanity check that we look at main variant.
4750         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
4751         * tree.h (types_same_for_odr): Drop strict argument.
4753 2018-10-26  Richard Biener  <rguenther@suse.de>
4755         PR tree-optimization/87746
4756         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
4757         Simplify and fix WRT strided store groups with size not
4758         equal to step in element count.
4759         (vect_analyze_group_access_1): Dump the whole group.
4761 2018-10-25  Carl Love  <cel@us.ibm.com>
4763         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
4764         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
4765         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
4766         precicion entry for each overloaded builtin.
4767         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
4768         VSCEDPUO): Rename overloaded name.
4769         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
4770         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
4771         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
4772         define_expand for xscmpexqp instruction.
4773         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
4775 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4776             Jinsong Ji <jji@us.ibm.com>
4778         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
4779         function with vec_sl.
4780         (_mm_slli_epi32): Likewise.
4781         (_mm_slli_epi64): Likewise.
4782         (_mm_srai_epi16): Replace deprecated function with vec_sra.
4783         (_mm_srai_epi32): Likewise.
4784         (_mm_srli_epi16): Replace deprecated function with vec_sr.
4785         (_mm_srli_epi32): Likewise.
4786         (_mm_srli_epi64): Likewise.
4787         (_mm_sll_epi16): Replace deprecated function with vec_sl.
4788         (_mm_sll_epi32): Likewise.
4789         (_mm_sll_epi64): Likewise.
4790         (_mm_sra_epi16): Replace deprecated function with vec_sra.
4791         (_mm_sra_epi32): Likewise.
4792         (_mm_srl_epi16): Replace deprecated function with vec_sr.
4793         (_mm_srl_epi32): Likewise.
4794         (_mm_srl_epi64): Likewise.
4796 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4797             Jinsong Ji <jji@us.ibm.com>
4799         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4800         comparison operators with vec_cmp* for compatibility due to
4801         unfortunate history; clean up formatting and use types more
4802         appropriately.
4803         (_mm_sll_epi32): Likewise.
4804         (_mm_sll_epi64): Likewise.
4805         (_mm_srl_epi16): Likewise.
4806         (_mm_srl_epi32): Likewise.
4807         (_mm_srl_epi64): Likewise.
4809 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4810             Jinsong Ji <jji@us.ibm.com>
4812         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4813         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4814         __vector __bool int.  Use vec_cmpgt in preference to deprecated
4815         function vec_vcmpgtfp.
4816         (_mm_max_ps): Likewise.
4818 2018-10-25  Jeff Law  <law@redhat.com>
4820         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4821         if returning false.
4823 2018-10-25  Martin Sebor  <msebor@redhat.com>
4825         * doc/extend.texi (aligned): Expand attribute description.
4826         (Alignment): Rename section.  Discuss function arguments.
4828 2018-10-25  Jan Hubicka  <jh@suse.cz>
4830         * ipa-devirt.c (main_odr_variant): Remove.
4831         (hash_odr_name, types_same_for_odr, types_odr_comparable,
4832         odr_name_hasher::equal, odr_subtypes_equivalent_p):
4833         Drop use of main_odr_variant.
4834         (add_type_duplicate): Silence confused warnings on integer types.
4835         (get_odr_type): Always look for main variant.
4836         (register_odr_type): Simplify.
4838 2018-10-25  Richard Biener  <rguenther@suse.de>
4840         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4841         Initialize ng to silence error with release checking bootstrap.
4843 2018-10-25  Richard Biener  <rguenther@suse.de>
4845         * tree-if-conv.c: Include tree-ssa-sccvn.h.
4846         (tree_if_conversion): Run CSE on the if-converted loop body.
4848 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4850         * config/s390/constraints.md (ZL): New constraint.
4851         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4852         operands.
4853         * config/s390/s390.md (movdi_larl): Remove.
4854         (movdi_64): Add the LARL alternative.
4856 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4858         PR bootstrap/87747
4859         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4860         (RTX_CODE_HWINT_P): New macro.
4861         (rtx_code_size): Use RTX_CODE_HWINT_P ().
4863 2018-10-25  Jan Hubicka  <jh@suse.cz>
4865         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4866         is anonymous.
4868 2018-10-25  Richard Biener  <rguenther@suse.de>
4870         PR tree-optimization/87665
4871         PR tree-optimization/87745
4872         * tree-vectorizer.h (get_earlier_stmt): Remove.
4873         (get_later_stmt): Pick up UID from the original non-pattern stmt.
4875 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
4877         * options.texi (Deprecated): Move list to Var section.
4879 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
4880             Jinsong Ji <jji@us.ibm.com>
4882         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
4883         __vector long to __vector long long.
4884         (_mm_cvtpd_ps): Likewise.
4885         (_mm_cvttpd_epi32): Likewise.
4886         (_mm_cvtpi32_pd): Likewise.
4887         (_mm_unpackhi_epi64): Likewise.
4888         (_mm_unpacklo_epi64): Likewise.
4890 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
4892         PR rtl-optimization/87720
4893         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
4895 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
4897         * gimple-ssa-isolate-paths.c
4898         (find_implicit_erroneous_behavior): Do not change code if the
4899         pass is running for warnings only.
4900         (find_explicit_erroneous_behavior): Likewise.
4902 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
4904         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
4905         Define as rs6000_mangle_decl_assembler_name.
4906         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
4907         long double to IEEE long double, switch the names of the long
4908         double built-in functions to be <func>f128 instead of <func>l.
4910 2018-10-24  Martin Sebor  <msebor@redhat.com>
4912         * doc/extend.texi (nonnull): List no-argument form.  Reference
4913         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
4915 2018-10-24  Richard Biener  <rguenther@suse.de>
4917         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
4919 2018-10-24  Martin Liska  <mliska@suse.cz>
4921         PR tree-optimization/84436
4922         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
4923         Remove.
4924         (switch_conversion::contains_linear_function_p): New.
4925         (switch_conversion::build_one_array): Support linear
4926         transformation on input.
4927         * tree-switch-conversion.h (struct switch_conversion): Add
4928         contains_linear_function_p declaration.
4930 2018-10-24  Richard Biener  <rguenther@suse.de>
4932         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
4933         if its argument is CONSTANT_CLASS_P.
4935 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
4937         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
4938         it is wrong for forward declarations.
4940 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
4942         * config/s390/s390.c (s390_check_qrst_address): Add the missing
4943         SYMBOL_REF_P () check.
4945 2018-10-24  Richard Biener  <rguenther@suse.de>
4947         PR tree-optimization/87105
4948         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
4949         dump classification.
4950         (vect_analyze_data_ref_accesses): Handle duplicate loads and
4951         stores by splitting the affected group after the fact.
4952         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
4953         fail the SLP build because of size constraints.
4955 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4957         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
4958         * configure: Regenerate.
4959         * config.in: Regenerate.
4960         * varasm.c (mergeable_string_section): Use readonly_data_section
4961         if linker doesn't support SHF_MERGE with alignment > 8.
4962         (mergeable_constant_section): Likewise.
4964 2018-10-24  Richard Biener  <rguenther@suse.de>
4966         PR tree-optimization/84013
4967         * tree-ssa-structalias.c (struct msdi_data): New struct for
4968         marshalling data to walk_stmt_load_store_ops.
4969         (maybe_set_dependence_info): Refactor as callback for
4970         walk_stmt_load_store_ops.
4971         (compute_dependence_clique): Set restrict info on all stmt kinds.
4973 2018-10-24  Martin Liska  <mliska@suse.cz>
4975         * cgraph.c (cgraph_node::dump):
4976         Remove reduntant dumps and make tp_first_run dump more compact.
4978 2018-10-24  Richard Biener  <rguenther@suse.de>
4980         PR tree-optimization/87665
4981         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
4982         to reflect reality.
4984 2018-10-12  Jeff Law  <law@redhat.com>
4986         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
4987         for H8/S.
4989 2018-10-23  Richard Biener  <rguenther@suse.de>
4991         * tree-vrp.c (add_assert_info): Guard dump_printf with
4992         dump_enabled_p.
4993         * gimple-ssa-evrp-analyze.c
4994         (evrp_range_analyzer::record_ranges_from_incoming_edge):
4995         Use value_range::ignore_equivs_equal_p.
4997 2018-10-23  Richard Biener  <rguenther@suse.de>
4999         PR tree-optimization/87105
5000         PR tree-optimization/87608
5001         * passes.def (pass_all_early_optimizations): Add early phi-opt
5002         after dce.
5003         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5004         addition to debug stmts.
5005         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5006         and abs replacement early.
5007         * tree-cfg.c (gimple_empty_block_p): Likewise.
5009 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
5011         PR target/86383
5012         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5013         specified to configure.
5014         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5016 2018-10-23  Richard Biener  <rguenther@suse.de>
5018         PR tree-optimization/87700
5019         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5021 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
5023         PR target/87674
5024         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5025         second argument from __mmask16 to __mmask8.
5026         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5027         _mm_mask_packs_epi32): Likewise.
5028         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5029         Likewise.
5030         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
5032 2018-10-23  Richard Biener  <rguenther@suse.de>
5034         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5036 2018-10-23  Richard Biener  <rguenther@suse.de>
5038         PR tree-optimization/86144
5039         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5040         over simd attribute.
5042 2018-10-23  Richard Biener  <rguenther@suse.de>
5044         PR tree-optimization/87693
5045         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5046         the case we do not find the taken edge.
5048 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
5049             Jinsong Ji  <jji@us.ibm.com>
5051         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5052         (_mm_store_pd): Use unaligned vector type for pointer cast.
5053         (_mm_maskmoveu_si128): Likewise.
5054         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5055         (_mm_store_ps): Use unaligned vector type for pointer cast.
5057 2018-10-22  Paul Koning  <ni1d@arrl.net>
5059         * symtab.c (symtab_node::increase_alignment): Correct max
5060         alignment check.
5062 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
5064         PR tree-optimization/87633
5065         * match.pd: Do not generate unordered integer comparisons.
5067 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5069         PR rtl-optimization/87600
5070         * combine.c: Add include of expr.h.
5071         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5072         register to a pseudo.
5073         (make_more_copies): New function, add a copy to a new pseudo after
5074         the moves from hard registers into pseudos.
5075         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5076         later.  Call make_more_copies.
5078 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
5080         * lra-constraints.c (process_alt_operands): New local array,
5081         matching_early_clobber.  Check matching_early_clobber before
5082         decrementing reject, and set matching_early_clobber after.
5084 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
5086         PR target/87598
5087         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5088         call output_addr_const and hope for the best.
5090 2018-10-22  Richard Biener  <rguenther@suse.de>
5092         * gimple-ssa-evrp-analyze.c
5093         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5094         smarter about what ranges to use.
5095         * tree-vrp.c (add_assert_info): Dump here.
5096         (register_edge_assert_for_2): Instead of here at multiple but
5097         not all places.
5099         * gcc.dg/tree-ssa/evrp12.c: New testcase.
5100         * gcc.dg/predict-6.c: Adjust.
5101         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5102         * gcc.dg/tree-ssa/vrp02.c: Likewise.
5103         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5105 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
5106         Richard Biener  <rguenther@suse.de>
5108         * bitmap.h: Update data structure documentation, including a
5109         description of bitmap views as either linked-lists or splay trees.
5110         (struct bitmap_element_def): Update comments for splay tree bitmaps.
5111         (struct bitmap_head_def): Likewise.
5112         (bitmap_list_view, bitmap_tree_view): New prototypes.
5113         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5114         tree_form fields.
5115         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5116         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5117         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5118         released bitmap element here.
5119         (bitmap_element_free): Remove.
5120         (bitmap_elt_clear_from): Work on splay tree bitmaps.
5121         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
5122         this function similar ones such that linked-list bitmap implementation
5123         functions are grouped.
5124         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5125         and moved for grouping.
5126         (bitmap_list_insert_element_after): Renamed from
5127         bitmap_elt_insert_after, and moved for grouping.
5128         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5129         (bitmap_tree_link_left, bitmap_tree_link_right,
5130         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5131         bitmap_tree_link_element, bitmap_tree_unlink_element,
5132         bitmap_tree_find_element): New functions for splay-tree bitmap
5133         implementation.
5134         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5135         Renamed and moved, see above entries.
5136         (bitmap_tree_listify_from): New function to convert part of a splay
5137         tree bitmap to a linked-list bitmap.
5138         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5139         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5140         (bitmap_find_bit): Remove.
5141         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5142         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5143         Handle splay tree bitmaps.
5144         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5145         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5146         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5147         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5148         bitmap_intersect_compl_p, bitmap_ior_and_compl,
5149         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5150         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
5151         corresponding changes to use linked-list specific bitmap_element
5152         manipulation functions as applicable for efficiency.
5153         (bitmap_tree_to_vec): New function.
5154         (debug_bitmap_elt_file): New function split out from ...
5155         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
5156         (bitmap_print): Likewise.
5158         PR tree-optimization/63155
5159         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5160         SSA edge worklists.
5161         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5162         in tree-view.
5164 2018-10-22  Martin Liska  <mliska@suse.cz>
5166         PR tree-optimization/87686
5167         Revert
5168         2018-08-29  Martin Liska  <mliska@suse.cz>
5170         * tree-switch-conversion.c (switch_conversion::expand):
5171         Strenghten assumption about gswitch statements.
5173 2018-10-22  Martin Liska  <mliska@suse.cz>
5175         * ipa-icf.c (sem_item::compare_attributes): Remove.
5176         (sem_item::compare_referenced_symbol_properties): Use
5177         attribute_list_equal instead.
5178         (sem_function::equals_wpa): Likewise.
5179         * ipa-icf.h: Remove compare_attributes.
5181 2018-10-22  Richard Biener  <rguenther@suse.de>
5183         PR middle-end/87682
5184         * mem-stats.h (mem_usage::operator==): Fix pasto.
5186 2018-10-22  Richard Biener  <rguenther@suse.de>
5188         PR tree-optimization/87640
5189         * tree-vrp.c (set_value_range_with_overflow): Decompose
5190         incomplete result.
5191         (extract_range_from_binary_expr_1): Adjust.
5193 2018-10-22  Martin Jambor  <mjambor@suse.cz>
5195         * tree-eh.h (stmt_could_throw_p): Add function parameter.
5196         (stmt_can_throw_external): Likewise.
5197         (stmt_can_throw_internal): Likewise.
5198         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5199         (lower_eh_constructs_2): Likewise.
5200         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5201         (stmt_can_throw_external): Likewise.
5202         (stmt_can_throw_internal): Likewise.
5203         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5204         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5205         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5206         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5207         (pass_lower_eh_dispatch::execute): Pass cfun to
5208         stmt_can_throw_external.
5209         (cleanup_empty_eh): Likewise.
5210         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
5211         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
5212         stmt_can_throw_external instead of pushing it to cfun.
5213         (symbol_table::create_edge): Likewise.
5214         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
5215         stmt_can_throw_internal.
5216         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
5217         to stmt_could_throw_p.
5218         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
5219         stmt_can_throw_internal.
5220         (pass_store_merging::execute): Likewise.
5221         * gimple-ssa-strength-reduction.c
5222         (find_candidates_dom_walker::before_dom_children): Pass cfun to
5223         stmt_could_throw_p.
5224         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
5225         stmt_can_throw_internal.
5226         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
5227         to stmt_can_throw_external.
5228         (check_stmt): Pass cfun to stmt_could_throw_p.
5229         (check_stmt): Pass cfun to stmt_can_throw_external.
5230         (pass_nothrow::execute): Likewise.
5231         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
5232         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
5233         stmt_can_throw_internal.
5234         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
5235         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
5236         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
5237         * tree-complex.c (expand_complex_libcall): Pass cfun to
5238         stmt_could_throw_p and to stmt_can_throw_internal.
5239         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
5240         * tree-inline.c (copy_edges_for_bb): Likewise.
5241         (maybe_move_debug_stmts_to_successors): Likewise.
5242         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
5243         stmt_could_throw_p.
5244         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
5245         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
5246         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
5247         stmt_can_throw_internal.
5248         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
5249         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
5250         stmt_could_throw_p.
5251         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
5252         stmt_can_throw_internal.
5253         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
5254         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
5255         stmt_could_throw_p.
5256         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
5257         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
5258         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5259         (convert_mult_to_fma_1): Likewise.
5260         (convert_to_divmod): Likewise.
5261         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
5262         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
5263         * tree-ssa-propagate.c
5264         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
5265         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
5266         (maybe_optimize_range_tests): Likewise.
5267         (linearize_expr_tree): Likewise.
5268         (reassociate_bb): Likewise.
5269         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5270         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
5271         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
5272         (handle_char_store): Likewise.
5273         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
5274         stmt_can_throw_internal.
5275         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
5276         stmt_could_throw_p.
5277         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5278         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
5279         (vectorizable_simd_clone_call): Likewise.
5280         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
5281         (gimple_stringop_fixed_value): Likewise.
5283 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
5285         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
5286         literal pool references.
5287         (s390_check_qrst_address): Adapt to the new behavior of
5288         s390_loadrelative_operand_p ().
5290 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
5292         PR target/72782
5293         * config/i386/sse.md (*andnot<mode>3_bcst): New.
5295 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
5297         PR target/72782
5298         * config/i386/sse.md (*<code><mode>3_bcst): New.
5300 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
5302         PR target/72782
5303         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
5304         V4DI, V16SI and V8DI.
5305         (*sub<mode>3<mask_name>_bcst): New.
5306         (*add<mode>3<mask_name>_bcst): Likewise.
5308 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
5309             Jinsong Ji  <jji@us.ibm.com>
5311         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
5312         __m64 with __vector unsigned long long for compatibility.
5313         (_mm_movemask_epi8): Likewise.
5314         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
5315         (_mm_cvttps_pi32): Likewise.
5316         (_mm_cvtpi32_ps): Likewise.
5317         (_mm_cvtps_pi16): Likewise.
5318         (_mm_loadh_pi): Likewise.
5319         (_mm_storeh_pi): Likewise.
5320         (_mm_movehl_ps): Likewise.
5321         (_mm_movelh_ps): Likewise.
5322         (_mm_loadl_pi): Likewise.
5323         (_mm_storel_pi): Likewise.
5324         (_mm_movemask_ps): Likewise.
5325         (_mm_shuffle_pi16): Likewise.
5327 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5329         PR target/72782
5330         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
5331         __builtin_ia32_vfnmsubpd512_mask.
5332         (_mm512_mask_fnmsub_round_pd): Likewise.
5333         (_mm512_fnmsub_pd): Likewise.
5334         (_mm512_mask_fnmsub_pd): Likewise.
5335         (_mm512_maskz_fnmsub_round_pd): Use
5336         __builtin_ia32_vfnmsubpd512_maskz.
5337         (_mm512_maskz_fnmsub_pd): Likewise.
5338         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
5339         (_mm512_mask_fnmsub_round_ps): Likewise.
5340         (_mm512_fnmsub_ps): Likewise.
5341         (_mm512_mask_fnmsub_ps): Likewise.
5342         (_mm512_maskz_fnmsub_round_ps): Use
5343         __builtin_ia32_vfnmsubps512_maskz.
5344         (_mm512_maskz_fnmsub_ps): Likewise.
5345         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
5346         __builtin_ia32_vfnmsubpd256_mask.
5347         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
5348         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5349         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
5350         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5351         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5352         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
5353         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
5354         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
5355         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
5356         __builtin_ia32_vfnmsubpd.
5357         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
5358         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
5359         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
5360         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
5361         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
5362         * config/i386/i386-builtin.def: Add
5363         __builtin_ia32_vfnmsubpd256_mask,
5364         __builtin_ia32_vfnmsubpd256_maskz,
5365         __builtin_ia32_vfnmsubpd128_mask,
5366         __builtin_ia32_vfnmsubpd128_maskz,
5367         __builtin_ia32_vfnmsubps256_mask,
5368         __builtin_ia32_vfnmsubps256_maskz,
5369         __builtin_ia32_vfnmsubps128_mask,
5370         __builtin_ia32_vfnmsubps128_maskz,
5371         __builtin_ia32_vfnmsubpd512_mask,
5372         __builtin_ia32_vfnmsubpd512_maskz,
5373         __builtin_ia32_vfnmsubps512_mask,
5374         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
5375         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
5376         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
5377         __builtin_ia32_vfnmsubpd256.
5378         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
5379         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
5380         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
5381         Likewise.
5382         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
5383         Likewise.
5384         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
5385         Likewise.
5386         (fmai_vmfnmsub_<mode><round_name>): Likewise.
5388 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5390         PR target/72782
5391         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
5392         __builtin_ia32_vfnmaddpd512_mask.
5393         (_mm512_mask_fnmadd_round_pd): Likewise.
5394         (_mm512_fnmadd_pd): Likewise.
5395         (_mm512_mask_fnmadd_pd): Likewise.
5396         (_mm512_maskz_fnmadd_round_pd): Use
5397         __builtin_ia32_vfnmaddpd512_maskz.
5398         (_mm512_maskz_fnmadd_pd): Likewise.
5399         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
5400         (_mm512_mask_fnmadd_round_ps): Likewise.
5401         (_mm512_fnmadd_ps): Likewise.
5402         (_mm512_mask_fnmadd_ps): Likewise.
5403         (_mm512_maskz_fnmadd_round_ps): Use
5404         __builtin_ia32_vfnmaddps512_maskz.
5405         (_mm512_maskz_fnmadd_ps): Likewise.
5406         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
5407         __builtin_ia32_vfnmaddpd256_mask.
5408         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
5409         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
5410         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
5411         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5412         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5413         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
5414         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
5415         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
5416         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
5417         __builtin_ia32_vfnmaddpd.
5418         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
5419         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
5420         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
5421         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
5422         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
5423         * config/i386/i386-builtin.def: Add
5424         __builtin_ia32_vfnmaddpd256_mask,
5425         __builtin_ia32_vfnmaddpd256_maskz,
5426         __builtin_ia32_vfnmaddpd128_mask,
5427         __builtin_ia32_vfnmaddpd128_maskz,
5428         __builtin_ia32_vfnmaddps256_mask,
5429         __builtin_ia32_vfnmaddps256_maskz,
5430         __builtin_ia32_vfnmaddps128_mask,
5431         __builtin_ia32_vfnmaddps128_maskz,
5432         __builtin_ia32_vfnmaddpd512_mask,
5433         __builtin_ia32_vfnmaddpd512_maskz,
5434         __builtin_ia32_vfnmaddps512_mask,
5435         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
5436         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
5437         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
5438         __builtin_ia32_vfnmaddpd256.
5439         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
5440         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
5441         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
5442         Likewise.
5443         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
5444         Likewise.
5445         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
5446         Likewise.
5447         (fmai_vmfnmadd_<mode><round_name>): Likewise.
5449 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5451         PR target/72782
5452         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
5453         __builtin_ia32_vfmsubpd512_mask.
5454         (_mm512_mask_fmsub_round_pd): Likewise.
5455         (_mm512_fmsub_pd): Likewise.
5456         (_mm512_mask_fmsub_pd): Likewise.
5457         (_mm512_maskz_fmsub_round_pd): Use
5458         __builtin_ia32_vfmsubpd512_maskz.
5459         (_mm512_maskz_fmsub_pd): Likewise.
5460         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
5461         (_mm512_mask_fmsub_round_ps): Likewise.
5462         (_mm512_fmsub_ps): Likewise.
5463         (_mm512_mask_fmsub_ps): Likewise.
5464         (_mm512_maskz_fmsub_round_ps): Use
5465         __builtin_ia32_vfmsubps512_maskz.
5466         (_mm512_maskz_fmsub_ps): Likewise.
5467         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
5468         __builtin_ia32_vfmsubpd256_mask.
5469         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
5470         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5471         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
5472         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5473         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5474         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
5475         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
5476         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
5477         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
5478         __builtin_ia32_vfmsubpd.
5479         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
5480         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
5481         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
5482         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
5483         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
5484         * config/i386/i386-builtin.def: Add
5485         __builtin_ia32_vfmsubpd256_mask,
5486         __builtin_ia32_vfmsubpd256_maskz,
5487         __builtin_ia32_vfmsubpd128_mask,
5488         __builtin_ia32_vfmsubpd128_maskz,
5489         __builtin_ia32_vfmsubps256_mask,
5490         __builtin_ia32_vfmsubps256_maskz,
5491         __builtin_ia32_vfmsubps128_mask,
5492         __builtin_ia32_vfmsubps128_maskz,
5493         __builtin_ia32_vfmsubpd512_mask,
5494         __builtin_ia32_vfmsubpd512_maskz,
5495         __builtin_ia32_vfmsubps512_mask,
5496         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
5497         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
5498         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
5499         __builtin_ia32_vfmsubpd256.
5500         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
5501         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
5502         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
5503         Likewise.
5504         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
5505         Likewise.
5506         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
5507         Likewise.
5508         (fmai_vmfmsub_<mode><round_name>): Likewise.
5510 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5512         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
5513         Remove plus.  Renamed to ...
5514         (*sub<mode>3<mask_name>_bcst): This.
5515         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
5516         (*add<mode>3<mask_name>_bcst): This.
5518 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5520         PR target/72782
5521         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
5523 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
5525         PR target/87662
5526         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
5527         (_mm_or_epi32): Likewise.
5528         (_mm256_xor_epi32): Likewise.
5529         (_mm_xor_epi32): Likewise.
5530         (_mm256_or_epi64): Likewise.
5531         (_mm_or_epi64): Likewise.
5532         (_mm256_xor_epi64): Likewise.
5533         (_mm_xor_epi64): Likewise.
5535 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
5537         PR target/72782
5538         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
5540 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
5542         PR middle-end/87647
5543         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
5545 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
5547         * doc/ux.texi: Move @section directly after @node.
5549 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
5551         PR middle-end/85488
5552         PR middle-end/87649
5553         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
5554         depend closely nested inside of loop with ordered clause with
5555         a parameter.
5557 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
5559         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
5560         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
5561         * doc/ux.texi: New file.
5563 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
5565         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
5566         be the first CR field allocated.
5568 2018-10-19  Richard Biener  <rguenther@suse.de>
5570         PR target/87657
5571         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
5572         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
5574 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
5576         PR target/72782
5577         * config/i386/sse.md
5578         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
5579         (*add<mode>3<mask_name>_bcst_2): Likewise.
5581 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
5583         * config/i386/sse.md
5584         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5585         Replace nonimmediate_operand with register_operand.
5586         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5587         Likewise.
5588         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5589         Likewise.
5591 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
5593         PR rtl-optimization/87596
5594         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
5595         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
5596         for instructions in FROM..TO range.
5598 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
5600         * cfgexpand.c (expand_one_var): Use specific wording in error message
5601         for non-local frame variables.
5602         * stor-layout.c (layout_decl): Do not issue a warning for them.
5604 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
5606         * haifa-sched.c (priority): Add force_recompute parameter.
5607         (apply_replacement): Call priority () with force_recompute = true.
5608         (restore_pattern): Likewise.
5610 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5612         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
5613         HOST_BITS_PER_WIDE_INT.
5614         (test_vector_ops_duplicate): Likewise.
5616 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5618         PR target/72782
5619         * config/i386/sse.md (VF_AVX512): New.
5620         (avx512bcst): Likewise.
5621         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5622         Likewise.
5623         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5624         Likewise.
5625         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5626         Likewise.
5628 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
5630         * doc/invoke.texi (-dumpversion): Improve grammar.
5631         (-dumpfullversion): Make more consistent with -dumpversion.
5633 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
5635         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
5636         Set JUMP_LABEL to the jump insn.
5637         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
5638         Predict emitted jump and add label to jump insn.
5640 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
5642         PR tree-optimization/87562
5643         * input.c (get_substring_ranges_for_loc): Use
5644         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
5645         getting the linemap for the endpoint.  Verify that it's either
5646         in the same linemap as the start point's spelling location, or
5647         at least in the same file.
5649 2018-10-18  Richard Biener  <rguenther@suse.de>
5651         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
5652         feed width-specific load/store costs through ix86_vec_cost.
5653         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
5654         (k8_cost): Likewise.
5655         (bdver_cost): Likewise.
5656         (znver1_cost): Likewise.
5657         (btver1_cost): Likewise.
5658         (btver2_cost): Likewise.
5660 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5662         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
5663         to simplify subreg of vec_merge.
5665 2018-10-18  Richard Biener  <rguenther@suse.de>
5667         * config/i386/i386.c: Fix costing of vector FMA.
5669 2018-10-18  Richard Biener  <rguenther@suse.de>
5671         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
5672         and argument.
5673         (ix86_builtin_vectorization_cost): For vec_construct properly
5674         cost insertion into SSE regs.
5675         (...): Adjust calls to ix86_vec_cost.
5677 2018-10-18  Richard Biener  <rguenther@suse.de>
5679         PR middle-end/87087
5680         Revert
5681         2018-02-07  Richard Biener  <rguenther@suse.de>
5683         PR tree-optimization/84204
5684         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
5685         this place.
5687 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5689         PR target/87537
5690         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
5691         of vec_duplicate.
5692         (test_vector_ops_duplicate): Add test for a scalar subreg of a
5693         VEC_MERGE of a VEC_DUPLICATE.
5695 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5697         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
5698         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
5699         * doc/standards.texi (C Language): Document C2X.
5700         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
5701         (rl78_option_override): Handle "GNU C2X" language name.
5703 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5705         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
5706         Document C17 as published in 2018.
5708 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
5710         PR middle-end/87623
5711         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
5712         bail out if both sides do not have the same storage order.
5714 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5716         * bitmap.c (bitmap_head::dump): New.
5717         * bitmap.h (bitmap_head): Add dump().
5718         * gimple-ssa-evrp-analyze.c
5719         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
5720         (evrp_range_analyzer::set_ssa_range_info): Same.
5721         (evrp_range_analyzer::record_ranges_from_phis): Same.
5722         (evrp_range_analyzer::record_ranges_from_stmt): Same.
5723         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
5724         * gimple-ssa-sprintf.c (get_int_range): Same.
5725         (format_integer): Same.
5726         (sprintf_dom_walker::handle_gimple_call): Same.
5727         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
5728         (ipcp_vr_lattice::top_p): Same.
5729         (ipcp_vr_lattice::bottom_p): Same.
5730         (ipcp_vr_lattice::set_to_bottom): Same.
5731         (ipa_vr_operation_and_type_effects): Same.
5732         (propagate_vr_across_jump_function): Same.
5733         (ipcp_store_vr_results): Same.
5734         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
5735         (ipa_print_node_jump_functions_for_edge): Same.
5736         (ipa_get_value_range): Same.
5737         (ipa_compute_jump_functions_for_edge): Same.
5738         (ipa_write_jump_function): Same.
5739         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
5740         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
5741         Same.
5742         * vr-values.c (set_value_range_to_nonnegative): Same.
5743         (set_value_range_to_truthvalue): Same.
5744         (vr_values::get_value_range): Same.
5745         (vr_values::set_defs_to_varying): Same.
5746         (vr_values::update_value_range): Same.
5747         (symbolic_range_based_on_p): Same.
5748         (vr_values::op_with_boolean_value_range_p): Same.
5749         (vr_values::extract_range_for_var_from_comparison_expr): Same.
5750         (vr_values::extract_range_from_ssa_name): Same.
5751         (vr_values::extract_range_from_binary_expr): Same.
5752         (vr_values::extract_range_from_unary_expr): Same.
5753         (vr_values::extract_range_from_cond_expr): Same.
5754         (vr_values::extract_range_from_comparison): Same.
5755         (vr_values::check_for_binary_op_overflow): Same.
5756         (vr_values::extract_range_basic): Same.
5757         (vr_values::extract_range_from_assignment): Same.
5758         (compare_ranges): Same.
5759         (compare_range_with_value): Same.
5760         (vr_values::adjust_range_with_scev): Same.
5761         (vrp_valueize): Same.
5762         (vrp_valueize_1): Same.
5763         (vr_values::get_vr_for_comparison): Same.
5764         (vr_values::compare_name_with_value): Same.
5765         (vr_values::compare_names): Same.
5766         (vr_values::vrp_evaluate_conditional): Same.
5767         (find_case_label_ranges): Same.
5768         (vr_values::vrp_visit_switch_stmt): Same.
5769         (vr_values::extract_range_from_phi_node): Same.
5770         (vr_values::simplify_div_or_mod_using_ranges): Same.
5771         (vr_values::simplify_bit_ops_using_ranges): Same.
5772         (test_for_singularity): Same.
5773         (range_fits_type_p): Same.
5774         (vr_values::simplify_cond_using_ranges_1): Same.
5775         (vr_values::simplify_switch_using_ranges): Same.
5776         (vr_values::simplify_float_conversion_using_ranges): Same.
5777         (vr_values::two_valued_val_range_p): Same.
5778         (vr_values::add_equivalence): Move to value_range::equiv_add.
5779         * vr-values.h (vr_values::add_equivalence): Remove.
5780         (VR_INITIALIZER): Remove.
5781         * tree-vrp.c (value_range::set): New.
5782         (value_range::equiv_add): New.
5783         (value_range::value_range): New.
5784         (value_range::deep_copy): New.
5785         (value_range::check): New.
5786         (value_range::equal_p): New.
5787         (value_range::ignore_equivs_equal_p): New.
5788         (value_range::operator==): New.
5789         (value_range::operator!=): New.
5790         (value_range::symbolic_p): New.
5791         (value_range::numeric_p): New.
5792         (value_range::set_undefined): New.
5793         (value_range::set_varying): New.
5794         (value_range::may_contain_p): New.
5795         (value_range::equiv_clear): New.
5796         (value_range::singleton_p): New.
5797         (value_range::intersect): New.
5798         (value_range::dump): New.
5799         (value_range::set_and_canonicalize): New.
5800         (set_value_range): Adjust for value_range API.
5801         (set_value_range_to_undefined): Same.
5802         (set_value_range_to_varying): Same.
5803         (set_and_canonicalize_value_range): Same.
5804         (set_value_range_to_nonnull): Same.
5805         (set_value_range_to_null): Same.
5806         (range_is_null): Same.
5807         (range_is_nonnull): Same.
5808         (range_int_cst_p): Same.
5809         (range_int_cst_singleton_p): Same.
5810         (symbolic_range_p): Same.
5811         (range_includes_zero_p): Same.
5812         (value_range_constant_singleton): Same.
5813         (vrp_set_zero_nonzero_bits): Same.
5814         (ranges_from_anti_range): Same.
5815         (extract_range_into_wide_ints): Same.
5816         (extract_range_from_multiplicative_op): Same.
5817         (set_value_range_with_overflow): Same.
5818         (extract_range_from_binary_expr_1): Same.
5819         (extract_range_from_unary_expr): Same.
5820         (dump_value_range): Same.
5821         (debug_value_range): Same.
5822         (vrp_prop::check_array_ref): Same.
5823         (vrp_prop::check_mem_ref): Same.
5824         (vrp_prop::vrp_initialize): Same.
5825         (vrp_prop::visit_stmt): Same.
5826         (intersect_ranges): Same.
5827         (vrp_prop::visit_phi): Same.
5828         (vrp_prop::vrp_finalize): Same.
5829         (determine_value_range_1): Same.
5830         (determine_value_range): Same.
5831         (vrp_intersect_ranges_1): Rename to...
5832         (vrp_intersect_1): this.
5833         (vrp_intersect_ranges): Rename to...
5834         (value_range::intersect_helper): ...this.
5835         (vrp_meet_1): Rename to...
5836         (value_range::union_helper): ...this.
5837         (vrp_meet): Rename to...
5838         (value_range::union_): ...this.
5839         (copy_value_range): Remove.
5840         * tree-vrp.h (struct value_range): Rewrite into a proper class.
5841         (value_range::vrtype): New.
5842         (value_range::type): New.
5843         (value_range::equiv): New.
5844         (value_range::min): New.
5845         (value_range::max): New.
5846         (value_range::varying_p): New.
5847         (value_range::undefined_p): New.
5848         (value_range::null_p): New.
5849         (value_range::equiv_add): New.
5850         (copy_value_range): Remove.
5852 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
5854         * Makefile.in (SELFTEST_TARGETS): New.
5855         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5856         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5857         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5858         c/Make-lang.in.
5859         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5860         (selftest-c++-gdb, selftest-c++-valgrind): Move to
5861         cp/Make-lang.in.
5862         * configure: Regenerate.
5863         * configure.ac (selftest_languages): New.
5865 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5867         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5868         overflow wraps argument.
5869         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5870         wide_int_range_multiplicative_op.
5871         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5872         overflow wraps argument.
5873         (wide_int_range_multiplicative_op): Same.
5874         (wide_int_range_lshift): Same.
5875         (wide_int_range_div): Same.
5876         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
5877         (wide_int_range_lshift): Same.
5878         (wide_int_range_div): Same.
5880 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5882         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
5883         use sign as argument.
5884         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
5885         wide_int_range_shift_undefined_p.
5887 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5889         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
5890         Rename to...
5891         (@despeculate_copy<ALLI_TI:mode>): ... This.
5892         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
5893         switch statement.
5895 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5897         * config.gcc: Obsolete *-*-solaris2.10*.
5898         * doc/install.texi (Specific, *-*-solaris2*): Document it.
5900 2018-10-12  Jeff Law  <law@redhat.com>
5902         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
5903         reg + sym +- const_int addressing modes.
5905 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
5907         * common.opt (fdiagnostics-minimum-margin-width=): New option.
5908         * diagnostic-show-locus.c (layout::layout): Apply the minimum
5909         margin width.
5910         (layout::start_annotation_line): Only print up to 3 of the
5911         margin character, to avoid touching the left-hand side.
5912         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
5913         minimum margin width, as set by test_diagnostic_context's ctor.
5914         (selftest::test_fixit_insert_containing_newline): Likewise.
5915         (selftest::test_fixit_insert_containing_newline_2): Likewise.
5916         (selftest::test_line_numbers_multiline_range): Clear
5917         dc.min_margin_width.
5918         * diagnostic.c (diagnostic_initialize): Initialize
5919         min_margin_width.
5920         * diagnostic.h (struct diagnostic_context): Add field
5921         "min_margin_width".
5922         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
5923         * opts.c (common_handle_option): Handle
5924         OPT_fdiagnostics_minimum_margin_width_.
5925         * selftest-diagnostic.c
5926         (selftest::test_diagnostic_context::test_diagnostic_context):
5927         Initialize min_margin_width to 6.
5928         * toplev.c (general_init): Initialize global_dc->min_margin_width.
5930 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
5932         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
5933         Fix usage of "error_at_rich_loc" in the comment.
5935 2018-10-15  Renlin Li  <renlin.li@arm.com>
5937         PR target/87563
5938         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
5939         if-conversioned loop when it contains ifn with types not
5940         supported by backend.
5941         * internal-fn.c (expand_direct_optab_fn): Add an assert.
5942         (direct_internal_fn_supported_p): New helper function.
5943         * internal-fn.h (direct_internal_fn_supported_p): Declare.
5945 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
5947         PR target/87572
5948         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5949         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5950         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5952 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
5954         PR tree-optimization/87022
5955         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
5956         bits in dist vector rather than the first one.
5958 2018-10-15  Richard Biener  <rguenther@suse.de>
5960         PR middle-end/87610
5961         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
5962         (visit_loadstore): When a used restrict tag escaped verify that
5963         the points-to solution of "other" pointers do not include
5964         escaped.
5965         (compute_dependence_clique): If a used restrict tag escaped
5966         communicated that down to visit_loadstore.
5968 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
5970         * config/s390/s390.c (s390_expand_vec_init): Force vector element
5971         into reg if it isn't a general operand.
5973 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
5975         PR target/87599
5976         * config/i386/sse.md (*vec_dupv2di): Add register source to
5977         movddup.
5979 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
5981         PR target/87572
5982         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5983         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
5984         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5985         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5987 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
5989         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
5990         (notice_args_size): Set it in the current trace if no insn that can
5991         throw internally has been seen yet.
5992         (connect_traces): When connecting args_size between traces, allow the
5993         incoming values not to match if there is an insn setting it before the
5994         first insn that can throw internally; in that case, force the creation
5995         of a CFI note on this latter insn.
5997 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
5999         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6000         the base class, because using the injected-class-name was not clearly
6001         specified until DR 176.
6003 2018-10-12  Paul Koning  <ni1d@arrl.net>
6005         * config/pdp11/pdp11.md (doloop_end): New expander.
6006         (doloop_end_insn): renamed from "doloop_end".
6007         (addqi3): New pattern.
6008         (subqi3): New pattern.
6009         * config/pdp11/predicates.md (incdec_operand): New predicate.
6011 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
6013         PR middle-end/81376
6014         * real.c (format_helper::can_represent_integral_type_p): New function
6015         * real.h (format_helper::can_represent_integral_type_p): Ditto.
6016         * match.pd: New pattern.
6018 2018-10-12  Alexandre Oliva <oliva@adacore.com>
6020         * configure.ac: Introduce --enable-large-address-aware
6021         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6022         * doc/install.texi: Document it.
6023         * configure, config.in: Rebuilt.
6024         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6025         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6026         (LINK_SPEC): Insert it.
6027         * config/i386/mingw-w64.h: Likewise.
6029         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6031 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
6033         PR rtl-optimization/87600
6034         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6036 2018-10-12  Paul Koning  <ni1d@arrl.net>
6038         * doc/md.texi (doloop_end): Document that the pattern code may
6039         need to check operand mode.
6041 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
6043         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6044         to zero-extend between int and floating-point registers.
6045         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6046         ldp into floating-point registers.  Add type and arch attributes.
6047         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6048         Use f_loads for type attribute.
6050 2018-10-11  Martin Sebor  <msebor@redhat.com>
6052         * doc/extend.texi (attribute packed): Correct typos.
6054 2018-10-11  Martin Sebor  <msebor@redhat.com>
6056         * doc/extend.texi (attribute flatten): Mention interaction with
6057         noinline.
6059 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
6061         PR target/87156
6062         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6063         Set new_decl virtual flag to zero.
6065 2018-10-11  Martin Sebor  <msebor@redhat.com>
6067         PR middle-end/87593
6068         * doc/extend.texi (attribute format_arg): Discuss using multiple
6069         attributes on a single function.
6071 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
6073         PR tree-optimization/86829
6074         * match.pd (sin (atan (x))): New simplification rules.
6075         (cos (atan (x))): Likewise.
6076         * real.c (build_sinatan_real): New function.
6077         * real.h (build_sinatan_real): Prototype.
6079 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
6081         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6082         function.
6083         (fold_mergeeo_helper): New helper function.
6084         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6085         intrinsics.  Correct some whitespace indentation issues.
6087 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
6089         PR target/87511
6090         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6091         Use HOST_WIDE_INT_1U for shift.
6093 2018-10-11  Doug Rupp  <rupp@adacore.com>
6094             Olivier Hainque  <hainque@adacore.com>
6096         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6097         Pass --relax to the linker for RTPs.
6098         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6100 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
6101             Jan Hubicka  <jh@suse.cz>
6102             Martin Jambor  <mjambor@suse.cz>
6104         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6105         the same elements are repeated rather than printing all of them.
6106         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6107         "repeated" elements.
6108         * read-rtl-function.c (test_loading_repeat): New function.
6109         (read_rtl_function_c_tests): Call test_loading_repeat.
6110         * rtl-tests.c (test_dumping_repeat): New function.
6111         (rtl_tests_c_tests): Call test_dumping_repeat.
6113 2018-10-11  Richard Biener  <rguenther@suse.de>
6115         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6116         bdver?_cost): Unify to ...
6117         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6118         * config/i386/i386.c (processor_cost_table): Adjust.
6120 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
6122         PR middle-end/87574
6123         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6124         the thunk when expanding to GIMPLE.
6126 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6128         * varasm.c (mergeable_string_section): Don't try to move zero-length
6129         strings to the merge section.
6131 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
6133         PR target/87573
6134         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6136 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
6138         PR target/87550
6139         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6140         to special_args set.
6142 2018-10-10  Richard Biener  <rguenther@suse.de>
6144         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6145         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6146         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6147         and recursing and pattern terminating the recursion on SSE
6148         vector width using ix86_expand_reduc.
6149         (reduc_sminmax_scal_<mode>): Split into part reducing to half
6150         width and recursing and SSE2 vector variant doing the final
6151         reduction with ix86_expand_reduc.
6152         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6153         with terminating the recursion at AVX level, splitting that
6154         to SSE there.
6156 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
6158         * genmatch.c (error_cb): Rename to...
6159         (diagnostic_cb): ...this, converting int params to enums.
6160         (fatal_at): Update for renaming.
6161         (warning_at): Likewise.
6162         (main): Likewise.
6163         * input.c (selftest::ebcdic_execution_charset::apply):
6164         Update for renaming of...
6165         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6166         to...
6167         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6168         converting level and reason to enums.
6169         (class selftest::lexer_error_sink): Rename to...
6170         (class selftest::lexer_test_options): ...this, renaming field
6171         "m_errors" to "m_diagnostics".
6172         (selftest::lexer_test_options::apply): Update for renaming of...
6173         (selftest::lexer_test_options::on_error): ...this, renaming to...
6174         (selftest::lexer_test_options::on_diagnostic): ...this
6175         converting level and reason to enums.
6176         (selftest::test_lexer_string_locations_raw_string_unterminated):
6177         Update for renamings.
6178         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6179         "reason".
6181 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
6183         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6184         * config/rs6000/pmmintrin.h: New file.
6186 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
6188         PR tree-optimization/86659
6189         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6191 2018-10-09  Richard Biener  <rguenther@suse.de>
6193         PR tree-optimization/63155
6194         * tree-ssa-structalias.c: Include tree-ssa.h.
6195         (get_constraint_for_ssa_var): For undefs return nothing_id.
6196         (find_func_aliases): Cleanup PHI handling.
6198 2018-10-09  Richard Biener  <rguenther@suse.de>
6200         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6201         replacements.
6203 2018-10-09  Martin Liska  <mliska@suse.cz>
6205         * asan.c (asan_emit_stack_protection): If a stack variable
6206         is located in a same file as current function, then emit
6207         line info into variable definition string.
6209 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6211         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
6212         information.
6214 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6216         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
6217         on the thunk.
6219 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
6221         PR tree-optimization/86659
6222         * gimple-match.h (struct gimple_match_op): Add reverse field.
6223         (gimple_match_op::set_op): New overloaded method.
6224         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
6225         the REF_REVERSE_STORAGE_ORDER flag on the value.
6226         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
6227         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
6229 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
6231         PR middle-end/63155
6232         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
6233         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
6235 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
6237         PR target/87517
6238         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
6239         Defined with __builtin_ia32_vfmaddsubpd512_mask.
6241 2018-10-08  Richard Biener  <rguenther@suse.de>
6243         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
6244         cost the same as AVX128 ones.
6246 2018-10-08  Paul Koning  <ni1d@arrl.net>
6248         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
6249         (expand_block_move): New function.
6250         * config/pdp11/pdp11.c (output_block_move): Remove.
6251         (expand_block_move): New function.
6252         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
6253         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
6254         (*movmemhi1): Remove.
6256 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
6258         * config/s390/2827.md: Increase latencies for some FP instructions.
6260 2018-10-08  Richard Biener  <rguenther@suse.de>
6262         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6263         Open a dump scope.
6264         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
6265         * tree-vectorizer.h (dump_stmt_cost): Adjust.
6266         (add_stmt_cost): Dump return value of the hook.
6268 2018-10-08  Richard Biener  <rguenther@suse.de>
6270         PR tree-optimization/63155
6271         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
6272         (ssa_propagation_engine::ssa_propagate): Remove redundant
6273         bitmap bit clearing.
6275 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
6277         PR rtl-optimization/86939
6278         PR rtl-optimization/87479
6279         * ira.h (non_conflicting_reg_copy_p): New prototype.
6280         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
6281         (make_hard_regno_dead): Don't add conflicts for register
6282         ignore_reg_for_conflicts.
6283         (make_object_dead): Likewise.
6284         (non_conflicting_reg_copy_p): New function.
6285         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
6286         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
6287         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
6288         (make_hard_regno_dead): Don't add conflicts for register
6289         ignore_reg_for_conflicts.  Remove special conflict handling of
6290         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
6291         check_pic_pseudo_p and update callers.
6292         (mark_pseudo_dead): Don't add conflicts for register
6293         ignore_reg_for_conflicts.
6294         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
6296 2018-10-05  Andrew Waterman  <andrew@sifive.com>
6297             Jim Wilson  <jimw@sifive.com>
6299         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
6300         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
6301         new pattern using HONOR_SNANS that emits one extra instruction.
6303 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
6305         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
6306         patterns): Merge SI and DI patterns to a GPR pattern.
6307         (unnamed define_insn and define_split for record form of that): Merge
6308         to a single define_insn_and_split pattern.
6310 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
6312         PR c++/56856
6313         * input.c (expand_location_to_spelling_point): Add param "aspect"
6314         and use rather than hardcoding LOCATION_ASPECT_CARET.
6315         (get_substring_ranges_for_loc): Handle the case of a single token
6316         within a macro expansion.
6317         * input.h (expand_location_to_spelling_point): Add "aspect" param,
6318         defaulting to LOCATION_ASPECT_CARET.
6320 2018-10-05  Paul Koning  <ni1d@arrl.net>
6322         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
6323         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
6324         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
6325         (pdp11_guard_type): New function.
6327 2018-10-05  Paul Koning  <ni1d@arrl.net>
6329         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
6330         * config/pdp11/pdp11.opt (mfloat32): Remove.
6331         (mfloat64): Remove.
6332         * doc/invoke.texi (pdp11 -mfloat32): Remove:
6333         (pdp11 -mfloat64): Remove.
6335 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
6337         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
6338         (*cmp<mode>_cc_i387): Ditto.
6339         (*cmpu<mode>_cc_i387): Ditto.
6340         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6341         * config/i386/i386.c (ix86_expand_fp_compare): Remove
6342         "scratch" argument.
6343         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
6344         Emit x86_sahf_1 pattern.
6345         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
6346         (ix86_expand_carry_flag_compare): Ditto.
6348 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
6350         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
6351         to reg_or_0_operand.  Add "C" constraint.
6352         (*cmpxf_cc_i387): Ditto.
6353         (*cmp<mode>_i387): Change operand 2 predicate
6354         to nonimm_or_0_operand.  Add "C" constraint.
6355         (*cmp<mode>_cc_i387): Ditto.
6356         (*cmp<mode>_0_i387): Remove insn pattern.
6357         (*cmp<mode>_0_cc_i387): Ditto.
6359 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
6361         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
6362         * config/i386/predicates.md (nonimm_or_0_operand): Rename
6363         from vector_move_operand.  Update all uses.
6365 2018-10-05  Martin Sebor  <msebor@redhat.com>
6367         PR tree-optimization/87490
6368         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
6369         consistently.
6371 2018-10-05  Richard Biener  <rguenther@suse.de>
6373         PR tree-optimization/63155
6374         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
6375         vertical space in dumpfiles.
6376         * tree-ssa-propagate.h
6377         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
6378         * tree-ssa-propagate.c (cfg_blocks_back): New global.
6379         (ssa_edge_worklist_back): Likewise.
6380         (curr_order): Likewise.
6381         (cfg_blocks_get): Remove abstraction.
6382         (cfg_blocks_add): Likewise.
6383         (cfg_blocks_empty_p): Likewise.
6384         (add_ssa_edge): Add to current or next worklist based on
6385         RPO index.
6386         (add_control_edge): Likewise.
6387         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
6388         into ...
6389         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
6390         iteration from CFG and SSA edge worklist so we process
6391         everything in RPO order, prioritizing forward progress
6392         over iteration.
6393         (ssa_prop_init): Allocate new worklists, do not dump
6394         immediate uses.
6395         (ssa_prop_fini): Free new worklists.
6397 2018-10-05  Richard Biener  <rguenther@suse.de>
6399         * tree-core.h (tree_block::abstract_flag): Remove.
6400         (tree_block::block_num): Make full 32bits.
6401         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
6402         * tree.h (BLOCK_ABSTRACT): Remove.
6403         * dwarf2out.c (gen_lexical_block_die): Remove dead code
6404         resulting from BLOCK_ABSTRACT being always false.
6405         (gen_inlined_subroutine_die): Likewise.
6406         (gen_block_die): Likewise.
6407         * tree.c (block_ultimate_origin): Likewise.
6408         * tree-pretty-print.c (dump_block_node): Remove code dealing
6409         with BLOCK_ABSTRACT.
6410         * tree-ssa-live.c (dump_scope_block): Likewise.
6411         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
6412         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
6414 2018-10-05   Richard Biener  <rguenther@suse.de>
6416         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
6417         is asked for initialize mode to the component mode of the
6418         vector type.
6420 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
6422         PR target/87522
6423         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
6424         assembler for -mavx.
6425         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
6427 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
6429         PR target/87509
6430         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
6431         RS6000_BTM_DFP.
6432         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
6433         to be DImode.  When using mffscrn, force the operand to a register.
6435 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
6437         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
6438         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
6439         X87MODEF mode iterator.
6440         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
6441         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
6442         X87MODEF mode iterator.
6444 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
6446         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
6447         -Wno-prio-ctor-dtor.
6449 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6451         * Makefile.in (OBJS): Add opt-problem.o.
6452         * dump-context.h: Include "selftest.h.
6453         (selftest::temp_dump_context): New forward decl.
6454         (class dump_context): Make friend of class
6455         selftest::temp_dump_context.
6456         (dump_context::dump_loc_immediate): New decl.
6457         (class dump_pretty_printer): Move here from dumpfile.c.
6458         (class temp_dump_context): Move to namespace selftest.
6459         (temp_dump_context::temp_dump_context): Add param
6460         "forcibly_enable_dumping".
6461         (selftest::verify_dumped_text):
6462         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
6463         (selftest::verify_item):
6464         (ASSERT_IS_TEXT): Move here from dumpfile.c.
6465         (ASSERT_IS_TREE): Likewise.
6466         (ASSERT_IS_GIMPLE): Likewise.
6467         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
6468         to...
6469         (dump_context::dump_loc_immediate): ...this new function.
6470         (class dump_pretty_printer): Move to dump-context.h.
6471         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
6472         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
6473         (temp_dump_context::temp_dump_context): Move to "selftest"
6474         namespace.  Add param "forcibly_enable_dumping", and use it to
6475         conditionalize the use of m_pp;
6476         (selftest::verify_dumped_text): Make non-static.
6477         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
6478         (selftest::verify_item): Make non-static.
6479         (ASSERT_IS_TEXT): Move to dump-context.h.
6480         (ASSERT_IS_TREE): Likewise.
6481         (ASSERT_IS_GIMPLE): Likewise.
6482         (selftest::test_capture_of_dump_calls): Pass "true" for new
6483         param of temp_dump_context.
6484         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
6485         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
6486         TDF_COMPARE_DEBUG.
6487         * opt-problem.cc: New file.
6488         * opt-problem.h: New file.
6489         * optinfo-emit-json.cc
6490         (selftest::test_building_json_from_dump_calls): Pass "true" for
6491         new param of temp_dump_context.
6492         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
6493         (optinfo::emit_for_opt_problem): New function.
6494         (optinfo::emit): Clarity which emit_item is used.
6495         * optinfo.h (optinfo::get_dump_location): New accessor.
6496         (optinfo::emit_for_opt_problem): New decl.
6497         (optinfo::emit): Make const.
6498         * selftest-run-tests.c (selftest::run_tests): Call
6499         selftest::opt_problem_cc_tests.
6500         * selftest.h (selftest::opt_problem_cc_tests): New decl.
6501         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
6502         bool to opt_result, converting fprintf messages to
6503         opt_result::failure_at calls.  Add "stmt" param for use by the
6504         failure_at calls.
6505         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
6506         (runtime_alias_check_p): Convert return type from bool to
6507         opt_result, converting dump_printf calls to
6508         opt_result::failure_at, using the statement DDR_A for their
6509         location.
6510         (find_data_references_in_stmt): Convert return type from bool to
6511         opt_result, converting "return false" to opt_result::failure_at
6512         with a new message.
6513         * tree-data-ref.h: Include "opt-problem.h".
6514         (dr_analyze_innermost): Convert return type from bool to opt_result,
6515         and add a const gimple * param.
6516         (find_data_references_in_stmt): Convert return type from bool to
6517         opt_result.
6518         (runtime_alias_check_p): Likewise.
6519         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
6520         dr_analyze_innermost.
6521         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
6522         Convert return type from bool to opt_result, adding a message for
6523         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
6524         (vect_analyze_data_ref_dependence): Convert return type from bool
6525         to opt_result.  Change sense of return type from "false"
6526         effectively meaning "no problems" to "false" meaning a problem,
6527         so that "return false" becomes "return opt_result::success".
6528         Convert "return true" calls to opt_result::failure_at, using
6529         the location of statement A rather than vect_location.
6530         (vect_analyze_data_ref_dependences): Convert return type from bool
6531         to opt_result.
6532         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
6533         calls to opt_result::failure_at, using the stmt location rather
6534         than vect_location.
6535         (vect_verify_datarefs_alignment): Convert return type from bool
6536         to opt_result.
6537         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
6538         into multiple more-tightly-scoped copies.
6539         (vect_analyze_data_refs_alignment): Convert return type from bool
6540         to opt_result.
6541         (vect_analyze_data_ref_accesses): Likewise, converting a
6542         "return false" to a "return opt_result::failure_at", adding a
6543         new message.
6544         (vect_prune_runtime_alias_test_list): Convert return type from
6545         bool to opt_result, converting dump_printf_loc to
6546         opt_result::failure_at.  Add a %G to show the pertinent statement,
6547         and use the stmt's location rather than vect_location.
6548         (vect_find_stmt_data_reference): Convert return type from
6549         bool to opt_result, converting dump_printf_loc to
6550         opt_result::failure_at, using stmt's location.
6551         (vect_analyze_data_refs):  Convert return type from bool to
6552         opt_result.  Convert "return false" to "return
6553         opt_result::failure_at", adding messages as needed.
6554         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
6555         type from bool to opt_result.
6556         (vect_determine_vf_for_stmt): Likewise.
6557         (vect_determine_vectorization_factor): Likewise, converting
6558         dump_printf_loc to opt_result::failure_at, using location of phi
6559         rather than vect_location.
6560         (vect_analyze_loop_form_1): Convert return type from bool to
6561         opt_result, converting dump_printf_loc calls, retaining the use of
6562         vect_location.
6563         (vect_analyze_loop_form): Convert return type from loop_vec_info
6564         to opt_loop_vec_info.
6565         (vect_analyze_loop_operations): Convert return type from bool to
6566         opt_result, converting dump_printf_loc calls, using the location
6567         of phi/stmt rather than vect_location where available.  Convert
6568         various "return false" to "return opt_result::failure_at" with
6569         "unsupported phi" messages.
6570         (vect_get_datarefs_in_loop): Convert return type from bool to
6571         opt_result.  Add a message for the
6572         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
6573         (vect_analyze_loop_2): Convert return type from bool to
6574         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
6575         each "goto again;", adding new messages where needed.
6576         Add "unsupported grouped {store|load}" messages.
6577         (vect_analyze_loop): Convert return type from loop_vec_info to
6578         opt_loop_vec_info.
6579         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
6580         bool to opt_result.
6581         * tree-vect-stmts.c (process_use): Likewise, converting
6582         dump_printf_loc call and using stmt location, rather than
6583         vect_location.
6584         (vect_mark_stmts_to_be_vectorized): Likeise.
6585         (vect_analyze_stmt): Likewise, adding a %G.
6586         (vect_get_vector_types_for_stmt): Convert return type from bool to
6587         opt_result, converting dump_printf_loc calls and using stmt
6588         location, rather than vect_location.
6589         (vect_get_mask_type_for_stmt): Convert return type from tree to
6590         opt_tree, converting dump_printf_loc calls and using stmt location.
6591         * tree-vectorizer.c: Include "opt-problem.h.
6592         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
6593         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
6594         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
6595         enabled, use it to report at the top level "couldn't vectorize
6596         loop" followed by the problem.
6597         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
6598         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
6599         to opt_result.
6600         (vect_analyze_stmt): Likewise.
6601         (vect_get_vector_types_for_stmt): Likewise.
6602         (tree vect_get_mask_type_for_stmt): Likewise.
6603         (vect_analyze_data_ref_dependences): Likewise.
6604         (vect_enhance_data_refs_alignment): Likewise.
6605         (vect_analyze_data_refs_alignment): Likewise.
6606         (vect_verify_datarefs_alignment): Likewise.
6607         (vect_analyze_data_ref_accesses): Likewise.
6608         (vect_prune_runtime_alias_test_list): Likewise.
6609         (vect_find_stmt_data_reference): Likewise.
6610         (vect_analyze_data_refs): Likewise.
6611         (vect_analyze_loop): Convert return type from loop_vec_info to
6612         opt_loop_vec_info.
6613         (vect_analyze_loop_form): Likewise.
6614         (vect_analyze_slp): Convert return type from bool to opt_result.
6616 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6618         * doc/invoke.texi (-fopt-info): Document new "internals"
6619         sub-option.
6620         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
6621         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
6622         MSG_ALL_KINDS.
6623         (optinfo_verbosity_options): Add "internals".
6624         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
6625         (dump_context::apply_dump_filter_p): New member function.
6626         (dump_context::dump_loc): Use apply_dump_filter_p rather than
6627         explicitly masking the dump_kind.
6628         (dump_context::begin_scope): Increment the scope depth first.  Use
6629         apply_dump_filter_p rather than explicitly masking the dump_kind.
6630         (dump_context::emit_item): Use apply_dump_filter_p rather than
6631         explicitly masking the dump_kind.
6632         (dump_dec): Likewise.
6633         (dump_hex): Likewise.
6634         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
6635         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
6636         (opt_info_switch_p): Update handling of default
6637         MSG_OPTIMIZED_LOCATIONS to cope with default of
6638         MSG_PRIORITY_USER_FACING.
6639         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
6640         masking the dump_kind.
6641         (selftest::test_capture_of_dump_calls): Update test_dump_context
6642         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
6643         than MSG_ALL.  Generalize scope test to be run at all four
6644         combinations of with/without MSG_PRIORITY_USER_FACING and
6645         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
6646         for each of the two values.
6647         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
6648         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
6649         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
6650         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
6651         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
6652         with MSG_PRIORITY_*.
6653         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
6654         dump messages as MSG_PRIORITY_USER_FACING.
6655         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
6656         about the interaction with MSG_PRIORITY_*.
6658 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6660         * varasm.c (output_constant): Add new parameter merge_strings.
6661         Make strings properly zero terminated in merge string sections.
6662         (mergeable_string_section): Don't fail if the last char is non-zero.
6663         (assemble_variable_contents): Handle merge string sections.
6664         (assemble_variable): Likewise.
6665         (assemble_constant_contents): Likewise.
6666         (output_constant_def_contents): Likewise.
6667         (output_constructor_array_range,
6668         output_constructor_regular_field): Adjust call to output_constant.
6669         (output_object_block): Adjust call to assemble_constant_contents
6670         and assemble_variable_contents.
6672 2018-10-04  Martin Liska  <mliska@suse.cz>
6674         PR c/87483
6675         * cgraphunit.c (process_function_and_variable_attributes):
6676         Warn about a function with alias attribute and a body.
6678 2018-10-04  Martin Liska  <mliska@suse.cz>
6680         PR ipa/82625
6681         * multiple_target.c (redirect_to_specific_clone): New function.
6682         (ipa_target_clone): Use it.
6683         * tree-inline.c: Fix comment.
6685 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6687         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
6688         fields.
6689         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
6690         (gcc::dump_manager::register_pass): New member function, adapted
6691         from loop body in gcc::pass_manager::register_pass, adding a
6692         call to update_dfi_for_opt_info.
6693         (gcc::dump_manager::opt_info_enable_passes): Store the
6694         -fopt-info options into the new fields.  Move the loop
6695         bodies into...
6696         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
6697         function.
6698         * dumpfile.h (struct opt_pass): New forward decl.
6699         (gcc::dump_manager::register_pass): New decl.
6700         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
6701         (class gcc::dump_manager): Add fields "m_optgroup_flags",
6702         "m_optinfo_flags", and "m_optinfo_filename".
6703         * passes.c (gcc::pass_manager::register_pass): Move all of the
6704         dump-handling code to gcc::dump_manager::register_pass.
6706 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
6708         PR rtl-optimization/87466
6709         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
6710         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
6711         * doc/tm.texi: Regenerate.
6712         * ira-lives.c (process_bb_node_lives): Use the new target hook.
6713         * lra-lives.c (process_bb_lives): Likewise.
6714         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
6715         Define.
6717 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
6719         * params.c (add_params): Fix initialization.
6721 2018-10-04  Martin Liska  <mliska@suse.cz>
6723         PR gcov-profile/84107
6724         * tree-profile.c (init_ic_make_global_vars):
6725         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6726         Come up with new ic_tuple* variables.  Emit
6727         __gcov_indirect_call{,_topn} variables.
6728         (gimple_gen_ic_profiler): Access the variable
6729         and emit gimple.
6730         (gimple_gen_ic_func_profiler): Access
6731         __gcov_indirect_call.callee field.
6732         (gimple_init_gcov_profiler): Use ptr_type_node.
6733         * value-prof.c (gimple_ic): Use ptr_type_node.
6735 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6737         PR tree-optimization/85787
6738         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
6739         malloc_candidate_p into this function and add support for
6740         detecting multiple phis.
6741         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
6743 2018-10-04  Martin Liska  <mliska@suse.cz>
6745         PR ipa/87491
6746         * ipa-inline.c (inline_to_all_callers_1):
6747         Call ultimate_alias_target for node being inlined.
6749 2018-10-03  Jeff Law  <law@redhat.com>
6751         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
6752         target's wchar_t.
6753         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
6754         * tree.h (get_typenode_from_name): Prototype.
6756 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
6758         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6759         Change operand 2 predicate to nonimmediate_operand.
6760         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6762 2018-10-03  Martin Sebor  <msebor@redhat.com>
6763             Jeff Law  <law@redhat.com>
6765         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
6766         initialize it.
6767         (get_string_length): Detect unterminated arrays.
6768         (format_string): Same.
6769         (format_directive): Warn about unterminated arrays.
6770         (handle_gimple_call): Mark statements with no_warning as needed.
6772 2018-10-03  Jim Wilson  <jimw@sifive.com>
6774         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
6775         also define __riscv_abi_rve.  Delete trailing white space.
6777 2018-10-03  Paul Koning  <ni1d@arrl.net>
6779         Enable LRA register allocator for PDP11.
6780         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
6781         (R): Likewise.
6782         (D): Likewise.
6783         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
6784         * config/pdp11/pdp11.opt (-mlra): New option.
6785         * doc/invoke.texi (PDP-11 Options): Document -mlra.
6787 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
6789         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6790         (*<absneg:code>extend<mode>xf2): Ditto.
6792 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
6794         PR tree-optimization/87415
6795         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6796         precision fields.
6798 2018-10-02  Jeff Law  <law@redhat.com>
6800         * gimple-fold.c (get_range_strlen): Only set *nonstr when
6801         an unterminated string is discovered.  Bubble up range
6802         even for unterminated strings.
6803         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6804         indicates the string was not terminated via NONSTR.
6806 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
6808         * tree-vrp.c (extract_range_from_unary_expr): Special case all
6809         pointer conversions.
6810         Do not do anything special for anti-ranges.
6812 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
6814         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6815         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6817 2018-10-03  Martin Liska  <mliska@suse.cz>
6819         PR gcov-profile/86109
6820         * coverage.c (coverage_begin_function): Do not
6821         mark lambdas as artificial.
6822         * tree-core.h (struct GTY): Remove tm_clone_flag
6823         and introduce new lambda_function.
6824         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6826 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6828         PR target/87474
6829         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6830         P8_VECTOR and VSX are enabled.
6832 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
6834         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6835         0x3907 as CPU model number.
6837 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
6839         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6840         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6841         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6842         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6843         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6844         * config/s390/s390.md: Likewise. Rename also the cpu attribute
6845         value from arch12 to z14.
6847 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
6849         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6850         (isinfxf2): Ditto.
6851         (isinf<mode>2): Ditto.
6853 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
6855         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6856         before emitting fxam.  Perform calculations in XFmode.
6858 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
6860         * match.pd (((X /[ex] A) +- B) * A): New transformation.
6862 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
6864         PR middle-end/87319
6865         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6866         * tree.c (signed_or_unsigned_type_for): Handle complex.
6868 2018-10-02  Jeff Law  <law@redhat.com>
6870         * gimple-fold.c (get_range_strlen): Remove dead code.
6872 2018-10-02  Martin Sebor  <msebor@redhat.com>
6873             Jeff Law  <law@redhat.com>
6875         * builtins.c (unterminated_array): Add new arguments.
6876         If argument is not terminated, bubble up size and exact
6877         state to callers.
6878         (expand_builtin_strnlen): Detect, avoid expanding
6879         and diagnose unterminated arrays.
6880         (c_strlen): Fill in offset of start of unterminated strings.
6881         * builtins.h (unterminated_array): Update prototype.
6883 2018-10-02  Richard Biener  <rguenther@suse.de>
6885         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
6886         of haddv4df, first reduce to SSE width and exploit the fact
6887         that we only need element zero with the reduction result.
6888         (reduc_plus_scal_v2df): Likewise.
6890 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
6892         * dojump.h (do_jump): Delete.
6893         (do_jump_1): Likewise.
6894         (split_comparison): Move around.
6895         * dojump.c (do_jump): Make static.
6896         (do_jump_1): Likewise.
6897         (jumpifnot): Move around.
6898         (jumpifnot_1): Likewise.
6899         (jumpif): Likewise.
6900         (jumpif_1): Likewise.
6901         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
6903 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
6905         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
6906         insns in the delay slot and add_insn_after for the jump insn.
6908 2018-10-02  Richard Biener  <rguenther@suse.de>
6910         * tree-inline.c (expand_call_inline): Use the location of
6911         the callee declaration for the inline-entry marker.
6912         * final.c (notice_source_line): Remove special-casing of
6913         NOTE_INSN_INLINE_ENTRY.
6915 2018-10-01  Carl Love  <cel@us.ibm.com>
6917         PR 69431
6918         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
6919         (__builtin_mtfsb0): New.
6920         (__builtin_mtfsb1): New.
6921         ( __builtin_set_fpscr_rn): New.
6922         (__builtin_set_fpscr_drn): New.
6923         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
6924         (rs6000_expand_set_fpscr_rn_builtin): Add.
6925         (rs6000_expand_set_fpscr_drn_builtin): Add.
6926         (rs6000_expand_builtin): Add case statement entries for
6927         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
6928         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
6929         RS6000_BUILTIN_MFFSL.
6930         (rs6000_init_builtins): Add ftype initialization and def_builtin
6931         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
6932         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
6933         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
6934         rs6000_mffscdrn): Add define_insn.
6935         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
6936         * doc/extend.texi: Add documentation for the builtins.
6938 2018-10-01  Richard Biener  <rguenther@suse.de>
6940         PR tree-optimization/87465
6941         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
6942         causing branch miscounts.
6944 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6946         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
6947         aarch64_option_default_param):  New.
6948         (params.h): Include.
6949         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
6950         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
6951         stack-clash protection validation code.
6953 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6955         * params.c (validate_param): New.
6956         (add_params): Use it.
6957         (set_param_value): Refactor param validation into validate_param.
6958         (diagnostic.h): Include.
6959         * diagnostic.h (diagnostic_ready_p): New.
6961 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6963         * params.c (set_param_value):
6964         Add index of parameter being validated.
6965         * common/common-target.def (option_validate_param): New.
6966         * common/common-targhooks.h (default_option_validate_param): New.
6967         * common/common-targhooks.c (default_option_validate_param): New.
6968         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
6969         * doc/tm.texi: Regenerate.
6971 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6973         PR target/86486
6974         * config/aarch64/aarch64.c (aarch64_override_options_internal):
6975         Add validation for stack-clash parameters and set defaults.
6977 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6979         PR target/86486
6980         * configure.ac: Add stack-clash-protection-guard-size.
6981         * doc/install.texi: Document it.
6982         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
6983         * params.def: Update comment for guard-size.
6984         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
6985         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
6986         * configure: Regenerate.
6988 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6990         PR target/86486
6991         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
6992         STACK_DYNAMIC_OFFSET): New.
6993         * config/aarch64/aarch64.c (aarch64_layout_frame):
6994         Update outgoing args size.
6995         (aarch64_stack_clash_protection_alloca_probe_range,
6996         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6998 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7000         PR target/86486
7001         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7002         probe ranges.
7003         * target.def (stack_clash_protection_alloca_probe_range): New.
7004         (stack_clash_protection_final_dynamic_probe): Remove.
7005         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7006         (default_stack_clash_protection_final_dynamic_probe): Remove.
7007         * targhooks.c: Likewise.
7008         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7009         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7010         * doc/tm.texi: Regenerate.
7012 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7014         PR target/86486
7015         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7016         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7017         aarch64_clamp_to_uimm12_shift): New.
7018         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7019         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7021 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
7023         PR target/86486
7024         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7026 2018-10-01  Jeff Law  <law@redhat.com>
7027             Richard Sandiford <richard.sandiford@linaro.org>
7028             Tamar Christina  <tamar.christina@arm.com>
7030         PR target/86486
7031         * config/aarch64/aarch64.md
7032         (probe_stack_range): Add k (SP) constraint.
7033         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7034         STACK_CLASH_MAX_UNROLL_PAGES): New.
7035         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7036         stack probes for stack clash.
7037         (aarch64_allocate_and_probe_stack_space): New.
7038         (aarch64_expand_prologue): Use it.
7039         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7040         (aarch64_sub_sp): Add emit_move_imm optional param.
7042 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
7044         PR tree-optimization/87261
7045         * match.pd: Remove trailing whitespace.
7046         Add (x & y) | ~(x | y) -> ~(x ^ y),
7047         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7049 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7051         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7052         constraints.
7053         (ashlsi3_insn): Update instruction constraints.
7054         (ashrsi3_insn): Likewise.
7055         (rotrsi3): Likewise.
7056         (add_shift): Likewise.
7057         * config/arc/constraints.md (Csz): New 32 bit constraint. It
7058         avoids placing in the limm field small constants which, otherwise,
7059         could end into a small instruction.
7061 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
7063         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7064         destination register is not odd-even.
7065         (umaddsidi4_split): Likewise.
7067 2018-10-01  Richard Biener  <rguenther@suse.de>
7069         * tree-inline.c (expand_call_inline): Store origin of fn
7070         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7071         * tree.c (block_ultimate_origin): Simplify and do some
7072         checking.
7074 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
7076         * config/i386/mmx.md (EMMS): New int iterator.
7077         (emms): New int attribute.
7078         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7079         EMMS int iterator.  Explicitly declare clobbers.
7080         (mmx_emms): Remove expander.
7081         (mmx_femms): Ditto.
7082         * config/i386/predicates.md (emms_operation): Remove predicate.
7083         (vzeroall_pattern): New predicate.
7084         (vzeroupper_pattern): Rename from vzeroupper_operation.
7085         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7086         vzeroupper_pattern and vzeroall_pattern predicates.
7088 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
7090         PR rtl-optimization/86939
7091         * ira-lives.c (make_hard_regno_born): Rename from this...
7092         (make_hard_regno_live): ... to this.  Remove update to conflict
7093         information.  Update function comment.
7094         (make_hard_regno_dead): Add conflict information update.  Update
7095         function comment.
7096         (make_object_born): Rename from this...
7097         (make_object_live): ... to this.  Remove update to conflict information.
7098         Update function comment.
7099         (make_object_dead):  Add conflict information update.  Update function
7100         comment.
7101         (mark_pseudo_regno_live): Call make_object_live.
7102         (mark_pseudo_regno_subword_live): Likewise.
7103         (mark_hard_reg_dead): Update function comment.
7104         (mark_hard_reg_live): Call make_hard_regno_live.
7105         (process_bb_node_lives): Likewise.
7106         * lra-lives.c (make_hard_regno_born): Rename from this...
7107         (make_hard_regno_live): ... to this.  Remove update to conflict
7108         information.  Remove now uneeded check_pic_pseudo_p argument.
7109         Update function comment.
7110         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7111         to conflict information.  Update function comment.
7112         (mark_pseudo_live): Remove update to conflict information.  Update
7113         function comment.
7114         (mark_pseudo_dead): Add conflict information update.
7115         (mark_regno_live): Call make_hard_regno_live.
7116         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7117         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7119 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
7121         PR target/87370
7122         * config/i386/i386.c (construct_container): Use TImode for
7123         BLKmode values in 2 integer registers.
7125 2018-09-29  Jeff Law  <law@redhat.com>
7127         * builtins.c (unterminated_array): Pass in c_strlen_data * to
7128         c_strlen rather than just a tree *.
7129         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7130         Update recursive calls appropriately.  If caller did not provide a
7131         suitable data pointer, create a local one.  When a non-terminated
7132         string is discovered, bubble up information about the string via the
7133         c_strlen_data object.
7134         * builtins.h (c_strlen): Update prototype.
7135         (c_strlen_data): New structure.
7136         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7137         For a type 2 call, if c_strlen indicates a non-terminated string
7138         use the length of the non-terminated string.
7139         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7141 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
7143         PR target/87467
7144         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7145         __m512d type for __A argument rather than __m512.
7147 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
7149         * match.pd (simple_comparison): Don't optimize if either operand is
7150         a function pointer when target needs function pointer canonicalization.
7152 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7154         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7155         power5 .. power9 to remove indirection.
7156         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7157         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7158         ASM_CPU_476_SPEC): Delete.
7159         (ASM_CPU_SPEC): Adjust.
7160         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7161         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7163 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7165         * config.in: Delete HAVE_AS_DCI.
7166         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7167         * config/rs6000/rs6000.h: Ditto.
7168         * configure.ac: Delete HAVE_AS_DCI.
7169         * configure: Regenerate.
7171 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
7173         * config.in (HAVE_AS_LWSYNC): Delete.
7174         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7175         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7176         do it as a .long .
7177         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7178         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7179         as a .long .
7180         * configure.ac: Delete HAVE_AS_LWSYNC.
7181         * configure: Regenerate.
7183 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7184             Pierre-Marie de Rodat  <derodat@adacore.com>
7186         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7187         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7188         (cgraph_node::create_thunk): Add indirect_offset parameter.
7189         (thunk_adjust): Likewise.
7190         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7191         and initialize the corresponding field with it.
7192         (cgraph_node::dump): Dump indirect_offset field.
7193         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7194         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7195         (thunk_adjust): Add indirect_offset parameter and deal with it.
7196         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7197         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
7198         or if the thunk is external or local.  Fix formatting.  Do not chain
7199         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
7200         if any, in the GIMPLE representation.
7201         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7202         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7203         (input_node): Read indirect_offset field.
7204         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7205         call to thunk_adjust.
7206         * tree-nested.c (struct nesting_info): Add thunk_p field.
7207         (create_nesting_tree): Set it.
7208         (convert_all_function_calls): Copy static chain from targets to thunks.
7209         (finalize_nesting_tree_1): Return early for thunks.
7210         (unnest_nesting_tree_1): Do not finalize thunks.
7211         (gimplify_all_functions): Do not gimplify thunks.
7213 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7215         * opt-suggestions.c (option_proposer::build_option_suggestions):
7216         Release "option_values".
7218 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
7220         * coverage.c (get_coverage_counts): Convert problem-reporting dump
7221         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
7222         * dumpfile.c (kind_as_string): New function.
7223         (dump_loc): Rather than a hardcoded prefix of "note: ", use
7224         kind_as_string to vary the prefix based on dump_kind.
7225         (selftest::test_capture_of_dump_calls): Update for above.
7227 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7229         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
7230         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
7232 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
7234         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
7235         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
7236         INVALID_REGNUM instead of FPSR_REG.
7237         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
7238         * config/i386/i386.md: Update comment of FP compares.
7239         (fldenv): Do not clobber FPSR_REG.
7241 2018-09-28  Richard Biener  <rguenther@suse.de>
7243         * tree.h (BLOCK_ORIGIN): New.
7244         * omp-expand.c (grid_expand_target_grid_body): Assign
7245         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
7246         * tree-inline.c (remap_block): Likewise.
7247         * auto-profile.c (get_function_decl_from_block): Simplify
7248         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
7249         * langhooks.c (lhd_print_error_function): Likewise.
7250         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
7251         Likewise.
7252         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7253         * tree.c (block_nonartificial_location): Likewise.
7254         (block_ultimate_origin): Likewise.
7255         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
7256         no longer needed LTO case.
7258 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
7259             Jan Hubicka  <jh@suse.cz>
7260             Martin Jambor  <mjambor@suse.cz>
7262         * simplify-rtx.c (simplify_merge_mask): New function.
7263         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
7264         same masks are used in op1 or op2.
7265         (test_vec_merge): New function.
7266         (test_vector_ops): Call test_vec_merge.
7268 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
7270         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
7271         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
7272         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
7273         (cypress_costs): Set it.
7274         (supersparc_costs): Likewise.
7275         (hypersparc_costs): Likewise.
7276         (leon_cost): Likewise.
7277         (leon3_costs): Likewise.
7278         (sparclet_costs): Likewise.
7279         (ultrasparc_costs): Likewise.
7280         (ultrasparc_costs): Likewise.
7281         (niagara_costs): Likewise.
7282         (niagara2_costs): Likewise.
7283         (niagara3_costs): Likewise.
7284         (niagara4_costs): Likewise.
7285         (niagara7_costs): Likewise.
7286         (m8_costs): Likewise.
7287         (TARGET_CAN_FOLLOW_JUMP): Define.
7288         (pass_work_around_errata::gate): Minor tweak.
7289         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
7290         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
7291         Automaitcally clear MASK_FSMULD mask for V7 processors.
7292         (sparc_can_follow_jump): New static function.
7293         (output_ubranch): Deal with CROSSING_JUMP_P.
7294         (sparc_use_sched_lookahead): Rewrite using switch statement.
7295         (sparc_issue_rate): Reorder.
7296         (sparc_branch_cost): New function.
7298 2018-09-27  Martin Sebor  <msebor@redhat.com>
7300         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
7301         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
7302         (int_fits_type_p): Same.
7304 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
7306         * config/i386/i386.md (FPCR_REG): Remove.
7307         (UNSPEC_FLDCW): Remove.
7308         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
7309         (x86_fldcw_1): Remove insn pattern.
7310         (fnstenv): Do not clobber FPCR_REG.
7311         (fldenv): Ditto.
7312         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
7313         (CALL_USED_REGISTERS): Ditto.
7314         (REG_ALLOC_ORDER): Ditto.
7315         (REG_CLASS_CONTENTS): Ditto.
7316         (HI_REGISTER_NAMES): Ditto.
7317         (ADDITIONAL_REGISTER_NAMES): Use defines instead
7318         of numerical constants.
7319         * config/i386/i386.c (regclass_map): Remove fpsr register.
7320         (dbx_register_map): Ditto.
7321         (dbx64_register_map): Ditto.
7322         (svr4_dbx_register_map): Ditto.
7323         (print_reg): Do not handle FPCR_REG.
7325 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
7327         PR target/87149
7328         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
7329         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
7330         Delete, always treat as true.
7331         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7332         Ditto.  Simplify remaining code.
7333         * config/powerpcspe/powerpcspe.h: Ditto.
7334         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
7335         Simplify remaining code.
7336         (rs6000_expand_builtin): Ditto.
7337         * config/rs6000/rs6000.h: Ditto.
7338         * configure.ac: Ditto.
7339         * configure: Regenerate.
7341 2018-09-27  Martin Liska  <mliska@suse.cz>
7343         * coverage.c (get_coverage_counts): Revert the formatting
7344         of missing profile opt info.
7346 2018-09-27  Richard Biener  <rguenther@suse.de>
7348         PR debug/37801
7349         PR debug/87440
7350         * dwarf2out.c (set_block_origin_self): Do not mark outermost
7351         block as we do not output that.
7352         (gen_inlined_subroutine_die): Elide the originally outermost
7353         block, matching what we do for concrete instances.
7354         (decls_for_scope): Add parameter specifying whether to recurse
7355         to subblocks.
7357 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
7358             Tom de Vries  <tom@codesourcery.com>
7360         PR 82089
7362         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
7363         STORE_FLAG_VALUE == 1.
7365 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
7367         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
7368         constant definitions.
7369         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
7370         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
7371         ("speculation_barrier"): New expander definition.
7373 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
7375         PR gcov-profile/86957
7376         * common.opt: New warning option -Wmissing-profile.
7377         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
7378         * doc/invoke.texi: Document -Wmissing-profile.
7380 2018-09-26  Jim Wilson  <jimw@sifive.com>
7382         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
7383         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
7385 2018-09-26  Martin Sebor  <msebor@redhat.com>
7387         * tree.c (zerop): Change return type to bool.
7388         (integer_zerop, integer_onep, integer_each_onep): Same.
7389         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7390         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7391         (real_onep, real_minus_onep, chain_index): Same.
7392         (print_type_hash_statistics, type_list_equal): Same.
7393         * tree.h (zerop): Same.
7394         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
7395         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7396         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7397         (real_onep, real_minus_onep, chain_index): Same.
7398         (print_type_hash_statistics, type_list_equal): Same.
7400 2018-09-26  Jim Wilson  <jimw@sifive.com>
7402         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
7404 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
7406         PR target/87414
7407         * config/i386/i386.c: Include debug.h and dwarf2out.h.
7408         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
7409         call.
7411 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
7413         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
7415 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
7417         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
7418         and FP_SECOND_SSE_REGS.
7419         (REG_CLASS_NAMES): Ditto.
7420         (REG_CLASS_CONTENTS): Ditto.
7421         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
7422         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
7423         (ix86_preferred_output_reload_class): Ditto.
7424         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
7425         clobber constraint to "=&f".
7426         (fix_truncdi_i387): Ditto.
7427         (lrintxfdi2): Ditto.
7428         (fistdi2_<rounding>): Ditto.
7429         (fpremxf4_i387): Change "=u" constraint to "=f".
7430         (fprem1xf4_i387): Ditto.
7431         (sincosxf3): Ditto.
7432         (fptanxf4_i387): Ditto.
7433         (fxtractxf3_i387): Ditto.
7434         (fscalexf4_i387): Ditto.
7435         (atan2xf3): Change "u" constraint to "f".
7436         (fyl2xxf3_i387): Ditto.
7437         (fyl2xp1xf3_i387): Ditto.
7439 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
7441         PR target/87439
7442         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
7443         for removed I387_MASK_PM entity.
7446 2018-09-26  Jeff Law  <law@redhat.com>
7447         Revert
7448         2018-09-26  Alexey Neyman  <stilor@att.net>
7450         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7451         headers are no longer pulled in by <isl/val.h>.
7453 2018-09-26  Richard Biener  <rguenther@suse.de>
7455         PR debug/87443
7456         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
7457         or concrete instance DIE to the tree.  Create abstract origin
7458         attributes also for concrete instances.
7460 2018-09-26  Alexey Neyman  <stilor@att.net>
7462         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7463         headers are no longer pulled in by <isl/val.h>.
7465 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
7467         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
7468         Use new helper functions.
7469         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
7470         Use new helper functions.
7471         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
7472         aarch_mm_needs_release): New declarations.
7473         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
7474         aarch_mm_needs_release): New.
7476 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
7478         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
7479         (arm32_output_mi_thunk): Deal with long calls.
7481 2018-09-26  Richard Biener  <rguenther@suse.de>
7483         PR debug/87428
7484         PR debug/87362
7485         * tree-inline.c (expand_call_inline): When the location
7486         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
7487         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
7488         the inserted BLOCK to make inlined_function_outer_scope_p
7489         recognize it.
7490         * dwarf2out.c (add_call_src_coords_attributes): Do not add
7491         coords for reserved locations.
7493 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
7495         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
7496         (*call_indirect_nonlocal_sysv<mode>): Ditto.
7497         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
7498         (*sibcall_nonlocal_sysv<mode>): Ditto.
7499         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
7500         (<bd>_<mode>): Ditto.
7501         (<bd>tf_<mode>): Ditto.
7503 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
7505         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
7506         control string as a list of templates instead of as C code.
7507         (*altivec_movti): Ditto.
7508         * config/rs6000/darwin.md (movdf_low_di): Ditto.
7510 2018-09-25  Jim Wilson  <jimw@sifive.com>
7512         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
7513         when target symbol is weak.
7515 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7517         PR c/87387
7518         * builtins.c (unterminated_array): Simplify.
7519         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
7520         where pointer arithmetic is safe.
7522 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
7524         PR target/86987
7525         * config/rs6000/altivec.md (altivec_vspltb): Use
7526         const_0_to_15_operand instead of u5bit_cint_operand.
7527         (*altivec_vspltb_internal): Ditto.
7528         (altivec_vspltb_direct): Ditto.
7529         (altivec_vsplth): Use const_0_to_7_operand instead of
7530         u5bit_cint_operand.
7531         (*altivec_vsplth_internal): Ditto.
7532         (altivec_vsplth_direct): Ditto.
7533         (altivec_vspltw): Use const_0_to_3_operand instead of
7534         u5bit_cint_operand.
7535         (*altivec_vspltw_internal): Ditto.
7536         (altivec_vspltw_direct): Ditto.
7537         (altivec_vspltsf): Ditto.
7538         (*altivec_vspltsf_internal): Ditto.
7539         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
7540         various splats with the proper size immediate.  Reorder the various
7541         cases by ascending size of immediate, and put all such together.
7543 2018-09-25  Richard Biener  <rguenther@suse.de>
7545         PR debug/83941
7546         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
7547         GC-ification.
7548         (maybe_create_die_with_external_ref): Do not create
7549         DW_TAG_imported_unit here.
7550         (add_abstract_origin_attribute): Handle external BLOCK refs.
7551         (dwarf2out_abstract_function): Simplify LTO case.
7552         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
7553         rather than using maybe_create_die_with_external_ref.
7555 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
7557         PR target/71278
7558         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
7559         (frndintxf2_mask_pm_i387): Ditto.
7560         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
7561         Enable for !flag_trapping_math.
7562         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
7563         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
7564         Change operand 1 predicate to nonimmediate_operand.
7565         (attr "i387_cw"): Remove mask_pm.
7566         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
7567         (enum ix86_entity): Remove I387_MASK_PM.
7568         * config/i386/i386.c (ix86_i387_mode_needed): Do not
7569         handle I387_MASK_PM.
7570         (ix86_mode_needed): Ditto.
7571         (ix86_mode_after): Ditto.
7572         (ix86_mode_entry): Ditto.
7573         (ix86_mode_exit): Ditto.
7574         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
7576 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
7578         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
7579         to_update_switch_stmts to vNULL instead of calling create on them
7580         immediately.
7582 2018-09-25  Richard Biener  <rguenther@suse.de>
7584         PR tree-optimization/87402
7585         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
7586         (visit_phi): Re-instantiate handling of supposed to be VARYING
7587         but non-VARYING backedge value.
7589 2018-09-25  Richard Biener  <rguenther@suse.de>
7591         PR debug/83941
7592         * dwarf2out.c (struct sym_off_pair): New.
7593         (external_die_map): New global.
7594         (lookup_decl_die): When in LTO create DIEs lazily from the
7595         external_die_map.
7596         (lookup_block_die): New function, create DIEs lazily in LTO.
7597         (equate_block_to_die): New function.
7598         (dwarf2out_die_ref_for_decl): During WPA get the association
7599         from the external DIE map.
7600         (dwarf2out_register_external_die): Record mapping into the
7601         external DIE map.
7602         (maybe_create_die_with_external_ref): New function split out from
7603         DIE generation part of old dwarf2out_register_external_die.
7604         (add_abstract_origin_attribute): Do not return the DIE.  When
7605         in LTO reference externals directly.
7606         (dwarf2out_abstract_function): When in LTO ignore calls for
7607         decls with external DIEs (already present abstract instances).
7608         (gen_call_site_die): Adjust.
7609         (add_high_low_attributes): Likewise.
7610         (gen_lexical_block_die): Likewise.
7611         (gen_inlined_subroutine_die): Likewie.
7612         (gen_block_die): Likewise.
7613         (dwarf2out_inline_entry): Likewise.
7614         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
7615         DIEs.
7617 2018-09-25  Martin Liska  <mliska@suse.cz>
7619         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
7620         integers and not by a float value.
7622 2018-09-25  Martin Liska  <mliska@suse.cz>
7624         PR fortran/87394
7625         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
7626         instead of NULL.
7627         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
7628         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
7629         * godump.c (go_format_type): Remove extra parenthesis.
7631 2018-09-25  Martin Liska  <mliska@suse.cz>
7633         * alias.c (set_dest_equal_p): Remove unused function.
7634         * config/i386/i386.c (def_builtin_pure2): Likewise.
7635         * diagnostic-show-locus.c (class layout): Remove
7636         unused field.
7637         (layout::layout): Likewise here.
7638         * dump-context.h (class temp_dump_context): Likewise.
7639         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
7640         (add_AT_loclistsptr): Likewise.
7641         (add_AT_offset): Likewise.
7642         (get_AT_hi_pc): Likewise.
7643         (is_comdat_die): Likewise.
7644         (type_is_enum): Likewise.
7645         (ceiling): Likewise.
7646         (add_AT_vms_delta): Likewise.
7647         (is_class_die): Likewise.
7648         * edit-context.c (class line_event): Remove unused field.
7649         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
7650         unused function.
7651         * ipa-cp.c (ipa_get_vr_lat): Likewise.
7652         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
7653         (ok_for_base_p_nonstrict): Likewise.
7654         * tree-chrec.c (is_not_constant_evolution): Likewise.
7655         (chrec_fold_poly_cst): Likewise.
7656         * tree-if-conv.c (has_pred_critical_p): Likewise.
7657         * tree-ssa-coalesce.c (print_exprs): Likewise.
7658         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
7659         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
7660         * tree-vrp.c (value_ranges_intersect_p): Likewise.
7661         (value_range_nonnegative_p): Likewise.
7663 2018-09-25  Martin Liska  <mliska@suse.cz>
7665         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
7666         Do not handle "GNU Pascal".
7667         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
7668         Likewise.
7669         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
7670         from documentation. Likewise.
7671         * dbxout.c (dbxout_range_type): Likewise.
7672         * doc/cpp.texi: Likewise.
7673         * doc/extend.texi: Likewise.
7674         * doc/frontends.texi: Likewise.
7675         * doc/invoke.texi: Remove Pascal entry.
7676         * tree.def (CLEANUP_POINT_EXPR): Likewise.
7677         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
7679 2018-09-25  Martin Liska  <mliska@suse.cz>
7681         PR middle-end/86078
7682         * doc/invoke.texi: Document all parameters and remove default
7683         of the parameters.
7685 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
7687         PR bootstrap/87417
7688         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
7689         contains HOST_WIDE_INTs when computing its size.
7691 2018-09-24  Jim Wilson  <jimw@sifive.com>
7693         PR target/87391
7694         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
7695         not TARGET_RVE.
7696         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
7698 2018-09-24  Andrew Pinski  <apinski@marvell.com>
7700         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
7701         access prev before checking it for NULLness in the
7702         AARCH64_FUSE_CMP_BRANCH case.
7704 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
7706         PR target/82699
7707         * config/i386/i386.c (rest_of_insert_endbranch): Set
7708         endbr_queued_at_entrance to true and don't insert ENDBR if
7709         x86_function_profiler will be called.
7710         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
7711         is true.
7712         * config/i386/i386.h (machine_function): Add
7713         endbr_queued_at_entrance.
7715 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
7717         * genattrtab.c (mk_attr_alt): Use alternative_mask.
7718         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
7719         types.
7720         (check_attr_test): Use alternative_mask.
7721         (get_attr_value): Likewise.
7722         (compute_alternative_mask): Use alternative_mask and XWINT.
7723         (make_alternative_compare): Use alternative_mask.
7724         (attr_alt_subset_p): Use XWINT.
7725         (attr_alt_subset_of_compl_p): Likewise.
7726         (attr_alt_intersection): Use alternative_mask and XWINT.
7727         (attr_alt_union): Likewise.
7728         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
7729         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
7730         (simplify_test_exp): Use alternative_mask and XWINT.
7731         (write_test_expr): Use alternative_mask and XWINT, adjust bit
7732         number calculation to support 64 bits.  Generate code that
7733         checks 64-bit masks.
7734         (main): Use alternative_mask.
7735         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
7737 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
7739         PR target/80080
7740         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
7741         RETURN+USE when returning via %r14.
7743 2018-09-24  Martin Liska  <mliska@suse.cz>
7745         * gcov.c (output_lines): Print colorization legend
7746         for both flag_use_colors and flag_use_hotness_colors.
7747         Reword the help.
7749 2018-09-24  Martin Liska  <mliska@suse.cz>
7751         * coverage.c (get_coverage_counts): Use warning_at
7752         with current_function_decl location. Use %qD in warning
7753         message.
7755 2018-09-24  Martin Liska  <mliska@suse.cz>
7757         * memory-block.h (memory_block_pool::release): Annotate with
7758         valgrind that the memory is not accessible.
7760 2018-09-24  Martin Liska  <mliska@suse.cz>
7762         PR sanitizer/85774
7763         * asan.c: Make asan_handled_variables extern.
7764         * asan.h: Likewise.
7765         * cfgexpand.c (expand_stack_vars): Make sure
7766         a representative is unpoison if another
7767         variable in the partition is handled by
7768         use-after-scope sanitization.
7770 2018-09-24  Richard Biener  <rguenther@suse.de>
7772         PR tree-optimization/63155
7773         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
7774         the worklist when the edge of the respective argument isn't
7775         executable.
7777 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7779         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
7780         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
7781         (MASK_CLASS_P): Update for rename.
7782         (MAYBE_MASK_CLASS_P): Ditto.
7783         (REG_CLASS_NAMES): Update.
7784         (REG_CLASS_CONTENT): Update.
7785         * config/i386/i386.c (regclass_map): Update for MASK_REG
7786         and ALL_MASK_REGS rename.
7787         * config/i386/constraints.md (Yk): Update for rename.
7788         (k): Ditto.
7790 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7792         * config/i386/i386.h (enum reg_class): Remove
7793         EVEX_SSE_REGS and MOD4_SSE_REGS.
7794         (REG_CLASS_NAMES): Update.
7795         (REG_CLASS_CONTENT): Update.
7796         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7797         registers as ALL_SSE_REGS.
7798         (ix86_additional_allocno_class_p): Remove.
7799         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7800         (ix86_register_priority): Lower priority of EVEX SSE registers.
7801         Use IN_RANGE macro where appropriate.
7802         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7803         AVX-5124VNNIW checks.
7804         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7805         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7806         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7807         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7808         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7809         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7810         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7811         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7812         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7813         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7814         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7815         * config/i386/constraints.md (Yh): Remove.
7817 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7819         * config/i386/i386.c (regclass_map): Declare integer REX registers
7820         as GENERAL_REGS.
7822 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
7824         * doc/service.texi (Service): Switch the fsf.org link to https.
7826 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7828         PR target/86798
7829         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7830         Define to speculation_safe_value_not_needed.
7832 2018-09-21  Florian Weimer  <fweimer@redhat.com>
7834         PR middle-end/81035
7835         * doc/extend.texi (Common Function Attributes): Mention that
7836         noreturn suppresses tail call optimization.
7838 2018-09-21  Jeff Law  <law@redhat.com>
7840         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7841         vr_values::cleanup_edges_and_switches.
7842         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7843         vr_values class.
7844         (identify_jump_threads): Remove EDGE_IGNORE handling.
7845         (execute_vrp): Move handling of to_remove_edges and
7846         to_update_switch_stmts into vr_values class member functions.
7847         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7848         (to_update_switch_stmts): Likewise.
7849         * vr-values.c: Include cfghooks.h.
7850         (vr_values::vr_values): Initialize to_remove_edges and
7851         to_update_switch_stmts.
7852         (vr_values::~vr_values): Verify to_remove_edges and
7853         to_update_switch_stmts are empty.
7854         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7855         (vr_values::cleanup_edges_and_switches): New member function.
7856         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7857         function.  Add new data members.
7859 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
7861         PR tree-optimization/87309
7862         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7863         calls with pflags and alt_flags.
7864         (selftest::test_capture_of_dump_calls): Add test of interaction of
7865         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7867 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7869         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7871 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7873         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
7875 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7877         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
7878         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
7879         (VXWORKS_LIBS_RTP): Minor reordering.
7881 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7883         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
7884         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
7886 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7888         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
7889         (PTRDIFF_TYPE): Likewise.
7891 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7893         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
7894         triplet, similar to support for VxWorks7.
7895         * config/vxworks-dummy.h: Provide a default definition
7896         of TARGET_VXWORKS64 to 0.
7898 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7900         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
7901         * config/vxworks-dummy.h: here.
7903 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7905         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
7907 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
7908             Bo Zhou  <zbo.zhou@hisilicon.com>
7910         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
7911         * config/aarch64/aarch64-tune.md: Regenerated.
7912         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
7913         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
7914         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
7916 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
7917             Julian Brown  <julian@codesourcery.com>
7919         * builtins.c (get_builtin_sync_mem): Handle address spaces.
7921 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
7923         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
7924         if the call takes a static chain.
7926 2018-09-21  Martin Liska  <mliska@suse.cz>
7928         * auto-profile.c (autofdo_source_profile::read): Do not
7929         set sum_all.
7930         (read_profile): Do not add working sets.
7931         (read_autofdo_file): Remove sum_all.
7932         (afdo_callsite_hot_enough_for_early_inline): Remove const
7933         qualifier.
7934         * coverage.c (struct counts_entry): Remove gcov_summary.
7935         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
7936         do not support GCOV_TAG_PROGRAM_SUMMARY.
7937         (get_coverage_counts): Remove summary and expected
7938         arguments.
7939         * coverage.h (get_coverage_counts): Likewise.
7940         * doc/gcov-dump.texi: Remove -w option.
7941         * gcov-dump.c (dump_working_sets): Remove.
7942         (main): Do not support '-w' option.
7943         (print_usage): Likewise.
7944         (tag_summary): Likewise.
7945         * gcov-io.c (gcov_write_summary): Do not dump
7946         histogram.
7947         (gcov_read_summary): Likewise.
7948         (gcov_histo_index): Remove.
7949         (gcov_histogram_merge): Likewise.
7950         (compute_working_sets): Likewise.
7951         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
7952         it not obsolete.
7953         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
7954         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
7955         (GCOV_HISTOGRAM_SIZE): Remove.
7956         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
7957         (struct gcov_summary): Simplify rapidly just
7958         to runs and sum_max fields.
7959         (gcov_histo_index): Remove.
7960         (NUM_GCOV_WORKING_SETS): Likewise.
7961         (compute_working_sets): Likewise.
7962         * gcov-tool.c (print_overlap_usage_message): Remove
7963         trailing empty line.
7964         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
7965         (output_lines): Remove program related line.
7966         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
7967         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
7968         histogram.
7969         (input_profile_summary): Do not read it.
7970         (merge_profile_summaries): And do not merge it.
7971         (input_symtab): Do not call removed function.
7972         * modulo-sched.c (sms_schedule): Do not print sum_max.
7973         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
7974         removed when histogram method was invented.
7975         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
7976         mode.
7977         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
7978         GCOV coding style.
7979         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
7980         and dump selected value.
7981         * profile.c (add_working_set): Remove.
7982         (get_working_sets): Likewise.
7983         (find_working_set): Likewise.
7984         (get_exec_counts): Do not work with working sets.
7985         (read_profile_edge_counts): Do not inform as sum_max is removed.
7986         (compute_branch_probabilities): Likewise.
7987         (compute_value_histograms): Remove argument for call of
7988         get_coverage_counts.
7989         * profile.h: Do not make gcov_summary const.
7991 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
7993         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
7995 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
7997         PR tree-optimization/86990
7998         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
7999         Check that the entire merged store group is made of constants only for
8000         overlapping stores.
8002 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
8004         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8005         (VTABLE_VERIFICATION_SPEC): Likewise.
8006         (SANITIZER_EARLY_SPEC): Likewise.
8007         (SANITIZER_SPEC): Likewise.
8008         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8009         * doc/invoke.texi (Link Options): Document -r.
8011 2018-09-20  Richard Biener <rguenther@suse.de>
8013         PR middle-end/87054
8014         * gimplify.c (gimplify_expr): Retain alignment of
8015         addressable lvalue in dereference.
8017 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
8019         PR bootstrap/87013
8020         * configure.ac: Check for .loc is_stmt support.
8021         * configure, config.in: Rebuilt.
8022         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8023         if not supported.
8025 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8027         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8028         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8029         -misel=no.
8031 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
8033         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8034         VECTOR_OTHER.
8035         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8036         case VECTOR_OTHER.
8038 2018-09-20  Marek Polacek  <polacek@redhat.com>
8040         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8042 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8044         PR tree-optimization/87288
8045         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8046         into account when determining PEELING_FOR_NITERS.
8048 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
8050         PR tree-optimization/86877
8051         * tree-vect-loop.c (vect_analyze_loop_2): Call
8052         vect_verify_datarefs_alignment.
8054 2018-09-19  Marek Polacek  <polacek@redhat.com>
8056         * doc/invoke.texi: Document -Wclass-conversion.
8058 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
8060         * config/pa/pa.c (pa_adjust_priority): Delete.
8061         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8063         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8064         (atomic_storehi): Likewise.
8065         (atomic_storesi): Likewise.
8066         (atomic_loaddi): Restore compare and swap exchange loop code.
8068 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
8070         PR rtl-optimization/86902
8071         * combine.c (try_combine): When changing the CC mode used, don't change
8072         an unrelated mode in other_insn to that new CC mode.
8074 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
8076         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8077         with %T in place of calls to dump_generic_expr.
8078         (prune_runtime_alias_test_list): Likewise.
8079         (create_runtime_alias_checks): Likewise.
8080         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8081         (vect_analyze_data_ref_dependence): Likewise.
8082         (vect_slp_analyze_data_ref_dependence): Likewise.
8083         (vect_record_base_alignment): Likewise.  Use %G in place of call
8084         to dump_gimple_stmt.
8085         (vect_compute_data_ref_alignment): Likewise.
8086         (verify_data_ref_alignment): Likewise.
8087         (vect_find_same_alignment_drs): Likewise.
8088         (vect_analyze_group_access_1): Likewise.
8089         (vect_analyze_data_ref_accesses): Likewise.
8090         (dependence_distance_ge_vf): Likewise.
8091         (dump_lower_bound): Likewise.
8092         (vect_prune_runtime_alias_test_list): Likewise.
8093         (vect_find_stmt_data_reference): Likewise.
8094         (vect_analyze_data_refs): Likewise.
8095         (vect_create_addr_base_for_vector_ref): Likewise.
8096         (vect_create_data_ref_ptr): Likewise.
8097         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8098         (vect_can_advance_ivs_p): Likewise.
8099         (vect_update_ivs_after_vectorizer): Likewise.
8100         (vect_gen_prolog_loop_niters): Likewise.
8101         (vect_prepare_for_masked_peels): Likewise.
8102         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8103         (vect_determine_vectorization_factor): Likewise.
8104         (vect_is_simple_iv_evolution): Likewise.
8105         (vect_analyze_scalar_cycles_1): Likewise.
8106         (vect_analyze_loop_operations): Likewise.
8107         (report_vect_op): Likewise.
8108         (vect_is_slp_reduction): Likewise.
8109         (check_reduction_path): Likewise.
8110         (vect_is_simple_reduction): Likewise.
8111         (vect_create_epilog_for_reduction): Likewise.
8112         (vect_finalize_reduction:): Likewise.
8113         (vectorizable_induction): Likewise.
8114         (vect_transform_loop_stmt): Likewise.
8115         (vect_transform_loop): Likewise.
8116         (optimize_mask_stores): Likewise.
8117         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8118         (vect_split_statement): Likewise.
8119         (vect_recog_over_widening_pattern): Likewise.
8120         (vect_recog_average_pattern): Likewise.
8121         (vect_determine_min_output_precision_1): Likewise.
8122         (vect_determine_precisions_from_range): Likewise.
8123         (vect_determine_precisions_from_users): Likewise.
8124         (vect_mark_pattern_stmts): Likewise.
8125         (vect_pattern_recog_1): Likewise.
8126         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8127         (vect_record_max_nunits): Likewise.
8128         (vect_build_slp_tree_1): Likewise.
8129         (vect_build_slp_tree_2): Likewise.
8130         (vect_print_slp_tree): Likewise.
8131         (vect_analyze_slp_instance): Likewise.
8132         (vect_detect_hybrid_slp_stmts): Likewise.
8133         (vect_detect_hybrid_slp_1): Likewise.
8134         (vect_slp_analyze_operations): Likewise.
8135         (vect_slp_analyze_bb_1): Likewise.
8136         (vect_transform_slp_perm_load): Likewise.
8137         (vect_schedule_slp_instance): Likewise.
8138         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8139         (vect_mark_stmts_to_be_vectorized): Likewise.
8140         (vect_init_vector_1): Likewise.
8141         (vect_get_vec_def_for_operand): Likewise.
8142         (vect_finish_stmt_generation_1): Likewise.
8143         (vect_check_load_store_mask): Likewise.
8144         (vectorizable_call): Likewise.
8145         (vectorizable_conversion): Likewise.
8146         (vectorizable_operation): Likewise.
8147         (vectorizable_load): Likewise.
8148         (vect_analyze_stmt): Likewise.
8149         (vect_is_simple_use): Likewise.
8150         (vect_get_vector_types_for_stmt): Likewise.
8151         (vect_get_mask_type_for_stmt): Likewise.
8152         * tree-vectorizer.c (increase_alignment): Likewise.
8154 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
8156         * doc/rtl.texi: Adjust vec_select description.
8157         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8158         non-constant selectors.
8160 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
8162         * config/aarch64/aarch64-protos.h
8163         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8164         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8165         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8166         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8167         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8168         (AARCH64_FL_PROFILE): Move index so flags are ordered.
8169         (AARCH64_ISA_RCPC8_4): New flag.
8170         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8171         to aarch64_offset_9bit_signed_unscaled_p.
8172         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8173         and use stlur.
8174         * config/aarch64/constraints.md (Ust): New constraint.
8175         * config/aarch64/predicates.md.
8176         (aarch64_9bit_offset_memory_operand): New predicate.
8177         (aarch64_rcpc_memory_operand): New predicate.
8179 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
8181         PR rtl-optimization/87361
8182         * rtlanal.c (nonzero_bits1): Revert accidental change.
8184 2018-09-19  Richard Biener  <rguenther@suse.de>
8186         PR tree-optimization/87349
8187         PR tree-optimization/87342
8188         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8190 2018-09-18  Marek Polacek  <polacek@redhat.com>
8192         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8193         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8195 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8197         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8199 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
8201         PR rtl-optimization/86882
8202         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8204 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
8206         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8207         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
8209 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
8211         PR other/87353
8212         * doc/invoke.texi (Link Options): Fix formatting and grammar.
8214 2018-09-18  Richard Biener  <rguenther@suse.de>
8216         PR middle-end/63155
8217         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
8218         (compute_samebase_partition_bases): Likewise.
8219         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
8220         (gimple_can_coalesce_p): Simplify.
8222 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
8224         Handle a library implementation of ffs calling __builtin_ffs.
8225         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
8226         (mmix_init_libfuncs): New function: make __builtin_ffs expand
8227         to __ffsdi2.
8229 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8231         * diagnostic-show-locus.c (class layout_range): Add field
8232         "m_original_idx".
8233         (layout_range::layout_range): Add "original_idx" param and use it
8234         to initialize new field.
8235         (make_range): Use 0 for original_idx.
8236         (layout::layout): Pass in index to calls to
8237         maybe_add_location_range.
8238         (layout::maybe_add_location_range): Add param "original_idx" and
8239         pass it on to layout_range.
8240         (layout::print_any_labels): Pass on range->m_original_idx to
8241         get_text call.
8242         (gcc_rich_location::add_location_if_nearby): Use 0 for
8243         original_idx.
8244         * gcc-rich-location.h (text_range_label::get_text): Update for new
8245         param.
8246         (range_label_for_type_mismatch::get_text): Likewise.
8248 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
8250         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
8252 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
8254         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
8255         format_string_diagnostic_t.
8256         (fmtwarn_n): Likewise.
8257         * substring-locations.c
8258         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
8259         (format_warning_n_va): Convert to...
8260         (format_string_diagnostic_t::emit_warning_n_va): ...this.
8261         (format_warning_va): Convert to...
8262         (format_string_diagnostic_t::emit_warning_va): ...this.
8263         (format_warning_at_substring): Convert to...
8264         (format_string_diagnostic_t::emit_warning): ...this.
8265         (format_warning_at_substring_n): Convert to...
8266         (format_string_diagnostic_t::emit_warning_n): ...this.
8267         * substring-locations.h (class format_string_diagnostic_t): New
8268         class.
8269         (format_warning_va): Convert to
8270         format_string_diagnostic_t::emit_warning_va.
8271         (format_warning_n_va): Convert to
8272         format_string_diagnostic_t::emit_warning_n_va.
8273         (format_warning_at_substring): Convert to
8274         format_string_diagnostic_t::emit_warning.
8275         (format_warning_at_substring_n): Convert to
8276         format_string_diagnostic_t::emit_warning_n.
8278 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
8279             Bernd Schmidt <bernds_cb1@t-online.de>
8281         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
8282         SImode args.
8284 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
8286         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
8287         operand 0 predicate to nonimmediate operand.
8288         (rint<mode>2_frndint): Remove insn pattern.
8289         (rint<mode>2): Change operand 1 predicate to general_operand.
8290         Extend operand 1 to XFmode and generate rintxf2 insn.
8291         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
8292         Do not use X87MODEF mode macro.
8293         (frndintxf2_<rounding>_i387): Rename from
8294         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
8295         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
8296         to XFmode and generate significandxf3 insn.
8298 2018-09-17  Richard Biener  <rguenther@suse.de>
8300         PR tree-optimization/87328
8301         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
8302         visiting unexecutable backedges when not iterating.
8303         (do_rpo_vn): Mark all edges not executable even when not
8304         iterating.
8306 2018-09-17  Martin Jambor  <mjambor@suse.cz>
8308         PR c/63886
8309         * doc/invoke.texi (Warning Options): Likewise.
8311 2018-09-17  Richard Biener  <rguenther@suse.de>
8313         PR tree-optimization/87301
8314         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
8315         clean EH info from leftover copy assignments.
8317 2018-09-17  Martin Liska  <mliska@suse.cz>
8319         PR gcov-profile/85871
8320         * gcov.c (output_intermediate_file): Fix out of bounds
8321         access.
8323 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
8325         * config/arc/arc.c: Object attributes for core4 not reflected
8326         correctly.
8327         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
8328         core3).
8330 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
8332         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
8334 2018-09-17  Martin Liska  <mliska@suse.cz>
8336         * doc/gcov.texi: Document new option --use-hotness-colors.
8337         * gcov.c (struct source_info): Declare new field.
8338         (source_info::source_info): Set default for maximum_count.
8339         (print_usage): Add new -q option.
8340         (process_args): Process it.
8341         (accumulate_line_info): Save src->maximum_count.
8342         (output_line_beginning): Make color line number if
8343         flag_use_hotness_colors is set.
8344         (output_line_details): Pass default argument value.
8345         (output_lines): Pass src->maximum_count.
8347 2018-09-17  Martin Liska  <mliska@suse.cz>
8349         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
8350         Use processor_names table.
8351         * config/i386/i386.c (ix86_default_align): Use
8352         processor_cost_table for alignment values.
8353         (ix86_option_override_internal): Use processor_names.
8354         (ix86_function_specific_print): Likewise.
8355         * config/i386/i386.h (struct processor_costs):
8356         Add alignment values.
8357         (struct ptt): Remove and replace with const char *.
8358         * config/i386/x86-tune-costs.h (struct processor_costs):
8359         Declare default alignments for all costs.
8361 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
8363         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
8364         symbolics or VR_VARYING ranges for ABS_EXPR.
8365         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
8366         when range will wrap.
8368 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
8370         PR middle-end/86864
8371         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
8372         before and after a JUMP_TABLE_DATA.
8374 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
8376         PR middle-end/87188
8377         * dojump.c (do_compare_and_jump): Canonicalize function pointers
8378         when one operand is a function pointer.  Use POINTER_TYPE_P and
8379         FUNC_OR_METHOD_TYPE_P.
8380         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
8381         * fold-const.c (build_range_check): Likewise.
8382         * match.pd (simple_comparison): Likewise.
8384 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
8386         PR c/82967
8387         * spellcheck.c (get_edit_distance_cutoff): New function.
8388         (selftest::test_edit_distance_unit_test_oneway): Rename to...
8389         (selftest::test_get_edit_distance_one_way): ...this.
8390         (selftest::test_get_edit_distance_unit): Rename to...
8391         (selftest::test_get_edit_distance_both_ways): ...this.
8392         (selftest::test_edit_distances): Move tests to this new function,
8393         and test some more pairs of strings.  Update for above renaming.
8394         (selftest::get_old_cutoff): New function.
8395         (selftest::test_get_edit_distance_cutoff): New function.
8396         (selftest::assert_suggested_for): New function.
8397         (ASSERT_SUGGESTED_FOR): New macro.
8398         (selftest::assert_not_suggested_for): New function.
8399         (ASSERT_NOT_SUGGESTED_FOR): New macro.
8400         (selftest::test_suggestions): New function.
8401         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
8402         tests to selftest::test_edit_distances and call it.  Add calls to
8403         selftest::test_get_edit_distance_cutoff and
8404         selftest::test_suggestions.
8405         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
8406         (best_match::consider): Replace hard-coded cutoff calculation with
8407         a call to...
8408         (best_match::get_cutoff): New declaration.
8409         (best_match::get_best_meaningful_candidate): Likewise.
8411 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8413         * builtins.c (fold_builtin_strlen): Remove TODO comment.
8415 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8417         revert:
8418         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8420         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8421         terminated string literal.
8423 2018-09-14  Martin Sebor  <msebor@redhat.com>
8425         * builtins.c (unterminated_array): Handle ARRAY_REF.
8426         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
8427         * builtins.h (unterminated_array): Declare extern.
8428         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
8429         arrays.
8430         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
8431         calls.
8433 2018-09-14  Martin Sebor  <msebor@redhat.com>
8434             Jeff Law  <law@redhat.com>
8436         * builtins.c (unterminated_array): New.
8437         (expand_builtin_strcpy): Adjust.
8438         (expand_builtin_strcpy_args): Detect unterminated arrays.
8439         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
8440         unterminated arrays.
8441         * gimple-fold.h (get_maxval_strlen): Add argument.
8442         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
8444         * gimple-fold.c (get_range_strlen): Add argument.
8445         (get_maxval_strlen): Adjust.
8446         * gimple-fold.h (get_range_strlen): Add argument.
8448 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
8450         * config/i386/movdirintrin.h: Fix copyright year.
8452 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
8454         * reg-stack.c: Include regs.h.
8455         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
8456         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
8457         FIRST_STACK_REG, not DFmode.
8458         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
8459         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
8460         (change stack): Default register mode to the reg_raw_mode of
8461         FIRST_STACK_REG, not DFmode.
8462         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
8463         (*swapxf): Rename from swapxf.
8465 2018-09-14  Carl Love  <cel@us.ibm.com>
8467         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
8468         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
8470 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
8472         PR target/87224
8473         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
8474         alternatives.
8476 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
8478         PR target/85628
8479         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
8481 2018-09-14  Jason Merrill  <jason@redhat.com>
8483         Fix --enable-gather-detailed-mem-stats.
8484         * hash-table.c (hash_table_usage): Change from variable to function.
8485         * hash-table.h: Adjust.
8486         * Makefile.in: Add missing dependencies on hash-table.h.
8488 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8490         PR tree-optimization/87259
8491         PR lto/87283
8492         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
8493         execute_cse_reciprocals_1 has tried transforming.
8495 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
8497         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
8498         VR_VARYING for PLUS/MINUS_EXPR.
8500 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
8502         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
8503         formatting.
8505 2018-09-14  Richard Biener  <rguenther@suse.de>
8507         PR middle-end/63155
8508         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
8509         bits for the merged partition.
8511 2018-09-13  Martin Sebor  <msebor@redhat.com>
8512             Bernd Edlinger  <bernd.edlinger@hotmail.de>
8514         * builtins.h (c_srlen): Add argument.
8515         * builtins.c (warn_string_no_nul): New function.
8516         (c_strlen): Add argument and use it.  Update recursive calls.
8517         Pass DECL argument to string_constant to get info on non
8518         terminated strings.  Update *NONSTR as needed.
8519         (fold_builtin_strlen): Add argument to calls to c_strlen.
8520         Warn for unterminated arrays.
8521         (warn_string_no_null): Add prototype.
8522         * expr.c (string_constant): Update arguments.  Update recursive
8523         calls appropriately.  Detect missing NUL terminator and outermost
8524         declaration its missing in.
8525         Improve checks for arrays with nonzero lower bound or elements
8526         that are not a single byte.  Simplify offset computation.
8527         Simplify checks for non-NUL terminated strings.
8528         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
8529         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
8531 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8533         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
8534         correctly.
8535         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
8536         argument.  Fix range checks.
8537         * fold-const.h (c_getstr): Adjust protoype.
8538         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
8539         string is constant but contains no NUL byte.
8541         * expr.c (string_constant): Adjust function comment.
8542         Remove bogus check for zero termination.
8544         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
8546         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
8547         (get_constant_size): Don't make STRING_CSTs larger than they are.
8548         (check_string_literal): New check function for STRING_CSTs.
8549         (output_constant): Use it.
8551 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
8553         PR target/86812
8554         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
8556 2018-09-13  Richard Biener  <rguenther@suse.de>
8558         PR tree-optimization/87263
8559         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
8560         (struct unwind_state): Add max_rpo field.
8561         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
8562         Compute max_rpo, the max RPO number a block can be backwards reached
8563         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
8564         separating it from the iterating mode.
8566 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
8568         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
8569         (rfs_decision): New scheduling decision.
8571 2018-09-13  Richard Biener  <rguenther@suse.de>
8573         PR bootstrap/87134
8574         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
8575         (vn_nary_op_insert_pieces_predicated): Do not write useless
8576         valid_dominated_by_p entry outside of the allocated storage.
8578 2018-09-13  Omar Sandoval  <osandov@osandov.com>
8579             Tom de Vries  <tdevries@suse.de>
8581         PR debug/86985
8582         * dwarf2out.c (is_c): New function.
8583         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
8585 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
8587         PR target/85628
8588         * config/aarch64/aarch64.md (*aarch64_bfxil):
8589         Define.
8590         * config/aarch64/constraints.md (Ulc): Define.
8591         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
8592         Define.
8593         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
8594         New function.
8596 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
8598         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
8599         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
8600         aarch64_layout_frame call.
8601         (aarch64_expand_epilogue): Likewise.
8602         (aarch64_initial_elimination_offset): Likewise.
8603         (aarch64_get_separate_components): Likewise.
8604         (aarch64_use_return_insn_p): Likewise.
8605         (aarch64_layout_frame): Remove unneeded check.
8607 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8609         * configure.ac: Only append
8610         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
8611         gcc_config_arguments if it was never reconfigured or last reconfigure
8612         was with different arguments.
8613         * configure: Regenerated.
8615 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8616             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8618         PR middle-end/87290
8619         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
8620         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8622 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8624         PR tree-optimization/87287
8625         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
8626         X % C == 0 to X % (unsigned) C == 0 optimization to ...
8627         * match.pd (X % C == 0): ... here.  New optimization.
8629 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8631         PR middle-end/82853
8632         * expr.h (maybe_optimize_mod_cmp): Declare.
8633         * expr.c (mod_inv): New function.
8634         (maybe_optimize_mod_cmp): New function.
8635         (do_store_flag): Use it.
8636         * cfgexpand.c (expand_gimple_cond): Likewise.
8638 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
8639             Julian Brown  <julian@codesourcery.com>
8641         PR middle-end/86336
8642         * gimplify.c (gimplify_scan_omp_clauses): Set
8643         target_firstprivatize_array_bases in OpenACC parallel and kernels
8644         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
8645         OpenACC data regions.
8647 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
8649         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
8650         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
8652 2018-09-12  Richard Biener  <rguenther@suse.de>
8654         PR tree-optimization/87280
8655         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
8656         edge but unreachable target.
8657         (do_rpo_vn): For conservatively handling a PHI only mark
8658         the backedge executable but not the block reachable.
8660 2018-09-12  Richard Biener  <rguenther@suse.de>
8662         PR tree-optimization/87266
8663         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
8664         visited blocks.
8666 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
8668         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
8669         constants.
8670         ("trunc<BFP:mode><DFP_ALL:mode>2")
8671         ("trunc<DFP_ALL:mode><BFP:mode>2")
8672         ("extend<BFP:mode><DFP_ALL:mode>2")
8673         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
8674         according to the target operand type.
8676 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8677             Andreas Krebbel  <krebbel@linux.ibm.com>
8679         PR tree-optimization/86844
8680         * gimple-ssa-store-merging.c
8681         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
8682         there are any overlapping stores in between them, make sure they are
8683         also coalesced or we give up completely.
8685 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8687         PR middle-end/87248
8688         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
8689         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
8691 2018-09-12  Tom de Vries  <tdevries@suse.de>
8693         * common.opt (gdescribe-dies): Add option.
8694         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
8695         attribute for artifical and nameless decls.
8696         (dwarf2out_register_external_die): Add description attribute to
8697         external reference die.
8698         (add_desc_attribute): New functions.
8699         (gen_subprogram_die): Add description attribute to
8700         DW_TAG_call_site_parameter.
8701         * tree-pretty-print.c (print_generic_expr_to_str): New function.
8702         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
8703         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
8704         -gno-describe-dies.
8705         (@item -gdescribe-dies): Add.
8707 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
8709         * tree-vrp.c (vrp_shift_undefined_p): Remove.
8710         (extract_range_from_binary_expr_1: Call
8711         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
8712         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
8713         depend on sign.
8715 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
8717         * gimple-ssa-warn-alloca.c
8718         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
8719         field for ALLOCA_BOUND_*_LARGE.
8721 2018-09-11  Nathan Sidwell  <nathan@acm.org>
8723         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
8725 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8727         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8728         for clobbers.  Remove obsolete comment.
8730 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8732         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
8733         mpxchk, mpxld and mpxst types.
8734         (define_attr length_immediate): Remove all processing of mpx types.
8735         (define_attr prefix_0f): Ditto.
8736         (define_attr memory): Ditto.
8738 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8740         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
8741         (log<mode>2): Change operand 1 predicate to general_operand.
8742         Extend operand 1 to XFmode and generate logxf3 insn.
8743         (log10<mode>2): Change operand 1 predicate to general_operand.
8744         Extend operand 1 to XFmode and generate log10xf3 insn.
8745         (log2<mode>2): Change operand 1 predicate to general_operand.
8746         Extend operand 1 to XFmode and generate log2xf3 insn.
8747         (fyl2xp1_extend<mode>xf3_i387): Remove.
8748         (log1p<mode>2): Change operand 1 predicate to general_operand.
8749         Extend operand 1 to XFmode and generate log1pxf3 insn.
8750         (fxtract_extend<mode>xf3_i387): Remove.
8751         (logb<mode>2): Change operand 1 predicate to general_operand.
8752         Extend operand 1 to XFmode and generate logbxf3 insn.
8753         (ilogb<mode>2): Change operand 1 predicate to general_operand.
8754         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
8755         (significand<mode>2): Change operand 1 predicate to general_operand.
8756         Extend operand 1 to XFmode and generate significandxf3 insn.
8758 2018-09-11  Nathan Sidwell  <nathan@acm.org>
8760         * gcc.c (perror_with_name, pfatal_with_name): Delete.
8761         (load_specs): Use fatal_error.
8762         (DELETE_IF_ORDINARY, process_command): Use error.
8763         (execute, run_attempt): Use fatal_error.
8765 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
8767         * diagnostic-core.h (sorry_at): New prototype.
8768         * diagnostic.c (sorry_at): New function.
8770 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
8772         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
8773         by zero as VR_UNDEFINED.
8775 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
8777         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
8778         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
8779         (<sincos>mode2): New expander.
8780         (sincos_extend<mode>xf3_i387): Remove insn pattern.
8781         (sincos -> sin, cos splitters): Remove splitter patterns.
8782         (sincos<mode>3): Change operand 2 predicate to general_operand.
8783         Extend operand 2 to XFmode and generate sincosxf3 insn.
8784         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8785         Change operand 3 predicate to const1_operand.
8786         (fptan_extend<mode>xf4_i387): Remove insn pattern.
8787         (tanxf2): Update operands in the call to fptanxf4_i387.
8788         (tan<mode>2): Change operand 1 predicate to general_operand.
8789         Extend operand 1 to XFmode and generate tanxf3 insn.
8790         (atan2xf3): Rename from *fpatanxf3_i387.
8791         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8792         (atan2xf3): Remove expander.
8793         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
8794         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8795         (atan<mode>2): Change operand 1 predicate to general_operand.
8796         Extend operand 1 to XFmode and generate atanxf3 insn.
8798 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
8800         * config/i386/i386.md (x87/SSE constant load splitter): Use
8801         memory_operand instead of nonimmediate_operand for input operand
8802         predicate.
8804 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
8806         * config/i386/i386.md (float partial SSE register stall splitter): Move
8807         splitter near its instruction pattern.
8808         (float_extend partial SSE register stall splitter): Ditto.
8809         (float_truncate partial SSE register stall splitter): Ditto.
8811 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
8813         PR target/86794
8814         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8815         to speculation_safe_value_not_needed.
8817         PR target/85666
8818         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8819         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8820         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8821         leaf_function_p, instead use has_hard_reg_initial_val.
8823 2018-09-09  Nathan Sidwell  <nathan@acm.org>
8825         * gcc.h (pfatal_with_name): Don't declare here.
8826         * gcc.c (pfatal_with_name): Make static.
8828 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
8830         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8831         earlyclobber.
8833 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
8835         PR rtl-optimization/85458
8836         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8837         priority hook to reduce the priority of EXPR.
8839 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
8841         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8842         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
8843         with X87_ENABLE_FLOAT.  Remove preparation code.
8844         (*float<SWI48:mode><MODEF:mode>2): Rename from
8845         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
8846         math using "enabled" attribute.
8847         (*floatdi<MODEF:mode>2_i387): Rename from
8848         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
8849         enable for 32bit targets only.
8850         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8851         splitter.
8852         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8853         as operand 1 predicate.  Rewrite as define_insn_and_split.
8854         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8856 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
8858         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8859         to fallthru to FLOAT case.
8861 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8863         PR target/86731
8864         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8865         around folding of vec_sl to handle out of range shift values.
8867 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
8869         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8870         Update callers to gen_fix_trunc<mode>_i387_fisttp
8871         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8872         nonimmediate_operand.
8873         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8874         and corresponding splitters.
8875         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
8876         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
8877         (fix_truncdi_i387_with_temp): Remove insn pattern
8878         and corresponding splitters.
8879         (fix_trunc<mode>_i387): Change operand 0 predicate to
8880         nonimmediate_operand.
8881         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
8882         and corresponding splitters.
8883         (*fistdi2_1): Remove.
8884         (fistdi2): Ditto.
8885         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
8886         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
8887         (*fist<mode>2_1): Remove.
8888         (fist<mode>2): Ditto.
8889         (fist<mode>2_with_temp): Remove insn pattern and corresponding
8890         splitters.
8891         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
8892         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
8893         (fistdi2_<rounding>): Change operand 0 predicate to
8894         nonimmediate_operand.
8895         (fistdi2_<rounding>_with_temp): Remove insn pattern
8896         and corresponding splitters.
8897         (fist<mode>2_<rounding>): Change operand 0 predicate to
8898         nonimmediate_operand.
8899         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
8900         and corresponding splitters.
8902         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
8904 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8906         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
8907         the init value.
8909 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8911         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
8912         early gimple folding of vec_splat().
8913         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
8914         * gimple-fold.h: Add an extern define for tree_vec_extract().
8916 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8918         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
8919         wrappers around TREE_TYPE comparisons.
8921 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
8923         PR target/80080
8924         * config/s390/predicates.md: Add nonsym_memory_operand.
8925         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
8926         contains a SYMBOL_REF, load it into an intermediate pseudo.
8927         (s390_emit_compare_and_swap): Legitimize operand.
8928         * config/s390/s390.md: Use the new nonsym_memory_operand
8929         with UNSPECV_CAS patterns.
8931 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
8933         PR target/80080
8934         * config/s390/s390-passes.def: New file.
8935         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
8936         declaration.
8937         (make_pass_s390_early_mach): Add declaration.
8938         * config/s390/s390.c (make_pass_s390_early_mach):
8939         (s390_option_override): Remove dynamic registration.
8940         * config/s390/t-s390: Add s390-passes.def.
8942 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
8944         * config/s390/s390.c (s390_decompose_constant_pool_ref):
8945         Remove UNSPEC_LTREL_BASE check.
8946         (annotate_constant_pool_refs): Likewise.
8947         (find_constant_pool_ref): Likewise.
8948         (find_ltrel_base): Removed.
8949         (replace_ltrel_base): Removed.
8950         (s390_mainpool_finish): Remove replace_ltrel_base call.
8951         (s390_chunkify_start): Remove pending LTREL_BASE logic.
8952         (s390_chunkify_finish): Remove replace_ltrel_base call.
8953         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
8955 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
8957         PR target/86779
8958         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8959         to speculation_safe_value_not_needed.
8961 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
8962             Bernd Schmidt  <bernds_cb1@t-online.de>
8964         * config/nvptx/nvptx-opts.h: New file.
8965         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
8966         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
8967         (ASM_SPEC): Define.
8968         (TARGET_SM35): New macro.
8969         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
8970         correct predicate.
8971         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
8972         values.
8973         (misa=): New option.
8974         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
8976 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
8978         * config/i386/i386.md (truncdfsf2): Remove expander.
8979         (truncdfsf2_with_temp): Ditto.
8980         (truncxf<mode>2): Ditto.
8981         (*truncdfsf_fast_mixed): Remove insn pattern.
8982         (*truncdfsf_fast_i387): Ditto.
8983         (*truncdfsf_mixed): Ditto.
8984         (*truncdfsf_i387): Ditto.
8985         (*truncdfsf2_i387_1): Ditto.
8986         (*truncxfsf2_mixed): Ditto.
8987         (*truncxfdf2_mixed): Ditto.
8988         (*truncxf<mode>2_i387_noop): Ditto. Update callers
8989         to call gen_truncxf<mode>2 instead.
8990         (*truncxf<mode>2_i387): Remove.
8991         (reg->reg splitters): Remove splitter pattern.
8992         (reg->mem splitters): Ditto.
8994         (truncdfsf2): New insn pattern.
8995         (truncxf<mode>2): Ditto.
8997 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8999         * tree-ssa-math-opts.c (is_mult_by): New function.
9000         (is_square_of): Use the above.
9001         (optimize_recip_sqrt): New function.
9002         (pass_cse_reciprocals::execute): Use the above.
9004 2018-09-05  Richard Biener  <rguenther@suse.de>
9006         PR bootstrap/87134
9007         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9008         to zero-init the emplaced vec.
9010 2018-09-05  Martin Liska  <mliska@suse.cz>
9012         PR tree-optimization/87205
9013         * tree-switch-conversion.c (pass_lower_switch::execute):
9014         Group cases for switch statements.
9016 2018-09-05  Richard Biener  <rguenther@suse.de>
9018         PR tree-optimization/87217
9019         * tree-ssa-sccvn.c (vuse_valueize): New.
9020         (vn_reference_lookup_pieces): Use it.
9021         (vn_reference_lookup): Likewise.
9023 2018-09-05  Nathan Sidwell  <nathan@acm.org>
9025         PR c++/87137
9026         * stor-layout.c (place_field): Scan forwards to check last
9027         bitfield when ms_bitfield_placement is in effect.
9029 2018-09-05  Richard Biener  <rguenther@suse.de>
9031         PR bootstrap/87225
9032         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9033         return.
9035 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9036             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
9038         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9039         * config.gcc (extra_objs): Build it.
9040         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9041         Likewise.
9042         * config/aarch64/aarch64-passes.def
9043         (pass_tag_collision_avoidance): New pass.
9044         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9045         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9046         (aarch64_classify_address): Remove static qualifier.
9047         (aarch64_address_info, aarch64_address_type): Move to...
9048         * config/aarch64/aarch64-protos.h: ... here.
9049         (make_pass_tag_collision_avoidance): New function.
9050         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9051         New tuning flag.
9053 2018-09-05  Martin Liska  <mliska@suse.cz>
9055         * doc/gcov.texi: Update documentation of humar
9056         readable mode.
9057         * gcov.c (format_count): Print one decimal place, it provides
9058         more fine number of situations like '1G' vs. '1.4G'.
9060 2018-09-05  Martin Liska  <mliska@suse.cz>
9062         PR target/87164
9063         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9064         * optc-gen.awk: Allow 'Var' for Deprecated options in order
9065         to generate a MASK value.
9067 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
9069         PR debug/86593
9070         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9071         if frame pointer isn't used.
9072         (compute_frame_pointer_to_fb_displacement): Likewise.
9074 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
9076         PR target/87198
9077         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9078         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9079         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9080         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9081         and OPTION_MASK_ISA_XSAVEC_UNSET.
9083 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
9085         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9086         XOR operations in NAND case.
9088 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9090         * wide-int-range.cc (wide_int_range_convert): New.
9091         * wide-int-range.h (wide_int_range_convert): New.
9092         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9093         code into wide_int_range_convert.
9094         (extract_range_into_wide_ints): Do not munge anti range constants
9095         into the entire domain.  Just return the range back.
9097 2018-09-04  Martin Liska  <mliska@suse.cz>
9099         * genmatch.c (output_line_directive): Add new argument
9100         fnargs.
9101         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9103 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9105         * doc/invoke.texi (Option Summary): Add whitespace.
9107         * doc/invoke.texi (Option Summary): Add -Waligned-new.
9109 2018-09-04  Richard Biener  <rguenther@suse.de>
9111         PR tree-optimization/87211
9112         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9113         backedge value we're supposed to treat as VARYING also number
9114         the PHI to VARYING in case it got a different value-number already.
9116 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
9118         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9119         (extract_range_from_binary_expr_1): Do not call
9120         vrp_can_optimize_bit_op.
9121         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9122         static.
9123         (wide_int_range_get_mask_and_bounds): New.
9124         (wide_int_range_optimize_bit_op): New.
9125         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9126         (wide_int_range_bit_and): Same.
9127         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9128         (wide_int_range_optimize_bit_op): New.
9129         (wide_int_range_get_mask_and_bounds): New.
9131 2018-09-04  Richard Biener  <rguenther@suse.de>
9133         PR tree-optimization/87176
9134         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9135         variable.  When value-numbering a virtual PHI node make sure
9136         to not value-number to the backedge value.
9138 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
9140         * doc/extend.texi (Long Long, Hex Floats): Document support for
9141         long long and hex floats in more recent versions of ISO C++.
9143 2018-09-03  Richard Biener  <rguenther@suse.de>
9145         PR tree-optimization/87177
9146         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9147         cleanup.
9149 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9151         * bb-reorder.c (edge_order): Convert to C-qsort-style
9152         tri-state comparator.
9153         (reorder_basic_blocks_simple): Change std::stable_sort to
9154         gcc_stablesort.
9156 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9158         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9159         tri-state comparator.
9160         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9162 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9164         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
9165         (mergesort): ... here as maximum count for using netsort.
9166         (gcc_qsort): Set nlim to 3 if stable sort is requested.
9167         (gcc_stablesort): New.
9168         * system.h (gcc_stablesort): Declare.
9170 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
9172         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9173         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
9174         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
9176 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
9178         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9179         lxsdx and stxsdx alternatives.
9180         (*mov<mode>_hardfloat64): Ditto.
9181         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9183 2018-09-03  Richard Biener  <rguenther@suse.de>
9185         PR tree-optimization/87200
9186         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9187         simplify result.
9189 2018-09-03  Martin Liska  <mliska@suse.cz>
9191         PR tree-optimization/87201
9192         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9193         Fix parenthesis in an expression.
9195 2018-09-03  Richard Biener  <rguenther@suse.de>
9197         PR tree-optimization/87197
9198         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9199         visited.  CSE the VN_INFO hashtable lookup.
9201         PR tree-optimization/87169
9202         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9203         iterating make sure there's no extra backedges from irreducible
9204         regions feeding the header.  Mark the destination block
9205         executable.
9207 2018-09-03  Martin Liska  <mliska@suse.cz>
9209         PR driver/83193
9210         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
9211         * common/common-targhooks.c (default_get_valid_option_values):
9212         New function.
9213         * common/common-targhooks.h (default_get_valid_option_values):
9214         Likewise.
9215         * common/config/i386/i386-common.c: Move processor_target_table
9216         from i386.c.
9217         (ix86_get_valid_option_values): New function.
9218         (TARGET_GET_VALID_OPTION_VALUES): New macro.
9219         * config/i386/i386.c (struct ptt): Move to i386-common.c.
9220         (PTA_*): Move all defined masks into i386-common.c.
9221         (ix86_function_specific_restore): Use new processor_cost_table.
9222         * config/i386/i386.h (struct ptt): Moved from i386.c.
9223         (struct pta): Likewise.
9224         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
9225         * doc/tm.texi.in: Likewise.
9226         * opt-suggestions.c (option_proposer::suggest_option):
9227         Pass prefix to build_option_suggestions.
9228         (option_proposer::get_completions): Likewise.
9229         (option_proposer::build_option_suggestions): Use the new target
9230         hook.
9231         * opts.c (struct option_help_tuple): New struct.
9232         (print_filtered_help): Use the new target hook.
9234 2018-09-03  Martin Liska  <mliska@suse.cz>
9236         PR middle-end/59521
9237         * predict.c (set_even_probabilities): Add likely_edges
9238         argument and handle cases where we have precisely one
9239         likely edge.
9240         (combine_predictions_for_bb): Catch also likely_edges.
9241         (tree_predict_by_opcode): Handle gswitch statements.
9242         * tree-cfg.h (find_case_label_for_value): New declaration.
9243         (find_taken_edge_switch_expr): Likewise.
9244         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9245         Find pivot in decision tree based on probabily, not by number of
9246         nodes.
9248 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
9250         * doc/standards.texi (Standards): Update Objective-C reference.
9252 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9254         * doc/install.texi (Prerequisites): Update link for MPC.
9256 2018-09-01  Michael Matz  <matz@suse.de>
9258         PR tree-optimization/87074
9259         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
9260         PHIs for outer-loop uses.
9262 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9264         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
9265         * doc/invoke.texi (C Dialect Options): Ditto.
9267 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
9269         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
9271 2018-08-31  Richard Biener  <rguenther@suse.de>
9273         PR tree-optimization/87168
9274         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
9275         (rpo_elim::eliminate_avail): When OP was not visited it must
9276         be available.
9278 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
9280         * tree-vrp.c (copy_value_range): Convert param "from" from
9281         "value_range *" to "const value_range *".
9282         (range_is_null): Likewise for param "vr".
9283         (range_int_cst_p): Likewise.
9284         (range_int_cst_singleton_p): Likewise.
9285         (symbolic_range_p): Likewise.
9286         (value_ranges_intersect_p): Likewise for both params.
9287         (value_range_nonnegative_p): Likewise for param "vr".
9288         (value_range_constant_singleton): Likewise.
9289         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
9290         (extract_range_into_wide_ints): Likewise for param "vr".
9291         (extract_range_from_multiplicative_op): Likewise for params "vr0"
9292         and "vr1".
9293         (vrp_can_optimize_bit_op): Likewise.
9294         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
9295         "vr1_".
9296         (extract_range_from_unary_expr): Likewise.
9297         (debug_value_range): Likewise for param "vr".
9298         (value_range::dump): Add "const" qualifier.
9299         (vrp_prop::check_array_ref): Convert local "vr" from
9300         "value_range *" to "const value_range *".
9301         (vrp_prop::check_mem_ref): Likewise.
9302         (vrp_prop::visit_stmt): Likewise for local "old_vr".
9303         (vrp_intersect_ranges_1): Likewise for param "vr_1".
9304         (vrp_intersect_ranges): Likewise.
9305         (simplify_stmt_for_jump_threading): Likewise for local "vr".
9306         (vrp_prop::vrp_finalize): Likewise.
9307         * tree-vrp.h (value_range::dump): Add "const" qualifier.
9308         (vrp_intersect_ranges): Add "const" qualifier to params as above.
9309         (extract_range_from_unary_expr): Likewise.
9310         (value_range_constant_singleton): Likewise.
9311         (symbolic_range_p): Likewise.
9312         (copy_value_range): Likewise.
9313         (extract_range_from_binary_expr_1): Likewise.
9314         (range_int_cst_p): Likewise.
9315         (vrp_set_zero_nonzero_bits): Likewise.
9316         (range_int_cst_singleton_p): Likewise.
9318 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
9320         * config/aarch64/arm_neon.h (vabsd_s64): New.
9321         (vnegd_s64): Likewise.
9323 2018-08-31  Martin Jambor  <mjambor@suse.cz>
9325         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
9327 2018-08-31  Martin Liska  <mliska@suse.cz>
9329         * ipa-icf.c (sem_item::add_type): Use
9330         sem_item::m_type_hash_cache.
9331         * ipa-icf.h: Move the cache from sem_item_optimizer
9332         to sem_item.
9334 2018-08-31  Nathan Sidwell  <nathan@acm.org>
9336         * doc/extend.texi (Backwards Compatibility): Remove implicit
9337         extern C leeway of () being (...).
9339 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9341         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
9343 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
9345         PR target/86684
9346         PR target/87149
9347         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
9349 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
9351         PR middle-end/87138
9352         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
9353         gen_int_mode.  Formatting fixes.
9355 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
9357         * target.def (custom_function_descriptors): Improve documentation.
9358         * doc/tm.texi.in (Trampolines): Expand discussion of function
9359         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
9360         beginning of the section.
9361         * doc/tm.texi: Regenerated.
9363 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
9365         * cfg.h (class auto_edge_flag): Spell out the template-id of the
9366         base class in the initializer list.  This is a workaround for
9367         building with older GCC.
9368         (class auto_bb_flag): Likewise.
9370 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
9372         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
9373         (altivec_vcmpequ<VI_char>_p): Remove star.
9374         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
9375         vector load modes.
9376         (expand_strncmp_vec_sequence): New function.
9377         (emit_final_str_compare_vec): New function.
9378         (expand_strn_compare): Add support for vector strncmp.
9379         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
9380         length specification to bytes.
9381         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
9382         (vcmpnezb_p): New pattern.
9383         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
9384         for option -mstring-compare-inline-limit.
9386 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
9388         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
9389         (PTA_SKYLAKE): Add PTA_AES.
9390         (PTA_GOLDMONT): Likewise.
9392 2018-08-29  Jan Hubicka  <jh@suse.cz>
9394         PR lto/86517
9395         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
9396         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
9398 2018-08-29  Jan Hubicka  <jh@suse.cz>
9400         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
9401         TYPE_STUB_DECL.
9402         (hash_tree): Do not visit TYPE_STUB_DECL.
9403         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
9404         stream TYPE_STUB_DECL.
9405         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
9406         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
9407         after free_lang_data.
9408         (type_in_anonymous_namespace_p): Likewise.
9410 2018-08-29  Jan Hubicka  <jh@suse.cz>
9412         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9413         comment that it has to be even number.
9414         (class sreal): Change m_sig type to int32_t.
9415         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9416         int64_t for temporary calculations.
9417         (sreal_verify_basics): Drop one bit from minimum and maximum.
9419 2018-08-30  Richard Biener  <rguenther@suse.de>
9421         PR tree-optimization/87147
9422         * tree-ssa-sccvn.c (SSA_VISITED): New function.
9423         (visit_phi): When the degenerate result is from the backedge and
9424         we didn't visit its definition yet drop to VARYING.
9425         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
9427 2018-08-29  Jan Hubicka  <jh@suse.cz>
9429         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
9430         DECL_VINDEX.
9431         (hash_tree): Likewise.
9433 2018-08-29  Jan Hubicka  <jh@suse.cz>
9435         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
9436         and TYPE_NEXT_REF_TO.
9438 2018-08-29  Jan Hubicka  <jh@suse.cz>
9440         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9441         comment that it has to be even number.
9442         (class sreal): Change m_sig type to int32_t.
9443         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9444         int64_t for temporary calculations.
9445         (sreal_verify_basics): Drop one bit from minimum and maximum.
9447 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
9449         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
9451 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
9453         PR middle-end/86995
9454         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
9455         if to_add is negative.
9457 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9459         PR middle-end/87053
9460         * builtins.c (c_strlen): Improve range checks.
9462 2018-08-29  Martin Sebor  <msebor@redhat.com>
9463             Jeff Law  <law@redhat.com>
9465         PR tree-optimization/86714
9466         PR tree-optimization/86711
9467         * builtins.c (c_strlen): Add arguments to call to string_constant.
9468         * expr.c (string_constant): Add argument.  Detect missing nul
9469         terminator and outermost declaration it's missing in.
9470         * expr.h (string_constant): Add argument.
9471         * fold-const.c (read_from_constant_string): Add arguments to call to
9472         string_constant.
9473         (c_getstr): Likewise.
9474         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9475         to string_constant.
9476         * tree-ssa-strlen.c (get_stridx): Likewise.
9478 2018-08-29  Jan Hubicka  <jh@suse.cz>
9480         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
9481         Do not stream DECL_VINDEX.
9482         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
9483         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
9484         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
9486 2018-08-29  Richard Biener  <rguenther@suse.de>
9488         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
9489         virtual operands that are not default defs to honor region
9490         boundaries.
9491         (rpo_vn_valueize): Remove ineffective code here.
9493 2018-08-29  Richard Biener  <rguenther@suse.de>
9495         PR tree-optimization/87132
9496         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
9497         when skipping defs reachable over backedges.
9499 2018-08-29  Richard Biener  <rguenther@suse.de>
9501         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
9502         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
9503         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
9504         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
9505         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
9506         (vn_reference_lookup_3): Remove use of const_parms.
9507         (free_rpo_vn): Do not free const_parms.
9508         (do_rpo_vn): Do not call init_const_parms.
9509         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
9510         SSA_NAME_POINTS_TO_READONLY_MEMORY.
9511         (call_may_clobber_ref_p_1): Likewise.
9513 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
9515         PR other/86726
9516         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
9517         (-O): Ditto.
9518         (-ftree-scev-cprop): Document.
9520 2018-08-29  Jan Hubicka  <jh@suse.cz>
9522         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
9523         parameters.
9524         (sreal constructor): Update.
9525         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
9526         sreal:operator/): Update.
9528 2018-08-29  Martin Liska  <mliska@suse.cz>
9530         * tree-switch-conversion.c (switch_conversion::expand):
9531         Strenghten assumption about gswitch statements.
9533 2018-08-29  Richard Biener  <rguenther@suse.de>
9535         PR tree-optimization/87117
9536         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
9537         re-value-number released SSA VDEFs.
9539 2018-08-29  Richard Biener  <rguenther@suse.de>
9541         PR tree-optimization/87126
9542         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
9544 2018-08-28  Jim Wilson  <jimw@sifive.com>
9546         * config/riscv/pic.md: Rewrite.
9547         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
9548         invalid address.
9549         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
9550         (SOFTF, default_load, softload, softstore): New.
9552 2018-08-28  Jeff Law  <law@redhat.com>
9554         * fold-const.c (fold_binary_loc): Remove recently added assert.
9556 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
9558         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
9559         to OP parmeter of generated function.
9561 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
9563         PR tree-optimization/87009
9564         * match.pd: Add boolean optimizations.
9566 2018-08-28  Martin Sebor  <msebor@redhat.com>
9568         PR middle-end/86631
9569         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
9570         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
9571         (pass_walloca::gate): Use it.
9572         (alloca_call_type): Same.
9573         (pass_walloca::execute): Same.
9574         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
9576 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
9578         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
9579         GCC_VERSION for usage of "__gcc_dump_printf__" format from
9580         >= 3005 to >= 9000.
9582 2018-08-28  Richard Biener  <rguenther@suse.de>
9584         PR tree-optimization/87124
9585         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
9586         constants before looking up avail.
9588 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
9590         PR middle-end/87099
9591         * calls.c (maybe_warn_nonstring_arg): Punt early if
9592         warn_stringop_overflow is zero.  Don't call get_range_strlen
9593         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
9594         Swap comparison operands to have constants on rhs.  Only use
9595         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
9596         increment lenrng[0].
9598 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
9600         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
9601         use of tree_to_shwi.  Remove duplicated test for the size being
9602         a whole number of bytes.
9604 2018-08-28  Richard Biener  <rguenther@suse.de>
9606         PR tree-optimization/87117
9607         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
9608         Handle removed stmt without LHS (GIMPLE_NOP).
9610 2018-08-28  Richard Biener  <rguenther@suse.de>
9612         PR tree-optimization/87117
9613         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
9614         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
9616 2018-08-28  Richard Biener  <rguenther@suse.de>
9618         PR tree-optimization/87117
9619         * tree-ssa-pre.c (compute_avail): Do not make expressions
9620         with predicated values available.
9621         (get_expr_value_id): Assert we do not run into predicated value
9622         expressions.
9624 2018-08-28  Richard Biener  <rguenther@suse.de>
9626         PR tree-optimization/87117
9627         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
9628         get virtual operands.
9629         (get_expr_operands): Handle STRING_CST like other decls.
9631 2018-08-28  Martin Liska  <mliska@suse.cz>
9633         * tree.h: Update documentation of fndecl_built_in_p
9634         functions.
9637 2018-08-27  Jeff Law  <law@redhat.com>
9638         PR tree-optimization/87110
9639         * tree-ssa-dse.c (compute_trims): Handle non-constant
9640         TYPE_SIZE_UNIT.
9642 2018-08-27  Martin Sebor  <msebor@redhat.com>
9644         PR tree-optimization/86914
9645         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
9647 2018-08-27  Martin Sebor  <msebor@redhat.com>
9649         PR tree-optimization/87112
9650         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
9651         the type of the bound argument.
9653 2018-08-27  Jeff Law  <law@redhat.com>
9655         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
9656         type does not have a TYPE_SIZE_UNIT.
9658 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
9660         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
9661         with include of backend.h.
9663 2018-08-27  Richard Biener  <rguenther@suse.de>
9665         PR tree-optimization/86927
9666         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
9667         use const cond reduction code.
9669 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
9671         PR tree-optimization/85758
9672         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
9674 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
9676         PR c++/87091
9677         * diagnostic-show-locus.c (class layout_range): Update for
9678         conversion of show_caret_p to a tri-state.
9679         (layout_range::layout_range): Likewise.
9680         (make_range): Likewise.
9681         (layout::maybe_add_location_range): Likewise.
9682         (layout::should_print_annotation_line_p): Don't show annotation
9683         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
9684         (layout::get_state_at_point): Update for conversion of
9685         show_caret_p to a tri-state.  Bail out early for
9686         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
9687         underlining or source colorization.
9688         (gcc_rich_location::add_location_if_nearby): Update for conversion
9689         of show_caret_p to a tri-state.
9690         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
9691         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
9692         Likewise.
9693         (selftest::test_one_liner_labels): Likewise.
9694         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
9695         conversion of show_caret_p to a tri-state.
9696         * pretty-print.c (text_info::set_location): Likewise.
9697         * pretty-print.h (text_info::set_location): Likewise.
9698         * substring-locations.c (format_warning_n_va): Likewise.
9699         * tree-diagnostic.c (default_tree_printer): Likewise.
9700         * tree-pretty-print.c (newline_and_indent): Likewise.
9702 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
9704         PR c++/87091
9705         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
9706         line above for line-insertion fix-it hints.
9707         (selftest::test_fixit_insert_containing_newline): Update the
9708         expected results, and add a test with line-numbering enabled.
9710 2018-08-27  Martin Liska  <mliska@suse.cz>
9712         PR sanitizer/86962
9713         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
9714         params with DECL_HAS_VALUE_EXPR_P.
9716 2018-08-27  Martin Liska  <mliska@suse.cz>
9718         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
9719         selected expansion strategy.
9721 2018-08-27  Martin Liska  <mliska@suse.cz>
9723         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9724         * builtins.c (is_builtin_fn): Likewise.
9725         * attribs.c (diag_attr_exclusions): Use new function
9726         fndecl_built_in_p and remove check for FUNCTION_DECL if
9727         possible.
9728         (builtin_mathfn_code): Likewise.
9729         (fold_builtin_expect): Likewise.
9730         (fold_call_expr): Likewise.
9731         (fold_builtin_call_array): Likewise.
9732         (fold_call_stmt): Likewise.
9733         (set_builtin_user_assembler_name): Likewise.
9734         (is_simple_builtin): Likewise.
9735         * calls.c (gimple_alloca_call_p): Likewise.
9736         (maybe_warn_nonstring_arg): Likewise.
9737         * cfgexpand.c (expand_call_stmt): Likewise.
9738         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
9739         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
9740         (cgraph_node::verify_node): Likewise.
9741         * cgraphclones.c (build_function_decl_skip_args): Likewise.
9742         (cgraph_node::create_clone): Likewise.
9743         * config/arm/arm.c (arm_insert_attributes): Likewise.
9744         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
9745         * dse.c (scan_insn): Likewise.
9746         * expr.c (expand_expr_real_1): Likewise.
9747         * fold-const.c (operand_equal_p): Likewise.
9748         (fold_binary_loc): Likewise.
9749         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9750         * gimple-low.c (lower_stmt): Likewise.
9751         * gimple-pretty-print.c (dump_gimple_call): Likewise.
9752         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9753         Likewise.
9754         * gimple.c (gimple_build_call_from_tree): Likewise.
9755         (gimple_call_builtin_p): Likewise.
9756         (gimple_call_combined_fn): Likewise.
9757         * gimplify.c (gimplify_call_expr): Likewise.
9758         (gimple_boolify): Likewise.
9759         (gimplify_modify_expr): Likewise.
9760         (gimplify_addr_expr): Likewise.
9761         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
9762         * ipa-cp.c (determine_versionability): Likewise.
9763         * ipa-fnsummary.c (compute_fn_summary): Likewise.
9764         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
9765         * ipa-split.c (visit_bb): Likewise.
9766         (split_function): Likewise.
9767         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9768         * lto-cgraph.c (input_node): Likewise.
9769         * lto-streamer-out.c (write_symbol): Likewise.
9770         * omp-low.c (setjmp_or_longjmp_p): Likewise.
9771         (lower_omp_1): Likewise.
9772         * predict.c (strip_predict_hints): Likewise.
9773         * print-tree.c (print_node): Likewise.
9774         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
9775         * trans-mem.c (is_tm_irrevocable): Likewise.
9776         (is_tm_load): Likewise.
9777         (is_tm_simple_load): Likewise.
9778         (is_tm_store): Likewise.
9779         (is_tm_simple_store): Likewise.
9780         (is_tm_abort): Likewise.
9781         (tm_region_init_1): Likewise.
9782         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
9783         * tree-cfg.c (verify_gimple_call): Likewise.
9784         (move_stmt_r): Likewise.
9785         (stmt_can_terminate_bb_p): Likewise.
9786         * tree-eh.c (lower_eh_constructs_2): Likewise.
9787         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9788         * tree-inline.c (remap_gimple_stmt): Likewise.
9789         (copy_bb): Likewise.
9790         (estimate_num_insns): Likewise.
9791         (fold_marked_statements): Likewise.
9792         * tree-sra.c (scan_function): Likewise.
9793         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9794         (optimize_stack_restore): Likewise.
9795         (pass_fold_builtins::execute): Likewise.
9796         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9797         (mark_all_reaching_defs_necessary_1): Likewise.
9798         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9799         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9800         (pass_forwprop::execute): Likewise.
9801         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9802         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9803         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9804         * tree-ssa-strlen.c (get_string_length): Likewise.
9805         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9806         (find_func_aliases_for_call): Likewise.
9807         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9808         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9809         * tree-tailcall.c (find_tail_calls): Likewise.
9810         * tree.c (need_assembler_name_p): Likewise.
9811         (free_lang_data_in_decl): Likewise.
9812         (get_call_combined_fn): Likewise.
9813         * ubsan.c (is_ubsan_builtin_p): Likewise.
9814         * varasm.c (incorporeal_function_p): Likewise.
9815         * tree.h (DECL_BUILT_IN): Remove and replace with
9816         fndecl_built_in_p.
9817         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9818         (fndecl_built_in_p): New.
9820 2018-08-27  Martin Liska  <mliska@suse.cz>
9822         PR tree-optimization/86847
9823         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9824         Dump also subtree probability.
9825         (switch_decision_tree::do_jump_if_equal): New function.
9826         (switch_decision_tree::emit_case_nodes): Handle special
9827         situations in balanced tree that can be emitted much simpler.
9828         Fix calculation of probabilities that happen in tree expansion.
9829         * tree-switch-conversion.h (struct cluster): Add
9830         is_single_value_p.
9831         (struct simple_cluster): Likewise.
9832         (struct case_tree_node): Add new function has_child.
9833         (do_jump_if_equal): New.
9835 2018-08-27  Martin Liska  <mliska@suse.cz>
9837         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9838         Add new argument to bit_test_cluster constructor.
9839         (bit_test_cluster::emit): Set bits really number of values
9840         handlel by a test.
9841         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9842         probability argument.
9843         * tree-switch-conversion.h (struct bit_test_cluster):
9844         Add m_handles_entire_switch.
9846 2018-08-27  Martin Liska  <mliska@suse.cz>
9848         PR tree-optimization/86702
9849         * tree-switch-conversion.c (jump_table_cluster::emit):
9850         Make probabilities even for values in jump table
9851         according to number of cases handled.
9852         (switch_decision_tree::compute_cases_per_edge): Pass
9853         argument to reset_out_edges_aux function.
9854         (switch_decision_tree::analyze_switch_statement): Likewise.
9855         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9856         Make it static.
9858 2018-08-27  Martin Liska  <mliska@suse.cz>
9860         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9861         cfun argument explicitly.
9862         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9863         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9864         function gimple_switch_default_bb.
9865         (convert_switch_statements):
9866         (expand_builtins):
9867         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9868         * stmt.c (label_to_block_fn): Use label_to_block and pass
9869         cfun argument explicitly and use gimple_switch_label_bb.
9870         (expand_case): Likewise.
9871         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9872         cfun argument explicitly. Likewise.
9873         (make_edges_bb): Likewise.
9874         (make_cond_expr_edges): Likewise.
9875         (get_cases_for_edge): Likewise.
9876         (make_gimple_switch_edges): Likewise.
9877         (label_to_block_fn): Likewise.
9878         (label_to_block): Likewise.
9879         (make_goto_expr_edges): Likewise.
9880         (make_gimple_asm_edges): Likewise.
9881         (main_block_label): Likewise.
9882         (group_case_labels_stmt): Likewise.
9883         (find_taken_edge_computed_goto): Likewise.
9884         (find_taken_edge_switch_expr): Likewise.
9885         (gimple_verify_flow_info): Likewise.
9886         (gimple_redirect_edge_and_branch): Likewise.
9887         (gimple_switch_label_bb): New function.
9888         (gimple_switch_default_bb): Likewise.
9889         (gimple_switch_edge): Likewise.
9890         (gimple_switch_default_edge): Likewise.
9891         * tree-cfg.h (label_to_block_fn): Remove and replace ...
9892         (label_to_block): ... with this.
9893         (gimple_switch_label_bb): New.
9894         (gimple_switch_default_bb): Likewise.
9895         (gimple_switch_edge): Likewise.
9896         (gimple_switch_default_edge): Likewise.
9897         * tree-cfgcleanup.c (convert_single_case_switch): Use
9898         new gimple functions and pass new argument to label_to_block.
9899         (cleanup_control_flow_bb):
9900         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
9901         cfun argument explicitly.
9902         (make_eh_edges): Likewise.
9903         (redirect_eh_dispatch_edge): Likewise.
9904         (lower_resx): Likewise.
9905         (lower_eh_dispatch): Likewise.
9906         (maybe_remove_unreachable_handlers): Likewise.
9907         (unsplit_eh): Likewise.
9908         (cleanup_empty_eh): Likewise.
9909         (verify_eh_edges): Likewise.
9910         (verify_eh_dispatch_edge): Likewise.
9911         * tree-ssa-dom.c (record_edge_info): Likewise.
9912         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
9913         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
9914         (thread_through_normal_block): Likewise.
9915         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
9916         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
9917         * tree-switch-conversion.c (switch_conversion::collect): Use new
9918         gimple functions.
9919         (switch_conversion::check_final_bb): Likewise.
9920         (switch_conversion::gather_default_values): Pass new argument
9921         to label_to_block.
9922         (switch_conversion::build_constructors): Likewise.
9923         (switch_decision_tree::compute_cases_per_edge): Use new
9924         gimple_switch_edge function.
9925         (switch_decision_tree::analyze_switch_statement): Pass new argument
9926         to label_to_block.
9927         (switch_decision_tree::try_switch_expansion): Use
9928         gimple_switch_default_edge.
9929         * tree-vrp.c (find_switch_asserts): Pass new argument
9930         to label_to_block.
9931         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
9932         (vr_values::simplify_switch_using_ranges): Likewise.
9934 2018-08-27  Richard Biener  <rguenther@suse.de>
9936         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
9937         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
9939         * tree-ssa-sccvn.h (struct vn_pval): New structure.
9940         (struct vn_nary_op_s): Add unwind_to member.  Add
9941         predicated_values flag and put result into a union together
9942         with a linked list of vn_pval.
9943         (struct vn_ssa_aux): Add name member to make maintaining
9944         a map of SSA name to vn_ssa_aux possible.  Remove no longer
9945         needed info, dfsnum, low, visited, on_sccstack, use_processed
9946         and range_info_anti_range_p members.
9947         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
9948         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
9949         New functions.
9950         (vn_valueize): New global.
9951         (vn_context_bb): Likewise.
9952         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
9953         VN_INFO_PTR_INFO): Remove.
9954         * tree-ssa-sccvn.c: ... (rewrite)
9955         (pass_fre::execute): For -O2+ initialize loops and run
9956         RPO VN in optimistic mode (iterating).  For -O1 and -Og
9957         run RPO VN in non-optimistic mode.
9958         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
9959         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
9960         * doc/invoke.texi (sccvn-max-scc-size): Remove.
9961         (rpo-vn-max-loop-depth): Document.
9962         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
9963         when valuezing the VUSE signals we walked out of the region.
9964         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
9965         (phi_translate): Set VN context block to use for availability
9966         lookup.
9967         (compute_avail): Likewise.
9968         (pre_valueize): New function.
9969         (pass_pre::execute): Adjust to the RPO VN API.
9971         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
9972         (propagate_constants_for_unrolling): Remove.
9973         (tree_unroll_loops_completely): Perform value-numbering
9974         on the unrolled bodies loop parent.
9976 2018-08-27  Richard Biener  <rguenther@suse.de>
9978         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
9979         for partial antic compute.
9981 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
9983         PR rtl-optimization/87065
9984         * combine.c (simplify_if_then_else): Formatting fix.
9985         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
9986         check.
9987         (known_cond): Don't return const_true_rtx for vector modes.  Use
9988         CONST0_RTX instead of const0_rtx.  Formatting fixes.
9990 2018-08-27  Martin Liska  <mliska@suse.cz>
9992         PR gcov-profile/87069
9993         * gcov.c (process_file): Record files already processed
9994         and warn about a file being processed multiple times.
9996 2018-08-27  Martin Liska  <mliska@suse.cz>
9998         PR driver/83193
9999         * config/aarch64/aarch64.c (aarch64_override_options_internal):
10000         Set default values for x_aarch64_*_string strings.
10001         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10002         prefix.  For -mabi do not print '=ABI' in help and use
10003         <option_value> format for -msve-vector-bits and -moverride
10004         options.
10006 2018-08-26  Jeff Law  <law@redhat.com>
10008         * config/mips/frame-header-opt.c: Include "backend.h" rather than
10009         "cfg.h"
10011 2018-08-26  Marek Polacek  <polacek@redhat.com>
10013         PR c++/87029, Implement -Wredundant-move.
10014         * doc/invoke.texi: Document -Wredundant-move.
10016 2018-08-25  Martin Sebor  <msebor@redhat.com>
10018         PR tree-optimization/87059
10019         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10020         to the same type as the other.
10021         * fold-const.c (fold_binary_loc): Assert expectation.
10023 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
10025         * config/darwin.c (machopic_legitimize_pic_address): Clean up
10026         extraneous parentheses, dead code section and formatting.
10028 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
10030         PR c++/87091
10031         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10032         wide enough for jumps in the line-numbering to be visible.
10033         (layout::print_gap_in_line_numbering): New member function.
10034         (layout::calculate_line_spans): When using line numbering, merge
10035         line spans that are only 1 line apart.
10036         (diagnostic_show_locus): When printing line numbers, show gaps in
10037         line numbering directly, rather than printing headers.
10038         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10039         line-numbering with multiple line spans.
10040         (selftest::test_fixit_insert_containing_newline_2): Add test of
10041         line-numbering, in which the spans are close enough to be merged.
10043 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10045         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10046         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
10047         * tree-vrp.c (range_is_nonnull): Remove.
10048         (range_includes_zero_p): Accept value_range instead of min/max.
10049         (extract_range_from_binary_expr_1): Do not early bail on
10050         POINTER_PLUS_EXPR.
10051         Use range_includes_zero_p instead of range_is_nonnull.
10052         (extract_range_from_unary_expr): Use range_includes_zero_p instead
10053         of range_is_nonnull.
10054         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
10055         special case VR_ANTI_RANGE.
10056         (vrp_finalize): Same.
10057         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10058         instead of min/max.
10059         (range_is_nonnull): Remove.
10060         * vr-values.c (vrp_stmt_computes_nonzero): Use
10061         range_includes_zero_p instead of range_is_nonnull.
10062         (extract_range_basic): Pass value_range to range_includes_zero_p
10063         instead of range_is_nonnull.
10065 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
10067         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10068         * emit-rtl.h (rtl_data): Remove return_bnd.
10069         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10070         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10071         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10072         (POINTER_BOUNDS_MODE): Remove definition.
10073         (make_pointer_bounds_mode): Remove.
10074         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10075         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10076         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10077         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10078         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10079         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10080         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10082         * config/i386/i386-modes.def (BND32, BND64): Remove.
10083         * config/i386/i386.c (dbx_register_map): Remove bound registers.
10084         (dbx64_register_map): Ditto.
10085         (svr4_dbx_register_map): Ditto.
10086         (indirect_thunk_bnd_needed): Remove.
10087         (indirect_thunks_bnd_used): Ditto.
10088         (indirect_return_bnd_needed): Ditto.
10089         (indirect_return_via_cx_bnd): Ditto.
10090         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10091         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10092         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
10093         (output_indirect_thunk_function): Remove handling of
10094         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10095         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10096         (ix86_save_reg): Remove handling of crtl->return_bnd.
10097         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10098         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10099         and UNSPEC_BNDLX_ADDR.
10100         (ix86_output_indirect_branch_via_reg): Remove handling of
10101         indirect_thunk_prefix_bnd.
10102         (ix86_output_indirect_branch_via_push): Ditto.
10103         (ix86_output_function_return): Ditto.
10104         (ix86_output_indirect_function_return): Ditto.
10105         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10106         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10107         (CALL_USED_REGISTERS): Ditto.
10108         (REG_ALLOC_ORDER): Update for removal of bound registers.
10109         (HI_REGISTER_NAMES): Ditto.
10110         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10111         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10112         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10113         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10114         (FIRST_PSEUDO_REG): Update.
10115         (BND): Remove mode iterator.
10116         * config/i386/predicates.md (bnd_mem_operator): Remove.
10118 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10120         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10121         vectors.
10123 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
10125         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10126         the case in which the permute needs only a single element and
10127         repeats for every vector of the result.  Extend that case to
10128         handle variable-length vectors.
10129         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10131 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
10133         PR debug/79342
10134         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10135         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10137 2018-08-24  Richard Biener  <rguenther@suse.de>
10139         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10140         bb_flags_allocated members.
10141         (auto_flag): New RAII class for allocating flags.
10142         (auto_edge_flag): New RAII class for allocating edge flags.
10143         (auto_bb_flag): New RAII class for allocating bb flags.
10144         * cfgloop.c (verify_loop_structure): Allocate temporary edge
10145         flag dynamically.
10146         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10147         in favor of temporarily allocated BB flag.
10148         * hsa-brig.c: Re-order includes.
10149         * hsa-dump.c: Likewise.
10150         * hsa-regalloc.c: Likewise.
10151         * print-rtl.c: Likewise.
10152         * profile-count.c: Likewise.
10154 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
10156         PR target/86989
10157         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10158         the TOC register.
10160 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
10162         PR 87073/bootstrap
10163         * wide-int-range.cc (wide_int_range_div): Do not ignore result
10164         from wide_int_range_multiplicative_op.
10166 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10168         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10169         "permutaion".
10171 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
10173         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10174         to 'expanded'.
10176 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
10178         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10179         full GENERIC expression used for replacement.
10181 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
10183         * tree-vrp.c (abs_extent_range): Remove.
10184         (extract_range_into_wide_ints): Pass wide ints by reference.
10185         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10186         Pass wide ints by reference in all calls to
10187         extract_range_into_wide_ints.
10188         * wide-int-range.cc (wide_int_range_div): New.
10189         * wide-int-range.h (wide_int_range_div): New.
10190         (wide_int_range_includes_zero_p): New.
10191         (wide_int_range_zero_p): New.
10193 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
10195         * config/aarch64/aarch64.md (arches): New enum.
10196         (arch): New enum attr.
10197         (arch_enabled): New attr.
10198         (enabled): Now uses arch_enabled only.
10199         (simd, sve, fp16): Removed attribute.
10200         (fp): Attr now defined in terms of 'arch'.
10201         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10202         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10203         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10204         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10205         attributes into 'arch'.
10206         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10207         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
10208         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
10209         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
10210         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
10211         'simd' attribute into 'arch'.
10212         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
10213         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
10214         Convert use of 'fp' attribute to 'arch'.
10215         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
10216         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
10217         into 'arch'.
10218         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
10219         (different modes) Merge 'fp' and 'simd' into 'arch'.
10220         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
10221         'simd' into 'arch'.
10223 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
10225         PR rtl-optimization/87026
10226         * expmed.c (canonicalize_comparison): If we can no longer create
10227         pseudoregisters, don't.
10229 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
10231         PR target/86951
10232         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
10233         prototype.
10234         * config/arm/arm.c (speculation_barrier_libfunc): New static
10235         variable.
10236         (arm_init_libfuncs): Initialize it.
10237         (arm_emit_speculation_barrier): New function.
10238         * config/arm/arm.md (speculation_barrier): Call
10239         arm_emit_speculation_barrier for architectures that do not have
10240         DSB or ISB.
10241         (speculation_barrier_insn): Only match on Armv7 or later.
10243 2018-08-23  Richard Biener  <rguenther@suse.de>
10245         PR middle-end/87024
10246         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
10247         calls.
10249 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10251         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
10252         of single-vector TBLs.
10253         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
10254         one input is given.
10256 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
10258         PR target/85910
10259         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
10260         aarch64_evpc_tbl guard.
10262 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10264         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
10265         behaviour.
10267 2018-08-22  Martin Sebor  <msebor@redhat.com>
10269         PR middle-end/87052
10270         * tree-pretty-print.c (pretty_print_string): Add argument.
10271         (dump_generic_node): Call to pretty_print_string with string size.
10273 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
10275         PR rtl-optimization/86771
10276         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
10277         of two SETs into those two SETs, one to be placed at i2, if that SETs
10278         destination is modified between i2 and i3.
10280 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10282         PR tree-optimization/86725
10283         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
10284         function.
10285         (vect_analyze_scalar_cycles_1): Check it.
10287 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10289         PR tree-optimization/86725
10290         * tree-vect-loop.c (vect_is_simple_reduction): When treating
10291         an outer loop phi as a double reduction, make sure that the
10292         single user of the phi result is an inner loop phi.
10294 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10296         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
10297         grouped stores with gaps to a strided group.
10299 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
10301         * tree-vect-stmts.c (get_group_load_store_type)
10302         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
10303         first statement in a group.
10305 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10307         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
10308         the sequence used in gcc/gcc.c.
10310 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10312         PR other/704
10313         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
10314         building it.
10316 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10318         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
10319         Darwin10-specific unwinder-shim.
10320         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
10321         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
10322         New to cater for Darwin10 Rosetta.
10324 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10326         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
10327         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
10329 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
10331         PR bootstrap/81033
10332         PR target/81733
10333         PR target/52795
10334         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
10335         (dwarf2out_switch_text_section): Generate a local label for the
10336         second function sub-section and apply it as the second FDE start
10337         label.
10338         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
10339         second sub-section start.
10341 2018-08-22  Richard Biener  <rguenther@suse.de>
10343         PR tree-optimization/86988
10344         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
10346 2018-08-22  Richard Biener  <rguenther@suse.de>
10348         PR tree-optimization/86945
10349         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
10351 2018-08-22  Alexandre Oliva <oliva@adacore.com>
10353         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
10354         a comment about how uses of r2 for .sdata2 come about.
10356 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
10358         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
10360 2018-08-21  Marek Polacek  <polacek@redhat.com>
10362         PR c++/86981, Implement -Wpessimizing-move.
10363         * doc/invoke.texi: Document -Wpessimizing-move.
10365 2018-08-21  Jan Hubicka  <jh@suse.cz>
10367         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
10368         * tree.h (is_redundant_typedef): Remove.
10369         * dwarf2out.c (is_redundant_typedef): Turn into static function.
10371 2018-08-21  Jan Hubicka  <jh@suse.cz>
10373         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
10374         when possible.
10376 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
10378         * expmed.c (extract_low_bits): Reject invalid subregs early.
10380 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10382         PR middle-end/86121
10383         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
10384         behaviour.
10386 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10388         * config/vxworks.h: Guard vxworks_asm_out_constructor and
10389         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
10390         * config/vxworks.c: Likewise.
10392 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10394         * config/vxworks.c: Set targetm.have_ctors_dtors
10395         if HAVE_INITFINI_ARRAY_SUPPORT.
10396         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
10397         if HAVE_INITFINI_ARRAY_SUPPORT.
10399 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
10401         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
10402         default search path for VxWorks < 7.
10404 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10406         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
10407         (get_format_string): Refer to c_getstr.
10409 2018-08-21  Tom de Vries  <tdevries@suse.de>
10411         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10412         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10413         (debuginfo_early_stop): Declare.
10414         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10415         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10416         (debuginfo_early_stop): New function.
10417         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
10418         and debuginfo_early_stop.
10419         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
10420         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
10421         (general_init): Call debuginfo_early_init.
10422         (finalize): Call debuginfo_fini.
10423         (do_compile): Call debuginfo_init.
10424         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
10425         -fdump-early-debug.
10426         (@item -fdump-debug, @item -fdump-earlydebug): Add.
10428 2018-08-21  Tom de Vries  <tdevries@suse.de>
10430         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
10431         flag_dump_noaddr and flag_dump_unnumbered.
10433 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
10435         * wide-int-range.cc (wide_int_range_abs): New.
10436         (wide_int_range_order_set): Rename from wide_int_range_min_max.
10437         * wide-int-range.h (wide_int_range_abs): New.
10438         (wide_int_range_min_max): New.
10439         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
10440         case to call wide_int_range_abs.
10441         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
10442         (extract_range_from_abs_expr): Delete.
10444 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
10446         PR target/87033
10447         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
10448         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
10449         for indexed loads.
10451 2018-08-20  Nathan Sidwell  <nathan@acm.org>
10452             Jeff Law <law@redhat.com>
10454         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
10455         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
10457 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
10459         PR other/84889
10460         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
10461         (decl_attributes): Likewise.
10462         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
10463         instance.
10464         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10465         * diagnostic-core.h (class auto_diagnostic_group): New class.
10466         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
10467         (diagnostic_report_diagnostic): Handle the first diagnostics within
10468         a group.
10469         (emit_diagnostic): Add auto_diagnostic_group instance.
10470         (inform): Likewise.
10471         (inform_n): Likewise.
10472         (warning): Likewise.
10473         (warning_at): Likewise.
10474         (warning_n): Likewise.
10475         (pedwarn): Likewise.
10476         (permerror): Likewise.
10477         (error): Likewise.
10478         (error_n): Likewise.
10479         (error_at): Likewise.
10480         (sorry): Likewise.
10481         (fatal_error): Likewise.
10482         (internal_error): Likewise.
10483         (internal_error_no_backtrace): Likewise.
10484         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
10485         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
10486         * diagnostic.h (struct diagnostic_context): Add fields
10487         "diagnostic_group_nesting_depth",
10488         "diagnostic_group_emission_count", "begin_group_cb",
10489         "end_group_cb".
10490         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
10491         Add auto_diagnostic_group instance(s).
10492         (find_explicit_erroneous_behavior): Likewise.
10493         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
10494         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
10495         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
10496         (gimplify_va_arg_expr): Likewise.
10497         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
10498         (HSA_SORRY_AT): Likewise.
10499         * ipa-devirt.c (compare_virtual_tables): Likewise.
10500         (warn_odr): Likewise.
10501         * multiple_target.c (expand_target_clones): Likewise.
10502         * opts-common.c (cmdline_handle_error): Likewise.
10503         * reginfo.c (globalize_reg): Likewise.
10504         * substring-locations.c (format_warning_n_va): Likewise.
10505         * tree-inline.c (expand_call_inline): Likewise.
10506         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
10507         * tree-ssa-loop-niter.c
10508         (do_warn_aggressive_loop_optimizations): Likewise.
10509         * tree-ssa-uninit.c (warn_uninit): Likewise.
10510         * tree.c (warn_deprecated_use): Likewise.
10512 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
10514         PR target/87014
10515         * config/i386/i386.md (eh_return): Always update EH return
10516         address in word_mode.
10518 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
10520         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
10521         TARGET_SPLIT_COMPLEX_ARG is defined.
10523 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10525         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
10527 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10529         PR target/86984
10530         * expr.c (expand_assignment): Assert that bitpos is positive.
10531         (store_field): Likewise
10532         (expand_expr_real_1): Make sure that bitpos is positive.
10533         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
10534         integer overflow.
10536 2018-08-20  Nathan Sidwell  <nathan@acm.org>
10538         * Makefile.in (CPP_ID_DATA_H): Delete.
10539         (CPP_INTERNAL_H): Don't add it.
10540         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
10541         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
10543 2018-08-20  Richard Biener  <rguenther@suse.de>
10545         PR tree-optimization/78655
10546         * tree-vrp.c (extract_range_from_binary_expr_1): Make
10547         pointer + offset nonnull if either operand is nonnull work.
10549 2018-08-20  Tom de Vries  <tdevries@suse.de>
10551         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
10552         unless the referenced die describes the added property using
10553         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
10554         Otherwise, add a DW_AT_location to the referenced die.
10556 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
10558         PR target/86994
10559         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
10560         register_operand when calling ix86_set_reg_reg_cost.
10561         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
10562         Set *total to 0 for operands that satisfy x86_64_immediate_operand
10563         predicate and to 1 otherwise.
10565 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
10567         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
10568         emit a diagnostic that it is not supported and reset the option.
10569         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
10570         supported and consume the option.  (ASM_FINAL_SPEC): New.
10572 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
10574         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
10575         a sentence.
10577 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
10579         C-SKY port: Documentation
10581         * doc/extend.texi (C-SKY Function Attributes): New section.
10582         * doc/invoke.texi (Option Summary): Add C-SKY options.
10583         (C-SKY Options): New section.
10584         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
10586 2018-08-17  Jojo  <jijie_rong@c-sky.com>
10587             Huibin Wang  <huibin_wang@c-sky.com>
10588             Sandra Loosemore  <sandra@codesourcery.com>
10589             Chung-Lin Tang  <cltang@codesourcery.com>
10591         C-SKY port: Backend implementation
10593         * config/csky/*: New.
10594         * common/config/csky/*: New.
10596 2018-08-17  Jojo  <jijie_rong@c-sky.com>
10597             Huibin Wang  <huibin_wang@c-sky.com>
10598             Sandra Loosemore  <sandra@codesourcery.com>
10599             Chung-Lin Tang  <cltang@codesourcery.com>
10600             Andrew Jenner  <andrew@codesourcery.com>
10602         C-SKY port: Configury
10604         * config.gcc (csky-*-*): New.
10605         * configure.ac: Add csky to targets for dwarf2 debug_line support.
10606         * configure: Regenerated.
10608 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
10610         * dump-context.h: Include "dumpfile.h".
10611         (dump_context::dump_printf_va): Convert final param from va_list
10612         to va_list *.  Convert from ATTRIBUTE_PRINTF to
10613         ATTRIBUTE_GCC_DUMP_PRINTF.
10614         (dump_context::dump_printf_loc_va): Likewise.
10615         * dumpfile.c: Include "stringpool.h".
10616         (make_item_for_dump_printf_va): Delete.
10617         (make_item_for_dump_printf): Delete.
10618         (class dump_pretty_printer): New class.
10619         (dump_pretty_printer::dump_pretty_printer): New ctor.
10620         (dump_pretty_printer::emit_items): New member function.
10621         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
10622         function.
10623         (dump_pretty_printer::emit_item): New member function.
10624         (dump_pretty_printer::stash_item): New member function.
10625         (dump_pretty_printer::format_decoder_cb): New member function.
10626         (dump_pretty_printer::decode_format): New member function.
10627         (dump_context::dump_printf_va): Reimplement in terms of
10628         dump_pretty_printer.
10629         (dump_context::dump_printf_loc_va): Convert final param from va_list
10630         to va_list *.
10631         (dump_context::begin_scope): Reimplement call to
10632         make_item_for_dump_printf.
10633         (dump_printf): Update for change to dump_printf_va.
10634         (dump_printf_loc): Likewise.
10635         (selftest::test_capture_of_dump_calls): Convert "stmt" from
10636         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
10637         with %T, %E, and %G.
10638         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
10639         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
10640         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
10641         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
10642         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
10643         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
10644         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
10645         within a dump_printf_loc call to "%wu".
10646         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
10647         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
10648         missing space after "=".
10649         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
10650         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
10651         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
10652         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
10653         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
10654         duplicate "vectorized" from message.
10656 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
10658         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
10659         polyNxK_t element's TYPE_STRING_FLAG.
10661 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
10663         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
10664         (they were unnamed before).  Fix comments.
10666 2018-08-17  Nathan Sidwell  <nathan@acm.org>
10668         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
10670 2018-08-17  Richard Biener  <rguenther@suse.de>
10672         PR tree-optimization/86841
10673         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
10675 2018-08-17  Martin Liska  <mliska@suse.cz>
10677         * common.opt: Remove Warn, Init and Report for options with
10678         Ignore/Deprecated flag. Warning is done automatically for
10679         Deprecated flags.
10680         * config/i386/i386.opt: Likewise.
10681         * config/ia64/ia64.opt: Likewise.
10682         * config/rs6000/rs6000.opt: Likewise.
10683         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
10684         Remove usage of flag_check_pointer_bounds.
10685         * lto-wrapper.c (merge_and_complain): Do not handle
10686         OPT_fcheck_pointer_bounds.
10687         (append_compiler_options): Likewise.
10688         * opt-functions.awk: Do not handle Deprecated.
10689         * optc-gen.awk: Check that Var, Report and Init are not
10690         used for an option with Ignore/Deprecated flag.
10691         * opts-common.c (decode_cmdline_option): Do not report
10692         CL_ERR_DEPRECATED.
10693         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
10694         options.
10695         * opts.h (struct cl_option): Remove cl_deprecated flag.
10696         (CL_ERR_DEPRECATED): Remove error enum value.
10698 2018-08-17  Richard Biener  <rguenther@suse.de>
10700         PR middle-end/86505
10701         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
10702         across a va-arg-pack using call adjust its return value accordingly.
10704 2018-08-16  Martin Sebor  <msebor@redhat.com>
10706         PR tree-optimization/86853
10707         * gimple-ssa-sprintf.c (struct format_result): Rename member.
10708         (struct fmtresult): Add member and initialize it in ctors.
10709         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
10710         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
10711         (format_directive): Set POSUNDER4K when MAYFAIL is set.
10712         (parse_directive): Handle %C same as %c.
10713         (sprintf_dom_walker::compute_format_length): Adjust.
10714         (is_call_safe): Adjust.
10716 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10718         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
10719         for determining how to count the elements.
10720         * builtins.h (c_strlen): Adjust prototype.
10721         * expr.c (string_constant): Add new parameter mem_size.
10722         Set *mem_size appropriately.
10723         * expr.h (string_constant): Adjust protoype.
10724         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
10725         * gimple-fold.h (get_range_strlen): Adjust prototype.
10726         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
10727         (format_string): Call get_string_length with eltsize.
10729 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
10731         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
10732         to emit the span, rather than setting it as the prefix.
10734 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
10736         * diagnostic-show-locus.c (layout::start_annotation_line): Add
10737         "margin_char" parameter, defaulting to space.  Use it in place
10738         of pp_space for the initial part of the margin.
10739         (layout::print_leading_fixits): Use '+' when filling the margin
10740         of line-insertion fix-it hints.
10742 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10744         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
10745         Delete.
10747 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10749         * config/rs6000/altivec.md: Don't set length attribute to the default
10750         value.
10751         * config/rs6000/darwin.md: Ditto.
10752         * config/rs6000/dfp.md: Ditto.
10753         * config/rs6000/htm.md: Ditto.
10754         * config/rs6000/rs6000.md: Ditto.
10755         * config/rs6000/sync.md: Ditto.
10756         * config/rs6000/vsx.md: Ditto.
10758 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10760         * config/rs6000/altivec.md: Don't set length attribute to the default
10761         value, for branch instructions.
10762         * config/rs6000/darwin.md: Ditto.
10763         * config/rs6000/rs6000.md: Ditto.
10765 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10767         * config/rs6000/rs6000.md (length): Always define as const_int 4.
10768         (unnamed conditional branch define_insn): Set length to 4 or 8
10769         depending on offset.
10770         (<bd>_<mode>): Similar, for alternative 0.
10771         (<bd>tf_<mode>): Ditto.
10773 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10775         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
10777 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
10779         * doc/rtl.texi: Replace old RTX class names with new names.
10782 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
10784         * expmed.h (canonicalize_comparison): New declaration.
10785         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10786         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10787         * optabs.c (prepare_cmp_insn): Likewise.
10788         * rtl.h (unsigned_condition_p): New function which checks if a
10789         comparison operator is unsigned.
10791 2018-08-16  Nathan Sidwell  <nathan@acm.org>
10793         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10794         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10796 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10798         PR target/84711
10799         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10800         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10801         (mov<mov>): ..this and enable unconditionally.
10803 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10805         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10807 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
10809         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10810         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10811         "Common" with "Target".
10813 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
10815         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10816         * doc/invoke.texi (mmitigate-rop): Remove.
10817         * config/i386/i386.c: Do not include "regrename.h".
10818         (ix86_rop_should_change_byte_p, reg_encoded_number)
10819         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10820         Remove.
10821         (ix86_reorg): Remove call to ix86_mitigate_rop.
10822         * config/i386/i386.md (attr "modrm_class"): Remove.
10823         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10824         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10825         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10827 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
10829         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10830         allow folding of mergeh() and mergel() for the float and double types.
10831         (fold_mergehl_helper): Rework to handle building a permute tree
10832         for float vectors.
10834 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
10836         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10837         for TARGET_SSE.
10839 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
10841         * common.opt (fdiagnostics-show-labels): New option.
10842         * diagnostic-show-locus.c (class layout_range): Add field
10843         "m_label".
10844         (class layout): Add field "m_show_labels_p".
10845         (layout_range::layout_range): Add param "label" and use it to
10846         initialize m_label.
10847         (make_range): Pass in NULL for new "label" param of layout_range's
10848         ctor.
10849         (layout::layout): Initialize m_show_labels_p.
10850         (layout::maybe_add_location_range): Pass in loc_range->m_label
10851         when constructing layout_range instances.
10852         (struct line_label): New struct.
10853         (layout::print_any_labels): New member function.
10854         (layout::print_line): Call it if label-printing is enabled.
10855         (selftest::test_one_liner_labels): New test.
10856         (selftest::test_diagnostic_show_locus_one_liner): Call it.
10857         * diagnostic.c (diagnostic_initialize): Initialize
10858         context->show_labels_p.
10859         * diagnostic.h (struct diagnostic_context): Add field
10860         "show_labels_p".
10861         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10862         -fno-diagnostics-show-labels.
10863         * dwarf2out.c (gen_producer_string): Add
10864         OPT_fdiagnostics_show_labels to the ignored options.
10865         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10866         param.
10867         (gcc_rich_location::maybe_add_expr): Likewise.
10868         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10869         label" param, defaulting to NULL.
10870         (gcc_rich_location::add_expr): Add "label" param.
10871         (gcc_rich_location::maybe_add_expr): Likewise.
10872         (class text_range_label): New class.
10873         (class range_label_for_type_mismatch): New class.
10874         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
10875         of format_warning_va.
10876         (fmtwarn_n): Likewise for new params of format_warning_n_va.
10877         * lto-wrapper.c (merge_and_complain): Add
10878         OPT_fdiagnostics_show_labels to the "pick one setting" options.
10879         (append_compiler_options): Likewise to the dropped options.
10880         (append_diag_options): Likewise to the passed-on options.
10881         * opts.c (common_handle_option): Handle the new option.
10882         * selftest-diagnostic.c
10883         (test_diagnostic_context::test_diagnostic_context): Enable
10884         show_labels_p.
10885         * substring-locations.c: Include "gcc-rich-location.h".
10886         (format_warning_n_va): Add "fmt_label" and "param_label" params
10887         and use them as appropriate.
10888         (format_warning_va): Add "fmt_label" and "param_label" params,
10889         passing them on to format_warning_n_va.
10890         (format_warning_at_substring): Likewise.
10891         (format_warning_at_substring_n): Likewise.
10892         * substring-locations.h (format_warning_va): Add "fmt_label" and
10893         "param_label" params.
10894         (format_warning_n_va): Likewise.
10895         (format_warning_at_substring): Likewise.
10896         (format_warning_at_substring_n): Likewise.
10897         * toplev.c (general_init): Initialize global_dc->show_labels_p.
10899 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
10901         PR testsuite/86519
10902         * builtins.c (expand_builtin_memcmp): Do not expand the call
10903         when overflow is detected.
10905 2018-08-15  Martin Sebor  <msebor@redhat.com>
10907         PR tree-optimization/71625
10908         * config/aarch64/aarch64-builtins.c
10909         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
10911 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
10913         * config/s390/s390.c (s390_reorg): Remove loop.
10915 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
10917         * config/darwin.c
10918          (darwin_function_switched_text_sections): Delete.
10919         * gcc/config/darwin.h
10920          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
10922 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
10924         PR target/81685
10925         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
10926         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
10927         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
10929 2018-08-15  Martin Liska  <mliska@suse.cz>
10931         PR tree-optimization/86925
10932         * predict.c (expr_expected_value_1): When taking
10933         later predictor, assign also probability.
10934         Use fold_build2_initializer_loc in order to fold
10935         the expression in -frounding-math.
10937 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
10939         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
10940         patterns.
10941         (expand_vec_perm_1): Try the new method.
10943 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
10945         PR target/86547
10946         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
10947         Check whether lra_live_max_point is 0 before dividing.
10949 2018-08-14  Martin Sebor  <msebor@redhat.com>
10951         PR tree-optimization/86650
10952         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
10953         (vrp_prop::check_mem_ref): Same.
10955 2018-08-13  Liu Hao <lh_mouse@126.com>
10957         * pretty-print.c (eat_esc_sequence): Swap the foreground and
10958         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
10959         and clear it thereafter, as it only works for DBCS.
10961 2018-08-13  Liu Hao <lh_mouse@126.com>
10963         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
10964         handle returned by _get_osf_handle().
10966 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
10968         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
10969         for folding vec_perm.
10971 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
10973         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
10974         Add support for gimple-folding of vec_pack() and vec_unpack()
10975         intrinsics.
10977 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
10979         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
10980         vec_xst variants to the list.
10981         (rs6000_gimple_fold_builtin): Add support for folding unaligned
10982         vector loads and stores.
10984 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
10986         * config.gcc (rs6000-ibm-aix4.x): Delete.
10987         (rs6000-ibm-aix5.1): Delete.
10988         (rs6000-ibm-aix5.2): Delete.
10989         (rs6000-ibm-aix5.3): Delete.
10990         * config/rs6000/aix43.h: Delete.
10991         * config/rs6000/aix51.h: Delete.
10992         * config/rs6000/aix52.h: Delete.
10993         * config/rs6000/t-aix43: Delete.
10995 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
10997         * config/s390/s390.c (s390_decompose_constant_pool_ref):
10998         New function.
10999         (s390_decompose_address): Factor out constant pool ref
11000         decomposition.
11002 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11004         * config/nds32/nds32-predicates.c
11005         (nds32_can_use_bclr_p): Change return type as bool.
11006         (nds32_can_use_bset_p): Ditto.
11007         (nds32_can_use_btgl_p): Ditto.
11008         (nds32_can_use_bitci_p): Ditto.
11009         * config/nds32/nds32-protos.h
11010         (nds32_can_use_bclr_p): Change declaration.
11011         (nds32_can_use_bset_p): Ditto.
11012         (nds32_can_use_btgl_p): Ditto.
11013         (nds32_can_use_bitci_p): Ditto.
11015 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11017         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11018         Support -msched-prolog-epilog option.
11019         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11021 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11023         * common/config/nds32/nds32-common.c
11024         (nds32_option_optimization_table): Enalbe -malways-align.
11026 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
11028         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11029         extra_headers.
11030         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11031         OPT_misr_secure_ case.
11032         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11033         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11034         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11035         secure attribute.
11036         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11037         (nds32_isr_info): New field security_level.
11038         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11039         * config/nds32/nds32.md (return_internal): Consider critical attribute.
11040         * config/nds32/nds32.opt (misr-secure): New option.
11041         * config/nds32/nds32_init.inc: New file.
11042         * config/nds32/nds32_isr.h: New file.
11044 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
11046         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11047         Update comment for atomic instructions.
11048         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11049         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11050         Remove.
11051         (atomic_loaddi): Revise fence expansion to only emit fence prior to
11052         load for __ATOMIC_SEQ_CST model.
11053         (atomic_loaddi_1): Remove float register target.
11054         (atomic_storedi): Handle CONST_INT values.
11055         (atomic_storedi_1): Remove float register source.  Add special case
11056         for zero value.
11057         (memory_barrier): New expander and insn.
11059 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
11061         PR tree-optimization/86835
11062         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11063         new_stmt after def_gsi, make sure to insert new_square_stmt after
11064         that stmt, not 2 stmts before it.
11066 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
11068         PR target/82418
11069         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11070         instead of SWI48.
11072 2018-08-10  Martin Liska  <mliska@suse.cz>
11074         PR target/83610
11075         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11076         function type.
11077         * builtins.c (expand_builtin_expect_with_probability):
11078         New function.
11079         (expand_builtin_expect_with_probability): New function.
11080         (build_builtin_expect_predicate): Add new argumnet probability
11081         for BUILT_IN_EXPECT_WITH_PROBABILITY.
11082         (fold_builtin_expect):
11083         (fold_builtin_2):
11084         (fold_builtin_3):
11085         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11086         * builtins.h (fold_builtin_expect): Set new argument.
11087         * doc/extend.texi: Document __builtin_expect_with_probability.
11088         * doc/invoke.texi: Likewise.
11089         * gimple-fold.c (gimple_fold_call): Pass new argument.
11090         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11091         also BUILT_IN_EXPECT_WITH_PROBABILITY.
11092         * predict.c (get_predictor_value): New function.
11093         (expr_expected_value): Add new argument probability. Assume
11094         that predictor and probability are always non-null.
11095         (expr_expected_value_1): Likewise.  For __builtin_expect and
11096         __builtin_expect_with_probability set probability.  Handle
11097         combination in binary expressions.
11098         (tree_predict_by_opcode): Simplify code by simply calling
11099         get_predictor_value.
11100         (pass_strip_predict_hints::execute): Add handling of
11101         BUILT_IN_EXPECT_WITH_PROBABILITY.
11102         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11103         new predictor.
11104         * tree.h (DECL_BUILT_IN_P): New function.
11106 2018-08-10  Martin Liska  <mliska@suse.cz>
11108         PR tree-optimization/85799
11109         * passes.def: Add argument for pass_strip_predict_hints.
11110         * predict.c (class pass_strip_predict_hints): Add new argument
11111         early_p.
11112         (strip_predictor_early): New function.
11113         (pass_strip_predict_hints::execute): Call the function to
11114         strip predictors.
11115         (strip_predict_hints): New function.
11116         * predict.def: Fix comment.
11118 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
11120         * Makefile.in: Clarify which tm.texi to copy over to assert the
11121         right to grant a GFDL license for all.
11123 2018-08-09  Jeff Law  <law@redhat.com>
11125         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11126         unused variable.
11128 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
11130         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11131         prototype.
11133 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11135         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11136         reductions for variable-length vectors.
11138 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
11140         PR other/84889
11141         * common.opt (fdiagnostics-show-line-numbers): New option.
11142         * diagnostic-show-locus.c (class layout): Add fields
11143         "m_show_line_numbers_p" and "m_linenum_width";
11144         (num_digits): New function.
11145         (test_num_digits): New function.
11146         (layout::layout): Initialize new fields.  Update m_x_offset
11147         logic to handle any left margin.
11148         (layout::print_source_line): Print line number when requested.
11149         (layout::start_annotation_line): New member function.
11150         (layout::print_annotation_line): Call it.
11151         (layout::print_leading_fixits): Likewise.
11152         (layout::print_trailing_fixits): Likewise.  Update calls to
11153         move_to_column for new parameter.
11154         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11155         it to potentially call start_annotation_line.
11156         (layout::show_ruler): Call start_annotation_line.
11157         (selftest::test_line_numbers_multiline_range): New selftest.
11158         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11159         and selftest::test_line_numbers_multiline_range.
11160         * diagnostic.c (diagnostic_initialize): Initialize
11161         show_line_numbers_p.
11162         * diagnostic.h (struct diagnostic_context): Add field
11163         "show_line_numbers_p".
11164         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11165         -fno-diagnostics-show-line-numbers.
11166         * dwarf2out.c (gen_producer_string): Add
11167         OPT_fdiagnostics_show_line_numbers to the ignored options.
11168         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11169         one setting" options.
11170         (append_compiler_options): Likewise to the dropped options.
11171         (append_diag_options): Likewise to the passed-on options.
11172         * opts.c (common_handle_option): Handle the new option.
11173         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11175 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11177         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11178         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
11179         third argument of type "const signed char" to descriptions of
11180         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11181         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11182         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11183         __builtin_bcdsub_ov functions.
11185 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11187         PR tree-optimization/86858
11188         * tree-vect-loop.c (vect_is_simple_reduction): Restore
11189         flow_bb_inside_loop_p calls.
11191 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
11193         PR tree-optimization/86871
11194         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11195         instead of gimple_assign_lhs.
11197 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
11199         PR target/86887
11200         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11201         register constraint to operand 0.
11202         (add<mode>3_carryinC): Likewise.
11203         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11205 2018-08-09  Martin Liska  <mliska@suse.cz>
11207         PR c/86895
11208         * common.opt: Remove extra line.
11210 2018-08-09  Martin Liska  <mliska@suse.cz>
11212         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
11213         at the end of a line, make first letter capital and end up
11214         a sentence with a dot.
11215         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
11216         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
11217         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
11218         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
11219         (PARAM_MAX_ISL_OPERATIONS): Likewise.
11220         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
11221         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
11222         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
11223         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
11224         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
11225         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
11226         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
11227         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
11228         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
11229         (PARAM_TREE_REASSOC_WIDTH): Likewise.
11230         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
11231         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
11232         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
11234 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
11236         PR target/84332
11237         * config/s390/s390.c (s390_option_override_internal): Reduce the
11238         stack-clash-protection-probe-interval param if it would be too big
11239         for z900.
11241 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
11243         PR target/46179
11244         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
11245         * config/m68k/m68k.c (handle_move_double): Don't call
11246         m68k_final_prescan_insn.
11247         (m68k_adjust_decorated_operand): Renamed from
11248         m68k_final_prescan_insn, remove first and third operand and
11249         simplify.
11250         (print_operand): Call it.
11251         (print_operand_address): Call it.
11253 2018-08-08  Nathan Sidwell  <nathan@acm.org>
11255         * diagnostic.c (diagnostic_report_current_module): Use
11256         linemap_included_from & linemap_included_from_linemap.
11258 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
11260         * config/aarch64/aarch64-cores.def: Add phecda core.
11261         * config/aarch64/aarch64-tune.md: Regenerate.
11262         * doc/invoke.texi: Add phecda core.
11264 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
11266         PR target/85295
11267         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
11268         definitions.
11269         * config/s390/s390.md ("movti"): Add more alternatives for
11270         constant to GPR copies.
11272 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
11274         * config/s390/s390.c: Fix whitespace damage throughout the file.
11275         * config/s390/s390.h: Likewise.
11276         * config/s390/tpf.h: Likewise.
11278 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
11280         * config/s390/s390.c (s390_loadrelative_operand_p):
11281         Remove TARGET_CPU_ZARCH usages.
11282         (s390_rtx_costs): Likewise.
11283         (s390_legitimate_constant_p): Likewise.
11284         (s390_cannot_force_const_mem): Likewise.
11285         (legitimate_reload_constant_p): Likewise.
11286         (s390_preferred_reload_class): Likewise.
11287         (legitimize_pic_address): Likewise.
11288         (legitimize_tls_address): Likewise.
11289         (s390_split_branches): Removed.
11290         (s390_add_execute): Removed.
11291         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
11292         (s390_mainpool_start): Likewise.
11293         (s390_mainpool_finish): Likewise.
11294         (s390_mainpool_cancel): Removed.
11295         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
11296         (s390_chunkify_cancel): Likewise.
11297         (s390_return_addr_rtx): Likewise.
11298         (s390_register_info): Remove split_branches_pending_p uages.
11299         (s390_optimize_register_info): Likewise.
11300         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
11301         split_branches_pending_p usages.
11302         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
11303         (s390_load_got): Likewise.
11304         (s390_expand_split_stack_prologue): Likewise.
11305         (output_asm_nops): Likewise.
11306         (s390_function_profiler): Likewise.
11307         (s390_emit_call): Likewise.
11308         (s390_conditional_register_usage): Likewise.
11309         (s390_optimize_prologue): Likewise.
11310         (s390_reorg): Remove TARGET_CPU_ZARCH and
11311         split_branches_pending_p usages.
11312         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
11313         usages.
11314         (s390_output_indirect_thunk_function): Likewise.
11315         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
11316         (TARGET_CPU_ZARCH_P): Removed.
11317         (struct machine_function): Remove split_branches_pending_p.
11318         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
11320 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
11322         * common/config/s390/s390-common.c (processor_flags_table):
11323         Remove flags.
11324         * config.gcc: Remove with_arch/with_tune support.
11325         * config/s390/2064.md: Remove cpu attribute comparisons.
11326         * config/s390/driver-native.c (s390_host_detect_local_cpu):
11327         Remove MTN.
11328         * config/s390/linux.h (ASM_SPEC):
11329         Remove -march support.
11330         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
11331         Use a table to get an arch level.
11332         * config/s390/s390-opts.h (enum processor_type):
11333         Remove enum values.
11334         * config/s390/s390.c
11335         (processor_table): Remove entries, add arch_level values.
11336         (s390_issue_rate): Remove cases.
11337         (s390_option_override): Adjust
11338         s390_option_override_internal() call.
11339         (s390_option_override_internal): Remove deprecation warning.
11340         (s390_valid_target_attribute_tree): Adjust
11341         s390_option_override_internal() call.
11342         * config/s390/s390.h (struct s390_processor):
11343         Share with s390-c.c, add arch_level field.
11344         * config/s390/s390.md:
11345         Remove occurrences in cpu attribute.
11346         * config/s390/s390.opt: Remove -march/-mtune support.
11347         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
11348         * doc/invoke.texi: Remove deprecation warning.
11350 2018-08-08  Luis Machado  <luis.machado@linaro.org>
11352         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
11353         global.
11354         (qdf24xx_tunings): Set vector cost structure to
11355         qdf24xx_vector_cost.
11357         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
11358         <register_sextend>: Set to 3.
11360 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
11362         PR target/86838
11363         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
11364         * config/aarch64/aarch64-simd.md
11365         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
11366         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
11367         (aarch64_frecpx<mode>): ...this new pattern.
11368         * config/aarch64/aarch64-simd-builtins.def: Remove comment
11369         about aarch64_frecp<FRECP:frecp_suffix><mode>.
11371 2018-08-07  Martin Liska  <mliska@suse.cz>
11373         PR middle-end/83023
11374         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
11375         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
11376         * predict.def (PRED_MALLOC_NONNULL): New predictor.
11377         * doc/extend.texi: Document that malloc attribute adds
11378         hit to compiler.
11380 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
11382         PR target/86785
11383         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11384         Define to speculation_safe_value_not_needed.
11386 2018-08-06  Jeff Law  <law@redhat.com>
11388         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
11389         the vr_values instance to cprop_into_stmt.
11390         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
11391         (cprop_operand): Also query EVRP to determine if OP is a constant.
11393 2018-08-06  Nathan Sidwell  <nathan@acm.org>
11395         * diagnostic.c (diagnostic_report_current_module): Reroll
11396         included-at loop.  Translate text.
11398 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
11400         * function-tests.c (selftest::test_expansion_to_rtl): Call
11401         free_after_compilation.
11403 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11405         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
11407 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
11409         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
11410         loops with memory block operations from getting unrolled.
11412 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
11414         PR target/86807
11415         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11416         Define to speculation_safe_value_not_needed.
11418 2018-08-06  Jeff Law  <law@redhat.com>
11420         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
11421         assert.
11423 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11425         PR target/86662
11426         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
11427         with all enabled __intN types.
11429         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
11431 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11433         * alias.c (record_set): Check for clobber high.
11434         * cfgexpand.c (expand_gimple_stmt): Likewise.
11435         * combine-stack-adj.c (single_set_for_csa): Likewise.
11436         * combine.c (find_single_use_1): Likewise.
11437         (set_nonzero_bits_and_sign_copies): Likewise.
11438         (get_combine_src_dest): Likewise.
11439         (is_parallel_of_n_reg_sets): Likewise.
11440         (try_combine): Likewise.
11441         (record_dead_and_set_regs_1): Likewise.
11442         (reg_dead_at_p_1): Likewise.
11443         (reg_dead_at_p): Likewise.
11444         * dce.c (deletable_insn_p): Likewise.
11445         (mark_nonreg_stores_1): Likewise.
11446         (mark_nonreg_stores_2): Likewise.
11447         * df-scan.c (df_find_hard_reg_defs): Likewise.
11448         (df_uses_record): Likewise.
11449         (df_get_call_refs): Likewise.
11450         * dwarf2out.c (mem_loc_descriptor): Likewise.
11451         * haifa-sched.c (haifa_classify_rtx): Likewise.
11452         * ira-build.c (create_insn_allocnos): Likewise.
11453         * ira-costs.c (scan_one_insn): Likewise.
11454         * ira.c (equiv_init_movable_p): Likewise.
11455         (rtx_moveable_p): Likewise.
11456         (interesting_dest_for_shprep): Likewise.
11457         * jump.c (mark_jump_label_1): Likewise.
11458         * postreload-gcse.c (record_opr_changes): Likewise.
11459         * postreload.c (reload_cse_simplify): Likewise.
11460         (struct reg_use): Add source expr.
11461         (reload_combine): Check for clobber high.
11462         (reload_combine_note_use): Likewise.
11463         (reload_cse_move2add): Likewise.
11464         (move2add_note_store): Likewise.
11465         * print-rtl.c (print_pattern): Likewise.
11466         * recog.c (decode_asm_operands): Likewise.
11467         (store_data_bypass_p): Likewise.
11468         (if_test_bypass_p): Likewise.
11469         * regcprop.c (kill_clobbered_value): Likewise.
11470         (kill_set_value): Likewise.
11471         * reginfo.c (reg_scan_mark_refs): Likewise.
11472         * reload1.c (maybe_fix_stack_asms): Likewise.
11473         (eliminate_regs_1): Likewise.
11474         (elimination_effects): Likewise.
11475         (mark_not_eliminable): Likewise.
11476         (scan_paradoxical_subregs): Likewise.
11477         (forget_old_reloads_1): Likewise.
11478         * reorg.c (find_end_label): Likewise.
11479         (try_merge_delay_insns): Likewise.
11480         (redundant_insn): Likewise.
11481         (own_thread_p): Likewise.
11482         (fill_simple_delay_slots): Likewise.
11483         (fill_slots_from_thread): Likewise.
11484         (dbr_schedule): Likewise.
11485         * resource.c (update_live_status): Likewise.
11486         (mark_referenced_resources): Likewise.
11487         (mark_set_resources): Likewise.
11488         * rtl.c (copy_rtx): Likewise.
11489         * rtlanal.c (reg_referenced_p): Likewise.
11490         (single_set_2): Likewise.
11491         (noop_move_p): Likewise.
11492         (note_stores): Likewise.
11493         * sched-deps.c (sched_analyze_reg): Likewise.
11494         (sched_analyze_insn): Likewise.
11496 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11498         * cse.c (invalidate_reg): New function extracted from...
11499         (invalidate): ...here.
11500         (canonicalize_insn): Check for clobber high.
11501         (invalidate_from_clobbers): invalidate clobber highs.
11502         (invalidate_from_sets_and_clobbers): Likewise.
11503         (count_reg_usage): Check for clobber high.
11504         (insn_live_p): Likewise.
11505         * cselib.c (cselib_expand_value_rtx_1):Likewise.
11506         (cselib_invalidate_regno): Check for clobber in setter.
11507         (cselib_invalidate_rtx): Pass through setter.
11508         (cselib_invalidate_rtx_note_stores):
11509         (cselib_process_insn): Check for clobber high.
11510         * cselib.h (cselib_invalidate_rtx): Add operand.
11512 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11514         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
11515         (mark_not_eliminable): Likewise.
11516         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
11517         * lra-lives.c (process_bb_lives): Check for clobber high.
11518         * lra.c (new_insn_reg): Remember clobber highs.
11519         (collect_non_operand_hard_regs): Check for clobber high.
11520         (lra_set_insn_recog_data): Likewise.
11521         (add_regs_to_insn_regno_info): Likewise.
11522         (lra_update_insn_regno_info): Likewise.
11524 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11526         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
11527         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
11529 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11531         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
11532         (copy_insn_1): Likewise.
11533         (gen_hard_reg_clobber_high): New gen function.
11534         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
11535         * genemit.c (gen_exp): Likewise.
11536         (gen_emit_seq): Pass through info.
11537         (gen_insn): Check for CLOBBER_HIGH.
11538         (gen_expand): Pass through info.
11539         (gen_split): Likewise.
11540         (output_add_clobbers): Likewise.
11541         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
11542         (remove_clobbers): Likewise.
11543         * rtl.h (gen_hard_reg_clobber_high): New declaration.
11545 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
11547         * doc/rtl.texi (clobber_high): Add.
11548         (parallel): Add in clobber high
11549         * rtl.c (rtl_check_failed_code3): Add function.
11550         * rtl.def (CLOBBER_HIGH): Add expression.
11551         * rtl.h (RTL_CHECKC3): Add macro.
11552         (rtl_check_failed_code3): Add declaration.
11553         (XC3EXP): Add macro.
11555 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
11557         PR target/86386
11558         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
11559         cfun->machine->max_used_stack_alignment if needed.
11561 2018-08-04  Martin Sebor  <msebor@redhat.com>
11563         PR tree-optimization/86571
11564         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
11565         NaN output to 4.
11567 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
11569         PR target/86799
11570         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11571         Define.
11573 2018-08-03  Jeff Law  <law@redhat.com>
11575         PR target/86795
11576         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11577         Define to speculation_safe_value_not_needed.
11579 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
11581         * doc/gcov.texi (-x): Remove duplicate "to".
11582         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
11583         (-Wif-not-aligned): Remove duplicate "is".
11584         (-flto): Remove duplicate "the".
11585         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
11586         duplicate "v5.00.b".
11587         (MSP430 Options): Remove duplicate "and" from the description
11588         of "-mgprel-sec=regexp".
11589         (x86 Options): Remove duplicate copies of "vmldLog102" and
11590         vmlsLog104 from description of "-mveclibabi=type".
11592 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
11594         * internal-fn.h (first_commutative_argument): Declare.
11595         * internal-fn.c (first_commutative_argument): New function.
11596         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
11597         restrictions for pattern statements.  Use first_commutative_argument
11598         to look for commutative operands in calls to internal functions.
11600 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
11602         * Makefile.in (wide-int-range.o): New.
11603         * tree-vrp.c: Move all the wide_int_* functions to...
11604         * wide-int-range.cc: ...here.
11605         * tree-vrp.h: Move all the wide_int_* prototypes to...
11606         * wide-int-range.h: ...here.
11608 2018-08-03  Tom de Vries  <tdevries@suse.de>
11610         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
11611         UI_NONE.
11612         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
11613         * except.c (output_function_exception_table): Do early exit if
11614         targetm_common.except_unwind_info (&global_options) == UI_NONE.
11616 2018-08-03  Martin Liska  <mliska@suse.cz>
11618         * predict.c (dump_prediction): Change to 2 digits
11619         in fraction part.
11621 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11623         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
11624         neon_dup_q to...
11625         (falkor_am_1_gtov_gtov): ... a new insn reservation.
11627 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
11629         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
11630         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
11631         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
11632         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
11633         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
11635 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
11637         * diagnostic-show-locus.c (diagnostic_show_locus): Use
11638         pp_take_prefix when saving the existing prefix.
11639         * diagnostic.c (diagnostic_append_note): Likewise.
11640         * langhooks.c (lhd_print_error_function): Likewise.
11641         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
11642         param's type.  Free the existing prefix.
11643         (pp_take_prefix): New function.
11644         (pretty_printer::pretty_printer): Drop the prefix parameter.
11645         Rename the length parameter to match the comment.
11646         (pretty_printer::~pretty_printer): Free the prefix.
11647         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
11648         parameter.
11649         (struct pretty_printer): Drop the "const" from "prefix" field's
11650         type and clarify memory management.
11651         (pp_set_prefix): Drop the "const" from the 2nd param.
11652         (pp_take_prefix): New decl.
11654 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
11656         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
11657         for word_mode_ok here instead of passing as argument.
11658         (expand_block_compare): Change select_block_compare_mode() call.
11659         (expand_strncmp_gpr_sequence): New function.
11660         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
11662 2018-08-02  Jeff Law  <law@redhat.com>
11664         PR target/86790
11665         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11666         Define to speculation_safe_value_not_needed.
11668         PR target/86784
11669         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11670         Define to speculation_safe_value_not_needed.
11672 2018-08-02  Tom de Vries  <tdevries@suse.de>
11674         PR target/86660
11675         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
11676         function.  Return UI_TARGET unconditionally.
11677         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
11678         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
11680 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11682         * genemit.c (print_overload_test): Fix typo.
11684 2018-08-02  Richard Biener  <rguenther@suse.de>
11686         PR tree-optimization/86816
11687         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
11688         which checks for value availability before querying it.
11689         (gvn_uses_equal): Use it.
11690         (same_succ_hash): Likewise.
11691         (gimple_equal_p): Likewise.
11693 2018-08-02  Nick Clifton  <nickc@redhat.com>
11695         PR target/86813
11696         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11697         Define to speculation_safe_value_not_needed.
11699         PR target/86810
11700         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11701         Define to speculation_safe_value_not_needed.
11703         PR target/86810
11704         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11705         Define to speculation_safe_value_not_needed.
11707         PR target/86803
11708         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11709         Define to speculation_safe_value_not_needed.
11711         PR target/86797
11712         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11713         Define to speculation_safe_value_not_needed.
11715         PR target/86791
11716         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11717         Define to speculation_safe_value_not_needed.
11719         PR target/86789
11720         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11721         Define to speculation_safe_value_not_needed.
11723         PR target/86787
11724         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11725         Define to speculation_safe_value_not_needed.
11727         PR target/86782
11728         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11729         speculation_safe_value_not_needed.
11731         PR target/86781
11732         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
11733         to speculation_safe_value_not_needed.
11735 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11737         * doc/md.texi: Expand the documentation of instruction names
11738         to mention port-local uses.  Document '@' in pattern names.
11739         * read-md.h (overloaded_instance, overloaded_name): New structs.
11740         (mapping): Declare.
11741         (md_reader::handle_overloaded_name): New member function.
11742         (md_reader::get_overloads): Likewise.
11743         (md_reader::m_first_overload): New member variable.
11744         (md_reader::m_next_overload_ptr): Likewise.
11745         (md_reader::m_overloads_htab): Likewise.
11746         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
11747         m_next_overload_ptr and m_overloads_htab.
11748         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
11749         (get_mode_token, get_code_token, get_int_token): New functions.
11750         (map_attr_string): Add an optional argument that passes back
11751         the associated iterator.
11752         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
11753         (md_reader::handle_overloaded_name, add_overload_instance): New
11754         functions.
11755         (apply_iterators): Handle '@' names.  Report an error if '@'
11756         is used without iterators.
11757         (initialize_iterators): Initialize the new iterator_group fields.
11758         * genopinit.c (handle_overloaded_code_for)
11759         (handle_overloaded_gen): New functions.
11760         (main): Use them to print declarations of maybe_code_for_* and
11761         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
11762         * genemit.c (print_overload_arguments, print_overload_test)
11763         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
11764         (main): Use it to print definitions of maybe_code_for_* and
11765         maybe_gen_* functions.
11766         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
11767         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
11768         instead of explicit mode checks.
11769         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
11770         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
11771         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
11772         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
11773         (aarch64_expand_compare_and_swap): Likewise
11774         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
11775         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
11776         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
11777         (aarch64_constant_pool_reload_icode): Delete.
11778         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
11779         instead of aarch64_constant_pool_reload_icode.  Use
11780         code_for_aarch64_reload_mov instead of explicit mode checks.
11781         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
11782         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
11783         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
11784         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11785         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11786         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11787         (aarch64_atomic_load_op_code): Delete.
11788         (aarch64_emit_atomic_load_op): Likewise.
11789         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11790         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
11791         instead of aarch64_emit_atomic_load_op.
11792         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11793         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11794         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11795         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11796         character before the pattern name.
11797         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11798         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11799         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11800         (aarch64_frecps<mode>): Likewise.
11801         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11802         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11803         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11804         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11805         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11807 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11809         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11810         Allow HFmode constants if TARGET_FP_F16INST.
11812 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
11814         PR target/86014
11815         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11816         No longer check last store for clobber of address register.
11818 2018-08-02  Martin Liska  <mliska@suse.cz>
11820         PR gcov-profile/86817
11821         * gcov.c (process_all_functions): New function.
11822         (main): Call it.
11823         (process_file): Move functions processing to
11824         process_all_functions.
11826 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
11828         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11829         "const" to the "gimple *" and "rtx_insn *" parameters.
11830         * dumpfile.h (dump_user_location_t::dump_user_location_t):
11831         Likewise.
11832         (dump_location_t::dump_location_t): Likewise.
11834 2018-08-01  Martin Sebor  <msebor@redhat.com>
11836         PR tree-optimization/86650
11837         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11838         rather than a "gcall *".  Directly pass the data of interest
11839         to percent_K_format, rather than building a temporary CALL_EXPR
11840         to hold it.
11841         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11842         (gimple_fold_builtin_strncat): Adjust.
11843         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11844         gcall* argument with gimple*.
11845         * gimple-ssa-warn-restrict.c (check_call): Same.
11846         (wrestrict_dom_walker::before_dom_children): Same.
11847         (builtin_access::builtin_access): Same.
11848         (check_bounds_or_overlap): Same
11849         (maybe_diag_overlap): Same.
11850         (maybe_diag_offset_bounds): Same.
11851         * tree-diagnostic.c (default_tree_printer): Move usage of
11852         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11853         to this callsite.
11854         * tree-pretty-print.c (percent_K_format): Add argument.
11855         * tree-pretty-print.h: Add argument.
11856         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11857         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11858         (maybe_diag_stxncpy_trunc): Same.
11859         (handle_builtin_stxncpy): Same.
11860         (handle_builtin_strcat): Same.
11862 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11864         * match.pd: Optimise pointer range checks.
11866 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11868         PR tree-optimization/86758
11869         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11870         to remove pattern statements.
11872 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11874         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
11875         result of dfs_enumerate_from when constructing stmt_vec_infos,
11876         instead of additionally calling get_loop_body.
11878 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11880         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
11881         parameter.
11882         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
11883         When creating an iv, assert that the step is not known to be zero.
11884         (vect_setup_realignment): Update call accordingly.
11885         * tree-vect-stmts.c (vectorizable_store): Likewise.
11886         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
11888 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11890         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
11891         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
11892         (vectorizable_reduction): Likewise.
11893         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11894         (vect_detect_hybrid_slp_stmts): Likewise.
11895         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11897 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
11899         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
11900         (wide_int_set_zero_nonzero_bits): ...this.
11901         (zero_nonzero_bits_from_vr): Rename to...
11902         (vrp_set_zero_nonzero_bits): ...this.
11903         (extract_range_from_multiplicative_op_1): Abstract wide int
11904         code...
11905         (wide_int_range_multiplicative_op): ...here.
11906         (extract_range_from_binary_expr_1): Extract wide int binary
11907         operations into their own functions.
11908         (wide_int_range_lshift): New.
11909         (wide_int_range_can_optimize_bit_op): New.
11910         (wide_int_range_shift_undefined_p): New.
11911         (wide_int_range_bit_xor): New.
11912         (wide_int_range_bit_ior): New.
11913         (wide_int_range_bit_and): New.
11914         (wide_int_range_trunc_mod): New.
11915         (extract_range_into_wide_ints): New.
11916         (vrp_shift_undefined_p): New.
11917         (extract_range_from_multiplicative_op): New.
11918         (vrp_can_optimize_bit_op): New.
11919         * tree-vrp.h (value_range::dump): New.
11920         (wide_int_range_multiplicative_op): New.
11921         (wide_int_range_lshift):New.
11922         (wide_int_range_shift_undefined_p): New.
11923         (wide_int_range_bit_xor): New.
11924         (wide_int_range_bit_ior): New.
11925         (wide_int_range_bit_and): New.
11926         (wide_int_range_trunc_mod): New.
11927         (zero_nonzero_bits_from_bounds): Rename to...
11928         (wide_int_set_zero_nonzero_bits): ...this.
11929         (zero_nonzero_bits_from_vr): Rename to...
11930         (vrp_set_zero_nonzero_bits): ...this.
11931         (range_easy_mask_min_max): Rename to...
11932         (wide_int_range_can_optimize_bit_op): this.
11933         * vr-values.c (simplify_bit_ops_using_ranges): Rename
11934         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
11936 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11938         * tree-vectorizer.h (vect_orig_stmt): New function.
11939         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
11940         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
11941         (vect_create_epilog_for_reduction): Likewise.
11942         (vectorizable_live_operation): Likewise.
11943         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11944         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
11945         * tree-vect-stmts.c (vectorizable_call): Likewise.
11946         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
11948 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11950         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
11951         argument.
11952         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
11953         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
11954         (vect_transform_loop): Likewise.
11955         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11957 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11959         * tree-vectorizer.h (vect_schedule_slp): Return void.
11960         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11961         (vect_schedule_slp): Likewise.
11963 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11965         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
11966         argument.
11967         (vect_transform_loop): Update calls accordingly.  Schedule SLP
11968         instances before the main loop, if any exist.
11970 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11972         PR tree-optimization/86749
11973         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
11974         If the lhs is used in a COND_EXPR, check that it is being used
11975         as the "then" or "else" value.
11977 2018-08-01  Tom de Vries  <tdevries@suse.de>
11979         PR target/86800
11980         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11981         speculation_safe_value_not_needed.
11983 2018-08-01  Richard Biener  <rguenther@suse.de>
11985         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
11986         as base and offset.
11988 2018-08-01  Martin Liska  <mliska@suse.cz>
11990         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
11991         format how successful transformation is dumped.
11992         (gimple_mod_pow2_value_transform): Likewise.
11993         (gimple_mod_subtract_transform): Likewise.
11994         (gimple_stringops_transform): Likewise.
11996 2018-08-01  Martin Liska  <mliska@suse.cz>
11998         PR value-prof/35543
11999         * value-prof.c (interesting_stringop_to_profile_p):
12000         Simplify the code and add BUILT_IN_MEMMOVE.
12001         (gimple_stringops_transform): Likewise.
12003 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
12005         * config/aarch64/aarch64-simd.md
12006         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12007         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12008         use GPI iterator instead of SI mode.
12010 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12012         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12013         rs6000_speculation_barrier.
12014         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12015         new barrier pattern name.
12017 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
12019         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12020         (speculation_barrier): New insn.
12022 2018-08-01  Richard Biener  <rguenther@suse.de>
12024         PR bootstrap/86724
12025         * graphite.h: Include isl/id.h and isl/space.h to allow build
12026         with ISL 0.20.
12028 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
12030         PR target/86651
12031         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12032         mode for COFF targets.
12033         * defaults.h (TARGET_COFF): Define.
12034         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12035         TARGET_COFF): Define.
12036         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12037         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12038         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12040 2018-07-31  Alexandre Oliva <oliva@adacore.com>
12042         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12043         * gimple-streamer-out.c (output_bb): Save it.
12044         * lto-streamer-in.c (input_struct_function_base): Restore
12045         instance discriminator if available.  Create map on demand.
12046         * lto-streamer-out.c (output_struct_function_base): Save it if
12047         available.
12048         * final.c (decl_to_instance_map): Document LTO strategy.
12050 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
12051             Olivier Hainque  <hainque@adacore.com>
12053         * debug.h (decl_to_instance_map_t): New type.
12054         (decl_to_instance_map): Declare.
12055         (maybe_create_decl_to_instance_map): New inline function.
12056         * final.c (bb_discriminator, last_bb_discriminator): New statics,
12057         to track basic block discriminators.
12058         (final_start_function_1): Initialize them.
12059         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12060         bb_discriminator.
12061         (decl_to_instance_map): New variable.
12062         (map_decl_to_instance, maybe_set_discriminator): New functions.
12063         (notice_source_line): Set discriminator.
12065 2018-07-31  Ian Lance Taylor  <iant@golang.org>
12067         * targhooks.c (default_have_speculation_safe_value): Add
12068         ATTRIBUTE_UNUSED.
12070 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12072         * dump-context.h: Include "pretty-print.h".
12073         (dump_context::refresh_dumps_are_enabled): New decl.
12074         (dump_context::emit_item): New decl.
12075         (class dump_context): Add fields "m_test_pp" and
12076         "m_test_pp_flags".
12077         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12078         (temp_dump_context::get_dumped_text): New decl.
12079         (class temp_dump_context): Add field "m_pp".
12080         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12081         (dump_context::refresh_dumps_are_enabled): ...and add a test for
12082         m_test_pp.
12083         (set_dump_file): Update for above change.
12084         (set_alt_dump_file): Likewise.
12085         (dump_loc): New overload, taking a pretty_printer *.
12086         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
12087         to any test pretty-printer.
12088         (make_item_for_dump_gimple_stmt): New function, adapted from
12089         optinfo::add_gimple_stmt.
12090         (dump_context::dump_gimple_stmt): Call it, and use the result,
12091         eliminating the direct usage of dump_file and alt_dump_file in
12092         favor of indirectly using them via emit_item.
12093         (make_item_for_dump_gimple_expr): New function, adapted from
12094         optinfo::add_gimple_expr.
12095         (dump_context::dump_gimple_expr): Call it, and use the result,
12096         eliminating the direct usage of dump_file and alt_dump_file in
12097         favor of indirectly using them via emit_item.
12098         (make_item_for_dump_generic_expr): New function, adapted from
12099         optinfo::add_tree.
12100         (dump_context::dump_generic_expr): Call it, and use the result,
12101         eliminating the direct usage of dump_file and alt_dump_file in
12102         favor of indirectly using them via emit_item.
12103         (make_item_for_dump_printf_va): New function, adapted from
12104         optinfo::add_printf_va.
12105         (make_item_for_dump_printf): New function.
12106         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12107         and use the result, eliminating the direct usage of dump_file and
12108         alt_dump_file in favor of indirectly using them via emit_item.
12109         (make_item_for_dump_dec): New function.
12110         (dump_context::dump_dec): Call it, and use the result,
12111         eliminating the direct usage of dump_file and alt_dump_file in
12112         favor of indirectly using them via emit_item.
12113         (make_item_for_dump_symtab_node): New function, adapted from
12114         optinfo::add_symtab_node.
12115         (dump_context::dump_symtab_node): Call it, and use the result,
12116         eliminating the direct usage of dump_file and alt_dump_file in
12117         favor of indirectly using them via emit_item.
12118         (dump_context::begin_scope): Reimplement, avoiding direct usage
12119         of dump_file and alt_dump_file in favor of indirectly using them
12120         via emit_item.
12121         (dump_context::emit_item): New member function.
12122         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12123         Set up test pretty-printer on the underlying context.  Call
12124         refresh_dumps_are_enabled.
12125         (temp_dump_context::~temp_dump_context): Call
12126         refresh_dumps_are_enabled.
12127         (temp_dump_context::get_dumped_text): New member function.
12128         (selftest::verify_dumped_text): New function.
12129         (ASSERT_DUMPED_TEXT_EQ): New macro.
12130         (selftest::test_capture_of_dump_calls): Run all tests twice, with
12131         and then without optinfo enabled.  Add uses of
12132         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
12133         * dumpfile.h: Update comment for the dump_* API.
12134         * optinfo-emit-json.cc
12135         (selftest::test_building_json_from_dump_calls): Update for new
12136         param for temp_dump_context ctor.
12137         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12138         and "m_owned" field.
12139         (optinfo_item::~optinfo_item): Likewise.
12140         (optinfo::add_item): New member function.
12141         (optinfo::emit): Update comment.
12142         (optinfo::add_string): Delete.
12143         (optinfo::add_printf): Delete.
12144         (optinfo::add_printf_va): Delete.
12145         (optinfo::add_gimple_stmt): Delete.
12146         (optinfo::add_gimple_expr): Delete.
12147         (optinfo::add_tree): Delete.
12148         (optinfo::add_symtab_node): Delete.
12149         (optinfo::add_dec): Delete.
12150         * optinfo.h (class dump_context): New forward decl.
12151         (optinfo::add_item): New decl.
12152         (optinfo::add_string): Delete.
12153         (optinfo::add_printf): Delete.
12154         (optinfo::add_printf_va): Delete.
12155         (optinfo::add_gimple_stmt): Delete.
12156         (optinfo::add_gimple_expr): Delete.
12157         (optinfo::add_tree): Delete.
12158         (optinfo::add_symtab_node): Delete.
12159         (optinfo::add_dec): Delete.
12160         (optinfo::add_poly_int): Delete.
12161         (optinfo_item::optinfo_item): Remove "owned" param.
12162         (class optinfo_item): Remove field "m_owned".
12164 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
12166         PR middle-end/86705
12167         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12168         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12169         requested variable alignment.
12170         (expand_one_ssa_partition): Likewise.
12171         (expand_one_var): Likewise.
12173 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12175         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12176         to speculation_safe_value_not_needed.
12178 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12180         * targhooks.h (speculation_safe_value_not_needed): New prototype.
12181         * targhooks.c (speculation_safe_value_not_needed): New function.
12182         * target.def (have_speculation_safe_value): Update documentation.
12183         * doc/tm.texi: Regenerated.
12185 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12187         * config/aarch64/iterators.md (ALLI_TI): New iterator.
12188         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12189         expand.
12190         (despeculate_copy<ALLI:mode>_insn): New insn.
12191         (despeculate_copyti_insn): New insn.
12192         (despeculate_simple<ALLI:mode>): New insn
12193         (despeculate_simpleti): New insn.
12194         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12195         function.
12196         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12197         aarch64_speculation_safe_value.
12198         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12200 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12202         * config/aarch64/aarch64-speculation.cc: New file.
12203         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12204         before pass_reorder_blocks.
12205         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12206         prototype.
12207         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
12208         X14 and X15 when tracking speculation.
12209         * config/aarch64/aarch64.md (register name constants): Add
12210         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
12211         (unspec): Add UNSPEC_SPECULATION_TRACKER.
12212         (speculation_barrier): New insn attribute.
12213         (cmp<mode>): Allow SP in comparisons.
12214         (speculation_tracker): New insn.
12215         (speculation_barrier): Add speculation_barrier attribute.
12216         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
12217         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
12218         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
12220 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12222         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
12223         aarch64_track_speculation is true.
12224         (tb<optab><mode>1): Likewise.
12225         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
12226         generate CB[N]Z when tracking speculation.
12227         (aarch64_split_compare_and_swap): Likewise.
12228         (aarch64_split_atomic_op): Likewise.
12230 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12232         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
12234 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12236         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
12237         (speculation_barrier): New insn.
12239 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12241         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
12242         * config/arm/arm.md (speculation_barrier): New expand.
12243         (speculation_barrier_insn): New pattern.
12245 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
12247         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
12248         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
12249         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
12250         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
12251         list.
12252         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
12253         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
12254         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
12255         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12256         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
12257         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
12258         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
12259         * builtins.c (expand_speculation_safe_value): New function.
12260         (expand_builtin): Call it.
12261         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
12262         * doc/extend.texi: Document __builtin_speculation_safe_value.
12263         * doc/md.texi: Document "speculation_barrier" pattern.
12264         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
12265         TARGET_HAVE_SPECULATION_SAFE_VALUE.
12266         * doc/tm.texi: Regenerated.
12267         * target.def (have_speculation_safe_value, speculation_safe_value): New
12268         hooks.
12269         * targhooks.c (default_have_speculation_safe_value): New function.
12270         (default_speculation_safe_value): New function.
12271         * targhooks.h (default_have_speculation_safe_value): Add prototype.
12272         (default_speculation_safe_value): Add prototype.
12274 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
12276         * dump-context.h (dump_context::dump_loc): New decl.
12277         * dumpfile.c (dump_context::dump_loc): New member function.
12278         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
12279         and dump_gimple_stmt.
12280         (dump_context::dump_gimple_expr_loc): Likewise, using
12281         dump_gimple_expr.
12282         (dump_context::dump_generic_expr_loc): Likewise, using
12283         dump_generic_expr.
12284         (dump_context::dump_printf_loc_va): Likewise, using
12285         dump_printf_va.
12286         (dump_context::begin_scope): Explicitly using the global function
12287         "dump_loc", rather than the member function.
12289 2018-07-31  Martin Sebor  <msebor@redhat.com>
12291         PR tree-optimization/86741
12292         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
12294 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
12296         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
12297         depend on whether prefetch instructions will be emitted or not.
12298         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
12299         will be emitted or not.
12300         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
12301         (TARGET_SETMEM_PFD): New macros.
12303 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12305         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
12306         (NULL_STMT_VEC_INFO): Delete.
12307         (stmt_vec_info::operator*): Likewise.
12308         (stmt_vec_info::operator gimple *): Likewise.
12309         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
12310         of NULL_STMT_VEC_INFO.
12311         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12312         (vect_reassociating_reduction_p): Likewise.
12313         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12314         (vectorizable_store): Likewise.
12315         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
12316         (vec_info::free_stmt_vec_infos): Likewise.
12318 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12320         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
12321         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
12323 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12325         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
12326         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12327         (vec_info::free_stmt_vec_info): New private member functions.
12328         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
12329         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
12330         * tree-parloops.c (gather_scalar_reductions): Remove calls to
12331         set_stmt_vec_info_vec and free_stmt_vec_infos.
12332         * tree-vect-loop.c (_loop_vec_info): Remove call to
12333         set_stmt_vec_info_vec.
12334         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
12335         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
12336         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
12337         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12338         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
12339         assignments in {vec_info::,}new_stmt_vec_info that are redundant
12340         with the clearing in the xcalloc.
12341         (stmt_vec_info_vec): Delete.
12342         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
12343         (vectorize_loops): Likewise.
12344         (vec_info::~vec_info): Remove argument from call to
12345         free_stmt_vec_infos.
12346         (vec_info::add_stmt): Remove vinfo argument from call to
12347         new_stmt_vec_info.
12349 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12351         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
12352         rather than a gimple stmt.
12353         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
12354         information for pattern statements when passed the original
12355         statement; instead wait to be passed the pattern statement itself.
12356         Don't call set_vinfo_for_stmt here.
12357         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
12358         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
12359         stmt_vec_infos here.
12360         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
12361         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
12362         stmt_vec_infos entry.
12364 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12366         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
12367         * tree-vectorizer.c (vec_info::replace_stmt): New function.
12368         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
12369         * tree-vect-stmts.c (vectorizable_call): Likewise.
12370         (vectorizable_simd_clone_call): Likewise.
12372 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12374         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
12375         * tree-vectorizer.c (vec_info::remove_stmt): New function.
12376         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
12377         * tree-vect-loop.c (vect_transform_loop): Likewise.
12378         * tree-vect-slp.c (vect_schedule_slp): Likewise.
12379         * tree-vect-stmts.c (vect_remove_stores): Likewise.
12381 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12383         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
12384         (vect_dr_stmt): Delete.
12385         * tree-vectorizer.c (vec_info::lookup_dr): New function.
12386         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
12387         of DR_VECT_AUX.
12388         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12389         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
12390         (vect_verify_datarefs_alignment, vect_peeling_supportable)
12391         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12392         (vect_analyze_data_refs): Likewise.
12393         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
12394         argument.
12395         (vect_find_same_alignment_drs): Likewise.
12396         (vect_slp_analyze_node_dependences): Update calls accordingly.
12397         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
12398         instead of DR_VECT_AUX.
12399         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
12400         of a vector data references.  Use vec_info::lookup_dr instead of
12401         DR_VECT_AUX.
12402         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
12403         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
12404         instead of DR_VECT_AUX.
12406 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12408         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
12409         dr_vec_info.
12410         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12411         accordingly.
12412         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12413         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12414         (vect_gen_prolog_loop_niters): Likewise.
12416 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12418         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
12419         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
12420         (vect_known_alignment_in_bytes, vect_dr_behavior)
12421         (vect_get_scalar_dr_size): Take references as dr_vec_infos
12422         instead of data_references.  Update calls to other routines for
12423         which the same change has been made.
12424         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
12425         dr_vec_infos instead of stmt_vec_infos.
12426         (vect_analyze_data_ref_dependence): Update call accordingly.
12427         (vect_slp_analyze_data_ref_dependence)
12428         (vect_record_base_alignments): Use DR_VECT_AUX.
12429         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
12430         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
12431         (vector_alignment_reachable_p, vect_get_data_access_cost)
12432         (vect_peeling_supportable, vect_analyze_group_access_1)
12433         (vect_analyze_group_access, vect_analyze_data_ref_access)
12434         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
12435         (vect_compile_time_alias, vect_small_gap_p)
12436         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
12437         (vect_supportable_dr_alignment): Take references as dr_vec_infos
12438         instead of data_references.  Update calls to other routines for
12439         which the same change has been made.
12440         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
12441         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12442         (vect_slp_analyze_and_verify_node_alignment)
12443         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12444         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12445         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
12446         above changes.
12447         (_vect_peel_info::dr): Replace with...
12448         (_vect_peel_info::dr_info): ...this new field.
12449         (vect_peeling_hash_get_most_frequent)
12450         (vect_peeling_hash_choose_best_peeling): Update accordingly.
12451         (vect_peeling_hash_get_lowest_cost):
12452         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
12453         routines for which the same change has been made.
12454         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
12455         data_reference.
12456         * tree-vect-loop-manip.c (get_misalign_in_elems)
12457         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
12458         above changes.
12459         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12460         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
12461         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
12462         (get_group_load_store_type, get_negative_load_store_type)
12463         (vect_get_data_ptr_increment, vectorizable_store)
12464         (vectorizable_load): Likewise.
12465         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
12466         Update calls to other routines for which the same change has been made.
12468 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12470         * tree-vectorizer.h (vec_info::move_dr): New member function.
12471         (dataref_aux): Rename to...
12472         (dr_vec_info): ...this and add "dr" and "stmt" fields.
12473         (_stmt_vec_info::dr_aux): Update accordingly.
12474         (_stmt_vec_info::data_ref_info): Delete.
12475         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
12476         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
12477         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
12478         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
12479         of data_ref.
12480         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
12481         (STMT_VINFO_DR_INFO): New macro.
12482         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
12483         (set_dr_misalignment): Update after rename of dataref_aux.
12484         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
12485         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
12486         initialization of STMT_VINFO_DATA_REF.
12487         * tree-vectorizer.c (vec_info::move_dr): New function.
12488         * tree-vect-patterns.c (vect_recog_bool_pattern)
12489         (vect_recog_mask_conversion_pattern)
12490         (vect_recog_gather_scatter_pattern): Use it.
12491         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
12492         the "dr" and "stmt" fields of dr_vec_info instead of
12493         STMT_VINFO_DATA_REF.
12495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12497         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
12498         (is_pattern_stmt_p): Use it.
12499         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
12500         on pattern statements.
12502 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12504         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
12505         original stmt as a stmt_vec_info rather than a gimple stmt.
12506         (vect_pattern_recog_1): Take the statement directly as a
12507         stmt_vec_info, rather than via a gimple_stmt_iterator.
12508         Update call to vect_mark_pattern_stmts.
12509         (vect_pattern_recog): Update calls accordingly.
12511 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12513         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
12514         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
12515         a vect_def_type for the first argument.
12516         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
12517         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
12518         operand if it isn't defined by a vectorized statement.
12519         (vect_build_gather_load_calls): Remove the mask_dt argument and
12520         update calls to vect_get_vec_def_for_stmt_copy.
12521         (vectorizable_bswap): Likewise the dt argument.
12522         (vectorizable_call): Update calls to vectorizable_bswap and
12523         vect_get_vec_def_for_stmt_copy.
12524         (vectorizable_simd_clone_call, vectorizable_assignment)
12525         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
12526         (vectorizable_comparison): Update calls to
12527         vect_get_vec_def_for_stmt_copy.
12528         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
12529         vect_is_simple_use.
12530         (vect_get_loop_based_defs): Remove dt argument and update call
12531         to vect_get_vec_def_for_stmt_copy.
12532         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
12533         and vect_get_vec_def_for_stmt_copy.
12534         (vectorizable_load): Update calls to vect_build_gather_load_calls
12535         and vect_get_vec_def_for_stmt_copy.
12536         * tree-vect-loop.c (vect_create_epilog_for_reduction)
12537         (vectorizable_reduction, vectorizable_live_operation): Update calls
12538         to vect_get_vec_def_for_stmt_copy.
12540 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12542         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
12543         and gimple stmt arguments with a stmt_vec_info.
12544         (vect_record_base_alignments): Update calls accordingly.
12545         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
12546         and gimple stmt arguments with a stmt_vec_info.
12547         (vect_build_slp_tree_1): Remove vinfo argument and update call
12548         to vect_record_max_nunits.
12549         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
12550         and vect_record_max_nunits.
12552 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12554         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
12555         file and take a stmt_vec_info instead of a gimple stmt.
12556         (supportable_widening_operation, vect_finish_replace_stmt)
12557         (vect_finish_stmt_generation, vect_get_store_rhs)
12558         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
12559         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
12560         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
12561         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
12562         (vect_create_data_ref_ptr, bump_vector_ptr)
12563         (vect_permute_store_chain, vect_setup_realignment)
12564         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
12565         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
12566         (vectorizable_reduction, vectorizable_induction)
12567         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
12568         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
12569         than gimple stmts as arguments.
12570         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
12571         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
12572         (can_group_stmts_p, vect_check_gather_scatter)
12573         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12574         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
12575         (vect_permute_load_chain, vect_shift_permute_load_chain)
12576         (vect_transform_grouped_load)
12577         (vect_record_grouped_load_vectors): Likewise.
12578         * tree-vect-loop.c (vect_fixup_reduc_chain)
12579         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
12580         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
12581         (vectorizable_reduction, vectorizable_induction)
12582         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
12583         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
12584         (vect_get_load_store_mask): Likewise.
12585         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
12586         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
12587         * tree-vect-stmts.c (vect_mark_relevant)
12588         (is_simple_and_all_uses_invariant)
12589         (exist_non_indexing_operands_for_use_p, process_use)
12590         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
12591         (vect_get_vec_def_for_operand, vect_get_vec_defs)
12592         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
12593         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
12594         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
12595         (get_negative_load_store_type, get_load_store_type)
12596         (vect_check_load_store_mask, vect_check_store_rhs)
12597         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
12598         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12599         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12600         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12601         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
12602         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
12603         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
12604         (supportable_widening_operation): Likewise.
12606 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12608         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
12609         a stmt_vec_info instead of a gcall.
12610         (vect_check_gather_scatter): Update call accordingly.
12611         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
12612         of a gphi.
12613         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
12614         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
12615         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
12616         instead of a gimple stmt.
12617         (vect_transform_loop): Update calls accordingly.
12618         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
12619         stmt_vec_infos instead of gimple stmts.
12620         (vect_analyze_slp_instance): Update use accordingly.
12621         * tree-vect-stmts.c (read_vector_array, write_vector_array)
12622         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
12623         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
12624         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
12625         (vect_gen_widened_results_half, vect_get_loop_based_defs)
12626         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
12627         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
12628         down to subroutines.
12630 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12632         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
12633         of the worklist from a vector of gimple stmts to a vector of
12634         stmt_vec_infos.
12635         * tree-vect-stmts.c (vect_mark_relevant, process_use)
12636         (vect_mark_stmts_to_be_vectorized): Likewise
12638 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12640         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
12641         statement before passing it to vect_analyze_stmt.
12642         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
12643         the chain of phi vector definitions.  Track the exit phi via its
12644         stmt_vec_info.
12645         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
12646         STMT_VINFO_REDUC_DEF.
12647         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
12648         stmt_vec_infos to handle the statement chains.
12649         (vect_get_slp_defs): Record the first statement in the node
12650         using a stmt_vec_info.
12651         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
12652         statements here and pass their stmt_vec_info down to subroutines.
12653         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
12654         down to vect_finish_stmt_generation.
12655         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
12656         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
12657         stmt_vec_infos to subroutines.
12658         (vect_remove_stores): Use stmt_vec_infos to handle the statement
12659         chains.
12661 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12663         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
12664         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
12665         (vect_permute_store_chain, vect_setup_realignment)
12666         (vect_permute_load_chain, vect_shift_permute_load_chain)
12667         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
12668         stmts internally, and when passing values to other vectorizer routines.
12669         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12670         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
12671         (vect_analyze_loop_operations, get_initial_def_for_reduction)
12672         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
12673         (vectorizable_reduction, vectorizable_induction)
12674         (vectorizable_live_operation, vect_transform_loop_stmt)
12675         (vect_transform_loop): Likewise.
12676         * tree-vect-patterns.c (vect_reassociating_reduction_p)
12677         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
12678         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
12679         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12680         (vect_slp_analyze_node_operations_1): Likewise.
12681         * tree-vect-stmts.c (vect_mark_relevant, process_use)
12682         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
12683         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
12684         (vect_finish_stmt_generation_1, get_group_load_store_type)
12685         (get_load_store_type, vect_build_gather_load_calls)
12686         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12687         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12688         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12689         (vectorizable_store, vectorizable_load, vectorizable_condition)
12690         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
12691         (supportable_widening_operation): Likewise.
12692         (vect_get_vector_types_for_stmt): Likewise.
12693         * tree-vectorizer.h (vect_dr_behavior): Likewise.
12695 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12697         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12698         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
12699         (vect_permute_store_chain, vect_permute_load_chain)
12700         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
12701         repeated stmt_vec_info lookups.
12702         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12703         (vect_update_ivs_after_vectorizer): Likewise.
12704         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
12705         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12706         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
12707         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12708         (vect_bb_slp_scalar_cost): Likewise.
12709         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
12711 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12713         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
12714         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
12715         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
12716         to get gassigns and gcalls, rather than operating on generc gimple
12717         stmts.
12718         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
12719         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
12720         (vectorizable_load, vect_analyze_stmt): Likewise.
12721         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
12723 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12725         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
12726         return stmt_vec_infos rather than gimple stmts.  Do not accept
12727         null arguments.
12728         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
12729         of a gimple stmt.
12730         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12731         Update use of get_later_stmt.
12732         (vect_get_constant_vectors): Update call accordingly.
12733         (vect_schedule_slp_instance): Likewise
12734         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
12735         (vect_slp_analyze_instance_dependence): Likewise.
12736         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
12738 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12740         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
12741         (stmt_info_for_cost::stmt_info): ...this new field.
12742         (add_stmt_costs): Update accordingly.
12743         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12744         (vect_get_known_peeling_cost): Likewise.
12745         (vect_estimate_min_profitable_iters): Likewise.
12746         * tree-vect-stmts.c (record_stmt_cost): Likewise.
12748 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12750         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
12751         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12752         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12753         accordingly.
12754         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
12756 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12758         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
12759         a gimple stmt to a stmt_vec_info.
12760         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12762 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12764         * tree-vectorizer.h (vec_info::grouped_stores): Change from
12765         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12766         (_loop_vec_info::reduction_chains): Likewise.
12767         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
12768         accordingly.
12769         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12771 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12773         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
12774         a gimple stmt to a stmt_vec_info.
12775         (_stmt_vec_info::next_element): Likewise.
12776         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
12777         (vect_slp_analyze_and_verify_node_alignment)
12778         (vect_analyze_group_access_1, vect_analyze_group_access)
12779         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
12780         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
12781         (vect_supportable_dr_alignment): Update accordingly.
12782         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
12783         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
12784         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12785         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12786         * tree-vect-slp.c (vect_build_slp_tree_1)
12787         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12788         (vect_split_slp_store_group, vect_analyze_slp_instance)
12789         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12790         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12791         (get_group_load_store_type, get_load_store_type)
12792         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12793         (vect_transform_stmt, vect_remove_stores): Likewise.
12795 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12797         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12798         than a gimple stmt.
12799         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12800         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12801         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12802         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12803         (vector_alignment_reachable_p, vect_get_data_access_cost)
12804         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12805         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12806         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12807         (vect_analyze_group_access_1, vect_analyze_group_access)
12808         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12809         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12810         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12811         result of vect_dr_stmt and use the stmt_vec_info instead of
12812         the associated gimple stmt.
12813         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12814         (vect_gen_prolog_loop_niters): Likewise.
12815         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12817 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12819         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12820         to a vec<stmt_vec_info>.
12821         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12822         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12823         vec<stmt_vec_info>.
12824         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12825         to a vec<stmt_vec_info>.
12826         (bst_traits::value_type, bst_traits::value_type): Likewise.
12827         (bst_traits::hash): Update accordingly.
12828         (vect_get_and_check_slp_defs): Change the stmts parameter from
12829         a vec<gimple *> to a vec<stmt_vec_info>.
12830         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12831         (vect_build_slp_tree): Likewise.
12832         (vect_build_slp_tree_2): Likewise.  Update uses of
12833         SLP_TREE_SCALAR_STMTS.
12834         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12835         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12836         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12837         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12838         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12839         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12840         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12841         (vect_get_constant_vectors, vect_get_slp_defs)
12842         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12843         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12844         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12845         instead of gimple stmts.
12846         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12847         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12848         (vect_slp_analyze_instance_dependence): Update uses of
12849         SLP_TREE_SCALAR_STMTS.
12850         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12851         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12852         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12853         (get_initial_defs_for_reduction): Likewise.
12854         (vect_create_epilog_for_reduction): Likewise.
12855         (vectorize_fold_left_reduction): Likewise.
12856         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12857         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12858         (can_vectorize_live_stmts): Likewise.
12860 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12862         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12863         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12864         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12865         than gimple stmts.
12866         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12867         of a gimple stmt.
12868         (gather_scalar_reductions): Update after above interface changes.
12869         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12870         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12871         than gimple stmts.
12872         (vect_force_simple_reduction): Likewise.
12873         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12874         LOOP_VINFO_REDUCTIONS.
12875         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12877 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12879         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
12880         a gimple stmt to a stmt_vec_info.
12881         * tree-vect-loop.c (vect_active_double_reduction_p)
12882         (vect_force_simple_reduction, vectorizable_reduction): Update
12883         accordingly.
12885 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12887         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
12888         vec<gimple *> to a vec<stmt_vec_info>.
12889         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
12890         the reduction_phis argument from a vec<gimple *> to a
12891         vec<stmt_vec_info>.
12892         (vectorizable_reduction): Likewise the phis local variable that
12893         is passed to vect_create_epilog_for_reduction.  Update for new type
12894         of SLP_TREE_VEC_STMTS.
12895         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
12896         (vectorizable_live_operation): Likewise.
12897         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
12898         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
12900 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12902         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
12903         a gimple stmt to a stmt_vec_info.
12904         (vectorizable_condition, vectorizable_live_operation)
12905         (vectorizable_reduction, vectorizable_induction): Pass back the
12906         vectorized statement as a stmt_vec_info.
12907         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
12908         use of STMT_VINFO_VEC_STMT.
12909         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
12910         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
12911         as stmt_vec_infos rather than gimple stmts.
12912         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
12913         to a stmt_vec_info.
12914         (vectorizable_live_operation): Likewise.
12915         (vectorizable_reduction, vectorizable_induction): Likewise,
12916         updating use of STMT_VINFO_VEC_STMT.
12917         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
12918         of STMT_VINFO_VEC_STMT.
12919         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
12920         (vectorizable_simd_clone_call, vectorizable_conversion)
12921         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12922         (vectorizable_store, vectorizable_load, vectorizable_condition)
12923         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
12924         from a gimple stmt to a stmt_vec_info.
12925         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
12926         pointer to a stmt_vec_info to the vectorizable_* routines.
12928 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12930         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
12931         a gimple stmt to a stmt_vec_info.
12932         (is_pattern_stmt_p): Update accordingly.
12933         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
12934         (vect_record_grouped_load_vectors): Likewise.
12935         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
12936         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
12937         (vect_model_reduction_cost): Likewise.
12938         (vect_create_epilog_for_reduction): Likewise.
12939         (vectorizable_reduction, vectorizable_induction): Likewise.
12940         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12941         Return the stmt_vec_info for the pattern statement.
12942         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
12943         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
12944         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12945         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
12946         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
12947         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
12948         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
12949         (free_stmt_vec_info, vect_is_simple_use): Likewise.
12951 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12953         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
12954         (vect_finish_stmt_generation): Likewise.
12955         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12956         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
12957         (vect_build_gather_load_calls): Use the return value of the above
12958         functions instead of a separate call to vinfo_for_stmt.  Use narrow
12959         scopes for the input gimple stmt and wider scopes for the associated
12960         stmt_vec_info.  Use vec_info::lookup_def when setting these
12961         stmt_vec_infos from an SSA_NAME definition.
12962         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12963         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12964         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12965         (vectorizable_store, vectorizable_load, vectorizable_condition)
12966         (vectorizable_comparison): Likewise.
12967         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
12968         (vectorizable_reduction): Likewise.
12970 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12972         * tree-vectorizer.h (vect_is_simple_use): Add an optional
12973         stmt_vec_info * parameter before the optional gimple **.
12974         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12975         (process_use, vect_get_vec_def_for_operand_1): Update callers.
12976         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
12977         * tree-vect-loop.c (vectorizable_reduction): Likewise.
12978         (vectorizable_live_operation): Likewise.
12979         * tree-vect-patterns.c (type_conversion_p): Likewise.
12980         (vect_look_through_possible_promotion): Likewise.
12981         (vect_recog_rotate_pattern): Likewise.
12982         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12984 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12986         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
12987         a typedef to a wrapper class.
12988         (NULL_STMT_VEC_INFO): New macro.
12989         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
12990         (stmt_vec_info::operator*): New function.
12991         (stmt_vec_info::operator gimple *): Likewise.
12992         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
12993         (add_stmt_costs): Likewise.
12994         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
12995         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12996         (vect_get_known_peeling_cost): Likewise.
12997         (vect_estimate_min_profitable_iters): Likewise.
12998         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12999         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13000         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13001         (vectorizable_store, free_stmt_vec_infos): Likewise.
13002         (new_stmt_vec_info): Change return type of xcalloc to
13003         _stmt_vec_info *.
13005 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13007         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13008         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13009         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13010         a single_imm_use-based sequence.
13011         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13013 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13015         * tree-vectorizer.h (vec_info::lookup_def): Declare.
13016         * tree-vectorizer.c (vec_info::lookup_def): New function.
13017         * tree-vect-patterns.c (vect_get_internal_def): Use it.
13018         (vect_widened_op_tree): Likewise.
13019         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13020         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13021         (vectorizable_reduction): Likewise.
13022         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13023         of a gimple *.
13024         (vect_is_slp_reduction): Update calls accordingly.  Use
13025         vec_info::lookup_def.
13026         (vect_is_simple_reduction): Likewise
13027         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13029 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13031         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13032         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13033         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13034         of vinfo_for_stmt.
13035         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13036         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13037         (vect_update_vf_for_slp, vect_analyze_loop_operations)
13038         (vect_is_slp_reduction, vectorizable_induction)
13039         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13040         * tree-vect-patterns.c (vect_init_pattern_stmt):
13041         (vect_determine_min_output_precision_1, vect_determine_precisions)
13042         (vect_pattern_recog): Likewise.
13043         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13044         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13045         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13046         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13047         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13048         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
13049         info field from a loop to a loop_vec_info.
13051 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13053         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13054         (vec_info::add_stmt): Declare.
13055         * tree-vectorizer.c (vec_info::add_stmt): New function.
13056         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13057         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13058         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13059         (vectorizable_induction): Likewise.
13060         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13061         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13062         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13063         (vectorizable_load): Likewise.
13064         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13065         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13066         (vect_recog_gather_scatter_pattern): Likewise.
13067         (append_pattern_def_seq): Likewise.  Remove a check that is
13068         performed by add_stmt itself.
13070 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13072         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13073         which make_ssa_name was called with new_stmt before new_stmt
13074         had been created.
13076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13078         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13079         split out from...
13080         (vect_is_slp_reduction): ...here...
13081         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
13082         that are already known to be false.
13084 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13086         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13087         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
13088         STMT_VINFO_NUM_SLP_USES when it's true.
13089         (vect_free_slp_instance): Add a final_p parameter and pass it to
13090         vect_free_slp_tree.
13091         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13092         (vect_analyze_slp_instance): Likewise.
13093         (vect_slp_analyze_operations): Likewise.
13094         (vect_slp_analyze_bb_1): Likewise.
13095         * tree-vectorizer.c (vec_info): Likewise.
13096         * tree-vect-loop.c (vect_transform_loop): Likewise.
13098 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13100         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13101         function is not called for second and subsequent members of
13102         a reduction group.
13104 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
13106         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13107         cases for nested loops from here to ...
13108         (vect_create_epilog_for_reduction): ...here.  Only call
13109         vect_is_simple_use for inner-loop reductions.
13111 2018-07-31  Martin Liska  <mliska@suse.cz>
13113         PR gcov-profile/85338
13114         PR gcov-profile/85350
13115         PR gcov-profile/85372
13116         * profile.c (struct location_triplet): New.
13117         (struct location_triplet_hash): Likewise.
13118         (output_location): Do not output a BB that
13119         is already recorded for a line.
13120         (branch_prob): Use streamed_locations.
13122 2018-07-31  Martin Liska  <mliska@suse.cz>
13124         PR gcov-profile/85370
13125         * coverage.c (coverage_begin_function): Do not mark target
13126         clones as artificial functions.
13128 2018-07-31  Martin Liska  <mliska@suse.cz>
13130         PR gcov-profile/83813
13131         PR gcov-profile/84758
13132         PR gcov-profile/85217
13133         PR gcov-profile/85332
13134         * profile.c (branch_prob): Do not record GOTO expressions
13135         for GIMPLE statements which locations are already streamed.
13137 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13139         * gcc.c (handle_spec_function): Accept a soft_matched_part
13140         argument, as do_spec_1.  Pass it down to ...
13141         (eval_spec_function): Accept a soft_matched_part argument,
13142         and pass it down to ...
13143         (do_spec_2): Accept a soft_matched_part argument, and pass
13144         it down to do_spec_1.
13145         (do_spec_1): Pass soft_matched_part to handle_spec_function.
13146         (handle_braces): Update call to handle_spec_function.
13147         (driver::set_up_specs): Update calls to do_spec_2.
13148         (compare_debug_dump_opt_spec_function): Likewise.
13149         (compare_debug_self_opt_spec_function): Likewise.
13151 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13153         * common.opt (nolibc): New option.
13154         * doc/invoke.texi (Link Options): Document it.
13155         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13156         * config/alpha/linux.h: Likewise.
13157         * config/arc/elf.h: Likewise.
13158         * config/arm/uclinux-elf.h: Likewise.
13159         * config/arm/unknown-elf.h: Likewise.
13160         * config/avr/avrlibc.h: Likewise.
13161         * config/bfin/bfin.h: Likewise.
13162         * config/bfin/linux.h: Likewise.
13163         * config/bfin/uclinux.h: Likewise.
13164         * config/darwin.h: Likewise.
13165         * config/darwin10.h: Likewise.
13166         * config/darwin12.h: Likewise.
13167         * config/gnu-user.h: Likewise.
13168         * config/lm32/uclinux-elf.h: Likewise.
13169         * config/pa/pa-hpux11.h: Likewise.
13170         * config/pa/pa64-hpux.h: Likewise.
13171         * config/sparc/sparc.h: Likewise.
13173 2018-07-31  Olivier Hainque  <hainque@adacore.com>
13175         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13176         undefined variables.
13178 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13180         PR target/86640
13181         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13182         instead of GEN_INT.
13184 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13186         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13187         terminated string literal.
13189 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
13191         PR rtl-optimization/85160
13192         * combine.c (is_just_move): New function.
13193         (try_combine): Allow combining two instructions into two if neither of
13194         the original instructions was a move.
13196 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
13198         PR target/86673
13199         * doc/extend.texi (Global Register Variables): Discourage use of type
13200         qualifiers.
13201         (Local Register Variables): Likewise.
13203 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
13205         PR tree-optimization/86506
13206         * hwint.h (ceil_log2): Resync with hwint.c implementation.
13208 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
13210         PR target/86547
13211         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
13212         hard_regno, make sure no insn between `from` and `to` clobbers it.
13214 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
13215             Tom de Vries  <tdevries@suse.de>
13217         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
13218         (PTX_DEFAULT_RUNTIME_DIM): ... this.
13219         (nvptx_goacc_validate_dims): Set default worker and gang dims to
13220         PTX_DEFAULT_RUNTIME_DIM.
13221         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
13223 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
13225         * config/pa/pa.c (pa_output_addr_vec): Align address table.
13226         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
13227         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
13229 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
13231         * config/rs6000/constraints.md (wG constraint): Delete, no longer
13232         used.
13233         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
13234         predicate to reflect toc fusion has been deleted.
13235         (toc_fusion_mem_raw): Delete, no longer used.
13236         (toc_fusion_mem_wrapped): Likewise.
13237         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
13238         fusion mask bit.
13239         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
13240         Delete, no longer used.
13241         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
13242         meant to be used for toc fusion.
13243         (rs6000_debug_print_mode): Delete toc fusion debugging.
13244         (rs6000_debug_reg_global): Likewise.
13245         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
13246         fusion and secondary reload support that were never used.
13247         (rs6000_option_override_internal): Delete TOC fusion, that was only
13248         partially defined, and it did not work unless you also used the
13249         -mcmodel= switch.
13250         (rs6000_legitimate_address_p): Delete TOC fusion support.
13251         (rs6000_opt_masks): Likewise.
13252         (fusion_wrap_memory_address): Delete function, no longer used.
13253         (fusion_split_address); Delete TOC fusion support.
13254         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
13255         longer used with toc fusion being deleted.
13256         (TARGET_TOC_FUSION_FP): Likewise.
13257         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
13258         UNSPEC.
13259         (toc fusion spliter): Delete TOC fusion support.
13260         (toc_fusionload_<mode>): Likewise.
13261         (toc_fusionload_di): Likewise.
13262         (fusion_gpr_load_<mode>): Delete generator function, this insn no
13263         longer needs to be named.  Rename predicate to delete TOC fusion.
13264         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13265         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13266         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13267         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13268         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
13270 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13272         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
13273         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
13274         __int128 in built-in function prototypes.
13275         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
13276         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
13278 2018-07-27  Martin Sebor  <msebor@redhat.com>
13280         PR tree-optimization/86696
13281         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
13282         types, including enums.
13283         (handle_char_store): Be prepared for the above function to fail.
13285 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
13287         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
13288         when optimization level is lower than 2 or optimize for size.
13290 2018-07-26  Martin Sebor  <msebor@redhat.com>
13292         PR tree-optimization/86043
13293         PR tree-optimization/86042
13294         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
13295         (get_string_cst_length): Rename...
13296         (get_min_string_length): ...to this.  Add argument.
13297         (handle_char_store): Extend to handle multi-character stores by
13298         MEM_REF.
13299         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
13300         * tree.h (initializer_zerop): Add argument.
13302 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
13304         PR middle-end/86660
13305         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
13306         declare target to variables if they have always,{to,from,tofrom} map
13307         kinds.
13309 2018-07-26  Martin Liska  <mliska@suse.cz>
13311         PR lto/86548
13312         * lto-wrapper.c: Add linker_output as prefix
13313         for ltrans_output_file.
13315 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
13317         PR rtl-optimization/85805
13318         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
13319         value for hard registers if that was written in the same mode.
13321 2018-07-26  Martin Liska  <mliska@suse.cz>
13323         PR gcov-profile/86536
13324         * gcov.c (format_gcov): Use printf format %.*f directly
13325         and do not handle special values.
13327 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13329         * common/config/arc/arc-common.c (arc_option_optimization_table):
13330         Update default optimizations for size.
13332 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13334         * config/arc/arc.md (movsf_insn): Add short instruction selection.
13335         * config/arc/constraints.md (CfZ): New constraint.
13336         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
13337         (subsf3_fpu): Likewise.
13338         (cmpsf_fpu): Likewise.
13339         (cmpsf_fpu_uneq): Likewise.
13341 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13343         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
13344         accesses as well.
13345         (arc_is_uncached_mem_p): uncached applies to both the variable and
13346         the pointer.
13348 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
13350         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
13351         register names.
13353 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
13355         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
13356         field "m_scopes" from vec to auto_vec.
13358 2018-07-25  Martin Liska  <mliska@suse.cz>
13360         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
13361         return type.
13363 2018-07-25  Richard Biener  <rguenther@suse.de>
13365         PR debug/86654
13366         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
13367         special wrt context_die late.
13368         (gen_subprogram_die): Re-use DIEs in local scope.
13370 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
13372         PR tree-optimization/86644
13373         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
13375 2018-07-25  Martin Liska  <mliska@suse.cz>
13377         PR middle-end/86645
13378         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
13379         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
13381 2018-07-25  Martin Liska  <mliska@suse.cz>
13383         PR sanitizer/79635
13384         * params.def: Explain ASan abbreviation and provide
13385         a documentation link.
13387 2018-07-24  Martin Sebor  <msebor@redhat.com>
13389         PR tree-optimization/86622
13390         PR tree-optimization/86532
13391         * builtins.h (string_length): Declare.
13392         * builtins.c (c_strlen): Correct handling of non-constant offsets.
13393         (check_access): Be prepared for non-constant length ranges.
13394         (string_length): Make extern.
13395         * expr.c (string_constant): Only handle the minor non-constant
13396         array index.  Use string_constant to compute the length of
13397         a generic string constant.
13399 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
13401         PR tree-optimization/86618
13402         * tree-vect-stmts.c (vectorizable_call): Don't take the address
13403         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
13405 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
13407         PR tree-optimization/86636
13408         * json.cc (json::object::set): Fix comment.  Add assertions.
13409         (json::array::append): Move here from json.h.  Add comment and an
13410         assertion.
13411         (json::string::string): Likewise.
13412         * json.h (json::array::append): Move to json.cc.
13413         (json::string::string): Likewise.
13414         * optinfo-emit-json.cc
13415         (optrecord_json_writer::impl_location_to_json): Assert that we
13416         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
13417         wrapper around it.  Expand the location once, rather than three
13418         times.
13419         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
13420         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
13421         wrappers.
13422         (optrecord_json_writer::optinfo_to_json): Likewise, in four
13423         places.  Fix some overlong lines.
13425 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
13427         * config/aarch64/aarch64-simd.md
13428         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
13429         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
13430         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
13431         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
13432         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
13433         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
13434         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
13435         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
13436         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
13438 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
13440         PR middle-end/86627
13441         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
13442         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
13443         and abs_d == d, do the power of two handling if profitable.
13445 2018-07-24  Richard Biener  <rguenther@suse.de>
13447         * match.pd: Add BIT_FIELD_REF canonicalizations.
13449 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13451         PR c/86617
13452         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
13454 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13456         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
13457         terminated STRING_CST object.
13459 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13461         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
13463 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
13465         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
13466         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
13467         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
13468         the elements into a register.
13469         (rs6000_split_v4si_init_di_reg): Delete.
13470         (rs6000_split_v4si_init): Delete.
13471         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
13472         (vsx_init_v4si): Rewrite as a define_expand.
13474 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
13476         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
13477         zero_extend argument from memory): New.
13479 2018-07-22  Martin Sebor  <msebor@redhat.com>
13481         PR bootstrap/86621
13482         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
13483         diagnosing calls with unknown arguments unless -Walloca-larger-than
13484         is restricted to less than PTRDIFF_MAX bytes.
13486 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
13488         * doc/gcov.texi (Invoking Gcov): Editorial changes.
13490 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
13492         * pretty-print.c (text_info::set_location): Remove redundant
13493         "line_table" parameter from call to rich_location::set_range.
13495 2018-07-20  Martin Sebor  <msebor@redhat.com>
13497         PR middle-end/82063
13498         * builtins.c (expand_builtin_alloca): Adjust.
13499         * calls.c (alloc_max_size): Simplify.
13500         * cgraphunit.c (cgraph_node::expand): Adjust.
13501         * common.opt (larger_than_size, warn_frame_larger_than): Remove
13502         variables.
13503         (frame_larger_than_size): Same.
13504         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
13505         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
13506         Initialize.
13507         * doc/invoke.texi (GCC Command Options): Document option arguments.
13508         Explain byte-size arguments and suffixes.
13509         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
13510         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
13511         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
13512         * doc/options.texi (UInteger): Expand.
13513         (Host_Wide_Int, ByteSize): Document new properties.
13514         * final.c (final_start_function_1): Include sizes in an error message.
13515         * function.c (frame_offset_overflow): Same.
13516         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
13517         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
13518         Diagnose unbounded alloca calls only for limits of less than
13519         PTRDIFF_MAX.
13520         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
13521         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
13522         for alloca(0).
13523         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
13524         only for limits of less than PTRDIFF_MAX.
13525         * langhooks-def.h (lhd_handle_option): Change function argument
13526         to HOST_WIDE_INT.
13527         * langhooks.c (lhd_handle_option): Same.
13528         * langhooks.h (handle_option): Same.
13529         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
13530         ByteSize flags.
13531         (var_type, var_type_struct): Same.
13532         (var_set): Handle ByteSize flag.
13533         * optc-gen.awk: Add comments to output to ease debugging.  Make
13534         use of HOST_WIDE_INT where appropriate.
13535         * opts-gen-save.awk:  Use %lx to format unsigned long.
13536         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
13537         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
13538         arguments.  Parse bytes-size suffixes.
13539         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
13540         (enum_value_to_arg): Same.
13541         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
13542         (handle_option): Adjust.
13543         (generate_option): Change function argument to HOST_WIDE_INT.
13544         (cmdline_handle_error): Adjust.
13545         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
13546         (set_option): Change function argument to HOST_WIDE_INT.
13547         (option_enabled): Handle cl_host_wide_int.
13548         (get_option_state): Handle CLVC_SIZE.
13549         (control_warning_option): Same.
13550         * opts.c (common_handle_option): Change function argument to
13551         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
13552         OPT_Wvla_larger_than_.
13553         * opts.h (enum cl_var_type): Add an enumerator.
13554         * stor-layout.c (layout_decl): Print a more meaningful warning.
13555         * toplev.c (output_stack_usage): Adjust.
13557 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
13559         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
13560         call to inline_expand_builtin_string_cmp.
13561         (expand_builtin_strcmp): Likewise.
13562         (expand_builtin_strncmp): Likewise.
13563         (inline_string_cmp): Delete the last parameter, change char_type_node
13564         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
13565         two operands.
13566         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
13567         the inlining expansion on target where the type of the call has same or
13568         narrower precision than unsigned char.
13570 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
13572         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
13573         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
13574         * common.opt (fsave-optimization-record): New option.
13575         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
13576         * doc/invoke.texi (-fsave-optimization-record): New option.
13577         * dumpfile.c: Include "optinfo-emit-json.h".
13578         (struct kv_pair): Move to coretypes.h.
13579         (optgroup_options): Make non-static.
13580         (dump_context::end_scope): Call
13581         optimization_records_maybe_pop_dump_scope.
13582         * dumpfile.h (optgroup_options): New decl.
13583         * json.cc: New file.
13584         * json.h: New file.
13585         * optinfo-emit-json.cc: New file.
13586         * optinfo-emit-json.h: New file.
13587         * optinfo.cc: Include "optinfo-emit-json.h".
13588         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
13589         (optinfo_enabled_p): Check optimization_records_enabled_p.
13590         (optinfo_wants_inlining_info_p): Likewise.
13591         * optinfo.h: Update comment.
13592         * profile-count.c (profile_quality_as_string): New function.
13593         * profile-count.h (profile_quality_as_string): New decl.
13594         (profile_count::quality): New accessor.
13595         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
13596         and optinfo_emit_json_cc_tests.
13597         * selftest.h (selftest::json_cc_tests): New decl.
13598         (selftest::optinfo_emit_json_cc_tests): New decl.
13599         * toplev.c: Include "optinfo-emit-json.h".
13600         (compile_file): Call optimization_records_finish.
13601         (do_compile): Call optimization_records_start.
13602         * tree-ssa-live.c: Include optinfo.h.
13603         (remove_unused_scope_block_p): Retain inlining information if
13604         optinfo_wants_inlining_info_p returns true.
13606 2018-07-20  Richard Biener  <rguenther@suse.de>
13608         PR debug/86585
13609         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
13610         to cover -flto-partition=none.
13612 2018-07-20  Martin Liska  <mliska@suse.cz>
13614         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
13615         (get_decl_source_range): Remove unused function.
13617 2018-07-20  Richard Biener  <rguenther@suse.de>
13619         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
13620         (struct vn_phi_s): Likewise.
13621         (struct vn_reference_s): Likewise.
13622         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
13623         for searching the slot of an entry known to be in the hash itself.
13624         (vn_phi_hasher::equal): Likewise.
13625         (vn_reference_hasher::equal): Likewise.
13626         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
13627         globals.
13628         (optimistic_info, current_info): Remove, keeping only valid_info.
13629         (vn_reference_lookup_1): Remove fallback lookup.
13630         (vn_reference_lookup_2): Likewise.
13631         (vn_nary_op_lookup_1): Likewise.
13632         (vn_phi_lookup): Likewise.
13633         (vn_nary_build_or_lookup_1): Make sure to not chain the built
13634         hash element.
13635         (vn_reference_insert): Adjust, chain the inserted hash element
13636         at last_inserted_ref.
13637         (vn_reference_insert_pieces): Likewise.
13638         (visit_reference_op_call): Likewise.
13639         (vn_nary_op_insert_into): Chain the inserted hash element at
13640         last_inserted_nary.
13641         (vn_nary_op_insert_pieces): Adjust.
13642         (vn_nary_op_insert): Likewise.
13643         (vn_nary_op_insert_stmt): Likewise.
13644         (vn_phi_insert): Adjust, chain the inserted hash element at
13645         last_inserted_phi.
13646         (process_scc): Remove clearing and copying the optimistic
13647         table.  Instead remove elements inserted during an optimistic
13648         iteration from the single table we maintain.
13649         (init_scc_vn): Adjust.
13650         (free_scc_vn): Likewise.
13651         (sccvn_dom_walker::record_cond): Likewise.
13652         (sccvn_dom_walker::after_dom_children): Likewise.
13654 2018-07-19  Martin Sebor  <msebor@redhat.com>
13656         PR tree-optimization/84047
13657         PR tree-optimization/83776
13658         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
13659         (check_array_bounds): Call it.
13661 2018-07-19  Martin Sebor  <msebor@redhat.com>
13663         * align.h (align_flags): Use member initialization.
13665 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
13667         * Makefile.in (OBJS): Add optinfo.o.
13668         * coretypes.h (class symtab_node): New forward decl.
13669         (struct cgraph_node): New forward decl.
13670         (class varpool_node): New forward decl.
13671         * dump-context.h: New file.
13672         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
13673         "tree-pass.h".
13674         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
13675         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
13676         (set_alt_dump_file): Likewise.
13677         (dump_context::~dump_context): New dtor.
13678         (dump_gimple_stmt): Move implementation to...
13679         (dump_context::dump_gimple_stmt): ...this new member function.
13680         Add the stmt to any pending optinfo, creating one if need be.
13681         (dump_gimple_stmt_loc): Move implementation to...
13682         (dump_context::dump_gimple_stmt_loc): ...this new member function.
13683         Start a new optinfo and add the stmt to it.
13684         (dump_gimple_expr): Move implementation to...
13685         (dump_context::dump_gimple_expr): ...this new member function.
13686         Add the stmt to any pending optinfo, creating one if need be.
13687         (dump_gimple_expr_loc): Move implementation to...
13688         (dump_context::dump_gimple_expr_loc): ...this new member function.
13689         Start a new optinfo and add the stmt to it.
13690         (dump_generic_expr): Move implementation to...
13691         (dump_context::dump_generic_expr): ...this new member function.
13692         Add the tree to any pending optinfo, creating one if need be.
13693         (dump_generic_expr_loc): Move implementation to...
13694         (dump_context::dump_generic_expr_loc): ...this new member
13695         function.  Add the tree to any pending optinfo, creating one if
13696         need be.
13697         (dump_printf): Move implementation to...
13698         (dump_context::dump_printf_va): ...this new member function.  Add
13699         the text to any pending optinfo, creating one if need be.
13700         (dump_printf_loc): Move implementation to...
13701         (dump_context::dump_printf_loc_va): ...this new member function.
13702         Start a new optinfo and add the stmt to it.
13703         (dump_dec): Move implementation to...
13704         (dump_context::dump_dec): ...this new member function.  Add the
13705         value to any pending optinfo, creating one if need be.
13706         (dump_context::dump_symtab_node): New member function.
13707         (dump_context::get_scope_depth): New member function.
13708         (dump_context::begin_scope): New member function.
13709         (dump_context::end_scope): New member function.
13710         (dump_context::ensure_pending_optinfo): New member function.
13711         (dump_context::begin_next_optinfo): New member function.
13712         (dump_context::end_any_optinfo): New member function.
13713         (dump_context::s_current): New global.
13714         (dump_context::s_default): New global.
13715         (dump_scope_depth): Delete global.
13716         (dumpfile_ensure_any_optinfo_are_flushed): New function.
13717         (dump_symtab_node): New function.
13718         (get_dump_scope_depth): Reimplement in terms of dump_context.
13719         (dump_begin_scope): Likewise.
13720         (dump_end_scope): Likewise.
13721         (selftest::temp_dump_context::temp_dump_context): New ctor.
13722         (selftest::temp_dump_context::~temp_dump_context): New dtor.
13723         (selftest::verify_item): New function.
13724         (ASSERT_IS_TEXT): New macro.
13725         (ASSERT_IS_TREE): New macro.
13726         (ASSERT_IS_GIMPLE): New macro.
13727         (selftest::test_capture_of_dump_calls): New test.
13728         (selftest::dumpfile_c_tests): Call it.
13729         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
13730         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
13731         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
13732         descriptive comment.
13733         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
13734         (dump_node, dump_bb): Move these unrelated decls.
13735         (class dump_manager): Add leading comment.
13736         * optinfo.cc: New file.
13737         * optinfo.h: New file.
13739 2018-07-19  Michael Collison  <michael.collison@arm.com>
13740             Richard Henderson <rth@redhat.com>
13742         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
13743         (subti): Handle op1 zero.
13744         (subvti4, usub4ti4): New.
13745         (*sub<GPI>3_compare1_imm): New.
13746         (sub<GPI>3_carryinCV): New.
13747         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
13748         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
13750 2018-07-19  Michael Collison  <michael.collison@arm.com>
13751             Richard Henderson <rth@redhat.com>
13753         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
13754         (addti3): Create simpler code if low part is already known to be 0.
13755         (addvti4, uaddvti4): New.
13756         (*add<GPI>3_compareC_cconly_imm): New.
13757         (*add<GPI>3_compareC_cconly): New.
13758         (*add<GPI>3_compareC_imm): New.
13759         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
13760         handle constants within this pattern..
13761         (*add<GPI>3_compareV_cconly_imm): New.
13762         (*add<GPI>3_compareV_cconly): New.
13763         (*add<GPI>3_compareV_imm): New.
13764         (add<GPI>3_compareV): New.
13765         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
13766         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
13767         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
13768         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
13769         with 'comparison' operator.
13770         (*add<GPI>3_compareV_cconly_imm): Ditto.
13771         (*add<GPI>3_compareV_cconly): Ditto.
13772         (*add<GPI>3_compareV_imm): Ditto.
13773         (add<GPI>3_compareV): Ditto.
13774         (add<mode>3_carryinC): Ditto.
13775         (*add<mode>3_carryinC_zero): Ditto.
13776         (*add<mode>3_carryinC): Ditto.
13777         (add<mode>3_carryinV): Ditto.
13778         (*add<mode>3_carryinV_zero): Ditto.
13779         (*add<mode>3_carryinV): Ditto.
13781 2018-07-19  Michael Collison  <michael.collison@arm.com>
13782             Richard Henderson <rth@redhat.com>
13784         * config/aarch64/aarch64-modes.def (CC_V): New.
13785         * config/aarch64/aarch64-protos.h
13786         (aarch64_addti_scratch_regs): Declare
13787         (aarch64_subvti_scratch_regs): Declare.
13788         (aarch64_expand_subvti): Declare.
13789         (aarch64_gen_unlikely_cbranch): Declare
13790         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13791         for signed overflow using CC_Vmode.
13792         (aarch64_get_condition_code_1): Handle CC_Vmode.
13793         (aarch64_gen_unlikely_cbranch): New function.
13794         (aarch64_addti_scratch_regs): New function.
13795         (aarch64_subvti_scratch_regs): New function.
13796         (aarch64_expand_subvti): New function.
13798 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13800         * config/aarch64/aarch64-option-extensions.def: New entry for profile
13801         extension.
13802         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13803         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13804         extension.
13806 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13808         PR target/83009
13809         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13810         address check not strict.
13812 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13814         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13815         Umq with Umn.
13816         (store_pair_lanes<mode>): Likewise.
13817         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13818         enum value 'ADDR_QUERY_LDP_STP_N'.
13819         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13820         (aarch64_print_address_internal): Add declaration.
13821         (aarch64_print_ldpstp_address): Remove.
13822         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13823         (aarch64_print_operand): Change printing of 'y'.
13824         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13825         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13826         'true' rather than '1'.
13827         * config/aarch64/constraints.md (Uml): Likewise.
13828         (Uml): Rename to Umn.
13829         (Umq): Remove.
13831 2018-07-19  Richard Biener  <rguenther@suse.de>
13833         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13834         a trailing array.
13835         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13836         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13837         (vn_reference_hasher): Likewise.
13838         (struct vn_tables_s): Remove obstack and alloc-pool members.
13839         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13840         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13841         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13842         (vn_reference_insert_pieces): Likewise.
13843         (alloc_vn_nary_op_noinit): Adjust.
13844         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13845         (vn_phi_eq): Adjust.
13846         (shared_lookup_phiargs): Remove.
13847         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13848         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13849         (visit_reference_op_call): Likewise.
13850         (copy_nary, copy_phi, copy_reference): Remove.
13851         (process_scc): Rewind the obstack when iterating.  Do not
13852         copy the elements to valid_info but just move them from one
13853         hashtable to the other.
13854         (allocate_vn_table): Adjust.
13855         (free_vn_table): Likewise.
13856         (init_scc_vn): Likewise.
13857         (free_scc_vn): Likewise.
13859 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
13861         PR target/86560
13862         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13863         indirect_return as function type attribute.
13864         (ix86_attribute_table): Change indirect_return to function
13865         type attribute.
13866         * doc/extend.texi: Update indirect_return attribute.
13868 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
13870         * wide-int.h (widest2_int): New.
13871         * gimple-fold.c (arith_overflowed_p): Use it.
13872         * tree.h (widest2_int_cst): New.
13873         * tree-vrp.c (wide_int_binop_overflow): Rename from
13874         vrp_int_const_binop.
13875         Rewrite to work on trees.
13876         (extract_range_from_multiplicative_op_1): Abstract code to...
13877         (wide_int_range_min_max): ...here.
13878         (wide_int_range_cross_product): ...and here.
13879         (extract_range_from_binary_expr_1): Abstract overflow code to...
13880         (wide_int_range_mult_wrapping): ...here.
13881         * tree-vrp.h (wide_int_range_cross_product): New.
13882         (wide_int_range_mult_wrapping): New.
13884 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
13885             Julia Koval  <julia.koval@intel.com>
13887         * config/i386/x86-tune-costs.h (skylake_memcpy,
13888         skylake_memset): Replace rep_prefix with unrolling for size 512.
13890 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
13892         PR middle-end/86544
13893         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
13894         comparision with EQ_EXPR in last stmt.
13896 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13898         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
13899         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
13900         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
13901         previously known as "PowerPC AltiVec Built-in Functions".  Move
13902         some material to new subsubsections "PowerPC AltiVec Built-in
13903         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
13904         ISA 2.07".
13905         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
13906         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
13907         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
13908         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
13910 2018-07-18  Richard Biener  <rguenther@suse.de>
13912         PR tree-optimization/86557
13913         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
13914         EXACT_DIV_EXPR.
13916 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
13918         * config/s390/s390.c (s390_function_profiler): Generate CFI.
13920 2018-07-17  Jeff Law  <law@redhat.com>
13922         * config/arm/arm.c (get_label_padding): Update for recent
13923         changes to label_to_alignment.
13925         PR tree-optimization/86010
13926         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
13928         * config/mips/mips.c (vr4130_align_insns): Update for recent
13929         changes to label_to_alignment.
13931         * config/frv/frv.c (frv_label_align): Update for recent changes
13932         to label_to_alignment.
13934         * config/nios2/nios2.c (nios2_label_align): Update for recent
13935         changes which dropped ALIGN_LABELS_LOG.
13937 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
13939         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
13940         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
13942 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
13944         * config/arc/arc.c (arc_label_align): Use align_labels instead of
13945         deprecated align_labels_log.
13947 2018-07-17  Richard Biener  <rguenther@suse.de>
13949         PR lto/86456
13950         * dwarf2out.c (init_sections_and_labels): Always generate
13951         a debug_line_str_section for early LTO debug.
13952         (dwarf2out_finish): Reset debug_line_str_hash output early.
13953         Bump counter for extra dwarf5 .debug_loc labels to not conflict
13954         with fat LTO part.
13955         (dwarf2out_early_finish): Output debug_line_str.
13957 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
13959         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
13960         index register on z196 or later.
13962 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
13964         * config/s390/s390.c (s390_default_align): Set default function
13965         alignment to 16.
13966         (s390_override_options_after_change): Call s390_default align.
13967         (s390_option_override_internal): Call s390_default_align.
13968         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
13970 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
13972         PR middle-end/86542
13973         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
13974         to _looptemp_ clauses, other than the first two.
13976 2018-07-17  Martin Liska  <mliska@suse.cz>
13978         * opts.c: Do not enable OPT_falign_* for -Os.
13980 2018-07-17  Martin Liska  <mliska@suse.cz>
13982         * align.h (MAX_CODE_ALIGN): New.
13983         (MAX_CODE_ALIGN_VALUE): New.
13984         * common/config/i386/i386-common.c (ix86_handle_option):
13985         (MAX_CODE_ALIGN): Moved to align.h.
13986         * final.c (MAX_CODE_ALIGN): Likewise.
13987         * opts.c (parse_and_check_align_values):
13988         (MAX_CODE_ALIGN): Likewise.
13989         (MAX_CODE_ALIGN_VALUE): Likewise.
13991 2018-07-17  Martin Liska  <mliska@suse.cz>
13993         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
13994         in order to fulfil coding style.
13995         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
13996         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13997         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13998         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
13999         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14000         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14001         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14002         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14003         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14005 2018-07-17  Martin Liska  <mliska@suse.cz>
14007         * align.h: New file.
14008         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14009         directly.
14010         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14011         align_flags of label_to_alignment.
14012         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14013         align_flags class.
14014         * config/m68k/m68k.c: Do not use removed align_labels_value and
14015         align_loops_value.
14016         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14017         (LOOP_ALIGN): Likewise.
14018         (LABEL_ALIGN): Likewise.
14019         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14020         Remove not used macro.
14021         (rs6000_loop_align): Change return type to align_flags.
14022         (rs6000_loop_align_max_skip): Remove.
14023         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14024         Change return type to align_flags.
14025         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14026         Remove not used macro.
14027         (rs6000_loop_align):  Change return type to align_flags.
14028         (rs6000_loop_align_max_skip): Remove.
14029         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14030         * config/rx/rx-protos.h (rx_align_for_label): Make it
14031         static function.
14032         * config/rx/rx.c (rx_align_for_label): Change return type
14033         to align_flags.
14034         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14035         macro definitions.
14036         into align_flags class.
14037         (LABEL_ALIGN): Likewise.
14038         (LOOP_ALIGN): Likewise.
14039         * config/s390/s390.c (s390_label_align): Use align_flags
14040         class member.
14041         (s390_asm_output_function_label): Likewise.
14042         * config/sh/sh.c (sh_override_options_after_change):
14043         Use align_flags class directly without macros.
14044         (find_barrier): Likewise.
14045         (barrier_align): Likewise.
14046         (sh_loop_align): Likewise.
14047         * config/spu/spu.c (spu_option_override):
14048         Use align_flags_tuple::get_value instead of removed macros.
14049         (spu_sched_init): Likewise.
14050         * config/spu/spu.h (GTY): Likewise.
14051         * config/visium/visium.c (visium_option_override):
14052         Set "8" as default secondary alignment.
14053         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14054         in order to guarantee secondary alignment of 8.
14055         * coretypes.h: Include align.h header file.
14056         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14057         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14058         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14059         * doc/tm.texi.in: Likewise.
14060         * final.c (struct label_alignment): Remove not used structure.
14061         (LABEL_ALIGN): Change type to align_flags.
14062         (LOOP_ALIGN): Likewise.
14063         (JUMP_ALIGN): Likewise.
14064         (default_loop_align_max_skip): Remove.
14065         (default_label_align_max_skip): Likewise.
14066         (default_jump_align_max_skip): Likewise.
14067         (default_label_align_after_barrier_max_skip):
14068         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14069         (LABEL_TO_MAX_SKIP): Remove.
14070         (label_to_alignment): Return align_flags type instead of integer.
14071         (label_to_max_skip): Remove.
14072         (align_fuzz): Use align_flags type.
14073         (compute_alignments): Use align_flags type and use align_flags::max
14074         to combine multiple alignments.
14075         (grow_label_align): Grow vec instead of C array.
14076         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14077         (shorten_branches):  Use align_flags type and use align_flags::max
14078         to combine multiple alignments.
14079         (final_scan_insn_1): Remove usage of secondary alignment that comes
14080         from label alignment, but instead use proper secondary alignment
14081         which is computed in grow_label_align.
14082         * flags.h (struct align_flags_tuple): Move to align.h.
14083         (struct align_flags): Likewise.
14084         (state_align_loops): Rename to align_loops.
14085         (state_align_jumps): Rename to align_jumps.
14086         (state_align_labels): Rename to align_labels.
14087         (state_align_functions): Rename to align_functions.
14088         (align_loops_log): Remove.
14089         (align_jumps_log): Remove.
14090         (align_labels_log): Remove.
14091         (align_functions_log): Remove.
14092         (align_loops_max_skip): Remove.
14093         (align_jumps_max_skip): Remove.
14094         (align_labels_max_skip): Remove.
14095         (align_functions_max_skip): Remove.
14096         (align_loops_value): Remove.
14097         (align_jumps_value): Remove.
14098         (align_labels_value): Remove.
14099         (align_functions_value): Remove.
14100         * output.h (label_to_alignment): Change return type to align_flags.
14101         (label_to_max_skip): Remove.
14102         * target.def: Remove loop_align_max_skip, label_align_max_skip,
14103         jump_align_max_skip macros.
14104         * targhooks.h (default_loop_align_max_skip): Remove.
14105         (default_label_align_max_skip): Likewise.
14106         (default_jump_align_max_skip): Likewise.
14107         (default_label_align_after_barrier_max_skip): Remove.
14108         * toplev.c (read_log_maxskip): Use ::normalize function.
14109         (parse_N_M): Remove not used argument and also call ::normalize.
14110         (parse_alignment_opts): Do not pass unused arguments.
14111         * varasm.c (assemble_start_function): Use directly align_functions
14112         instead of removed macros.
14113         * system.h: Do not poison removed macros.
14115 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
14117         PR middle-end/86539
14118         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14119         and cond temporaries don't have reference type if iterator has
14120         pointer type.  For init use &for_pre_body instead of pre_p if
14121         for_pre_body is non-empty.
14123 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14125         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14126         double-double modes to SFmode directly directly.
14127         (trunc<mode>sf2_fprs): Delete.
14129 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14131         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14132         for conversions between IFmode and the decimal floating point modes.
14133         (init_float128_ieee): Use the correct names for conversions between
14134         KFmode and the decimal floating point modes.
14136 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
14138         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14139         for the conversions between TDmode and IFmode.
14140         (init_float128_ieee): Use more correct names for the conversions
14141         between TDmode and KFmode.
14143 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
14145         PR tree-optimization/86526
14146         * builtins.c (expand_builtin_memcmp): Formatting fixes.
14147         (inline_expand_builtin_string_cmp): Likewise.
14148         (inline_string_cmp): Likewise.  Use c_readstr instead of
14149         builtin_memcpy_read_str.  Add unit_mode temporary.
14151 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14153         PR middle-end/86528
14154         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14155         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14157 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14159         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14160         Alphabetize prototypes of built-in functions, separating out
14161         built-in functions that are listed in this section but should be
14162         described elsewhere.
14164 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
14166         PR target/86511
14167         * expmed.c (emit_store_flag): Do not emit setcc followed by a
14168         conditional move when trapping comparison was split to a
14169         non-trapping one (and vice versa).
14171 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14173         * config/s390/s390.c (s390_function_profiler): Generate nops
14174         instead of profiler call sequences.
14175         * config/s390/s390.opt: Add the new option.
14177 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14179         * config/s390/s390.c (s390_function_profiler): Generate
14180         __mcount_loc section.
14181         * config/s390/s390.opt: Add the new option.
14183 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
14185         * common.opt: Add the new warning.
14186         * config/s390/s390.c (s390_function_profiler): Emit "brasl
14187         %r0,__fentry__" when -mfentry is specified.
14188         (s390_option_override_internal): Disallow -mfentry for 31-bit
14189         CPUs.
14190         * config/s390/s390.opt: Add the new option.
14192 2018-07-16  Richard Biener  <rguenther@suse.de>
14194         PR lto/86523
14195         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14196         for function-local FUNCTION_DECL and RESULT_DECL immediately.
14198 2018-07-16  Martin Liska  <mliska@suse.cz>
14200         PR ipa/86529
14201         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14202         to ::get_create.
14204 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14206         * config/arc/arcHS.md: Update ARCHS scheduling rules.
14208 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
14210         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
14211         for ARCHS4x.
14212         * config/arc/arc-cpus.def (hs4x): New cpu.
14213         (hs4xd): Likewise.
14214         * config/arc/arc-tables.opt: Regenerate.
14215         * config/arc/arc.c (arc_sched_issue_rate): New function.
14216         (TARGET_SCHED_ISSUE_RATE): Define.
14217         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
14218         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
14219         fpu_cvt.
14220         (attr tune): Add ARCHS4x tune values.
14221         (attr tune_dspmpy): Define.
14222         (*tst): Correct instruction type.
14223         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
14224         * config/arc/arcHS4x.md: New file.
14225         * config/arc/fpu.md: Update instruction type attributes.
14226         * config/arc/t-multilib: Regenerate.
14228 2018-07-16  Tom de Vries  <tdevries@suse.de>
14230         PR debug/86455
14231         * var-tracking.c (vt_initialize): Fix pre_dec handling.
14233 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
14235         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
14236         early clobber.
14238 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
14240         PR tree-optimization/86514
14241         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
14242         conversion to a boolean type from a type with greater precision.
14244 2018-07-16  Tom de Vries  <tdevries@suse.de>
14246         * var-tracking.c (vt_initialize): Print adjusted insn slim if
14247         dump_flags request TDF_SLIM.
14249 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
14251         * fold-const.c (int_const_binop_1): Abstract...
14252         (wide_int_binop): ...wide int code here.
14253         (poly_int_binop): ...poly int code here.
14254         Abstract the rest of int_const_binop_1 into int_const_binop.
14255         * fold-const.h (wide_int_binop): New.
14256         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
14257         Remove useless PLUS/MINUS_EXPR case.
14258         (zero_nonzero_bits_from_vr): Move wide int code...
14259         (zero_nonzero_bits_from_bounds): ...here.
14260         (extract_range_from_binary_expr_1): Move mask optimization code...
14261         (range_easy_mask_min_max): ...here.
14262         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
14263         (range_easy_mask_min_max): New.
14265 2018-07-15  Jeff Law  <law@redhat.com>
14267         PR target/85993
14268         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
14269         block.
14271 2018-07-14  Jim Wilson  <jimw@sifive.com>
14273         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
14275 2018-07-14  Paul Koning  <ni1d@arrl.net>
14277         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
14279 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
14281         * lto-streamer-out.c (copy_function_or_variable): Dump info about
14282         copying section.
14284 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
14285             Steve Munroe  <munroesj52@gmail.com>
14287         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
14288         (_mm_andnot_si128): Likewise.
14289         (_mm_or_si128): Likewise.
14290         (_mm_xor_si128): Likewise.
14292 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
14294         PR middle-end/78809
14295         * builtins.c (expand_builtin_memcmp): Inline the calls first
14296         when result_eq is false.
14297         (expand_builtin_strcmp): Inline the calls first.
14298         (expand_builtin_strncmp): Likewise.
14299         (inline_string_cmp): New routine. Expand a string compare
14300         call by using a sequence of char comparison.
14301         (inline_expand_builtin_string_cmp): New routine. Inline expansion
14302         a call to str(n)cmp/memcmp.
14303         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
14304         New option.
14305         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
14307 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
14309         * config/arm/driver-arm.c: Include arm-native.h.
14310         (host_detect_local_cpu): Use auto-generated data tables.
14311         (vendors, arm_cpu_table): Delete.  Move part information to ...
14312         * config/arm/arm-cpus.in: ... here.
14313         * config/arm/parsecpu.awk (gen_native): New function.
14314         (vendor, part): New CPU fields.
14315         (END): Add support for building the native CPU detection tables.
14316         * config/arm/t-arm (arm-native.h): Add build rule.
14317         (driver-arm.o): Add dependency on arm-native.h.
14319 2018-07-13  Richard Biener  <rguenther@suse.de>
14321         PR middle-end/85974
14322         * match.pd (addr1 - addr2): Allow either of the operand to
14323         have a conversion.
14325 2018-07-13  Tom de Vries  <tdevries@suse.de>
14327         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
14328         in remap_ssa_name.
14330 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
14332         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
14333         arrays instead of numbered variables.
14335 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
14337         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
14338         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
14340 2018-07-13  Richard Biener  <rguenther@suse.de>
14342         PR debug/86452
14343         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
14344         instead of get_context_die.
14346 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
14347             Richard Biener  <rguenther@suse.de>
14349         PR middle-end/86489
14350         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
14351         that the loop latch destination where phi is defined.
14353 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
14355         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
14356         (riscv_expand_epilogue): Add assertion to check interrupt mode.
14357         (riscv_set_current_function): Extract getting interrupt type to new
14358         function.
14359         (riscv_get_interrupt_type): New function.
14360         (riscv_merge_decl_attributes): New function, checking interrupt type is
14361         same.
14362         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
14364 2018-07-12  Paul Koning  <ni1d@arrl.net>
14366         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
14367         directive.
14369 2018-07-12  Paul Koning  <ni1d@arrl.net>
14371         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
14372         zero reference, add doloop_end instead.
14373         * doc/md.texi (decrement_and_branch_until_zero): Remove.
14374         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
14375         detail for doloop_end.
14377 2018-07-12  Martin Sebor  <msebor@redhat.com>
14379         PR c/86453
14380         * attribs.c (decl_attributes): Reject conflicting attributes before
14381         calling attribute handlers.
14383 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
14385         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
14386          parameter.
14387         (gcc::dump_manager::get_dump_file_name): likewise.
14388         (dump_begin): Likewise.
14389         * dumpfile.h (dump_begin): Update prototype.
14390         (gcc::dump_manager::get_dump_file_name,
14391         gcc::dump_manager::get_dump_file_name): Update prototype.
14393 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14395         * internal-fn.h (vectorizable_internal_fn_p): New function.
14396         * tree-vect-slp.c (compatible_calls_p): Likewise.
14397         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
14398         to internal functions.
14399         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
14401 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14403         * fold-const.h (inverse_conditions_p): Declare.
14404         * fold-const.c (inverse_conditions_p): New function.
14405         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
14406         that test the inverse condition of a conditional internal function.
14407         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
14408         * internal-fn.c (internal_fn_mask_index): Handle conditional
14409         internal functions.
14410         (vectorized_internal_fn_supported_p): New function.
14411         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
14412         (any_pred_load_store): Replace with...
14413         (need_to_predicate): ...this new variable.
14414         (redundant_ssa_names): New variable.
14415         (ifcvt_can_use_mask_load_store): Move initial checks to...
14416         (ifcvt_can_predicate): ...this new function.  Handle tree codes
14417         for which a conditional internal function exists.
14418         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
14419         instead of ifcvt_can_use_mask_load_store.  Update after variable
14420         name change.
14421         (predicate_load_or_store): New function, split out from
14422         predicate_mem_writes.
14423         (check_redundant_cond_expr): New function.
14424         (value_available_p): Likewise.
14425         (predicate_rhs_code): Likewise.
14426         (predicate_mem_writes): Rename to...
14427         (predicate_statements): ...this.  Use predicate_load_or_store
14428         and predicate_rhs_code.
14429         (combine_blocks, tree_if_conversion): Update after above name changes.
14430         (ifcvt_local_dce): Handle redundant_ssa_names.
14431         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
14432         general conditional functions.
14433         * tree-vect-stmts.c (vectorizable_call): Likewise.
14435 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14436             Alan Hayward  <alan.hayward@arm.com>
14437             David Sherwood  <david.sherwood@arm.com>
14439         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
14440         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
14441         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
14442         plus and minus and convert them into IFN_COND_FMA-based sequences.
14443         (convert_mult_to_fma): Handle conditional plus and minus.
14445 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14447         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
14448         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
14449         (cond_fnms_optab): New optabs.
14450         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
14451         internal functions.
14452         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
14453         * internal-fn.h (get_conditional_internal_fn): Declare.
14454         (get_unconditional_internal_fn): Likewise.
14455         * internal-fn.c (cond_ternary_direct): New macro.
14456         (expand_cond_ternary_optab_fn): Likewise.
14457         (direct_cond_ternary_optab_supported_p): Likewise.
14458         (FOR_EACH_COND_FN_PAIR): Likewise.
14459         (get_conditional_internal_fn): New function.
14460         (get_unconditional_internal_fn): Likewise.
14461         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
14462         (gimple_match_op::gimple_match_op): Add a new overload for 5
14463         operands.
14464         (gimple_match_op::set_op): Likewise.
14465         (gimple_resimplify5): Declare.
14466         * genmatch.c (decision_tree::gen): Generate simplifications for
14467         5 operands.
14468         * gimple-match-head.c (gimple_simplify): Define an overload for
14469         5 operands.  Handle calls with 5 arguments in the top-level overload.
14470         (convert_conditional_op): Handle conversions from unconditional
14471         internal functions to conditional ones.
14472         (gimple_resimplify5): New function.
14473         (build_call_internal): Pass a fifth operand.
14474         (maybe_push_res_to_seq): Likewise.
14475         (try_conditional_simplification): Try converting conditional
14476         internal functions to unconditional internal functions.
14477         Handle 3-operand unconditional forms.
14478         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
14479         Define ternary equivalents of the current rules for binary conditional
14480         internal functions.
14481         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
14482         ternary operations.
14483         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
14484         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
14485         (optab): Handle them.
14486         (SVE_COND_FP_TERNARY): New int iterator.
14487         (sve_fmla_op, sve_fmad_op): New int attributes.
14488         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
14489         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
14490         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
14492 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
14494         * target.def (preferred_else_value): New target hook.
14495         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
14496         * doc/tm.texi: Regenerate.
14497         * targhooks.h (default_preferred_else_value): Declare.
14498         * targhooks.c (default_preferred_else_value): New function.
14499         * internal-fn.h (conditional_internal_fn_code): Declare.
14500         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
14501         (get_conditional_internal_fn): Use it.
14502         (conditional_internal_fn_code): New function.
14503         * gimple-match.h (gimple_match_cond): New struct.
14504         (gimple_match_op): Add a cond member function.
14505         (gimple_match_op::gimple_match_op): Update all forms to take a
14506         gimple_match_cond.
14507         * genmatch.c (expr::gen_transform): Use the same condition as res_op
14508         for the suboperation, but don't specify a particular else_value.
14509         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
14510         (visit_nary_op, visit_reference_op_load): Pass
14511         gimple_match_cond::UNCOND to the gimple_match_op constructor.
14512         * gimple-match-head.c: Include tree-eh.h
14513         (convert_conditional_op): New function.
14514         (maybe_resimplify_conditional_op): Likewise.
14515         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
14516         (gimple_resimplify2): Likewise.
14517         (gimple_resimplify3): Likewise.
14518         (gimple_resimplify4): Likewise.
14519         (maybe_push_res_to_seq): Return null for conditional operations.
14520         (try_conditional_simplification): New function.
14521         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
14522         constructor.
14523         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
14524         IFN_COND_* call.
14525         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
14526         function.
14527         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
14529 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
14531         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14532         DECL_FCONTEXT
14533         (hash_tree): Do not hash DECL_FCONTEXT
14534         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
14535         Do not stream DECL_FCONTEXT.
14536         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
14537         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
14539 2018-07-12  Richard Biener  <rguenther@suse.de>
14541         PR debug/86462
14542         * dwarf2out.c (gen_block_die): Only output blocks when they have
14543         at least one !DECL_IGNORED_P variable.
14545 2018-07-12  Richard Biener  <rguenther@suse.de>
14547         PR target/84829
14548         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
14549         Remove -mieee-fp handling.
14551 2018-07-12  Richard Biener  <rguenther@suse.de>
14553         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
14554         left-over from last patch.
14556 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
14558         PR tree-optimization/86492
14559         * gimple-ssa-store-merging.c
14560         (imm_store_chain_info::coalesce_immediate_stores): Call
14561         check_no_overlap even for the merge_overlapping case.  Formatting fix.
14563 2018-07-12  Richard Biener  <rguenther@suse.de>
14565         PR middle-end/86479
14566         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
14567         move possibly trapping operations into the conditional.
14569 2018-07-12  Richard Biener  <rguenther@suse.de>
14571         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
14572         (vn_lookup_simplify_result): Remove recursion limit applied
14573         here.
14574         (vn_nary_build_or_lookup_1): Adjust.
14575         (try_to_simplify): Likewise.
14576         * gimple-match-head.c (gimple_resimplify1): Instead apply one
14577         here.
14578         (gimple_resimplify2): Likewise.
14579         (gimple_resimplify3): Likewise.
14580         (gimple_resimplify4): Likewise.
14582 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
14584         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
14585         Use __mmask64 type instead of __mmask8 for __M argument.
14586         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
14587         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
14588         __U argument.
14589         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
14590         __mmask16 for __M argument.
14591         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
14592         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
14593         to __mmask16 instead of __mmask8.
14594         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
14595         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
14596         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
14597         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
14598         instead of __mmask16 for __U argument.
14599         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
14600         __mmask16 instead of __mmask8 for __U argument.
14601         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
14602         __U argument.
14603         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
14604         __mmask16.
14605         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
14606         argument.
14607         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
14608         __U argument.
14609         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
14610         __mmask16.
14611         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
14612         of __mmask16.
14613         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
14614         __U argument.
14615         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
14616         __U argument.
14617         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
14618         __U argument.
14619         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
14620         __U argument.
14621         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
14622         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
14623         return type as well as __M argument type and all casts from __mmask8
14624         to __mmask32.
14625         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
14626         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
14627         return type as well as __M argument type and all casts from __mmask8
14628         to __mmask16.
14629         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
14630         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
14631         return type as well as __M argument type and all casts from __mmask8
14632         to __mmask32.
14633         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
14634         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
14635         return type as well as __M argument type and all casts from __mmask8
14636         to __mmask16.
14637         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
14638         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
14639         __mmask16.
14641 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
14643         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
14644         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
14645         for __U argument.
14647 2018-07-11  Paul Koning  <ni1d@arrl.net>
14649         * doc/md.texi (define_subst): Document how multiple occurrences of
14650         the same argument in the replacement pattern are handled.
14652 2018-07-11  Paul Koning  <ni1d@arrl.net>
14654         * doc/extend.texi (Common Variable Attributes): Move "mode" into
14655         alphabetical order.
14656         (Common Type Attributes): Add "mode" attribute.
14658 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
14660         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
14661         stream DECL_ORIGINAL_TYPE.
14662         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
14663         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
14664         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
14665         Do not walk original type.
14666         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
14667         external decls.
14668         (write_ts_decl_non_common_tree_pointers): Do not stream
14669         DECL_ORIGINAL_TYPE
14670         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
14671         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
14673 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
14675         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
14676         thread twice from the same starting edge.
14678 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
14680         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
14681         * gimple.c (gimple_call_nonnull_result_p): ...here...
14682         (gimple_call_nonnull_arg): ...and here.
14683         * gimple.h (gimple_call_nonnull_result_p): New.
14684         (gimple_call_nonnull_arg): New.
14686 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
14688         * config/arm/arm-cpus.in: Move information from fpu field of each
14689         cpu definition to the isa field.
14690         * config/arm/parsecpu.awk (fpu): Delete match rule.
14691         (gen_comm_data): Don't add bits from the CPU's FPU entry.
14693 2018-07-11  Richard Biener  <rguenther@suse.de>
14695         PR debug/86457
14696         * dwarf2out.c (init_sections_and_labels): Use
14697         output_asm_line_debug_info consistently.
14698         (dwarf2out_early_finish): Likewise.
14699         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
14700         type units.
14702 2018-07-11  Richard Biener  <rguenther@suse.de>
14704         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
14705         Rework father_bb setting in a way to avoid propagating constants
14706         multiple times on a loop body.
14708 2018-07-10  Mark Wielaard  <mark@klomp.org>
14710         PR debug/86459
14711         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
14713 2018-07-10  Richard Biener  <rguenther@suse.de>
14715         * hash-map.h (hash_map::iterator::operator*): Return
14716         references to key and value.
14718 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
14720         PR c++/86443
14721         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
14722         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
14723         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
14724         (gimplify_omp_for): For composite loops, move outer
14725         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14726         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
14727         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
14728         TREE_LIST for both the original class iterator and the "last" helper
14729         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
14730         loop, remember has_decl_expr from outer composite loops for the
14731         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
14733 2018-07-09  Martin Sebor  <msebor@redhat.com>
14735         PR middle-end/77357
14736         PR middle-end/86428
14737         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
14738         accessing implicitly initialized array elements.
14739         * expr.c (string_constant): Handle string initializers of
14740         character arrays within aggregates.
14741         * gimple-fold.c (fold_array_ctor_reference): Add argument.
14742         Store element offset.  As a special case, handle zero size.
14743         (fold_nonarray_ctor_reference): Same.
14744         (fold_ctor_reference): Add argument.  Store subobject offset.
14745         * gimple-fold.h (fold_ctor_reference): Add argument.
14747 2018-07-09  Paul Koning  <ni1d@arrl.net>
14749         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
14750         (pdp11_insn_cost): New function.
14751         (pdp11_md_asm_adjust): New function.
14752         (TARGET_INVALID_WITHIN_DOLOOP): Define.
14753         (pdp11_rtx_costs): Update to match machine better.
14754         (output_addr_const_pdp11): Correct format mismatch warnings.
14755         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
14756         * config/pdp11/pdp11.md: General change to add base_cost and/or
14757         length attributes for use by new pdp11_insn_cost function.
14758         (MIN_BRANCH): Correct definition.
14759         (MIN_SOB): Ditto.
14760         (doloop_end): Use standard pattern name for looping pattern.
14761         (doloop_end_nocc): New.
14762         (movsf): Add another constraint alternative.
14763         (zero_extendqihi2): Add constraint alternatives for not in place
14764         extend.
14765         (zero_extendhisi2): Remove.
14766         (shift patterns): Add CC handling variants.
14767         (bswaphi2): New.
14768         (bswapsi2): New.
14769         (rothi3): New.
14770         (define_peephole2): New peephole to recognize mov that sets CC for
14771         subsequent test.
14773 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14775         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
14776         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
14777         wi::add.
14779 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
14781         PR c/86420
14782         * real.c (real_nextafter): Return true if result is denormal.
14784 2018-07-09  Martin Liska  <mliska@suse.cz>
14786         * common.opt: Add back wrongly removed attribute.
14788 2018-07-09  Richard Biener  <rguenther@suse.de>
14790         PR debug/86413
14791         * dwarf2out.c (gen_block_die): For an early generated DIE
14792         always output high/low PC attributes.
14794 2018-07-09  Tom de Vries  <tdevries@suse.de>
14796         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14797         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14798         onto VAR_DECL with abstract origin.
14800 2018-07-07  Jim Wilson  <jimw@sifive.com>
14802         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14804 2018-07-07  Tom de Vries  <tdevries@suse.de>
14806         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14808 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
14810         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14811         overflow_type.
14812         (combine_bound): Use wide-int overflow calculation instead of
14813         rolling our own.
14814         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14815         overflow_type.
14816         * fold-const.c (int_const_binop_2): Same.
14817         (extract_muldiv_1): Same.
14818         (fold_div_compare): Same.
14819         (fold_abs_const): Same.
14820         * match.pd: Same.
14821         * poly-int.h (add): Same.
14822         (sub): Same.
14823         (neg): Same.
14824         (mul): Same.
14825         * predict.c (predict_iv_comparison): Same.
14826         * profile-count.c (slow_safe_scale_64bit): Same.
14827         * simplify-rtx.c (simplify_const_binary_operation): Same.
14828         * tree-chrec.c (tree_fold_binomial): Same.
14829         * tree-data-ref.c (split_constant_offset_1): Same.
14830         * tree-if-conv.c (idx_within_array_bound): Same.
14831         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14832         * tree-ssa-phiopt.c (minmax_replacement): Same.
14833         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14834         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14835         * vr-values.c (vr_values::adjust_range_with_scev): Same.
14836         * wide-int.cc (wi::add_large): Same.
14837         (wi::mul_internal): Same.
14838         (wi::sub_large): Same.
14839         (wi::divmod_internal): Same.
14840         * wide-int.h: Change overflow type to overflow_type for neg, add,
14841         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14842         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14843         mul_internal, divmod_internal.
14844         (overflow_type): New enum.
14845         (accumulate_overflow): New.
14847 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
14849         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14850         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14852 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
14854         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14855         argument is checked for zero before entering loop, avoid checking again.
14857 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
14859         * gimplify.h (generic_expr_could_trap_p): Set as global function.
14860         * gimplify.h (generic_expr_could_trap_p): Likwise.
14861         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14863 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
14865         PR tree-optimization/86401
14866         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14867         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14868         (fold_bit_and_mask): ... here.  New helper function for match.pd.
14869         * fold-const.h (fold_bit_and_mask): Declare.
14870         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14872 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
14874         PR target/86324
14875         * target.def (translate_mode_attribute): New hook.
14876         * targhooks.h (default_translate_mode_attribute): Declare.
14877         * targhooks.c (default_translate_mode_attribute): New function.
14878         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
14879         * doc/tm.texi: Regenerate.
14880         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
14881         (rs6000_translate_mode_attribute): New function.
14883 2018-07-06  Paul Koning  <ni1d@arrl.net>
14885         * doc/md.texi (define_split): Document DONE and FAIL.
14886         (define_peephole2): Ditto.
14888 2018-07-05  Jeff Law  <law@redhat.com>
14890         PR tree-optimization/86010
14891         * tree-ssa-dse.c (compute_trims): More aggressively trim at
14892         both the head and tail of mem* and str* calls.
14894 2018-07-05  Jim Wilson  <jimw@sifive.com>
14896         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
14898 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
14900         * config/aarch64/aarch64-simd.md: correct flags text for
14901         MIN_EXPR replacement.
14903 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
14905         * configure: Regenerated.
14907 2018-07-05  Carl Love  <cel@us.ibm.com>
14909         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
14910         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
14911         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
14912         VSX_BUILTIN_DOUBLEL_V4SF.
14914 2018-07-05  Martin Sebor  <msebor@redhat.com>
14916         PR c++/86400
14917         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
14918         than its domain to compute its the upper bound of a char array.
14920 2018-07-05  Nathan Sidwell  <nathan@acm.org>
14922         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
14923         * doc/cpp.texi: Update comment.
14924         * doc/tm.texi: Rebuilt.
14925         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
14926         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
14927         * doc/extend.texi (Backwards Compatibility): Clarify it is system
14928         headers affected by extern "C".
14929         * system.h: Poison NO_IMPLICIT_EXTERN_C.
14930         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
14931         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
14932         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
14933         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
14934         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
14935         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
14936         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
14937         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
14938         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
14939         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
14940         config/sparc/sp64-elf.h, config/spu/spu.h,
14941         config/stormy16/stormy16.h, config/v850/v850.h,
14942         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
14943         define NO_IMPLICIT_EXTERN_C.
14944         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
14946 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
14948         PR target/84711
14949         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14950         instead of GET_MODE_SIZE when comparing Units.
14952 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
14954         PR target/84711
14955         * rtlanal.c (set_noop_p): Constrain on mode change,
14956         include hard-reg-set.h
14958 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
14960         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
14962 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
14964         Revert
14965         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
14967         PR sanitizer/84250
14968         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14969         libasan.
14970         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14972 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
14974         PR sanitizer/84250
14975         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14976         libasan.
14977         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14979 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
14981         PR middle-end/86380
14982         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
14984 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
14986         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
14987         neg_*_op* variables.
14989 2018-07-04  Martin Liska  <mliska@suse.cz>
14991         * tree-switch-conversion.c: Define
14992         max_ratio_for_speed and max_ratio_for_size constants.
14994 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
14995             Martin Liska  <mliska@suse.cz>
14997         PR middle-end/66240
14998         PR target/45996
14999         PR c/84100
15000         * common.opt: Rename align options with 'str_' prefix.
15001         * common/config/i386/i386-common.c (set_malign_value): New
15002         function.
15003         (ix86_handle_option): Use it to set -falign-* options/
15004         * config/aarch64/aarch64-protos.h (struct tune_params): Change
15005         type from int to string.
15006         * config/aarch64/aarch64.c: Update default values from int
15007         to string.
15008         * config/alpha/alpha.c (alpha_override_options_after_change):
15009         Likewise.
15010         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15011         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15012         max skip conditionally.
15013         * config/i386/freebsd.h (SUBALIGN_LOG): New.
15014         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15015         max skip conditionally.
15016         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15017         max skip conditionally.
15018         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15019         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15020         max skip conditionally.
15021         * config/i386/i386.c (struct ptt): Change type from int to
15022         string.
15023         (ix86_default_align): Set default values.
15024         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15025         max skip conditionally.
15026         * config/i386/iamcu.h (SUBALIGN_LOG): New.
15027         (ASM_OUTPUT_MAX_SKIP_ALIGN):
15028         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15029         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15030         max skip conditionally.
15031         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15032         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15033         * config/i386/x86-64.h (SUBALIGN_LOG): New.
15034         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15035         max skip conditionally.
15036         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15037         * config/ia64/ia64.c (ia64_option_override): Set default values
15038         for alignment options.
15039         * config/m68k/m68k.c: Handle new str_align_* options.
15040         * config/mips/mips.c (mips_set_compression_mode): Change
15041         type of constants.
15042         (mips_option_override): Set default values for options.
15043         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15044         Likewise.
15045         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15046         Likewise.
15047         * config/rx/rx.c (rx_option_override): Likewise.
15048         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15049         (LABEL_ALIGN): Use align_labels_log.
15050         (LOOP_ALIGN): Use align_loops_align.
15051         * config/s390/s390.c (s390_asm_output_function_label): Use new
15052         macros.
15053         * config/sh/sh.c (sh_override_options_after_change):
15054         Change type of constants.
15055         * config/spu/spu.c (spu_sched_init): Likewise.
15056         * config/sparc/sparc.c (sparc_option_override): Set default
15057         values for options.
15058         * config/visium/visium.c (visium_option_override): Likewise.
15059         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15060         emit p2align format with last argument if it's not needed.
15061         * doc/invoke.texi: Document extended format of -falign-*.
15062         * final.c: Use align_labels alignment.
15063         * flags.h (struct target_flag_state): Change type to use
15064         align_flags.
15065         (struct align_flags_tuple): New.
15066         (struct align_flags): Likewise.
15067         (align_loops_log): Redefine macro to use new types.
15068         (align_loops_max_skip): Redefine macro to use new types.
15069         (align_jumps_log): Redefine macro to use new types.
15070         (align_jumps_max_skip): Redefine macro to use new types.
15071         (align_labels_log): Redefine macro to use new types.
15072         (align_labels_max_skip): Redefine macro to use new types.
15073         (align_functions_log): Redefine macro to use new types.
15074         (align_loops): Redefine macro to use new types.
15075         (align_jumps): Redefine macro to use new types.
15076         (align_labels): Redefine macro to use new types.
15077         (align_functions): Redefine macro to use new types.
15078         (align_functions_max_skip): Redefine macro to use new types.
15079         (align_loops_value): New macro.
15080         (align_jumps_value): New macro.
15081         (align_labels_value): New macro.
15082         (align_functions_value): New macro.
15083         * function.c (invoke_set_current_function_hook): Propagate
15084         alignment values from flags to global variables default in
15085         topleev.h.
15086         * ipa-icf.c (sem_function::equals_wpa): Use
15087         cl_optimization_option_eq instead of memcmp.
15088         * lto-streamer.h (cl_optimization_stream_out): Support streaming
15089         of string types.
15090         (cl_optimization_stream_in): Likewise.
15091         * optc-save-gen.awk: Support strings in cl_optimization.
15092         * opth-gen.awk: Likewise.
15093         * opts.c (finish_options): Remove error checking of invalid
15094         value ranges.
15095         (MAX_CODE_ALIGN): Remove.
15096         (MAX_CODE_ALIGN_VALUE): Likewise.
15097         (parse_and_check_align_values): New function.
15098         (check_alignment_argument): Likewise.
15099         (common_handle_option): Use check_alignment_argument.
15100         * opts.h (parse_and_check_align_values): Declare.
15101         * toplev.c (init_alignments): Remove.
15102         (read_log_maxskip): New.
15103         (parse_N_M): Likewise.
15104         (parse_alignment_opts): Likewise.
15105         (backend_init_target): Remove usage of init_alignments.
15106         * toplev.h (parse_alignment_opts): Declare.
15107         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15108         argument.
15109         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15110         * tree.c (cl_option_hasher::equal): New.
15111         * varasm.c: Use new global macros.
15113 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
15115         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15116         Use a simpler align directive also if MAXSKIP = ALIGN-1.
15117         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15118         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15119         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15120         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15121         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15122         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15123         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15124         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15125         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15126         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15127         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15129 2018-07-04  Martin Liska  <mliska@suse.cz>
15130             Jonathan Wakely  <jwakely@redhat.com>
15132         * coverage.c: Use correct type.
15133         * doc/invoke.texi: Language correction.
15135 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
15137         PR target/85620
15138         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15139         ENDBRANCH for non-tail call which may return via indirect branch.
15140         * doc/extend.texi: Document indirect_return attribute.
15142 2018-07-03  Martin Sebor  <msebor@redhat.com>
15144         PR tree-optimization/86274
15145         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15146         precondition.
15147         (format_floating): Correct handling of infinities and NaNs.
15149 2018-07-03  Martin Sebor  <msebor@redhat.com>
15151         * print-tree.c (print_real_cst): New function.
15152         (print_node_brief): Call it.
15153         (print_node): Ditto.
15155 2018-07-03  Jeff Law  <law@redhat.com>
15157         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15158         into a single pattern.
15160         * config/h8300/h8300.md (ors code_iterator): New.
15161         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15162         a single pattern and single splitter.
15163         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15164         (iorqi3_1, xorqi3_1): Likewise.
15165         (iorqi3, xorqi3 expanders): Similarly.
15167         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15168         (movmd_internal) into a single pattern using the P mode iterator.
15169         (movmd splitters): Similarly.
15170         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15171         (movsd splitters): Similarly.
15173         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15174         ADDB, ADDW and ADDL into a single ADD attribute which selects the
15175         right table based on the size of the operand.
15176         * config/h8300/h8300.md (length_table): Corresponding changes. All
15177         references to "addb", "addw" and "addl" changed to "add".
15178         (btst patterns): Merge two variants into a single pattern.
15179         (tstqi, tsthi): Likewise.
15180         (addhi3_incdec, addsi3_incdec): Likewise.
15181         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15182         (mulhi3, mulsi3): Likewise.
15183         (udivhi3, udivsi3): Likewise.
15184         (divhi3, divsi3): Likewise.
15185         (andorqi3, andorhi3, andorsi3): Likewise.
15187 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
15189         PR target/85694
15190         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15191         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15193 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15195         PR tree-optimization/85694
15196         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15197         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15198         UNSPEC_URHADD.
15199         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15200         (<u>avg<mode>3_ceil): New patterns.
15202 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
15204         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15205         scan-tree-dump directive.
15206         * gcc.dg/vect/slp-perm-2.c: Likewise.
15207         * gcc.dg/vect/slp-perm-3.c: Likewise.
15208         * gcc.dg/vect/slp-perm-5.c: Likewise.
15209         * gcc.dg/vect/slp-perm-6.c: Likewise.
15210         * gcc.dg/vect/slp-perm-7.c: Likewise.
15211         * gcc.dg/vect/slp-perm-8.c: Likewise.
15213 2018-07-03  Marek Polacek  <polacek@redhat.com>
15215         PR middle-end/86202
15216         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
15218 2018-07-03  Richard Biener  <rguenther@suse.de>
15220         PR ipa/86389
15221         * tree-ssa-structalias.c (find_func_clobbers): Properly
15222         handle indirect calls.
15224 2018-07-03  Jeff Law  <law@redhat.com>
15226         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
15227         (shifts): New code iterator.
15228         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
15229         expander.  Fix HImode handling on H8/SX.
15230         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
15231         (subqi3, subhi3, subsi3 expanders): Likewise.
15232         (andqi3, andhi3, andsi3 expanders): Likewise.
15233         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
15234         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
15235         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
15236         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
15237         (zero_extendqihi2, zero_extendqisi2): Likewise.
15238         (extendqihi2, extendqisi2): Likewise.
15239         (rotlqi3, rotlhi3, rotlsi3): Likewise.
15240         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
15241         (rotlqi3_1, rotlhi3_1): Likewise.
15242         (logicalhi3_sn, logicalsi3_sn): Likewise.
15243         (logicalhi3, logicalsi3): Likewise.
15245 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15247         * tree-vect-patterns.c (vect_recog_rotate_pattern)
15248         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15249         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
15250         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
15251         type to append_pattern_def_seq instead of creating a stmt_vec_info
15252         directly.
15253         (build_mask_conversion): Likewise.  Remove vinfo argument.
15254         (vect_add_conversion_to_patterm): Likewise, renaming to...
15255         (vect_add_conversion_to_pattern): ...this.
15256         (vect_recog_mask_conversion_pattern): Update call to
15257         build_mask_conversion.  Pass the vector type to
15258         append_pattern_def_seq here too.
15259         (vect_recog_gather_scatter_pattern): Update call to
15260         vect_add_conversion_to_pattern.
15262 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15264         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
15265         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15266         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
15267         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
15268         STMT_VINFO_PATTERN_DEF_SEQ to null here.
15269         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
15270         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
15271         append_pattern_def_seq instead of new_pattern_def_seq.
15272         (vect_recog_divmod_pattern): Do both of the above.
15273         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
15274         is null.
15276 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15278         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
15279         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
15280         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
15281         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
15282         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
15283         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15284         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
15285         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15286         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15287         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
15288         parameter with a single stmt_vec_info.
15289         (vect_recog_func_ptr): Likewise.
15290         (vect_recog_gather_scatter_pattern): Likewise, folding in...
15291         (vect_try_gather_scatter_pattern): ...this.
15292         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
15293         the stmt_vec_info of the statement to be matched.  Don't clear
15294         STMT_VINFO_RELATED_STMT.
15295         (vect_pattern_recog): Update call accordingly.
15297 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15299         PR tree-optimization/85694
15300         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
15301         (uavgM3_ceil): Document new optabs.
15302         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
15303         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
15304         functions.
15305         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
15306         (savg_ceil_optab): New optabs.
15307         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
15308         (vect_vect_recog_func_ptrs): Add it.
15309         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
15310         constant directly from the associated lhs.
15312 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15314         * tree-vect-patterns.c (vect_split_statement): New function.
15315         (vect_convert_input): Use it to try to split an existing cast.
15317 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15319         * poly-int.h (print_hex): New function.
15320         * dumpfile.h (dump_dec, dump_hex): Declare.
15321         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
15322         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
15323         min_input_precision, operation_precision and operation_sign.
15324         * tree-vect-patterns.c (vect_get_range_info): New function.
15325         (vect_same_loop_or_bb_p, vect_single_imm_use)
15326         (vect_operation_fits_smaller_type): Delete.
15327         (vect_look_through_possible_promotion): Add an optional
15328         single_use_p parameter.
15329         (vect_recog_over_widening_pattern): Rewrite to use new
15330         stmt_vec_info infomration.  Handle one operation at a time.
15331         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
15332         (vect_truncatable_operation_p, vect_set_operation_type)
15333         (vect_set_min_input_precision): New functions.
15334         (vect_determine_min_output_precision_1): Likewise.
15335         (vect_determine_min_output_precision): Likewise.
15336         (vect_determine_precisions_from_range): Likewise.
15337         (vect_determine_precisions_from_users): Likewise.
15338         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
15339         (vect_vect_recog_func_ptrs): Put over_widening first.
15340         Add cast_forwprop.
15341         (vect_pattern_recog): Call vect_determine_precisions.
15343 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
15345         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
15346         statements that have been replaced by further pattern statements.
15347         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
15349 2018-07-03  Richard Biener  <rguenther@suse.de>
15351         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
15352         always set *dt.  Dump vectype in vectype overload.
15353         * dumpfile.h (dump_gimple_expr): New function.
15354         (dump_gimple_expr_loc): Likewise.
15355         * dumpfile.c (dump_gimple_expr): New function.
15356         (dump_gimple_expr_loc): Likewise.
15358 2018-07-02  Jeff Law  <law@redhat.com>
15360         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
15361         the H8/300, H8/300H and H8/S variants into a single pattern.
15362         (movhi_h8300, movqi_h8300hs): Similarly.
15363         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
15364         (QHI mode iterator): New.
15366         * config/h8300/h8300.md: Remove trailing whitespace.
15368 2018-07-02  Jim Wilson  <jimw@sifive.com>
15370         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
15371         instead of emit_insn for interrupt returns.
15372         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
15373         (riscv_sret, riscv_uret): Likewise.
15375 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
15377         * pretty-print.c (selftest::test_pp_format): Move save and restore
15378         of quotes to class auto_fix_quotes, and add an instance.
15379         * selftest.c: Include "intl.h".
15380         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
15381         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
15382         * selftest.h (selftest::auto_fix_quotes): New class.
15384 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
15386         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
15387         (aarch64_sve_prepare_conditional_op): Remove.
15388         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
15389         Allow aarch64_simd_reg_or_zero as select operand; remove
15390         the aarch64_sve_prepare_conditional_op call.
15391         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
15392         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15393         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
15394         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
15395         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
15396         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
15397         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
15398         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
15399         and a splitters to match all of the *_any patterns.
15400         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
15402         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
15403         (SVE_COND_FP_BINARY_REV): Remove.
15404         (sve_int_op_rev, sve_fp_op_rev): New.
15405         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
15406         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
15407         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
15408         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
15409         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
15410         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
15411         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
15412         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
15413         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
15415         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
15416         Remove match_dup 1 from the inner unspec.
15417         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15419         * config/aarch64/aarch64.md (movprfx): New attr.
15420         (length): Default movprfx to 8.
15421         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
15422         (*madd<SVE_I>, *msub<SVE_I): Likewise.
15423         (*<su>mul<SVE_I>3_highpart): Likewise.
15424         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
15425         (*v<ASHIFT><SVE_I>3): Likewise.
15426         (*<su><MAXMIN><SVE_I>3): Likewise.
15427         (*<su><MAXMIN><SVE_F>3): Likewise.
15428         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
15429         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
15430         (*div<SVE_F>4): Likewise.
15432 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
15434         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
15435         in dump string.
15437 2018-07-02  Richard Biener  <rguenther@suse.de>
15439         PR tree-optimization/86363
15440         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
15441         memset argument refers to a non-variable address.
15443 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
15445         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
15446         {PLUS,MINUS}_EXPR code to...
15447         (adjust_symbolic_bound): ...here,
15448         (combine_bound): ...here,
15449         (set_value_range_with_overflow): ...and here.
15451 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
15453         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
15454         code...
15455         (extract_range_from_abs_expr): ...here.
15457 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
15459         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
15460         -fno-omit-frame-pointer when not optimizing.
15462 2018-07-02  Martin Liska  <mliska@suse.cz>
15464         PR ipa/86279
15465         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
15466         (propagate_nothrow): Likewise.
15468 2018-07-02  Martin Liska  <mliska@suse.cz>
15470         PR ipa/86323
15471         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
15473 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
15475         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
15476         function in r262149, changing "loc" param from source_location to
15477         const dump_location_t &.
15478         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
15479         declaration, as above.
15481 2018-07-01  Paul Koning  <ni1d@arrl.net>
15483         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15484         -munit-asm, -mgnu-asm, -mdec-asm.
15485         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
15486         (pdp11_output_labelref): New.
15487         (pdp11_output_def): New.
15488         (pdp11_output_addr_vec_elt): New.
15489         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
15490         %# and %@ format codes.
15491         (pdp11_option_override): New.
15492         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
15493         (pdp11_output_ident): New.
15494         (pdp11_asm_named_section): New.
15495         (pdp11_asm_init_sections): New.
15496         (pdp11_file_start): New.
15497         (pdp11_file_end): New.
15498         (output_ascii): Use .ascii/.asciz for -mdec-asm.
15499         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
15500         %o, like %c but octal.
15501         (pdp11_option_override): New.
15502         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
15503         -mdec-asm.
15504         (DATA_SECTION_ASM_OP): Ditto.
15505         (READONLY_DATA_SECTION_ASM_OP): New.
15506         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
15507         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
15508         (ASM_OUTPUT_LABELREF): Ditto.
15509         (ASM_OUTPUT_DEF): Ditto.
15510         (ASM_OUTPUT_EXTERNAL): New.
15511         (ASM_OUTPUT_SOURCE_FILENAME): New.
15512         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
15513         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
15514         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
15515         %# and %@ format codes.
15516         * config/pdp11/pdp11.opt (mgnu-asm): New.
15517         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
15518         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
15519         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
15521 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
15523         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
15524         dereferencing path[] beyond its length.
15525         (debug_path): New.
15526         (debug_all_paths): New.
15527         (rewire_first_differing_edge): New.
15528         (adjust_paths_after_duplication): New.
15529         (duplicate_thread_path): Call adjust_paths_after_duplication.
15530         Add new argument.
15531         (thread_through_all_blocks): Add new argument to
15532         duplicate_thread_path.
15534 2018-06-30  Jim Wilson  <jimw@sifive.com>
15536         * config/riscv/predicates.md (p2m1_shift_operand): New.
15537         (high_mask_shift_operand): New.
15538         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
15539         pattern using p2m1_shift_operand.
15540         (lshsi3_zero_extend_3+2): New combiner pattern using
15541         high_mask_shift_operand.
15543 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15545         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
15546         split out from...
15547         (vect_recog_rotate_pattern): ...here.
15548         (vect_convert_input): Try to insert casts of invariants in the
15549         preheader.
15550         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
15551         preheader to be empty.
15553 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15555         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
15556         vector type.  If given, install it in the new statement's
15557         STMT_VINFO_VECTYPE.
15558         (vect_element_precision): New function.
15559         (vect_unpromoted_value): New struct.
15560         (vect_unpromoted_value::vect_unpromoted_value): New function.
15561         (vect_unpromoted_value::set_op): Likewise.
15562         (vect_look_through_possible_promotion): Likewise.
15563         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
15564         (vect_widened_op_tree, vect_convert_input): Likewise.
15565         (vect_convert_inputs, vect_convert_output): Likewise.
15566         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
15567         to handle the optional cast of the multiplication result and
15568         vect_widened_op_tree to detect the widened multiplication itself.
15569         Do not require the input and output of promotion casts to have
15570         the same sign, but base the signedness of the operation on the
15571         input rather than the result.  If the pattern includes two
15572         promotions, check that those promotions have the same sign.
15573         Do not restrict the MULT_EXPR handling to a double-width result;
15574         handle quadruple-width results and wider.  Use vect_convert_inputs
15575         to convert the inputs to the common type.
15576         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
15577         to handle the optional cast of the ABS result.  Also allow a sign
15578         change or a sign extension between the ABS and MINUS.
15579         Use vect_widened_op_tree to detect the widened subtraction and use
15580         vect_convert_inputs to convert the inputs to the common type.
15581         (vect_handle_widen_op_by_const): Delete.
15582         (vect_recog_widen_op_pattern): New function.
15583         (vect_recog_widen_mult_pattern): Use it.
15584         (vect_recog_widen_shift_pattern): Likewise.
15585         (vect_recog_widen_sum_pattern): Use
15586         vect_look_through_possible_promotion to handle the promoted
15587         PLUS_EXPR operand.
15589 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15591         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
15592         the containing gimple_seq *.
15593         * gimple-iterator.h (gsi_for_stmt): Declare it.
15594         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
15595         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
15596         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15597         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15598         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
15599         checks.
15600         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
15601         split out from...
15602         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
15603         statement being replaced is part of an existing pattern
15604         definition sequence, inserting the new pattern statements before
15605         the original one.
15606         (vect_pattern_recog_1): Don't return a bool.  If the statement
15607         is already part of a pattern, instead apply pattern matching
15608         to the pattern definition statements.  Don't clear the
15609         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
15610         (vect_pattern_recog): Don't break after the first match;
15611         continue processing the pattern definition statements instead.
15612         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
15614 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15616         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15617         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15618         (vect_recog_widen_sum_pattern): Use it.
15620 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15622         * tree-vect-loop.c (vectorizable_reduction): Assert that the
15623         phi is not a pattern statement and has not been replaced by
15624         a pattern statement.
15625         * tree-vect-patterns.c (type_conversion_p): Don't check
15626         STMT_VINFO_IN_PATTERN_P.
15627         (vect_recog_vector_vector_shift_pattern): Likewise.
15628         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
15629         the pattern statement rather than the original statement; check
15630         directly for a WIDEN_MULT_EXPR here.
15631         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
15632         vect_is_simple_use to return the pattern statement rather
15633         than the original statement; use is_pattern_stmt_p to check
15634         for such a pattern statement.
15635         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
15636         to return the pattern statement rather than the original statement;
15637         don't do the same transformation here.
15638         (vect_is_simple_use): If the defining statement has been replaced
15639         by a pattern statement, return the pattern statement instead.
15640         Remove the corresponding (local) transformation from the vectype
15641         overload.
15643 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15645         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
15646         end and default to null.
15647         * tree-vect-loop.c (vect_create_epilog_for_reduction)
15648         (vectorizable_reduction): Update calls accordingly, dropping the
15649         gimple ** argument if the passed-back statement isn't needed.
15650         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
15651         (vect_recog_rotate_pattern): Likewise.
15652         (vect_recog_mask_conversion_pattern): Likewise.
15653         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15654         (vect_mask_constant_operand_p): Likewise.
15655         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
15656         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
15657         (get_group_load_store_type, get_load_store_type): Likewise.
15658         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
15659         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
15660         (vectorizable_conversion, vectorizable_assignment): Likewise.
15661         (vectorizable_shift, vectorizable_operation): Likewise.
15662         (vectorizable_store, vect_is_simple_cond): Likewise.
15663         (vectorizable_condition, vectorizable_comparison): Likewise.
15664         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
15665         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
15666         and move it to the end.  Cope with null def_stmt_outs.
15668 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15670         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
15672 2018-06-29  Jeff Law  <law@redhat.com>
15674         * config/v850/v850.c (v850_legitimate_address_p): Handle large
15675         displacements for TARGET_V850E2V3 and newer.
15676         (TARGET_LRA_P): Remove.  Defaults to LRA now.
15677         * config/v850/v850.md (sign23byte_load): Remove.
15678         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
15679         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
15681 2018-06-29  Martin Liska  <mliska@suse.cz>
15683         PR lto/85759
15684         * coverage.c (coverage_init): Mangle full path name.
15685         * doc/invoke.texi: Document the change.
15686         * gcov-io.c (mangle_path): New.
15687         * gcov-io.h (mangle_path): Likewise.
15688         * gcov.c (mangle_name): Use mangle_path for path mangling.
15690 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15692         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
15693         if starting source register is not even.
15695 2018-06-29  Martin Liska  <mliska@suse.cz>
15697         PR tree-optimization/86263
15698         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
15699         Make edge redirection.
15701 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
15703         * dumpfile.c (dump_loc): Add indentation based on scope depth.
15704         (dump_scope_depth): New variable.
15705         (get_dump_scope_depth): New function.
15706         (dump_begin_scope): New function.
15707         (dump_end_scope): New function.
15708         * dumpfile.h (get_dump_scope_depth): New declaration.
15709         (dump_begin_scope): New declaration.
15710         (dump_end_scope): New declaration.
15711         (class auto_dump_scope): New class.
15712         (AUTO_DUMP_SCOPE): New macro.
15713         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
15714         AUTO_DUMP_SCOPE.
15716 2018-06-29  Richard Biener  <rguenther@suse.de>
15718         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
15719         compute_all_dependences succeeds.
15720         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
15721         exceed --param loop-max-datarefs-for-datadeps.
15723 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
15725         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
15727 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
15729         PR target/86348
15730         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
15731         alternative 0 in preferred_for_speed attribute.
15733 2018-06-28  Paul Koning  <ni1d@arrl.net>
15735         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
15736         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
15737         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
15738         * config/pdp11/pdp11.md: Correct "length" attribute calculation
15739         for shift insn patterns.
15741 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
15743         * cgraph.c (cgraph_node::get_body): Replace assignments to
15744         "dump_file" with calls to set_dump_file.
15745         * dumpfile.c (alt_dump_file): Make static, and group with...
15746         (alt_flags): ...this definition.
15747         (dumps_are_enabled): New variable.
15748         (refresh_dumps_are_enabled): New function.
15749         (set_dump_file): New function.
15750         (set_alt_dump_file): New function.
15751         (gcc::dump_manager::dump_start): Replace assignments to
15752         "dump_file" and "alt_dump_file" with calls to set_dump_file and
15753         set_alt_dump_file.
15754         (gcc::dump_manager::dump_finish): Likewise.
15755         * dumpfile.h (alt_dump_file): Delete decl.
15756         (dumps_are_enabled): New variable decl.
15757         (set_dump_file): New function decl.
15758         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
15759         global.
15760         * tree-nested.c (lower_nested_functions): Replace assignments to
15761         "dump_file" with calls to set_dump_file.
15763 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
15765         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
15766         goto_locus of each outgoing edge of each basic block.
15768 2018-06-28  Richard Biener  <rguenther@suse.de>
15770         * dwarf2out.c (decl_scope_table): Remove.
15771         (push_decl_scope): Likewise.
15772         (pop_decl_scope): Likewise.
15773         (gen_type_die_for_member): Do not call push/pop_decl_scope.
15774         (gen_struct_or_union_type_die): Likewise.
15775         (gen_tagged_type_die): Likewise.
15776         (dwarf2out_init): Do not initialize decl_scope_table.
15777         (dwarf2out_c_finalize): Do not free it.
15779 2018-06-28  Richard Biener  <rguenther@suse.de>
15781         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
15782         deciding whether to not re-use a DIE.
15784 2018-06-28  Richard Biener  <rguenther@suse.de>
15786         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15787         DW_AT_abstract_origin attribute.
15789 2018-06-28  Martin Liska  <mliska@suse.cz>
15791         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15792         Use newly introduced constants.
15793         * tree-switch-conversion.h (struct jump_table_cluster):
15794         Define max_ratio_for_size and max_ratio_for_speed.
15796 2018-06-28  Martin Liska  <mliska@suse.cz>
15798         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15799         Add new checking assert to catch invalid state.
15800         (jump_table_cluster::can_be_handled): Handle single case
15801         clusters.
15802         (jump_table_cluster::is_beneficial): Bail out for such case.
15803         (bit_test_cluster::find_bit_tests):
15804         Add new checking assert to catch invalid state.
15805         (bit_test_cluster::can_be_handled): Handle single case
15806         clusters.
15807         (bit_test_cluster::is_beneficial): Bail out for such case.
15808         (switch_decision_tree::analyze_switch_statement):
15809         Fix comment.
15811 2018-06-28  Martin Liska  <mliska@suse.cz>
15813         * common.opt: Introduce -completion option.
15814         * gcc.c (driver_handle_option): Handle it.
15815         (driver::main): Print completions if completion
15816         is set.
15817         * opt-suggestions.c (option_proposer::get_completions):
15818         New function.
15819         (option_proposer::suggest_completion): Likewise.
15820         (option_proposer::find_param_completions): Likewise.
15821         (verify_autocompletions): Likewise.
15822         (test_completion_valid_options): Likewise.
15823         (test_completion_valid_params): Likewise.
15824         (in_completion_p): Likewise.
15825         (empty_completion_p): Likewise.
15826         (test_completion_partial_match): Likewise.
15827         (test_completion_garbage): Likewise.
15828         (opt_proposer_c_tests): Likewise.
15829         * opt-suggestions.h: Declare new functions.
15830         * opts.c (common_handle_option): Handle OPT__completion_.
15831         * selftest-run-tests.c (selftest::run_tests): Add
15832         opt_proposer_c_tests.
15833         * selftest.c (assert_str_startswith): New.
15834         * selftest.h (assert_str_startswith): Likewise.
15835         (opt_proposer_c_tests): New.
15836         (ASSERT_STR_STARTSWITH): Likewise.
15838 2018-06-28  Martin Liska  <mliska@suse.cz>
15840         * Makefile.in: Add opt-suggestions.o.
15841         * gcc-main.c: Include opt-suggestions.h.
15842         * gcc.c (driver::driver): Likewise.
15843         (driver::~driver): Remove m_option_suggestions.
15844         (driver::build_option_suggestions): Moved to option_proposer.
15845         (driver::suggest_option): Likewise.
15846         (driver::handle_unrecognized_options): Use option_proposer.
15847         * gcc.h (class driver): Add new memver m_option_proposer.
15848         * opt-suggestions.c: New file.
15849         * opt-suggestions.h: New file.
15851 2018-06-28  Martin Liska  <mliska@suse.cz>
15853         * vec.h (class auto_string_vec): New (moved from auto_argvec).
15854         (auto_string_vec::~auto_string_vec): Likewise.
15856 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
15858         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15859         prevent_decl_creation_for_types fields up and add reset_location field.
15860         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15861         statement if id->reset_location is true.
15862         (copy_edges_for_bb): Do not set goto_locus on the new edges if
15863         id->reset_location is true.
15864         (copy_phis_for_bb): Force input_location on the arguments if
15865         id->reset_location is true.
15866         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15867         is set on the function to be inlined.
15869 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
15871         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15873 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
15875         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
15876         registers for Pmode.
15877         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
15878         hard registers for the clobbered pseudo.
15880 2018-06-27  Paul Koning  <ni1d@arrl.net>
15882         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15883         mutually exclusive options.
15884         * config/pdp11/constraints.md (h): New constraint.
15885         (O): Update definition to match shift code generation.
15886         (D): New constraint.
15887         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
15888         (CCFP): Remove.
15889         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
15890         function.
15891         (output_jump): Change arguments.
15892         (pdp11_fixed_cc_regs): New function.
15893         (pdp11_cc_mode): Ditto.
15894         (pdp11_expand_shift): Ditto.
15895         (pdp11_assemble_shift): Ditto.
15896         (pdp11_small_shift): Ditto.
15897         (pdp11_branch_cost): Remove.
15898         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
15899         from output.
15900         (pdp11_register_move_cost): Update for CC registers.
15901         (pdp11_rtx_costs): Add case for LSHIFTRT.
15902         (pdp11_output_jump): Add CCNZ mode conditional branches.
15903         (notice_update_cc_on_set): Remove.
15904         (pdp11_cc_mode): New function.
15905         (simple_memory_operand): Correct pre/post decrement case.
15906         (no_side_effect_operand): New function.
15907         (pdp11_regno_reg_class): Add CC_REGS class.
15908         (pdp11_fixed_cc_regs): New function.
15909         (pdp11_small_shift): New function.
15910         (pdp11_expand_shift): New function to expand shift insns.
15911         (pdp11_assemble_shift): New function to output shifts.
15912         (pdp11_branch_cost): Remove.
15913         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
15914         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
15915         (WCHAR_TYPE): Ditto.
15916         (PTRDIFF_TYPE): Ditto.
15917         (ADJUST_INSN_LENGTH): New macro.
15918         (FIXED_REGISTERS): Add CC registers.
15919         (CALL_USED_REGISTERS): Ditto.
15920         (reg_class): Ditto.
15921         (REG_CLASS_NAMES): Ditto.
15922         (REG_CLASS_CONTENTS): Ditto.
15923         (SELECT_CC_MODE): Use new function.
15924         (TARGET_FLAGS_REGNUM): New macro.
15925         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
15926         (cc0_reg_rtx): Remove.
15927         (CC_STATUS_MDEP): Remove.
15928         (CC_STATUS_MDEFP_INIT): Remove.
15929         (CC_IN_FPU): Remove.
15930         (NOTICE_UPDATE_CC): Remove.
15931         (REGISTER_NAMES): Add CC registers.
15932         (BRANCH_COST): Change to constant 1.
15933         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
15934         handling.
15935         * config/pdp11/pdp11.opt (mbcopy): Remove.
15936         (mbcopy-builtin): Remove.
15937         (mbranch-cheap): Remove.
15938         (mbranch-expensive): Remove.
15939         * config/pdp11/predicates.md (expand_shift_operand): Update to
15940         match shift code generation.
15941         (ccnz_operator): New predicate.
15942         * doc/invoke.texi (PDP-11 Options): Remove deleted options
15943         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
15944         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
15945         exclusive options.
15946         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
15947         description of O constraint.
15949 2018-06-27  Jeff Law  <law@redhat.com>
15950             Austin Law  <austinklaw@gmail.com>
15952         * config/v850/v850.md (addsi3_set_flags): New pattern.
15953         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
15954         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
15955         (zero_extendhisi2_v850_set_flags): Likewise.
15956         (zero_extendqisi2_v850_set_flags): Likewise.
15957         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
15958         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
15959         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
15961         * config/v850/v850-protos.h (notice_update_cc): Remove.
15962         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
15963         (v850_print_operand): Handle 'D' and "d".
15964         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
15965         Add handling of arithmetic/logical operations compared against zero.
15966         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
15967         Do not look at v850_compare_op, instead get mode from last argument.
15968         (v850_gen_compare): Remove
15969         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
15970         after reload for prologue insns.
15971         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
15972         patterns.
15973         (construct_save_jarl): Likewise.
15974         (TARGET_FLAGS_REGNUM): Define.
15975         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
15976         (NOTICE_UPDATE_CC): Remove.
15977         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
15978         than cc0.  Conditionalize on reload_completed.
15979         (cmpsi_insn, setfcc_insn): Likewise.
15980         (tst1 splitter): Turn into define_and_split which sets the flags
15981         after reload.
15982         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
15983         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
15984         (cstoresf4, cstoredf4): Clobber the flags.
15985         (cmpsi, cmpsf, cmpdf): Remove expanders.
15986         (setf_insn): Remove pattern.
15987         (addsi3): Turn into define_and_split which clobbers the flags after
15988         reload and a suitable pattern (addsi3_clobber_flags) for use after
15989         reload.
15990         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
15991         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
15992         (ashrsi3, ashrsi3_v850e2): Likewise.
15993         (bins): Clobber the flags.
15994         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
15995         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
15996         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
15997         (call_value_internal_short, call_value_internal_long): Likewise.
15998         (callt_save_interrupt, callt_return_interrupt): Likewise.
15999         (save_interrupt, return_interrupt): Likewise.
16000         (callt_save_all_interrupt, save_all_interrupt): Likewise.
16001         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16002         (restore_all_interrupt, _restore_all_interrupt): Likewise.
16003         (All FP comparisons): Only allow after reload has completed.
16004         (trfsr): Likewise.
16005         (divh, divhu): Tweak output template.
16006         (branch_z_normal, branch_z_invert): Remove
16007         (branch_nz_normal, branch_nz_invert): Likewise.
16008         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16010         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16011         * config/v850/v850.c (notice_update_cc): Remove.
16012         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
16013         (CC_NO_CARRY): Likewise.
16014         (NOTICE_UPDATE_CC): Define to nothing.
16015         * config/v850/v850.md: Remove block comment on cc0 handling
16016         Remove "cc" attribute from all patterns.  Remove cc_status handling
16017         from all patterns.  Minor formatting fixes.
16019 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16021         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16022         (cortex-a76.cortex-a55): Likewise.
16023         * config/aarch64/aarch64-tune.md: Regenerate.
16024         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16025         cortex-a76.cortex-a55.
16027 2018-06-27  Jeff Law  <law@redhat.com>
16029         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16030         (MULTILIB_DIRNAMES): Similarly.
16032 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
16034         * gimple.h (gimple_return_retbnd): Delete.
16035         (gimple_return_set_retbnd): Likewise.
16036         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16037         gimple_return_set_retbnd.
16038         * gimple-pretty-print.c (dump_gimple_return): Remove call to
16039         gimple_return_retbnd and adjust.
16040         * tree-inline.h (struct copy_body_data): Remove retbnd field.
16041         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16042         Explicitly return NULL in a couple more cases.  Move assertion
16043         on debug statements and remove unreachable code.
16044         (reset_debug_binding): Do not test id->retbnd.
16045         (expand_call_inline): Do not set it.
16047 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
16049         * configure.ac: Add --disable-gcov option.
16050         * configure: Regenerate.
16051         * Makefile.in: Honour @enable_gcov@.
16052         * doc/install.texi: Document --disable-gcov.
16054 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16056         * config/arm/arm-cpus.in (cortex-a76): New entry.
16057         (cortex-a76.cortex-a55): Likewise.
16058         * config/arm/arm-tables.opt: Regenerate.
16059         * config/arm/arm-tune.md: Likewise.
16060         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16061         * doc/invoke.texi (ARM Options): Document cortex-a76 and
16062         cortex-a76.cortex-a55.
16064 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
16066         PR target/85769
16067         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16069 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
16071         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16072         comment.
16073         (EPILOGUE_USES): Likewise.
16075 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
16077         * tree-inline.c (remap_location): New function extracted from...
16078         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
16079         (copy_phis_for_bb): ...here.  Call remap_location.
16080         (copy_cfg_body): Adjust call to copy_edges_for_bb.
16082 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
16084         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16085         unaligned vsx for 16B memset.
16087 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
16089         PR target/86285
16090         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16091         ieee128_float_type_node to long_double_type_node unless
16092         TARGET_LONG_DOUBLE_128 is set.
16094 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
16096         * cfgloop.c (get_loop_location): Convert return type from
16097         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16098         by implicit construction from rtx_insn *, and using
16099         dump_user_location_t::from_function_decl for the fallback case.
16100         * cfgloop.h (get_loop_location): Convert return type from
16101         location_t to dump_user_location_t.
16102         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16103         dump_printf_loc to pass in a dump_location_t rather than a
16104         location_t, via the gimple stmt.
16105         * coverage.c (get_coverage_counts): Update calls to
16106         dump_printf_loc to pass in dump_location_t rather than a
16107         location_t.
16108         * doc/optinfo.texi (Dump types): Convert example of
16109         dump_printf_loc from taking "locus" to taking "insn".  Update
16110         description of the "_loc" calls to cover dump_location_t.
16111         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16112         "selftest.h".
16113         (dump_user_location_t::dump_user_location_t): New constructors,
16114         from gimple *stmt and rtx_insn *.
16115         (dump_user_location_t::from_function_decl): New function.
16116         (dump_loc): Make static.
16117         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16118         const dump_location_t &.
16119         (dump_generic_expr_loc): Delete.
16120         (dump_printf_loc): Convert param "loc" from location_t to
16121         const dump_location_t &.
16122         (selftest::test_impl_location): New function.
16123         (selftest::dumpfile_c_tests): New function.
16124         * dumpfile.h: Include "profile-count.h".
16125         (class dump_user_location_t): New class.
16126         (struct dump_impl_location_t): New struct.
16127         (class dump_location_t): New class.
16128         (dump_printf_loc): Convert 2nd param from source_location to
16129         const dump_location_t &.
16130         (dump_generic_expr_loc): Delete.
16131         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16132         const dump_location_t &.
16133         * gimple-fold.c (fold_gimple_assign): Update call to
16134         dump_printf_loc to pass in a dump_location_t rather than a
16135         location_t, via the gimple stmt.
16136         (gimple_fold_call): Likewise.
16137         * gimple-loop-interchange.cc
16138         (loop_cand::analyze_iloop_reduction_var): Update for change to
16139         check_reduction_path.
16140         (tree_loop_interchange::interchange): Update for change to
16141         find_loop_location.
16142         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16143         change in return-type of find_loop_location.
16144         (graphite_regenerate_ast_isl): Likewise.
16145         * graphite-optimize-isl.c (optimize_isl): Likewise.
16146         * graphite.c (graphite_transform_loops): Likewise.
16147         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16148         pass in a dump_location_t rather than a location_t, via the
16149         gimple stmt.
16150         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16151         * ipa.c (walk_polymorphic_call_targets): Likewise.
16152         * loop-unroll.c (report_unroll): Convert "locus" param from
16153         location_t to dump_location_t.
16154         (decide_unrolling): Update for change to get_loop_location's
16155         return type.
16156         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16157         location_t to dump_user_location_t.
16158         (grid_find_single_omp_among_assignments_1): Updates calls to
16159         dump_printf_loc to pass in a dump_location_t rather than a
16160         location_t, via the gimple stmt.
16161         (grid_parallel_clauses_gridifiable): Convert "tloc" from
16162         location_t to dump_location_t.  Updates calls to dump_printf_loc
16163         to pass in a dump_location_t rather than a location_t, via the
16164         gimple stmt.
16165         (grid_inner_loop_gridifiable_p): Likewise.
16166         (grid_dist_follows_simple_pattern): Likewise.
16167         (grid_gfor_follows_tiling_pattern): Likewise.
16168         (grid_target_follows_gridifiable_pattern): Likewise.
16169         (grid_attempt_target_gridification): Convert initialization
16170         of local "grid" from memset to zero-initialization; FIXME: does
16171         this require C++11?  Update call to dump_printf_loc to pass in a
16172         optinfo_location rather than a location_t, via the gimple stmt.
16173         * profile.c (read_profile_edge_counts): Updates call to
16174         dump_printf_loc to pass in a dump_location_t rather than a
16175         location_t
16176         (compute_branch_probabilities): Likewise.
16177         * selftest-run-tests.c (selftest::run_tests): Call
16178         dumpfile_c_tests.
16179         * selftest.h (dumpfile_c_tests): New decl.
16180         * tree-loop-distribution.c (pass_loop_distribution::execute):
16181         Update for change in return type of find_loop_location.
16182         * tree-parloops.c (parallelize_loops): Likewise.
16183         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16184         "locus" from location_t to dump_user_location_t.
16185         (canonicalize_loop_induction_variables): Likewise.
16186         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16187         for change in return type of find_loop_location.
16188         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16189         to dump_printf_loc to pass in a dump_location_t rather than a
16190         location_t, via the stmt.
16191         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16192         Likewise.
16193         * tree-vect-loop-manip.c (find_loop_location): Convert return
16194         type from source_location to dump_user_location_t.
16195         (vect_do_peeling): Update for above change.
16196         (vect_loop_versioning): Update for change in type of
16197         vect_location.
16198         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16199         from location_t to dump_user_location_t.
16200         (vect_estimate_min_profitable_iters): Update for change in type
16201         of vect_location.
16202         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16203         location_t to dump_location_t.
16204         (vect_slp_bb): Update for change in type of vect_location.
16205         * tree-vectorizer.c (vect_location): Convert from source_location
16206         to dump_user_location_t.
16207         (try_vectorize_loop_1): Update for change in vect_location's type.
16208         (vectorize_loops): Likewise.
16209         (increase_alignment): Likewise.
16210         * tree-vectorizer.h (vect_location): Convert from source_location
16211         to dump_user_location_t.
16212         (find_loop_location): Convert return type from source_location to
16213         dump_user_location_t.
16214         (check_reduction_path): Convert 1st param from location_t to
16215         dump_user_location_t.
16216         * value-prof.c (check_counter): Update call to dump_printf_loc to
16217         pass in a dump_user_location_t rather than a location_t; update
16218         call to error_at for change in type of "locus".
16219         (check_ic_target): Update call to dump_printf_loc to
16220         pass in a dump_user_location_t rather than a location_t, via the
16221         call_stmt.
16223 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
16225         * config/s390/s390.h (enum processor_flags): Do not use
16226         default tune parameter when -march was specified.
16228 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
16230         PR target/86314
16231         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
16232         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
16233         operands.
16235 2018-06-26  Richard Biener  <rguenther@suse.de>
16237         PR tree-optimization/86287
16238         PR bootstrap/86316
16239         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
16240         (vect_analyze_loop): Initialize n_stmts.
16242 2018-06-26  Richard Biener  <rguenther@suse.de>
16244         PR middle-end/86271
16245         * fold-const.c (fold_convertible_p): Pointer extension
16246         isn't valid.
16248 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
16250         PR debug/86064
16251         * dwarf2out.c (loc_list_has_views): Adjust comments.
16252         (dw_loc_list): Split single cross-partition range with
16253         nonzero locview.
16255 2018-06-25  Jeff Law  <law@redhat.com>
16257         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
16258         on -mbig-switch by default.
16260         * config/v850/predicates.md (const_float_1_operand): Fix match_code
16261         test.
16262         (const_float_0_operand): Remove unused predicate.
16263         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
16264         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
16265         (recipsf2): New expander.  Original pattern now called
16266         (recipsf2_insn).
16267         (recipdf2, recipdf2_insn): Similarly.
16268         (rsqrtsf2, rsqrtsf2_insn): Similarly
16269         (rsqrtdf2, rsqrtdf2_insn): Similarly
16271 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
16273         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
16274         Simplify logic for FreeBSD (twice).
16276 2018-06-25  Martin Sebor  <msebor@redhat.com>
16278         PR tree-optimization/86204
16279         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
16280         a strnlen result if it's less than the length of the string.
16282 2018-06-25  Martin Sebor  <msebor@redhat.com>
16284         PR tree-optimization/85700
16285         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
16286         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
16287         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
16289 2018-06-25  Martin Sebor  <msebor@redhat.com>
16291         * doc/extend.texi (Zero-length arrays): Update and clarify.
16293 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
16295         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
16296         added IEEE/IBM long double multilib support on PowerPC little
16297         endian Linux systems.
16298         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
16299         (MULTILIB_DEFAULTS): Likewise.
16300         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16301         Likewise.
16302         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
16303         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
16304         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
16306 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
16308         PR middle-end/86311
16309         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
16310         (REORDER_45): Likewise.
16312 2018-06-25  Jeff Law  <law@redhat.com>
16314         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
16315         dividend to 32 bits.  Adjust length.
16316         (udivmodhi4): Cleanup output template.  Fix length.
16318 2018-06-25  Carl Love  <cel@us.ibm.com>
16320         * config/rs6000/vsx.md: Change word selector to prefered location.
16322 2018-06-25  Richard Biener  <rguenther@suse.de>
16324         PR tree-optimization/86304
16325         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
16326         epilogue-if-converted loops as well.
16328 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
16330         * lto-section-out.c (lto_begin_section): Do not print section
16331         name for noaddr and unnumbered dumps.
16333 2018-06-25  Richard Biener  <rguenther@suse.de>
16335         * tree-vectorizer.h (struct vec_info_shared): New structure
16336         with parts split out from struct vec_info and loop_nest from
16337         struct _loop_vec_info.
16338         (struct vec_info): Adjust accordingly.
16339         (struct _loop_vec_info): Likewise.
16340         (LOOP_VINFO_LOOP_NEST): Adjust.
16341         (LOOP_VINFO_DATAREFS): Likewise.
16342         (LOOP_VINFO_DDRS): Likewise.
16343         (struct _bb_vec_info): Likewise.
16344         (BB_VINFO_DATAREFS): Likewise.
16345         (BB_VINFO_DDRS): Likewise.
16346         (struct _stmt_vec_info): Add dr_aux member.
16347         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
16348         (DR_MISALIGNMENT_UNINITIALIZED): New.
16349         (set_dr_misalignment): Adjust.
16350         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
16351         (vect_analyze_loop): Adjust prototype.
16352         (vect_analyze_loop_form): Likewise.
16353         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16354         Compute dependences lazily.
16355         (vect_record_base_alignments): Use shared datarefs/ddrs.
16356         (vect_verify_datarefs_alignment): Likewise.
16357         (vect_analyze_data_refs_alignment): Likewise.
16358         (vect_analyze_data_ref_accesses): Likewise.
16359         (vect_analyze_data_refs): Likewise.
16360         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
16361         constructor parameter for shared part.
16362         (vect_analyze_loop_form): Pass in shared part and adjust.
16363         (vect_analyze_loop_2): Pass in storage for the number of
16364         stmts.  Move loop nest finding to the caller.  Compute
16365         datarefs lazily.
16366         (vect_analyze_loop): Pass in shared part.
16367         (vect_transform_loop): Verify shared datarefs are unchanged.
16368         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
16369         constructor parameter for shared part.
16370         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
16371         (vect_slp_bb): Verify shared datarefs are unchanged before
16372         transform.
16373         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
16374         change.
16375         (new_stmt_vec_info): Initialize DR_AUX misalignment to
16376         DR_MISALIGNMENT_UNINITIALIZED.
16377         * tree-vectorizer.c (vec_info::vec_info): Add constructor
16378         parameter for shared part.
16379         (vec_info::~vec_info): Adjust.
16380         (vec_info_shared::vec_info_shared): New.
16381         (vec_info_shared::~vec_info_shared): Likewise.
16382         (vec_info_shared::save_datarefs): Likewise.
16383         (vec_info_shared::check_datarefs): Likewise.
16384         (try_vectorize_loop_1): Construct shared part live for analyses
16385         of a single loop for multiple vector sizes.
16386         * tree-parloops.c (gather_scalar_reductions): Adjust.
16388 2018-06-25  Richard Biener  <rguenther@suse.de>
16390         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
16391         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
16392         (vect_analyze_data_refs): Remove similar code from here and
16393         simplify accordingly.
16395 2018-06-25  Richard Biener  <rguenther@suse.de>
16397         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
16398         for reverse storage order accesses rather than asserting
16399         they cannot happen here.
16401 2018-06-25  Tom de Vries  <tdevries@suse.de>
16403         PR debug/86257
16404         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
16405         Use data16 instead of .byte for insn prefix.
16407 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
16409         PR C++/86082
16410         * parser.c (make_char_string_pack): Pass this literal chars
16411         through cpp_interpret_string.
16412         (cp_parser_userdef_numeric_literal): Check the result of
16413         make_char_string_pack.
16415 2018-06-24  Maya Rashish  <coypu@sdf.org>
16417         * ginclude/stddef.h: Simplify conditions around avoiding
16418         re-definition of __size_t.
16420 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
16422         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
16423         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
16425 2018-06-22  Maya Rashish  <coypu@sdf.org>
16427         * doc/invoke.texi (mno-fancy-math-387): Update for changes
16428         made to OpenBSD and NetBSD through the years.
16430 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16432         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16433         behavior of vec_pack (vector double, vector double) to match
16434         behavior of vec_float2 (vector double, vector double).
16436 2018-06-22  Olivier Hainque  <hainque@adacore.com>
16438         * gimplify.c (gimplify_function_tree): Prevent creation
16439         of a trampoline for the address of the current function
16440         passed to entry/exit instrumentation hooks.
16442 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
16444         PR target/86222
16445         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
16446         correctly.
16448 2018-06-22  Martin Liska  <mliska@suse.cz>
16450         PR tree-optimization/86263
16451         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16452         Bail out if is_enabled is false.
16453         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
16454         New declaration.
16455         (jump_table_cluster::is_enabled): New function.
16457 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
16459         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16460         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
16461         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
16462         (lto_input_ts_binfo_tree_pointers): Likewise.
16463         * tree-streamer-out.c (streamer_write_tree_bitfields,
16464         write_ts_binfo_tree_pointers): Likewise.
16465         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
16467 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
16469         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
16471 2018-06-22  Martin Liska  <mliska@suse.cz>
16473         * symbol-summary.h (get): Make it pure and inline move
16474         functionality from ::get function.
16475         (get): Remove and inline into ::get and ::get_create.
16476         (get_create): Move code from ::get function.
16478 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16480         PR target/85994
16481         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
16482         -x assembler-with-cpp.
16484 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16486         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
16487         _FILE_OFFSET_BITS=64 for C++.
16489 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
16491         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
16492         conversion insn that shows up when pr85657-3.c is compiled using
16493         IEEE 128-bit long double.
16494         (neg<mode>2_internal): Use the correct mode to check whether the
16495         mode is IBM extended.
16496         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
16497         multiply and divide external functions from being created more
16498         than once.
16500 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16502         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
16503         functions.
16504         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
16505         the edge can be forwarded.
16506         (cfg_layout_merge_blocks): Likewise.
16508 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16510         * except.c (finish_eh_generation): Commit edge insertions only after
16511         the EH edges have been redirected from post-landing to landing pads.
16513 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16515         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
16516         create_tmp_var_for to create the FRAME decl.
16517         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
16519 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
16521         * tree-inline.c (copy_edges_for_bb): Minor tweak.
16522         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
16523         debug statement when resetting its value.
16524         (expand_call_inline): Copy the locus of the call onto the assignment
16525         of the return value, if any.  Use local variable in more cases.
16527 2018-06-21  Martin Liska  <mliska@suse.cz>
16529         * ipa-pure-const.c (propagate_nothrow): Use
16530         funct_state_summaries->get.
16531         (dump_malloc_lattice): Likewise.
16532         (propagate_malloc): Likewise.
16534 2018-06-21  Richard Biener  <rguenther@suse.de>
16536         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
16537         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
16538         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
16539         comment.
16540         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
16541         BLOCK_ABSTRACT_ORIGIN unconditionally.
16543 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
16545         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
16546         deleting it.
16547         * ipa-reference.c (ipa_reference_c_finalize): Delete
16548         ipa_ref_opt_sum_summaries and set it to NULL.
16550 2018-06-21  Tom de Vries  <tdevries@suse.de>
16552         PR tree-optimization/85859
16553         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
16554         test with comment from bb_no_side_effects_p.
16556 2018-06-21  Richard Biener  <rguenther@suse.de>
16558         PR tree-optimization/86232
16559         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
16560         max for constant niter.
16562 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16564         * config/aarch64/aarch64-simd.md
16565         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
16567 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16569         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
16570         Make opernads of the unspec commutative.
16572 2018-06-21  Richard Biener  <rguenther@suse.de>
16574         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
16575         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
16576         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
16577         (vect_analyze_data_ref_dependence): Re-order checks to deal with
16578         NULL DR_STEP.
16579         (vect_record_base_alignments): Do not record base alignment
16580         for gathers or scatters.
16581         (vect_compute_data_ref_alignment): Drop return value that is always
16582         true.  Bail out early for gathers or scatters.
16583         (vect_enhance_data_refs_alignment): Bail out early for gathers
16584         or scatters.
16585         (vect_find_same_alignment_drs): Likewise.
16586         (vect_analyze_data_refs_alignment): Remove dead code.
16587         (vect_slp_analyze_and_verify_node_alignment): Likewise.
16588         (vect_analyze_data_refs): For possible gathers or scatters do
16589         not create an alternate DR, just check their possible validity
16590         and mark them.  Adjust DECL_NONALIASED handling to not rely
16591         on DR_BASE_ADDRESS.
16592         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
16593         update inits of gathers or scatters.
16594         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
16595         Also copy gather/scatter flag to pattern vinfo.
16597 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16599         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16600         behavior of vec_packsu (vector unsigned long long, vector unsigned
16601         long long) to match behavior of vec_packs with same signature.
16603 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
16604             Thomas Schwinge <thomas@codesourcery.com>
16605             Cesar Philippidis  <cesar@codesourcery.com>
16607         * gimplify.c (gimplify_scan_omp_clauses): Add support for
16608         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16609         (gimplify_adjust_omp_clauses): Likewise.
16610         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
16611         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
16612         (gimplify_omp_target_update): Update handling of acc update and
16613         enter/exit data.
16614         * omp-low.c (install_var_field): Remove unused parameter
16615         base_pointers_restrict.
16616         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
16617         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
16618         FINALIZE}
16619         (omp_target_base_pointers_restrict_p): Delete.
16620         (scan_omp_target): Update call to scan_sharing_clauses.
16621         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
16622         FINALIZE}.
16623         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
16624         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16625         (convert_local_omp_clauses): Likewise.
16626         * tree-pretty-print.c (dump_omp_clause): Likewise.
16627         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
16628         FINALIZE}.
16629         (omp_clause_code_name): Likewise.
16631 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
16633         PR debug/86194
16634         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
16635         be narrowed.
16637         PR tree-optimization/86231
16638         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
16639         anti-range don't overwrite *vr0min before using it to compute *vr0max.
16641 2018-06-20  Tom de Vries  <tdevries@suse.de>
16643         PR tree-optimization/86097
16644         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
16645         iv type if signedness of iv type is not the same as that of *nit.
16647 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
16649         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
16650         EDGE_EH edges, verify they are all EDGE_EH.
16652 2018-06-20  Maya Rashish  <coypu@sdf.org>
16654         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
16656 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16658         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
16659         * config/aarch64/aarch64.c (xgene1_tunings): Add
16660         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
16661         (aarch64_mode_valid_for_sched_fusion_p):
16662         Allow 16-byte modes.
16663         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
16664         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
16665         128-bit modes.
16666         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
16667         New pattern.
16668         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
16669         * config/aarch64/iterators.md (VQ2): New mode iterator.
16671 2018-06-20  Martin Liska  <mliska@suse.cz>
16673         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16674         Change default ratio from 10 to 8.
16676 2018-06-20  Martin Liska  <mliska@suse.cz>
16678         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16679         New.
16680         (bit_test_cluster::find_bit_tests): Likewise.
16681         (switch_decision_tree::analyze_switch_statement): Find clusters.
16682         * tree-switch-conversion.h (struct jump_table_cluster): Document
16683         hierarchy.
16685 2018-06-20  Martin Liska  <mliska@suse.cz>
16687         * tree-switch-conversion.c (switch_conversion::collect):
16688         Record m_uniq property.
16689         (switch_conversion::expand): Bail out for special conditions.
16690         (group_cluster::~group_cluster): New.
16691         (group_cluster::group_cluster): Likewise.
16692         (group_cluster::dump): Likewise.
16693         (jump_table_cluster::emit): New.
16694         (switch_decision_tree::fix_phi_operands_for_edges): New.
16695         (struct case_node): Remove struct.
16696         (jump_table_cluster::can_be_handled): New.
16697         (case_values_threshold): Moved to header.
16698         (reset_out_edges_aux): Likewise.
16699         (jump_table_cluster::is_beneficial): New.
16700         (bit_test_cluster::can_be_handled): Likewise.
16701         (add_case_node): Remove.
16702         (bit_test_cluster::is_beneficial): New.
16703         (case_bit_test::cmp): New.
16704         (bit_test_cluster::emit): New.
16705         (expand_switch_as_decision_tree_p): Remove.
16706         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
16707         (fix_phi_operands_for_edge): Likewise.
16708         (switch_decision_tree::analyze_switch_statement): New.
16709         (compute_cases_per_edge): Move ...
16710         (switch_decision_tree::compute_cases_per_edge): ... here.
16711         (try_switch_expansion): Likewise.
16712         (switch_decision_tree::try_switch_expansion): Likewise.
16713         (record_phi_operand_mapping): Likewise.
16714         (switch_decision_tree::record_phi_operand_mapping): Likewise.
16715         (emit_case_decision_tree): Likewise.
16716         (switch_decision_tree::emit): Likewise.
16717         (balance_case_nodes): Likewise.
16718         (switch_decision_tree::balance_case_nodes): Likewise.
16719         (dump_case_nodes): Likewise.
16720         (switch_decision_tree::dump_case_nodes): Likewise.
16721         (emit_jump): Likewise.
16722         (switch_decision_tree::emit_jump): Likewise.
16723         (emit_cmp_and_jump_insns): Likewise.
16724         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
16725         (emit_case_nodes): Likewise.
16726         (switch_decision_tree::emit_case_nodes): Likewise.
16727         (conditional_probability): Remove.
16728         * tree-switch-conversion.h (enum cluster_type): New.
16729         (PRINT_CASE): New.
16730         (struct cluster): Likewise.
16731         (cluster::cluster): Likewise.
16732         (struct simple_cluster): Likewise.
16733         (simple_cluster::simple_cluster): Likewise.
16734         (struct group_cluster): Likewise.
16735         (struct jump_table_cluster): Likewise.
16736         (struct bit_test_cluster): Likewise.
16737         (struct min_cluster_item): Likewise.
16738         (struct case_tree_node): Likewise.
16739         (case_tree_node::case_tree_node): Likewise.
16740         (jump_table_cluster::case_values_threshold): Likewise.
16741         (struct case_bit_test): Likewise.
16742         (struct switch_decision_tree): Likewise.
16743         (struct switch_conversion): Likewise.
16744         (switch_decision_tree::reset_out_edges_aux): Likewise.
16746 2018-06-20  Martin Liska  <mliska@suse.cz>
16748         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
16749         (hoist_edge_and_branch_if_true): Likewise.
16750         (expand_switch_using_bit_tests_p): Likewise.
16751         (struct case_bit_test): Likewise.
16752         (case_bit_test_cmp): Likewise.
16753         (emit_case_bit_tests): Likewise.
16754         (switch_conversion::switch_conversion): New class.
16755         (struct switch_conv_info): Remove old struct.
16756         (collect_switch_conv_info): More to ...
16757         (switch_conversion::collect): ... this.
16758         (check_range): Likewise.
16759         (switch_conversion::check_range): Likewise.
16760         (check_all_empty_except_final): Likewise.
16761         (switch_conversion::check_all_empty_except_final): Likewise.
16762         (check_final_bb): Likewise.
16763         (switch_conversion::check_final_bb): Likewise.
16764         (create_temp_arrays): Likewise.
16765         (switch_conversion::create_temp_arrays): Likewise.
16766         (free_temp_arrays): Likewise.
16767         (gather_default_values): Likewise.
16768         (switch_conversion::gather_default_values): Likewise.
16769         (build_constructors): Likewise.
16770         (switch_conversion::build_constructors): Likewise.
16771         (constructor_contains_same_values_p): Likewise.
16772         (switch_conversion::contains_same_values_p): Likewise.
16773         (array_value_type): Likewise.
16774         (switch_conversion::array_value_type): Likewise.
16775         (build_one_array): Likewise.
16776         (switch_conversion::build_one_array): Likewise.
16777         (build_arrays): Likewise.
16778         (switch_conversion::build_arrays): Likewise.
16779         (gen_def_assigns): Likewise.
16780         (switch_conversion::gen_def_assigns): Likewise.
16781         (prune_bbs): Likewise.
16782         (switch_conversion::prune_bbs): Likewise.
16783         (fix_phi_nodes): Likewise.
16784         (switch_conversion::fix_phi_nodes): Likewise.
16785         (gen_inbound_check): Likewise.
16786         (switch_conversion::gen_inbound_check): Likewise.
16787         (process_switch): Use the newly created class.
16788         (switch_conversion::expand): New.
16789         (switch_conversion::~switch_conversion): New.
16790         * tree-switch-conversion.h: New file.
16792 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16794         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16795         tree-vect-patterns.c.
16796         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16797         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
16798         (vect_recog_sad_pattern): Likewise.
16799         (vect_recog_widen_sum_pattern): Likewise.
16800         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
16801         (vect_recog_widen_shift_pattern): Remove the type_in argument.
16802         (vect_recog_rotate_pattern): Likewise.
16803         (vect_recog_mult_pattern): Likewise.
16804         (vect_recog_vector_vector_shift_pattern): Likewise.
16805         (vect_recog_divmod_pattern): Likewise.
16806         (vect_recog_mixed_size_cond_pattern): Likewise.
16807         (vect_recog_bool_pattern): Likewise.
16808         (vect_recog_mask_conversion_pattern): Likewise.
16809         (vect_try_gather_scatter_pattern): Likewise.
16810         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
16811         (vect_recog_over_widening_pattern): Likewise.
16812         (vect_recog_gather_scatter_pattern): Likewise.
16813         (vect_recog_func_ptr): Move from tree-vectorizer.h
16814         (vect_vect_recog_func_ptrs): Move further down the file.
16815         (vect_recog_func): Likewise.  Remove the third argument.
16816         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16817         (vect_pattern_recog_1): Expect the pattern function to do any
16818         necessary target tests.  Also expect it to provide a vector type.
16819         Remove the type_in handling.
16821 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16823         * tree-vect-patterns.c (vect_pattern_detected): New function.
16824         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16825         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16826         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16827         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16828         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16829         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16830         (vect_recog_mask_conversion_pattern)
16831         (vect_try_gather_scatter_pattern): Likewise.
16833 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16835         * tree-vect-patterns.c (vect_get_internal_def): New function.
16836         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16837         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16838         (search_type_for_mask_1): Use it.
16840 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16842         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16843         redundant WIDEN_SUM_EXPR handling.
16844         (vect_recog_sad_pattern): Likewise.
16846 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16848         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16849         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16850         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16851         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16852         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16854 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16856         * tree-vect-stmts.c (vectorizable_call): Make sure that we
16857         use the stmt_vec_info of the original bb statement for the
16858         new zero assignment, even if the call is part of a pattern.
16860 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16862         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16863         that the sequence is attached to the original statement rather
16864         than the pattern statement.
16865         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16866         PATTERN_DEF_SEQ from the original statement rather than
16867         the main pattern statement.
16868         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16869         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16870         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16872 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16874         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
16875         definition statements before the early exit for statements that aren't
16876         live or relevant.
16877         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
16878         split out from...
16879         (vect_transform_loop): ...here.  Process pattern definition
16880         statements without first checking whether the main pattern
16881         statement is live or relevant.
16883 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
16885         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
16886         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
16888 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
16890         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
16891         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
16892         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
16893         (expand_block_compare): Change select_block_compare_mode call.
16894         (expand_strncmp_align_check): Use new functions, fix comment.
16895         (emit_final_str_compare_gpr): New function.
16896         (expand_strn_compare): Refactor and clean up code.
16897         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
16899 2018-06-19  Tony Reix  <tony.reix@atos.com>
16900             Damien Bergamini  <damien.bergamini@atos.com>
16901             David Edelsohn  <dje.gcc@gmail.com>
16903         * collect2.c (static_obj): New variable.
16904         (static_libs): New variable.
16905         (is_in_list): Uncomment declaration.
16906         (main): Track AIX libraries linked statically.
16907         (is_in_list): Uncomment definition.
16908         (scan_prog_file): Don't add AIX shared libraries initializer
16909         to constructor list if linking statically.
16911 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
16913         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
16914         constant.
16915         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
16917 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
16919         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
16920         blocks.
16922 2018-06-19  Martin Liska  <mliska@suse.cz>
16924         * config/i386/i386.c (ix86_can_inline_p): Do not use
16925         ipa_fn_summaries::get_create.
16926         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
16927         get.
16928         (devirtualization_time_bonus): Likewise.
16929         (ipcp_propagate_stage): Likewise.
16930         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16931         (edge_set_predicate): Likewise.
16932         (evaluate_conditions_for_known_args): Likewise.
16933         (evaluate_properties_for_edge): Likewise.
16934         (ipa_call_summary::reset): Tranform to ...
16935         (ipa_call_summary::~ipa_call_summary): ... this.
16936         (ipa_fn_summary::reset): Transform to ...
16937         (ipa_fn_summary::~ipa_fn_summary): ... this.
16938         (ipa_fn_summary_t::remove): Rename to ...
16939         (ipa_fn_summary_t::remove_callees): ... this.
16940         (ipa_fn_summary_t::duplicate): Use placement new
16941         instead of memory copy.
16942         (ipa_call_summary_t::duplicate): Likewise.
16943         (ipa_call_summary_t::remove): Remove.
16944         (dump_ipa_call_summary): Change get_create to get.
16945         (ipa_dump_fn_summary): Dump only when summary exists.
16946         (analyze_function_body): Use symbol_summary::get instead
16947         of get_create.
16948         (compute_fn_summary): Likewise.
16949         (estimate_edge_devirt_benefit): Likewise.
16950         (estimate_edge_size_and_time): Likewise.
16951         (inline_update_callee_summaries): Likewise.
16952         (remap_edge_change_prob): Likewise.
16953         (remap_edge_summaries): Likewise.
16954         (ipa_merge_fn_summary_after_inlining): Likewise.
16955         (write_ipa_call_summary): Likewise.
16956         (ipa_fn_summary_write): Likewise.
16957         (ipa_free_fn_summary): Likewise.
16958         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
16959         (struct ipa_call_summary): Likewise.
16960         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
16961         of get_create.
16962         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
16963         (estimate_size_after_inlining): Likewise.
16964         (estimate_growth): Likewise.
16965         (growth_likely_positive): Likewise.
16966         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16967         (inline_call): Likewise.
16968         * ipa-inline.c (caller_growth_limits): Likewise.
16969         (can_inline_edge_p): Likewise.
16970         (can_inline_edge_by_limits_p): Likewise.
16971         (compute_uninlined_call_time): Likewise.
16972         (compute_inlined_call_time): Likewise.
16973         (want_inline_small_function_p): Likewise.
16974         (edge_badness): Likewise.
16975         (update_caller_keys): Likewise.
16976         (update_callee_keys): Likewise.
16977         (inline_small_functions): Likewise.
16978         (inline_to_all_callers_1): Likewise.
16979         (dump_overall_stats): Likewise.
16980         (early_inline_small_functions): Likewise.
16981         (early_inliner): Likewise.
16982         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16983         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16984         * ipa-pure-const.c (malloc_candidate_p): Likewise.
16985         * ipa-split.c (execute_split_functions): Likewise.
16986         * symbol-summary.h: Likewise.
16987         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16989 2018-06-19  Richard Biener  <rguenther@suse.de>
16991         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
16992         (vectorize_loops): ... here.  Fix dbgcnt handling.
16993         (try_vectorize_loop): Wrap try_vectorize_loop_1.
16995 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
16997         PR target/86197
16998         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
16999         ieee128 argument takes up only one (vector) register, not two (floating
17000         point) registers.
17002 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
17004         * gimplify.c (gimplify_init_constructor): Really never clear for an
17005         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17007 2018-06-19  Richard Biener  <rguenther@suse.de>
17009         PR tree-optimization/86179
17010         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17011         after failed recognition.
17013 2018-06-18  Martin Sebor  <msebor@redhat.com>
17015         PR middle-end/85602
17016         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17017         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17018         Handle integer subtraction.
17019         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17020         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17022 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17024         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17025         param from rtx to rtx_insn *.
17026         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17027         param.
17028         (frv_ifcvt_modify_insn): Likwise.
17029         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17030         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
17031         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17032         as_a <rtx_insn *> cast to local "unprotected_region" once
17033         it's been established that it's not NULL or pc_rtx.
17034         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17035         param "sethi" from rtx to rtx_insn *.
17036         (nds32_group_float_insns): Likewise for param "insn".
17037         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17038         param.
17039         (vax_output_int_subtract): Likewise.
17040         * config/vax/vax.c (vax_output_int_add): Likewise for param
17041         "insn".
17042         (vax_output_int_subtract): Likewise.
17043         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17044         (emit_pattern_after): Likewise for param "after".
17045         (emit_insn_after): Likewise.
17046         (emit_jump_insn_after): Likewise.
17047         (emit_call_insn_after): Likewise.
17048         (emit_debug_insn_after): Likewise.
17049         (emit_pattern_before): Likewise for param "before".
17050         (emit_insn_before): Likewise.
17051         (emit_jump_insn_before): Likewise.
17052         * final.c (get_insn_template): Likewise for param "insn", removing
17053         a cast.
17054         * output.h (get_insn_template): Likewise for 2nd param.
17055         * rtl.h (emit_insn_before): Likewise.
17056         (emit_jump_insn_before): Likewise.
17057         (emit_debug_insn_before_noloc): Likewise.
17058         (emit_insn_after): Likewise.
17059         (emit_jump_insn_after): Likewise.
17060         (emit_call_insn_after): Likewise.
17061         (emit_debug_insn_after): Likewise.
17062         (set_insn_deleted): Likewise for param.
17064 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
17066         PR target/85358
17067         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17068         floating point modes, so that IFmode is numerically greater than
17069         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17070         to declare the ordering.  This prevents IFmode from being
17071         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17072         machine.  Include rs6000-modes.h to share the fractional values
17073         between genmodes* and the rest of the compiler.
17074         (IFmode): Likewise.
17075         (KFmode): Likewise.
17076         (TFmode): Likewise.
17077         * config/rs6000/rs6000-modes.h: New file.
17078         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17079         meaning of rs6000_long_double_size so that 126..128 selects an
17080         appropriate 128-bit floating point type.
17081         (rs6000_option_override_internal): Likewise.
17082         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17083         (TARGET_LONG_DOUBLE_128): Change the meaning of
17084         rs6000_long_double_size so that 126..128 selects an appropriate
17085         128-bit floating point type.
17086         (LONG_DOUBLE_TYPE_SIZE): Update comment.
17087         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17088         source and destination to match the standard usage.
17089         (truncifkf2): Likewise.
17090         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17091         ISA 2.07 to use an explicit clobber, instead of passing in a
17092         temporary.
17093         (copysign<mode>3_soft): Likewise.
17095 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
17097         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17098         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17099         (vect_slp_analyze_instance_dependence): Likewise.
17100         (vect_enhance_data_refs_alignment): Likewise.
17101         (vect_analyze_data_refs_alignment): Likewise.
17102         (vect_slp_analyze_and_verify_instance_alignment
17103         (vect_analyze_data_ref_accesses): Likewise.
17104         (vect_prune_runtime_alias_test_list): Likewise.
17105         (vect_analyze_data_refs): Likewise.
17106         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17107         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17108         (vect_analyze_scalar_cycles_1): Likewise.
17109         (vect_get_loop_niters): Likewise.
17110         (vect_analyze_loop_form_1): Likewise.
17111         (vect_update_vf_for_slp): Likewise.
17112         (vect_analyze_loop_operations): Likewise.
17113         (vect_analyze_loop): Likewise.
17114         (vectorizable_induction): Likewise.
17115         (vect_transform_loop): Likewise.
17116         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17117         * tree-vect-slp.c (vect_analyze_slp): Likewise.
17118         (vect_make_slp_decision): Likewise.
17119         (vect_detect_hybrid_slp): Likewise.
17120         (vect_slp_analyze_operations): Likewise.
17121         (vect_slp_bb): Likewise.
17122         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17123         (vectorizable_bswap): Likewise.
17124         (vectorizable_call): Likewise.
17125         (vectorizable_simd_clone_call): Likewise.
17126         (vectorizable_conversion): Likewise.
17127         (vectorizable_assignment): Likewise.
17128         (vectorizable_shift): Likewise.
17129         (vectorizable_operation): Likewise.
17130         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17132 2018-06-18  Martin Sebor  <msebor@redhat.com>
17134         PR tree-optimization/81384
17135         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17136         * builtins.c (expand_builtin_strnlen): New function.
17137         (expand_builtin): Call it.
17138         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17139         * builtins.def (BUILT_IN_STRNLEN): New.
17140         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17141         Warn for bounds in excess of maximum object size.
17142         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17143         single-value ranges.  Handle strnlen.
17144         (handle_builtin_strlen): Handle strnlen.
17145         (strlen_check_and_optimize_stmt): Same.
17146         * doc/extend.texi (Other Builtins): Document strnlen.
17148 2018-06-18  Maya Rashish  <coypu@sdf.org>
17150         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17151         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17152         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17154         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17155         here to ...
17156         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17158 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17160         * tree.c (escaped_string::escape): Replace cast to char * by
17161         const_cast<char *> (unescaped).
17163 2018-06-18  Nick Clifton  <nickc@redhat.com>
17165         PR 84195
17166         * tree.c (escaped_string): New class.  Converts an unescaped
17167         string into its escaped equivalent.
17168         (warn_deprecated_use): Use the new class to convert the
17169         deprecation message, if present.
17170         (test_escaped_strings): New self test.
17171         (test_c_tests): Add test_escaped_strings.
17172         * doc/extend.texi (deprecated): Add a note that the
17173         deprecation message is affected by the -fmessage-length
17174         option, and that control characters will be escaped.
17175         (#pragma GCC error): Document this pragma.
17176         (#pragma GCC warning): Likewise.
17177         * doc/invoke.texi (-fmessage-length): Document this option's
17178         effect on the #warning and #error preprocessor directives and
17179         the deprecated attribute.
17181 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
17183         * tree.c (decl_value_expr_lookup): Revert latest change.
17184         (decl_value_expr_insert): Likewise.
17186 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
17188         * gimplify.c (nonlocal_vlas): Delete.
17189         (nonlocal_vla_vars): Likewise.
17190         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17191         referenced VLAs.
17192         (gimplify_body): Do not create and destroy nonlocal_vlas.
17193         * tree-nested.c: Include diagnostic.h.
17194         (use_pointer_in_frame): Tweak.
17195         (lookup_field_for_decl): Add assertion and declare the transformation.
17196         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17197         internal error when the reference is in a wrong context.  Do not
17198         create a debug decl by default.
17199         (note_nonlocal_block_vlas): Delete.
17200         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17201         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
17202         create a debug decl by default.
17203         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17204         call is in a wrong context.
17205         (fixup_vla_decls): New function.
17206         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
17207         debug variables were created.
17208         * tree.c (decl_value_expr_lookup): Add checking assertion.
17209         (decl_value_expr_insert): Likewise.
17211 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17213         PR middle-end/82479
17214         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
17215         * tree-scalar-evolution.c (interpret_expr): Likewise.
17216         (expression_expensive_p): Likewise.
17217         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
17218         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
17219         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
17220         (ssa_defined_by_minus_one_stmt_p): New.
17222 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
17224         PR middle-end/64946
17225         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
17226         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
17227         * dojump.c (do_jump): Likewise.
17228         * expr.c (expand_expr_real_2): Check operand type's sign.
17229         * fold-const.c (const_unop): Handle ABSU_EXPR.
17230         (fold_abs_const): Likewise.
17231         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
17232         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
17233         (strip_sign_op_1): Likesise.
17234         * match.pd: Add new pattern to generate ABSU_EXPR.
17235         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
17236         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17237         * tree-eh.c (operation_could_trap_helper_p): Likewise.
17238         * tree-inline.c (estimate_operator_cost): Likewise.
17239         * tree-pretty-print.c (dump_generic_node): Likewise.
17240         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
17241         * tree.def (ABSU_EXPR): New.
17243 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
17245         PR middle-end/86095
17246         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
17247         documented as preserved for backward compatibility only.
17248         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
17250         PR rtl-optimization/86108
17251         * bb-reorder.c (create_forwarder_block): Renamed to ...
17252         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
17253         jump from new landing pad to the second part.
17254         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
17255         Adjust callers.
17257 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
17259         PR middle-end/85878
17260         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
17261         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
17262         Only call store_expr for halves if the mode is the same.
17264         PR middle-end/86123
17265         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
17266         Fix up comment formatting.
17268 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17270         * typed-splay-tree.h (typed_splay_tree::remove): New function.
17271         (typed_splay_tree::closure,
17272         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
17273         (typed_splay_tree::typed_splay_tree,
17274         typed_splay_tree::operator =): Declared private.
17275         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
17276         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
17277         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
17278         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
17279         typed_splay_tree::splay_tree_splay,
17280         typed_splay_tree::splay_tree_foreach_helper,
17281         typed_splay_tree::splay_tree_insert,
17282         typed_splay_tree::splay_tree_remove,
17283         typed_splay_tree::splay_tree_lookup,
17284         typed_splay_tree::splay_tree_predecessor,
17285         typed_splay_tree::splay_tree_successor,
17286         typed_splay_tree::splay_tree_min,
17287         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
17288         (typed_splay_tree::root, typed_splay_tree::comp,
17289         typed_splay_tree::delete_key,
17290         typed_splay_tree::delete_value): New data members.
17291         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
17292         typed_splay_tree::remove.
17294 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
17296         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
17297         -mginv and -mno-ginv to the assembler.
17298         * config/mips/mips.opt (-mcrc): New option.
17299         (-mginv): Likewise.
17300         * doc/invoke.text (-mcrc): Document.
17301         (-mginv): Likewise.
17303 2018-06-15  Nick Clifton  <nickc@redhat.com>
17305         PR 84195
17306         * tree.c (escaped_string): New class.  Converts an unescaped
17307         string into its escaped equivalent.
17308         (warn_deprecated_use): Use the new class to convert the
17309         deprecation message, if present.
17310         (test_escaped_strings): New self test.
17311         (test_c_tests): Add test_escaped_strings.
17312         * doc/extend.texi (deprecated): Add a note that the
17313         deprecation message is affected by the -fmessage-length
17314         option, and that control characters will be escaped.
17315         (#pragma GCC error): Document this pragma.
17316         (#pragma GCC warning): Likewise.
17317         * doc/invoke.texi (-fmessage-length): Document this option's
17318         effect on the #warning and #error preprocessor directives and
17319         the deprecated attribute.
17321 2018-06-15  Richard Biener  <rguenther@suse.de>
17323         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
17324         here, also noting vector size used.
17325         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
17326         size used in MSG_OPTIMIZED_LOCATIONS dump.
17327         (pass_slp_vectorize::execute): Adjust.
17329 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
17331         PR target/85968
17332         * config/arc/arc.c (arc_return_address_register): Fix
17333         if-condition.
17335 2018-06-15  Richard Biener  <rguenther@suse.de>
17337         PR middle-end/86159
17338         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
17339         leave useless conversion stripping to force_gimple_operand_gsi.
17340         (gimplify_build2): Likewise.
17341         (gimplify_build1): Likewise.
17343 2018-06-15  Richard Biener  <rguenther@suse.de>
17345         PR middle-end/86076
17346         * tree-cfg.c (move_stmt_op): unshare invariant addresses
17347         before adjusting their block.
17349 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17351         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
17352         multilibs for *-*-rtems*.
17353         * config/riscv/t-rtems: New file.
17355 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
17357         PR middle-end/86122
17358         * match.pd ((A +- CST1) +- CST2): Punt if last resort
17359         unsigned_type_for returns NULL.
17361         PR target/85945
17362         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
17363         subregs of multi-word pseudos unless the float mode has word size.
17365 2018-06-14  Richard Biener  <rguenther@suse.de>
17367         PR middle-end/86139
17368         * tree-vect-generic.c (build_word_mode_vector_type): Remove
17369         duplicate and harmful type_hash_canon.
17370         * tree.c (type_hash_canon): Assert we didn't find ourselves.
17372 2018-06-14  Richard Biener  <rguenther@suse.de>
17374         PR ipa/86124
17375         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
17376         NULL cgraph_node.
17378 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
17380         * config/rtems.h (STDINT_LONG32): Define.
17382 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
17383             Prachi Godbole  <prachi.godbole@imgtec.com>
17385         * config/mips/mips-cpus.def: Define P6600.
17386         * config/mips/mips-tables.opt: Regenerate.
17387         * config/mips/mips.c (mips_ucbranch_type): New enum.
17388         (mips_rtx_cost_data): Add support for P6600.
17389         (mips_issue_rate): Likewise.
17390         (mips_multipass_dfa_lookahead): Likewise.
17391         (mips_avoid_hazard): Likewise.
17392         (mips_reorg_process_insns): Likewise.
17393         (mips_classify_branch_p6600): New function.
17394         * config/mips/mips.h (TUNE_P6600): New define.
17395         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
17396         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
17397         * config/mips/mips.md: Include p6600.md.
17398         (processor): Add p6600.
17399         * config/mips/p6600.md: New file.
17400         * doc/invoke.texi: Add p6600 to supported architectures.
17402 2018-06-13  Martin Sebor  <msebor@redhat.com>
17404         PR tree-optimization/86114
17405         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
17406         of integer types.
17407         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
17409 2018-06-13  Richard Biener  <rguenther@suse.de>
17411         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
17412         Properly set vector type of the intermediate stmt.
17413         * tree-vect-stmts.c (vectorizable_operation): The destination
17414         var always has vectype_out type.
17416 2018-06-13  Jeff Law  <law@redhat.com>
17418         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
17419         integer 0 for argument to print_rtl_with_bb.
17420         (rl78_reorg): Likewise.
17422 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
17424         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
17425         from rtx to rtx_insn *.
17426         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
17427         "label".
17428         (add_sched_insns_for_speculation): Likewise for local "target",
17429         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17430         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
17431         from rtx_insn ** to rtx_code_label **.
17432         (reorg_emit_nops): Likewise.
17433         (c6x_reorg): Likewise for local "call_labels".
17434         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
17435         rtx to rtx_insn *.
17436         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
17437         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
17438         the loops over LABEL_REFS.
17439         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
17440         braf_label.
17441         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17442         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
17443         (split_branches): Strengthen local "olabel" from rtx to
17444         rtx_insn *, adding a safe_as_a cast.
17445         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
17446         to "rtx_insn *".
17447         (add_insn_after): Likewise for first two params.
17448         (add_insn_before): Likewise.
17449         (remove_insn): Likewise for param.
17450         (emit_pattern_before_noloc): Likewise for second and third params.
17451         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
17452         (emit_call_insn_before_noloc): Likewise.
17453         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
17454         to "rtx_insn *".
17455         (emit_barrier_before): Likewise.
17456         (emit_label_before): Strengthen "label" param from "rtx" to
17457         "rtx_code_label *".  Strengthen "before" param from "rtx" to
17458         "rtx_insn *".
17459         (emit_insn_after_1): Strengthen "after" param from "rtx" to
17460         "rtx_insn *".
17461         (emit_pattern_after_noloc): Likewise.
17462         (emit_insn_after_noloc): Likewise.
17463         (emit_jump_insn_after_noloc): Likewise.
17464         (emit_call_insn_after_noloc): Likewise.
17465         (emit_debug_insn_after_noloc): Likewise.
17466         (emit_barrier_after): Likewise.
17467         (emit_label_after): Likewise for both params.
17468         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
17469         "loc" param from "int" to "location_t".
17470         (emit_insn_after_setloc): Likewise.
17471         (emit_jump_insn_after_setloc): Likewise.
17472         (emit_call_insn_after_setloc): Likewise.
17473         (emit_debug_insn_after_setloc): Likewise.
17474         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
17475         "loc" param from "int" to "location_t".
17476         (emit_pattern_before): Convert NULL_RTX to NULL.
17477         (emit_insn_before_setloc): Convert "loc" param from "int" to
17478         "location_t".
17479         (emit_jump_insn_before_setloc): Likewise.
17480         (emit_call_insn_before_setloc): Likewise.
17481         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
17482         rtx_insn *.  Convert "loc" param from "int" to "location_t".
17483         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
17484         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
17485         Convert 3rd param from "int" to "location_t".
17486         (emit_barrier_before, emit_barrier_after, next_real_insn):
17487         Strengthen param from rtx to rtx_insn *.
17488         (emit_label_before): Strengthen 1st param from "rtx" to
17489         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
17490         "rtx_insn *".
17491         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
17492         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
17493         Strengthen 2nd param from "rtx" to "rtx_insn *".
17494         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
17495         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
17496         Likewise. Convert 3rd param from "int" to "location_t".
17497         (emit_label_after): Strengthen 1st param from "rtx" to
17498         "rtx_code_label *".
17499         (next_real_insn, remove_insn): Strengthen param from "rtx" to
17500         "rtx_insn *".
17501         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
17502         from "rtx" to "rtx_insn *".
17504 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
17506         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
17507         bodies streamed in with -Q.
17508         * dumpfile.c (dump_files): Add lto-stream-out dump file.
17509         * dumpfile.h (tree_dump_index): Add lto_stream_out.
17510         * gimple-streamer-out.c: Include gimple-pretty-print.h
17511         (output_bb): Dump stmts streamed.
17512         * lto-section-out.c: Include print-tree.h
17513         (lto_begin_section): Dump sections created.
17514         (lto_output_decl_index): Dump decl encoded.
17515         * lto-streamer-out.c: Include print-tree.h
17516         (create_output_block): Dump output block created.
17517         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
17518         (output_function): Dump function output.
17519         (output_constructor): Dump constructor streamed.
17520         (write_global_stream): Output indexes encoded.
17521         (produce_asm_for_decls): Dump streams encoded.
17522         * lto-streamer.c (streamer_dump_file): New global var.
17523         * lto-streamer.h (streamer_dump_file): Declare.
17524         * passes.c (ipa_write_summaries): Initialize streamer dump.
17525         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
17526         in.
17528 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
17530         PR target/86048
17531         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
17532         offsets for register save directives.  Emit a second batch of save
17533         directives, if need be, when the function accesses prior frames.
17535 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17537         * config/arc/fpu.md (fmasf4): Force operand to register.
17538         (fnmasf4): Likewise.
17540 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17542         * config/arc/arc-protos.h (arc_pad_return): Remove.
17543         * config/arc/arc.c (machine_function): Remove force_short_suffix
17544         and size_reason.
17545         (arc_print_operand): Adjust printing of '&'.
17546         (arc_verify_short): Remove conditional printing of short suffix.
17547         (arc_final_prescan_insn): Remove reference to size_reason.
17548         (pad_return): New function.
17549         (arc_reorg): Call pad_return.
17550         (arc_pad_return): Remove.
17551         (arc_init_machine_status): Remove reference to force_short_suffix.
17552         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
17553         (attr length): When attribute iscompact is true force to 2
17554         regardless; in the case of maybe check if we want to force the
17555         instruction to have 4 bytes length.
17556         (nopv): Change it to generate 4 byte long nop as well.
17557         (blockage): New pattern.
17558         (simple_return): Remove call to arc_pad_return.
17559         (p_return_i): Likewise.
17561 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17563         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
17565 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17567         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
17568         ARC cores.
17570 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17572         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
17573         for ARC700 and ARCv2.
17575 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
17577         PR target/86076
17578         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
17579         operands[2] instead of operands[1].
17582 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
17584         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
17585         case, check whether the outer register overlaps an unallocatable
17586         register, not just whether it fits the required class.
17588 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
17590         * poly-int.h (can_div_trunc_p): Add new overload in which all values
17591         are poly_ints.
17592         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
17593         (memrefs_conflict_p): Likewise.
17594         (init_alias_analysis): Likewise.
17595         * cfgexpand.c (expand_debug_expr): Likewise.
17596         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
17597         * cse.c (fold_rtx): Likewise.
17598         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
17599         * expr.c (emit_block_move_hints): Likewise.
17600         (clear_storage_hints, push_block, emit_push_insn): Likewise.
17601         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
17602         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
17603         (emit_group_store): Likewise.
17604         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
17605         to read the PRE/POST_MODIFY increment.
17606         * calls.c (store_one_arg): Use strip_offset.
17607         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
17608         poly_int_rtx_p.
17609         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
17610         by a VEC_SELECT.
17611         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
17612         (simplify_binary_operation_1): Extend CONST_INT handling to
17613         poly_int_rtx_p.
17614         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
17615         than a HOST_WIDE_INT.
17616         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
17617         poly_int64.
17618         (adjust_mems, add_stores): Update accodingly.
17619         (vt_canonicalize_addr): Track polynomial offsets.
17620         (emit_note_insn_var_location): Likewise.
17621         (vt_add_function_parameter): Likewise.
17622         (vt_initialize): Likewise.
17624 2018-06-12  Jeff Law  <law@redhat.com>
17626         * config.gcc (alpha*-*-freebsd*): Remove.
17627         * config/alpha/freebsd.h: Remove.
17629 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
17631         PR other/69968
17632         * spellcheck-tree.c (levenshtein_distance): Rename to...
17633         (get_edit_distance): ...this, and update for underlying renaming.
17634         * spellcheck-tree.h (levenshtein_distance): Rename to...
17635         (get_edit_distance): ...this.
17636         * spellcheck.c (levenshtein_distance): Rename to...
17637         (get_edit_distance): ...this.  Convert from Levenshtein distance
17638         to Damerau-Levenshtein distance by supporting transpositions of
17639         adjacent characters.  Rename "v1" to "v_next" and "v0" to
17640         "v_one_ago".
17641         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
17642         (selftest::test_edit_distance_unit_test_oneway): ...this, and
17643         update for underlying renaming.
17644         (selftest::levenshtein_distance_unit_test): Rename to...
17645         (selftest::test_get_edit_distance_unit): ...this, and update for
17646         underlying renaming.
17647         (selftest::test_find_closest_string): Add example from PR 69968
17648         where transposition helps
17649         (selftest::test_metric_conditions): Update for renaming.
17650         (selftest::test_metric_conditions): Likewise.
17651         (selftest::spellcheck_c_tests): Likewise.
17652         * spellcheck.h (levenshtein_distance): Rename both overloads to...
17653         (get_edit_distance): ...this.
17654         (best_match::consider): Update for renaming.
17656 2018-06-12  Martin Sebor  <msebor@redhat.com>
17658         PR tree-optimization/85259
17659         * builtins.c (compute_objsize): Handle constant offsets.
17660         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
17661         true iff a warning has been issued.
17662         * gimple.h (gimple_nonartificial_location): New function.
17663         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
17664         gimple_nonartificial_location and handle -Wno-system-headers.
17665         (handle_builtin_stxncpy): Same.
17667 2018-06-12  Martin Sebor  <msebor@redhat.com>
17669         PR c/85931
17670         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
17672 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
17674         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17675         BUILTIN_VEC_XST entries for pointer to double and long long.
17677 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
17679         PR target/85990
17680         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17681         Update comments.
17682         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17683         Likewise.
17685 2018-06-12  Martin Liska  <mliska@suse.cz>
17687         * doc/options.texi: Document IntegerRange.
17689 2018-06-12  Martin Liska  <mliska@suse.cz>
17691         * config/i386/i386.opt: Make MPX-related options as Deprecated.
17692         * opt-functions.awk: Handle Deprecated flag.
17693         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
17694         and report error.
17695         (read_cmdline_option): Report warning for a deprecated option.
17696         * opts.h (struct cl_option): Add new field cl_deprecated.
17697         (CL_ERR_DEPRECATED): New.
17699 2018-06-12  Martin Liska  <mliska@suse.cz>
17701         * doc/options.texi: Document Deprecated option flag.
17703 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17705         * config/arc/arc-arch.h (arc_extras): New enum.
17706         (arc_cpu_t):Add field extra.
17707         (arc_cpu_types): Consider the extras.
17708         * config/arc/arc-cpus.def: Add extras info.
17709         * config/arc/arc-opts.h (processor_type): Consider extra field.
17710         * config/arc/arc.c (arc_override_options): Handle extra field.
17712 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17714         * config/arc/arc-arch.h: Update ARC_OPTX macro.
17715         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
17716         field.
17717         * config/arc/arc.c (arc_init): Update pic warning.
17718         (irq_range): Update irq range parsing warnings.
17719         (arc_override_options): Update various warning messages.
17720         (arc_handle_aux_attribute): Likewise.
17722 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
17724         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
17726 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17728         * doc/sourcebuild.texi: Document usage of line number 0 in verify
17729         compiler messages directives.
17731 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
17733         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
17734         * config/mips/mips-tables.opt: Regenerate.
17735         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
17736         mips64r6.
17737         * doc/invoke.texi: Document -march=i6500.
17739 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
17741         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
17742         (i6400_gpmul): Add cpu_unit.
17743         (i6400_gpdiv): Likewise.
17744         (i6400_msa_add_d): Update reservations.
17745         (i6400_msa_int_add) Likewise.
17746         (i6400_msa_short_logic3) Likewise.
17747         (i6400_msa_short_logic2) Likewise.
17748         (i6400_msa_short_logic) Likewise.
17749         (i6400_msa_move) Likewise.
17750         (i6400_msa_cmp) Likewise.
17751         (i6400_msa_short_float2) Likewise.
17752         (i6400_msa_div_d) Likewise.
17753         (i6400_msa_long_logic1) Likewise.
17754         (i6400_msa_long_logic2) Likewise.
17755         (i6400_msa_mult) Likewise.
17756         (i6400_msa_long_float2) Likewise.
17757         (i6400_msa_long_float4) Likewise.
17758         (i6400_msa_long_float5) Likewise.
17759         (i6400_msa_long_float8) Likewise.
17760         (i6400_fpu_fadd): Include frint type.
17761         (i6400_fpu_store): New define_insn_reservation.
17762         (i6400_fpu_load): Likewise.
17763         (i6400_fpu_move): Likewise.
17764         (i6400_fpu_fcmp): Likewise.
17765         (i6400_fpu_fmadd): Likewise.
17766         (i6400_int_mult): Include imul3nc type and update reservation.
17767         (i6400_int_div): Include idiv3 type and update reservation.
17768         (i6400_int_load): Update to check type not move_type.
17769         (i6400_int_store): Likewise.
17770         (i6400_int_prefetch): Set zero latency.
17772 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
17774         * gcc.c: Document new %@{...} sequence.
17775         (LINK_COMMAND_SPEC): Use it for the -L switches.
17776         (cpp_unique_options): Use it for the -I switches.
17777         (at_file_argbuf): New global variable.
17778         (in_at_file): Likewise.
17779         (alloc_args): Create at_file_argbuf.
17780         (clear_args): Truncate at_file_argbuf.
17781         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
17782         (open_at_file): New function.
17783         (close_at_file): Likewise.
17784         (create_at_file): Delete.
17785         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17786         <'o'>: Likewise.
17787         <'@'>: New case.
17788         (validate_switches_from_spec): Deal with %@{...} sequence.
17789         (validate_switches): Likewise.
17790         (driver::finalize): Call clear_args.
17792 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
17794         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17796 2018-06-11  Martin Sebor  <msebor@redhat.com>
17798         * doc/invoke.texi (-Wall): List -Wc++17-compat.
17799         (Wno-class-memaccess): Add @opindex.
17800         (Wno-templates, Wno-multiple-inheritance): Same.
17801         (Wno-virtual-inheritance, Wno-namespaces): Same.
17802         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17803         (Wno-format-overflow, Wno-format-truncation): Same.
17804         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17805         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17806         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17807         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17808         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17809         (Wno-misspelled-isr): Same.
17811 2018-06-11  Martin Sebor  <msebor@redhat.com>
17813         * PR tree-optimization/86083
17814         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17816 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
17818         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17820 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
17822         PR target/85755
17823         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17824         on the correct operand.
17825         (*movdi_internal64): Ditto.
17827 2018-06-11  Martin Liska  <mliska@suse.cz>
17829         PR tree-optimization/86089
17830         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17832 2018-06-11  Julia Koval  <julia.koval@intel.com>
17834         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17835         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17836         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17838 2018-06-11  Olivier Hainque  <hainque@adacore.com>
17840         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17841         for Ada with strict dwarf2.
17843 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
17845         PR target/85755
17846         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17847         addresses.
17849 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
17851         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17853 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
17855         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17856         TARGET_ELF.
17858 2018-06-08  Martin Liska  <mliska@suse.cz>
17860         * tree-cfg.h (debug_function): Fix argument type to match
17861         implementation.
17863 2018-06-08  Martin Liska  <mliska@suse.cz>
17865         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17866         Remove usage of MPX-related (and removed) fields.
17867         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17869 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
17871         * cfg.c (debug): Use TDF_NONE rather than 0.
17872         * cfghooks.c (debug): Likewise.
17873         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17874         (struct dump_option_value_info): Convert to...
17875         (struct kv_pair): ...this template type.
17876         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
17877         rather than 0.
17878         (optinfo_verbosity_options): Likewise.
17879         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
17880         OPTGROUP_NONE.
17881         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
17882         than int for "optgroup_flags" param.
17883         (dump_generic_expr_loc): Use dump_flags_t rather than int for
17884         "dump_kind" param.
17885         (dump_dec): Likewise.
17886         (dump_finish): Use TDF_NONE rather than 0.
17887         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
17888         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
17889         than 0.  Update for change to option_ptr.
17890         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
17891         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
17892         0.  Update for changes to optinfo_verbosity_options and
17893         optgroup_options.
17894         (opt_info_switch_p): Convert optgroup_flags from int to
17895         optgroup_flags_t.
17896         (dump_basic_block): Use dump_flags_t rather than int
17897         for "dump_kind" param.
17898         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
17899         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
17900         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
17901         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
17902         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
17903         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
17904         TDF_NONE): Convert from macros to...
17905         (enum dump_flag): ...this new enum.
17906         (dump_flags_t): Update to use enum.
17907         (operator|, operator&, operator~, operator|=, operator&=):
17908         Implement for dump_flags_t.
17909         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
17910         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
17911         Convert from macros to...
17912         (enum optgroup_flag): ...this new enum.
17913         (optgroup_flags_t): New typedef.
17914         (operator|, operator|=): Implement for optgroup_flags_t.
17915         (struct dump_file_info): Convert field "alt_flags" to
17916         dump_flags_t.  Convert field "optgroup_flags" to
17917         optgroup_flags_t.
17918         (dump_basic_block): Use dump_flags_t rather than int for param.
17919         (dump_generic_expr_loc): Likewise.
17920         (dump_dec): Likewise.
17921         (dump_register): Convert param "optgroup_flags" to
17922         optgroup_flags_t.
17923         (opt_info_enable_passes): Likewise.
17924         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
17925         than 0.
17926         * gimple-pretty-print.c (debug): Likewise.
17927         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
17928         (merged_store_group::apply_stores): Likewise.
17929         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
17930         * gimple.c (verify_gimple_pp): Likewise.
17931         * graphite-poly.c (print_pbb_body): Likewise.
17932         * passes.c (pass_manager::register_one_dump_file): Convert
17933         local "optgroup_flags" to optgroup_flags_t.
17934         * print-tree.c (print_node): Use TDF_NONE rather than 0.
17935         (debug): Likewise.
17936         (debug_body): Likewise.
17937         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
17938         to optgroup_flags_t.
17939         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
17940         than 0.
17941         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
17942         (convert_mult_to_fma): Likewise.
17943         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
17944         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
17945         * tree-vect-data-refs.c (dump_lower_bound): Convert param
17946         "dump_kind" to dump_flags_t.
17948 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
17950         * config/rs6000/rs6000.c (min, max): Delete.
17952 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
17954         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
17955         -mabi=spe and -mabi=no-spe.
17957 2018-06-08  Martin Liska  <mliska@suse.cz>
17959         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
17960         where we expect an existing summary.
17962 2018-06-08  Martin Liska  <mliska@suse.cz>
17964         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
17965         * ipa-inline.h (estimate_edge_growth): Likewise.
17967 2018-06-08  Martin Liska  <mliska@suse.cz>
17969         * cgraph.c (function_version_hasher::hash): Use
17970         cgraph_node::get_uid ().
17971         (function_version_hasher::equal):
17972         * cgraph.h (cgraph_node::get_uid): New method.
17973         * ipa-inline.c (update_caller_keys): Use
17974         cgraph_node::get_uid ().
17975         (update_callee_keys): Likewise.
17976         * ipa-utils.c (searchc): Likewise.
17977         (ipa_reduced_postorder): Likewise.
17978         * lto-cgraph.c (input_node): Likewise.
17979         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
17980         * symbol-summary.h (symtab_insertion): Likewise.
17981         (symtab_removal): Likewise.
17982         (symtab_duplication): Likewise.
17983         * tree-pretty-print.c (dump_function_header): Likewise.
17984         * tree-sra.c (convert_callers_for_node): Likewise.
17986 2018-06-08  Martin Liska  <mliska@suse.cz>
17988         * cgraph.c (symbol_table::create_edge): Always assign a new
17989         unique number.
17990         (symbol_table::free_edge): Do not recycle numbers.
17991         * cgraph.h (cgraph_edge::get): New method.
17992         * symbol-summary.h (symtab_removal): Use it.
17993         (symtab_duplication): Likewise.
17994         (call_summary::hashable_uid): Remove.
17996 2018-06-08  Martin Liska  <mliska@suse.cz>
17998         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
17999         (initialize_growth_caches): Remove.
18000         (free_growth_caches): Likewise.
18001         (do_estimate_edge_time): Use edge_growth_cache.
18002         (do_estimate_edge_size): Likewise.
18003         (do_estimate_edge_hints): Likewise.
18004         * ipa-inline.c (reset_edge_caches): Likewise.
18005         (recursive_inlining): Likewise.
18006         (inline_small_functions): Likewise.
18007         * ipa-inline.h (initialize_growth_caches): Remove.
18008         (estimate_edge_size): Likewise.
18009         (estimate_edge_time): Likewise.
18010         (estimate_edge_hints): Likewise.
18011         (reset_edge_growth_cache): Likewise.
18012         * symbol-summary.h (call_summary::remove): New method.
18014 2018-06-08  Martin Liska  <mliska@suse.cz>
18016         * ipa-cp.c (class edge_clone_summary): New summary.
18017         (grow_edge_clone_vectors): Remove.
18018         (ipcp_edge_duplication_hook): Remove.
18019         (class edge_clone_summary_t): New call_summary class.
18020         (ipcp_edge_removal_hook): Remove.
18021         (edge_clone_summary_t::duplicate): New function.
18022         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18023         (create_specialized_node): Likewise.
18024         (ipcp_driver): Initialize edge_clone_summaries and do not
18025         register hooks.
18027 2018-06-08  Martin Liska  <mliska@suse.cz>
18029         * symbol-summary.h (get): New function.
18030         (call_summary::m_initialize_when_cloning): New class member.
18032 2018-06-08  Martin Liska  <mliska@suse.cz>
18034         * cgraph.c (cgraph_node::remove): Do not recycle uid.
18035         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18036         (symbol_table::allocate_cgraph_symbol): Do not set uid.
18037         * passes.c (uid_hash_t): Record removed_nodes by their uids.
18038         (remove_cgraph_node_from_order): Use the removed_nodes set.
18039         (do_per_function_toporder): Likwise.
18040         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18041         instead of summary_uid.
18042         (symtab_removal): Likewise.
18043         (symtab_duplication): Likewise.
18045 2018-06-08  Martin Liska  <mliska@suse.cz>
18047         * ipa-cp.c (ipcp_store_bits_results): Use
18048         ipcp_transformation_sum.
18049         (ipcp_store_vr_results): Likewise.
18050         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18051         to ...
18052         (ipcp_transformation_initialize): ... this.
18053         (ipa_set_node_agg_value_chain):
18054         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18055         (write_ipcp_transformation_info): Likewise.
18056         (read_ipcp_transformation_info): Likewise.
18057         (ipcp_update_bits): Likewise.
18058         (ipcp_update_vr): Likewise.
18059         (ipcp_transform_function): Likewise.
18060         * ipa-prop.h: Rename ipcp_transformation_summary to
18061         ipcp_transformation.
18062         (class ipcp_transformation_t): New function summary.
18063         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18064         (ipa_get_agg_replacements_for_node): Likewise.
18066 2018-06-08  Martin Liska  <mliska@suse.cz>
18068         * ipa-pure-const.c (struct funct_state_d): Do it class instead
18069         of struct.
18070         (class funct_state_summary_t): New function_summary class.
18071         (has_function_state): Remove.
18072         (get_function_state): Likewise.
18073         (set_function_state): Likewise.
18074         (add_new_function): Likewise.
18075         (funct_state_summary_t::insert): New function.
18076         (duplicate_node_data): Remove.
18077         (remove_node_data): Remove.
18078         (funct_state_summary_t::duplicate): New function.
18079         (register_hooks): Create new funct_state_summaries.
18080         (pure_const_generate_summary): Use it.
18081         (pure_const_write_summary): Likewise.
18082         (pure_const_read_summary): Likewise.
18083         (propagate_pure_const): Likewise.
18084         (propagate_nothrow): Likewise.
18085         (dump_malloc_lattice): Likewise.
18086         (propagate_malloc): Likewise.
18087         (execute): Do not register hooks, just remove summary
18088         instead.
18089         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18090         constructor.
18092 2018-06-08  Martin Liska  <mliska@suse.cz>
18094         * ipa-reference.c (remove_node_data): Remove.
18095         (duplicate_node_data): Likewise.
18096         (class ipa_ref_var_info_summary_t): New class.
18097         (class ipa_ref_opt_summary_t): Likewise.
18098         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18099         (get_reference_optimization_summary): Use
18100         ipa_ref_opt_sum_summaries.
18101         (set_reference_vars_info): Remove.
18102         (set_reference_optimization_summary): Likewise.
18103         (ipa_init): Create summaries.
18104         (init_function_info): Use function summary.
18105         (ipa_ref_opt_summary_t::duplicate): New function.
18106         (ipa_ref_opt_summary_t::remove): New function.
18107         (get_read_write_all_from_node): Fix GNU coding style.
18108         (propagate): Use function summary.
18109         (write_node_summary_p): Fix GNU coding style.
18110         (stream_out_bitmap): Likewise.
18111         (ipa_reference_read_optimization_summary): Use function summary.
18112         (ipa_reference_c_finalize): Do not release hooks.
18114 2018-06-08  Martin Liska  <mliska@suse.cz>
18116         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18117         (analyze_function_body): Extract multiple calls of get_create.
18118         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18119         * ipa-inline.c (recursive_inlining): Use ::get method.
18120         * ipa-inline.h (estimate_edge_growth): Likewise.
18122 2018-06-08  Martin Liska  <mliska@suse.cz>
18124         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18125         HSA_INVALID.
18126         (hsa_function_summary::hsa_function_summary): Use the new enum
18127         value.
18128         (hsa_gpu_implementation_p): Use hsa_summaries::get.
18129         * hsa-gen.c (hsa_get_host_function): Likewise.
18130         (get_brig_function_name): Likewise.
18131         * ipa-hsa.c (process_hsa_functions): Likewise.
18132         (ipa_hsa_write_summary): Likewise.
18133         * symbol-summary.h (symtab_duplication): Use ::get function/
18134         (get): New function.
18136 2018-06-08  Martin Liska  <mliska@suse.cz>
18138         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18139         of get.
18140         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18141         (hsa_register_kernel): Likewise.
18142         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18143         * hsa-gen.c (hsa_get_host_function): Likewise.
18144         (get_brig_function_name): Likewise.
18145         (generate_hsa): Likewise.
18146         (pass_gen_hsail::execute): Likewise.
18147         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18148         (devirtualization_time_bonus): Likewise.
18149         (ipcp_propagate_stage): Likewise.
18150         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18151         (edge_set_predicate): Likewise.
18152         (evaluate_conditions_for_known_args): Likewise.
18153         (evaluate_properties_for_edge): Likewise.
18154         (ipa_fn_summary::reset): Likewise.
18155         (ipa_fn_summary_t::duplicate): Likewise.
18156         (dump_ipa_call_summary): Likewise.
18157         (ipa_dump_fn_summary): Likewise.
18158         (analyze_function_body): Likewise.
18159         (compute_fn_summary): Likewise.
18160         (estimate_edge_devirt_benefit): Likewise.
18161         (estimate_edge_size_and_time): Likewise.
18162         (estimate_calls_size_and_time): Likewise.
18163         (estimate_node_size_and_time): Likewise.
18164         (inline_update_callee_summaries): Likewise.
18165         (remap_edge_change_prob): Likewise.
18166         (remap_edge_summaries): Likewise.
18167         (ipa_merge_fn_summary_after_inlining): Likewise.
18168         (ipa_update_overall_fn_summary): Likewise.
18169         (read_ipa_call_summary): Likewise.
18170         (inline_read_section): Likewise.
18171         (write_ipa_call_summary): Likewise.
18172         (ipa_fn_summary_write): Likewise.
18173         (ipa_free_fn_summary): Likewise.
18174         * ipa-hsa.c (process_hsa_functions): Likewise.
18175         (ipa_hsa_write_summary): Likewise.
18176         (ipa_hsa_read_section): Likewise.
18177         * ipa-icf.c (sem_function::merge): Likewise.
18178         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18179         (do_estimate_edge_time): Likewise.
18180         (estimate_size_after_inlining): Likewise.
18181         (estimate_growth): Likewise.
18182         (growth_likely_positive): Likewise.
18183         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18184         (inline_call): Likewise.
18185         * ipa-inline.c (caller_growth_limits): Likewise.
18186         (can_inline_edge_p): Likewise.
18187         (can_inline_edge_by_limits_p): Likewise.
18188         (compute_uninlined_call_time): Likewise.
18189         (compute_inlined_call_time): Likewise.
18190         (want_inline_small_function_p): Likewise.
18191         (edge_badness): Likewise.
18192         (update_caller_keys): Likewise.
18193         (update_callee_keys): Likewise.
18194         (recursive_inlining): Likewise.
18195         (inline_small_functions): Likewise.
18196         (inline_to_all_callers_1): Likewise.
18197         (dump_overall_stats): Likewise.
18198         (early_inline_small_functions): Likewise.
18199         (early_inliner): Likewise.
18200         * ipa-inline.h (estimate_edge_growth): Likewise.
18201         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18202         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18203         * ipa-prop.h (IPA_NODE_REF): Likewise.
18204         (IPA_EDGE_REF): Likewise.
18205         * ipa-pure-const.c (malloc_candidate_p): Likewise.
18206         (propagate_malloc): Likewise.
18207         * ipa-split.c (execute_split_functions): Likewise.
18208         * symbol-summary.h: Rename get to get_create.
18209         (get): Likewise.
18210         (get_create): Likewise.
18211         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18213 2018-06-08  Martin Liska  <mliska@suse.cz>
18215         * symbol-summary.h (release): Move definition out of class
18216         declaration.
18217         (symtab_removal): Likewise.
18218         (symtab_duplication): Likewise.
18220 2018-06-08  Martin Liska  <mliska@suse.cz>
18222         * symbol-summary.h (function_summary): Move constructor
18223         implementation out of class declaration.
18224         (release): Likewise.
18225         (symtab_insertion): Likewise.
18226         (symtab_removal): Likewise.
18227         (symtab_duplication): Likewise.
18228         (get): Likewise.
18230 2018-06-08  Martin Liska  <mliska@suse.cz>
18232         * Makefile.in: Remove support for MPX (macros, related functions,
18233         fields in cgraph_node, ...).
18234         * builtin-types.def (BT_BND): Likewise.
18235         (BT_FN_BND_CONST_PTR): Likewise.
18236         (BT_FN_CONST_PTR_BND): Likewise.
18237         (BT_FN_VOID_PTR_BND): Likewise.
18238         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
18239         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
18240         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
18241         (expand_builtin_mempcpy_with_bounds): Likewise.
18242         (expand_builtin_memset_with_bounds): Likewise.
18243         (expand_builtin_memset_args): Likewise.
18244         (std_expand_builtin_va_start): Likewise.
18245         (expand_builtin): Likewise.
18246         (expand_builtin_with_bounds): Likewise.
18247         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
18248         (DEF_LIB_BUILTIN_CHKP): Likewise.
18249         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
18250         (DEF_CHKP_BUILTIN): Likewise.
18251         (BUILT_IN_MEMCPY): Likewise.
18252         (BUILT_IN_MEMMOVE): Likewise.
18253         (BUILT_IN_MEMPCPY): Likewise.
18254         (BUILT_IN_MEMSET): Likewise.
18255         (BUILT_IN_STPCPY): Likewise.
18256         (BUILT_IN_STRCAT): Likewise.
18257         (BUILT_IN_STRCHR): Likewise.
18258         (BUILT_IN_STRCPY): Likewise.
18259         (BUILT_IN_STRLEN): Likewise.
18260         (BUILT_IN_MEMCPY_CHK): Likewise.
18261         (BUILT_IN_MEMMOVE_CHK): Likewise.
18262         (BUILT_IN_MEMPCPY_CHK): Likewise.
18263         (BUILT_IN_MEMSET_CHK): Likewise.
18264         (BUILT_IN_STPCPY_CHK): Likewise.
18265         (BUILT_IN_STRCAT_CHK): Likewise.
18266         (BUILT_IN_STRCPY_CHK): Likewise.
18267         * calls.c (store_bounds): Likewise.
18268         (emit_call_1): Likewise.
18269         (special_function_p): Likewise.
18270         (maybe_warn_nonstring_arg): Likewise.
18271         (initialize_argument_information): Likewise.
18272         (finalize_must_preallocate): Likewise.
18273         (compute_argument_addresses): Likewise.
18274         (expand_call): Likewise.
18275         * cfgexpand.c (expand_call_stmt): Likewise.
18276         (expand_return): Likewise.
18277         (expand_gimple_stmt_1): Likewise.
18278         (pass_expand::execute): Likewise.
18279         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18280         (cgraph_node::remove): Likewise.
18281         (cgraph_node::dump): Likewise.
18282         (cgraph_node::verify_node): Likewise.
18283         * cgraph.h (chkp_function_instrumented_p): Likewise.
18284         (symtab_node::get_alias_target): Likewise.
18285         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
18286         (cgraph_local_p): Likewise.
18287         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
18288         (cgraph_edge::rebuild_references): Likewise.
18289         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
18290         (walk_polymorphic_call_targets): Likewise.
18291         (cgraph_node::expand_thunk): Likewise.
18292         (symbol_table::output_weakrefs): Likewise.
18293         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
18294         (ix86_handle_option): Likewise.
18295         * config/i386/constraints.md: Likewise.
18296         * config/i386/i386-builtin-types.def (BND): Likewise.
18297         (VOID): Likewise.
18298         (PVOID): Likewise.
18299         (ULONG): Likewise.
18300         * config/i386/i386-builtin.def (BDESC_END): Likewise.
18301         (BDESC_FIRST): Likewise.
18302         (BDESC): Likewise.
18303         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
18304         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
18305         * config/i386/i386.c (enum reg_class): Likewise.
18306         (ix86_target_string): Likewise.
18307         (ix86_option_override_internal): Likewise.
18308         (ix86_conditional_register_usage): Likewise.
18309         (ix86_valid_target_attribute_inner_p): Likewise.
18310         (ix86_set_indirect_branch_type): Likewise.
18311         (ix86_set_current_function): Likewise.
18312         (ix86_function_arg_regno_p): Likewise.
18313         (init_cumulative_args): Likewise.
18314         (ix86_function_arg_advance): Likewise.
18315         (ix86_function_arg): Likewise.
18316         (ix86_pass_by_reference): Likewise.
18317         (ix86_function_value_regno_p): Likewise.
18318         (ix86_function_value_1): Likewise.
18319         (ix86_function_value_bounds): Likewise.
18320         (ix86_return_in_memory): Likewise.
18321         (ix86_setup_incoming_vararg_bounds): Likewise.
18322         (ix86_va_start): Likewise.
18323         (indirect_thunk_need_prefix): Likewise.
18324         (print_reg): Likewise.
18325         (ix86_print_operand): Likewise.
18326         (ix86_expand_call): Likewise.
18327         (ix86_output_function_return): Likewise.
18328         (reg_encoded_number): Likewise.
18329         (BDESC_VERIFYS): Likewise.
18330         (ix86_init_mpx_builtins): Likewise.
18331         (ix86_init_builtins): Likewise.
18332         (ix86_emit_cmove): Likewise.
18333         (ix86_emit_move_max): Likewise.
18334         (ix86_expand_builtin): Likewise.
18335         (ix86_builtin_mpx_function): Likewise.
18336         (ix86_get_arg_address_for_bt): Likewise.
18337         (ix86_load_bounds): Likewise.
18338         (ix86_store_bounds): Likewise.
18339         (ix86_load_returned_bounds): Likewise.
18340         (ix86_store_returned_bounds): Likewise.
18341         (ix86_class_likely_spilled_p): Likewise.
18342         (ix86_hard_regno_mode_ok): Likewise.
18343         (x86_order_regs_for_local_alloc): Likewise.
18344         (ix86_mitigate_rop): Likewise.
18345         (ix86_bnd_prefixed_insn_p): Likewise.
18346         (ix86_mpx_bound_mode): Likewise.
18347         (ix86_make_bounds_constant): Likewise.
18348         (ix86_initialize_bounds): Likewise.
18349         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
18350         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
18351         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
18352         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
18353         (TARGET_CHKP_BOUND_MODE): Likewise.
18354         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
18355         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
18356         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
18357         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
18358         * config/i386/i386.h (TARGET_MPX): Likewise.
18359         (TARGET_MPX_P): Likewise.
18360         (VALID_BND_REG_MODE): Likewise.
18361         (FIRST_BND_REG): Likewise.
18362         (LAST_BND_REG): Likewise.
18363         (enum reg_class): Likewise.
18364         (BND_REG_P): Likewise.
18365         (BND_REGNO_P): Likewise.
18366         (BNDmode): Likewise.
18367         (ADJUST_INSN_LENGTH): Likewise.
18368         * config/i386/i386.md: Likewise.
18369         * config/i386/i386.opt: Likewise.
18370         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
18371         (defined): Likewise.
18372         (LINK_MPX): Likewise.
18373         (MPX_SPEC): Likewise.
18374         (LIBMPX_SPEC): Likewise.
18375         (LIBMPXWRAPPERS_SPEC): Likewise.
18376         (CHKP_SPEC): Likewise.
18377         * config/i386/predicates.md: Likewise.
18378         * dbxout.c (dbxout_type): Likewise.
18379         * doc/extend.texi: Likewise.
18380         * doc/invoke.texi: Likewise.
18381         * doc/md.texi: Likewise.
18382         * doc/tm.texi: Likewise.
18383         * doc/tm.texi.in: Likewise.
18384         * dwarf2out.c (is_base_type): Likewise.
18385         (gen_formal_types_die): Likewise.
18386         (gen_subprogram_die): Likewise.
18387         (gen_type_die_with_usage): Likewise.
18388         (gen_decl_die): Likewise.
18389         (dwarf2out_late_global_decl): Likewise.
18390         * expr.c (expand_assignment): Likewise.
18391         (emit_storent_insn): Likewise.
18392         (store_expr_with_bounds): Likewise.
18393         (store_expr): Likewise.
18394         (expand_expr_real_1): Likewise.
18395         * expr.h (store_expr_with_bounds): Likewise.
18396         * function.c (use_register_for_decl): Likewise.
18397         (struct bounds_parm_data): Likewise.
18398         (assign_parms_augmented_arg_list): Likewise.
18399         (assign_parm_find_entry_rtl): Likewise.
18400         (assign_parm_is_stack_parm): Likewise.
18401         (assign_parm_load_bounds): Likewise.
18402         (assign_bounds): Likewise.
18403         (assign_parms): Likewise.
18404         (expand_function_start): Likewise.
18405         * gcc.c (CHKP_SPEC): Likewise.
18406         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
18407         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
18408         (wrestrict_dom_walker::check_call): Likewise.
18409         * gimple.c (gimple_build_call_from_tree): Likewise.
18410         * gimple.h (enum gf_mask): Likewise.
18411         (gimple_call_with_bounds_p): Likewise.
18412         (gimple_call_set_with_bounds): Likewise.
18413         * gimplify.c (gimplify_init_constructor): Likewise.
18414         * ipa-cp.c (initialize_node_lattices): Likewise.
18415         (propagate_constants_across_call): Likewise.
18416         (find_more_scalar_values_for_callers_subset): Likewise.
18417         * ipa-hsa.c (process_hsa_functions): Likewise.
18418         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
18419         * ipa-icf.c (sem_function::merge): Likewise.
18420         * ipa-inline.c (early_inliner): Likewise.
18421         * ipa-pure-const.c (warn_function_noreturn): Likewise.
18422         (warn_function_cold): Likewise.
18423         (propagate_pure_const): Likewise.
18424         * ipa-ref.h (enum GTY): Likewise.
18425         * ipa-split.c (find_retbnd): Likewise.
18426         (consider_split): Likewise.
18427         (split_function): Likewise.
18428         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
18429         * ipa.c (walk_polymorphic_call_targets): Likewise.
18430         (symbol_table::remove_unreachable_nodes): Likewise.
18431         (process_references): Likewise.
18432         (cgraph_build_static_cdtor_1): Likewise.
18433         * lto-cgraph.c (lto_output_node): Likewise.
18434         (output_refs): Likewise.
18435         (compute_ltrans_boundary): Likewise.
18436         (input_overwrite_node): Likewise.
18437         (input_node): Likewise.
18438         (input_cgraph_1): Likewise.
18439         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
18440         * passes.c (pass_manager::execute_early_local_passes): Likewise.
18441         (class pass_chkp_instrumentation_passes): Likewise.
18442         (make_pass_chkp_instrumentation_passes): Likewise.
18443         * passes.def: Likewise.
18444         * rtl.h (struct GTY): Likewise.
18445         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
18446         * stor-layout.c (layout_type): Likewise.
18447         * symtab.c: Likewise.
18448         * target.def: Likewise.
18449         * targhooks.c (default_chkp_bound_type): Likewise.
18450         (default_chkp_bound_mode): Likewise.
18451         (default_builtin_chkp_function): Likewise.
18452         (default_chkp_function_value_bounds): Likewise.
18453         (default_chkp_make_bounds_constant): Likewise.
18454         (default_chkp_initialize_bounds): Likewise.
18455         * targhooks.h (default_chkp_bound_type): Likewise.
18456         (default_chkp_bound_mode): Likewise.
18457         (default_builtin_chkp_function): Likewise.
18458         (default_chkp_function_value_bounds): Likewise.
18459         (default_chkp_make_bounds_constant): Likewise.
18460         (default_chkp_initialize_bounds): Likewise.
18461         * toplev.c (compile_file): Likewise.
18462         (process_options): Likewise.
18463         * tree-core.h (DEF_BUILTIN): Likewise.
18464         (DEF_BUILTIN_CHKP): Likewise.
18465         * tree-inline.c (declare_return_variable): Likewise.
18466         (remap_gimple_stmt): Likewise.
18467         (copy_bb): Likewise.
18468         (initialize_inlined_parameters): Likewise.
18469         (expand_call_inline): Likewise.
18470         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
18471         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
18472         (make_pass_ipa_chkp_produce_thunks): Likewise.
18473         (make_pass_chkp): Likewise.
18474         (make_pass_chkp_opt): Likewise.
18475         (make_pass_chkp_instrumentation_passes): Likewise.
18476         * tree-pretty-print.c (dump_generic_node): Likewise.
18477         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
18478         * tree-ssa-dce.c (propagate_necessity): Likewise.
18479         (eliminate_unnecessary_stmts): Likewise.
18480         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
18481         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
18482         * tree-ssa-sccvn.h: Likewise.
18483         * tree-ssa-strlen.c (get_string_length): Likewise.
18484         (valid_builtin_call): Likewise.
18485         (adjust_last_stmt): Likewise.
18486         (handle_builtin_strchr): Likewise.
18487         (handle_builtin_strcpy): Likewise.
18488         (handle_builtin_stxncpy): Likewise.
18489         (handle_builtin_memcpy): Likewise.
18490         (handle_builtin_strcat): Likewise.
18491         (strlen_check_and_optimize_stmt): Likewise.
18492         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
18493         * tree-streamer-in.c: Likewise.
18494         * tree-streamer.c (record_common_node): Likewise.
18495         * tree.c (tree_code_size): Likewise.
18496         (wide_int_to_tree_1): Likewise.
18497         (type_contains_placeholder_1): Likewise.
18498         (build_common_tree_nodes): Likewise.
18499         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
18500         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
18501         (POINTER_BOUNDS_P): Likewise.
18502         (BOUNDED_TYPE_P): Likewise.
18503         (BOUNDED_P): Likewise.
18504         (CALL_WITH_BOUNDS_P): Likewise.
18505         (pointer_bounds_type_node): Likewise.
18506         * value-prof.c (gimple_ic): Likewise.
18507         * var-tracking.c (vt_add_function_parameters): Likewise.
18508         * varasm.c (make_decl_rtl): Likewise.
18509         (assemble_start_function): Likewise.
18510         (output_constant): Likewise.
18511         (maybe_assemble_visibility): Likewise.
18512         * varpool.c (ctor_for_folding): Likewise.
18513         * chkp-builtins.def: Remove.
18514         * ipa-chkp.c: Remove.
18515         * ipa-chkp.h: Remove.
18516         * rtl-chkp.c: Remove.
18517         * rtl-chkp.h: Remove.
18518         * tree-chkp-opt.c: Remove.
18519         * tree-chkp.c: Remove.
18520         * tree-chkp.h: Remove.
18522 2018-06-07  Carl Love  <cel@us.ibm.com>
18524         * config/rs6000/vsx.md (vextract_fp_from_shorth,
18525         vextract_fp_from_shortl): Add BE support.
18527 2018-06-07  Paul Koning  <ni1d@arrl.net>
18529         * compare-elim.c (try_merge_compare): Don't merge compare if
18530         address contains a side effect.
18531         (try_eliminate_compare): Likewise.
18533 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
18535         * config.gcc: Support "tremont".
18536         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
18537         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18538         PROCESSOR_TREMONT.
18539         * config/i386/i386.c (m_TREMONT): Define.
18540         (processor_target_table): Add "tremont".
18541         (PTA_TREMONT): Define.
18542         (ix86_lea_outperforms): Add TARGET_TREMONT.
18543         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
18544         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
18545         and M_INTEL_GOLDMONT_PLUS.
18546         (fold_builtin_cpu): Add "tremont".
18547         (ix86_add_stmt_cost): Add TARGET_TREMONT.
18548         (ix86_option_override_internal): Add "tremont".
18549         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
18550         (processor_type): Add PROCESSOR_TREMONT.
18551         * config/i386/x86-tune.def: Add m_TREMONT.
18552         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
18554 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18556         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
18557         symbol defined for msp430i* devices to be lower case.
18559 2018-06-07  Richard Biener  <rguenther@suse.de>
18561         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
18562         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
18563         Properly wrap signed arithmetic if overflow wraps.
18565 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
18567         PR tree-optimization/69615
18568         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
18569         of a cast from a same precision integral SSA_NAME in a bb dominated
18570         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
18571         cast to utype if rhs2 has already a compatible type.
18573 2018-06-07  Richard Biener  <rguenther@suse.de>
18575         PR tree-optimization/85935
18576         * graphite-scop-detection.c (find_params_in_bb): Analyze
18577         condition operands with respect to the correct loop.  Assert
18578         the analysis doesn't fail.
18580 2018-06-04  Carl Love  <cel@us.ibm.com>
18582         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
18583         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
18584         as it is slightly cheaper.
18585         (first_match_or_eos_index_<mode>):
18586         Calculate index using natural element order.
18587         (first_match_index_<mode>):
18588         Calculate index using natural element order.
18589         (first_match_or_eos_index_<mode>):
18590         Calculate index using natural order.
18591         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
18592         for BE and LE modes.
18593         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
18594         P9V_BUILTIN_VCLZLSBB_V16QI.
18595         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
18596         specific.
18598 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18600         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
18601         indentation and line wrap for many prototypes.  Add missing
18602         @smallexample directives around block of prototypes for vec_xl and
18603         vec_xst.
18605 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
18607         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
18608         track if we pass or return IEEE 128-bit floating point.
18609         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
18610         C++ mangling that is compatible with GCC 8.1.
18611         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
18612         (init_cumulative_args): Note if we pass or return IEEE 128-bit
18613         floating point types.
18614         (rs6000_function_arg_advance_1): Likewise.
18615         (rs6000_mangle_type): Optionally generate mangled names that match
18616         what GCC 8.1 generated for IEEE 128-bit floating point types.
18617         (rs6000_globalize_decl_name): If we have an external function that
18618         passes or returns IEEE 128-bit types, generate a weak reference
18619         from the mangled name used in GCC 8.1 to the current mangled
18620         name.
18621         (rs6000_init_builtins): Make __ibm128 use the long double type if
18622         long double is IBM extended double.  Make __float128 use the long
18623         double type if long double is IEEE 128-bit.
18625         PR target/85657
18626         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
18627         macro for __ibm128 built-in functions.
18628         (PACK_IF): Add __ibm128 pack/unpack functions.
18629         (UNPACK_IF): Likewise.
18630         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
18631         enable long double built-in functions if long double is IEEE
18632         128-bit floating point.
18633         (rs6000_invalid_builtin): Update long double built-in function
18634         error message.
18635         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
18636         functions, adjust the built-in function to use the long double
18637         built-in function if __ibm128 and long double are the same type.
18638         * doc/extend.texi (PowerPC builtins): Update documention for
18639         __builtin_{,un}pack_longdouble.  Add documentation for
18640         __builtin_{,un}pack_ibm128.
18642 2018-06-06  Jim Wilson  <jimw@sifive.com>
18644         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
18645         (struct machine_function): New field interrupt_mode.
18646         (riscv_handle_type_attribute): New function.  Add forward declaration.
18647         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
18648         (riscv_expand_epilogue): Check interrupt_mode field.
18649         (riscv_set_current_function): Check interrupt attribute args and
18650         set interrupt_mode field.
18651         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
18652         (riscv_sret, riscv_uret): New.
18653         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
18654         new arguments to interrupt attribute.
18656 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
18658         PR target/63177
18659         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
18660         Don't handle -mcpu=power8 if -mpower9-vector is also used.
18662 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18664         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
18665         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
18666         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18667         several redundant entries.
18669 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
18671         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
18672         type from "rtx" to "rtx_insn *".
18673         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
18674         for local "call_insn", removing cast.
18675         (ix86_expand_call): Likewise, introducing a "call_insn" local.
18677 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
18679         PR tree-optimization/86066
18680         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
18681         for BIT_INSERT_EXPR stores.
18683 2018-06-06  Richard Biener  <rguenther@suse.de>
18685         PR tree-optimization/86062
18686         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18687         component refs ontop
18688         of to be offsetted base.
18690 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18692         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
18693         to be static and remove check on interrupt attribute name.
18695 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18697         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18698         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
18700 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
18702         PR target/79924
18703         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
18704         second argument.
18705         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
18706         Remove second argument, change how error is called.
18707         (aarch64_layout_arg): Remove second argument from
18708         aarch64_err_no_fpadvsimd call.
18709         (aarch64_init_cumulative_args): Ditto.
18710         (aarch64_gimplify_va_arg_expr): Ditto.
18711         * config/aarch64/aarch64.md (mov<mode>): Ditto.
18713 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
18715         * config/i386/i386.md (simple_return_indirect_internal): New expander.
18716         (*simple_return_indirect_internal<mode>): Rename from
18717         simple_return_indirect_internal.  Use W mode iterator.
18718         (rstorssp): New expander.
18719         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
18720         (clrssbsy): New expander.
18721         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
18723 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18725         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
18726         __typeof__.
18727         (cmse_check_pointed_object): Likewise.
18729 2018-06-05  Martin Liska  <mliska@suse.cz>
18731         PR gcov-profile/47618
18732         * doc/invoke.texi: Document how -fprofile-dir format
18733         is extended.
18735 2018-06-05  Richard Biener  <rguenther@suse.de>
18737         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
18738         removal pretend DOM info isn't available so we do not update
18739         it and only remove edges, not dominated blocks.  Actually free
18740         DOM info in case we removed something.  Remove unreachable blocks.
18741         (mfb_keep_latches): Work with either DOM info or marked backedges.
18742         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
18743         first.  Mark backedges if DOM info isn't available.
18744         (Re-)compute DOM info after cleanup_control_flow_pre.
18746 2018-06-05  Richard Biener  <rguenther@suse.de>
18748         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
18749         (locus_discrim_hasher::hash): Adjust.
18750         (locus_discrim_hasher::equal): Likewise.
18751         (next_discriminator_for_locus): Work on line directly.
18752         (same_line_p): Pass in expanded locus1 as well.
18753         (assign_discriminators): Avoid redundant location expansions.
18755 2018-06-05  Richard Biener  <rguenther@suse.de>
18757         PR tree-optimization/86046
18758         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
18759         if required after clearing TREE_ADDRESSABLE.
18761 2018-06-05  Richard Biener  <rguenther@suse.de>
18763         PR tree-optimization/86047
18764         * tree-ssa-loop.c (for_each_index): Glob handling of all
18765         decls and constants and really handle all of them.
18767 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18769         PR target/81497
18770         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
18771         qualifier_void_pointer and qualifier_const_void_pointer.
18772         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
18773         (arm_init_builtins): Handle the above.
18774         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
18775         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
18776         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
18777         void intrinsics.
18779 2018-06-05  Martin Liska  <mliska@suse.cz>
18781         * auto-profile.c (read_autofdo_file): Do not use
18782         gcov_ctr_summary struct.
18783         (afdo_callsite_hot_enough_for_early_inline): Likewise.
18784         * coverage.c (struct counts_entry): Likewise.
18785         (read_counts_file): Read just single summary entry.
18786         (get_coverage_counts): Use gcov_summary struct.
18787         * coverage.h (get_coverage_counts): Likewise.
18788         * gcov-dump.c (dump_working_sets): Likewise.
18789         (tag_summary): Dump just single summary.
18790         * gcov-io.c (gcov_write_summary): Write just histogram
18791         summary.
18792         (gcov_read_summary): Read just single summary.
18793         (compute_working_sets): Use gcov_summary struct.
18794         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18795         of GCOV_COUNTERS_SUMMABLE.
18796         (GCOV_COUNTERS_SUMMABLE): Remove.
18797         (GCOV_FIRST_VALUE_COUNTER): Replace with
18798         GCOV_COUNTER_V_INTERVAL.
18799         (struct gcov_ctr_summary): Remove.
18800         (struct gcov_summary): Directly use fields of former
18801         gcov_ctr_summary.
18802         (compute_working_sets): Use gcov_summary struct.
18803         * gcov.c (read_count_file): Do not use ctrs fields.
18804         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18805         struct.
18806         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18807         struct.
18808         * profile.c: Likewise.
18809         * profile.h: Likewise.
18811 2018-06-05  Martin Liska  <mliska@suse.cz>
18813         PR gcov-profile/84846
18814         * gcov.c (output_lines): Print working directory only
18815         in intermediate format.
18817 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
18819         * config/s390/s390-builtin-types.def: Add void function type.
18820         * config/s390/s390-builtins.def: Use the function type for the
18821         tbeginc builtin.
18823 2018-06-04  Jim Wilson  <jimw@sifive.com>
18825         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18826         to int.
18827         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18828         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
18829         handle EH_RETURN_DATA_REGNO registers properly.
18830         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18831         (riscv_expand_epilogue): Update comment.  Change argument name and
18832         type.  Update code to use new name and type.  Pass new args to
18833         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
18834         EXCEPTION_RETURN.
18835         * config/riscv/riscv.md (NORMAL_RETURN): New.
18836         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18837         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18838         (eh_return): Call gen_eh_return_internal and emit barrier.
18839         (eh_return_internal): Call riscv_expand_epilogue.
18841 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
18843         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18844         bit_insertion field and declare can_be_merged_into method.
18845         (merged_store_group::can_be_merged_into): New method.
18846         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18847         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
18848         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18850 2018-06-04  Richard Biener  <rguenther@suse.de>
18852         PR tree-optimization/85955
18853         * builtins.c (fold_builtin_sincos): Convert pointers to
18854         destination to appropriate type before dereferencing.
18856 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
18858         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18860 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
18862         * expr.c (expand_expr_real_1): Force the operand into memory if
18863         its TYPE_MODE is BLKmode and if there is no integer mode for
18864         the number of bits being extracted.
18866 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
18868         PR target/85832
18869         PR target/86036
18870         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18871         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18873 2018-06-04  Richard Biener  <rguenther@suse.de>
18875         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
18876         (cleanup_tree_cfg_noloop): ... single caller.  Do
18877         start_recording_case_labels later.
18879 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
18881         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
18882         to _IMMINTRIN_H_INCLUDED.
18883         * config/i386/pconfigintrin.h: Ditto.
18884         * config/i386/waitpkgintrin.h: Ditto.
18885         * config/i386/immintrin.h: Add includes for sgxintrin.h,
18886         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
18887         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
18888         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
18889         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
18890         waitpkgintrin.h and cldemoteintrin.h.
18892 2018-06-04  Richard Biener  <rguenther@suse.de>
18894         PR tree-optimization/86038
18895         * tracer.c (find_best_successor): Check probability for
18896         being initialized, bail out if not.
18898 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
18900         PR target/86003
18901         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
18902         of bits to ignore when comparing architectures.
18904 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
18906         PR tree-optimization/69615
18907         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
18908         maximum or minimum of the type, try to merge it also as if
18909         range1 is + [-, x - 1] or + [x + 1, -].
18911         PR c++/86025
18912         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
18914 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
18916         PR tree-optimization/86034
18917         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
18918         the unsigned bitfield type in a bit insertion sequence if it does not
18919         have a larger precision than the bitfield size.
18920         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
18922 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
18924         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
18926 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
18928         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
18929         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
18930         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
18931         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
18933 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
18935         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
18936         Disable -fdelete-null-pointer-checks for ELF toolchain.
18938 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18939             Kito Cheng  <kito.cheng@gmail.com>
18941         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
18942         (nds32le-*-*, nds32be-*-*): Integrate checking process.
18943         (nds32*-*-*): Add glibc and uclibc conditions.
18944         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
18945         (TARGET_EXCEPT_UNWIND_INFO): Define.
18946         * config/nds32/elf.h: New file.
18947         * config/nds32/linux.h: New file.
18948         * config/nds32/nds32-elf.opt: New file.
18949         * config/nds32/nds32-linux.opt: New file.
18950         * config/nds32/nds32-fp-as-gp.c
18951         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
18952         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
18953         TARGET_LINUX_ABI.
18954         (nds32_asm_file_end): Ditto.
18955         (nds32_print_operand): Ditto.
18956         (nds32_insert_attributes): Ditto.
18957         (nds32_init_libfuncs): New function.
18958         (TARGET_HAVE_TLS): Define.
18959         (TARGET_INIT_LIBFUNCS): Define.
18960         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
18961         spec content.
18962         (TARGET_ELF): Apply different mcmodel setting.
18963         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
18964         been migrated into elf.h and linux.h files.
18965         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
18966         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
18967         (mcmodel): The content has been migrated into nds32-elf.opt and
18968         nds32-linux.opt files.
18969         * config/nds32/t-elf: New file.
18970         * config/nds32/t-linux: New file.
18972 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18973             Shiva Chen  <shiva0217@gmail.com>
18975         * config/nds32/constants.md (unspec_volatile_element): Add
18976         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
18977         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
18978         optimization.
18979         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
18980         (make_pass_nds32_fp_as_gp): Declare.
18981         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
18982         optmization pass.
18983         (nds32_asm_function_end_prologue): Remove unused asm output.
18984         (nds32_asm_function_begin_epilogue): Remove unused asm output.
18985         (nds32_asm_file_start): Output necessary fp_as_gp information.
18986         (nds32_option_override): Adjust register usage.
18987         (nds32_expand_prologue): Consider fp_as_gp situation.
18988         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
18989         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
18990         (epilogue): Ditto.
18991         (return): Ditto.
18992         (simple_return): Ditto.
18993         (omit_fp_begin): Output special directive for fp_as_gp.
18994         (omit_fp_end): Output special directive for fp_as_gp.
18995         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
18996         mforbid-fp-as-gp): New options.
18998 2018-06-01  Mark Wielaard  <mark@klomp.org>
19000         * dwarf2out.c (dwarf2out_finish): Remove generation of
19001         DW_AT_loclists_base.
19003 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
19005         * gimple-ssa-store-merging.c: Include gimple-fold.h.
19006         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19007         (struct merged_store_group): Add bit_insertion field.
19008         (dump_char_array): Use standard hexadecimal format.
19009         (merged_store_group::merged_store_group): Set bit_insertion to false.
19010         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
19011         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
19012         also print the mask in the dump file.
19013         (pass_store_merging::gate): Minor tweak.
19014         (imm_store_chain_info::coalesce_immediate): Fix wrong association
19015         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
19016         stores with INTEGER_CST stores.
19017         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19018         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19019         and use it throughout.  Generate bit insertion sequences if need be.
19020         (pass_store_merging::process_store): Remove redundant condition.
19021         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19023 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
19025         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19026         the 128-bit floating point types.  Fix function comment.
19028 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19030         * config/aarch64/aarch64-simd.md
19031         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19032         mnemonics.
19033         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19034         mnemonics.
19036 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19038         PR tree-optimization/85989
19039         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19040         variable.
19041         (backprop::intersect_uses): Check it when deciding whether this
19042         is a backedge reference.
19043         (backprop::process_block): Add each phi to m_visited_phis
19044         after visiting it, then clear it at the end.
19046 2018-06-01  Richard Biener  <rguenther@suse.de>
19048         * tree-vectorizer.h (vect_dr_stmt): New function.
19049         (vect_get_load_cost): Adjust.
19050         (vect_get_store_cost): Likewise.
19051         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19052         Use vect_dr_stmt instead of DR_SMTT.
19053         (vect_record_base_alignments): Likewise.
19054         (vect_calculate_target_alignment): Likewise.
19055         (vect_compute_data_ref_alignment): Likewise and make static.
19056         (vect_update_misalignment_for_peel): Likewise.
19057         (vect_verify_datarefs_alignment): Likewise.
19058         (vector_alignment_reachable_p): Likewise.
19059         (vect_get_data_access_cost): Likewise.  Pass down
19060         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19061         (vect_get_peeling_costs_all_drs): Likewise.
19062         (vect_peeling_hash_get_lowest_cost): Likewise.
19063         (vect_enhance_data_refs_alignment): Likewise.
19064         (vect_find_same_alignment_drs): Likewise.
19065         (vect_analyze_data_refs_alignment): Likewise.
19066         (vect_analyze_group_access_1): Likewise.
19067         (vect_analyze_group_access): Likewise.
19068         (vect_analyze_data_ref_access): Likewise.
19069         (vect_analyze_data_ref_accesses): Likewise.
19070         (vect_vfa_segment_size): Likewise.
19071         (vect_small_gap_p): Likewise.
19072         (vectorizable_with_step_bound_p): Likewise.
19073         (vect_prune_runtime_alias_test_list): Likewise.
19074         (vect_analyze_data_refs): Likewise.
19075         (vect_supportable_dr_alignment): Likewise.
19076         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19077         (vect_gen_prolog_loop_niters): Likewise.
19078         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19079         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19080         modify DR_STMT.
19081         (vect_recog_mask_conversion_pattern): Likewise.
19082         (vect_try_gather_scatter_pattern): Likewise.
19083         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19084         to vect_get_store_cost.
19085         (vect_get_store_cost): Get stmt_info instead of DR.
19086         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19087         (vect_get_load_cost): Get stmt_info instead of DR.
19089 2018-06-01  Richard Biener  <rguenther@suse.de>
19091         PR middle-end/86017
19092         * gimple-fold.c (var_decl_component_p): Also allow offsetted
19093         vars wrapped in MEM_REFs.
19095 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
19097         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19098         Fix subreg tests so that we only return a choice between
19099         GENERAL_REGS and FP_REGS if the original classes included both.
19101 2018-06-01  Richard Biener  <rguenther@suse.de>
19103         PR ipa/85960
19104         * tree-ssa-structalias.c (get_function_part_constraint):
19105         Handle NULL fi->decl.
19106         (find_func_aliases_for_call): Properly handle indirect
19107         fi from direct call.
19108         (find_func_clobbers): Likewise.
19109         (ipa_pta_execute): Likewise.
19110         (create_variable_info_for): For functions that are ifunc_resolver
19111         resolve to a varinfo that contains the result of the resolver call.
19112         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19113         aliases.
19115 2018-05-31  Michael Collison  <michael.collison@arm.com>
19117         * config/aarch64/aarch64.md:
19118         (*fix_to_zero_extenddfdi2): New pattern.
19119         * gcc.target/aarch64/fix_extend1.c: New testcase.
19121 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
19123         PR middle-end/78809
19124         PR middle-end/83026
19125         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19126         and BUILT_IN_STRNCMP_EQ.
19127         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19128         BUILT_IN_STRNCMP_EQ.
19129         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19130         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19131         (gimple_fold_builtin): Likewise.
19132         * tree-ssa-strlen.c (compute_string_length): New function.
19133         (determine_min_obsize): New function.
19134         (handle_builtin_string_cmp): New function to handle calls to
19135         string compare functions.
19136         (strlen_optimize_stmt): Add handling to builtin string compare
19137         calls.
19138         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19139         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19140         * tree.c (build_common_builtin_nodes): Add new defines of
19141         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19143 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
19145         PR target/85984
19146         * bb-reorder.c (pass_partition_blocks::gate): Return false for
19147         functions with naked attribute.
19149 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
19151         * config/i386/sse.md (avx_vec_concat<mode>):
19152         Substitute concat_tg_mode mode attribute with xtg_mode.
19153         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19154         (concat_tg_mode): Remove mode attribute.
19156 2018-05-31  Martin Sebor  <msebor@redhat.com>
19158         PR c/82063
19159         * calls.c (alloc_max_size): Correct a logic error/typo.
19160         Treat excessive arguments as infinite.  Warn for invalid arguments.
19161         * doc/invoke.texi (-Walloc-size-larger-than): Update.
19163 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
19165         PR target/85829
19166         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19167         and movx for Haswell.
19169 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
19170             Cesar Philippidis  <cesar@codesourcery.com>
19172         PR middle-end/85879
19173         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19174         when emitting error on private/firstprivate reductions.
19175         * omp-low.c (lower_omp_target): Avoid reference-type processing
19176         on pointers for firstprivate clause.
19178 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
19180         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19181         (st1x2): Likewise.
19182         (st1x3): Likewise.
19183         * config/aarch64/aarch64-simd.md
19184         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19185         (aarch64_ld1_x3_<mode>): Likewise
19186         (aarch64_st1x2<VALLDIF:mode>): Likewise
19187         (aarch64_st1_x2_<mode>): Likewise
19188         (aarch64_st1x3<VALLDIF:mode>): Likewise
19189         (aarch64_st1_x3_<mode>): Likewise
19190         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19191         (vld1_s8_x3): Likewise.
19192         (vld1_u16_x3): Likewise.
19193         (vld1_s16_x3): Likewise.
19194         (vld1_u32_x3): Likewise.
19195         (vld1_s32_x3): Likewise.
19196         (vld1_u64_x3): Likewise.
19197         (vld1_s64_x3): Likewise.
19198         (vld1_f16_x3): Likewise.
19199         (vld1_f32_x3): Likewise.
19200         (vld1_f64_x3): Likewise.
19201         (vld1_p8_x3): Likewise.
19202         (vld1_p16_x3): Likewise.
19203         (vld1_p64_x3): Likewise.
19204         (vld1q_u8_x3): Likewise.
19205         (vld1q_s8_x3): Likewise.
19206         (vld1q_u16_x3): Likewise.
19207         (vld1q_s16_x3): Likewise.
19208         (vld1q_u32_x3): Likewise.
19209         (vld1q_s32_x3): Likewise.
19210         (vld1q_u64_x3): Likewise.
19211         (vld1q_s64_x3): Likewise.
19212         (vld1q_f16_x3): Likewise.
19213         (vld1q_f32_x3): Likewise.
19214         (vld1q_f64_x3): Likewise.
19215         (vld1q_p8_x3): Likewise.
19216         (vld1q_p16_x3): Likewise.
19217         (vld1q_p64_x3): Likewise.
19218         (vst1_s64_x2): Likewise.
19219         (vst1_u64_x2): Likewise.
19220         (vst1_f64_x2): Likewise.
19221         (vst1_s8_x2): Likewise.
19222         (vst1_p8_x2): Likewise.
19223         (vst1_s16_x2): Likewise.
19224         (vst1_p16_x2): Likewise.
19225         (vst1_s32_x2): Likewise.
19226         (vst1_u8_x2): Likewise.
19227         (vst1_u16_x2): Likewise.
19228         (vst1_u32_x2): Likewise.
19229         (vst1_f16_x2): Likewise.
19230         (vst1_f32_x2): Likewise.
19231         (vst1_p64_x2): Likewise.
19232         (vst1q_s8_x2): Likewise.
19233         (vst1q_p8_x2): Likewise.
19234         (vst1q_s16_x2): Likewise.
19235         (vst1q_p16_x2): Likewise.
19236         (vst1q_s32_x2): Likewise.
19237         (vst1q_s64_x2): Likewise.
19238         (vst1q_u8_x2): Likewise.
19239         (vst1q_u16_x2): Likewise.
19240         (vst1q_u32_x2): Likewise.
19241         (vst1q_u64_x2): Likewise.
19242         (vst1q_f16_x2): Likewise.
19243         (vst1q_f32_x2): Likewise.
19244         (vst1q_f64_x2): Likewise.
19245         (vst1q_p64_x2): Likewise.
19246         (vst1_s64_x3): Likewise.
19247         (vst1_u64_x3): Likewise.
19248         (vst1_f64_x3): Likewise.
19249         (vst1_s8_x3): Likewise.
19250         (vst1_p8_x3): Likewise.
19251         (vst1_s16_x3): Likewise.
19252         (vst1_p16_x3): Likewise.
19253         (vst1_s32_x3): Likewise.
19254         (vst1_u8_x3): Likewise.
19255         (vst1_u16_x3): Likewise.
19256         (vst1_u32_x3): Likewise.
19257         (vst1_f16_x3): Likewise.
19258         (vst1_f32_x3): Likewise.
19259         (vst1_p64_x3): Likewise.
19260         (vst1q_s8_x3): Likewise.
19261         (vst1q_p8_x3): Likewise.
19262         (vst1q_s16_x3): Likewise.
19263         (vst1q_p16_x3): Likewise.
19264         (vst1q_s32_x3): Likewise.
19265         (vst1q_s64_x3): Likewise.
19266         (vst1q_u8_x3): Likewise.
19267         (vst1q_u16_x3): Likewise.
19268         (vst1q_u32_x3): Likewise.
19269         (vst1q_u64_x3): Likewise.
19270         (vst1q_f16_x3): Likewise.
19271         (vst1q_f32_x3): Likewise.
19272         (vst1q_f64_x3): Likewise.
19273         (vst1q_p64_x3): Likewise.
19275 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19277         * config/msp430/msp430.c (msp430_output_labelref): Prepend
19278         user_label_prefix to name.
19280         * tree-core.h: Update comment about the format of NAME string
19281         passed to handler in attribute_spec.
19283         * config/msp430/msp430.md: Remove erroneous subreg expression from
19284         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
19285         zero_extend{q,h}isi2.
19287 2018-05-30  Borislav Petkov  <bp@suse.de>
19289         * doc/extend.texi: Document some architecture specific
19290         constraints and sort entries.
19292 2018-05-30  Martin Sebor  <msebor@redhat.com>
19294         PR middle-end/85369
19295         * builtins.c (expand_builtin_stpcpy_1): New function.
19296         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
19297         only if the former succeeds.
19299 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
19301         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
19302         in saphira.
19304 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19306         * doc/invoke.texi (-flinker-output): Document
19308 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19310         * passes.c (ipa_write_summaries): Only modify statements if body
19311         is in memory.
19312         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
19313         incrementally linking.
19314         (ipa_passes): Likewise.
19315         * lto-cgraph.c (lto_output_node): When incrementally linking do not
19316         pass down resolution info.
19317         * common.opt (flag_incremental_link): Update info.
19318         * gcc.c (plugin specs): Turn flinker-output=* to
19319         -plugin-opt=-linker-output-known
19320         * toplev.c (compile_file): Also cut compilation when doing incremental
19321         link.
19322         * flag-types. (enum lto_partition_model): Add
19323         LTO_LINKER_OUTPUT_NOLTOREL.
19324         (invoke.texi): Add -flinker-output docs.
19325         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
19326         link same way as WPA; do not stream in dead initializers.
19328         * dwarf2out.c (dwarf2out_die_ref_for_decl,
19329         darf2out_register_external_decl): Support incremental link.
19331 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19333         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
19335 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
19337         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
19338         it down to simple_object_copy_lto_debug_sections.
19339         (run_gcc): Determine incremental LTO link time and configure
19340         lto1 into non-wpa mode, disable renaming of debug sections.
19342 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19344         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19345         descriptions of various incorrectly documented functions.
19347 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19349         Revert:
19350         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19351         address check not strict.
19353 2018-05-30  Richard Biener  <rguenther@suse.de>
19355         PR tree-optimization/85964
19356         * tracer.c (better_p): Drop initialized count check, we only
19357         call the function with initialized counts now.
19358         (find_best_successor): Do find a best edge if one
19359         has uninitialized count.
19360         (find_best_predecessor): Likewise.  Do BB frequency check only
19361         if count is initialized.
19363 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
19365         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
19366         (aarch64_ldrstr_offset_compare): New.
19367         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
19368         load/store orderings.
19369         (aarch64_gen_adjusted_ldpstp): Likewise.
19371 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
19373         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19374         Check for subset of GENERAL_REGS and FP_REGS.
19375         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
19376         r=w alternative.
19378 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
19380         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
19381         and wi::to_poly_offset.  Add the current offset and then check
19382         whether the sum fits, rather than using an unchecked addition of
19383         a checked term.  Check for a shwi rather than a uhwi.
19384         * expr.c (get_bit_range): Use tree_to_poly_uint64.
19385         (store_constructor): Use poly_int_tree_p.
19386         (expand_expr_real_1): Likewise.
19387         * function.c (assign_temp): Likewise.
19388         * fold-const.c (const_binop): Use poly_int_tree_p and
19389         wi::to_poly_offset.
19390         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
19391         division.
19392         * ipa-icf-gimple.c (func_checker::compare_operand): Use
19393         to_poly_offset for MEM offsets.
19394         * ipa-icf.c (sem_variable::equals): Likewise.
19395         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
19396         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
19397         wi::to_poly_offset for BIT_FIELD_REF offsets.
19398         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
19399         wi::to_poly_offset.
19400         * var-tracking.c (emit_note_insn_var_location): Use
19401         tree_to_poly_uint64.
19403 2018-05-29  Jim Wilson  <jimw@sifive.com>
19405         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
19407 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
19409         PR target/85950
19410         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
19411         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
19412         sequence.
19413         (sse4_1_round<mode>2): Use nonimmediate_operand
19414         for operand 1 predicate.
19416 2018-05-29  Martin Sebor  <msebor@redhat.com>
19417             Richard Biener  <rguenther@suse.de>
19419         PR testsuite/85888
19420         * calls.c (get_size_range): Call determine_value_range instead
19421         of get_value_range..
19422         * tree-vrp.h (determine_value_range): Declared new function.
19423         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
19425 2018-05-29  Richard Biener  <rguenther@suse.de>
19427         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
19428         sure to use non-pattern stmts for get_earlier_stmt arguments.
19429         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
19430         called on pattern stmts.
19431         (get_later_stmt): Likewise.
19433 2018-05-29  Martin Liska  <mliska@suse.cz>
19435         PR gcov-profile/85759
19436         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
19437         env variables.
19439 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
19441         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
19442         VEC_UNPACK_*_EXPR.
19443         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
19444         VEC_PACK_*_EXPR.
19446         PR target/85918
19447         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19448         VEC_PACK_FLOAT_EXPR): New tree codes.
19449         * tree-pretty-print.c (op_code_prio): Handle
19450         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19451         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19452         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19453         * tree-inline.c (estimate_operator_cost): Likewise.
19454         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
19455         * fold-const.c (const_binop): Likewise.
19456         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
19457         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19458         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19459         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
19460         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19461         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19462         * expr.c (expand_expr_real_2): Likewise.
19463         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
19464         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
19465         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
19466         optabs.
19467         * optabs.c (expand_widen_pattern_expr): For
19468         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
19469         sign from result type rather than operand's type.
19470         (expand_binop_directly): For vec_packu_float_optab and
19471         vec_packs_float_optab allow result type to be different from operand's
19472         type.
19473         * optabs-tree.c (optab_for_tree_code): Handle
19474         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19475         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
19476         * tree-vect-generic.c (expand_vector_operations_1):  Handle
19477         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19478         VEC_PACK_FLOAT_EXPR.
19479         * tree-vect-stmts.c (supportable_widening_operation): Handle
19480         FIX_TRUNC_EXPR.
19481         (supportable_narrowing_operation): Handle FLOAT_EXPR.
19482         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
19483         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
19484         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
19485         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
19486         mode attributes.
19487         (vec_pack<floatprefix>_float_<mode>): New expander.
19488         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
19489         attributes.
19490         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
19491         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
19492         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
19493         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
19494         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
19495         Document.
19496         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
19497         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
19498         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19499         VEC_PACK_FLOAT_EXPR): Document.
19501 2018-05-29  Richard Biener  <rguenther@suse.de>
19503         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
19504         member.
19505         (stmt_vec_info_vec): Make pointer.
19506         (init_stmt_vec_info_vec): Remove.
19507         (free_stmt_vec_info_vec): Likewise.
19508         (set_stmt_vec_info_vec): New function.
19509         (free_stmt_vec_infos): Likewise.
19510         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
19511         (set_vinfo_for_stmt): Likewise.
19512         (get_earlier_stmt): Likewise.
19513         (get_later_stmt): Likewise.
19514         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
19515         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
19516         (vec_info::~vec_info): Free stmt_vec_infos.
19517         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
19518         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
19519         (pass_slp_vectorize::execute): Likewise.
19520         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
19521         (free_stmt_vec_info_vec): Likewise.
19522         (set_stmt_vec_info_vec): New function.
19523         (free_stmt_vec_infos): Likewise.
19524         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
19525         the global stmt_vec_info_vec.
19526         * tree-parloops.c (gather_scalar_reductions): Use
19527         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
19528         vector.
19530 2018-05-29  Richard Biener  <rguenther@suse.de>
19532         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
19534 2018-05-29  Martin Liska  <mliska@suse.cz>
19535             David Malcolm  <dmalcolm@redhat.com>
19537         * vec.c (test_reverse): New.
19538         (vec_c_tests): Add new test.
19539         * vec.h (vl_ptr>::reverse): New function.
19541 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
19543         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
19545         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
19546         and later.
19548 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
19550         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
19552 2018-05-28  Richard Biener  <rguenther@suse.de>
19554         PR tree-optimization/85933
19555         * tree-vect-data-refs.c (vect_record_base_alignments): Only
19556         look at stmts marked as vectorizable.
19558 2018-05-28  Richard Biener  <rguenther@suse.de>
19560         PR tree-optimization/85934
19561         * tree-vect-generic.c (expand_vector_operations_1): Hoist
19562         vector boolean check before scalar optimization.
19564 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
19566         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
19567         for armv5te.
19569 2018-05-28  Mark Wielaard  <mark@klomp.org>
19571         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
19572         if it is an expression containing a minus sign.
19574 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
19576         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
19578 2018-05-27  Paul Koning  <ni1d@arrl.net>
19580         * config/pdp11/pdp11.md (truncsihi2): Remove.
19582 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
19583             Chung-Ju Wu  <jasonwucj@gmail.com>
19585         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
19586         implementation.
19587         (unaligned_store_dw): Ditto.
19588         * config/nds32/nds32-memory-manipulation.c
19589         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
19590         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
19591         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
19592         (emit_setmem_word_loop): Rename to ...
19593         (emit_setmem_doubleword_loop): ... this.
19594         (nds32_gen_dup_4_byte_to_word_value): New function.
19595         (nds32_gen_dup_8_byte_to_double_word_value): New function.
19596         (nds32_expand_setmem_loop): Refine implementation.
19597         (nds32_expand_setmem_loop_v3m): Ditto.
19598         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
19599         pattern.
19601 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19603         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
19605 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19607         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
19608         (nds32_init_machine_status): Initialize machine->attr_naked_p and
19609         machine->attr_no_prologue_p.
19610         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
19611         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
19612         (nds32_expand_epilogue): Consider attr_naked_p.
19613         (nds32_expand_epilogue_v3pop): Likewise.
19614         (nds32_can_use_return_insn): Likewise.
19615         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
19616         attr_no_prologue_p fields.
19617         * config/nds32/nds32.opt (mret-in-naked-func): New option.
19619 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
19621         PR target/85918
19622         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19623         attributes.
19624         * config/i386/sse.md
19625         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
19626         Rename to ...
19627         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
19628         ... this.
19629         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
19630         Rename to ...
19631         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
19632         ... this.
19633         (*<floatsuffix>floatv2div2sf2): Rename to ...
19634         (*float<floatunssuffix>v2div2sf2): ... this.
19635         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
19636         (float<floatunssuffix>v2div2sf2_mask): ... this.
19637         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
19638         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
19639         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
19640         to ...
19641         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
19642         ... this.
19643         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19644         Rename to ...
19645         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19646         ... this.
19647         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19648         Rename to ...
19649         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19650         ... this.
19651         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
19652         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
19653         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
19654         gen_ufix_truncv8dfv8si2.
19655         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
19656         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
19657         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
19658         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
19659         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
19660         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
19661         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
19662         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
19664 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
19666         PR target/85900
19667         PR target/85345
19668         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
19670 2018-05-25  Jim Wilson  <jimw@sifive.com>
19672         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
19673         * config/riscv/riscv.c (struct machine_function): Add
19674         interrupt_handler_p and attribute_checked_p fields.
19675         (riscv_attribute_table): Add interrupt.
19676         (riscv_interrupt_type_p): New.
19677         (riscv_save_reg_p): Save extra regs for interrupt handler.
19678         (riscv_use_save_libcall): Return false  for interrupt handler.
19679         (riscv_first_stack_step): Add forward declaration.
19680         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
19681         for interrupt handler with large frame.  Use it for saved reg list.
19682         (riscv_expand_prologue): Move flag_stack_usage_info support to
19683         eliminate duplication.
19684         (riscv_expand_epilogue): Generate mret for interrupt handler.
19685         (riscv_epilogue_uses): New.
19686         (riscv_can_use_return_insn): Return false for interrupt handler.
19687         (riscv_function_ok_for_sibcall): Likewise.
19688         (riscv_set_current_function): Add interrupt handler support.
19689         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
19690         * config/riscv/riscv.md (UNSPECV_MRET): New.
19691         (GP_REGNUM): New.
19692         (riscv_frflags, riscv_fsflags): Use tab after opcode.
19693         (riscv_mret): New.
19694         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
19696 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
19698         PR tree-optimization/85712
19699         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
19700         this candidate has already been replaced in-situ by a copy.
19702 2018-05-25  Jason Merrill  <jason@redhat.com>
19704         PR c++/80485 - inline function non-zero address.
19705         * symtab.c (nonzero_address): Check DECL_COMDAT.
19707 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
19709         PR target/83628
19710         * config/alpha/alpha.md (ashlsi3): New insn pattern.
19711         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
19712         extension of SImode operation.  Use const123_operand predicate.
19713         (*saddsi_1): Remove.
19714         (*saddl_se_1): Ditto.
19715         (*ssubsi_1): Ditto.
19716         (*ssubl_se_1): Ditto.
19717         * config/alpha/predicates.md (const123_operand): New predicate.
19718         * config/alpha/constraints.md (P): Use IN_RANGE.
19720 2018-05-25  Richard Biener  <rguenther@suse.de>
19722         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
19723         defaulted to true.
19724         (ref_maybe_used_by_stmt_p): Likewise.
19725         (stmt_may_clobber_ref_p): Likewise.
19726         (stmt_may_clobber_ref_p_1): Likewise.
19727         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
19728         and pass it along.
19729         (ref_maybe_used_by_stmt_p): Likewise.
19730         (stmt_may_clobber_ref_p): Likewise.
19731         (stmt_may_clobber_ref_p_1): Likewise.
19732         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
19733         the alias oracle to disambiguate DRs with stmts DR analysis
19734         couldn't handle.
19735         (vect_analyze_data_refs): Do not give up on not analyzable
19736         DRs for BB vectorization.  Remove code truncating the dataref
19737         vector.
19739 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
19741         PR target/85832
19742         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19743         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
19744         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
19746 2018-05-25  Richard Biener  <rguenther@suse.de>
19748         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
19749         function, combining stmt data ref gathering and fatal analysis
19750         parts.
19751         (vect_analyze_data_refs): Remove now redudnant code and simplify.
19752         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
19753         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
19754         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
19755         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
19757 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19759         PR tree-optimization/85720
19760         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
19761         SCC if all partitions are builtins.
19762         (version_loop_by_alias_check): New parameter.  Generate cancelable
19763         runtime alias check if all partitions are builtins.
19764         (distribute_loop): Update call to above function.
19766 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19768         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
19769         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
19770         (parm_default_def_partition_arg): Ditto.
19771         (set_parm_default_def_partition): Ditto.
19772         (get_parm_default_def_partitions): Ditto and make it static.
19773         (get_undefined_value_partitions): Ditto and make it static.
19774         (remove_ssa_form): Refactor call to init_var_map here.
19775         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
19776         computation for loop region.
19777         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
19778         (register_default_def): Delete.
19779         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
19780         (parm_default_def_partition_arg): Ditto.
19781         (set_parm_default_def_partition): Ditto.
19782         (get_parm_default_def_partitions): Ditto and make it static.
19783         (get_undefined_value_partitions): Ditto and make it static.
19784         (coalesce_with_default, coalesce_with_default): Update comment.
19785         (create_coalesce_list_for_region): New func factored out from
19786         create_outofssa_var_map.
19787         (populate_coalesce_list_for_outofssa): New func factored out from
19788         create_outofssa_var_map and coalesce_ssa_name.
19789         (create_outofssa_var_map): Delete.
19790         (coalesce_ssa_name): Refactor to support live range computation.
19791         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19792         (get_parm_default_def_partitions): Delete.
19793         (get_undefined_value_partitions): Ditto.
19794         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19795         computation for loop region.
19796         (new_tree_live_info, loe_visit_block): Ditto.
19797         (live_worklist, set_var_live_on_entry): Ditto.
19798         (calculate_live_on_exit, verify_live_on_entry): Ditto.
19799         * tree-ssa-live.h (struct _var_map): New fields.
19800         (init_var_map): Change decl.
19801         (region_contains_p): New.
19803 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19805         * tree-ssa-live.h (live_merge_and_clear): Delete.
19807 2018-05-25  Richard Biener  <rguenther@suse.de>
19809         PR c++/85912
19810         * tree-dump.c (dequeue_and_dump): Remove access to removed
19811         operand 2 of a SWITCH_EXPR.
19813 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19815         * doc/sourcebuild.texi (vect_double_cond_arith): Include
19816         multiplication and division.
19817         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19818         (cond_udiv@var{m}, cond_umod@var{m}): Document.
19819         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19820         (cond_udiv_optab, cond_umod_optab): New optabs.
19821         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19822         (IFN_COND_RDIV): New internal functions.
19823         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19824         TRUNC_MOD_EXPR and RDIV_EXPR.
19825         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19826         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19827         New unspecs.
19828         (SVE_INT_BINARY): Include mult.
19829         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19830         (optab, sve_int_op): Handle mult.
19831         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19832         UNSPEC_COND_DIV.
19833         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19834         for SVE_INT_BINARY_SD.
19836 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19838         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19839         (optab, sve_int_op): Handle div and udiv.
19840         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19841         for SVE_INT_BINARY_SD.
19842         (*<optab><mode>3): New insn for the same.
19844 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19846         * tree-vect-patterns.c: Include predict.h.
19847         (vect_recog_divmod_pattern): Restrict check for division support
19848         to when optimizing for size.
19850 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19852         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19853         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19854         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19855         (gimple_match_op::set_op): Likewise.
19856         (gimple_resimplify4): Declare.
19857         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19858         (expr::gen_transform): Likewise.
19859         (decision_tree::gen): Generate a simplification routine for 4 operands.
19860         * gimple-match-head.c (gimple_simplify): Add an overload for
19861         4 operands.  In the top-level function, handle up to 4 call
19862         arguments and call gimple_resimplify4.
19863         (gimple_resimplify4): New function.
19864         (build_call_internal): Pass a fourth operand.
19865         (maybe_push_to_seq): Likewise.
19866         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19867         Fold VEC_COND_EXPRs of an operation and a default value into
19868         an IFN_COND_* function if possible.
19869         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19870         New unspecs.
19871         (SVE_COND_FP_BINARY): Include them.
19872         (optab, sve_fp_op): Handle them.
19873         (SVE_INT_BINARY_REV): New code iterator.
19874         (SVE_COND_FP_BINARY_REV): New int iterator.
19875         (commutative): New int attribute.
19876         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
19877         Declare.
19878         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
19879         function.
19880         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
19881         (*cond_<optab><mode>): New patterns for reversed operands.
19883 2018-05-25  Richard Biener  <rguenther@suse.de>
19885         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
19886         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
19887         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
19888         (STMT_VINFO_GROUPED_ACCESS): Adjust.
19889         * tree-vect-data-refs.c (everywhere): Adjust users.
19890         * tree-vect-loop.c (everywhere): Likewise.
19891         * tree-vect-slp.c (everywhere): Likewise.
19892         * tree-vect-stmts.c (everywhere): Likewise.
19893         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
19895 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19897         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
19898         Rename to...
19899         (gcc_cv_as_section_exclude): ... this.
19900         Try Solaris as #exclude syntax.
19901         * configure: Regenerate.
19902         * config.in: Regenerate.
19903         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
19904         SECTION_EXCLUDE.
19905         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
19906         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
19908         * varasm.c (default_elf_asm_named_section): Don't check if
19909         HAVE_GAS_SECTION_EXCLUDE is defined.
19911 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19913         * doc/md.texi: Update the documentation of the cond_* optabs
19914         to mention the new final operand.  Fix GET_MODE_NUNITS call.
19915         Describe the scalar case too.
19916         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
19917         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
19918         instead of 2.
19919         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
19920         (get_conditional_internal_fn): Update comment.
19921         * tree-vect-loop.c (vectorizable_reduction): Pass the original
19922         accumulator value as a final argument to conditional functions.
19923         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
19924         a define_expand and add an "else" operand.  Assert for now that
19925         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
19926         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
19927         (*cond_<optab><mode>): New patterns.
19928         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
19929         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19930         (UNSPEC_COND_EOR): Delete.
19931         (optab): Remove associated mappings.
19932         (SVE_INT_BINARY): New code iterator.
19933         (sve_int_op): Remove int attribute and add "minus" to the code
19934         attribute.
19935         (SVE_COND_INT_OP): Delete.
19936         (SVE_COND_FP_OP): Rename to...
19937         (SVE_COND_FP_BINARY): ...this.
19939 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19941         * optabs.c (can_reuse_operands_p): New function.
19942         (maybe_legitimize_operands): Try to reuse the results for
19943         earlier operands.
19945 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
19947         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
19948         Add {q} suffix to insn mnemonic.
19950 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19952         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
19953         (msp430_warn_func_return): New.
19955 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
19957         * fold-const.c (tree_nonzero_bits): New function.
19958         * fold-const.h (tree_nonzero_bits): Likewise.
19959         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
19960         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
19962 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
19964         PR target/85900
19965         PR target/85345
19966         * varasm.c (assemble_alias): Check ifunc_resolver only on
19967         FUNCTION_DECL.
19969 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
19971         PR target/85903
19972         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
19973         when memory input operand is handled.
19975 2018-05-24  Luis Machado  <luis.machado@linaro.org>
19977         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
19978         global.
19979         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
19981 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
19983         * match.pd: Delay FMA folds until after vectorization.
19985 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19987         PR target/83009
19988         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19989         address check not strict.
19991 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
19993         * gimple-match.h (gimple_match_op): New class.
19994         (mprts_hook): Replace parameters with a gimple_match_op *.
19995         (maybe_build_generic_op): Likewise.
19996         (gimple_simplified_result_is_gimple_val): Replace parameters with
19997         a const gimple_match_op *.
19998         (gimple_simplify): Replace code_helper * and tree * parameters with
19999         a gimple_match_op * parameter.
20000         (gimple_resimplify1): Replace code_helper *, tree and tree *
20001         parameters with a gimple_match_op * parameter.
20002         (gimple_resimplify2): Likewise.
20003         (gimple_resimplify3): Likewise.
20004         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20005         parameters with a gimple_match_op * parameter.
20006         * gimple-match-head.c (gimple_simplify): Change prototypes of
20007         auto-generated functions to take a gimple_match_op * instead of
20008         separate code_helper * and tree * parameters.  Make the same
20009         change in the top-level overload and update calls to the
20010         gimple_resimplify routines.  Update calls to the auto-generated
20011         functions and to maybe_push_res_to_seq in the publicly-facing
20012         operation-specific gimple_simplify overloads.
20013         (gimple_match_op::MAX_NUM_OPS): Define.
20014         (gimple_resimplify1): Replace rcode and ops with a single res_op
20015         parameter.  Update call to gimple_simplify.
20016         (gimple_resimplify2): Likewise.
20017         (gimple_resimplify3): Likewise.
20018         (mprts_hook): Replace parameters with a gimple_match_op *.
20019         (maybe_build_generic_op): Likewise.
20020         (build_call_internal): Replace type, nargs and ops with
20021         a gimple_match_op *.
20022         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20023         with a single gimple_match_op *.  Update calls to mprts_hook,
20024         build_call_internal and gimple_simplified_result_is_gimple_val.
20025         Factor out code that is common to the tree_code and combined_fn cases.
20026         * genmatch.c (expr::gen_transform): Replace tem_code and
20027         tem_ops with a gimple_match_op called tem_op.  Update calls
20028         to the gimple_resimplify functions and maybe_push_res_to_seq.
20029         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20030         res_ops.  Update call to the gimple_resimplify functions.
20031         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20032         (decision_tree::gen): Make the functions take a gimple_match_op *
20033         called res_op instead of separate res_code and res_ops parameters.
20034         Update call accordingly.
20035         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20036         and ops with a single res_op parameter.  Update calls to
20037         maybe_build_generic_op and maybe_push_res_to_seq.
20038         (fold_stmt_1): Update calls to gimple_simplify and
20039         replace_stmt_with_simplification.
20040         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20041         and gimple_simplified_result_is_gimple_val.
20042         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20043         gimple_simplify.
20044         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20045         with a gimple_match_op *.
20046         (vn_nary_build_or_lookup): Likewise.  Update call to
20047         vn_nary_build_or_lookup_1.
20048         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20049         gimple_match_op *.  Update calls to the gimple_resimplify routines
20050         and to gimple_simplified_result_is_gimple_val.
20051         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20052         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20053         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20054         (visit_nary_op): Likewise.
20055         (visit_reference_op_load): Likewise.
20057 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20059         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20060         modifier for printing the step amount.
20062 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
20064         PR target/78849
20065         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20066         types.
20068 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
20070         * doc/sourcebuild.texi (Endianness): New subsubsection.
20072 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20074         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20075         <prefetch_dynamic_strides>: New const bool field.
20076         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20077         prefetch_dynamic_strides.
20078         (exynosm1_prefetch_tune): Likewise.
20079         (thunderxt88_prefetch_tune): Likewise.
20080         (thunderx_prefetch_tune): Likewise.
20081         (thunderx2t99_prefetch_tune): Likewise.
20082         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20083         false.
20084         (aarch64_override_options_internal): Update to set
20085         PARAM_PREFETCH_DYNAMIC_STRIDES.
20086         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20087         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20088         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20089         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20090         prefetch-dynamic-strides setting.
20092 2018-05-23  Luis Machado  <luis.machado@linaro.org>
20094         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20095         <minimum_stride>: New const int field.
20096         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20097         minimum_stride field defaulting to -1.
20098         (exynosm1_prefetch_tune): Likewise.
20099         (thunderxt88_prefetch_tune): Likewise.
20100         (thunderx_prefetch_tune): Likewise.
20101         (thunderx2t99_prefetch_tune): Likewise.
20102         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20103         <default_opt_level>: Set to 3.
20104         (aarch64_override_options_internal): Update to set
20105         PARAM_PREFETCH_MINIMUM_STRIDE.
20106         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20107         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20108         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20109         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20110         stride is constant and is below the minimum stride threshold.
20112 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20114         * config/arm/arm-cpus.in (mode26): Delete.
20115         (armv4): Delete mode26 reference.
20116         * config/arm/arm.c (arm_configure_build_target): Delete use of
20117         isa_bit_mode26.
20119 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20121         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20122         New insn pattern.
20123         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20124         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
20125         for non-SSE modes.
20126         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
20127         (floatunsdidf2): Ditto.
20129 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
20131         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20132         (fixuns_trunc<mode>si2_avx512f): Ditto.
20133         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20134         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20135         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20137 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20139         PR rtl-optimization/79985
20140         * df-scan.c (df_insn_refs_collect): Remove special case for
20141         global registers and asm statements.
20143 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
20145         * extend.texi (Global Register Variables): Rewrite the bullet list.
20146         Note that the register is available for allocation. Note that access
20147         via inline asm must use constraints. Add note about async-signal
20148         handlers. Remove paragraph about automagic register selection.
20150 2018-05-23  Richard Biener  <rguenther@suse.de>
20152         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20153         of fixed offset from memset VN.
20155 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
20157         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20158         first_interp field.
20159         (alloc_cand_and_find_basis): Initialize first_interp field.
20160         (slsr_process_mul): Modify first_interp field.
20161         (slsr_process_add): Likewise.
20162         (slsr_process_cast): Modify first_interp field for each new
20163         interpretation.
20164         (slsr_process_copy): Likewise.
20165         (dump_candidate): Dump first_interp field.
20166         (replace_mult_candidate): Process all interpretations, not just
20167         subsequent ones.
20168         (replace_rhs_if_not_dup): Likewise.
20169         (replace_one_candidate): Likewise.
20171 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
20173         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20174         Add new boolean.
20175         (aarch64_needs_frame_chain): New function.
20176         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20178 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
20180         PR target/84882
20181         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20182         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20183         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20184         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20185         as true for strict-align.
20186         (aarch64_can_inline_p): Perform checks even when callee has no
20187         attributes to check for strict alignment.
20188         * doc/extend.texi (AArch64 Function Attributes): Document
20189         no-strict-align.
20190         * doc/invoke.texi: (AArch64 Options): Likewise.
20192 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
20194         PR tree-optimization/85853
20195         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20196         the handling of the root of the node to...
20197         (vect_slp_analyze_node_operations_1): ...this new function,
20198         and run the whole thing with the child nodes' def types
20199         set according to their SLP node's def type.
20201 2018-05-23  Richard Biener  <rguenther@suse.de>
20203         PR middle-end/85874
20204         * tree-data-ref.c (create_runtime_alias_checks): Defer
20205         and ignore overflow warnings.
20207 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
20209         PR tree-optimization/85822
20210         * tree-vrp.c (is_masked_range_test): Fix handling of negative
20211         constants.
20213 2018-05-23  Richard Biener  <rguenther@suse.de>
20215         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20216         memset constants via native_interpret_expr.
20218 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
20220         PR target/85345
20221         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
20222         attribute.
20223         (cgraph_node::create_alias): Likewise.
20224         (cgraph_node::get_availability): Check ifunc_resolver instead
20225         of looking up ifunc attribute.
20226         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
20227         * varasm.c (do_assemble_alias): Likewise.
20228         (assemble_alias): Likewise.
20229         (default_binds_local_p_3): Likewise.
20230         * cgraph.h (cgraph_node): Add ifunc_resolver.
20231         (cgraph_node::only_called_directly_or_aliased_p): Return false
20232         for IFUNC resolver.
20233         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
20234         attribute.
20235         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
20236         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
20237         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
20238         instead of looking up ifunc attribute.
20240 2018-05-22  Luis Machado  <luis.machado@linaro.org>
20242         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
20244 2018-05-22  Martin Sebor  <msebor@redhat.com>
20246         PR middle-end/85359
20247         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
20248         only when expasion succeeds.
20249         (expand_builtin_strcmp): Same.
20250         (expand_builtin_strncmp): Same.
20252 2018-05-22  Martin Sebor  <msebor@redhat.com>
20254         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
20256 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
20257             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20259         * config/aarch64/aarch64-ldpstp.md: Replace uses of
20260         aarch64_mem_pair_operand with memory_operand and delete operand swapping
20261         code.
20262         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20263         Add check for legitimate_address.
20264         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
20265         (aarch64_swap_ldrstr_operands): New.
20266         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
20267         Define prototype.
20269 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
20270             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20272         * config/aarch64/aarch64.md: New patterns to generate stp
20273         and ldp.
20274         (store_pair_sw, store_pair_dw): New patterns to generate stp for
20275         single words and double words.
20276         (load_pair_sw, load_pair_dw): Likewise.
20277         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
20278         Delete.
20279         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
20280         Delete.
20281         * config/aarch64/aarch64-ldpstp.md: Modify peephole
20282         for different mode ldpstp and add peephole for merged zero stores.
20283         Likewise for loads.
20284         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20285         Add size check.
20286         (aarch64_gen_store_pair): Rename calls to match new patterns.
20287         (aarch64_gen_load_pair): Rename calls to match new patterns.
20288         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
20289         (load_pair<DREG:mode><DREG2:mode>): ... This.
20290         (store_pair<mode>): Rename to...
20291         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
20292         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
20293         New mode iterators.
20294         (V_INT_EQUIV): Handle SImode.
20295         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
20296         New predicate.
20298 2018-05-22  Martin Sebor  <msebor@redhat.com>
20300         PR c/85623
20301         * calls.c (maybe_warn_nonstring_arg): Use string length to set
20302         or ajust the presumed bound on an operation to avoid unnecessary
20303         warnings.
20305 2018-05-22  Martin Sebor  <msebor@redhat.com>
20307         PR tree-optimization/85826
20308         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
20309         assuming that a DECL necesarily has a constant size.
20311 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
20313         PR middle-end/85862
20314         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
20316 2018-05-22  Richard Biener  <rguenther@suse.de>
20318         PR tree-optimization/85834
20319         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
20320         non-constant and non-zero memset arguments.
20322 2018-05-22  Martin Liska  <mliska@suse.cz>
20324         PR ipa/85607
20325         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
20327 2018-05-22  Richard Biener  <rguenther@suse.de>
20329         PR tree-optimization/85863
20330         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
20331         comparisons when vectype is specified.
20332         (vectorizable_condition): Do not specify vectype for
20333         vect_is_simple_cond when SLP vectorizing.
20335 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
20337         PR target/85657
20338         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
20339         define __ibm128 as long double.
20340         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
20341         as a distinct type when IEEE 128-bit support is enabled.
20342         (init_float128_ieee): Fix up conversions between IFmode and IEEE
20343         128-bit types to use the correct functions.
20344         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
20345         convert between 128-bit floating point types that have different
20346         modes but the same representation, instead of using gen_lowpart to
20347         makean alias.
20348         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
20349         KFmode.
20350         (IFKF_reg): New attributes to give the register constraints for
20351         IFmode and KFmode.
20352         (extend<mode>tf2_internal): New insns to mark an explicit
20353         conversion between 128-bit floating point types that have a
20354         different mode but share the same representation.
20356 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
20358         PR tree-optimization/85814
20359         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
20360         a null return from get_strinfo when unsharing the next
20361         strinfo in the chain.
20363 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
20365         PR gcc/84923
20366         * varasm.c (weak_finish): Clean up weak_decls.
20368 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20370         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
20371         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
20372         UNSPEC_UADALP values.
20373         * config/aarch64/iterators.md (ABAL): New int iterator.
20374         (ABDL2): Likewise.
20375         (ADALP): Likewise.
20376         (sur): Add mappings for the above.
20377         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
20378         New define_insn.
20379         (aarch64_<sur>abal<mode>_4): Likewise.
20380         (aarch64_<sur>adalp<mode>_3): Likewise.
20381         (<sur>sadv16qi): New define_expand.
20383 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
20385         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
20386         (*movdf_internal): Ditto.
20387         (*rcpsf2_sse): Ditto.
20388         (*rsqrtsf2_sse): Ditto.
20389         (*sqrt<mode>2_sse): Ditto.
20391 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
20393         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
20394         eor3q<mode>4.
20395         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
20396         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
20397         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
20398         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
20399         vbcaxq_s64): New.
20400         * config/aarch64/arm_neon.h: Likewise.
20401         * config/aarch64/iterators.md (VQ_I): New.
20403 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
20405         * config.gcc: Add arc/t-multilib-linux to tmake_file for
20406         arc*-*-linux*.
20407         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
20408         MULTILIB_DIRNAMES
20410 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
20412         * config/nds32/constraints.md (S): New constraint.
20413         * config/nds32/nds32.md (call_internal): Use constraint S.
20414         (call_value_internal): Likewise.
20415         (sibcall_internal): Likewise.
20416         (sibcall_value_internal): Likewise.
20418 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
20419             Chung-Ju Wu  <jasonwucj@gmail.com>
20421         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
20422         into consideration.
20424 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
20425             Chung-Ju Wu  <jasonwucj@gmail.com>
20427         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
20428         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
20429         (nds32_rtx_costs_impl): Simplify.
20430         (nds32_address_cost_impl): Simplify.
20431         (nds32_init_rtx_costs): New function.
20432         (nds32_rtx_costs_speed_prefer): Likewise.
20433         (nds32_rtx_costs_size_prefer): Likewise.
20434         (nds32_address_cost_speed_prefer): Likewise.
20435         (nds32_address_cost_speed_fwprop): Likewise.
20436         (nds32_address_cost_size_prefer): Likewise.
20437         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
20438         * config/nds32/nds32.c (nds32_option_override): Use
20439         nds32_init_rtx_costs function.
20441 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
20443         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
20444         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
20445         (TARGET_PIPELINE_N8): Likewise.
20446         (TARGET_PIPELINE_N10): Likewise.
20447         (TARGET_PIPELINE_N13): Likewise.
20448         (TARGET_PIPELINE_GRAYWOLF): Likewise.
20450 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
20452         * config/nds32/nds32-fpu.md: Update copyright year.
20454 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20456         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
20458 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20460         * config/nds32/nds32.c
20461         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
20462         * config/nds32/nds32.opt (minline-asm-r15): New option.
20464 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20466         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
20467         MASK_HW_ABS.
20468         * config/nds32/nds32.md (abssi2): New pattern.
20470 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
20472         * config/i386/i386.md (rex64namesuffix): New mode attribute.
20473         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
20474         Merge insn pattern from sse_cvtsi2ss<round_name> and
20475         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
20476         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
20477         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
20478         using SWI48 mode iterator.
20479         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
20480         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
20481         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
20482         pattern from sse_cvttss2si<round_saeonly_name>
20483         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
20484         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
20485         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
20486         using SWI48 mode iterator.
20487         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
20488         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
20489         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
20490         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
20491         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
20492         using SWI48 mode iterator.
20493         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
20494         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
20495         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
20496         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
20497         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
20498         SWI48 mode iterator.
20499         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
20500         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
20501         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
20502         pattern from sse_cvttsd2si<round_saeonly_name>
20503         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
20505 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20507         * config/nds32/nds32-md-auxiliary.c
20508         (nds32_valid_smw_lwm_base_p): Refine.
20509         (nds32_output_smw_single_word): Refine.
20510         (nds32_output_smw_double_word): New.
20511         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
20513 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20515         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
20516         (nds32_output_stack_pop): Refine.
20517         (nds32_expand_unaligned_load): Refine.
20518         (nds32_expand_unaligned_store): Refine.
20520 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
20521             Chung-Ju Wu  <jasonwucj@gmail.com>
20523         * config/nds32/constants.md: Add TP_REGNUM constant.
20524         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
20525         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
20526         UNSPEC_ADD32.
20527         * config/nds32/nds32-doubleword.md: Consider flag_pic.
20528         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
20529         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
20530         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
20531         and PIC code generation.
20532         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
20533         code generation.
20534         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
20535         optimization.
20536         * config/nds32/nds32.md: Support TLS and PIC.
20537         * config/nds32/nds32.c: Support TLS and PIC.
20538         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
20539         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
20540         predicate.
20542 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
20544         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
20545         mode with E_ prefix.
20547 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
20548             Chung-Ju Wu  <jasonwucj@gmail.com>
20550         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
20551         * config/nds32/nds32-md-auxiliary.c
20552         (symbolic_reference_mentioned_p): New.
20553         (nds32_legitimize_ict_address): New.
20554         (nds32_expand_ict_move): New.
20555         (nds32_indirect_call_referenced_p): New.
20556         (nds32_symbol_binds_local_p): Delete.
20557         (nds32_long_call_p): Modify.
20558         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
20559         * config/nds32/nds32-protos.h
20560         (symbolic_reference_mentioned_p): Declare.
20561         (nds32_legitimize_ict_address): Declare.
20562         (nds32_expand_ict_move): Declare.
20563         (nds32_indirect_call_referenced_p): Declare.
20564         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
20565         (nds32_relax_group): Use nds32_ict_const_p as condition.
20566         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
20567         (nds32_asm_file_start): Output ict_model directive in asm code.
20568         (nds32_legitimate_address_p): Consider indirect call.
20569         (nds32_print_operand): Consider indirect call.
20570         (nds32_print_operand_address): Consider indirect call.
20571         (nds32_insert_attributes): Handle "indirect_call" attribute.
20572         (TARGET_LEGITIMATE_ADDRESS_P): Define.
20573         (TARGET_LEGITIMATE_CONSTANT_P): Define.
20574         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
20575         (TARGET_DELEGITIMIZE_ADDRESS): Define.
20576         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
20577         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
20578         (TARGET_ICT_MODEL_SMALL): Define.
20579         (TARGET_ICT_MODEL_LARGE): Define.
20580         * config/nds32/nds32.md (movsi): Consider ict model.
20581         (call, call_value): Consider ict model.
20582         (sibcall, sibcall_value): Consider ict model.
20583         * config/nds32/nds32.opt (mict-model): New option.
20584         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
20585         model.
20587 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
20588             Monk Chiang  <sh.chiang04@gmail.com>
20589             Jim Wilson <jimw@sifive.com>
20591         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
20592         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
20593         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
20594         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
20595         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
20596         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
20597         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
20598         compute save_libcall_adjustment properly.
20599         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
20600         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
20601         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
20602         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
20603         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
20604         (ABI_SPEC): Handle mabi=ilp32e.
20605         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
20606         (RVE): Add RVE mask.
20607         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
20608         <-march>: Add rv32e as an example.
20610 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
20612         PR c++/82899
20613         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
20614         (intra_create_variable_infos): Handle C++ constructors.
20616 2018-05-18  Martin Liska  <mliska@suse.cz>
20618         * passes.def: Remove a redundant pass.
20620 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
20622         PR bootstrap/85838
20623         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
20625 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20627         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
20628         (ARMv4): Update.
20629         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
20630         (ARMv6m): Update.
20631         (armv2, armv2a, armv3, armv3m): Delete architectures.
20632         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
20633         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
20634         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
20635         Delete cpus.
20636         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
20637         (*mulsidi3adddi): Likewise.
20638         (mulsidi3): Likewise.
20639         (*mulsidi3_nov6): Likewise.
20640         (umulsidi3): Likewise.
20641         (umulsidi3_nov6): Likewise.
20642         (umaddsidi4): Likewise.
20643         (*umulsidi3adddi): Likewise.
20644         (smulsi3_highpart): Likewise.
20645         (*smulsi3_highpart_nov6): Likewise.
20646         (umulsi3_highpart): Likewise.
20647         (*umulsi3_highpart_nov6): Likewise.
20648         * config/arm/arm.h (arm_arch3m): Delete.
20649         * config/arm/arm.c (arm_arch3m): Delete.
20650         (arm_option_override_internal): Update armv3-related comment.
20651         (arm_configure_build_target): Delete use of isa_bit_mode32.
20652         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
20653         (arm_rtx_costs_internal): Delete check of arm_arch3m.
20654         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
20655         (mulsa3): Likewise.
20656         (mulusa3): Likewise.
20657         * config/arm/arm-protos.h (arm_arch3m): Delete.
20658         * config/arm/arm-tables.opt: Regenerate.
20659         * config/arm/arm-tune.md: Likewise.
20660         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
20661         deleted architectures.
20663 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20665         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
20666         (armv5t, armv5te): New features.
20667         (ARMv5, ARMv5e): Delete fgroups.
20668         (ARMv5t, ARMv5te): Adjust for above changes.
20669         (ARMv6m): Likewise.
20670         (armv5, armv5e): Delete arches.
20671         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
20672         arm_arch5.
20673         (*call_reg_arm): Likewise.
20674         (*call_value_reg_armv5): Likewise.
20675         (*call_value_reg_arm): Likewise.
20676         (*call_symbol): Likewise.
20677         (*call_value_symbol): Likewise.
20678         (*sibcall_insn): Likewise.
20679         (*sibcall_value_insn): Likewise.
20680         (clzsi2): Likewise.
20681         (prefetch): Likewise.
20682         (define_split and define_peephole2 dependent on arm_arch5):
20683         Likewise.
20684         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
20685         arm_arch5e.
20686         (TARGET_ARM_QBIT): Likewise.
20687         (TARGET_DSP_MULTIPLY): Likewise.
20688         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
20689         (arm_arch5, arm_arch5e): Delete.
20690         (arm_arch5t, arm_arch5te): Declare.
20691         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
20692         (arm_arch5t): Declare.
20693         (arm_option_reconfigure_globals): Update for the above.
20694         (arm_options_perform_arch_sanity_checks): Update comment, replace
20695         use of arm_arch5 with arm_arch5t.
20696         (use_return_insn): Likewise.
20697         (arm_emit_call_insn): Likewise.
20698         (output_return_instruction): Likewise.
20699         (arm_final_prescan_insn): Likewise.
20700         (arm_coproc_builtin_available): Likewise.
20701         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
20702         arm_arch5e with arm_arch5t and arm_arch5te.
20703         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
20704         (arm_arch5t, arm_arch5te): Declare.
20705         * config/arm/arm-tables.opt: Regenerate.
20706         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
20707         * config/arm/t-multilib: Likewise.
20708         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
20709         instead of arm_arch5.
20710         (*call_reg_thumb1): Likewise.
20711         (*call_value_reg_thumb1_v5): Likewise.
20712         (*call_value_reg_thumb1): Likewise.
20713         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
20714         unreachable path.
20715         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
20717 2018-05-18  Martin Liska  <mliska@suse.cz>
20719         PR gcov-profile/84846
20720         * doc/gcov.texi: Document -t option of gcov tool.
20722 2018-05-18  Martin Liska  <mliska@suse.cz>
20724         PR gcov-profile/84846
20725         * gcov.c (print_usage): Add new -t option.
20726         (process_args): Handle the option.
20727         (generate_results): Use stdout as output when requested by
20728         the option.
20730 2018-05-18  Martin Liska  <mliska@suse.cz>
20732         PR gcov-profile/84846
20733         * coverage.c (coverage_init): Write PWD to .gcno file.
20734         * doc/gcov.texi: Document how working directory is printed.
20735         * gcov-dump.c (dump_gcov_file): Print PWD.
20736         * gcov.c (output_intermediate_file): Likewise.
20737         (read_graph_file): Read PWD string.
20738         (output_lines): Print PWD.
20740 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20742         PR middle-end/85817
20743         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
20744         for retval and return false if all args to phi are zero.
20746 2018-05-18  Richard Biener  <rguenther@suse.de>
20748         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
20749         method.
20750         (evrp_dom_walker::before_dom_children): Call it.
20752 2018-05-18  Richard Biener  <rguenther@suse.de>
20754         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
20755         results when processing array refs with variable index.
20757 2018-05-18  Toon Moene  <toon@moene.org>
20759         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
20760         directly after that of -floop-interchange. Indicate that both
20761         options are enabled by default when specifying -O3.
20763 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20765         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
20766         iterator.  Delete separate integer-mode vec_set<mode> expander.
20767         (aarch64_simd_vec_setv2di): Delete.
20768         (vec_setv2di): Delete.
20769         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
20770         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
20771         the "w, r" alternative.
20773 2018-05-18  Martin Liska  <mliska@suse.cz>
20775         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
20776         * tree-pass.h (make_pass_lower_switch_O0): New function.
20777         * tree-switch-conversion.c (node_has_low_bound): Remove.
20778         (node_has_high_bound): Likewise.
20779         (node_is_bounded): Likewise.
20780         (class pass_lower_switch): Make it a template type and create
20781         two instances.
20782         (pass_lower_switch::execute): Add template argument.
20783         (make_pass_lower_switch): New function.
20784         (make_pass_lower_switch_O0): New function.
20785         (do_jump_if_equal): Remove.
20786         (emit_case_nodes): Simplify to just handle all 3 cases and leave
20787         all the hard work to tree optimization passes.
20789 2018-05-18  Martin Liska  <mliska@suse.cz>
20791         * dbgcnt.c (limit_low): Renamed from limit.
20792         (limit_high): New variable.
20793         (dbg_cnt_is_enabled): Check for upper limit.
20794         (dbg_cnt): Adjust dumping.
20795         (dbg_cnt_set_limit_by_index): Add new argument for high
20796         value.
20797         (dbg_cnt_set_limit_by_name): Likewise.
20798         (dbg_cnt_process_single_pair): Parse new format.
20799         (dbg_cnt_process_opt): Use strtok.
20800         (dbg_cnt_list_all_counters): Remove 'value' and add
20801         'limit_high'.
20802         * doc/invoke.texi: Document changes.
20804 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
20806         * doc/sourcebuild.texi (scalar_all_fma): Document.
20807         * tree.def (FMA_EXPR): Delete.
20808         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20809         * internal-fn.c (ternary_direct): New macro.
20810         (expand_ternary_optab_fn): Likewise.
20811         (direct_ternary_optab_supported_p): Likewise.
20812         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20813         * builtins.c (fold_builtin_fma): Delete.
20814         (fold_builtin_3): Don't call it.
20815         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20816         * expr.c (expand_expr_real_2): Likewise.
20817         * fold-const.c (operand_equal_p): Likewise.
20818         (fold_ternary_loc): Likewise.
20819         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20820         * gimple.c (DEFTREECODE): Likewise.
20821         * gimplify.c (gimplify_expr): Likewise.
20822         * optabs-tree.c (optab_for_tree_code): Likewise.
20823         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20824         * tree-eh.c (operation_could_trap_p): Likewise.
20825         (stmt_could_throw_1_p): Likewise.
20826         * tree-inline.c (estimate_operator_cost): Likewise.
20827         * tree-pretty-print.c (dump_generic_node): Likewise.
20828         (op_code_prio): Likewise.
20829         * tree-ssa-loop-im.c (stmt_cost): Likewise.
20830         * tree-ssa-operands.c (get_expr_operands): Likewise.
20831         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20832         * fold-const-call.h (fold_fma): Delete.
20833         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20834         CFN_FNMA and CFN_FNMS.
20835         (fold_fma): Delete.
20836         * genmatch.c (combined_fn): New enum.
20837         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20838         (commutative_op): New function.
20839         (commutate): Use it.  Handle more than 2 operands.
20840         (dt_operand::gen_gimple_expr): Use commutative_op.
20841         (parser::parse_expr): Allow :c to be used with non-binary
20842         operators if the commutative operand is known.
20843         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20844         CFN_FMS, CFN_FNMA and CFN_FNMS.
20845         (backprop::process_assign_use): Remove FMA_EXPR handling.
20846         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20847         (gen_hsa_fma): New function.
20848         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20849         IFN_FNMA and IFN_FNMS.
20850         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20851         * gimple-fold.h (follow_all_ssa_edges): Declare.
20852         * gimple-fold.c (follow_all_ssa_edges): New function.
20853         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20854         gimple_build interface and use follow_all_ssa_edges to fold the result.
20855         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20856         instead of checking for optabs directly.
20857         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20858         rather than FMA_EXPRs.
20859         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20860         call to IFN_FMA instead of an FMA_EXPR.
20862 2018-05-17  Jim Wilson  <jimw@sifive.com>
20864         * expr.c (do_tablejump): When converting index to Pmode, if we have a
20865         sign extended promoted subreg, and the range does not have the sign bit
20866         set, then do a sign extend.
20868         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20869         test, check for sign extended subreg and/or constant operands, and
20870         do a sign extend in that case.
20872 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
20874         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
20875         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
20876         Add untyped.
20877         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
20878         Change logics_shift_reg to logics_shift_imm.
20879         (thunderx2t99_fp_loadpair_basic): Delete.
20880         (thunderx2t99_fp_storepair_basic): Delete.
20881         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
20882         (thunderx2t99_asimd_polynomial): Delete.
20883         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
20884         and neon_fp_mul_d_scalar_q.
20885         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
20886         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
20887         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
20888         (thunderx2t99_asimd_lut): Add missing tbl types.
20889         (thunderx2t99_asimd_ext): Delete.
20890         (thunderx2t99_asimd_load1_1_mult): Delete.
20891         (thunderx2t99_asimd_load1_2_mult): Delete.
20892         (thunderx2t99_asimd_load1_ldp): New.
20893         (thunderx2t99_asimd_load1): New.
20894         (thunderx2t99_asimd_load2): Add missing *load2* types.
20895         (thunderx2t99_asimd_load3): New.
20896         (thunderx2t99_asimd_load4): New.
20897         (thunderx2t99_asimd_store1_1_mult): Delete.
20898         (thunderx2t99_asimd_store1_2_mult): Delete.
20899         (thunderx2t99_asimd_store2_mult): Delete.
20900         (thunderx2t99_asimd_store2_onelane): Delete.
20901         (thunderx2t99_asimd_store_stp): New.
20902         (thunderx2t99_asimd_store1): New.
20903         (thunderx2t99_asimd_store2): New.
20904         (thunderx2t99_asimd_store3): New.
20905         (thunderx2t99_asimd_store4): New.
20907 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
20909         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
20910         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
20912 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
20913             Segher Boessenkool  <segher@kernel.crashing.org>
20915         PR target/85698
20916         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
20917         operand.
20919 2018-05-17  Richard Biener  <rguenther@suse.de>
20921         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
20922         for pruning loop and prune defs feeding only already visited PHIs.
20924 2018-05-17  Richard Biener  <rguenther@suse.de>
20926         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
20928 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
20929             Richard Biener  <rguenther@suse.de>
20931         PR tree-optimization/85793
20932         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
20933         for VMAT_ELEMENTWISE.
20935 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
20937         * internal-fn.h (lookup_internal_fn): Declare
20938         * internal-fn.c (lookup_internal_fn): New function.
20939         * gimple.c (gimple_build_call_from_tree): Handle calls to
20940         internal functions.
20941         * gimple-pretty-print.c (dump_gimple_call): Print "." before
20942         internal function names.
20943         * tree-pretty-print.c (dump_generic_node): Likewise.
20944         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
20946 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
20948         * gimple-fold.h (gimple_build): Make the function forms take
20949         combined_fn rather than built_in_function.
20950         (gimple_simplify): Likewise.
20951         * gimple-match-head.c (gimple_simplify): Likewise.
20952         * gimple-fold.c (gimple_build): Likewise.
20953         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
20954         rather than gimple_build_call_internal.
20955         (get_initial_defs_for_reduction): Likewise.
20956         (vect_create_epilog_for_reduction): Likewise.
20957         (vectorizable_live_operation): Likewise.
20959 2018-05-17  Martin Liska  <mliska@suse.cz>
20961         * gimple-ssa-sprintf.c (format_directive): Do not use
20962         space in between 'G_' and '('.
20964 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
20966         PR target/85323
20967         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
20968         even if the mask is not all ones.
20970         PR target/85323
20971         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
20972         vector.
20973         (ix86_gimple_fold_builtin): Likewise.
20975         PR target/85323
20976         * config/i386/i386.c: Include tree-vector-builder.h.
20977         (ix86_vector_shift_count): New function.
20978         (ix86_fold_builtin): Fold shift builtins by scalar count.
20979         (ix86_gimple_fold_builtin): Likewise.
20981         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
20982         _mm512_setzero): New intrinsics.
20984 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
20985             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20987         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
20988         code generation for cases where splatting a value is not useful.
20989         * simplify-rtx.c (simplify_ternary_operation): Simplify
20990         vec_merge across a vec_duplicate and a paradoxical subreg forming
20991         a vector mode to a vec_concat.
20993 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
20995         * config.gcc: Support "goldmont-plus".
20996         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20997         "goldmont-plus".
20998         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20999         PROCESSOR_GOLDMONT_PLUS.
21000         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21001         (processor_target_table): Add "goldmont-plus".
21002         (PTA_GOLDMONT_PLUS): Define.
21003         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21004         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21005         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21006         (fold_builtin_cpu): Add "goldmont-plus".
21007         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21008         (ix86_option_override_internal): Add "goldmont-plus".
21009         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21010         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21011         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21012         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21014 2018-05-17  Richard Biener  <rguenther@suse.de>
21016         PR tree-optimization/85757
21017         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21018         remove defs that only feed that PHI from further processing.
21020 2018-05-16  Jim Wilson  <jimw@sifive.com>
21022         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21023         asterisk to name.
21024         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21026 2018-05-16  Mark Wielaard  <mark@klomp.org>
21028         * dwarf2out.c (count_index_strings): New function.
21029         (output_indirect_strings): Call count_index_strings and generate
21030         header for dwarf_version >= 5.
21032 2018-05-16  Mark Wielaard  <mark@klomp.org>
21034         * dwarf2out.c (dwarf_FORM): New function.
21035         (set_indirect_string): Use dwarf_FORM.
21036         (reset_indirect_string): Likewise.
21037         (size_of_die): Likewise.
21038         (value_format): Likewise.
21039         (output_die): Likewise.
21040         (add_skeleton_AT_string): Likewise.
21041         (output_macinfo_op): Likewise.
21042         (index_string): Likewise.
21043         (output_index_string_offset): Likewise.
21044         (output_index_string): Likewise.
21045         (count_index_strings): Likewise.
21047 2018-05-16  Carl Love  <cel@us.ibm.com>
21049         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21050         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21052 2018-05-16  Martin Jambor  <mjambor@suse.cz>
21054         * ipa-prop.c (ipa_free_all_edge_args): Remove.
21055         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21057 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
21059         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21060         (fnma<mode>4): Likewise.
21061         (fms<mode>4): Likewise.
21062         (fnms<mode>4): Likewise.
21063         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21064         (aarch64_fnma<mode>4): Likewise.
21065         (aarch64_fms<mode>4): Likewise.
21066         (aarch64_fnms<mode>4): Likewise.
21067         (aarch64_fnmadd<mode>4): Likewise.
21069 2018-05-16  Jason Merrill  <jason@redhat.com>
21071         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
21073 2018-05-16  Richard Biener  <rguenther@suse.de>
21075         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21076         (dump_stmt_cost): Declare.
21077         (add_stmt_cost): Dump cost we add.
21078         (add_stmt_costs): New function.
21079         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21080         No longer exported.
21081         (vect_analyze_stmt): Adjust prototype.
21082         (vectorizable_condition): Likewise.
21083         (vectorizable_live_operation): Likewise.
21084         (vectorizable_reduction): Likewise.
21085         (vectorizable_induction): Likewise.
21086         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21087         cost vector to pass to vectorizable_ and record afterwards.
21088         (vect_model_reduction_cost): Take cost vector argument and adjust.
21089         (vect_model_induction_cost): Likewise.
21090         (vectorizable_reduction): Likewise.
21091         (vectorizable_induction): Likewise.
21092         (vectorizable_live_operation): Likewise.
21093         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21094         SLP_TREE_NUMBER_OF_VEC_STMTS.
21095         (vect_analyze_slp_cost_1): Remove.
21096         (vect_analyze_slp_cost): Likewise.
21097         (vect_slp_analyze_node_operations): Take visited args and
21098         a target cost vector.  Avoid processing already visited stmt sets.
21099         (vect_slp_analyze_operations): Use a local cost vector to gather
21100         costs and register those of non-discarded instances.
21101         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21102         (vect_schedule_slp_instance): Remove copying of
21103         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
21104         zero.
21105         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21106         adding cost.  Record cost entry location.
21107         (vect_prologue_cost_for_slp_op): Function to compute cost of
21108         a constant or invariant generated for SLP vect in the prologue,
21109         split out from vect_analyze_slp_cost_1.
21110         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
21111         (vect_model_promotion_demotion_cost): Likewise.
21112         (vect_model_store_cost): Likewise, make static.
21113         (vect_model_load_cost): Likewise.
21114         (vectorizable_bswap): Add cost vector arg and adjust.
21115         (vectorizable_call): Likewise.
21116         (vectorizable_simd_clone_call): Likewise.
21117         (vectorizable_conversion): Likewise.
21118         (vectorizable_assignment): Likewise.
21119         (vectorizable_shift): Likewise.
21120         (vectorizable_operation): Likewise.
21121         (vectorizable_store): Likewise.
21122         (vectorizable_load): Likewise.
21123         (vectorizable_condition): Likewise.
21124         (vectorizable_comparison): Likewise.
21125         (can_vectorize_live_stmts): Likewise.
21126         (vect_analyze_stmt): Likewise.
21127         (vect_transform_stmt): Adjust calls to vectorizable_*.
21128         * tree-vectorizer.c: Include gimple-pretty-print.h.
21129         (dump_stmt_cost): New function.
21131 2018-05-16  Richard Biener  <rguenther@suse.de>
21133         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21134         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21135         * tree-ssa-dse.c: Include tree-ssa-loop.h.
21136         (check_name): New callback.
21137         (dse_classify_store): Track cycles via a visited bitmap of PHI
21138         defs and simplify handling of in-loop and across loop dead stores
21139         and properly fail for loop-variant refs.  Handle byte-tracking with
21140         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21141         limiting the walk.
21143 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
21145         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21146         (vect_get_mask_type_for_stmt): Likewise.
21147         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21148         split out from...
21149         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
21150         to determine the statement's vector type and the vector type that
21151         should be used for calculating nunits.  Deal with cases in which
21152         the type has to be deferred.
21153         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21154         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21155         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21156         (vect_determine_vf_for_stmt): New functions, split out from...
21157         (vect_determine_vectorization_factor): ...here.
21158         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21159         (vect_get_mask_type_for_stmt): New functions, split out from
21160         vect_determine_vectorization_factor.
21162 2018-05-16  Richard Biener  <rguenther@suse.de>
21164         * tree-cfg.c (verify_gimple_assign_ternary): Properly
21165         verify the [VEC_]COND_EXPR embedded comparison.
21167 2018-05-15  Martin Sebor  <msebor@redhat.com>
21169         PR tree-optimization/85753
21170         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21171         RECORD_TYPE in addition to ARRAY_TYPE.
21173 2018-05-15  Martin Sebor  <msebor@redhat.com>
21175         PR middle-end/85643
21176         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21178 2018-05-15  Richard Biener  <rguenther@suse.de>
21180         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21181         add by_clobber_p one.  Change algorithm to collect all defs
21182         representing uses we need to walk and try reducing them to
21183         a single one before failing.
21184         (dse_dom_walker::dse_optimize_stmt): Adjust.
21186 2018-05-13  Mark Wielaard  <mark@klomp.org>
21188         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21189         (size_of_loc_descr): Likewise.
21190         (output_loc_operands): Likewise.
21191         (output_loc_operands_raw): Likewise.
21192         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21193         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21194         (hash_loc_operands): Likewise.
21195         (compare_loc_operands): Likewise.
21197 2018-05-14  Mark Wielaard  <mark@klomp.org>
21199         * dwarf2out.c (count_index_addrs): New function.
21200         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21202 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21204         PR tree-optimization/83648
21205         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21206         return value as malloc candidate.
21208 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21210         PR ipa/85734
21211         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
21212         param as true in call to suggest_attribute.
21214 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
21216         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
21217         -mreadonly-in-sdata.
21219 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21221         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
21222         New pattern.
21223         (aarch64_crypto_aesd_fused): Likewise.
21225 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
21227         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
21228         (movsi_aarch64): Likewise.
21229         (load_pairsi): Likewise.
21230         (load_pairdi): Likewise.
21231         (store_pairsi): Likewise.
21232         (store_pairdi): Likewise.
21233         (load_pairsf): Likewise.
21234         (load_pairdf): Likewise.
21235         (store_pairsf): Likewise.
21236         (store_pairdf): Likewise.
21237         (zero_extend): Likewise.
21238         (trunc): Swap alternatives.
21239         (fcvt_target): Add '?' to prefer w over r.
21241 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
21243         PR target/85756
21244         * config/i386/i386.md: Disallow non-commutative arithmetics in
21245         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
21246         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
21247         in the peephole2 before it.
21249 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
21251         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
21252         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
21253         (ix86_handle_option): Handle -mcldemote.
21254         * config.gcc: New header.
21255         * config/i386/cldemoteintrin.h: New file.
21256         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
21257         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21258         -mcldemote.
21259         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21260         OPTION_MASK_ISA_CLDEMOTE.
21261         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
21262         (ix86_valid_target_attribute_inner_p): Ditto.
21263         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
21264         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
21265         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
21266         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
21267         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
21268         (cldemote): New.
21269         * config/i386/i386.opt: Add -mcldemote.
21270         * config/i386/x86intrin.h: New header.
21271         * doc/invoke.texi: Add -mcldemote.
21273 2018-05-14  Richard Biener  <rguenther@suse.de>
21275         * doc/match-and-simplify.texi: Adjust :s documentation.
21277 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
21279         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
21280         intended memcpy size.
21281         (REORDER_45): Likewise.
21283 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
21285         * sort.cc: New file.
21286         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
21287         * vec.c (qsort_chk): Use gcc_qsort.
21288         * Makefile.in (OBJS-libcommon): Add sort.o.
21289         (build/sort.o): New target.  Use it...
21290         (BUILD_RTL): ... here, and...
21291         (build/gencfn-macros): ... here, and...
21292         (build/genmatch): ... here.
21294 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
21295             Chung-Ju Wu  <jasonwucj@gmail.com>
21297         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
21298         * config/nds32/nds32-graywolf.md: New file.
21299         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
21300         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
21301         pipeline.
21302         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
21303         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
21304         * config/nds32/nds32.md (pipeline_model): Add graywolf.
21305         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
21306         * config/nds32/pipelines.md: Include n15 settings.
21308 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
21309             Chung-Ju Wu  <jasonwucj@gmail.com>
21311         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
21312         * config/nds32/nds32-n13.md: New file.
21313         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
21314         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
21315         pipeline.
21316         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
21317         * config/nds32/nds32.md (pipeline_model): Add n13.
21318         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
21319         * config/nds32/pipelines.md: Include n13 settings.
21321 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
21322             Chung-Ju Wu  <jasonwucj@gmail.com>
21324         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
21325         * config/nds32/nds32-n10.md: New file.
21326         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
21327         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
21328         pipeline.
21329         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
21330         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
21331         * config/nds32/nds32.md (pipeline_model): Add n10.
21332         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
21333         * config/nds32/pipelines.md: Include n10 settings.
21335 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
21336             Kito Cheng  <kito.cheng@gmail.com>
21337             Chung-Ju Wu  <jasonwucj@gmail.com>
21339         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
21340         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21341         Add enum values for DSP extension instructions.
21342         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
21343         New constraints.
21344         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
21345         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
21346         New code iterators.
21347         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
21348         * config/nds32/nds32-dspext.md: New file for DSP implementation.
21349         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
21350         * config/nds32/nds32-intrinsic.md: Likewise.
21351         * config/nds32/nds32_intrinsic.h: Likewise.
21352         * config/nds32/nds32-md-auxiliary.c: Likewise.
21353         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
21354         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
21355         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
21356         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
21357         * config/nds32/nds32-protos.h: New declarations for DSP extension.
21358         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
21359         TYPE_DMAC in switch statement.
21360         * config/nds32/nds32.c: New checking and implementation for DSP
21361         extension instructions.
21362         * config/nds32/nds32.h: Likewise.
21363         * config/nds32/nds32.md: Likewise.
21364         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
21365         * config/nds32/predicates.md: Implement new predicates for DSP
21366         extension.
21368 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
21370         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
21371         Reformat alternatives and attributes so it is easier to identify
21372         which constraints/attributes go with which instruction.
21373         (mov<mode>_hardfloat32, FMOVE64): Likewise.
21374         (mov<mode>_softfloat32, FMOVE64): Likewise.
21375         (mov<mode>_hardfloat64, FMOVE64): Likewise.
21376         (mov<mode>_softfloat64, FMOVE64): Likewise.
21378 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21380         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21381         subsection.
21382         (Basic PowerPC Built-in Functions): The new name of the
21383         subsection previously known as "PowerPC Built-in Functions".
21384         (Basic PowerPC Built-in Functions Available on all Configurations):
21385         New subsubsection.
21386         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
21387         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
21388         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
21389         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
21391 2018-05-11  Martin Jambor  <mjambor@suse.cz>
21393         PR ipa/85655
21394         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
21395         single const.
21397 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
21399         PR target/85733
21400         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
21402 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
21404         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
21405         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
21406         (ix86_handle_option): Handle -mwaitpkg.
21407         * config.gcc: New header.
21408         * config/i386/cpuid.h (bit_WAITPKG): New bit.
21409         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
21410         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
21411         function type.
21412         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21413         OPTION_MASK_ISA_WAITPKG.
21414         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
21415         (ix86_option_override_internal): Add PTA_WAITPKG.
21416         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
21417         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
21418         IX86_BUILTIN_TPAUSE.
21419         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
21420         __builtin_ia32_umwait and __builtin_ia32_tpause.
21421         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
21422         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
21423         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
21424         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
21425         UNSPECV_TPAUSE): New.
21426         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
21427         * config/i386/i386.opt: Add -mwaitpkg.
21428         * config/i386/waitpkgintrin.h: New file.
21429         * config/i386/x86intrin.h: New header.
21430         * doc/invoke.texi: Add -mwaitpkg.
21432 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
21434         PR target/85606
21435         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
21436         equivalent.
21437         (cortex-m0): Use armv6s-m isa.
21438         (cortex-m0plus): Likewise.
21439         (cortex-m1): Likewise.
21440         (cortex-m0.small-multiply): Likewise.
21441         (cortex-m0plus.small-multiply): Likewise.
21442         (cortex-m1.small-multiply): Likewise.
21444 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
21445             Jakub Jelinek  <jakub@redhat.com>
21447         PR tree-optimization/85692
21448         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
21449         source permute as well.
21451 2018-05-11  Martin Liska  <mliska@suse.cz>
21453         PR sanitizer/85556
21454         * doc/extend.texi: Document LLVM style format for no_sanitize
21455         attribute.
21457 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
21459         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
21460         mode_supports_vsx_dform_quad to mode_supports_dq_form.
21461         (mode_supports_vsx_dform_quad): Likewise.
21462         (mode_supports_vmx_dform): Move these functions to be next to the
21463         other mode_supports functions.
21464         (mode_supports_dq_form): Likewise.
21465         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
21466         mode_supports_dq_form.
21467         (reg_offset_addressing_ok_p): Likewise.
21468         (offsettable_ok_by_alignment): Likewise.
21469         (rs6000_legitimate_offset_address_p): Likewise.
21470         (legitimate_lo_sum_address_p): Likewise.
21471         (rs6000_legitimize_address): Likewise.
21472         (rs6000_legitimize_reload_address): Likewise.
21473         (rs6000_secondary_reload_inner): Likewise.
21474         (rs6000_preferred_reload_class): Likewise.
21475         (rs6000_output_move_128bit): Likewise.
21477 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
21479         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
21480         Generate SImode target register for null target.
21481         <case IX86_BUILTIN_XGETBV>: Ditto.
21482         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
21483         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
21485 2018-05-10  Carl Love  <cel@us.ibm.com>
21487         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21488         dcbtt and dcbtstt if operands[2] is 0.
21490 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
21492         PR target/85693
21493         * config/i386/sse.md (usadv64qi): New expander.
21495 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
21497         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
21498         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
21499         -maltivec=be support.
21500         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
21501         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
21502         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
21503         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
21504         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
21505         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
21506         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
21507         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
21508         altivec_vsumsws): Adjust.
21509         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
21510         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
21511         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
21512         support.
21513         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
21514         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
21515         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
21516         (altivec_lve<VI_char>x): Delete expand.
21517         (*altivec_lve<VI_char>x_internal): Rename to...
21518         (altivec_lve<VI_char>x): ... this.
21519         (altivec_lvxl_<mode>): Delete expand.
21520         (*altivec_lvxl_<mode>_internal): Rename to ...
21521         (altivec_lvxl_<mode>): ... this.
21522         (altivec_stvxl_<mode>): Delete expand.
21523         (*altivec_stvxl_<mode>_internal): Rename to ...
21524         (altivec_stvxl_<mode>): ... this.
21525         (altivec_stve<VI_char>x): Delete expand.
21526         (*altivec_stve<VI_char>x_internal): Rename to ...
21527         (altivec_stve<VI_char>x): ... this.
21528         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
21529         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
21530         reduc_plus_scal_<mode>): Adjust.
21531         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
21532         comment.
21533         (rs6000_cpu_cpp_builtins): Adjust.
21534         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
21535         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
21536         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
21537         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
21538         -maltivec=be support.
21539         (rs6000_split_vec_extract_var): Adjust.
21540         (rs6000_split_v4si_init): Adjust.
21541         (swap_selector_for_mode): Delete.
21542         (altivec_expand_lvx_be, altivec_expand_stvx_be,
21543         altivec_expand_stvex_be): Delete.
21544         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
21545         -maltivec=be support.
21546         (rs6000_gimple_fold_builtin): Ditto.
21547         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
21548         Adjust.
21549         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
21550         (TARGET_DIRECT_MOVE_64BIT): Adjust.
21551         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
21552         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
21553         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
21554         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
21555         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
21556         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
21557         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
21558         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
21559         anonymous split): Adjust.
21560         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
21561         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
21563 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
21565         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
21566         when --with-gxx-include-dir is also specified.
21567         * configure: Regenerate.
21569 2018-05-09  Jim Wilson  <jimw@sifive.com>
21571         PR target/84797
21572         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
21573         * config/riscv/t-withmultilib: New.
21574         * config/riscv/withmultilib.h: New.
21575         * doc/install.texi: Document RISC-V --with-multilib-list support.
21577 2018-05-09  Richard Biener  <rguenther@suse.de>
21579         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
21580         vector.
21581         (vect_bb_vectorization_profitable_p): Adjust.  Compute
21582         actual scalar cost using the cost vector and the add_stmt_cost
21583         machinery.
21585 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21587         PR rtl-optimization/85645
21588         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
21589         in the REG_CFA_REGISTER note for LR, don't leave it empty.
21591 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21593         PR rtl-optimization/85645
21594         * shrink-wrap.c (spread_components): Return a boolean saying if
21595         anything was changed.
21596         (try_shrink_wrapping_separate): Iterate spread_components until
21597         nothing changes anymore.
21599 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21601         PR rtl-optimization/85645
21602         * regrename.c (build_def_use): Also kill the chains that include the
21603         destination of a REG_CFA_REGISTER note.
21605 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21607         PR rtl-optimization/85645
21608         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
21609         insn that has a REG_CFA_REGISTER note.
21611 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
21613         * cfgexpand.c (expand_clobber): New function.
21614         (expand_gimple_stmt_1): Use it.
21615         * tree-vect-stmts.c (vect_clobber_variable): New function,
21616         split out from...
21617         (vectorizable_simd_clone_call): ...here.
21618         (vectorizable_store): Emit a clobber either side of an
21619         IFN_STORE_LANES sequence.
21620         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
21622 2018-05-09  Tom de Vries  <tom@codesourcery.com>
21624         PR target/85626
21625         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
21626         (define_insn "trap_if_false"): Add exit after trap.
21628 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
21630         PR rtl-optimization/85638
21631         * bb-reorder.c: Include common/common-target.h.
21632         (create_forwarder_block): New function extracted from...
21633         (fix_up_crossing_landing_pad): ...here.  Rename into...
21634         (dw2_fix_up_crossing_landing_pad): ...this.
21635         (sjlj_fix_up_crossing_landing_pad): New function.
21636         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
21637         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
21638         from both partitions and exit the loop after one iteration.
21640 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21642         Revert:
21643         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21644         subsection.
21645         (Basic PowerPC Built-in Functions): The new name of the
21646         subsection previously known as "PowerPC Built-in Functions".
21647         (Basic PowerPC Built-in Functions Available on all Configurations):
21648         New subsubsection.
21649         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21650         subsubsection.
21651         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21652         subsubsection.
21653         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21654         subsubsection.
21655         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21656         subsubsection.
21658 2018-05-08  Jim Wilson  <jimw@sifive.com>
21660         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
21661         (LD_EMUL_SUFFIX): New.
21662         (LINK_SPEC): Use it.
21664 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21666         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21667         subsection.
21668         (Basic PowerPC Built-in Functions): The new name of the
21669         subsection previously known as "PowerPC Built-in Functions".
21670         (Basic PowerPC Built-in Functions Available on all Configurations):
21671         New subsubsection.
21672         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21673         subsubsection.
21674         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21675         subsubsection.
21676         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21677         subsubsection.
21678         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21679         subsubsection.
21681 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
21683         PR target/85683
21684         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
21685         after cmpelim optimization.
21687 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
21689         * config.gcc: Support "goldmont".
21690         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
21691         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21692         PROCESSOR_GOLDMONT.
21693         * config/i386/i386.c (m_GOLDMONT): Define.
21694         (processor_target_table): Add "goldmont".
21695         (PTA_GOLDMONT): Define.
21696         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
21697         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
21698         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
21699         (fold_builtin_cpu): Add "goldmont".
21700         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
21701         (ix86_option_override_internal): Add "goldmont".
21702         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
21703         (processor_type): Add PROCESSOR_GOLDMONT.
21704         * config/i386/i386.md: Add CPU "glm".
21705         * config/i386/glm.md: New file.
21706         * config/i386/x86-tune.def: Add m_GOLDMONT.
21707         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
21709 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
21711         PR target/85572
21712         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
21713         E_V4DImode.
21714         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
21715         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
21716         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
21718         PR target/85317
21719         * config/i386/i386.c (ix86_fold_builtin): Handle
21720         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
21722         PR target/85480
21723         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
21724         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
21726 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
21728         PR target/85658
21729         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
21730         (check_arch): Likewise.
21731         (check_fpu): Return the result rather than printing it.
21732         (end arch): Fix operator precedence.
21733         (end cpu): Likewise.
21734         (END): Print the result from check_fpu.
21736 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
21737             Alan Hayward  <alan.hayward@arm.com>
21738             David Sherwood  <david.sherwood@arm.com>
21740         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
21741         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
21742         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
21743         (*fcmuo<mode>_and): New patterns.
21745 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
21747         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
21748         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
21749         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
21750         (cmp_op, sve_imm_con): New code attributes.
21751         (SVE_COND_INT_CMP, imm_con): Delete.
21752         (cmp_op): Remove above unspecs from int attribute.
21753         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
21754         to...
21755         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
21756         comparison-specific unspecs.
21757         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
21758         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
21759         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
21760         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
21761         (*vec_fcm<cmp_op><mode>): Rename to...
21762         (*fcm<cmp_op><mode>): ...this and adjust likewise.
21763         (*vec_fcmuo<mode>): Rename to...
21764         (*fcmuo<mode>): ...this and adjust likewise.
21765         (*pred_fcm<cmp_op><mode>): New pattern.
21766         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
21767         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
21768         functions.
21769         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
21770         and UNORDERED.
21771         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
21772         (aarch64_emit_sve_predicated_cond): New function.
21773         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
21774         (aarch64_emit_unspec_cond_or): Replace with...
21775         (aarch64_emit_sve_or_conds): ...this new function.  Use
21776         aarch64_emit_sve_ptrue_op for the individual comparisons and
21777         aarch64_emit_binop to OR them together.
21778         (aarch64_emit_inverted_unspec_cond): Replace with...
21779         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
21780         aarch64_emit_sve_ptrue_op for the comparison and
21781         aarch64_emit_unop to invert the result.
21782         (aarch64_expand_sve_vec_cmp_float): Update after the above
21783         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
21785 2018-05-07  Nathan Sidwell  <nathan@acm.org>
21787         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21788         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21789         (Backwards Compatibility): Likewise.
21791 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21793         PR bootstrap/85681
21794         Revert:
21795         2018-05-07  Luis Machado  <luis.machado@linaro.org>
21797         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21798         <prefetch_dynamic_strides>: New const bool field.
21799         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21800         prefetch_dynamic_strides.
21801         (exynosm1_prefetch_tune): Likewise.
21802         (thunderxt88_prefetch_tune): Likewise.
21803         (thunderx_prefetch_tune): Likewise.
21804         (thunderx2t99_prefetch_tune): Likewise.
21805         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21806         to false.
21807         (aarch64_override_options_internal): Update to set
21808         PARAM_PREFETCH_DYNAMIC_STRIDES.
21809         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21810         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21811         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21812         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21813         prefetch-dynamic-strides setting.
21815         2018-05-07  Luis Machado  <luis.machado@linaro.org>
21817         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21818         <minimum_stride>: New const int field.
21819         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21820         minimum_stride field.
21821         (exynosm1_prefetch_tune): Likewise.
21822         (thunderxt88_prefetch_tune): Likewise.
21823         (thunderx_prefetch_tune): Likewise.
21824         (thunderx2t99_prefetch_tune): Likewise.
21825         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21826         (aarch64_override_options_internal): Update to set
21827         PARAM_PREFETCH_MINIMUM_STRIDE.
21828         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21829         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21830         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21831         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21832         stride is constant and is below the minimum stride threshold.
21834 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21836         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21837         to 512.
21839 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21841         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21842         <prefetch_dynamic_strides>: New const bool field.
21843         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21844         prefetch_dynamic_strides.
21845         (exynosm1_prefetch_tune): Likewise.
21846         (thunderxt88_prefetch_tune): Likewise.
21847         (thunderx_prefetch_tune): Likewise.
21848         (thunderx2t99_prefetch_tune): Likewise.
21849         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21850         to false.
21851         (aarch64_override_options_internal): Update to set
21852         PARAM_PREFETCH_DYNAMIC_STRIDES.
21853         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21854         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21855         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21856         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21857         prefetch-dynamic-strides setting.
21859 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21861         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21862         <minimum_stride>: New const int field.
21863         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21864         minimum_stride field.
21865         (exynosm1_prefetch_tune): Likewise.
21866         (thunderxt88_prefetch_tune): Likewise.
21867         (thunderx_prefetch_tune): Likewise.
21868         (thunderx2t99_prefetch_tune): Likewise.
21869         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21870         (aarch64_override_options_internal): Update to set
21871         PARAM_PREFETCH_MINIMUM_STRIDE.
21872         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21873         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21874         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21875         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21876         stride is constant and is below the minimum stride threshold.
21878 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
21880         PR c++/85659
21881         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
21882         the type is addressable.  Don't force op into register if it has
21883         BLKmode.
21885 2018-05-05  Roland McGrath  <mcgrathr@google.com>
21887         PR other/77609
21888         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
21889         any section for which we don't know a specific type it should have,
21890         regardless of name.  Previously this was done only for the exact
21891         names ".init_array", ".fini_array", and ".preinit_array".
21892         (default_elf_asm_named_section): Add comment about
21893         relationship with default_section_type_flags and SECTION_NOTYPE.
21894         (get_section): Don't consider it a type conflict if one side has
21895         SECTION_NOTYPE and the other doesn't, as long as neither has the
21896         SECTION_BSS et al used in the default_section_type_flags logic.
21898 2018-05-05  Tom de Vries  <tom@codesourcery.com>
21900         PR target/85653
21901         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
21902         (workaround_barsyncs): New function.
21903         (nvptx_reorg): Use workaround_barsyncs.
21904         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21905         (define_expand "nvptx_membar_cta"): New define_expand.
21906         (define_insn "*nvptx_membar_cta"): New insn.
21908 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
21910         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
21911         To improve optimization opportunities.
21912         * builtin-types.def: The new needed builtin types for the above.
21914 2018-05-04  Richard Biener  <rguenther@suse.de>
21916         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
21917         * gimple-ssa-store-merging.c
21918         (imm_store_chain_info::output_merged_store): Remove redundant create,
21919         release split_store vector contents on failure.
21920         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
21921         scalar stmt vector on cache hit.
21923 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
21925         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
21926         Xilinx FP support.
21927         * config.gcc (powerpc-xilinx-eabi*): Remove.
21928         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
21929         support.
21930         (fusion_addis_mem_combo_load): Ditto.
21931         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
21932         FP support.
21933         (rs6000_cpu_cpp_builtins): Ditto.
21934         * config/rs6000/rs6000-linux.c
21935         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
21936         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
21937         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
21938         support.
21939         (rs6000_setup_reg_addr_masks): Ditto.
21940         (rs6000_init_hard_regno_mode_ok): Ditto.
21941         (rs6000_option_override_internal): Ditto.
21942         (legitimate_lo_sum_address_p): Ditto.
21943         (rs6000_legitimize_address): Ditto.
21944         (rs6000_legitimize_reload_address): Ditto.
21945         (rs6000_legitimate_address_p): Ditto.
21946         (abi_v4_pass_in_fpr): Ditto.
21947         (setup_incoming_varargs): Ditto.
21948         (rs6000_gimplify_va_arg): Ditto.
21949         (rs6000_split_multireg_move): Ditto.
21950         (rs6000_savres_strategy): Ditto.
21951         (rs6000_emit_prologue_components): Ditto.
21952         (rs6000_emit_epilogue_components): Ditto.
21953         (rs6000_emit_prologue): Ditto.
21954         (rs6000_emit_epilogue): Ditto.
21955         (rs6000_elf_file_end): Ditto.
21956         (rs6000_function_value): Ditto.
21957         (rs6000_libcall_value): Ditto.
21958         * config/rs6000/rs6000.h: Ditto.
21959         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
21960         (TARGET_MINMAX): ... this.  New.
21961         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
21962         * config/rs6000/rs6000.md: Remove Xilinx FP support.
21963         (*movsi_internal1_single): Delete.
21964         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
21965         mfpu=, mxilinx-fpu): Delete.
21966         * config/rs6000/singlefp.h: Delete.
21967         * config/rs6000/sysv4.h: Remove Xilinx FP support.
21968         * config/rs6000/t-rs6000: Ditto.
21969         * config/rs6000/t-xilinx: Delete.
21970         * config/rs6000/titan.md: Adjust for fp_type removal.
21971         * config/rs6000/vsx.md: Remove Xilinx FP support.
21972         (VStype_simple): Delete.
21973         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
21974         * config/rs6000/xfpu.h: Delete.
21975         * config/rs6000/xfpu.md: Delete.
21976         * config/rs6000/xilinx.h: Delete.
21977         * config/rs6000/xilinx.opt: Delete.
21978         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
21979         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
21981 2018-05-04  Tom de Vries  <tom@codesourcery.com>
21983         PR libgomp/85639
21984         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
21985         if ignore == 0.
21987 2018-05-04  Richard Biener  <rguenther@suse.de>
21989         PR middle-end/85627
21990         * tree-complex.c (update_complex_assignment): We are always in SSA form.
21991         (expand_complex_div_wide): Likewise.
21992         (expand_complex_operations_1): Likewise.
21993         (expand_complex_libcall): Preserve EH info of the original stmt.
21994         (tree_lower_complex): Handle removed blocks.
21995         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
21996         on complex multiplication and division libcall builtins.
21998 2018-05-04  Richard Biener  <rguenther@suse.de>
22000         PR middle-end/85574
22001         * fold-const.c (negate_expr_p): Restrict negation of operand
22002         zero of a division to when we know that can happen without
22003         overflow.
22004         (fold_negate_expr_1): Likewise.
22006 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
22008         PR libstdc++/85466
22009         * real.h (real_nextafter): Declare.
22010         * real.c (real_nextafter): New function.
22011         * fold-const-call.c (fold_const_nextafter): New function.
22012         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22013         CASE_CFN_NEXTTOWARD.
22014         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22015         even when arg1_mode is different from arg0_mode.
22017 2018-05-03  Nathan Sidwell  <nathan@acm.org>
22019         * doc/extend.texi (Deprecated Features): Remove
22020         -ffriend-injection.
22021         (Backwards Compatibility): Likewise.
22022         * doc/invoke.texi (C++ Language Options): Likewise.
22023         (C++ Dialect Options): Likewise.
22025 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
22027         PR target/85530
22028         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22029         _mm512_mask_mullox_epi64): New intrinsics.
22031 2018-05-03  Tom de Vries  <tom@codesourcery.com>
22033         PR testsuite/85106
22034         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22035         dump files): Add offload-tree.
22037 2018-05-03  Richard Biener  <rguenther@suse.de>
22039         PR tree-optimization/85615
22040         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22041         to loops not nested in BBs loop father to avoid creating multi-entry
22042         loops.
22044 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22046         PR tree-optimization/70291
22047         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22048         arguments.  Change return type to tree.  Emit libcall as a new
22049         statement rather than replacing existing one when inplace_p is true.
22050         (expand_complex_multiplication_components): New function.
22051         (expand_complex_multiplication): Expand floating-point complex
22052         multiplication using the above.
22053         (expand_complex_division): Rename inner_type parameter to type.
22054         Update expand_complex_libcall call-site.
22055         (expand_complex_operations_1): Update expand_complex_multiplication
22056         and expand_complex_division call-sites.
22058 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22060         PR target/85582
22061         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22062         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22063         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22064         the highest significant bit of the shift count mask is clear.  In
22065         check whether and[sq]i3 is needed verify that all significant bits
22066         of the shift count other than the highest are set.
22068 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22070         PR libgomp/82428
22071         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22072         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22073         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22074         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22075         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22076         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22077         __builtin_goacc_parlevel_size.
22079 2018-05-02  Richard Biener  <rguenther@suse.de>
22081         PR tree-optimization/85597
22082         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22083         do not use split vect_get_vec_defs call but call vect_get_slp_defs
22084         directly.
22086 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22088         PR testsuite/85106
22089         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22090         dump files): Add ltrans-tree.
22092 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22094         PR testsuite/85106
22095         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22096         dump files): Add wpa-ipa.
22098 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
22100         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
22101         powerpc*-*-linux*paired* target.
22102         * config/rs6000/750cl.h: Delete.
22103         * config/rs6000/paired.h: Delete.
22104         * config/rs6000/paired.md: Delete.
22105         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22106         float support.
22107         * config/rs6000/rs6000-builtin.def: Remove paired float support.
22108         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22109         comment.  Remove paired float support.
22110         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22111         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22112         VECTOR_PAIRED.
22113         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22114         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22115         declarations.
22116         * config/rs6000/rs6000.c: Remove paired float support.
22117         (paired_expand_vector_init, paired_expand_vector_move,
22118         paired_emit_vector_compare, paired_emit_vector_cond_expr,
22119         (paired_expand_lv_builtin, paired_expand_stv_builtin,
22120         paired_expand_builtin, paired_expand_predicate_builtin,
22121         paired_init_builtins): Delete.
22122         * config/rs6000/rs6000.h: Remove paired float support.
22123         * config/rs6000/rs6000.md: Remove paired float support.
22124         (move_from_CR_ov_bit): Delete.
22125         * config/rs6000/rs6000.opt (mpaired): Delete.
22126         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22127         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22129 2018-05-02  Richard Biener  <rguenther@suse.de>
22131         PR middle-end/85567
22132         * gimplify.c (gimplify_save_expr): When in SSA form allow
22133         SAVE_EXPRs to compute to SSA vars.
22135 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
22137         PR target/85582
22138         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22139         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22140         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22141         clobber operands[2], instead use a new pseudo.  Formatting fixes.
22143 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
22145         PR tree-optimization/85586
22146         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22147         exit early for statements in the same group if the accesses are
22148         not strided.
22150 2018-05-02  Tom de Vries  <tom@codesourcery.com>
22152         PR lto/85451
22153         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22154         error message.
22156 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
22158         PR tree-optimization/85143
22159         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22161 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22163         PR lto/85451
22164         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22165         not found" error message.
22167 2018-05-01  Tom de Vries  <tom@codesourcery.com>
22169         PR other/83786
22170         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22171         * vec.c (test_ordered_remove_if): New function.
22172         (vec_c_tests): Call test_ordered_remove_if.
22173         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22174         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22175         * tree-vect-patterns.c (vect_pattern_recog_1): Use
22176         VEC_ORDERED_REMOVE_IF.
22178 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
22180         PR tree-optimization/82665
22181         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22182         pointer subtraction where arguments come from a memchr call.
22184 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
22186         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22187         --push-state --as-needed and --pop-state instead of --as-needed and
22188         --no-as-needed if ld supports it.
22189         * configure: Regenerated.
22191         PR web/85578
22192         * doc/install.texi2html: Replace _002d with - and _002a with * in
22193         generated html files using sed.
22195 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22197         PR c++/85523
22198         * gcc-rich-location.c (blank_line_before_p): New function.
22199         (use_new_line): New function.
22200         (gcc_rich_location::add_fixit_insert_formatted): New function.
22201         * gcc-rich-location.h
22202         (gcc_rich_location::add_fixit_insert_formatted): New function.
22204 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22206         * selftest.c (assert_streq): Rename "expected" and "actual" to
22207         "val1" and "val2".  Extend NULL-handling to cover both inputs
22208         symmetrically, while still requiring both to be non-NULL for a pass.
22209         * selftest.h (assert_streq): Rename "expected" and "actual" to
22210         "val1" and "val2".
22211         (ASSERT_EQ): Likewise.
22212         (ASSERT_EQ_AT): Likewise.
22213         (ASSERT_KNOWN_EQ): Likewise.
22214         (ASSERT_KNOWN_EQ_AT): Likewise.
22215         (ASSERT_NE): Likewise.
22216         (ASSERT_MAYBE_NE): Likewise.
22217         (ASSERT_MAYBE_NE_AT): Likewise.
22218         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
22219         the assertion to pass.
22220         (ASSERT_STREQ_AT): Likewise.
22222 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
22224         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
22225         interaction with -pie.
22227 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22229         * selftest.h: Fix alphabetization of per-source-file selftest
22230         declarations.
22232 2018-04-30  Jason Merrill  <jason@redhat.com>
22234         PR c++/61982 - dead stores to destroyed objects.
22235         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
22236         of clobber.
22238 2018-04-30  Jason Merrill  <jason@redhat.com>
22240         * tree.c (build_clobber): New.
22241         * tree.h: Declare it.
22242         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
22244 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22246         * diagnostic-show-locus.c (layout::layout): Update for
22247         location_get_source_line returning a char_span.
22248         (struct char_span): Move to input.h.
22249         (struct correction): Update for fields in char_span becoming
22250         private.
22251         (struct source_line): Update for location_get_source_line
22252         returning a char_span.
22253         (layout::print_line): Likewise.
22254         * edit-context.c (edited_file::print_content): Likewise.
22255         (edited_file::print_diff_hunk): Likewise.
22256         (edited_file::print_run_of_changed_lines): Likewise.
22257         (edited_file::get_num_lines): Likewise.
22258         (edited_line::edited_line): Likewise.
22259         * final.c (asm_show_source): Likewise.
22260         * input.c (location_get_source_line): Convert return type
22261         from const char * to char_span, losing the final "line_len"
22262         param.
22263         (dump_location_info): Update for the above.
22264         (get_substring_ranges_for_loc): Likewise.  Use a char_span
22265         when handling the literal within the line.
22266         (test_reading_source_line): Update for location_get_source_line
22267         returning a char_span.
22268         * input.h (class char_span): Move here from
22269         diagnostic-show-locus.c, converting from a struct to a class.
22270         Make data members private.
22271         (char_span::operator bool): New.
22272         (char_span::length): New.
22273         (char_span::get_buffer): New.
22274         (char_span::operator[]): New.
22275         (char_span::subspan): Make const.
22276         (char_span::xstrdup): New.
22277         (location_get_source_line): Convert return type from const char *
22278         to char_span, losing the final "line_size" param.
22280 2018-04-30  Jan Hubicka  <jh@suse.cz>
22282         * lto-wrapper.c (ltrans_priorities): New static var.
22283         (cmp_priority): New.
22284         (run_gcc): Read priorities and if doing parallel build order
22285         the Makefile by them.
22287 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
22289         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
22291 2018-04-30  Richard Biener  <rguenther@suse.de>
22293         * tree-cfg.c (verify_address): Remove base argument, add
22294         flag whether to check TREE_ADDRESSABLE and do that.
22295         (verify_expr): Remove.
22296         (verify_types_in_gimple_reference): Add pieces from verify_expr.
22297         (verify_gimple_assign_single): Likewise.
22298         (verify_gimple_switch): Likewise.
22299         (verify_expr_location_1): Dereference tp once.  Add (disabled)
22300         piece from verify_expr.
22301         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
22303 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
22305         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
22307 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
22309         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
22310         (small_data_pattern): Likewise.
22311         (arc_rewrite_small_data): Likewise.
22312         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
22313         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
22314         (get_symbol_alignment): New function.
22315         (legitimate_small_data_address_p): Likewise.
22316         (legitimate_scaled_address): Update, call
22317         legitimate_small_data_address_p.
22318         (output_sdata): New static variable.
22319         (arc_print_operand): Update how we handle small data operands.
22320         (arc_print_operand_address): Likewise.
22321         (arc_legitimate_address_p): Update, use
22322         legitimate_small_data_address_p.
22323         (arc_rewrite_small_data_p): Remove.
22324         (arc_rewrite_small_data_1): Likewise.
22325         (arc_rewrite_small_data): Likewise.
22326         (small_data_pattern): Likewise.
22327         (compact_sda_memory_operand): Update to use
22328         legitimate_small_data_address_p and get_symbol_alignment.
22329         (prepare_move_operands): Don't rewite sdata pattern.
22330         (prepare_extend_operands): Remove.
22331         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
22332         pattern.
22333         (zero_extendqisi2): Likewise.
22334         (zero_extendhisi2): Likewise.
22335         (extendqihi2): Likewise.
22336         (extendqisi2): Likewise.
22337         (extendhisi2): Likewise.
22338         (addsi3): Likewise.
22339         (subsi3): Likewise.
22340         (andsi3): Likewise.
22341         * config/arc/constraints.md (Usd): Change it to memory constraint.
22343 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
22345         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
22346         as source of std instructions.
22347         * config/arc/arc.md (movsi_insn): Update pattern predicate to
22348         allow 6-bit constants as source for store instructions.
22349         (movdi_insn): Update instruction pattern to allow 6-bit constants
22350         as source for store instructions.
22352 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
22354         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
22356 2018-04-30  Nathan Sidwell  <nathan@acm.org>
22357             Sandra Loosemore <sandra@codesourcery.com>
22359         * dumpfile.c (dump_open): Allow '-' for stdout.
22360         * doc/invoke.texi (Developer Options): Document dump filename
22361         determination early.  Document stdin/stdout selection.
22363 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
22365         Microblaze Target: PIC data text relative
22367         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
22368         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
22369         Add declaration.
22370         * config/microblaze/microblaze.h (microblaze_constant_address_p):
22371         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
22372         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
22373         New addressing mode for data-text relative position indepenedent code.
22374         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
22375         'ADDRESS_SYMBOLIC_TXT_REL'.
22376         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
22377         (microblaze_legitimate_pic_operand): Exclude function calls from
22378         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
22379         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
22380         addresses cases.
22381         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22382         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22383         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
22384         for 'address + offset'.
22385         (microblaze_expand_prologue): Add new function prologue call for
22386         'r20' assignation.
22387         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
22388         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
22389         table in case of TARGET_PIC_DATA_TEXT_REL.
22390         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
22391         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
22392         Add new macros 'UNSPEC_TEXT',
22393         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
22394         + exclude function calls from 'UNSPEC_PLT' in case of data text
22395         relative mode.
22396         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22397         new target hook for generating address diff vector tables in case of
22398         flag_pic.
22399         * doc/tm.texi : Regenerate.
22400         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
22401         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
22402         of addr diff vector generation.
22403         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22404         target hook definition.
22405         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
22406         Add default function for generate_pic_addr_diff_vec -> flag_pic.
22407         * doc/invoke.texi (Add new pic option): Add new microblaze pic
22408         option for data text relative.
22410 2018-04-30  Richard Biener  <rguenther@suse.de>
22412         * tree-chrec.h (evolution_function_is_constant_p): Remove
22413         redundant check.
22414         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
22416 2018-04-30  Richard Biener  <rguenther@suse.de>
22418         PR bootstrap/85571
22419         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
22421 2018-04-30  Richard Biener  <rguenther@suse.de>
22423         PR tree-optimization/28364
22424         PR tree-optimization/85275
22425         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
22426         copying first exit test.
22428 2018-04-28  Mark Wielaard  <mark@klomp.org>
22430         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
22431         dwarf_version >= 5.
22432         (dwarf_AT): Handle DW_AT_addr_base.
22433         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
22435 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
22437         PR target/84431
22438         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
22439         (*ashl<dwi>3_doubleword_mask_1): Ditto.
22440         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
22441         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
22443 2018-04-28  Richard Biener  <rguenther@suse.de>
22445         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
22446         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
22447         to reflect use.  Only add interesting stmts.
22449 2018-04-27  Martin Jambor  <mjambor@suse.cz>
22451         PR ipa/85549
22452         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
22453         the jump function allows for passing through aggregate values.
22455 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
22457         * input.h (in_system_header_at): Convert from macro to inline
22458         function.
22459         (from_macro_expansion_at): Likewise.
22460         (from_macro_definition_at): Likewise.
22462 2018-04-27  Jeff Law  <law@redhat.com>
22464         * config.gcc: Mark tile* targets as deprecated/obsolete.
22466 2018-04-27  Richard Biener  <rguenther@suse.de>
22468         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
22469         fix for ILP32.
22471 2018-04-27  Richard Biener  <rguenther@suse.de>
22473         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
22475 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
22477         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
22478         with Yd constraint. Set "preferred_for_speed" attribute from
22479         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
22480         with Yd constraint.
22481         (*movdi_internal): Ditto.
22482         (movti_interunit splitters): Remove
22483         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
22484         (movdi_interunit splitters): Ditto.
22485         * config/i386/constraints.md (Ye): Remove.
22486         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
22488 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22490         PR target/85512
22491         * config/aarch64/constraints.md (Usg): Limit to 31.
22492         (Usj): Limit to 63.
22494 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
22496         PR tree-optimization/85529
22497         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
22498         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
22499         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
22500         zero extension or masking of the MSB bit.
22501         (optimize_range_tests): Add FIRST_BB argument, pass it through
22502         to optimize_range_tests_var_bound.
22503         (maybe_optimize_range_tests, reassociate_bb): Adjust
22504         optimize_range_tests callers.
22506 2018-04-26  Richard Biener  <rguenther@suse.de>
22507             Jakub Jelinek  <jakub@redhat.com>
22509         * cgraph.h (symbol_table): Just declare debug method here.
22510         * symtab.c (symbol_table::debug): Define.
22512 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
22514         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
22516 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
22518         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
22519         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
22520         (*movdi_internal): Substitute Yi and Yj constraint with x
22521         and Ym and Yn constraint with y constraint.  Update "isa"
22522         attribute and set "preferred_for_speed" attribute from
22523         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
22524         (*movsi_internal): Ditto.
22525         (*movdf_internal): Ditto.
22526         (*movsf_internal): Ditto.
22527         (*zero_extendsidi2): Ditto.
22528         * config/i386/sse.md (vec_set<mode>_0): Ditto.
22529         (sse2_loadld): Ditto.
22530         (*vec_extract<ssevecmodelower>_0): Ditto.
22531         (*vec_extractv4si_0_zext_sse4): Ditto.
22532         (vec_concatv2di): Ditto.
22533         (*vec_dup<mode>): Ditto.
22534         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
22535         * config/i386/constraints.md (Yi): Remove.
22536         (Yj): Remove.
22537         (Ym): Remove.
22538         (Yn): Remove.
22540 2018-04-26  Nathan Sidwell  <nathan@acm.org>
22542         * dumpfile.c (dump_open): New.
22543         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
22544         (dump_finish): Detect stdio/stderr by value not name.
22546 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
22548         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
22550 2018-04-26  Tom de Vries  <tom@codesourcery.com>
22552         PR target/84952
22553         * config/nvptx/nvptx.c (verify_neutering_jumps)
22554         (verify_neutering_labels): New function
22555         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
22557 2018-04-26  Tom de Vries  <tom@codesourcery.com>
22559         PR target/84025
22560         * config/nvptx/nvptx.c (needs_neutering_p): New function.
22561         (nvptx_single): Use needs_neutering_p to skip over insns that do not
22562         need neutering.
22564 2018-04-26  Richard Biener <rguenther@suse.de>
22565             Tom de Vries  <tom@codesourcery.com>
22567         PR lto/85422
22568         * lto-streamer-out.c (output_function): Fixup loops if required to match
22569         discovery done in the reader.
22571 2018-04-26  Richard Biener  <rguenther@suse.de>
22573         PR tree-optimization/85116
22574         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
22575         have a loop exit from the single latch predecessor.  Remove
22576         case of header with just condition.
22577         (ch_base::copy_headers): Exclude infinite loops from any
22578         processing.
22579         (pass_ch::execute): Record exits.
22581 2018-04-26  Richard Biener  <rguenther@suse.de>
22583         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
22584         prologue cost vector and pass it to vect_get_load_cost.
22585         (vect_get_peeling_costs_all_drs): Likewise.
22586         (vect_peeling_hash_get_lowest_cost): Likewise.
22587         (vect_enhance_data_refs_alignment): Likewise.
22589 2018-04-26  Richard Biener  <rguenther@suse.de>
22591         PR middle-end/85450
22592         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
22593         checking of integer<->pointer conversions.
22594         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
22595         sign-/zero-extending pointer types.
22596         (expand_omp_for_static_chunk): Likewise.
22598 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
22599             Jean Lee  <xiaoyur347@gmail.com>
22601         * config/mips/mips.c (mips_asan_shadow_offset): New function.
22602         (TARGET_ASAN_SHADOW_OFFSET): Define.
22603         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
22604         true for -fsanitize=address.
22606 2018-04-25  Mark Wielaard  <mark@klomp.org>
22608         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
22609         shorter ones.
22611 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
22613         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
22614         than "alu", remove explicit "memory" and "imm_disp" attributes.
22615         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
22617         PR middle-end/85414
22618         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
22619         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
22620         gen_lowpart_no_emit.
22622 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
22624         PR target/85473
22625         * config/i386/i386.c (ix86_expand_builtin): Change memory
22626         operand to XI, extend p0 to Pmode.
22627         * config/i386/i386.md: Change unspec volatile and operand
22628         1 mode to XI, change operand 0 mode to P.
22630 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22632         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
22633         GET_MODE_MASK before any checking.
22634         (nds32_can_use_bset_p): Likewise.
22635         (nds32_can_use_btgl_p): Likewise.
22637 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22639         * config/nds32/nds32-doubleword.md: New define_split pattern for
22640         illegal register number.
22642 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22644         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
22646 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22648         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
22650 2018-04-25  Richard Biener  <rguenther@suse.de>
22652         * lto-streamer.h (LTO_major_version): Bump to 8.
22654 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
22656         * BASE-VER: Set to 9.0.0.
22658 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
22660         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
22661         in __abskf2 and __powikf2.
22663 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22665         PR target/85512
22666         * config/aarch64/constraints.md (Usg, Usj): New constraints.
22667         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
22668         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
22669         Use the above on operand 2.  Reindent.
22670         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
22672 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
22674         PR target/85485
22675         * common/config/i386/i386-common.c (ix86_handle_option): Don't
22676         handle OPT_mcet.
22677         * config/i386/i386.opt (mcet): Removed.
22678         * doc/install.texi: Remove -mcet documentation.
22679         * doc/invoke.texi: Likewise.
22681 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
22683         PR target/85485
22684         * doc/install.texi: Remove -mcet from bootstrap-cet.
22686 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22688         PR target/85511
22689         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
22690         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
22691         if TARGET_64BIT.
22693         PR target/85503
22694         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
22695         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
22696         containing a CONST_VECTOR.
22698 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
22700         * doc/install.texi: Update newlib dependency for nvptx.
22702 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22704         PR target/85508
22705         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
22706         instead of INTVAL when shifting x left.
22708 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
22710         PR tree-optimization/85478
22711         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
22712         vect_grouped_store_supported for single element vectors.
22714 2018-04-24  Richard Biener  <rguenther@suse.de>
22716         PR target/85491
22717         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
22718         load cost increase to the case of non-constant step.
22720 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22722         PR target/84828
22723         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
22724         destination if any_malformed_asm.
22726 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
22728         PR middle-end/85496
22729         * expr.c (store_field): In the bitfield case, if the value comes from
22730         a function call and is returned in registers by means of a PARALLEL,
22731         do not change the mode of the temporary unless BLKmode and VOIDmode.
22733 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
22735         PR rtl-optimization/85423
22736         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
22737         dependencies to debug insns when the previous insn is non-debug.
22739 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
22741         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
22742         enums into a single definition.
22743         (fls): Fix predicates and printing.
22744         (seti): Likewise.
22746 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
22748         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
22749         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
22750         and short u6 immediate.
22751         (check_if_valid_sleep_operand): Remove.
22752         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
22754 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22756         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
22757         flag_always_save_lp condition.
22758         * config/nds32/nds32.opt (malways-save-lp): New option.
22760 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22762         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
22763         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
22764         * config/nds32/nds32.h
22765         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
22766         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
22768 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22770         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
22771         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
22773 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22774             Chung-Ju Wu  <jasonwucj@gmail.com>
22776         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
22777         Declare.
22778         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
22779         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
22781 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22783         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22785 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22787         * config/nds32/nds32-protos.h (nds32_data_alignment,
22788         nds32_local_alignment): Declare.
22789         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22790         nds32_local_alignment): New functions.
22791         (TARGET_CONSTANT_ALIGNMENT): Define.
22792         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22794 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22796         * config/nds32/nds32.c
22797         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22798         (TARGET_MODES_TIEABLE_P): Likewise.
22800 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22802         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22803         level Ofast and Og.
22805 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
22806             Chung-Ju Wu  <jasonwucj@gmail.com>
22808         * config/nds32/constants.md (unspec_volatile_element): Add enum values
22809         for unaligned access.
22810         * config/nds32/nds32-intrinsic.c: Implementation of expanding
22811         unaligned access.
22812         * config/nds32/nds32-intrinsic.md: Likewise.
22813         * config/nds32/nds32_intrinsic.h: Likewise.
22814         * config/nds32/nds32.h (nds32_builtins): Likewise.
22815         * config/nds32/nds32.opt (munaligned-access): New option.
22816         * config/nds32/nds32.c (nds32_asm_file_start): Display
22817         flag_unaligned_access status.
22819 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
22821         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22822         -mno-relax is present.
22823         * config/riscv/linux.h (LINK_SPEC): Ditto.
22825 2018-04-20  Martin Sebor  <msebor@redhat.com>
22827         PR c/85365
22828         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22829         for null pointers.
22830         (gimple_fold_builtin_stxcpy_chk): Same.
22831         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22833 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
22835         PR target/85456
22836         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22837         __powikf2 when long double is IEEE 128-bit.
22839 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
22841         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22842         step to make sure stack always aligned.
22844 2018-04-20  Carl Love  <cel@us.ibm.com>
22846         PR target/83402
22847         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22848         size check for arg0.
22850 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
22851             Tom de Vries  <tom@codesourcery.com>
22853         PR target/85445
22854         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22855         Emit insns for calls too.
22856         (nvptx_find_par): Always look for worker-level predecessor insn.
22857         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
22858         calls.
22859         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22860         (nvptx_process_pars): Propagate frames for calls.
22862 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
22864         PR target/85469
22865         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22866         Removed.
22867         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22868         (ix86_handle_option): Don't handle OPT_mibt.
22869         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22870         __SHSTK__.
22871         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22872         has_ibt and ibt.
22873         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22874         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
22875         (ix86_target_macros): Define __CET__ with flag_cf_protection
22876         for -fcf-protection.
22877         * config/i386/i386.c (isa2_opts): Remove -mibt.
22878         * config/i386/i386.h (TARGET_IBT): Removed.
22879         (TARGET_IBT_P): Likewise.
22880         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
22881         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
22882         * config/i386/i386.opt (mcet): Update help message.
22883         (mshstk): Likewise.
22884         (mibt): Removed.
22885         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
22886         -mcet as an alias for -mshstk.
22888 2018-04-20  Richard Biener <rguenther@suse.de>
22890         PR middle-end/85475
22891         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
22892         complexity by forcing a single use of the multiply operand.
22894 2018-04-20  Martin Jambor  <mjambor@suse.cz>
22896         ipa/85449
22897         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
22898         recursion dependency to only apply to non-clones.
22900 2018-04-20  Martin Jambor  <mjambor@suse.cz>
22902         ipa/85447
22903         * ipa-cp.c (create_specialized_node): Check that clones of
22904         self-recursive edges exist during IPA-CP.
22906 2018-04-19  Toon Moene  <toon@moene.org>
22908         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
22909         by -O3.
22911 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
22913         PR tree-optimization/85467
22914         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
22915         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
22916         VECTOR_CST element to type.
22918 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
22920         PR target/85397
22921         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
22922         * config/i386/i386.md (builtin_setjmp_setup): Removed.
22923         (builtin_longjmp): Likewise.
22924         (save_stack_nonlocal): New pattern.
22925         (restore_stack_nonlocal): Likewise.
22927 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
22929         PR target/85404
22930         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22931         Replace ASM_OUTPUT_LABEL with fprintf.
22933 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
22935         PR target/85417
22936         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22937         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
22938         * config/i386/i386-c.c (ix86_target_macros_internal): Also
22939         define __IBT__ and __SHSTK__ for -fcf-protection.
22940         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
22941         TARGET_IBT.
22942         (ix86_trampoline_init): Likewise.
22943         (x86_output_mi_thunk): Likewise.
22944         (ix86_notrack_prefixed_insn_p): Likewise.
22945         (ix86_option_override_internal): Don't disallow -fcf-protection.
22946         * config/i386/i386.md (rdssp<mode>): Also enable for
22947         -fcf-protection.
22948         (incssp<mode>): Likewise.
22949         (nop_endbr): Likewise.
22950         * config/i386/i386.opt (mcet): Change help message to built-in
22951         functions only.
22952         (mibt): Likewise.
22953         (mshstk): Likewise.
22954         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
22955         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
22956         enable CET built-in functions.
22958 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
22960         * common/config/i386/i386-common.c
22961         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
22962         OPTION_MASK_ISA_MOVDIRI_UNSET,
22963         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
22964         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
22965         * config.gcc (movdirintrin.h): New header.
22966         * config/i386/cpuid.h (bit_MOVDIRI,
22967         bit_MOVDIR64B): New bits.
22968         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
22969         and -mmvodir64b.
22970         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
22971         (VOID, PVOID, PCVOID)): New function types.
22972         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
22973         __builtin_ia32_directstoreu_u64,
22974         __builtin_ia32_movdir64b): New builtins.
22975         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
22976         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
22977         and -mmovdiri.
22978         (ix86_valid_target_attribute_inner_p): Ditto.
22979         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
22980         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
22981         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
22982         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
22983         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
22984         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
22985         (movdiri<mode>, movdir64b_<mode>): New.
22986         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
22987         * config/i386/immintrin.h: Include movdirintrin.h.
22988         * config/i386/movdirintrin.h: New file.
22989         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
22991 2018-04-19  Richard Biener  <rguenther@suse.de>
22993         PR middle-end/85455
22994         * cfg.c (clear_bb_flags): When loop state says we have
22995         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
22997 2018-04-19  Richard Biener  <rguenther@suse.de>
22999         PR tree-optimization/84737
23000         * tree-vect-data-refs.c (vect_copy_ref_info): New function
23001         copying restrict info.
23002         (vect_setup_realignment): Use it.
23003         * tree-vectorizer.h (vect_copy_ref_info): Declare.
23004         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23005         the first DR to all generated stores.
23006         (vectorizable_load): Likewise for loads.
23008 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
23010         PR tree-optimization/85446
23011         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23012         the integral and pointer types to have the same precision.
23014         * doc/install.texi: Document --disable-cet being the default and
23015         --enable-cet=auto.
23017 2018-04-18  Martin Liska  <mliska@suse.cz>
23019         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23020         style.
23022 2018-04-18  Martin Liska  <mliska@suse.cz>
23024         Revert
23025         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
23027         PR ipa/83983
23028         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23029         arguments if they are comparable.
23031 2018-04-18  Martin Liska  <mliska@suse.cz>
23033         Revert
23034         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
23036         PR lto/84805
23037         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23038         incomplete types.
23040 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
23042         PR target/85388
23043         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23044         ENDBR after calling __morestack.
23046 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
23048         PR jit/85384
23049         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23050         by using gcc_base_ver to generate a gcc_driver_version, and use
23051         it when generating GCC_DRIVER_NAME.
23052         * configure: Regenerate.
23054 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
23056         PR target/81084
23057         * config.gcc: Obsolete powerpc*-*-*spe*.
23059 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23061         PR debug/84637
23062         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23063         (stabstr_D): Change type of unum from unsigned int to
23064         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
23065         type.
23067 2018-04-17  Jim Wilson  <jimw@sifive.com>
23069         PR 84856
23070         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23071         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23072         Set arg_pointer_offset after using pretend_args_size.
23074 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23076         PR rtl-optimization/85431
23077         * dse.c (record_store): Ignore zero width stores.
23079         PR sanitizer/85230
23080         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
23081         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23082         __builtin_stack_restore rather than after it.
23083         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23084         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23085         argument instead of virtual_dynamic_stack_rtx.
23087 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23089         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23090         New prototype.
23091         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23092         Add note to error message to explain internal mapping of overloaded
23093         built-in function name to non-overloaded built-in function name.
23094         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23095         function.
23097 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
23099         PR target/85424
23100         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23101         where the inputs overlap with the output.
23103 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23105         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23106         (=v, v) alternative and explicit "memory" attribute.
23107         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
23108         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23109         attributes.
23110         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23111         "sselog1" type instead of "sselog".
23112         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23113         "sselog".  Remove explicit "memory" attribute.
23114         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23115         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23116         attributes.
23117         (vec_extract_hi_v32hi): Merge all alternatives into one, use
23118         "sselog1" type instead of "sselog".  Remove explicit "memory"
23119         attribute.
23120         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23121         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23122         attribute.
23123         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23124         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23125         attributes.
23126         (vec_extract_hi_v64qi): Merge all alternatives into one, use
23127         "sselog1" type instead of "sselog".  Remove explicit "memory"
23128         attribute.
23129         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23130         use "sselog1" type instead of "sselog".  Remove explicit "memory"
23131         attribute.
23133         PR target/85430
23134         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23136         PR middle-end/85414
23137         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23138         on a SUBREG.
23140 2018-04-17  Martin Jambor  <mjambor@suse.cz>
23142         PR ipa/85421
23143         * ipa-cp.c (create_specialized_node): Call
23144         expand_all_artificial_thunks if necessary.
23146 2018-04-17  Martin Liska  <mliska@suse.cz>
23148         PR lto/85405
23149         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23150         in message, remote space in between '_G' and '('.
23152 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
23154         PR target/85281
23155         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23156         avx512f_vmcmp<mode>3<round_saeonly_name>,
23157         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23158         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23159         avx512f_rndscale<mode><round_saeonly_name>,
23160         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23161         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23162         Use %<iptr>2 instead of %2 for -masm=intel.
23163         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23164         avx512f_vcvttss2usi<round_saeonly_name>,
23165         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23166         -masm=intel.
23167         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23168         avx512f_vcvttsd2usi<round_saeonly_name>,
23169         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23170         Use %q1 instead of %1 for -masm=intel.
23171         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23172         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23173         of %3 for -masm=intel.
23174         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23175         -masm=intel.
23176         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23177         -masm=intel.
23178         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23179         -masm=intel.
23180         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23181         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23182         %g1.
23183         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23184         -masm=intel.
23185         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23186         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23187         %g1 and one with %0 and %1.
23188         (avx512er_vmrcp28<mode><round_saeonly_name>,
23189         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23190         %1 for -masm=intel.
23191         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23192         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23193         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23194         of %0 and %{%4%} for -masm=intel.
23195         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23196         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23197         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23198         order of %0 and %{%5%}%{z%} for -masm=intel.
23200 2018-04-17  Jan Hubicka  <jh@suse.cz>
23202         PR lto/85405
23203         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23205 2018-04-17  Martin Liska  <mliska@suse.cz>
23207         PR ipa/85329
23208         * multiple_target.c (create_dispatcher_calls): Set apostrophes
23209         for target_clone error message.  Make default implementation
23210         clone to be a local declaration.
23211         (separate_attrs): Add new argument and check for an empty
23212         string.
23213         (expand_target_clones): Handle it.
23214         (ipa_target_clone): Make redirection just for target_clones
23215         functions.
23217 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
23218             Tom de Vries  <tom@codesourcery.com>
23220         PR middle-end/84955
23221         * omp-expand.c (expand_oacc_for): Add dummy false branch for
23222         tiled basic blocks without omp continue statements.
23224 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
23226         PR target/83660
23227         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
23228         vec_extract expression as having side effects to make sure it gets
23229         a cleanup point.
23231 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
23233         PR target/85403
23234         * config/i386/i386.c (get_builtin_code_for_version): Check
23235         error_mark_node.
23237 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
23239         PR target/84331
23240         * config.gcc: Support "skylake".
23241         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23242         PROCESSOR_SKYLAKE.
23243         * config/i386/i386.c (m_SKYLAKE): Define.
23244         (processor_target_table): Add "skylake".
23245         (ix86_option_override_internal): Add "skylake".
23246         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
23247         PROCESSOR_CANNONLAKE.
23248         (get_builtin_code_for_version): Fix priority for
23249         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
23250         PROCESSOR_SKYLAKE-AVX512.
23251         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
23252         (processor_type): Add PROCESSOR_SKYLAKE.
23254 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
23255             Jason Merrill  <jason@redhat.com>
23257         PR c++/85112
23258         * convert.c (convert_to_integer_1): Use direct recursion for
23259         enumeral types and types with a precision less than the number
23260         of bits in their mode.
23262 2018-04-16  Julia Koval  <julia.koval@intel.com>
23264         PR target/84413
23265         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
23266         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
23268 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
23270         PR target/85293
23271         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
23272         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
23273         and -mno-direct-move.
23275 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
23277         PR target/83402
23278         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
23279         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
23280         Ensure negative shifts result in {0}.
23282 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
23284         PR rtl-optimization/79916
23285         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
23286         regs (if any) to define how to gnerate SD moves when LRA is in
23287         progress.
23289 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
23291         PR rtl-optimization/85393
23292         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
23293         * except.c (expand_dw2_landing_pad_for_region): Make static.
23294         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
23295         a label and unconditional jump to old_bb, rather than
23296         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
23297         basic block.
23299         PR rtl-optimization/85376
23300         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
23301         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
23302         instead of a specific value.
23304 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
23305             Bin Cheng  <bin.cheng@arm.com>
23307         PR tree-optimization/82965
23308         PR tree-optimization/83991
23309         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
23310         by_profile_only parameter.
23311         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
23312         information if the loop was predicted to iterate too many times.
23313         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
23315 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
23317         PR lto/71991
23318         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
23319         always inline.
23321 2018-04-13  Martin Liska  <mliska@suse.cz>
23322             Jakub Jelinek  <jakub@redhat.com>
23324         PR middle-end/81657
23325         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
23326         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
23327         * builtins.c (expand_builtin_memory_copy_args): Use
23328         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
23329         handle dest_addr == pc_rtx.
23331 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
23333         PR target/85291
23334         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
23335         asked to not generate direct moves.
23336         (fix_trunc<mode>si2_stfiwx): Similar.
23337         (fix_trunc<mode>si2_internal): Similar.
23339 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
23341         PR debug/83157
23342         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
23343         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
23344         lookup if dest in some wider mode is known to be const0_rtx and
23345         if so, record permanent equivalence for it to be ZERO_EXTEND of
23346         the narrower mode destination.
23348 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
23350         * lto-streamer-out.c (output_function): Revert 259346.
23351         * omp-expand.c (expand_oacc_for): Likewise.
23353 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
23355         PR rtl-optimization/85354
23356         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
23357         * sel-sched.c (sel_global_init): ... here.
23359 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
23361         PR target/85238
23362         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
23363         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
23364         mode for PE-COFF targets.
23365         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
23366         (i386_pe_asm_lto_end): Likewise.
23367         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
23368         (TARGET_ASM_LTO_END): Likewise.
23369         * config/i386/winnt.c (saved_debug_info_level): New static variable.
23370         (i386_pe_asm_lto_start): New function.
23371         (i386_pe_asm_lto_end): Likewise.
23373 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
23374             Richard Biener  <rguenther@suse.de>
23376         PR middle-end/84955
23377         * lto-streamer-out.c (output_function): Fix CFG loop state before
23378         streaming out.
23379         * omp-expand.c (expand_oacc_for): Handle calls to internal
23380         functions like regular functions.
23382 2018-04-12  Richard Biener  <rguenther@suse.de>
23384         PR lto/85371
23385         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
23386         for the early LTO debug to properly generate references to it
23387         during DIE emission.  Do not re-use that for the skeleton for
23388         split-dwarf.
23389         (dwarf2out_early_finish): Likewise.
23391 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
23393         PR target/85328
23394         * config/i386/sse.md
23395         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
23396         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
23397         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
23398         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
23399         and output is a reg, avoid creating invalid lowpart subreg, but
23400         instead split into a 512-bit move.  Don't split if not AVX512VL,
23401         input is xmm16+ reg and output is a mem.
23402         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
23403         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
23404         xmm16+ reg and output is a mem.
23406 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23408         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
23409         also for flag_dwarf2_cfi_asm.
23411 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
23413         PR rtl-optimization/85342
23414         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
23415         a bool scalar var inside of the loop instead.  Don't try to update
23416         recog_data.operand after failed apply_change_group.
23418 2018-04-12  Tom de Vries  <tom@codesourcery.com>
23420         PR target/85296
23421         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
23422         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
23423         array with flexible array member as array without given dimension.
23424         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
23425         argument for undefined param to true.
23427 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
23429         PR target/85321
23430         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23431         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
23432         from PowerPC section.
23433         * config/rs6000/sysv4.opt (mcall-): Improve help text.
23434         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
23435         help text that is too long.
23436         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
23437         help text that is too long.
23438         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
23439         help text that is too long.
23441 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
23443         * config/alpha/alpha.md (stack_probe_internal): Rename
23444         from "probe_stack".  Update all callers.
23446 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
23448         PR rtl-optimization/84566
23449         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
23450         sched_macro_fuse_insns.
23452 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
23454         PR target/84301
23455         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
23456         (compute_block_dependences): ... from here.
23458 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
23460         PR tree-optimization/85331
23461         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
23462         from int to HOST_WIDE_INT.
23464 2018-04-11  Martin Jambor  <mjambor@suse.cz>
23466         PR ipa/84149
23467         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
23468         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
23469         not the same as the source val.
23470         (cgraph_edge_brings_value_p): New parameter.
23471         (gather_edges_for_value): Pass destination value to
23472         cgraph_edge_brings_value_p.
23473         (perhaps_add_new_callers): Likewise.
23474         (get_info_about_necessary_edges): Likewise and exclude values brought
23475         only by self-recursive edges.
23476         (create_specialized_node): Redirect only clones of self-calling edges.
23477         (+self_recursive_pass_through_p): New function.
23478         (find_more_scalar_values_for_callers_subset): Use it.
23479         (find_aggregate_values_for_callers_subset): Likewise.
23480         (known_aggs_to_agg_replacement_list): Removed.
23481         (decide_whether_version_node): Re-calculate known constants for all
23482         remaining context clones.
23484 2018-04-11  Richard Biener  <rguenther@suse.de>
23486         PR lto/85339
23487         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
23488         from early DWARF output.
23489         (dwarf2out_early_finish): Output line info unconditionally into
23490         early DWARF and add reference to it.
23492 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
23494         PR target/85281
23495         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
23496         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
23497         other than V2DFmode using iptr mode attribute.
23498         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
23500 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
23502         PR rtl-optimization/84659
23503         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
23505 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
23507         PR debug/85302
23508         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
23509         SIZEP is NULL.
23510         (output_loc_list): Pass address of a dummy size variable even in the
23511         locview handling loop.
23512         (index_location_lists): Add comment on why skip_loc_list_entry can't
23513         call size_of_locs.
23515 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23517         PR target/85261
23518         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
23519         into register.
23521 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
23523         PR target/85321
23524         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23525         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
23526         and -mstring-compare-inline-limit.
23528 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
23530         PR target/85287
23531         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
23532         for stack clash protection in a register whenever we need it to be in
23533         a register.
23535 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
23537         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
23538         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
23540 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
23542         PR target/85321
23543         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
23544         the help text.
23545         (mlong-double-): Ditto.
23546         * config/rs6000/sysv4.opt (msdata=): Ditto.
23547         (mtls-size=): Ditto.
23549 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23551         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
23552         erroneous entries for
23553         "vector int vec_ldl (int, long int *)", and
23554         "vector unsigned int vec_ldl (int, unsigned long int *)".
23555         Add comments and entries for
23556         "vector bool char vec_ldl (int, bool char *)",
23557         "vector bool short vec_ldl (int, bool short *)",
23558         "vector bool int vec_ldl (int, bool int *)",
23559         "vector bool long long vec_ldl (int, bool long long *)",
23560         "vector pixel vec_ldl (int, pixel *)",
23561         "vector long long vec_ldl (int, long long *)",
23562         "vector unsigned long long vec_ldl (int, unsigned long long *)".
23563         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
23564         type tree bool_long_long_type_node and correct definition of
23565         bool_V2DI_type_node to make reference to this new type tree.
23566         (rs6000_mangle_type): Replace erroneous reference to
23567         bool_long_type_node with bool_long_long_type_node.
23568         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
23569         comments to emphasize sign distinctions for char and int types and
23570         replace RS6000_BTI_bool_long constant with
23571         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
23572         use of RS6000_BTI_pixel.
23573         (bool_long_type_node): Remove this macro definition.
23574         (bool_long_long_type_node): New macro definition
23576 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
23578         PR rtl-optimization/85300
23579         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
23580         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
23581         simplify_unary_operation fails.
23583 2018-04-10  Martin Liska  <mliska@suse.cz>
23585         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
23586         cgraph_edge and ipa_ref.
23588 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
23590         PR target/85177
23591         PR target/85255
23592         * config/i386/sse.md
23593         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
23594         computation of the VEC_MERGE selector from mask.
23595         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
23596         Fix decoding of the VEC_MERGE selector into mask.
23598 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
23600         PR tree-optimization/85286
23601         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
23603 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
23605         * final.c (final_1): Set insn_last_address as well as
23606         insn_current_address.
23608 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23610         PR target/85173
23611         * explow.c (emit_stack_probe): Call validize_mem on memory location
23612         before passing it to gen_probe_stack.  Create address operand and
23613         legitimize it for the probe_stack_address case.
23615 2018-04-09  Jan Hubicka  <jh@suse.cz>
23617         PR lto/85078
23618         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
23619         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
23620         * tree.c (free_lang_data_in_type): Fix handling of binfos;
23621         walk basetypes.
23622         (free_lang_data): Rebuild type inheritance graph.
23624 2018-04-09  Martin Sebor  <msebor@redhat.com>
23626         * invoke.texi (-finline-small-functions): Mention other optimization
23627         options.
23628         (-findirect-inlining, -fpartial-inlining): Same.
23629         (-finline-functions-called-once): Same.
23630         (-freorder-blocks-and-partition): Same.
23632 2018-04-09  Jan Hubicka  <jh@suse.cz>
23634         PR rtl/84058
23635         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
23636         jumps; choose last target that matches the criteria (i.e.
23637         no partition changes for non-crossing jumps).
23638         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
23639         support for redirecting crossing jumps to non-crossing.
23641 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
23643         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
23644         also for naked functions.
23646 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
23648         * config/arc/arc.md (add_shift): New pattern.
23649         (add_shift2): Likewise.
23650         (sub_shift): Likewise.
23651         (sub_shift_cmp0_noout): Likewise.
23652         (compare_si_ashiftsi): Likewise.
23653         (xbfu_cmp0_noout): New combine pattern.
23654         (xbfu_cmp0"): Likewise.
23655         (movsi_set_cc_insn): Place the predicable variant first.
23656         (commutative_binary_cmp0_noout): Remove clobber.
23657         (commutative_binary_cmp0): New pattern.
23658         (noncommutative_binary_cmp0): Likewise.
23659         (noncommutative_binary_cmp0_noout): Likewise.
23660         (noncommutative_binary_comparison_result_used): Removed.
23661         (rsub_cmp0): New pattern.
23662         (rsub_cmp0_noout): Likewise.
23663         (extzvsi): Changed, keep only meaningful variants.
23664         (SQH, SEZ): New iterators.
23665         (SQH_postfix): New mode attribute.
23666         (SEZ_prefix): New code attribute.
23667         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
23668         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
23669         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
23670         of numerical value.
23671         (noncommutative_operator): Check the availability of barrel
23672         shifter option.
23674 2018-04-09  Richard Biener  <rguenther@suse.de>
23676         PR tree-optimization/85284
23677         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
23678         Only use the niter constraining form of simple_iv when the exit
23679         is always executed.
23681 2018-04-09  Tom de Vries  <tom@codesourcery.com>
23683         PR target/84041
23684         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23685         (define_expand "*memory_barrier"): New define_expand.
23686         (define_insn "memory_barrier"): New insn.
23688 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23690         PR rtl-optimization/80463
23691         PR rtl-optimization/83972
23692         PR rtl-optimization/83480
23694         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
23695         correct producer for the insn.
23696         (tidy_control_flow): Fixup seqnos in case of debug insns.
23698 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23700         PR rtl-optimization/83913
23702         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
23703         different sched-times when merging exprs.
23705 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23707         PR rtl-optimization/83962
23709         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
23710         tidy_fallthru_edge and tidy_control_flow.
23712 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23714         PR rtl-optimization/83530
23716         * sel-sched.c (force_next_insn): New global variable.
23717         (remove_insn_for_debug): When force_next_insn is true, also leave only
23718         next insn in the ready list.
23719         (sel_sched_region): When the region wasn't scheduled, make another pass
23720         over it with force_next_insn set to 1.
23722 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
23724         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
23725         into tm_file.
23726         * config/nds32/constants.md (unspec_volatile_element): Add enum values
23727         for interrupt control.
23728         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23729         functions for interrupt control.
23730         * config/nds32/nds32-intrinsic.md: Likewise.
23731         * config/nds32/nds32_intrinsic.h: Likewise.
23732         * config/nds32/nds32.h (nds32_builtins): Likewise.
23734 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
23736         * config/nds32/nds32.c (nds32_init_machine_status,
23737         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
23738         strict_aligned_p field.
23739         (nds32_expand_to_rtl_hook): New function.
23740         (TARGET_EXPAND_TO_RTL_HOOK): Define.
23741         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
23743 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23744             Chung-Ju Wu  <jasonwucj@gmail.com>
23746         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
23747         * config/nds32/nds32-n7.md: New file.
23748         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
23749         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
23750         pipeline.
23751         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
23752         * config/nds32/nds32.md (pipeline_model): Add n7.
23753         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
23754         * config/nds32/pipelines.md: Include n7 settings.
23756 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23757             Chung-Ju Wu  <jasonwucj@gmail.com>
23759         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
23760         * config/nds32/nds32-e8.md: New file.
23761         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
23762         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
23763         pipeline.
23764         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
23765         * config/nds32/nds32.md (pipeline_model): Add e8.
23766         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
23767         * config/nds32/pipelines.md: Include e8 settings.
23769 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23770             Chung-Ju Wu  <jasonwucj@gmail.com>
23772         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
23773         * config/nds32/nds32-n8.md: New file.
23774         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
23775         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
23776         pipeline.
23777         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
23778         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
23779         * config/nds32/nds32.md (pipeline_model): Add n8.
23780         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
23781         * config/nds32/pipelines.md: Include n8 settings.
23783 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23784             Chung-Ju Wu  <jasonwucj@gmail.com>
23786         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23787         * config/nds32/nds32-n9-2r1w.md: New file.
23788         * config/nds32/nds32-n9-3r2w.md: New file.
23789         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23790         nds32_register_ports): New or modify for cpu n9.
23791         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23792         pipeline.
23793         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23794         * config/nds32/nds32-utils.c: New file.
23795         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23796         TARGET_MUL_SLOW): Define.
23797         * config/nds32/nds32.md (pipeline_model): New attribute.
23798         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23799         New options that support cpu n9.
23800         * config/nds32/pipelines.md: Include n9 settings.
23801         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23803 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
23805         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23806         information if necessary.
23807         (output_cond_branch_compare_zero): Likewise.
23808         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23809         (nds32_target_alignment): Refine for alignment.
23810         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23811         (FUNCTION_BOUNDARY): Modify.
23812         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23813         align case.
23814         * config/nds32/nds32.opt (malways-align, malign-functions): New.
23816 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
23818         * config/nds32/constants.md (unspec_volatile_element): Add values for
23819         TLB operation and data prefetch.
23820         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23821         functions for TLB operation and data prefetch.
23822         * config/nds32/nds32-intrinsic.md: Likewise.
23823         * config/nds32/nds32_intrinsic.h: Likewise.
23824         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23825         (nds32_print_operand): Likewise.
23826         * config/nds32/nds32.h (nds32_builtins): Likewise.
23828 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
23829         Andrew Pinski <pinsika@gcc.gnu.org>
23831         PR middle-end/82976
23832         * match.pd: Use constant_boolean_node of correct type instead of
23833         boolean_true_node or boolean_false_node for simplifying
23834         pointer comparisons to zero.
23836 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
23838         PR tree-optimization/80021
23839         * tree.c (verify_type_variant): Make error call in verify_variant_match
23840         translatable and remove final full stop.
23842 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23844         * config/nds32/constants.md (unspec_volatile_element): Add
23845         UNSPEC_VOLATILE_EH_RETURN.
23846         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23847         nds32_output_stack_pop): Support dwarf exception handling process.
23848         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23849         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23850         exception handling process.
23851         (nds32_compute_stack_frame): Likewise.
23852         (nds32_return_addr_rtx): Likewise.
23853         (nds32_initial_elimination_offset): Likewise.
23854         (nds32_expand_prologue): Likewise.
23855         (nds32_expand_epilogue): Likewise.
23856         (nds32_dynamic_chain_address): New function.
23857         * config/nds32/nds32.h (machine_function): Add fields for dwarf
23858         exception handling.
23859         (DYNAMIC_CHAIN_ADDRESS): Define.
23860         (EH_RETURN_DATA_REGNO): Define.
23861         (EH_RETURN_STACKADJ_RTX): Define.
23862         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23863         patterns for dwarf exception handling.
23865 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23867         * config/nds32/nds32.h: Clean up obsolete macros.
23869 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23871         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23872         Add enum values for particular instructions.
23873         * config/nds32/nds32-intrinsic.c: Implementation of expanding
23874         particular intrinsic functions.
23875         * config/nds32/nds32-intrinsic.md: Likewise.
23876         * config/nds32/nds32_intrinsic.h: Likewise.
23877         * config/nds32/nds32.h (nds32_builtins): Likewise.
23878         * config/nds32/nds32.md (type): Add pbsad and pbsada.
23879         (btst, ave): New patterns for particular instructions.
23881 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23883         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23884         Add enum values for atomic load/store and memory sync.
23885         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
23886         and memory sync.
23887         * config/nds32/nds32-intrinsic.md: Likewise.
23888         * config/nds32/nds32_intrinsic.h: Likewise.
23889         * config/nds32/nds32.h (nds32_builtins): Likewise.
23891 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
23893         PR tree-optimization/85257
23894         * fold-const.c (native_encode_vector): If not all elts could fit
23895         and off is -1, return 0 rather than offset.
23896         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
23897         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
23898         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
23899         adjust buffer in native_interpret_expr call.
23901 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23903         * config/nds32/constants.md (unspec_volatile_element): Add cache
23904         control enum values.
23905         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
23906         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
23907         * config/nds32/nds32.c (nds32_cctl_names): New.
23908         (nds32_print_operand): Handle cache control register names.
23909         * config/nds32/nds32.h (nds32_builtins): New enum values.
23910         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
23911         macros.
23912         * config/nds32/nds32.md (type): Add mmu.
23913         * config/nds32/pipelines.md (simple_insn): Add mmu.
23915 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23917         * config/nds32/nds32.md (type): Remove call.
23918         * config/nds32/pipelines.md (simple_insn): Likewise.
23920 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23922         * config/nds32/constants.md (unspec_volatile_element): Add
23923         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
23924         UNSPEC_VOLATILE_FMFCFG.
23925         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
23926         description for fmfcfg and fmfcsr.
23927         (bdesc_1arg): Add fmtcsr.
23928         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
23929         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
23930         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
23931         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
23932         unspec_fmfcfg): New patterns.
23933         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
23934         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
23935         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
23936         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
23937         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
23938         __nds32__fmfcfg): Define.
23940 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23942         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
23943         intrinsic register names.
23944         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
23945         intrinsic register enum values and macros.
23947 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23949         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
23950         for load/store addressing form.
23951         (nds32_print_operand_address): Likewise.
23953 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
23955         PR target/85196
23956         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
23957         based on LABEL_REF.  Remove useless assertion.
23958         (pic_address_needs_scratch): Fix formatting.
23959         (sparc_legitimize_pic_address): Minor tweaks.
23960         (sparc_delegitimize_address): Adjust assertion accordingly.
23961         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
23962         into symbolic_operand.
23963         (movsi_high_pic_label_ref): Likewise.
23964         (movsi_lo_sum_pic_label_ref): Likewise.
23965         (movdi_pic_label_ref): Likewise.
23966         (movdi_high_pic_label_ref): Likewise.
23967         (movdi_lo_sum_pic_label_ref): Likewise.
23969 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
23971         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
23972         custom LIB_SPEC setup.
23974 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
23975             Kito Cheng  <kito.cheng@gmail.com>
23977         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
23978         * config/riscv/freebsd.h: New.
23980 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
23982         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
23983         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
23984         file.
23986 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
23987             Kito Cheng  <kito.cheng@gmail.com>
23989         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
23990         nds32_output_call, nds32_symbol_binds_local_p): New functions.
23991         * config/nds32/nds32-protos.h (nds32_output_call,
23992         nds32_output_return): Declare.
23993         * config/nds32/nds32.md: Refine all the call and return patterns.
23995 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
23997         PR debug/85252
23998         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
23999         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24001         PR rtl-optimization/84872
24002         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24003         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24004         EDGE_CROSSING edge.
24006 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
24008         * expr.c (copy_blkmode_to_reg): Revert 254862.
24009         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24011 2018-04-06  Richard Biener  <rguenther@suse.de>
24013         PR middle-end/85244
24014         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24015         after seeing a component reference with an adjacent field.  Treat
24016         refs to arrays at struct end of external decls similar to
24017         refs to unconstrained commons.
24019 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
24021         PR sanitizer/85213
24022         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24023         look through SAVE_EXPRs with non-side-effects argument.  Adjust
24024         recursive calls.
24025         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24026         save_p here.
24028 2018-04-06  Richard Biener  <rguenther@suse.de>
24030         PR middle-end/85180
24031         * alias.c (find_base_term): New wrapper around find_base_term
24032         unwinding CSELIB_VAL_PTR changes.
24033         (find_base_term): Do not restore CSELIB_VAL_PTR during the
24034         recursion.
24036 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24038         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24039         instructions.
24040         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24041         constant definitions.
24042         ("nop"): lr 0,0 -> nopr r0
24043         ("nop_lr0", "nop_lr1"): New insn definitions.
24045 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
24047         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24048         NDS32_V3PUSH_AVAILABLE_P macro.
24050 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
24051             Chung-Ju Wu  <jasonwucj@gmail.com>
24053         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24054         (nds32*-*-*): Add float and fpu_config into supported_defaults.
24055         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24056         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24057         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24058         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24059         * config/nds32/constraints.md: New constraints and checking for hard
24060         float configuration.
24061         * config/nds32/iterators.md: New mode iterator and attribute for hard
24062         float configuration.
24063         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24064         patterns.
24065         * config/nds32/nds32-fpu.md: New file.
24066         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24067         deal with hard float code generation.
24068         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24069         ARCH_V3S.
24070         (abi_type, float_reg_number): New enum type.
24071         * config/nds32/nds32-predicates.c: New predicates for hard float.
24072         * config/nds32/nds32-protos.h: Declare functions for hard float.
24073         * config/nds32/nds32.c: Implementation for hard float configuration.
24074         * config/nds32/nds32.h: Definitions for hard float configuration.
24075         * config/nds32/nds32.md: Include hard float machine description and
24076         modify patterns for hard float configuration.
24077         * config/nds32/nds32.opt: New options for hard float configuration.
24078         * config/nds32/predicates.md: New predicates for hard float
24079         configuration.
24081 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
24083         * common/config/nds32/nds32-common.c
24084         (nds32_option_optimization_table): Enable -mreleax-hint by default.
24086 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
24088         PR middle-end/85195
24089         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24090         CONSTRUCTOR_ELT (ctor, ...)->value.
24092 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
24094         PR target/85193
24095         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24097 2018-04-05  Tom de Vries  <tom@codesourcery.com>
24099         PR target/85204
24100         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24101         cond jump.
24103 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24104             Kito Cheng  <kito.cheng@gmail.com>
24106         * config/nds32/constraints.md (U33): Fine-tune checking condition.
24107         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24108         * config/nds32/nds32.h (nds32_16bit_address_type): Add
24109         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24111 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
24112             Kito Cheng  <kito.cheng@gmail.com>
24114         * config/nds32/constraints.md (Ufe): New memory constraint.
24115         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24116         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24117         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24118         operands.
24119         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24120         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24122 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24124         * config/nds32/nds32.md: Use optimize_size in the condition for
24125         alu-shift instructions.
24127 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24129         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24131 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24133         * config/nds32/nds32.md (negsi2): Refine pattern.
24135 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24136             Chung-Ju Wu  <jasonwucj@gmail.com>
24138         * config/nds32/iterators.md (shift_rotate): New code iterator.
24139         (shift): New code attribute.
24140         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24141         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24142         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24143         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24144         bit-wise operations.
24145         (andsi3, *andsi3): Ditto.
24146         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24147         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24148         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24149         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24150         nds32_ior_operand, nds32_xor_operand): New predicates.
24152 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24154         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24155         (addsi3, subsi3): ... this.
24157 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24159         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24161 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24163         * config/nds32/nds32.md: Adjust indention.
24165 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
24167         * config/nds32/nds32.md (feature): New attribute.
24169 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
24171         * config/nds32/nds32.md (subtype): New attribute.
24173 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24175         PR target/85203
24176         * config/arm/arm-builtins.c (arm_expand_builtin): Change
24177         expansion to perform a bitwise AND of the argument followed by a
24178         boolean negation of the result.
24180 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
24182         PR rtl-optimization/84878
24183         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24184         the basic block.  Assert the use reference is not artificial and that
24185         it has an associated insn.
24187 2018-04-04  Michael Matz  <matz@suse.de>
24189         * builtins.c (compute_objsize): Pass correct operand
24190         to array_at_struct_end_p.
24192 2018-04-04  Richard Biener  <rguenther@suse.de>
24194         PR lto/85176
24195         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24196         from contexts for DINFO_LEVEL_TERSE and below.
24198 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24200         * config/nds32/nds32-doubleword.md (move_<mode>): Require
24201         resiter_operand condition.
24202         * config/nds32/nds32.md (*move<mode>): Ditto.
24204 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24205             Monk Chiang  <sh.chiang04@gmail.com>
24207         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
24209 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24211         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
24213 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24214             Kito Cheng  <kito.cheng@gmail.com>
24216         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
24217         nds32_cond_code_str, output_cond_branch,
24218         output_cond_branch_compare_zero, nds32_expand_cbranch,
24219         nds32_expand_cstore, nds32_expand_movcc,
24220         nds32_output_cbranchsi4_equality_zero,
24221         nds32_output_cbranchsi4_equality_reg,
24222         nds32_output_cbranchsi4_equality_reg_or_const_int,
24223         nds32_output_cbranchsi4_greater_less_zero: New functions.
24224         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
24225         nds32_expand_cstore, nds32_expand_movcc,
24226         nds32_output_cbranchsi4_equality_zero,
24227         nds32_output_cbranchsi4_equality_reg,
24228         nds32_output_cbranchsi4_equality_reg_or_const_int,
24229         nds32_output_cbranchsi4_greater_less_zero): Declare.
24230         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
24231         nds32_rimm11s_operand): New predicates.
24232         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
24233         * config/nds32/nds32.md: Rewrite all the branch and conditional move
24234         patterns.
24236 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
24238         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
24239         * config/nds32/nds32.md: Ditto.
24240         * config/nds32/pipelines.md: Ditto.
24242 2018-04-04  Richard Biener  <rguenther@suse.de>
24244         PR tree-optimization/85168
24245         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
24246         propagating abnormals.
24248 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24250         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
24252 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
24253             Kito Cheng  <kito.cheng@gmail.com>
24255         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
24256         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
24257         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
24258         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
24259         * config/nds32/nds32.md (sibcall_internal): New.
24260         (sibcall_register): Remove.
24261         (sibcall_immediate): Remove.
24262         (sibcall_value_internal): New.
24263         (sibcall_value_register): Remove.
24264         (sibcall_value_immediate): Remove.
24265         * config/nds32/predicates.md (nds32_general_register_operand): New.
24266         (nds32_call_address_operand): New.
24268 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
24270         PR rtl-optimization/85167
24271         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
24272         bb_defs if *split_p, instead preinitialize it to NULL.
24274         PR tree-optimization/85156
24275         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
24276         evaluating the argument multiple times.
24278 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
24280         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
24281         than vector.
24282         (_mm_cvtpd_ps): Likewise.
24283         (_mm_cvttpd_epi32): Likewise.
24284         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
24285         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
24286         vector, pixel, and bool following altivec.h include.
24288 2018-04-03  Martin Sebor  <msebor@redhat.com>
24290         * doc/extend.texi (Common Function Attributes): Clarify.
24291         (const attribute): Likewise.
24292         (pure attribute): Likewise.
24294 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
24296         PR target/85169
24297         * config/i386/i386.c (ix86_expand_vector_set): Use
24298         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
24300 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
24302         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
24303         instructions when changing rounding bits to preserve precision bits
24304         in the x87 control word.
24306 2018-04-03  Martin Liska  <mliska@suse.cz>
24308         PR tree-optimization/82491
24309         * rtl.h (strip_offset_and_add): Replace += suboffset with
24310         poly_uint64 () + suboffset.
24312 2018-03-29  Martin Liska  <mliska@suse.cz>
24313             Martin Jambor  <mjambor@suse.cz>
24315         PR ipa/84947
24316         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
24317         param_type is not an integral or pointer type.
24319 2018-04-03  Richard Biener  <rguenther@suse.de>
24321         * sese.h (recompute_all_dominators): Remove.
24323 2018-04-02  Martin Sebor  <msebor@redhat.com>
24325         * doc/invoke.texi (-Wrestrict): Fix typos.
24327 2018-04-02  Jim Wilson  <jimw@sifive.com>
24329         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
24330         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
24331         (<optab>di3, <optab>si3_extend): Likewise.
24332         (<optab>si3_mask, <optab>si3_mask_1): New.
24333         (<optab>di3_mask, <optab>di3_mask_1): New.
24334         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
24335         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
24336         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
24338 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
24340         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
24341         example.
24343 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
24345         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
24346         (nds32_canonicalize_comparison): New function.
24348 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
24349             Kito Cheng  <kito.cheng@gmail.com>
24350             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
24352         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
24353         * config/nds32/constants.md (unspec_volatile_element): Add
24354         UNSPEC_VOLATILE_RELAX_GROUP.
24355         * config/nds32/nds32-relax-opt.c: New file.
24356         * config/nds32/nds32-predicates.c
24357         (nds32_symbol_load_store_p): New function.
24358         * config/nds32/nds32-protos.h
24359         (nds32_symbol_load_store_p): Declare function.
24360         (make_pass_nds32_relax_opt): Declare new rtl pass function.
24361         * config/nds32/nds32.c
24362         (nds32_register_pass): New function to register pass.
24363         (nds32_register_passes): New function to register passes.
24364         * config/nds32/nds32.md (relax_group): New pattern.
24365         * config/nds32/nds32.opt (mrelax-hint): New option.
24366         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
24368 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
24370         * config/nds32/t-nds32: Modify files dependency.
24372 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
24374         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
24375         (PROFILE_HOOK): Define its implementation.
24377 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
24379         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
24380         type and 32-bit size.
24382 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
24384         PR middle-end/85090
24385         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
24386         (V_128_256): New mode iterator.
24387         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
24388         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
24389         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
24390         of V.
24391         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
24392         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
24394 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
24396         PR target/83315
24397         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
24398         NaN inputs correctly.
24400 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
24402         PR target/80546
24403         * config/rs6000/vsx.md (??r): New mode attribute.
24404         (*vsx_mov<mode>_64bit): Use it.
24405         (*vsx_mov<mode>_32bit): Likewise.
24407 2018-03-30  Martin Sebor  <msebor@redhat.com>
24409         PR tree-optimization/84818
24410         * builtins.c (check_access): Use warning_n.
24412 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24414         PR target/83822
24415         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
24416         condition.
24417         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
24418         condition.
24420 2018-03-30  Julia Koval  <julia.koval@intel.com>
24422         PR target/84413
24423         * x86-tune.def (movx, partial_reg_dependency): Enable for
24424         m_SKYLAKE_AVX512.
24426 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
24428         PR inline-asm/84985
24429         * lra-constraints.c (process_alt_operands): Move setting
24430         this_alternative_matches below.
24432 2018-03-29  Martin Liska  <mliska@suse.cz>
24434         PR lto/84995.
24435         * doc/invoke.texi: Document how LTO works with debug info.
24436         Describe auto-load support of binutils.  Mention 'x86-64'
24437         as valid option value of -march option.
24439 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
24441         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
24443         PR c/85094
24444         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
24445         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
24446         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
24447         checking.
24449 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
24451         PR target/84912
24452         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
24453         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
24454         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
24455         for RS6000_BTM_POWERPC64.
24456         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
24457         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
24458         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
24459         definition.
24460         (DIVDE): Use it.
24461         (DIVDEU): Likewise.
24463 2018-03-28  Carl Love  <cel@us.ibm.com>
24465         Revert
24466         2017-09-27  Carl Love  <cel@us.ibm.com>
24468         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
24469         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
24470         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
24471         fctiw instruction.
24473 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
24475         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
24476         instead of __vector bool.
24477         (_mm_max_pu8): Likewise.
24478         (_mm_min_pi16): Likewise.
24480 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
24482         PR target/84912
24483         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
24484         (DIVWEUO): Likewise.
24485         (DIVDEO): Likewise.
24486         (DIVDEUO): Likewise.
24487         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
24488         DIVWEUO and DIVDEUO.
24489         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
24490         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
24491         (div_extend): Likewise.
24492         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
24493         builtin function.
24494         (__builtin_divweuo): Likewise.
24495         (__builtin_divdeo): Likewise.
24496         (__builtin_divdeuo): Likewise.
24498 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
24500         PR target/85095
24501         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
24502         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
24504         PR tree-optimization/82004
24505         * gimple-match-head.c (optimize_pow_to_exp): New function.
24506         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
24507         Don't fold to exp if optimize_pow_to_exp is false.
24509 2018-03-28  Martin Liska  <mliska@suse.cz>
24511         PR other/84819
24512         * calls.c (initialize_argument_information): Fix trailing space.
24513         * common.opt: Fix typo and provide better explanation for
24514         -fsanitize-coverage option.
24515         * config/i386/i386.opt: Fix typo.
24517 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
24518             Martin Liska  <mliska@suse.cz>
24520         PR sanitizer/85081
24521         * gimplify.c (asan_poison_variable): Don't do the check for
24522         gimplify_omp_ctxp here.
24523         (gimplify_decl_expr): Do it here.
24524         (gimplify_target_expr): Likewise.
24526 2018-03-28  Martin Liska  <mliska@suse.cz>
24528         PR target/84988
24529         * config/i386/i386.c (ix86_function_arg_advance): Do not call
24530         chkp_type_bounds_count if MPX is not enabled.
24532 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
24534         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
24536 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
24538         PR target/84914
24539         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
24540         function to create the function decl for complex long double
24541         multiply and divide for -mabi=ieeelongdouble.
24542         (init_float128_ieee): Call it.
24544 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
24546         PR target/85044
24547         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
24548         -fcf-protection=branch -mibt.
24549         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
24551 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24553         PR target/81863
24554         * config/arm/arm.c (arm_valid_symbolic_address): Handle
24555         arm_word_relocations.
24557 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
24559         PR target/85056
24560         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
24561         extern array declarations.
24563 2018-03-27  Richard Biener  <rguenther@suse.de>
24565         PR middle-end/84067
24566         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
24567         explicit single_use checks.
24569 2018-03-27  Richard Biener  <rguenther@suse.de>
24571         PR tree-optimization/85082
24572         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
24573         Valueize the VUSE.
24575 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
24577         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
24578         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
24579         Turn on fasynchronous-unwind-tables and funwind-tables.
24581 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
24583         PR target/85073
24584         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
24585         (*bmi_blsr_<mode>_ccz): Ditto.
24587 2018-03-26  Tom de Vries  <tom@codesourcery.com>
24589         PR tree-optimization/85063
24590         * omp-general.c (offloading_function_p): New function.  Factor out
24591         of ...
24592         * omp-offload.c (pass_omp_target_link::gate): ... here.
24593         * omp-general.h (offloading_function_p): Declare.
24594         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
24595         with attribute omp declare target for offloading functions.
24597 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
24599         PR tree-optimization/84005
24600         * tree-data-ref.h (get_base_for_alignment): Declare.
24601         * tree-data-ref.c (get_base_for_alignment_1): New function.
24602         (get_base_for_alignment): Likewise.
24603         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24604         get_base_for_alignment to find a suitable base object, instead
24605         of always using drb->base_address.
24607 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
24609         PR inline-asm/85022
24610         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
24611         known size by default.
24613 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
24615         PR inline-asm/85030
24616         * lra-constraints.c (process_alt_operands): Don't match BLKmode
24617         and non BLKmode operands.
24619 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24621         PR target/85026
24622         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
24623         Clean up attributes.
24625 2018-03-23  Richard Biener  <rguenther@suse.de>
24627         PR debug/85020
24628         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
24629         we are going to emit early debug for LTO.
24631 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
24633         PR inline-asm/85034
24634         * function.c (match_asm_constraints_1): Don't optimize if input
24635         doesn't satisfy general_operand predicate for output's mode.
24637         PR inline-asm/85022
24638         * alias.c (write_dependence_p): Don't require for x_canonicalized
24639         non-VOIDmode if x has VOIDmode.
24641         PR sanitizer/85029
24642         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
24643         just don't try to optimize it rather than assert it never happens.
24645 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24647         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
24648         macro expansions for definition of ST_INTERNAL_<mode> and
24649         LD_INTERNAL_<mode> builtins.
24650         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
24651         Remove prototype.
24652         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
24653         function.
24654         (altivec_expand_st_builtin): Likewise.
24655         (altivec_expand_builtin): Remove calls to deleted functions.
24656         (rs6000_address_for_altivec): Delete this function.
24657         * config/rs6000/vector.md: Remove expands for
24658         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
24660 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
24662         PR target/84826
24663         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
24664         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
24665         re-computing once computed.
24666         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
24667         (arm_init_machine_status): Initialize
24668         machine->static_chain_stack_bytes.
24670 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24672         PR target/84760
24673         * doc/extend.texi: Add four new prototypes for vec_ld.
24674         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
24675         definitions for more logical presentation.
24676         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
24677         entries for V1TI variants of __builtin_altivec_ld builtin.
24678         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
24679         handling of V1TI variant of LVX icode pattern.
24680         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
24681         (rs6000_gimple_fold_builtin): Likewise.
24682         (altivec_init_builtins): Add code to define
24683         __builtin_altivec_lvx_v1ti function.
24685 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
24687         PR inline-asm/84941
24688         * function.c (match_asm_constraints_1): Don't do the optimization
24689         if input isn't a REG, SUBREG, MEM or constant.
24691 2018-03-22  Tom de Vries  <tom@codesourcery.com>
24693         PR tree-optimization/84956
24694         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
24695         bb_has_abnormal_pred.
24697 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
24699         PR sanitizer/85018
24700         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
24701         DECL_INITIAL (decl) to decl at the end.
24702         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
24703         adjust the comment.
24705 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
24707         * doc/extend.texi (__builtin_tgmath): Document when complex
24708         integer types are treated as _Complex _Float64.
24710 2018-03-21  Tom de Vries  <tom@codesourcery.com>
24712         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
24714 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24716         PR tree-optimization/84960
24717         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
24718         if it is ENTRY block, move them into single succ of ENTRY in that case.
24720 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
24722         PR tree-optimization/84811
24723         * poly-int.h (poly_span_traits): Remove the T3 parameter and
24724         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
24725         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
24726         (known_subrange_p): Update accordingly.  Cast each value involved
24727         in the size comparison, rather than casting the result of the
24728         subtraction.
24730 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24732         PR tree-optimization/84982
24733         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
24734         by flipping the least significant bit rather than all bits from
24735         bitpos to bitpos + bitsize - 1.
24737 2018-03-21  Nathan Sidwell  <nathan@acm.org>
24739         * doc/extend.texi (Deprecated Features): Remove mention of
24740         long-deleted deprecations.
24742 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24744         PR jit/84288
24745         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
24746         * configure: Regenerate.
24748 2018-03-21  Tom de Vries  <tom@codesourcery.com>
24750         PR tree-optimization/83126
24751         * tree-parloops.c (num_phis): New function.
24752         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
24754 2018-03-21  Nathan Sidwell  <nathan@acm.org>
24756         * doc/extend.texi (Deprecated Features): Update deprecated flags,
24757         mention anon-struct/union members and trailing attributes.
24759 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
24761         PR tree-optimization/84969
24762         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
24763         builtin memset partitions if they set different rhs values.
24765 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24767         PR rtl-optimization/84989
24768         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
24769         VEC_DUPLICATE with scalar result mode.
24771 2018-03-21  Martin Liska  <mliska@suse.cz>
24773         PR ipa/84963
24774         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
24775         not intended return statement.
24777 2018-03-21  Martin Liska  <mliska@suse.cz>
24779         PR target/84988
24780         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
24781         (chkp_find_bound_slots_1): Limit number of iterations.
24783 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
24785         PR target/84838
24786         * Minor grammar fixes for x86 options.
24788 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24790         PR debug/84875
24791         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24792         holding REG_CFA_RESTORE notes, instead turn them into a USE.
24794 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
24796         PR target/83789
24797         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24798         (altivec_lvx_<mode>_1op): Likewise.
24799         (altivec_stvx_<mode>_2op): Likewise.
24800         (altivec_stvx_<mode>_1op): Likewise.
24801         (altivec_lvx_<VM2:mode>): New define_expand.
24802         (altivec_stvx_<VM2:mode>): Likewise.
24803         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24804         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24805         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24806         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24807         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24808         (rs6000_gen_lvx): Likewise.
24809         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24810         (altivec_expand_stv_builtin): Likewise.
24811         (altivec_expand_builtin): Likewise.
24812         * config/rs6000/vector.md: Likewise.
24814 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24816         PR target/82518
24817         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24818         BYTES_BIG_ENDIAN.
24820 2018-03-20  Richard Biener  <rguenther@suse.de>
24822         PR target/84986
24823         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24824         sign-conversions as zero, fall back to standard scalar_stmt
24825         cost for the rest.
24827 2018-03-20  Martin Liska  <mliska@suse.cz>
24829         PR ipa/84825
24830         * predict.c (rebuild_frequencies): Handle case when we have
24831         PROFILE_ABSENT, but flag_guess_branch_prob is false.
24833 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24835         PR target/84990
24836         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24837         flag_section_anchors.
24838         * varasm.c (use_blocks_for_decl_p): Remove hack for
24839         dw2_force_const_mem.
24841         PR target/84845
24842         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24843         to ...
24844         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
24845         be created, use lowpart_subreg of operands[0] rather than operands[0]
24846         itself.
24847         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24848         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24849         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24850         and n constraint instead of aarch64_shift_imm_di and Usd.
24851         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24852         (*aarch64_<optab>_reg_minus<mode>3): ... this.
24854 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
24856         PR target/82989
24857         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24858         to favor GPR over NEON registers.
24859         (<shift>di3_neon): Likewise.
24861 2018-03-20  Tom de Vries  <tom@codesourcery.com>
24863         PR target/84952
24864         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24865         (nvptx_process_pars): Emit bar.sync asap and alap.
24867 2018-03-20  Tom de Vries  <tom@codesourcery.com>
24869         PR target/84954
24870         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24871         seen_label if seen_label is already set.
24873 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24875         PR target/84945
24876         * config/i386/i386.c (fold_builtin_cpu): For features above 31
24877         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
24878         Use 1U instead of 1.  Formatting fixes.
24880         PR c/84953
24881         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
24882         instead of TREE_TYPE (s1) for the return value.
24884 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
24886         PR tree-optimization/84946
24887         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
24888         bitsize + bitsize in poly_uint64 rather than poly_int64.
24890         PR sanitizer/78651
24891         * dwarf2asm.c: Include fold-const.c.
24892         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
24893         of decl rather than decl itself.
24895         PR rtl-optimization/84643
24896         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
24898 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
24900         PR sanitizer/78651
24901         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
24902         calling assemble_variable.
24904 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
24906         PR target/81647
24907         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
24908         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
24910 2018-03-19  Jim Wilson  <jimw@sifive.com>
24912         PR bootstrap/84856
24913         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
24914         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
24915         (riscv_first_stack_step): Likewise.
24916         (riscv_option_override): Use STACK_BOUNDARY instead of
24917         MIN_STACK_BOUNDARY.
24918         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
24919         MIN_STACK_BOUNDARY.
24920         (BIGGEST_ALIGNMENT): Set to 128.
24921         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
24922         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
24923         STACK_BOUNDARY.
24925 2018-03-19  Richard Biener  <rguenther@suse.de>
24927         PR tree-optimization/84933
24928         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
24929         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
24931 2018-03-19  Richard Biener  <rguenther@suse.de>
24933         PR tree-optimization/84859
24934         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
24935         (cond_if_else_store_replacement): Perform sinking operation on
24936         single-store BBs regardless of MAX_STORES_TO_SINK setting.
24937         Generalize what a BB with a single eligible store is.
24939 2018-03-19  Richard Biener  <rguenther@suse.de>
24941         PR tree-optimization/84929
24942         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
24943         chrec_is_positive against non-chrec arg.
24945 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
24947         PR target/84711
24948         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
24950 2018-03-18  Martin Liska  <mliska@suse.cz>
24952         PR rtl-optimization/84635
24953         * regrename.c (build_def_use): Use matches_mode only when
24954         matches >= 0.
24956 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
24958         PR tree-optimization/84913
24959         * tree-vect-loop.c (vectorizable_reduction): Don't try to
24960         vectorize chains of COND_EXPRs.
24962 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
24964         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
24966 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
24968         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
24970 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
24972         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
24974 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
24975             Kito Cheng  <kito.cheng@gmail.com>
24977         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
24978         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
24979         (nds32_adjust_reg_alloc_order): New function.
24980         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
24982 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
24984         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
24985         nds32_print_operand, nds32_print_operand_address): Use
24986         HOST_WIDE_INT_PRINT_DEC instead.
24988 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
24990         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
24992 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
24994         PR target/84902
24995         * config/i386/i386.c (initial_ix86_tune_features,
24996         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
24997         unsigned long long.
24998         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
24999         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25000         rather than 1u << ix86_tune.  Formatting fix.
25001         (ix86_option_override_internal): Change ix86_arch_mask from
25002         unsigned int to unsigned HOST_WIDE_INT, initialize to
25003         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25004         (ix86_function_specific_restore): Likewise.
25006 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25008         PR target/84899
25009         * postreload.c (reload_combine_recognize_pattern): Perform
25010         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25011         truncate_int_for_mode the result for the destination's mode.
25013         PR c/84909
25014         * hsa-gen.c (mem_type_for_type): Fix comment typo.
25015         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25016         Likewise.
25017         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25018         Likewise.
25020 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
25022         PR target/84876
25023         * lra-assigns.c (lra_split_hard_reg_for): Don't use
25024         regno_allocno_class_array and sorted_pseudos.
25025         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25026         insns where regno is used.
25028 2018-03-16  Martin Liska  <mliska@suse.cz>
25030         PR ipa/84833
25031         * multiple_target.c (create_dispatcher_calls): Redirect
25032         reference in the symbol table.
25034 2018-03-16  Martin Liska  <mliska@suse.cz>
25036         PR ipa/84722
25037         * multiple_target.c (create_dispatcher_calls): Redirect also
25038         an alias.
25040 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25042         PR c++/79937
25043         PR c++/82410
25044         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25045         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25046         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25048 2018-03-16  Julia Koval  <julia.koval@intel.com>
25050         * doc/invoke.texi (Skylake Server): Add CLWB.
25051         Cannonlake): Remove CLWB.
25053 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
25055         PR tree-optimization/84841
25056         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25057         1 << 3.
25058         (FLOAT_ONE_CONST_TYPE): Define.
25059         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25060         (sort_by_operand_rank): Put entries with higher constant_type last
25061         rather than first to match comments.
25063 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
25065         * config/nios2/nios2.md (movsi_internal): Fix thinko in
25066         split predicate.
25068 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25070         PR c++/79085
25071         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25072         check and use address of target always.
25074 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
25076         PR target/84574
25077         * config/i386/i386.c (indirect_thunk_needed): Update comments.
25078         (indirect_thunk_bnd_needed): Likewise.
25079         (indirect_thunks_used): Likewise.
25080         (indirect_thunks_bnd_used): Likewise.
25081         (indirect_return_needed): New.
25082         (indirect_return_bnd_needed): Likewise.
25083         (output_indirect_thunk_function): Add a bool argument for
25084         function return.
25085         (output_indirect_thunk_function): Don't generate alias for
25086         function return thunk.
25087         (ix86_code_end): Call output_indirect_thunk_function to generate
25088         function return thunks.
25089         (ix86_output_function_return): Set indirect_return_bnd_needed
25090         and indirect_return_needed instead of indirect_thunk_bnd_needed
25091         and indirect_thunk_needed.
25093 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
25095         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25096         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25097         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25099 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
25100             Paul Hua <paul.hua.gm@gmail.com>
25102         PR c/84852
25103         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25105 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
25107         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25108         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25109         resp. SFmode cases.
25111 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
25113         PR target/84711
25114         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25115         instead of GET_MODE_SIZE when comparing Units.
25117 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
25119         PR target/68256
25120         * varasm.c (hash_section): Return an unchangeble hash value
25121         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25122         Return !aarch64_can_use_per_function_literal_pools_p ().
25124 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
25126         PR target/84860
25127         * optabs.c (emit_conditional_move): Pass address of cmode's copy
25128         rather than address of cmode as last argument to prepare_cmp_insn.
25130 2018-03-15  Julia Koval  <julia.koval@intel.com>
25132         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25133         F_AVX512VNNI, F_AVX512BITALG): New.
25135 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
25137         PR target/83451
25138         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
25139         insn for floating-point loads and stores.
25141 2018-03-14  Carl Love  <cel@us.ibm.com>
25143         * config/rs6000/rs6000-c.c: Add macro definitions for
25144         ALTIVEC_BUILTIN_VEC_PERMXOR.
25145         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25146         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25147         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25148         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25149         UNSPEC_VPERMXOR.
25150         * config/doc/extend.texi: Add prototypes for vec_permxor.
25152 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
25154         PR c/84852
25155         * diagnostic-show-locus.c (class layout_point): Convert m_line
25156         from int to linenum_type.
25157         (line_span::comparator): Use linenum "compare" function when
25158         comparing line numbers.
25159         (test_line_span): New function.
25160         (layout_range::contains_point): Convert param "row" from int to
25161         linenum_type.
25162         (layout_range::intersects_line_p): Likewise.
25163         (layout::will_show_line_p): Likewise.
25164         (layout::print_source_line): Likewise.
25165         (layout::should_print_annotation_line_p): Likewise.
25166         (layout::print_annotation_line): Likewise.
25167         (layout::print_leading_fixits): Likewise.
25168         (layout::annotation_line_showed_range_p): Likewise.
25169         (struct line_corrections): Likewise for field m_row.
25170         (line_corrections::line_corrections): Likewise for param "row".
25171         (layout::print_trailing_fixits): Likewise.
25172         (layout::get_state_at_point): Likewise.
25173         (layout::get_x_bound_for_row): Likewise.
25174         (layout::print_line): Likewise.
25175         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25176         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25177         * input.c (selftest::test_linenum_comparisons): New function.
25178         (selftest::input_c_tests): Call it.
25179         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25180         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25181         * selftest.h (ASSERT_GT): New macro.
25182         (ASSERT_GT_AT): New macro.
25183         (ASSERT_LT): New macro.
25184         (ASSERT_LT_AT): New macro.
25186 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
25188         PR rtl-optimization/84780
25189         * combine.c (distribute_links): Don't make a link based on pc_rtx.
25191 2018-03-14  Martin Liska  <mliska@suse.cz>
25193         * tree.c (record_node_allocation_statistics): Use
25194         get_stats_node_kind.
25195         (get_stats_node_kind): New function extracted from
25196         record_node_allocation_statistics.
25197         (free_node): Use get_stats_node_kind.
25199 2018-03-14  Richard Biener  <rguenther@suse.de>
25201         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25202         that the value-set of ANTIC_IN doesn't grow.
25204         Revert
25205         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25206         member.
25207         (BB_VISITED_WITH_VISITED_SUCCS): New define.
25208         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25210 2018-03-14  Julia Koval  <julia.koval@intel.com>
25212         * config.gcc (icelake-client, icelake-server): New.
25213         (icelake): Remove.
25214         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
25215         (initial_ix86_arch_features): Ditto.
25216         (PTA_SKYLAKE): Add SGX.
25217         (PTA_ICELAKE): Remove.
25218         (PTA_ICELAKE_CLIENT): New.
25219         (PTA_ICELAKE_SERVER): New.
25220         (ix86_option_override_internal): Split up icelake on icelake client and
25221         icelake server.
25222         (get_builtin_code_for_version): Ditto.
25223         (fold_builtin_cpu): Ditto.
25224         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
25225         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
25226         * config/i386/i386.h (processor_type): Ditto.
25227         * doc/invoke.texi: Ditto.
25229 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
25231         PR sanitizer/83392
25232         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
25233         INTEGER_CST offset, add it together with bitpos / 8 and
25234         sign extend based on POINTER_SIZE.
25236         PR target/84844
25237         Revert
25238         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
25240         PR target/78090
25241         * config/i386/constraints.md (Yc): New register constraint.
25242         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
25243         Use Yc constraint for alternative 2 of operand 0.  Remove
25244         preferred_for_speed attribute.
25246 2018-03-14  Richard Biener  <rguenther@suse.de>
25248         PR tree-optimization/84830
25249         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
25250         with the old one to avoid oscillations.
25252 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
25254         PR target/83712
25255         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
25256         pseudos.
25257         (assign_by_spills): Return a flag of reload assignment failure.
25258         Do not process the reload assignment failures.  Do not spill other
25259         reload pseudos if they has the same reg class.  Update n if
25260         necessary.
25261         (lra_assign): Add a return arg.  Set up from the result of
25262         assign_by_spills call.
25263         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25264         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25265         usage_insns if it is not NULL.
25266         (spill_hard_reg_in_range): New function.
25267         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25268         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25269         function prototypes.
25270         (lra_assign): Change prototype.
25271         * lra.c (lra): Add code to deal with fails by splitting hard reg
25272         live ranges.
25274 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
25276         * config/riscv/riscv.opt (mrelax): New option.
25277         * config/riscv/riscv.c (riscv_file_start): Emit ".option
25278         "norelax" when riscv_mrelax is disabled.
25279         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
25281 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25283         PR target/84743
25284         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
25285         reassociation for int modes.
25287 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
25289         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
25290         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
25291         for big-endian.
25292         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
25293         * config/aarch64/aarch64-sve.md
25294         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
25295         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
25296         (*extend<mode><Vwide>2): Rename to...
25297         (aarch64_sve_extend<mode><Vwide>2): ...this.
25298         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
25299         renaming the old pattern to...
25300         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
25301         unsigned packs.
25302         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
25303         define_expand, renaming the old pattern to...
25304         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
25305         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
25306         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
25307         account when deciding which SVE instruction the optab should use.
25308         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
25310 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
25312         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
25313         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
25314         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
25315         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
25316         (tlsdesc_small_<mode>): Turn a define_expand and use
25317         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
25318         (tlsdesc_small_advsimd_<mode>): ...this.
25319         (tlsdesc_small_sve_<mode>): New pattern.
25321 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
25323         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
25324         (UNSPEC_UMUL_HIGHPART): New constants.
25325         (MUL_HIGHPART): New int iteraor.
25326         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
25327         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
25328         define_expand.
25329         (*<su>mul<mode>3_highpart): New define_insn.
25331 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
25333         PR lto/84805
25334         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25335         incomplete types.
25337 2018-03-13  Martin Liska  <mliska@suse.cz>
25339         PR ipa/84658.
25340         * (sem_item_optimizer::sem_item_optimizer): Initialize new
25341         vector.
25342         (sem_item_optimizer::~sem_item_optimizer): Release it.
25343         (sem_item_optimizer::merge_classes): Register variable aliases.
25344         (sem_item_optimizer::fixup_pt_set): New function.
25345         (sem_item_optimizer::fixup_points_to_sets): Likewise.
25346         * ipa-icf.h: Declare new variables and functions.
25348 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
25350         PR middle-end/84834
25351         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
25352         integer_pow2p@2 and test integer_pow2p in condition.
25353         (A < 0 ? C : 0): Similarly for @1.
25355         PR middle-end/84831
25356         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
25357         characters starting at p contain '\0' character, don't look beyond
25358         that.
25360         PR target/84827
25361         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
25362         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
25364         PR target/84828
25365         * reg-stack.c (change_stack): Change update_end var from int to
25366         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
25367         also call set_block_for_insn on the newly added insns and rescan.
25369         PR target/84786
25370         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
25371         on the last operand.
25373         PR c++/84704
25374         * tree.c (stabilize_reference_1): Return save_expr (e) for
25375         STATEMENT_LIST even if it doesn't have side-effects.
25377 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
25379         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
25381 2018-03-12  Renlin Li  <renlin.li@arm.com>
25383         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
25384         aarch64_output_scalar_simd_mov_immediate.
25386 2018-03-12  Martin Sebor  <msebor@redhat.com>
25388         PR tree-optimization/83456
25389         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
25390         for perfectly overlapping calls to memcpy.
25391         (gimple_fold_builtin_memory_chk): Same.
25392         (gimple_fold_builtin_strcpy): Handle no-warning.
25393         (gimple_fold_builtin_stxcpy_chk): Same.
25394         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
25396 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
25398         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
25399         parameter.  Use it for SFmode.
25400         (rs6000_function_arg_advance_1): Adjust.
25401         (rs6000_function_arg): Adjust.
25402         (rs6000_gimplify_va_arg): Pass false for that new parameter.
25404 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
25406         PR rtl-optimization/84169
25407         PR rtl-optimization/84780
25408         * combine.c (can_combine_p): Check for a 2-insn combination whether
25409         the destination register is used between the two insns, too.
25411 2018-03-12  Richard Biener  <rguenther@suse.de>
25413         PR tree-optimization/84803
25414         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
25415         for refs DR analysis didn't process.
25417 2018-03-12  Richard Biener  <rguenther@suse.de>
25419         PR tree-optimization/84777
25420         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
25421         force-vectorize loops ignore whether we are optimizing for size.
25423 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
25425         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
25426         (TARGET_MD_ASM_ADJUST): Define.
25428 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
25429             Kito Cheng  <kito.cheng@gmail.com>
25430             Chung-Ju Wu  <jasonwucj@gmail.com>
25432         * config/nds32/nds32.c (nds32_compute_stack_frame,
25433         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
25434         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
25435         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
25436         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
25437         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
25438         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
25439         * config/nds32/nds32.md (prologue, epilogue): Use macro
25440         NDS32_V3PUSH_AVAILABLE_P to do checking.
25442 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
25444         PR debug/58150
25445         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
25446         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
25447         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
25448         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
25449         addition of most attributes on !orig_type_die or the attribute not
25450         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
25452 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
25453             Chung-Ju Wu  <jasonwucj@gmail.com>
25455         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
25456         __NDS32_VH__ macro.
25457         * config/nds32/nds32.opt (mvh): New option.
25459 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
25460             Chung-Ju Wu  <jasonwucj@gmail.com>
25462         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
25463         function.
25464         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
25465         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
25466         definition.
25468 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
25469             Chung-Ju Wu  <jasonwucj@gmail.com>
25471         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
25472         function.
25473         * config/nds32/nds32-multiple.md (strlensi): New pattern.
25474         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
25476 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
25477             Kito Cheng  <kito.cheng@gmail.com>
25478             Chung-Ju Wu  <jasonwucj@gmail.com>
25480         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
25481         UNSPEC_FFMISM and UNSPEC_FLMISM.
25482         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
25483         for ffb, ffmism and flmism.
25484         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
25485         (unspec_ffmism): Ditto.
25486         (unspec_flmism): Ditto.
25487         (nds32_expand_builtin_impl): Check if string extension is available.
25488         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
25489         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
25491 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
25493         Reverting patch:
25494         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25496         PR target/83712
25497         * lra-assigns.c (assign_by_spills): Return a flag of reload
25498         assignment failure.  Do not process the reload assignment
25499         failures.  Do not spill other reload pseudos if they has the same
25500         reg class.
25501         (lra_assign): Add a return arg.  Set up from the result of
25502         assign_by_spills call.
25503         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25504         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25505         usage_insns if it is not NULL.
25506         (spill_hard_reg_in_range): New function.
25507         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25508         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25509         function prototypes.
25510         (lra_assign): Change prototype.
25511         * lra.c (lra): Add code to deal with fails by splitting hard reg
25512         live ranges.
25514 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
25516         PR target/84807
25517         * config/i386/i386.opt: Replace Enforcment with Enforcement.
25519 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
25521         PR debug/84620
25522         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
25523         (dw_val_node): Add val_symbolic_view.
25524         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
25525         (symview_upper_bound): New.
25526         (new_line_info_table): Initialize symviews_since_reset.
25527         (dwarf2out_source_line): Count symviews_since_reset and set
25528         symview_upper_bound.
25529         (dw_val_equal_p): Handle symview.
25530         (add_AT_symview): New.
25531         (print_dw_val): Handle symview.
25532         (attr_checksum, attr_checksum_ordered): Likewise.
25533         (same_dw_val_p, size_of_die): Likewise.
25534         (value_format, output_die): Likewise.
25535         (add_high_low_attributes): Use add_AT_symview for entry_view.
25536         (dwarf2out_finish): Reset symview_upper_bound, clear
25537         zero_view_p.
25539 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
25541         PR target/83969
25542         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
25543         Add strict argument and use it.
25544         (rs6000_split_multireg_move): Update for new strict argument.
25545         (mem_operand_gpr): Disallow all non-offsettable addresses.
25546         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
25548 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
25550         PR target/84772
25551         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
25552         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
25553         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
25555         PR c++/84767
25556         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
25557         decl, use remap_type if we want to use the type.
25559 2018-03-09  Martin Sebor  <msebor@redhat.com>
25561         PR tree-optimization/84526
25562         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25563         Remove dead code.
25564         (builtin_access::generic_overlap): Be prepared to handle non-array
25565         base objects.
25567 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
25569         PR rtl-optimization/84682
25570         * lra-constraints.c (process_address_1): Check is_address flag
25571         for address constraints.
25572         (process_alt_operands): Likewise.
25573         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
25574         preprocess_constraints.
25575         * recog.h (preprocess_constraints): Add oploc parameter.
25576         Adjust callers.
25577         * recog.c (preprocess_constraints): Test address_operand for
25578         CT_ADDRESS constraints.
25580 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
25582         PR target/83712
25583         * lra-assigns.c (assign_by_spills): Return a flag of reload
25584         assignment failure.  Do not process the reload assignment
25585         failures.  Do not spill other reload pseudos if they has the same
25586         reg class.
25587         (lra_assign): Add a return arg.  Set up from the result of
25588         assign_by_spills call.
25589         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25590         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
25591         usage_insns if it is not NULL.
25592         (spill_hard_reg_in_range): New function.
25593         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25594         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25595         function prototypes.
25596         (lra_assign): Change prototype.
25597         * lra.c (lra): Add code to deal with fails by splitting hard reg
25598         live ranges.
25600 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25602         PR target/83193
25603         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
25604         Accept complain bool parameter.  Only emit errors if it is true.
25605         (arm_parse_cpu_option_name): Likewise.
25606         (arm_target_thumb_only): Adjust callers of the above.
25607         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
25608         prototype to take a default true bool parameter.
25609         (arm_parse_arch_option_name): Likewise.
25611 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
25612             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
25614         PR jit/64089
25615         PR jit/84288
25616         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
25617         * configure: Regenerate.
25618         * configure.ac ("linker --version-script option"): New.
25619         ("linker soname option"): New.
25621 2018-03-09  Richard Biener  <rguenther@suse.de>
25623         PR tree-optimization/84775
25624         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
25625         immediate uses of predicate stmts and mark them modified.
25627         Revert
25628         PR tree-optimization/84178
25629         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25630         to caller.
25631         (version_loop_for_if_conversion): Delay update_ssa call.
25632         (tree_if_conversion): Delay update_ssa until after predicate
25633         insertion.
25635 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
25637         PR target/84763
25638         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
25639         when the function accesses prior frames.
25641 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
25643         PR debug/84456
25644         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
25645         gen_llsym, otherwise call maybe_gen_llsym.
25647         PR inline-asm/84742
25648         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
25649         has ',' character inside of it.
25651 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25653         PR target/84748
25654         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
25655         as clobbering CC_REGNUM.
25657 2018-03-08  Richard Biener  <rguenther@suse.de>
25659         PR middle-end/84552
25660         * tree-scalar-evolution.c: Include tree-into-ssa.h.
25661         (follow_copies_to_constant): Do not follow SSA names registered
25662         for update.
25664 2018-03-08  Richard Biener  <rguenther@suse.de>
25666         PR tree-optimization/84178
25667         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25668         to caller.
25669         (version_loop_for_if_conversion): Delay update_ssa call.
25670         (tree_if_conversion): Delay update_ssa until after predicate
25671         insertion.
25673 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
25675         PR tree-optimization/84178
25676         * tree-if-conv.c (release_bb_predicate): Remove the
25677         the assertion that the stmts have NULL use_ops.
25678         Discard the statements, asserting that they haven't
25679         yet been added to a BB.
25681 2018-03-08  Richard Biener  <rguenther@suse.de>
25683         PR tree-optimization/84746
25684         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
25685         (phi_translate): Pass in destination ANTIC_OUT set.
25686         (phi_translate_1): Likewise.  For a simplified result lookup
25687         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
25688         (phi_translate_set): Adjust.
25689         (do_pre_regular_insertion): Likewise.
25690         (do_pre_partial_partial_insertion): Likewise.
25692 2018-03-08  Martin Liska  <mliska@suse.cz>
25694         PR gcov-profile/84735
25695         * doc/gcov.texi: Document usage of profile files.
25696         * gcov-io.h: Document changes in the format.
25698 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
25700         PR debug/84404
25701         PR debug/84408
25702         * dwarf2out.c (struct dw_line_info_table): Update comments for
25703         view == -1.
25704         (FORCE_RESET_NEXT_VIEW): New.
25705         (FORCE_RESETTING_VIEW_P): New.
25706         (RESETTING_VIEW_P): Check for -1 too.
25707         (ZERO_VIEW_P): Likewise.
25708         (new_line_info_table): Force-reset next view.
25709         (dwarf2out_begin_function): Likewise.
25710         (dwarf2out_source_line): Simplify zero_view_p initialization.
25711         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
25712         view directly.  Omit view when omitting .loc at line 0.
25714 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
25716         PR tree-optimization/84740
25717         * tree-switch-conversion.c (process_switch): Call build_constructors
25718         only if info.phi_count is non-zero.
25720         PR tree-optimization/84739
25721         * tree-tailcall.c (find_tail_calls): Check call arguments against
25722         DECL_ARGUMENTS (current_function_decl) rather than
25723         DECL_ARGUMENTS (func) when checking for tail recursion.
25725 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
25727         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
25728         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
25729         Volker Reichelt's entry and add entries for people that perform
25730         GCC fuzzy testing and report numerous bugs.
25732 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
25734         PR target/82411
25735         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
25736         readonly data in sdata, if that is disabled.
25737         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
25738         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
25739         -mreadonly-in-sdata option.
25741 2018-03-07  Martin Sebor  <msebor@redhat.com>
25743         PR tree-optimization/84468
25744         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
25745         basic block when looking for nul assignment.
25747 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
25749         PR target/84277
25750         * except.h (output_function_exception_table): Adjust prototype.
25751         * except.c (output_function_exception_table): Remove FNNAME parameter
25752         and add SECTION parameter.  Ouput one part of the table at a time.
25753         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
25754         the first part of the exception table and emit unwind directives.
25755         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
25756         (i386_pe_seh_cold_init): Likewise.
25757         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
25758         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
25759         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
25760         (ix86_output_call_insn): Emit a nop in one more case for SEH.
25761         * config/i386/winnt.c: Include except.h.
25762         (struct seh_frame_state): Add reg_offset, after_prologue and
25763         in_cold_section fields.
25764         (i386_pe_seh_end_prologue): Set seh->after_prologue.
25765         (i386_pe_seh_cold_init): New function.
25766         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
25767         to seh->in_cold_section.
25768         (seh_emit_push): Record the offset of the push.
25769         (seh_emit_save): Record the offet of the save.
25770         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
25771         Test seh->after_prologue to disregard the epilogue.
25772         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
25773         (i386_pe_end_cold_function): New function.
25775 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
25777         PR fortran/84565
25778         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
25779         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
25781         PR c++/84704
25782         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
25783         on tmp_var.
25784         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25785         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25787         PR middle-end/84723
25788         * multiple_target.c: Include tree-inline.h and intl.h.
25789         (expand_target_clones): Diagnose and fail if node->definition and
25790         !tree_versionable_function_p (node->decl).
25792 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
25794         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25795         sprint_ul.
25796         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25797         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25798         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25800 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
25802         PR target/84710
25803         * combine.c (try_combine): Use reg_or_subregno instead of handling
25804         just paradoxical SUBREGs and REGs.
25806 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
25808         * config/arc/arc.c (arc_finalize_pic): Remove function.
25809         (arc_must_save_register): We use single base PIC register, remove
25810         checks to save/restore the PIC register.
25811         (arc_expand_prologue): Likewise.
25812         * config/arc/arc-protos.h (arc_set_default_type_attributes):
25813         Remove.
25814         (arc_verify_short): Likewise.
25815         (arc_attr_type): Likewise.
25816         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25817         (walk_stores): Likewise.
25818         (arc_address_cost): Make it static.
25819         (arc_verify_short): Likewise.
25820         (branch_dest): Likewise.
25821         (arc_attr_type): Likewise.
25822         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25823         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25824         (arc_final_prescan_insn): Remove inserting the nops due to
25825         hardware hazards.  It is done in reorg step.
25826         (insn_length_variant_t): Remove.
25827         (insn_length_parameters_t): Likewise.
25828         (arc_insn_length_parameters): Likewise.
25829         (arc_get_insn_variants): Likewise.
25830         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25832 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
25834         PR inline-asm/84683
25835         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25836         assertion failure.
25838         PR tree-optimization/84687
25839         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25840         on new_node->decl.
25841         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25843 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25845         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25846         Rename to ppc_speculation_barrier.
25847         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25848         __builtin_ppc_speculation_barrier.
25850 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
25852         PR target/84700
25853         * combine.c (combine_simplify_rtx): Don't try to simplify if
25854         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25855         are equal to x.
25857 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
25859         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25860         to 32 bytes when compiling for POWER9.
25862 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
25864         PR target/84564
25865         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25866         regparm >= 3 with no arg reg available also for calls with
25867         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
25869         PR target/84524
25870         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25871         orig,vex.
25872         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
25874 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
25876         PR target/84264
25877         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
25879 2018-03-05  Richard Biener  <rguenther@suse.de>
25881         PR tree-optimization/84486
25882         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
25883         When inserting a __builtin_assume_aligned call set the LHS
25884         SSA name alignment info accordingly.
25886 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
25888         PR tree-optimization/84114
25889         * config/aarch64/aarch64.c (aarch64_reassociation_width)
25890         Avoid reassociation of FLOAT_MODE addition.
25892 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
25894         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
25895         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
25896         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
25897         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
25898         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
25899         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
25900         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
25901         and -mwbnoinvd.
25902         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
25903         __builtin_ia32_wbinvd): New builtins.
25904         (SPECIAL_ARGS2): New.
25905         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
25906         (SPECIAL_ARGS2): New.
25907         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
25908         (ix86_valid_target_attribute_inner_p): Ditto.
25909         (ix86_init_mmx_sse_builtins): Add special_args2.
25910         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
25911         TARGET_WBNOINVD_P): New.
25912         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
25913         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
25914         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
25915         * config/i386/immintrin.h (_wbinvd): New intrinsic.
25916         * config/i386/pconfigintrin.h: New file.
25917         * config/i386/wbnoinvdintrin.h: Ditto.
25918         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
25919         wbnoinvdintrin.h.
25920         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
25922 2018-03-05  Richard Biener  <rguenther@suse.de>
25924         PR tree-optimization/84670
25925         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25926         member.
25927         (BB_VISITED_WITH_VISITED_SUCCS): New define.
25928         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25929         (compute_antic_aux): Only assert the number of values in ANTIC_IN
25930         doesn't grow if all successors (recursively) were visited at least
25931         once.
25933 2018-03-05  Richard Biener  <rguenther@suse.de>
25935         PR tree-optimization/84650
25936         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
25937         if executed in the loop pipeline.
25939 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
25941         * doc/configfiles.texi (Configuration Files): Move info about
25942         conditionalizing $target-protos.h to...
25943         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
25944         differs from $target-protos.h.
25946 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
25947             Chung-Ju Wu  <jasonwucj@gmail.com>
25949         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
25950         * config/nds32/nds32-multiple.md (setmemsi): Define.
25951         * config/nds32/nds32-memory-manipulation.c
25952         (nds32_gen_dup_4_byte_to_word_value): New.
25953         (emit_setmem_word_loop): New.
25954         (emit_setmem_byte_loop): New.
25955         (nds32_expand_setmem_loop): New.
25956         (nds32_expand_setmem_loop_v3m): New.
25957         (nds32_expand_setmem_unroll): New.
25958         (nds32_expand_setmem): New.
25960 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
25961             Chung-Ju Wu  <jasonwucj@gmail.com>
25963         * config/nds32/nds32-memory-manipulation.c
25964         (nds32_emit_load_store): New.
25965         (nds32_emit_post_inc_load_store): New.
25966         (nds32_emit_mem_move): New.
25967         (nds32_emit_mem_move_block): New.
25968         (nds32_expand_movmemsi_loop_unknown_size): New.
25969         (nds32_expand_movmemsi_loop_known_size): New.
25970         (nds32_expand_movmemsi_loop): New.
25971         (nds32_expand_movmemsi_unroll): New.
25972         (nds32_expand_movmemqi): Rename ...
25973         (nds32_expand_movmemsi): ... to this.
25974         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
25975         (movmemsi): ... to this.
25976         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
25977         (nds32_expand_movmemsi): ... to this.
25979 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
25980             Monk Chiang  <sh.chiang04@gmail.com>
25981             Chung-Ju Wu  <jasonwucj@gmail.com>
25983         * config/nds32/nds32-protos.h
25984         (nds32_expand_load_multiple): New arguments.
25985         (nds32_expand_store_multiple): Ditto.
25986         (nds32_valid_multiple_load_store): Rename ...
25987         (nds32_valid_multiple_load_store_p): ... to this.
25988         * config/nds32/nds32-memory-manipulation.c
25989         (nds32_expand_load_multiple): Refine implementation.
25990         (nds32_expand_store_multiple): Ditto.
25991         * config/nds32/nds32-multiple.md
25992         (load_multiple): Update nds32_expand_load_multiple interface.
25993         (store_multiple): Update nds32_expand_store_multiple interface.
25994         * config/nds32/nds32-predicates.c
25995         (nds32_valid_multiple_load_store): Rename ...
25996         (nds32_valid_multiple_load_store_p): ... to this and refine
25997         implementation.
25998         * config/nds32/predicates.md
25999         (nds32_load_multiple_and_update_address_operation): New predicate.
26000         (nds32_store_multiple_and_update_address_operation): New predicate.
26002 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
26003             Chung-Ju Wu  <jasonwucj@gmail.com>
26005         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26006         (combo): New attribute.
26007         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26009 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
26011         * config/nds32/nds32.opt: Change -mcmodel= default value.
26013 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
26014             Monk Chiang  <sh.chiang04@gmail.com>
26015             Chung-Ju Wu  <jasonwucj@gmail.com>
26017         * config/nds32/constants.md (unspec_element): New enum.
26018         * config/nds32/constraints.md (Umw): New constraint.
26019         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26020         * config/nds32/nds32-intrinsic.md: Likewise.
26021         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26022         (nds32_valid_smw_lwm_base_p): New.
26023         (nds32_output_smw_single_word): New.
26024         (nds32_output_lmw_single_word): New.
26025         (nds32_expand_unaligned_load): New.
26026         (nds32_expand_unaligned_store): New.
26027         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26028         (nds32_output_smw_single_word): Declare.
26029         (nds32_output_lmw_single_word): Declare.
26030         (nds32_expand_unaligned_load): Declare.
26031         (nds32_expand_unaligned_store): Declare.
26032         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26033         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26034         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26035         NDS32_BUILTIN_UASTORE_DW.
26036         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26037         predicate.
26039 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
26040             Kito Cheng  <kito.cheng@gmail.com>
26041             Chung-Ju Wu  <jasonwucj@gmail.com>
26043         * config/nds32/nds32-intrinsic.c
26044         (nds32_expand_builtin_null_ftype_reg): Delete.
26045         (nds32_expand_builtin_reg_ftype_imm): Ditto.
26046         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26047         (nds32_read_argument): New.
26048         (nds32_legitimize_target): Ditto.
26049         (nds32_legitimize_argument): Ditto.
26050         (nds32_check_constant_argument): Ditto.
26051         (nds32_expand_unop_builtin): Ditto.
26052         (nds32_expand_unopimm_builtin): Ditto.
26053         (nds32_expand_binop_builtin): Ditto.
26054         (nds32_builtin_decl_impl): Ditto.
26055         (builtin_description): Ditto.
26056         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26057         (nds32_init_builtins_impl): Ditto.
26058         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26059         (nds32_builtin_decl): New.
26060         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26061         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26063 2018-03-02  Jeff Law  <law@redhat.com>
26065         * reorg.c (stop_search_p): Handle DEBUG_INSN.
26066         (redundant_insn, fill_simple_delay_slots): Likewise.
26067         (fill_slots_from_thread): Likewise.
26068         * resource.c (mark_referenced_resources): Likewise.
26069         (mark_set_resources, find_dead_or_set_registers): Likewise.
26071 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26073         * substring-locations.h (format_warning_va): Formatting fix for
26074         ATTRIBUTE_GCC_DIAG.
26075         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26076         argument.
26077         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26078         * substring-locations.c: Include intl.h.
26079         (format_warning_va): Turned into small wrapper around
26080         format_warning_n_va, renamed to ...
26081         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26082         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26083         use ngettext.
26084         (format_warning_at_substring_n): New function.
26085         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26086         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
26087         format_warning_at_substring with just a shorter name instead of
26088         const function pointer.
26089         (fmtwarn_n): New function.
26090         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26091         appropriate, get rid of all the fmtstr temporaries, move conditionals
26092         with G_() wrapped string literals directly into fmtwarn arguments,
26093         cast dir.len to (int), formatting fixes.
26095 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
26097         * doc/invoke.texi: Remove "Cilk Plus" references.
26099 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26100             Richard Biener  <rguenther@suse.de>
26102         PR ipa/84628
26103         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26104         for error or warning attributes if CALL_FROM_THUNK_P is set.
26105         Formatting fixes.
26107 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26109         PR target/56540
26110         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26111         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26113         PR target/56540
26114         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26115         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26117         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26118         instead of -1U in last predictors element's probability member.
26120 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
26122         PR ipa/83983
26123         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26124         arguments if they are comparable.
26126 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26128         PR tree-optimization/84634
26129         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26130         masks and masked_loop_p with a single loop_masks, making sure it's
26131         null for bb vectorization.
26133 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
26135         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26136         (vect_analyze_data_ref_access): Use loop->safe_len rather than
26137         loop->force_vectorize to check whether there is no alias.
26139 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
26141         PR target/84614
26142         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26143         prototypes.
26144         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26145         comments.
26146         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26147         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26148         instead of a loop around prev_real_insn.
26149         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26150         prev_real_insn.
26152         PR inline-asm/84625
26153         * config/i386/i386.c (ix86_print_operand): Use conditional
26154         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26155         zero vector.
26157 2018-03-02  Richard Biener  <rguenther@suse.de>
26159         PR tree-optimization/84427
26160         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26161         (bitmap_set_subtract_values): Rewrite to handle multiple
26162         exprs per value.
26163         (clean): Likewise.
26164         (prune_clobbered_mems): Likewise.
26165         (phi_translate): Take edge instead of pred/phiblock.
26166         (phi_translate_1): Likewise.
26167         (phi_translate_set): Likewise.  Insert all translated
26168         exprs for a value into the set, keeping possibly multiple
26169         expressions per value.
26170         (compute_antic_aux): Adjust for phi_translate changes.
26171         When intersecting union the expressions and prune those
26172         not in the final value set, keeping possibly multiple
26173         expressions per value.  Do not use value-insertion
26174         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26175         all expressions.  Add verification that the value-sets
26176         only shrink during iteration.
26177         (compute_partial_antic_aux): Adjust for the phi_translate changes.
26178         (do_pre_regular_insertion): Likewise.
26179         (do_pre_partial_partial_insertion): Likewise.
26181 2018-03-02  Richard Biener  <rguenther@suse.de>
26183         PR target/82005
26184         * config/darwin.c (saved_debug_info_level): New static global.
26185         (darwin_asm_lto_start): Disable debug info generation for LTO out.
26186         (darwin_asm_lto_end): Restore debug info generation settings.
26188 2018-03-01  Martin Liska  <mliska@suse.cz>
26190         PR sanitizer/82484
26191         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26192         volatile arguments.
26194 2018-03-01  Richard Biener  <rguenther@suse.de>
26196         PR debug/84645
26197         * dwarf2out.c (gen_variable_die): Properly handle late VLA
26198         type annotation with LTO when debug was disabled at compile-time.
26200 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
26202         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26203         XINT with INTVAL.
26204         (mips_final_postscan_insn): Likewise.
26206 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
26208         PR rtl-optimization/84528
26209         * alias.c (init_alias_target): Add commentary.
26210         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
26211         a unique base value if the frame pointer is not eliminated
26212         to the stack pointer.
26214 2018-03-01  Tom de Vries  <tom@codesourcery.com>
26216         PR rtl-optimization/83327
26217         * lra-int.h (hard_regs_spilled_into): Declare.
26218         * lra.c (hard_regs_spilled_into): Define.
26219         (init_reg_info): Init hard_regs_spilled_into.
26220         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
26221         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
26222         (process_bb_lives): Handle hard_regs_spilled_into.
26223         (lra_create_live_ranges_1): Before doing liveness propagation, clear
26224         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
26226 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
26228         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
26229         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
26230         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
26231         * config/rs6000/aix72.h: New file.
26233 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
26235         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
26236         instead of warning_at with conditional singular and plural messages
26237         where possible.
26239         PR target/52991
26240         * stor-layout.c (update_alignment_for_field): For
26241         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
26242         && !DECL_PACKED (field), do the alignment update, just use
26243         only desired_align instead of MAX (type_align, desired_align)
26244         as the alignment.
26245         (place_field): Don't do known_align < desired_align handling
26246         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
26247         is non-NULL, instead do it after rli->prev_field handling and
26248         only if not within a bitfield word.  For DECL_PACKED (field)
26249         use type_align of BITS_PER_UNIT.
26251 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
26253         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
26254         superfluous parentheses and trailing spaces.
26256 2018-02-28  Richard Biener  <rguenther@suse.de>
26258         PR tree-optimization/84584
26259         * graphite-scop-detection.c (scop_detection::add_scop): Discard
26260         SCoPs with fake exit edge.
26262 2018-02-28  Martin Liska  <mliska@suse.cz>
26264         PR testsuite/84597
26265         * timevar.c (timer::print): Fix format to properly print 100%
26266         values.
26268 2018-02-28  Richard Biener  <rguenther@suse.de>
26270         PR middle-end/84607
26271         * genmatch.c (capture_info::walk_match): Do not mark
26272         captured expressions without operands as expr_p given
26273         they act more like predicates and should be subject to
26274         "lost tail" side-effect preserving.
26276 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
26278         PR rtl-optimization/81611
26279         * auto-inc-dec.c (attempt_change): Move dead note from
26280         mem_insn if it's the next use of regno
26281         (find_address): Take address use of reg holding
26282         non-incremented value.  Add parm to limit search to the named
26283         reg only.
26284         (merge_in_block): Attempt to use a mem insn that is the next
26285         use of the original regno.
26287 2018-02-27  Martin Sebor  <msebor@redhat.com>
26289         PR c++/83871
26290         * doc/invoke.texi (-Wmissing-attributes): New option.
26291         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
26293 2018-02-27  Martin Sebor  <msebor@redhat.com>
26295         PR translation/84207
26296         * diagnostic-core.h (warning_n, error_n, inform_n): Change
26297         n argument to unsigned HOST_WIDE_INT.
26298         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
26299         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
26300         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
26301         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
26303 2018-02-27  Richard Biener  <rguenther@suse.de>
26305         PR tree-optimization/84512
26306         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
26307         Do not use the estimate returned from record_stmt_cost for
26308         the scalar iteration cost but sum properly using add_stmt_cost.
26310 2018-02-27  Richard Biener  <rguenther@suse.de>
26312         PR tree-optimization/84466
26313         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26314         Adjust last change to less strictly validate use operands.
26316 2018-02-27  Martin Liska  <mliska@suse.cz>
26318         PR gcov-profile/84548
26319         * gcov.c (process_file): Allow partial overlap and consider it
26320         also as group functions.
26321         (output_lines): Properly calculate range of lines for a group.
26323 2018-02-27  Martin Liska  <mliska@suse.cz>
26325         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
26326         'ggc' suffixes.  Change first column width.
26327         (timer::print): Fix formatting of the column.
26329 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
26331         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
26332         preserve inline entry blocks for the sake of debug inline
26333         entry point markers alone.
26334         (remove_unused_locals): Suggest in comments a better place to
26335         force the preservation of inline entry blocks that are
26336         otherwise unused, but do not preserve them.
26338 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
26340         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
26342 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
26344         PR target/84039
26345         * config/i386/constraints.md (Bs): Replace
26346         ix86_indirect_branch_register with
26347         TARGET_INDIRECT_BRANCH_REGISTER.
26348         (Bw): Likewise.
26349         * config/i386/i386.md (indirect_jump): Likewise.
26350         (tablejump): Likewise.
26351         (*sibcall_memory): Likewise.
26352         (*sibcall_value_memory): Likewise.
26353         Peepholes of indirect call and jump via memory: Likewise.
26354         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
26355         (*sibcall_value_GOT_32): Likewise.
26356         * config/i386/predicates.md (indirect_branch_operand): Likewise.
26357         (GOT_memory_operand): Likewise.
26358         (call_insn_operand): Likewise.
26359         (sibcall_insn_operand): Likewise.
26360         (GOT32_symbol_operand): Likewise.
26361         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
26363 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
26365         PR rtl-optimization/83496
26366         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
26367         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
26368         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
26369         redundant insn, if any.
26370         (relax_delay_slots): Likewise.
26371         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
26373 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
26375         PR tree-optimization/83965
26376         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
26377         that grouped statements are part of a reduction chain.  Return
26378         true if the statement is not marked as a reduction itself but
26379         is part of a group.
26380         (vect_recog_dot_prod_pattern): Don't check whether the statement
26381         is part of a group here.
26382         (vect_recog_sad_pattern): Likewise.
26383         (vect_recog_widen_sum_pattern): Likewise.
26385 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
26387         PR debug/84545
26388         * final.c (rest_of_clean_state): Also look for calls inside sequences.
26390 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
26392         PR target/84530
26393         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
26394         the bool argument.
26395         (ix86_output_indirect_function_return): New prototype.
26396         (ix86_split_simple_return_pop_internal): Likewise.
26397         * config/i386/i386.c (indirect_return_via_cx): New.
26398         (indirect_return_via_cx_bnd): Likewise.
26399         (indirect_thunk_name): Handle return va CX_REG.
26400         (output_indirect_thunk_function): Create alias for
26401         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
26402         (ix86_output_indirect_jmp): Remove the bool argument.
26403         (ix86_output_indirect_function_return): New function.
26404         (ix86_split_simple_return_pop_internal): Likewise.
26405         * config/i386/i386.md (*indirect_jump): Don't pass false
26406         to ix86_output_indirect_jmp.
26407         (*tablejump_1): Likewise.
26408         (simple_return_pop_internal): Change it to define_insn_and_split.
26409         Call ix86_split_simple_return_pop_internal to split it for
26410         -mfunction-return=.
26411         (simple_return_indirect_internal): Call
26412         ix86_output_indirect_function_return instead of
26413         ix86_output_indirect_jmp.
26415 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
26417         PR bootstrap/84405
26418         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
26419         memset and value initialization afterwards.
26421 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
26423         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
26425 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
26427         PR target/84521
26428         * common/config/aarch64/aarch64-common.c
26429         (aarch_option_optimization_table[]): Switch
26430         off fomit-frame-pointer
26432 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
26433             Chung-Ju Wu  <jasonwucj@gmail.com>
26435         * config/nds32/nds32-multiple.md (load_multiple): Disallow
26436         volatile memory.
26437         (store_multiple): Ditto.
26439 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
26441         * config.gcc: Add --with-cpu support for nds32 target.
26442         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
26443         * config/nds32/nds32.opt: Add -mcpu= option.
26445 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
26447         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
26448         isel=yes): Warn for these deprecated options.
26450 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
26452         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
26453         ISA_2_5_MASKS_EMBEDDED.
26455 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
26457         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
26458         p->max as pointers rather than using iterative_hash_expr.
26460 2018-02-23  Carl Love  <cel@us.ibm.com>
26462         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
26463         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
26464         BU_P8V_OVERLOAD_2.
26465         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
26466         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
26467         P8V_BUILTIN_VEC_VUNSIGNED2.
26469 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
26471         PR target/81572
26472         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
26473         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
26474         LRA_UNKNOWN_ALT.
26475         * lra-constraints.c (curr_insn_transform): Set up
26476         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
26477         LRA_UNKNOWN_ALT.
26478         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
26479         * lra-eliminations.c (spill_pseudos): Ditto.
26480         (process_insn_for_elimination): Ditto.
26481         * lra-lives.c (reg_early_clobber_p): Use the new macros.
26482         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
26483         LRA_NON_CLOBBERED_ALT.
26485 2018-02-22  Martin Sebor  <msebor@redhat.com>
26487         PR tree-optimization/84480
26488         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
26489         to maybe_diag_stxncpy_trunc.  Call it.
26490         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
26491         from gimple_fold_builtin_strcpy.  Print inlining stack.
26492         (handle_builtin_stxncpy): Print inlining stack.
26493         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
26495 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
26497         PR target/84176
26498         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
26499         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
26500         and -fcheck-pointer-bounds are used together.
26501         (indirect_thunk_prefix): New enum.
26502         (indirect_thunk_need_prefix): New function.
26503         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
26504         "_nt" instead of "_bnd" for NOTRACK prefix.
26505         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
26506         (output_indirect_thunk_function): Likewise.
26507         (): Likewise.
26508         (ix86_code_end): Update output_indirect_thunk_function calls.
26509         (ix86_output_indirect_branch_via_reg): Replace
26510         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
26511         (ix86_output_indirect_branch_via_push): Likewise.
26512         (ix86_output_function_return): Likewise.
26513         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
26514         incompatible with -fcf-protection=branch and
26515         -fcheck-pointer-bounds.
26517 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
26519         PR target/83335
26520         * config/aarch64/aarch64.c (aarch64_print_address_internal):
26521         Change gcc_assert call to output_operand_lossage.
26523 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
26525         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
26527 2018-02-22  DJ Delorie  <dj@redhat.com>
26528             Sebastian Perta  <sebastian.perta@renesas.com>
26529             Oleg Endo  <olegendo@gcc.gnu.org>
26531         * config/rx/rx.c (rx_rtx_costs): New function.
26532         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
26534 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
26536         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
26538 2018-02-22  Martin Liska  <mliska@suse.cz>
26540         PR driver/83193
26541         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
26542         Add "native" as a possible value.
26544 2018-02-22  Martin Liska  <mliska@suse.cz>
26546         PR driver/83193
26547         * config/i386/i386.c (ix86_option_override_internal):
26548         Add "native" as a possible value for -march and -mtune.
26550 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
26552         PR target/84502
26553         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
26554         to all type variants.
26556         PR tree-optimization/84503
26557         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
26558         width as info->bitpos + info->bitsize - start.
26559         (merged_store_group::merge_overlapping): Simplify width computation.
26560         (check_no_overlap): New function.
26561         (imm_store_chain_info::try_coalesce_bswap): Compute expected
26562         start + width and last_order of the group, fail if check_no_overlap
26563         fails.
26564         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
26565         to group if check_no_overlap fails.
26567 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
26569         * config/rs6000/altivec.md: Delete contraint arguments to
26570         define_expand, define_split, and define_peephole2, and in
26571         define_insn_and_split if always unused.
26572         * config/rs6000/darwin.md: Ditto.
26573         * config/rs6000/dfp.md: Ditto.
26574         * config/rs6000/rs6000.md: Ditto.
26575         * config/rs6000/sync.md: Ditto.
26576         * config/rs6000/vector.md: Ditto.
26577         * config/rs6000/vsx.md: Ditto.
26579 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
26581         * config/rs6000/altivec.md: Write output control strings as braced
26582         blocks instead of double-quoted strings.
26583         * config/rs6000/darwin.md: Ditto.
26584         * config/rs6000/rs6000.md: Ditto.
26585         * config/rs6000/vector.md: Ditto.
26586         * config/rs6000/vsx.md: Ditto.
26588 2018-02-21  Jason Merrill  <jason@redhat.com>
26590         PR c++/84314 - ICE with templates and fastcall attribute.
26591         * attribs.c (build_type_attribute_qual_variant): Remove assert.
26593 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
26595         * ipa-cp.c (determine_versionability): Fix comment typos.
26597 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
26599         PR c/84229
26600         * ipa-cp.c (determine_versionability): Do not version functions caling
26601         va_arg_pack.
26603 2018-02-21  Martin Liska  <mliska@suse.cz>
26605         PR driver/83193
26606         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
26607         Add "native" as a possible value.
26608         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
26609         the macro when native cpu detection is available.
26611 2018-02-21  Martin Liska  <mliska@suse.cz>
26613         PR driver/83193
26614         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
26615         Add "native" as a possible value.
26616         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
26617         when native cpu detection is available.
26619 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
26620             Martin Sebor  <msebor@redhat.com>
26622         PR tree-optimization/84478
26623         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
26624         false.
26625         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
26626         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
26627         support which is conservatively correct, for 2 only stay conservative
26628         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
26629         argument to the 2 argument get_range_strlen, adjust 6 arg
26630         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
26631         false.
26632         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
26633         (gimple_fold_builtin_strlen): Pass true as last argument to
26634         get_range_strlen.
26636 2018-02-20  Martin Sebor  <msebor@redhat.com>
26638         PR middle-end/84095
26639         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
26640         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
26641         (builtin_memref::builtin_memref): Factor out parts into
26642         set_base_and_offset and call it.
26644 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
26646         PR middle-end/84406
26647         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
26648         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
26649         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
26650         search at the associated MODE_INT.
26652 2018-02-20  Jeff Law  <law@redhat.com>
26654         PR middle-end/82123
26655         PR tree-optimization/81592
26656         PR middle-end/79257
26657         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
26658         for range data rather than using global data.
26659         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
26660         range data rather than using global data.
26661         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
26662         pass it to children as needed.
26663         (struct directive::fmtresult): Similarly.
26664         (struct directive::set_width): Similarly.
26665         (struct directive::set_precision): Similarly.
26666         (format_integer, format_directive, parse_directive): Similarly.
26667         (format_none): Accept unnamed vr_values parameter.
26668         (format_percent, format_floating, format_character): Similarly.
26669         (format_string, format_plain): Similarly.
26670         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
26671         the EVRP range analyzer for range data rather than using global data.
26672         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
26673         gimple-ssa-evrp-analyze.h
26674         (class sprintf_dom_walker): Add after_dom_children member function.
26675         Add evrp_range_analyzer member.
26676         (sprintf_dom_walker::before_dom_children): Call into the EVRP
26677         range analyzer as needed.
26678         (sprintf_dom_walker::after_dom_children): New member function.
26679         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
26680         if not optimizing.
26681         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
26682         (evrp_range_analyzer::pop_to_marker): Likewise.
26684 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
26686         PR tree-optimization/84419
26687         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
26688         with the required type if its current type is compatible but
26689         different.
26691 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
26693         PR middle-end/82004
26694         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
26695         after vectorization.
26697 2018-02-20  Martin Liska  <mliska@suse.cz>
26699         PR driver/83193
26700         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
26701         possible values if we don't have a hint.
26703 2018-02-20  Martin Liska  <mliska@suse.cz>
26705         PR c/84310
26706         PR target/79747
26707         * final.c (shorten_branches): Build align_tab array with one
26708         more element.
26709         * opts.c (finish_options): Add alignment option limit check.
26710         (MAX_CODE_ALIGN): Likewise.
26711         (MAX_CODE_ALIGN_VALUE): Likewise.
26712         * doc/invoke.texi: Document maximum allowed option value for
26713         all -falign-* options.
26715 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
26717         PR target/84146
26718         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
26719         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
26720         * var-tracking.c (emit_note_insn_var_location): Remove all references
26721         to NOTE_INSN_CALL_ARG_LOCATION.
26722         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
26723         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
26724         Use copy_rtx_if_shared.
26725         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
26726         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
26727         (dwarf2out_var_location): Remove handling of
26728         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
26729         on call_insn.
26730         * final.c (final_scan_insn): Remove all references to
26731         NOTE_INSN_CALL_ARG_LOCATION.
26732         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
26733         before dumping final insns.
26734         * except.c (emit_note_eh_region_end): Remove all references to
26735         NOTE_INSN_CALL_ARG_LOCATION.
26736         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
26737         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
26738         * config/arc/arc.c (hwloop_optimize): Likewise.
26739         * config/arm/arm.c (create_fix_barrier): Likewise.
26740         * config/s390/s390.c (s390_chunkify_start): Likewise.
26741         * config/sh/sh.c (find_barrier): Likewise.
26742         * config/i386/i386.c (rest_of_insert_endbranch,
26743         ix86_seh_fixup_eh_fallthru): Likewise.
26744         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
26745         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
26746         * config/frv/frv.c (frv_function_prologue): Likewise.
26747         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
26748         reg note.
26749         (note_outside_basic_block_p): Remove all references to
26750         NOTE_INSN_CALL_ARG_LOCATION.
26751         * gengtype.c (adjust_field_rtx_def): Likewise.
26752         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
26753         Likewise.
26754         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
26755         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
26757         PR c++/84444
26758         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
26759         is ADDR_EXPR.
26761         PR tree-optimization/84452
26762         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
26763         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
26764         is NULL.
26766 2018-02-19  Martin Liska  <mliska@suse.cz>
26768         PR sanitizer/82183
26769         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
26771 2018-02-19  Martin Liska  <mliska@suse.cz>
26772             Richard Sandiford  <richard.sandiford@linaro.org>
26774         PR tree-optimization/82491
26775         * gimple-fold.c (get_base_constructor): Make earlier bail out
26776         to prevent ubsan.
26778 2018-02-19  Carl Love  <cel@us.ibm.com>
26780         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
26781         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
26782         BU_P8V_OVERLOAD_1.
26783         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
26784         P8V_BUILTIN_VEC_NEG.
26786 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
26788         * config/rl78/rl78.md (movdf): New define expand.
26790 2018-02-19  Martin Liska  <mliska@suse.cz>
26792         PR other/80589
26793         * doc/invoke.texi: Fix typo.
26794         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26796 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
26798         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26799         handle rs6000_single_float and rs6000_double_float specially for
26800         e500 family CPUs.
26802 2018-02-16  Jeff Law  <law@redhat.com>
26804         * config/rx/rx.c (add_pop_cfi_notes): New function.;
26805         (pop_regs): Use it.
26807 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
26809         PR ipa/84425
26810         * ipa-inline.c (inline_small_functions): Fix a typo.
26812 2018-02-16  Nathan Sidwell  <nathan@acm.org>
26814         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26816 2018-02-16  Carl Love  <cel@us.ibm.com>
26818         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26819         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26820         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26821         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26822         expansion to P8V_BUILTIN_VEC_FLOAT2.
26824 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
26826         PR rtl-optimization/70023
26827         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26828         src_regno into account.
26830 2018-02-16  Carl Love  <cel@us.ibm.com>
26832         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26833         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26834         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26835         * config/rs6000/rs6000.c: Remove case statements for
26836         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26837         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26838         and P9V_BUILTIN_VEC_VINSERT4B.
26839         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26840         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26841         * config/rs6000/vsx.md:
26842         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26843         vec_insert4b.
26845 2018-02-16  Carl Love  <cel@us.ibm.com>
26847         * config/rs6000/altivec.h: Add builtin names vec_extract4b
26848         vec_insert4b.
26849         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26850         definitions.
26851         * config/rs6000/rs6000-c.c: Add the definitions for
26852         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26853         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26854         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26855         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
26856         definition for insert4b and define insn *insert3b_internal.
26857         * doc/extend.texi: Add documentation for vec_extract4b.
26859 2018-02-16  Nathan Sidwell  <nathan@acm.org>
26861         * doc/extend.texi (Backwards Compatibility): Mention friend
26862         injection.  Note for-scope is deprecated.
26863         * doc/invoke.texi (-ffriend-injection): Deprecate.
26865 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
26867         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26868         that moved to I2, also allow destinations that are a paradoxical
26869         subreg (instead of a normal reg).
26871 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
26873         PR target/83831
26874         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
26875         to QImode.
26877 2018-02-16  Richard Biener  <rguenther@suse.de>
26879         PR tree-optimization/84037
26880         PR tree-optimization/84016
26881         PR target/82862
26882         * config/i386/i386.c (ix86_builtin_vectorization_cost):
26883         Adjust vec_construct for the fact we need additional higher latency
26884         128bit inserts for AVX256 and AVX512 vector builds.
26885         (ix86_add_stmt_cost): Scale vector construction cost for
26886         elementwise loads.
26888 2018-02-16  Richard Biener  <rguenther@suse.de>
26890         PR tree-optimization/84417
26891         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
26892         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
26893         (non_rewritable_lvalue_p): Likewise, use poly-ints.
26895 2018-02-16  Martin Liska  <mliska@suse.cz>
26897         PR sanitizer/84307
26898         * internal-fn.def (ASAN_CHECK): Set proper flags.
26899         (ASAN_MARK): Likewise.
26901 2018-02-16  Julia Koval  <julia.koval@intel.com>
26903         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
26904         from PTA_CANNONLAKE.
26906 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
26908         PR target/84272
26909         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
26910         Use ++iter rather than iter++ for std::list iterators.
26911         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
26912         defer deleting them until all nodes in the forest are processed.  Do
26913         free even leaf nodes.  Change to_process into auto_vec.
26915         PR bootstrap/84405
26916         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
26917         * vec.h (vec_default_construct): Use memset instead of placement new
26918         if BROKEN_VALUE_INITIALIZATION is defined.
26919         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
26920         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
26921         is defined.
26923         PR rtl-optimization/83723
26924         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
26925         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
26926         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
26927         recursive calls.
26928         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
26929         callers.
26930         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
26932 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
26934         PR rtl-optimization/81443
26935         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
26936         from inner REGs to paradoxical SUBREGs.
26938 2018-02-16  Richard Biener  <rguenther@suse.de>
26940         PR tree-optimization/84399
26941         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26942         For operands we can analyze at their definition make sure we can
26943         analyze them at each use as well.
26945 2018-02-16  Richard Biener  <rguenther@suse.de>
26947         PR tree-optimization/84190
26948         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
26949         volatile accesses if the decl isn't volatile.
26951 2018-02-15  Jason Merrill  <jason@redhat.com>
26953         PR c++/84314 - ICE with templates and fastcall attribute.
26954         * attribs.c (build_type_attribute_qual_variant): Don't clobber
26955         TYPE_CANONICAL on an existing type.
26957 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
26959         PR tree-optimization/84383
26960         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
26961         dstoff nor call operand_equal_p if dstbase is NULL.
26963         PR tree-optimization/84334
26964         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
26965         also a CONSTANT_CLASS_P, punt.
26967 2018-02-14  Jim Wilson  <jimw@sifive.com>
26969         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
26970         first SMALL_OPERAND check.  New local min_second_step.  Move assert
26971         to where locals are set.  Add TARGET_RVC support.
26972         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
26974 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
26976         * doc/invoke.texi: Correct -Wformat-overflow code sample.
26978 2018-02-14  Martin Sebor  <msebor@redhat.com>
26980         PR tree-optimization/83698
26981         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
26982         arrays constrain the offset range to their bounds.
26983         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
26984         (builtin_access::overlap): Avoid setting the size of overlap if it's
26985         already been set.
26986         (maybe_diag_overlap): Also consider arrays when deciding what values
26987         of offsets to include in diagnostics.
26989 2018-02-14  Martin Sebor  <msebor@redhat.com>
26991         PR c/84108
26992         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
26993         that correspond to the kind of a declaration.
26995 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
26997         PR target/83984
26998         * config/pa/pa.md: Load address of PIC label using the linkage table
26999         if the label is nonlocal.
27001 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27003         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27004         warning message if user requests -maltivec=be.
27005         * doc/invoke.texi: Document deprecation of -maltivec=be.
27007 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
27009         PR target/84220
27010         * config/rs6000/rs6000-c.c: Update definitions for
27011         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27012         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27014 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27016         PR target/84239
27017         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27018         add _get_ssp intrinsics. Remove argument from
27019         __builtin_ia32_rdssp[d|q].
27020         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27021         * config/i386/i386-builtin.def: Remove argument from
27022         __builtin_ia32_rdssp[d|q].
27023         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27024         ix86_expand_special_args_builtin for _rdssp[d|q].
27025         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27026         Clear register before usage.
27027         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27028         Add documentation for new _get_ssp and _inc_ssp intrinsics.
27030 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
27032         PR tree-optimization/84357
27033         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27034         operand 1 of an ARRAY_REF too.
27036 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
27038         PR target/83831
27039         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27040         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27041         declarations.
27042         (set_of_reg): New struct.
27043         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27044         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27045         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27046         functions.
27047         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27048         Split into bitclr, bitset, bitinvert patterns if appropriate.
27049         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27050         use rx_fuse_in_memory_bitop.
27051         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27052         to named insn, correct maximum insn length.
27054 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
27056         PR target/79242
27057         * machmode.def: Define a complex mode for PARTIAL_INT.
27058         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27059         MODE_PARTIAL_INT.
27060         * doc/rtl.texi: Document CSPImode.
27061         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27062         handling.
27063         (msp430_hard_regno_nregs_with_padding): Likewise.
27065 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
27067         PR target/84279
27068         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27070 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
27072         PR rtl-optimization/84169
27073         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
27074         we generated a parallel as new i3 and we split that to new i2 and i3
27075         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
27076         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
27077         those to i2, not i1.  Partially rewrite this scan code.
27079 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27081         PR c/82210
27082         * stor-layout.c (place_field): For variable length fields, adjust
27083         offset_align afterwards not just based on the field's alignment,
27084         but also on the size.
27086         PR middle-end/84309
27087         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27088         of exps and logs in the use_exp2 case.
27090 2018-02-13  Jeff Law  <law@redhat.com>
27092         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27093         entry for "vector".
27095         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27096         ARGS as unused.
27098 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
27100         PR debug/84342
27101         PR debug/84319
27102         * common.opt (gas-loc-support, gas-locview-support): New.
27103         (ginline-points, ginternal-reset-location-views): New.
27104         * doc/invoke.texi: Document them.  Use @itemx where intended.
27105         (gvariable-location-views): Adjust.
27106         * target.def (reset_location_view): New.
27107         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27108         (TARGET_RESET_LOCATION_VIEW): New.
27109         * doc/tm.texi: Rebuilt.
27110         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27111         (dwarf2out_default_as_locview_support): New.
27112         (output_asm_line_debug_info): Use option variables.
27113         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27114         (output_loc_list): Likewise.
27115         (add_high_low_attributes): Check option variables.
27116         Don't output entry view attribute in strict mode.
27117         (gen_inlined_subroutine_die): Check option variables.
27118         (dwarf2out_inline_entry): Likewise.
27119         (init_sections_and_labels): Likewise.
27120         (dwarf2out_early_finish): Likewise.
27121         (maybe_reset_location_view): New, from...
27122         (dwarf2out_var_location): ... here.  Call it.
27123         * debug.h (dwarf2out_default_as_loc_support): Declare.
27124         (dwarf2out_default_as_locview_support): Declare.
27125         * hooks.c (hook_int_rtx_insn_0): New.
27126         * hooks.h (hook_int_rtx_insn_0): Declare.
27127         * toplev.c (process_options): Take -gas-loc-support and
27128         -gas-locview-support from dwarf2out.  Enable
27129         -gvariable-location-views by default only with locview
27130         assembler support.  Enable -ginternal-reset-location-views by
27131         default only if the target defines the corresponding hook.
27132         Enable -ginline-points by default if location views are
27133         enabled; force it disabled if statement frontiers are
27134         disabled.
27135         * tree-inline.c (expand_call_inline): Check option variables.
27136         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27138 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
27140         PR tree-optimization/84321
27141         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27142         handling.  Also check whether the anti-range contains any values
27143         that satisfy the mask; switch to a VR_RANGE if not.
27145 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
27147         PR sanitizer/84340
27148         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27150 2018-02-13  Martin Jambor  <mjambor@suse.cz>
27152         PR c++/83990
27153         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27154         of call statements, also set location of a load to a temporary.
27156 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
27158         * config/rl78/rl78.c (add_vector_labels): New function.
27159         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27160         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27161         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27162         which checks that no arguments are passed.
27163         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27164         * doc/extend.texi: Documentation for the new attribute.
27166 2018-02-13  Andreas Schwab  <schwab@suse.de>
27168         * config/riscv/linux.h (CPP_SPEC): Define.
27170 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
27172         PR target/84335
27173         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27174         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27175         OPTION_MASK_ISA_AES as first argument to def_builtin_const
27176         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27177         instead of OPTION_MASK_ISA_PCLMUL as first argument to
27178         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27179         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27180         temporarily for AES and PCLMUL builtins.
27182         PR tree-optimization/84339
27183         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27184         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27185         Formatting fixes.
27187         PR middle-end/84309
27188         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27189         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27190         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27191         inline function.
27192         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27193         inline function.
27194         * omp-simd-clone.h: New file.
27195         * omp-simd-clone.c: Include omp-simd-clone.h.
27196         (expand_simd_clones): No longer static.
27197         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27198         cgraph.h and omp-simd-clone.h.
27199         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27200         (vect_recog_widen_shift_pattern): Formatting fix.
27201         (vect_pattern_recog_1): Don't check optab for calls.
27203         PR target/84336
27204         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27205         operands[2] into a REG before using gen_lowpart on it.
27207 2018-02-12  Jeff Law  <law@redhat.com>
27209         PR target/83760
27210         * config/sh/sh.c (find_barrier): Consider a sibling call
27211         a barrier as well.
27213         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
27214         successfully back substituting a reg.
27216 2018-02-12  Richard Biener  <rguenther@suse.de>
27218         PR tree-optimization/84037
27219         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
27220         parameter, move visited init to caller.
27221         (vect_slp_analyze_operations): Separate cost from validity
27222         check, initialize visited once for all instances.
27223         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
27224         for all instances.
27225         * tree-vect-stmts.c (vect_model_simple_cost): Make early
27226         out an assert.
27227         (vect_model_promotion_demotion_cost): Likewise.
27228         (vectorizable_bswap): Guard cost modeling with !slp_node
27229         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
27230         SLP stmts.
27231         (vectorizable_call): Likewise.
27232         (vectorizable_conversion): Likewise.
27233         (vectorizable_assignment): Likewise.
27234         (vectorizable_shift): Likewise.
27235         (vectorizable_operation): Likewise.
27236         (vectorizable_store): Likewise.
27237         (vectorizable_load): Likewise.
27238         (vectorizable_condition): Likewise.
27239         (vectorizable_comparison): Likewise.
27241 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
27243         PR sanitizer/84307
27244         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
27245         (ASAN_MARK): Fix fnspec to account for return value, change pointer
27246         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
27248 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
27250         PR middle-end/83665
27251         * params.def (inline-min-speedup): Increase from 8 to 15.
27252         (max-inline-insns-auto): Decrease from 40 to 30.
27253         * ipa-split.c (consider_split): Add some buffer for function to
27254         be considered inlining candidate.
27255         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
27256         default values.
27258 2018-02-12  Richard Biener  <rguenther@suse.de>
27260         PR tree-optimization/84037
27261         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
27262         matched stmts if we cannot swap the non-matched ones.
27264 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
27266         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
27267         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
27268         _mm_maskz_scalef_round_ss): New intrinsics.
27269         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
27270         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
27271         __builtin_ia32_scalefss_round): Remove.
27272         (__builtin_ia32_scalefsd_mask_round,
27273         __builtin_ia32_scalefss_mask_round): New intrinsics.
27274         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
27275         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
27276         ((match_operand:VF_128 2 "<round_nimm_predicate>"
27277         "<round_constraint>")): Changed to ...
27278         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
27279         "<round_scalar_constraint>")): ... this.
27280         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
27281         %0, %1, %2<round_op3>}"): Changed to ...
27282         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
27283         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
27284         %2<round_scalar_mask_op3>}"): ... this.
27285         * config/i386/subst.md (round_scalar_nimm_predicate): New.
27287 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
27289         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
27290         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
27291         (_mm_maskz_sqrt_round_ss): New intrinsics.
27292         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
27293         (__builtin_ia32_sqrtsd_mask_round)
27294         (__builtin_ia32_sqrtss_mask_round): New builtins.
27295         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
27296         (__builtin_ia32_sqrtss_round): Remove.
27297         (__builtin_ia32_sqrtsd_mask_round)
27298         (__builtin_ia32_sqrtss_mask_round): New builtins.
27299         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
27300         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
27301         ((match_operand:VF_128 1 "vector_operand"
27302         "xBm,<round_constraint>")): Changed to ...
27303         ((match_operand:VF_128 1 "vector_operand"
27304         "xBm,<round_scalar_constraint>")): ... this.
27305         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
27306         %0, %2, %<iptr>1<round_op3>}): Changed to ...
27307         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
27308         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
27309         %<iptr>1<round_scalar_mask_op3>}): ... this.
27310         ((set_attr "prefix" "<round_prefix>")): Changed to ...
27311         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
27313 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
27315         PR target/84266
27316         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
27317         Cast vec_cmpeq result to correct type.
27318         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
27319         Cast vec_cmpgt result to correct type.
27321 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
27323         * final.c (final_scan_insn_1): Renamed from...
27324         (final_scan_insn): ... this.  New wrapper, to recover
27325         seen from the outermost call in recursive ones.
27326         * config/sparc/sparc.c (output_return): Drop seen from call.
27327         (output_sibcall): Likewise.
27328         * config/visium/visium.c (output_branch): Likewise.
27330 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
27332         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
27333         function label.
27335 2018-02-10  Alan Modra  <amodra@gmail.com>
27337         PR target/84300
27338         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
27339         Specify LR as an input.
27341 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
27343         PR sanitizer/83987
27344         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
27345         remove_member_access_dummy_vars): New functions.
27346         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
27347         lower_omp_1, execute_lower_omp): Use them.
27349         PR rtl-optimization/84308
27350         * shrink-wrap.c (spread_components): Release todo vector.
27352 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
27354         PR rtl-optimization/57193
27355         * ira-color.c (struct allocno_color_data): Add member
27356         conflict_allocno_hard_prefs.
27357         (update_conflict_allocno_hard_prefs): New.
27358         (bucket_allocno_compare_func): Add a preference based on
27359         conflict_allocno_hard_prefs.
27360         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
27361         (color_allocnos): Remove a dead code.  Initiate
27362         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
27364 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
27366         PR target/84226
27367         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
27368         constraint from =wa to wa.  Avoid a subreg on the output operand,
27369         instead use a pseudo and subreg it in a move.
27370         (p9_xxbrd_<mode>): Changed to ...
27371         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
27372         (p9_xxbrd_v2df): New expander.
27373         (p9_xxbrw_<mode>): Changed to ...
27374         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
27375         (p9_xxbrw_v4sf): New expander.
27377 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
27379         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
27381 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
27383         PR target/83926
27384         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
27385         multiply in 32-bit mode.
27386         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
27387         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
27388         mode.
27390 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
27392         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
27393         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
27394         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
27395         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
27397 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
27399         PR lto/84213
27400         * dwarf2out.c (is_trivial_indirect_ref): New function.
27401         (dwarf2out_late_global_decl): Do not generate a location
27402         attribute for variables that have a non-trivial DECL_VALUE_EXPR
27403         and that are not defined in the current unit.
27405 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
27407         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
27408         instead of a libcall for UNORDERED.
27410 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
27412         PR target/82641
27413         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
27414         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
27416 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27418         PR target/PR84295
27419         * config/s390/s390.c (s390_set_current_function): Invoke
27420         s390_indirect_branch_settings also if fndecl didn't change.
27422 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
27424         * config/rs6000/rs6000.md (blockage): Set length to zero.
27426 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
27428         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
27430 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
27432         PR sanitizer/84285
27433         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
27434         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
27435         -static-lib*san.
27437         PR debug/84252
27438         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
27439         PARALLEL incoming that failed vt_get_decl_and_offset check.
27441         PR middle-end/84237
27442         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
27443         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
27444         TREE_READONLY bit.
27445         (get_variable_section): For decls in named .bss* sections pass true as
27446         second argument to bss_initializer_p.
27448 2018-02-09  Marek Polacek  <polacek@redhat.com>
27449             Jakub Jelinek  <jakub@redhat.com>
27451         PR c++/83659
27452         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
27453         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
27454         Sync some changes from cxx_fold_indirect_ref.
27456 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
27458         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
27459         markers.
27460         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
27461         (BLOCK_INLINE_ENTRY_LABEL): New.
27462         (dwarf2out_var_location): Disregard inline entry markers.
27463         (inline_entry_data): New struct.
27464         (inline_entry_data_hasher): New hashtable type.
27465         (inline_entry_data_hasher::hash): New.
27466         (inline_entry_data_hasher::equal): New.
27467         (inline_entry_data_table): New variable.
27468         (add_high_low_attributes): Add DW_AT_entry_pc and
27469         DW_AT_GNU_entry_view attributes if a pending entry is found
27470         in inline_entry_data_table.  Add old entry_pc attribute only
27471         if debug nonbinding markers are disabled.
27472         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
27473         markers are enabled.
27474         (block_within_block_p, dwarf2out_inline_entry): New.
27475         (dwarf2out_finish): Check that no entries remained in
27476         inline_entry_data_table.
27477         * final.c (reemit_insn_block_notes): Handle inline entry notes.
27478         (final_scan_insn, notice_source_line): Likewise.
27479         (rest_of_clean_state): Skip inline entry markers.
27480         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
27481         markers.
27482         * gimple.c (gimple_build_debug_inline_entry): New.
27483         * gimple.h (enum gimple_debug_subcode): Add
27484         GIMPLE_DEBUG_INLINE_ENTRY.
27485         (gimple_build_debug_inline_entry): Declare.
27486         (gimple_debug_inline_entry_p): New.
27487         (gimple_debug_nonbind_marker_p): Adjust.
27488         * insn-notes.def (INLINE_ENTRY): New.
27489         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
27490         inline entry marker notes.
27491         (print_insn): Likewise.
27492         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
27493         (INSN_DEBUG_MARKER_KIND): Likewise.
27494         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
27495         * tree-inline.c (expand_call_inline): Build and insert
27496         debug_inline_entry stmt.
27497         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
27498         inline entry blocks early, if nonbind markers are enabled.
27499         (dump_scope_block): Dump fragment info.
27500         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
27501         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
27502         (gimple_build_debug_inline_entry): New.
27503         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
27504         Enable/disable inline entry points too.
27505         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
27506         (DEBUG_INSN): Describe inline entry markers.
27508         * common.opt (gvariable-location-views): New.
27509         (gvariable-location-views=incompat5): New.
27510         * config.in: Rebuilt.
27511         * configure: Rebuilt.
27512         * configure.ac: Test assembler for view support.
27513         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
27514         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
27515         * dwarf2out.c (var_loc_view): New typedef.
27516         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
27517         (dwarf2out_locviews_in_attribute): New.
27518         (dwarf2out_locviews_in_loclist): New.
27519         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
27520         (enum dw_line_info_opcode): Add LI_adv_address.
27521         (struct dw_line_info_table): Add view.
27522         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
27523         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
27524         (zero_view_p): New variable.
27525         (ZERO_VIEW_P): New macro.
27526         (output_asm_line_debug_info): New.
27527         (struct var_loc_node): Add view.
27528         (add_AT_view_list, AT_loc_list): New.
27529         (add_var_loc_to_decl): Add view param.  Test it against last.
27530         (new_loc_list): Add view params.  Record them.
27531         (AT_loc_list_ptr): Handle loc and view lists.
27532         (view_list_to_loc_list_val_node): New.
27533         (print_dw_val): Handle dw_val_class_view_list.
27534         (size_of_die): Likewise.
27535         (value_format): Likewise.
27536         (loc_list_has_views): New.
27537         (gen_llsym): Set vl_symbol too.
27538         (maybe_gen_llsym, skip_loc_list_entry): New.
27539         (dwarf2out_maybe_output_loclist_view_pair): New.
27540         (output_loc_list): Output view list or entries too.
27541         (output_view_list_offset): New.
27542         (output_die): Handle dw_val_class_view_list.
27543         (output_dwarf_version): New.
27544         (output_compilation_unit_header): Use it.
27545         (output_skeleton_debug_sections): Likewise.
27546         (output_rnglists, output_line_info): Likewise.
27547         (output_pubnames, output_aranges): Update version comments.
27548         (output_one_line_info_table): Output view numbers in asm comments.
27549         (dw_loc_list): Determine current endview, pass it to new_loc_list.
27550         Call maybe_gen_llsym.
27551         (loc_list_from_tree_1): Adjust.
27552         (add_AT_location_description): Create view list attribute if
27553         needed, check it's absent otherwise.
27554         (convert_cfa_to_fb_loc_list): Adjust.
27555         (maybe_emit_file): Call output_asm_line_debug_info for test.
27556         (dwarf2out_var_location): Reset views as needed.  Precompute
27557         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
27558         attribute.  Set view.
27559         (new_line_info_table): Reset next view.
27560         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
27561         (dwarf2out_source_line): Likewise.  Output view resets and labels to
27562         the assembler, or select appropriate line info opcodes.
27563         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
27564         (optimize_string_length): Catch it.  Adjust.
27565         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
27566         dw_val_class_view_list, and remove it if no longer needed.
27567         (hash_loc_list): Hash view numbers.
27568         (loc_list_hasher::equal): Compare them.
27569         (optimize_location_lists): Check whether a view list symbol is
27570         needed, and whether the locview attribute is present, and
27571         whether they match.  Remove the locview attribute if no longer
27572         needed.
27573         (index_location_lists): Call skip_loc_list_entry for test.
27574         (dwarf2out_finish): Call output_asm_line_debug_info for test.
27575         Use output_dwarf_version.
27576         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
27577         (struct dw_val_node): Add val_view_list.
27578         * final.c (SEEN_NEXT_VIEW): New.
27579         (set_next_view_needed): New.
27580         (clear_next_view_needed): New.
27581         (maybe_output_next_view): New.
27582         (final_start_function): Rename to...
27583         (final_start_function_1): ... this.  Take pointer to FIRST,
27584         add SEEN parameter.  Emit param bindings in the initial view.
27585         (final_start_function): Reintroduce SEEN-less interface.
27586         (final): Rename to...
27587         (final_1): ... this.  Take SEEN parameter.  Output final pending
27588         next view at the end.
27589         (final): Reintroduce seen-less interface.
27590         (final_scan_insn): Output pending next view before switching
27591         sections or ending a block.  Mark the next view as needed when
27592         outputting variable locations.  Notify debug backend of section
27593         changes, and of location view changes.
27594         (rest_of_handle_final): Adjust.
27595         * toplev.c (process_options): Autodetect value for debug variable
27596         location views option.  Warn on incompat5 without -gdwarf-5.
27597         * doc/invoke.texi (gvariable-location-views): New.
27598         (gvariable-location-views=incompat5): New.
27599         (gno-variable-location-views): New.
27601 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
27603         PR tree-optimization/84136
27604         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
27605         that the result of find_edge is non-NULL.
27607 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
27609         PR target/83008
27610         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
27611         storing integer register in SImode.  Fix cost of 256 and 512
27612         byte aligned SSE register store.
27614 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
27616         * config/i386/i386.c (ix86_multiplication_cost): Fix
27617         multiplication cost for TARGET_AVX512DQ.
27619 2018-02-08  Marek Polacek  <polacek@redhat.com>
27621         PR tree-optimization/84238
27622         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
27623         get_range_strlen.
27625 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27627         PR tree-optimization/84265
27628         * tree-vect-stmts.c (vectorizable_store): Don't treat
27629         VMAT_CONTIGUOUS accesses as grouped.
27630         (vectorizable_load): Likewise.
27632 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27634         PR tree-optimization/81635
27635         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
27636         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
27637         (test_round_for_mask): New functions.
27638         (wide_int_cc_tests): Call test_round_for_mask.
27639         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
27640         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
27641         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
27642         range returned by get_range_info.
27644 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
27646         PR ipa/81360
27647         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
27648         * symtab.c: Include builtins.h
27649         (symtab_node::output_to_lto_symbol_table_p): Move here
27650         from lto-streamer-out.c:output_symbol_p.
27651         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
27652         (output_symbol_p): Move all logic to symtab.c
27653         (produce_symtab): Update.
27655 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27657         * config/s390/s390-opts.h (enum indirect_branch): Define.
27658         * config/s390/s390-protos.h (s390_return_addr_from_memory)
27659         (s390_indirect_branch_via_thunk)
27660         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
27661         (enum s390_indirect_branch_type): Define.
27662         * config/s390/s390.c (struct s390_frame_layout, struct
27663         machine_function): Remove.
27664         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
27665         (indirect_branch_table_label_no, indirect_branch_table_name):
27666         Define variables.
27667         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
27668         (enum s390_indirect_branch_option): Define.
27669         (s390_return_addr_from_memory): New function.
27670         (s390_handle_string_attribute): New function.
27671         (s390_attribute_table): Add new attribute handler.
27672         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
27673         (s390_indirect_branch_via_thunk): New function.
27674         (s390_indirect_branch_via_inline_thunk): New function.
27675         (s390_function_ok_for_sibcall): When jumping via thunk disallow
27676         sibling call optimization for non z10 compiles.
27677         (s390_emit_call): Force indirect branch target to be a single
27678         register.  Add r1 clobber for non-z10 compiles.
27679         (s390_emit_epilogue): Emit return jump via return_use expander.
27680         (s390_reorg): Handle JUMP_INSNs as execute targets.
27681         (s390_option_override_internal): Perform validity checks for the
27682         new command line options.
27683         (s390_indirect_branch_attrvalue): New function.
27684         (s390_indirect_branch_settings): New function.
27685         (s390_set_current_function): Invoke s390_indirect_branch_settings.
27686         (s390_output_indirect_thunk_function):  New function.
27687         (s390_code_end): Implement target hook.
27688         (s390_case_values_threshold): Implement target hook.
27689         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
27690         macros.
27691         * config/s390/s390.h (struct s390_frame_layout)
27692         (struct machine_function): Move here from s390.c.
27693         (TARGET_INDIRECT_BRANCH_NOBP_RET)
27694         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
27695         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
27696         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
27697         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
27698         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
27699         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
27700         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
27701         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
27702         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
27703         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
27704         (mnemonic attribute): Add values which aren't recognized
27705         automatically.
27706         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
27707         pattern for branch conversion.  Fix mnemonic attribute.
27708         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
27709         indirect branch via thunk if requested.
27710         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
27711         ("*indirect_jump"): Disable for branch conversion using out of
27712         line thunks.
27713         ("indirect_jump_via_thunk<mode>_z10")
27714         ("indirect_jump_via_thunk<mode>")
27715         ("indirect_jump_via_inlinethunk<mode>_z10")
27716         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
27717         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
27718         ("casesi_jump_via_inlinethunk<mode>_z10")
27719         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
27720         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
27721         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
27722         ("*indirect2_jump"): Disable for branch conversion.
27723         ("casesi_jump"): Turn into expander and expand patterns for branch
27724         conversion.
27725         ("return_use"): New expander.
27726         ("*return"): Emit return via thunk and rename it to ...
27727         ("*return<mode>"): ... this one.
27728         * config/s390/s390.opt: Add new options and and enum for the
27729         option values.
27731 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27733         * lra-constraints.c (match_reload): Unconditionally use
27734         gen_lowpart_SUBREG, rather than selecting between that
27735         and equivalent gen_rtx_SUBREG code.
27737 2018-02-08  Richard Biener  <rguenther@suse.de>
27739         PR tree-optimization/84233
27740         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
27741         changed flag instead of boguously re-using phi_inserted.
27743 2018-02-08  Martin Jambor  <mjambor@suse.cz>
27745         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
27746         static local variables.
27748 2018-02-08  Richard Biener  <rguenther@suse.de>
27750         PR tree-optimization/84278
27751         * tree-vect-stmts.c (vectorizable_store): When looking for
27752         smaller vector types to perform grouped strided loads/stores
27753         make sure the mode is supported by the target.
27754         (vectorizable_load): Likewise.
27756 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
27758         * config/aarch64/aarch64.c (aarch64_components_for_bb):
27759         Increase LDP/STP opportunities by adding adjacent callee-saves.
27761 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
27763         PR rtl-optimization/84068
27764         PR rtl-optimization/83459
27765         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
27767 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
27769         PR tree-optimization/84224
27770         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
27771         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
27772         non-zero arguments.
27774 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
27776         PR target/84113
27777         * config/rs6000/altivec.md (*restore_world): Remove LR use.
27778         * config/rs6000/predicates.md (restore_world_operation): Adjust op
27779         count, remove one USE.
27781 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
27783         * doc/install.texi (Configuration): Document the
27784         --with-long-double-format={ibm,ieee} PowerPC configuration
27785         options.
27787         PR target/84154
27788         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27789         Convert from define_expand to be define_insn_and_split.  Rework
27790         float/double/_Float128 conversions to QI/HI/SImode to work with
27791         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
27792         conversions to QI/HImode types did a store and then a load to
27793         truncate the value.  For conversions to VSX registers, don't split
27794         the insn, instead emit the code directly.  Use the code iterator
27795         any_fix to combine signed and unsigned conversions.
27796         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27797         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27798         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27799         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27800         (fix_<mode>di2_hw): Likewise.
27801         (fixuns_<mode>di2_hw): Likewise.
27802         (fix_<mode>si2_hw): Likewise.
27803         (fixuns_<mode>si2_hw): Likewise.
27804         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27805         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27806         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27807         fix<uns>_trunc<SFDF:mode>si2_p8.
27808         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27809         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27810         (fix<uns>_<mode>_mem): Likewise.
27811         (fctiw<u>z_<mode>_mem): Likewise.
27812         (fix<uns>_<mode>_mem): Likewise.
27813         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27814         the register allocator from doing a direct move to the GPRs to do
27815         a store, and instead use the ISA 3.0 store byte/half-word from
27816         vector register instruction.  For IEEE 128-bit floating point,
27817         also optimize stores of 32-bit ints.
27818         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27820 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
27822         * genextract.c (push_pathstr_operand): New function to support
27823         [a-zA-Z].
27824         (walk_rtx): Call push_pathstr_operand.
27825         (print_path): Support [a-zA-Z].
27827 2018-02-07  Richard Biener  <rguenther@suse.de>
27829         PR tree-optimization/84037
27830         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27831         (cse_and_gimplify_to_preheader): Declare.
27832         (vect_get_place_in_interleaving_chain): Likewise.
27833         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27834         ivexpr_map.
27835         (_loop_vec_info::~_loop_vec_info): Delete it.
27836         (cse_and_gimplify_to_preheader): New function.
27837         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27838         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27839         (vectorizable_load): Likewise.  For grouped stores always base
27840         the IV on the first element.
27841         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27842         condition before gimplifying.
27844 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
27846         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27847         *DIV_EXPR and *MOD_EXPR.
27849 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
27851         PR target/84248
27852         * config/i386/i386.c (ix86_option_override_internal): Mask out
27853         the CF_SET bit when checking -fcf-protection.
27855 2018-02-07  Tom de Vries  <tom@codesourcery.com>
27857         PR libgomp/84217
27858         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27859         enough.
27861 2018-02-07  Richard Biener  <rguenther@suse.de>
27863         PR tree-optimization/84204
27864         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27865         this place.
27867         PR tree-optimization/84205
27868         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27869         special-case isl_ast_op_zdiv_r.
27871         PR tree-optimization/84223
27872         * graphite-scop-detection.c (gather_bbs::before_dom_children):
27873         Only add conditions from within the region.
27874         (gather_bbs::after_dom_children): Adjust.
27876 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
27878         PR target/84209
27879         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
27880         * config/avr/avr.md: Only post-reload split REG-REG moves if
27881         either register is GENERAL_REG_P.
27883 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
27885         PR tree-optimization/84235
27886         * tree-ssa-scopedtables.c
27887         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
27888         if the subtraction is performed in floating point type where NaNs are
27889         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
27890         build 1.  Formatting fix.
27892 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
27894         PR target/84146
27895         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
27896         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
27897         and skip it regardless of bb boundaries.  Use CALL_P macro,
27898         don't test INSN_P (insn) together with CALL_P or JUMP_P check
27899         unnecessarily, formatting fix.
27901 2018-02-06  Michael Collison  <michael.collison@arm.com>
27903         * config/arm/thumb2.md:
27904         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
27905         (*thumb_mov_notscc): Ditto.
27907 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
27909         PR target/84154
27910         * config/rs6000/rs6000.md (su code attribute): Use "u" for
27911         unsigned_fix, not "s".
27913 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27915         * configure.ac (gcc_fn_eh_frame_ro): New function.
27916         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
27917         correct .eh_frame permissions.
27918         * configure: Regenerate.
27920 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
27922         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
27923         irrelevant options.
27925 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27927         * config/rs6000/rs6000.c (rs6000_option_override_internal):
27928         Display warning message for -mno-speculate-indirect-jumps.
27930 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
27932         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
27933         Undocumented.
27934         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
27936 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
27938         PR tree-optimization/84225
27939         * tree-eh.c (find_trapping_overflow): Only call
27940         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
27942 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27944         PR target/84145
27945         * config/i386/i386.c: Reimplement the check of possible options
27946         -mibt/-mshstk conbination. Change error messages.
27947         * doc/invoke.texi: Fix a typo: remove extra '='.
27949 2018-02-06  Marek Polacek  <polacek@redhat.com>
27951         PR tree-optimization/84228
27952         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
27954 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
27956         PR target/82641
27957         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
27958         emitted arch directives.
27959         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
27960         __ARM_FEATURE_COPROC before changing architectures.
27962 2018-02-06  Richard Biener  <rguenther@suse.de>
27964         * config/i386/i386.c (print_reg): Fix typo.
27965         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
27967 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
27969         * configure: Regenerate.
27971 2018-02-05  Martin Sebor  <msebor@redhat.com>
27973         PR tree-optimization/83369
27974         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
27975         inlining context.
27977 2018-02-05  Martin Liska  <mliska@suse.cz>
27979         * doc/invoke.texi: Cherry-pick upstream r323995.
27981 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
27983         * ira.c (ira_init_register_move_cost): Adjust comment.
27985 2018-02-05  Martin Liska  <mliska@suse.cz>
27987         PR gcov-profile/84137
27988         * doc/gcov.texi: Fix typo in documentation.
27990 2018-02-05  Martin Liska  <mliska@suse.cz>
27992         PR gcov-profile/83879
27993         * doc/gcov.texi: Document necessity of --dynamic-list-data when
27994         using dlopen functionality.
27996 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
27998         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
27999         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28000         _mm_maskz_range_ss, _mm_mask_range_round_ss,
28001         _mm_maskz_range_round_ss): New intrinsics.
28002         (__builtin_ia32_rangesd128_round)
28003         (__builtin_ia32_rangess128_round): Remove.
28004         (__builtin_ia32_rangesd128_mask_round,
28005         __builtin_ia32_rangess128_mask_round): New builtins.
28006         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28007         __builtin_ia32_rangess128_round): Remove.
28008         (__builtin_ia32_rangesd128_mask_round,
28009         __builtin_ia32_rangess128_mask_round): New builtins.
28010         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28011         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28012         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28013         "<round_saeonly_constraint>")): Changed to ...
28014         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28015         "<round_saeonly_scalar_constraint>")): ... this.
28016         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28017         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28018         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28019         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28020         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28022 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
28024         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28025         options.
28026         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28027         Remove all values except native, 8540 and 8548.
28029 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
28031         * config/i386/i386.c (ix86_output_function_return): Pass
28032         INVALID_REGNUM, instead of -1, as invalid register number to
28033         indirect_thunk_name and output_indirect_thunk.
28035 2018-02-02  Julia Koval  <julia.koval@intel.com>
28037         * config.gcc: Add -march=icelake.
28038         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28039         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28040         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28041         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28042         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28043         (processor_target_table): Add icelake.
28044         (ix86_option_override_internal): Handle new PTAs.
28045         (get_builtin_code_for_version): Handle icelake.
28046         (M_INTEL_COREI7_ICELAKE): New.
28047         (fold_builtin_cpu): Handle icelake.
28048         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28049         * doc/invoke.texi: Add -march=icelake.
28051 2018-02-02  Julia Koval  <julia.koval@intel.com>
28053         * config/i386/i386.c (ix86_option_override_internal): Change flags type
28054         to wide_int_bitmask.
28055         * wide-int-bitmask.h: New.
28057 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
28059         PR target/84066
28060         * config/i386/i386.md: Replace Pmode with word_mode in
28061         builtin_setjmp_setup and builtin_longjmp to support x32.
28063 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
28065         PR target/56010
28066         PR target/83743
28067         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28068         #include "opts.h".
28069         (rs6000_supported_cpu_names): New static variable.
28070         (linux_cpu_translation_table): Likewise.
28071         (elf_platform) <cpu>: Define new static variable and use it.
28072         Translate kernel AT_PLATFORM name to canonical name if needed.
28073         Error if platform name is unknown.
28075 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
28077         PR target/84089
28078         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28080 2018-02-01  Jeff Law  <law@redhat.com>
28082         PR target/84128
28083         * config/i386/i386.c (release_scratch_register_on_entry): Add new
28084         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
28085         the scratch if RELEASE_VIA_POP is false.
28086         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28087         If we have to save a temporary register, decrement SIZE appropriately.
28088         Pass new arguments to release_scratch_register_on_entry.
28089         (ix86_adjust_stack_and_probe): Likewise.
28090         (ix86_emit_probe_stack_range): Pass new arguments to
28091         release_scratch_register_on_entry.
28093 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
28095         PR rtl-optimization/84157
28096         * combine.c (change_zero_ext): Use REG_P predicate in
28097         front of HARD_REGISTER_P predicate.
28099 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
28101         * config/avr/avr.c (avr_option_override): Move disabling of
28102         -fdelete-null-pointer-checks to...
28103         * common/config/avr/avr-common.c (avr_option_optimization_table):
28104         ...here.
28106 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28108         PR tree-optimization/81635
28109         * tree-data-ref.c (split_constant_offset_1): For types that
28110         wrap on overflow, try to use range info to prove that wrapping
28111         cannot occur.
28113 2018-02-01  Renlin Li  <renlin.li@arm.com>
28115         PR target/83370
28116         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28117         TAILCALL_ADDR_REGS.
28118         (aarch64_register_move_cost): Likewise.
28119         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28120         TAILCALL_ADDR_REGS.
28121         (REG_CLASS_NAMES): Likewise.
28122         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28123         TAILCALL_ADDR_REGS. Remove IP registers.
28124         * config/aarch64/aarch64.md (Ucs): Update register constraint.
28126 2018-02-01  Richard Biener  <rguenther@suse.de>
28128         * domwalk.h (dom_walker::dom_walker): Add additional constructor
28129         for specifying RPO order and allow NULL for that.
28130         * domwalk.c (dom_walker::dom_walker): Likewise.
28131         (dom_walker::walk): Handle NULL RPO order.
28132         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28133         in RPO order.
28134         (rewrite_update_dom_walker): Likewise.
28135         (mark_def_dom_walker): Likewise.
28137 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28139         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28140         (aarch64_maybe_expand_sve_subreg_move): Declare.
28141         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28142         * config/aarch64/predicates.md (aarch64_any_register_operand): New
28143         predicate.
28144         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28145         that are semantically a reverse operation.
28146         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28147         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28148         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28149         functions.
28150         (aarch64_can_change_mode_class): For big-endian, forbid changes
28151         between two SVE modes if they have different element sizes.
28153 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28155         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28156         the TImode handling for big-endian targets.
28158 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28160         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28161         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
28162         not just bytes.
28163         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28164         Remove BSWAP handing for big-endian targets and use the form of
28165         LD1RQ appropariate for the mode.
28167 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28169         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28170         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28171         duplicated element.
28173 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
28175         PR tearget/83845
28176         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28177         check for operands that need to go through aarch64_sve_reload_be.
28179 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
28181         PR tree-optimization/81661
28182         PR tree-optimization/84117
28183         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28184         * tree-eh.c: Include gimplify.h.
28185         (find_trapping_overflow, replace_trapping_overflow,
28186         rewrite_to_non_trapping_overflow): New functions.
28187         * tree-vect-loop.c: Include tree-eh.h.
28188         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28189         * tree-data-ref.c: Include tree-eh.h.
28190         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28192 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
28194         PR rtl-optimization/84123
28195         * combine.c (change_zero_ext): Check if hard register satisfies
28196         can_change_dest_mode before calling gen_lowpart_SUBREG.
28198 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
28200         PR target/82444
28201         * ira.c (ira_init_register_move_cost): Remove assert.
28203 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28205         PR rtl-optimization/84071
28206         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28207         * doc/tm.texi: Regenerate.
28209 2018-01-31  Richard Biener  <rguenther@suse.de>
28211         PR tree-optimization/84132
28212         * tree-data-ref.c (analyze_miv_subscript): Properly
28213         check whether evolution_function_is_affine_multivariate_p
28214         before calling gcd_of_steps_may_divide_p.
28216 2018-01-31  Julia Koval  <julia.koval@intel.com>
28218         PR target/83618
28219         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28220         * config/i386/i386.md (rdpid_rex64) New.
28221         (rdpid): Make 32bit only.
28223 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
28225         PR lto/84105
28226         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
28227         an IDENTIFIER_NODE for FUNCTION_TYPE's.
28229 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28231         Revert
28232         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28234         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28236 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
28238         PR rtl-optimization/84071
28239         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
28240         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
28242 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
28244         * config/arc/arc.c (arc_handle_aux_attribute): New function.
28245         (arc_attribute_table): Add 'aux' attribute.
28246         (arc_in_small_data_p): Consider aux like variables.
28247         (arc_is_aux_reg_p): New function.
28248         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
28249         (arc_get_aux_arg): New function.
28250         (prepare_move_operands): Handle aux-register access.
28251         (arc_handle_aux_attribute): New function.
28252         * doc/extend.texi (ARC Variable attributes): Add subsection.
28254 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
28256         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
28257         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
28258         (arc_attribute_table): Add 'uncached' attribute.
28259         (arc_print_operand): Print '.di' flag for uncached memory
28260         accesses.
28261         (arc_in_small_data_p): Do not consider for small data the uncached
28262         types.
28263         (arc_is_uncached_mem_p): New function.
28264         * config/arc/predicates.md (compact_store_memory_operand): Check
28265         for uncached memory accesses.
28266         (nonvol_nonimm_operand): Likewise.
28267         * doc/extend.texi (ARC Type Attribute): New subsection.
28269 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
28271         PR c/84100
28272         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
28273         falign-loops=): Add Optimization flag.
28275 2018-01-30  Jeff Law  <law@redhat.com>
28277         PR target/84064
28278         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
28279         INT_REGISTERS_SAVED.  Check it prior to calling
28280         get_scratch_register_on_entry.
28281         (ix86_adjust_stack_and_probe): Similarly.
28282         (ix86_emit_probe_stack_range): Similarly.
28283         (ix86_expand_prologue): Corresponding changes.
28285 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28287         PR target/40411
28288         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
28289         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
28291 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
28293         PR target/84112
28294         * lra-constraints.c (curr_insn_transform): Process AND in the
28295         address.
28297 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
28299         PR rtl-optimization/83986
28300         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
28301         dependence against last_pending_memory_flush in addition to
28302         pending_jump_insns.
28304 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
28306         PR tree-optimization/81611
28307         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
28308         copies.
28310 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
28312         PR target/83758
28313         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
28314         a reg rtx.
28316 2018-01-30  Richard Biener  <rguenther@suse.de>
28317             Jakub Jelinek  <jakub@redhat.com>
28319         PR tree-optimization/84111
28320         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
28321         inner loops added during recursion, as they don't have up-to-date
28322         SSA form.
28324 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
28326         PR ipa/81360
28327         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
28328         (can_inline_edge_by_limits_p): ... here.
28329         (can_early_inline_edge_p, check_callers,
28330         update_caller_keys, update_callee_keys, recursive_inlining,
28331         add_new_edges_to_heap, speculation_useful_p,
28332         inline_small_functions,
28333         inline_small_functions, flatten_function,
28334         inline_to_all_callers_1): Update.
28336 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
28338         * profile-count.c (profile_count::combine_with_ipa_count): Handle
28339         zeros correctly.
28341 2018-01-30  Richard Biener  <rguenther@suse.de>
28343         PR tree-optimization/83008
28344         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
28345         invariant and constant vector uses in stmts when they need
28346         more than one stmt.
28348 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28350         PR bootstrap/84017
28351         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
28352         * configure: Regenerate.
28354 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
28356         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
28357         pattern.
28358         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
28359         Use gen_rtx_REG rather than gen_lowpart.
28361 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
28363         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
28364         rather than 0 when creating partial subregs.
28366 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
28368         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
28369         of usage.
28371 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
28373         PR target/81550
28374         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
28375         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
28376         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
28377         flags.  This restores the settings used before the 2017-07-24.
28378         Turning off pre increment/decrement/modify allows IVOPTS to
28379         optimize DF/SF loops where the index is an int.
28381 2018-01-29  Richard Biener  <rguenther@suse.de>
28382             Kelvin Nilsen  <kelvin@gcc.gnu.org>
28384         PR bootstrap/80867
28385         * tree-vect-stmts.c (vectorizable_call): Don't call
28386         targetm.vectorize_builtin_md_vectorized_function if callee is
28387         NULL.
28389 2018-01-22  Carl Love  <cel@us.ibm.com>
28391         * doc/extend.tex: Fix typo in second arg in
28392         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
28394 2018-01-29  Richard Biener  <rguenther@suse.de>
28396         PR tree-optimization/84086
28397         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
28398         (flush_ssaname_freelist): When SSA names were released reset
28399         the SCEV hash table.
28401 2018-01-29  Richard Biener  <rguenther@suse.de>
28403         PR tree-optimization/84057
28404         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
28405         removed paths when removing edges.
28407 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
28409         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
28410         -mfunction-return=@var{choice}.
28412 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28414         PR diagnostic/84034
28415         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
28416         Handle CR like TAB.
28417         (layout::print_source_line): Likewise.
28418         (test_get_line_width_without_trailing_whitespace): Add test cases.
28420 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
28422         PR middle-end/84040
28423         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
28424         debug insns.
28426 2018-01-26  Jim Wilson  <jimw@sifive.com>
28428         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
28430         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
28431         specified.
28433 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28435         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
28436         and CMP + SUB-immediate -> SUBS.
28438 2018-01-26  Martin Sebor  <msebor@redhat.com>
28440         PR tree-optimization/83896
28441         * tree-ssa-strlen.c (get_string_len): Rename...
28442         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
28443         Avoid assuming length is constant.
28444         (handle_char_store): Use HOST_WIDE_INT for string length.
28446 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
28448         PR target/81763
28449         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
28450         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
28452 2018-01-26  Richard Biener  <rguenther@suse.de>
28454         PR rtl-optimization/84003
28455         * dse.c (record_store): Only record redundant stores when
28456         the earlier store aliases at least all accesses the later one does.
28458 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
28460         PR rtl-optimization/83985
28461         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
28462         REG_CFA_RESTORE insns.
28463         (delete_unmarked_insns): Don't ignore separate shrink wrapping
28464         REG_CFA_RESTORE insns here.
28466         PR c/83989
28467         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
28468         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
28470 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28472         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
28473         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
28474         (arc_init): Likewise.
28475         (arc_override_options): Likewise.
28476         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
28477         value.
28478         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
28479         support.
28480         * config/arc/arc.h (TARGET_DBNZ): Define.
28481         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
28482         properly set the tune attribute.
28483         (dbnz): Use TARGET_DBNZ guard.
28484         * config/arc/arc.opt (mtune): Add core3 option.
28486 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28488         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
28489         recognize new pic like addresses.
28490         (arc_delegitimize_address): Clean up.
28492 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28494         * config/arc/arc-arches.def: Option mrf16 valid for all
28495         architectures.
28496         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
28497         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
28498         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
28499         * config/arc/arc-tables.opt: Regenerate.
28500         * config/arc/arc.c (arc_conditional_register_usage): Handle
28501         reduced register file case.
28502         (arc_file_start): Set must have build attributes.
28503         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
28504         mrf16 option value.
28505         * config/arc/arc.opt (mrf16): Add new option.
28506         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
28507         * config/arc/genmultilib.awk: Handle new mrf16 option.
28508         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
28509         * config/arc/t-multilib: Regenerate.
28510         * doc/invoke.texi (ARC Options): Document mrf16 option.
28512 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28514         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
28515         * config/arc/arc.c (arc_handle_secure_attribute): New function.
28516         (arc_attribute_table): Add 'secure_call' attribute.
28517         (arc_print_operand): Print secure call operand.
28518         (arc_function_ok_for_sibcall): Don't optimize tail calls when
28519         secure.
28520         (arc_is_secure_call_p): New function.  * config/arc/arc.md
28521         (call_i): Add support for sjli instruction.
28522         (call_value_i): Likewise.
28523         * config/arc/constraints.md (Csc): New constraint.
28525 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
28526             John Eric Martin  <John.Martin@emmicro-us.com>
28528         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
28529         * config/arc/arc.c (_arc_jli_section): New struct.
28530         (arc_jli_section): New type.
28531         (rc_jli_sections): New static variable.
28532         (arc_handle_jli_attribute): New function.
28533         (arc_attribute_table): Add jli_always and jli_fixed attribute.
28534         (arc_file_end): New function.
28535         (TARGET_ASM_FILE_END): Define.
28536         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
28537         (arc_add_jli_section): New function.
28538         (jli_call_scan): Likewise.
28539         (arc_reorg): Call jli_call_scan.
28540         (arc_output_addsi): Remove 'S' from printing asm operand.
28541         (arc_is_jli_call_p): New function.
28542         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
28543         operand.
28544         (movhi_insn): Likewise.
28545         (movsi_insn): Likewise.
28546         (movsi_set_cc_insn): Likewise.
28547         (loadqi_update): Likewise.
28548         (load_zeroextendqisi_update): Likewise.
28549         (load_signextendqisi_update): Likewise.
28550         (loadhi_update): Likewise.
28551         (load_zeroextendhisi_update): Likewise.
28552         (load_signextendhisi_update): Likewise.
28553         (loadsi_update): Likewise.
28554         (loadsf_update): Likewise.
28555         (movsicc_insn): Likewise.
28556         (bset_insn): Likewise.
28557         (bxor_insn): Likewise.
28558         (bclr_insn): Likewise.
28559         (bmsk_insn): Likewise.
28560         (bicsi3_insn): Likewise.
28561         (cmpsi_cc_c_insn): Likewise.
28562         (movsi_ne): Likewise.
28563         (movsi_cond_exec): Likewise.
28564         (clrsbsi2): Likewise.
28565         (norm_f): Likewise.
28566         (normw): Likewise.
28567         (swap): Likewise.
28568         (divaw): Likewise.
28569         (flag): Likewise.
28570         (sr): Likewise.
28571         (kflag): Likewise.
28572         (ffs): Likewise.
28573         (ffs_f): Likewise.
28574         (fls): Likewise.
28575         (call_i): Remove 'S' asm letter, add jli instruction.
28576         (call_value_i): Likewise.
28577         * config/arc/arc.op (mjli-always): New option.
28578         * config/arc/constraints.md (Cji): New constraint.
28579         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
28580         operand.
28581         (subsf3_fpx): Likewise.
28582         (mulsf3_fpx): Likewise.
28583         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
28584         asm operand.
28585         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
28586         function attrbutes.
28587         * doc/invoke.texi (ARC): Document mjli-always option.
28589 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
28591         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
28592         avoid addition with 0 and use incw and decw where possible.
28594 2018-01-26  Richard Biener  <rguenther@suse.de>
28596         PR tree-optimization/81082
28597         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
28598         association if it requires casting to unsigned.
28599         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
28600         from fold_plusminus_mult_expr to catch important cases late when
28601         range info is available.
28603 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28605         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
28606         * configure.ac (hidden_linkonce): New test.
28607         * configure: Regenerate.
28608         * config.in: Regenerate.
28610 2018-01-26  Julia Koval  <julia.koval@intel.com>
28612         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
28613         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
28614         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
28615         _mm_mask_bitshuffle_epi64_mask): Fix type.
28616         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
28617         USI_FTYPE_V4DI_V4DI_USI): Remove.
28618         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
28619         __builtin_ia32_vpshufbitqmb256_mask,
28620         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
28621         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
28622         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
28624 2018-01-26  Alan Modra  <amodra@gmail.com>
28626         PR target/84033
28627         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
28628         UNSPEC_VBPERMQ.  Sort other unspecs.
28630 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
28632         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
28634 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
28636         PR middle-end/83055
28637         * predict.c (drop_profile): Do not push/pop cfun; update also
28638         node->count.
28639         (handle_missing_profiles): Fix logic looking for zero profiles.
28641 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
28643         PR middle-end/83977
28644         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
28645         on functions with #pragma omp declare simd or functions with simd
28646         attribute.
28647         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
28648         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
28649         Remove trailing \n from warning_at calls.
28651 2018-01-25  Tom de Vries  <tom@codesourcery.com>
28653         PR target/84028
28654         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28655         for neutered workers.
28657 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
28659         PR target/68467
28660         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
28661         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
28663 2018-01-24  Jeff Law  <law@redhat.com>
28665         PR target/83994
28666         * i386.c (get_probe_interval): Move to earlier point.
28667         (ix86_compute_frame_layout): If -fstack-clash-protection and
28668         the frame is larger than the probe interval, then use pushes
28669         to save registers rather than reg->mem moves.
28670         (ix86_expand_prologue): Remove conditional for int_registers_saved
28671         assertion.
28673 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
28675         PR target/84014
28676         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
28677         min/max for never referenced object.
28679 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
28681         PR middle-end/83977
28682         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
28683         here.
28684         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
28685         attributes from DECL_ATTRIBUTES (decl) without affecting
28686         DECL_ATTRIBUTES (current_function_decl).
28687         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
28688         functions with non-NULL DECL_ABSTRACT_ORIGIN.
28690 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
28692         PR tree-optimization/83979
28693         * fold-const.c (fold_comparison): Use constant_boolean_node
28694         instead of boolean_{true,false}_node.
28696 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
28698         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
28699         with zero counts.
28701 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28703         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28704         Simplify the clause that sets the length attribute.
28705         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28706         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
28707         clause that sets the length attribute.
28708         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28710 2018-01-24  Tom de Vries  <tom@codesourcery.com>
28712         PR target/83589
28713         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
28714         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
28715         Add strict parameter.
28716         (prevent_branch_around_nothing): Insert dummy insn between branch to
28717         label and label with no ptx insn inbetween.
28718         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
28720 2018-01-24  Tom de Vries  <tom@codesourcery.com>
28722         PR target/81352
28723         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28724         for neutered threads in warp.
28725         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
28727 2018-01-24  Richard Biener  <rguenther@suse.de>
28729         PR tree-optimization/83176
28730         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
28731         operands.
28733 2018-01-24  Richard Biener  <rguenther@suse.de>
28735         PR tree-optimization/82819
28736         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
28737         code generating pluses that are no-ops in the target precision.
28739 2018-01-24  Richard Biener  <rguenther@suse.de>
28741         PR middle-end/84000
28742         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
28744 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28746         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
28747         to merge probabilities.
28748         * predict.c (probably_never_executed): Also mark as cold functions
28749         with global 0 profile and guessed local profile.
28750         * profile-count.c (profile_probability::combine_with_count): New
28751         member function.
28752         * profile-count.h (profile_probability::operator*,
28753         profile_probability::operator*=, profile_probability::operator/,
28754         profile_probability::operator/=): Reduce precision to adjusted
28755         and set value to guessed on contradictory divisions.
28756         (profile_probability::combine_with_freq): Remove.
28757         (profile_probability::combine_wiht_count): Declare.
28758         (profile_count::force_nonzero):: Set to adjusted.
28759         (profile_count::probability_in):: Set quality to adjusted.
28760         * tree-ssa-tail-merge.c (replace_block_by): Use
28761         combine_with_count.
28763 2018-01-23  Andrew Waterman  <andrew@sifive.com>
28764             Jim Wilson  <jimw@sifive.com>
28766         * config/riscv/riscv.c (riscv_stack_boundary): New.
28767         (riscv_option_override): Set riscv_stack_boundary.  Handle
28768         riscv_preferred_stack_boundary_arg.
28769         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
28770         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
28771         (STACK_BOUNDARY): Set to riscv_stack_boundary.
28772         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
28773         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
28774         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
28776 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
28778         PR target/83905
28779         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
28780         of struct ix86_frame.
28781         (ix86_expand_epilogue): Likewise.  Add a local variable for
28782         the reg_save_offset field in struct ix86_frame.
28784 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
28786         PR tree-optimization/82604
28787         * tree-loop-distribution.c (enum partition_kind): New enum item
28788         PKIND_PARTIAL_MEMSET.
28789         (partition_builtin_p): Support above new enum item.
28790         (generate_code_for_partition): Ditto.
28791         (compute_access_range): Differentiate cases that equality can be
28792         proven at all loops, the innermost loops or no loops.
28793         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28794         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
28795         (finalize_partitions, distribute_loop): Don't fuse partition of
28796         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28797         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28798         parloop is enabled.
28800 2018-01-23  Martin Liska  <mliska@suse.cz>
28802         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28803         order to ignore the predictor.
28804         (PRED_POLYMORPHIC_CALL): Likewise.
28805         (PRED_RECURSIVE_CALL): Likewise.
28807 2018-01-23  Martin Liska  <mliska@suse.cz>
28809         * tree-profile.c (tree_profiling): Print function header to
28810         aware reader which function we are working on.
28811         * value-prof.c (gimple_find_values_to_profile): Do not print
28812         not interesting value histograms.
28814 2018-01-23  Martin Liska  <mliska@suse.cz>
28816         * profile-count.h (enum profile_quality): Add
28817         profile_uninitialized as the first value. Do not number values
28818         as they are zero based.
28819         (profile_count::verify): Update sanity check.
28820         (profile_probability::verify): Likewise.
28822 2018-01-23  Nathan Sidwell  <nathan@acm.org>
28824         * doc/invoke.texi (ffor-scope): Deprecate.
28826 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28828         PR tree-optimization/83510
28829         * domwalk.c (set_all_edges_as_executable): New function.
28830         (dom_walker::dom_walker): Convert bool param
28831         "skip_unreachable_blocks" to enum reachability.  Move setup of
28832         edge flags to set_all_edges_as_executable and only do it when
28833         reachability is REACHABLE_BLOCKS.
28834         * domwalk.h (enum dom_walker::reachability): New enum.
28835         (dom_walker::dom_walker): Convert bool param
28836         "skip_unreachable_blocks" to enum reachability.
28837         (set_all_edges_as_executable): New decl.
28838         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
28839         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28840         "reachability".
28841         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28842         but converting true to REACHABLE_BLOCKS.
28843         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28844         * tree-vrp.c
28845         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28846         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28847         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28848         REACHABLE_BLOCKS.
28849         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28850         if check_all_array_refs will be called.
28852 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28854         * tree.c (selftest::test_location_wrappers): Add more test
28855         coverage.
28857 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28859         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28860         (selftest::test_bit_in_range): Likewise.
28862 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
28864         PR testsuite/83888
28865         * doc/sourcebuild.texi (vect_float): Say that the selector
28866         only describes the situation when -funsafe-math-optimizations is on.
28867         (vect_float_strict): Document.
28869 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
28871         PR tree-optimization/83965
28872         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28873         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28874         instead of checking only for a reduction.
28875         (vect_recog_widen_sum_pattern): Likewise.
28877 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28879         * predict.c (probably_never_executed): Only use precise profile info.
28880         (compute_function_frequency): Skip after inlining hack since we now
28881         have quality checking.
28883 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28885         * profile-count.h (profile_probability::very_unlikely,
28886         profile_probability::unlikely, profile_probability::even): Set
28887         precision to guessed.
28889 2018-01-23  Richard Biener  <rguenther@suse.de>
28891         PR tree-optimization/83963
28892         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
28893         Properly terminate dominator walk when crossing the exit edge not
28894         when visiting its source block.
28896 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
28898         PR c++/83918
28899         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
28900         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
28902 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
28904         PR tree-optimization/83957
28905         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
28906         semicolon after for body surrounded by braces.
28908         PR tree-optimization/83081
28909         * profile-count.h (profile_probability::split): New method.
28910         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
28911         Use profile_probability::split.
28912         (do_compare_rtx_and_jump): Fix adjustment of probabilities
28913         when splitting a single conditional jump into 2.
28915 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
28917         PR tree-optimization/69452
28918         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
28919         decl.
28921 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28923         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
28924         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
28925         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
28927 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28929         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
28930         declaration.
28931         * config/rl78/rl78.md (movdi): New define_expand.
28932         * config/rl78/rl78.c (rl78_split_movdi): New function.
28934 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
28936         PR target/83862
28937         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
28938         no longer used.
28939         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
28940         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
28941         128-bit to produce an UNSPEC move to get the double word with the
28942         signbit and then a shift directly to do signbit.
28943         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
28944         implementation with a new version that just does either a direct
28945         move or a regular move.  Move memory interface to separate insns.
28946         Move insns so they are next to the expander.
28947         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
28948         with signbit move.  Split big and little endian case.
28949         (signbit<mode>2_dm_mem_le): Likewise.
28950         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
28951         (signbit<mode>2_dm2): Likewise.
28953 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28955         * config/rl78/rl78.md (anddi3): New define_expand.
28957 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28959         * config/rl78/rl78.md (umindi3): New define_expand.
28961 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28963         * config/rl78/rl78.md (smindi3): New define_expand.
28965 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28967         * config/rl78/rl78.md (smaxdi3): New define_expand.
28969 2018-01-22  Carl Love  <cel@us.ibm.com>
28971         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
28972         LVX_V1TI): Add macro expansion.
28973         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
28974         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
28975         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
28976         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
28977         Change check to determine if the instruction is a byte reversing
28978         entry.  Fix typo in comment.
28979         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
28980         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
28981         Add def_builtin calls for new builtins.
28982         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
28983         Add define_insn expansion.
28985 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28987         * config/rl78/rl78.md (umaxdi3): New define_expand.
28989 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28991         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
28992         for non-QImode registers.
28994 2018-01-22  Richard Biener  <rguenther@suse.de>
28996         PR tree-optimization/83963
28997         * graphite-scop-detection.c (scop_detection::get_sese): Delay
28998         including the loop exit block.
28999         (scop_detection::merge_sese): Likewise.
29000         (scop_detection::add_scop): Do it here instead.
29002 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29004         * doc/sourcebuild.texi (arm_softfloat): Document.
29006 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
29008         PR gcc/77734
29009         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29010         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29011         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29013 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29014             David Edelsohn  <dje.gcc@gmail.com>
29016         PR target/83946
29017         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29018         Change "crset eq" to "crset 2".
29019         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29020         (*call_indirect_aix<mode>_nospec): Likewise.
29021         (*call_value_indirect_aix<mode>_nospec): Likewise.
29022         (*call_indirect_elfv2<mode>_nospec): Likewise.
29023         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29024         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29025         change assembly output from . to $.
29026         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29027         (indirect_jump<mode>_nospec): Change assembly output from . to $.
29028         (*tablejump<mode>_internal1_nospec): Likewise.
29030 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
29032         PR target/80870
29033         * config/sh/sh_optimize_sett_clrt.cc:
29034         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29036 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
29038         PR tree-optimization/83940
29039         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29040         offset_dt to vect_constant_def rather than vect_unknown_def_type.
29041         (vect_check_load_store_mask): Add a mask_dt_out parameter and
29042         use it to pass back the definition type.
29043         (vect_check_store_rhs): Likewise rhs_dt_out.
29044         (vect_build_gather_load_calls): Add a mask_dt argument and use
29045         it instead of a call to vect_is_simple_use.
29046         (vectorizable_store): Update calls to vect_check_load_store_mask
29047         and vect_check_store_rhs.  Use the dt returned by the latter instead
29048         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
29049         instead of calls to vect_is_simple_use.  Pass the scalar rather
29050         than the vector operand to vect_is_simple_use when handling
29051         second and subsequent copies of an rhs value.
29052         (vectorizable_load): Update calls to vect_check_load_store_mask
29053         and vect_build_gather_load_calls.  Use the cached mask_dt and
29054         gs_info.offset_dt instead of calls to vect_is_simple_use.
29056 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
29058         PR middle-end/83945
29059         * tree-emutls.c: Include gimplify.h.
29060         (lower_emutls_2): New function.
29061         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29062         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29063         it before further processing.
29065         PR target/83930
29066         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29067         UINTVAL (trueop1) instead of INTVAL (op1).
29069 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
29071         PR debug/81570
29072         PR debug/83728
29073         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29074         INCOMING_FRAME_SP_OFFSET if not defined.
29075         (scan_trace): Add ENTRY argument.  If true and
29076         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29077         emit a note to adjust the CFA offset.
29078         (create_cfi_notes): Adjust scan_trace callers.
29079         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29080         INCOMING_FRAME_SP_OFFSET in the CIE.
29081         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29082         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29083         Likewise.
29084         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29085         * doc/tm.texi: Regenerated.
29087 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29089         PR rtl-optimization/83147
29090         * lra-constraints.c (remove_inheritance_pseudos): Use
29091         lra_substitute_pseudo_within_insn.
29093 2018-01-19  Tom de Vries  <tom@codesourcery.com>
29094             Cesar Philippidis  <cesar@codesourcery.com>
29096         PR target/83920
29097         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29099 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
29101         PR target/83790
29102         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29103         spaces for function labels.
29105 2018-01-19  Martin Liska  <mliska@suse.cz>
29107         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29108         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29109         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29110         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29111         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29112         (PRED_CONST_RETURN): Change from 69 to 65.
29113         (PRED_NULL_RETURN): Change from 91 to 71.
29114         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29115         (PRED_LOOP_GUARD): Change from 66 to 73.
29117 2018-01-19  Martin Liska  <mliska@suse.cz>
29119         * predict.c (predict_insn_def): Add new assert.
29120         (struct branch_predictor): Change type to signed integer.
29121         (test_prediction_value_range): Amend test to cover
29122         PROB_UNINITIALIZED.
29123         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29124         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29125         (PRED_LOOP_ITERATIONS_MAX): Likewise.
29126         (PRED_LOOP_IV_COMPARE): Likewise.
29127         * predict.h (PROB_UNINITIALIZED): Define new constant.
29129 2018-01-19  Martin Liska  <mliska@suse.cz>
29131         * predict.c (dump_prediction): Add new format for
29132         analyze_brprob.py script which is enabled with -details
29133         suboption.
29134         * profile-count.h (precise_p): New function.
29136 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29138         PR tree-optimization/83922
29139         * tree-vect-loop.c (vect_verify_full_masking): Return false if
29140         there are no statements that need masking.
29141         (vect_active_double_reduction_p): New function.
29142         (vect_analyze_loop_operations): Use it when handling phis that
29143         are not in the loop header.
29145 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
29147         PR tree-optimization/83914
29148         * tree-vect-loop.c (vectorizable_induction): Don't convert
29149         init_expr or apply the peeling adjustment for inductions
29150         that are nested within the vectorized loop.
29152 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29154         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29155         instead of NEG.
29157 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29159         PR sanitizer/81715
29160         PR testsuite/83882
29161         * function.h (gimplify_parameters): Add gimple_seq * argument.
29162         * function.c: Include gimple.h and options.h.
29163         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29164         for the added local temporaries if needed.
29165         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29166         if there are any parameter cleanups, wrap whole body into a
29167         try/finally with the cleanups.
29169 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
29171         PR target/82964
29172         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29173         Use GET_MODE_CLASS for scalar floating point.
29175 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29177         PR ipa/82256
29178         patch by PaX Team
29179         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29180         Fix call of call_cgraph_insertion_hooks.
29182 2018-01-18  Martin Sebor  <msebor@redhat.com>
29184         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29186 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
29188         PR ipa/83619
29189         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29190         frequencies.
29192 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
29194         PR other/70268
29195         * common.opt: (-ffile-prefix-map): New option.
29196         * opts.c (common_handle_option): Defer it.
29197         * opts-global.c (handle_common_deferred_options): Handle it.
29198         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29199         * file-prefix-map.h: New file.
29200         (remap_debug_filename, add_debug_prefix_map): ...here.
29201         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29202         * final.c (debug_prefix_map, add_debug_prefix_map
29203         remap_debug_filename): Move to...
29204         * file-prefix-map.c: New file.
29205         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29206         generalize, get rid of alloca(), use strrchr() instead of strchr().
29207         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
29208         Implement in terms of add_prefix_map().
29209         (remap_macro_filename, remap_debug_filename): Implement in term of
29210         remap_filename().
29211         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
29212         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
29213         * dbxout.c: Include file-prefix-map.h.
29214         * varasm.c: Likewise.
29215         * vmsdbgout.c: Likewise.
29216         * xcoffout.c: Likewise.
29217         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
29218         * doc/cppopts.texi (-fmacro-prefix-map): Document.
29219         * doc/invoke.texi (-ffile-prefix-map): Document.
29220         (-fdebug-prefix-map): Update description.
29222 2018-01-18  Martin Liska  <mliska@suse.cz>
29224         * config/i386/i386.c (indirect_thunk_name): Document that also
29225         lfence is emitted.
29226         (output_indirect_thunk): Document why both instructions
29227         (pause and lfence) are generated.
29229 2018-01-18  Richard Biener  <rguenther@suse.de>
29231         PR tree-optimization/83887
29232         * graphite-scop-detection.c
29233         (scop_detection::get_nearest_dom_with_single_entry): Remove.
29234         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
29235         (scop_detection::merge_sese): Re-implement with a flood-fill
29236         algorithm that properly finds a SESE region if it exists.
29238 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
29240         PR c/61240
29241         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
29242         pointer_diff optimizations use view_convert instead of convert.
29244 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29246         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29247         Generate different code for -mno-speculate-indirect-jumps.
29248         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29249         (*call_indirect_aix<mode>): Disable for
29250         -mno-speculate-indirect-jumps.
29251         (*call_indirect_aix<mode>_nospec): New define_insn.
29252         (*call_value_indirect_aix<mode>): Disable for
29253         -mno-speculate-indirect-jumps.
29254         (*call_value_indirect_aix<mode>_nospec): New define_insn.
29255         (*sibcall_nonlocal_sysv<mode>): Generate different code for
29256         -mno-speculate-indirect-jumps.
29257         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29259 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
29261         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
29262         long double type, set the flags for noting the default long double
29263         type, even if we don't pass or return a long double type.
29265 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
29267         PR ipa/83051
29268         * ipa-inline.c (flatten_function): Do not overwrite final inlining
29269         failure.
29271 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
29273         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
29274         support for merge[hl].
29275         (fold_mergehl_helper): New helper function.
29276         (tree-vector-builder.h): New #include for tree_vector_builder usage.
29277         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
29278         (altivec_vmrglw_direct): Add xxmrglw insn.
29280 2018-01-17  Andrew Waterman  <andrew@sifive.com>
29282         * config/riscv/riscv.c (riscv_conditional_register_usage): If
29283         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
29285 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
29287         PR lto/83121
29288         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
29289         call the lto_location_cache before reading the
29290         DECL_SOURCE_LOCATION of the types.
29292 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
29293             Richard Sandiford  <richard.sandiford@linaro.org>
29295         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
29296         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
29297         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
29298         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
29299         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
29300         Add declaration.
29301         * config/aarch64/constraints.md (aarch64_movti_operand):
29302         Limit immediates.
29303         * config/aarch64/predicates.md (Uti): Add new constraint.
29305 2018-01-17  Carl Love  <cel@us.ibm.com>
29307         * config/rs6000/vsx.md (define_expand xl_len_r,
29308         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
29309         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
29310         lxvll.
29311         (define_expand, define_insn): Move the shift left from  the
29312         define_insn to the define_expand for lxvl and stxvl instructions.
29313         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
29314         and XL_LEN_R definitions to PURE.
29316 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
29318         * config/i386/i386.c (indirect_thunk_name): Declare regno
29319         as unsigned int.  Compare regno with INVALID_REGNUM.
29320         (output_indirect_thunk): Ditto.
29321         (output_indirect_thunk_function): Ditto.
29322         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
29323         in the call to output_indirect_thunk_function.
29325 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
29327         PR middle-end/83884
29328         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
29329         rather than the size of inner_type to determine the stack slot size
29330         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
29332 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
29334         PR target/83546
29335         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
29336         to PTA_SILVERMONT.
29338 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
29340         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
29341         endian Linux systems to optionally enable multilibs for selecting
29342         the long double type if the user configured an explicit type.
29343         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
29344         have no long double multilibs if not defined.
29345         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
29346         warn if the user used -mabi={ieee,ibm}longdouble and we built
29347         multilibs for long double.
29348         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
29349         appropriate multilib option.
29350         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
29351         multilib options.
29352         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
29353         for building long double multilibs.
29354         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
29356 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
29358         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
29359         copies.
29361         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
29362         64 bits.
29363         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
29364         128 bits.
29366         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
29367         variables.
29369         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
29370         return value.
29372 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
29374         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
29375         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
29377 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29379         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
29380         different rtl trees depending on TARGET_64BIT.
29381         (rs6000_gen_lvx): Likewise.
29383 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
29385         * config/visium/visium.md (nop): Tweak comment.
29386         (hazard_nop): Likewise.
29388 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29390         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
29391         -mspeculate-indirect-jumps.
29392         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
29393         for -mno-speculate-indirect-jumps.
29394         (*call_indirect_elfv2<mode>_nospec): New define_insn.
29395         (*call_value_indirect_elfv2<mode>): Disable for
29396         -mno-speculate-indirect-jumps.
29397         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
29398         (indirect_jump): Emit different RTL for
29399         -mno-speculate-indirect-jumps.
29400         (*indirect_jump<mode>): Disable for
29401         -mno-speculate-indirect-jumps.
29402         (*indirect_jump<mode>_nospec): New define_insn.
29403         (tablejump): Emit different RTL for
29404         -mno-speculate-indirect-jumps.
29405         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
29406         (tablejumpsi_nospec): New define_expand.
29407         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
29408         (tablejumpdi_nospec): New define_expand.
29409         (*tablejump<mode>_internal1): Disable for
29410         -mno-speculate-indirect-jumps.
29411         (*tablejump<mode>_internal1_nospec): New define_insn.
29412         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
29413         option.
29415 2018-01-16  Artyom Skrobov tyomitch@gmail.com
29417         * caller-save.c (insert_save): Drop unnecessary parameter.  All
29418         callers updated.
29420 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
29421             Richard Biener  <rguenth@suse.de>
29423         PR libgomp/83590
29424         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
29425         return early, inline manually is_gimple_sizepos.  Make sure if we
29426         call gimplify_expr we don't end up with a gimple constant.
29427         * tree.c (variably_modified_type_p): Don't return true for
29428         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
29429         * gimplify.h (is_gimple_sizepos): Remove.
29431 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29433         PR tree-optimization/83857
29434         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
29435         vectorizable_live_operation for pure SLP statements.
29436         (vectorizable_live_operation): Handle PHIs.
29438 2018-01-16  Richard Biener  <rguenther@suse.de>
29440         PR tree-optimization/83867
29441         * tree-vect-stmts.c (vect_transform_stmt): Precompute
29442         nested_in_vect_loop_p since the scalar stmt may get invalidated.
29444 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
29446         PR c/83844
29447         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
29448         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
29449         If off is not INTEGER_CST, issue a may not be aligned warning
29450         rather than isn't aligned.  Use isn%'t rather than isn't.
29451         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
29452         into MULT_EXPR.
29453         <case MULT_EXPR>: Improve the case when bottom and one of the
29454         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
29455         operand, in that case check if the other operand is multiple of
29456         bottom divided by the INTEGER_CST operand.
29458 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29460         PR target/83858
29461         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
29462         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
29463         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
29464         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
29465         * config/pa/pa.c (pa_function_arg_advance): Likewise.
29466         (pa_function_arg, pa_arg_partial_bytes): Likewise.
29467         (pa_function_arg_size): New function.
29469 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29471         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
29472         in a separate statement.
29474 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
29476         PR tree-optimization/83847
29477         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
29478         group gathers and scatters.
29480 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
29482         PR rtl-optimization/86620
29483         * params.def (max-sched-ready-insns): Bump minimum value to 1.
29485         PR rtl-optimization/83213
29486         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
29487         to last if both are JUMP_INSNs.
29489         PR tree-optimization/83843
29490         * gimple-ssa-store-merging.c
29491         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
29492         store_immediate_info for bswap/nop orig_stores.
29494 2018-01-15  Andrew Waterman  <andrew@sifive.com>
29496         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
29497         !TARGET_MUL.
29498         <UDIV>: Increase cost if !TARGET_DIV.
29500 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
29502         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
29503         (define_attr "cr_logical_3op"): New.
29504         (cceq_ior_compare): Adjust.
29505         (cceq_ior_compare_complement): Adjust.
29506         (*cceq_rev_compare): Adjust.
29507         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
29508         (is_cracked_insn): Adjust.
29509         (insn_must_be_first_in_group): Adjust.
29510         * config/rs6000/40x.md: Adjust.
29511         * config/rs6000/440.md: Adjust.
29512         * config/rs6000/476.md: Adjust.
29513         * config/rs6000/601.md: Adjust.
29514         * config/rs6000/603.md: Adjust.
29515         * config/rs6000/6xx.md: Adjust.
29516         * config/rs6000/7450.md: Adjust.
29517         * config/rs6000/7xx.md: Adjust.
29518         * config/rs6000/8540.md: Adjust.
29519         * config/rs6000/cell.md: Adjust.
29520         * config/rs6000/e300c2c3.md: Adjust.
29521         * config/rs6000/e500mc.md: Adjust.
29522         * config/rs6000/e500mc64.md: Adjust.
29523         * config/rs6000/e5500.md: Adjust.
29524         * config/rs6000/e6500.md: Adjust.
29525         * config/rs6000/mpc.md: Adjust.
29526         * config/rs6000/power4.md: Adjust.
29527         * config/rs6000/power5.md: Adjust.
29528         * config/rs6000/power6.md: Adjust.
29529         * config/rs6000/power7.md: Adjust.
29530         * config/rs6000/power8.md: Adjust.
29531         * config/rs6000/power9.md: Adjust.
29532         * config/rs6000/rs64.md: Adjust.
29533         * config/rs6000/titan.md: Adjust.
29535 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29537         * config/i386/predicates.md (indirect_branch_operand): Rewrite
29538         ix86_indirect_branch_register logic.
29540 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29542         * config/i386/constraints.md (Bs): Update
29543         ix86_indirect_branch_register check.  Don't check
29544         ix86_indirect_branch_register with GOT_memory_operand.
29545         (Bw): Likewise.
29546         * config/i386/predicates.md (GOT_memory_operand): Don't check
29547         ix86_indirect_branch_register here.
29548         (GOT32_symbol_operand): Likewise.
29550 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29552         * config/i386/predicates.md (constant_call_address_operand):
29553         Rewrite ix86_indirect_branch_register logic.
29554         (sibcall_insn_operand): Likewise.
29556 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29558         * config/i386/constraints.md (Bs): Replace
29559         ix86_indirect_branch_thunk_register with
29560         ix86_indirect_branch_register.
29561         (Bw): Likewise.
29562         * config/i386/i386.md (indirect_jump): Likewise.
29563         (tablejump): Likewise.
29564         (*sibcall_memory): Likewise.
29565         (*sibcall_value_memory): Likewise.
29566         Peepholes of indirect call and jump via memory: Likewise.
29567         * config/i386/i386.opt: Likewise.
29568         * config/i386/predicates.md (indirect_branch_operand): Likewise.
29569         (GOT_memory_operand): Likewise.
29570         (call_insn_operand): Likewise.
29571         (sibcall_insn_operand): Likewise.
29572         (GOT32_symbol_operand): Likewise.
29574 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
29576         PR middle-end/83837
29577         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
29578         type rather than type addr's type points to.
29579         (expand_omp_atomic_mutex): Likewise.
29580         (expand_omp_atomic): Likewise.
29582 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
29584         PR target/83839
29585         * config/i386/i386.c (output_indirect_thunk_function): Use
29586         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
29587         for  __x86_return_thunk.
29589 2018-01-15  Richard Biener  <rguenther@suse.de>
29591         PR middle-end/83850
29592         * expmed.c (extract_bit_field_1): Fix typo.
29594 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29596         PR target/83687
29597         * config/arm/iterators.md (VF): New mode iterator.
29598         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
29599         Remove integer-related logic from pattern.
29600         (neon_vabd<mode>_3): Likewise.
29602 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
29604         PR middle-end/82694
29605         * common.opt (fstrict-overflow): No longer an alias.
29606         (fwrapv-pointer): New option.
29607         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
29608         also for pointer types based on flag_wrapv_pointer.
29609         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
29610         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
29611         opts->x_flag_wrapv got set.
29612         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
29613         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
29614         POINTER_TYPE_OVERFLOW_UNDEFINED.
29615         * match.pd: Likewise in address comparison pattern.
29616         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
29618 2018-01-15  Richard Biener  <rguenther@suse.de>
29620         PR lto/83804
29621         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
29622         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
29623         Reset type names to their identifier if their TYPE_DECL doesn't
29624         have linkage (and thus is used for ODR and devirt).
29625         (save_debug_info_for_decl): Remove.
29626         (save_debug_info_for_type): Likewise.
29627         (add_tree_to_fld_list): Adjust.
29628         * tree-pretty-print.c (dump_generic_node): Make dumping of
29629         type names more robust.
29631 2018-01-15  Richard Biener  <rguenther@suse.de>
29633         * BASE-VER: Bump to 8.0.1.
29635 2018-01-14  Martin Sebor  <msebor@redhat.com>
29637         PR other/83508
29638         * builtins.c (check_access): Avoid warning when the no-warning bit
29639         is set.
29641 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
29643         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
29644         * ira-color (allocno_hard_regs_compare): Likewise.
29646 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
29648         PR target/83013
29649         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
29650         Use .pushsection/.popsection.
29652 2018-01-14  Martin Sebor  <msebor@redhat.com>
29654         PR c++/81327
29655         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
29657 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
29659         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
29660         entry from extra_headers.
29661         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
29662         extra_headers, make the list bitwise identical to the i?86-*-* one.
29664 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29666         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
29667         -mcmodel=large with -mindirect-branch=thunk,
29668         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
29669         -mfunction-return=thunk-extern.
29670         * doc/invoke.texi: Document -mcmodel=large is incompatible with
29671         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
29672         -mfunction-return=thunk and -mfunction-return=thunk-extern.
29674 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29676         * config/i386/i386.c (print_reg): Print the name of the full
29677         integer register without '%'.
29678         (ix86_print_operand): Handle 'V'.
29679         * doc/extend.texi: Document 'V' modifier.
29681 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29683         * config/i386/constraints.md (Bs): Disallow memory operand for
29684         -mindirect-branch-register.
29685         (Bw): Likewise.
29686         * config/i386/predicates.md (indirect_branch_operand): Likewise.
29687         (GOT_memory_operand): Likewise.
29688         (call_insn_operand): Likewise.
29689         (sibcall_insn_operand): Likewise.
29690         (GOT32_symbol_operand): Likewise.
29691         * config/i386/i386.md (indirect_jump): Call convert_memory_address
29692         for -mindirect-branch-register.
29693         (tablejump): Likewise.
29694         (*sibcall_memory): Likewise.
29695         (*sibcall_value_memory): Likewise.
29696         Disallow peepholes of indirect call and jump via memory for
29697         -mindirect-branch-register.
29698         (*call_pop): Replace m with Bw.
29699         (*call_value_pop): Likewise.
29700         (*sibcall_pop_memory): Replace m with Bs.
29701         * config/i386/i386.opt (mindirect-branch-register): New option.
29702         * doc/invoke.texi: Document -mindirect-branch-register option.
29704 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29706         * config/i386/i386-protos.h (ix86_output_function_return): New.
29707         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
29708         set function_return_type.
29709         (indirect_thunk_name): Add ret_p to indicate thunk for function
29710         return.
29711         (output_indirect_thunk_function): Pass false to
29712         indirect_thunk_name.
29713         (ix86_output_indirect_branch_via_reg): Likewise.
29714         (ix86_output_indirect_branch_via_push): Likewise.
29715         (output_indirect_thunk_function): Create alias for function
29716         return thunk if regno < 0.
29717         (ix86_output_function_return): New function.
29718         (ix86_handle_fndecl_attribute): Handle function_return.
29719         (ix86_attribute_table): Add function_return.
29720         * config/i386/i386.h (machine_function): Add
29721         function_return_type.
29722         * config/i386/i386.md (simple_return_internal): Use
29723         ix86_output_function_return.
29724         (simple_return_internal_long): Likewise.
29725         * config/i386/i386.opt (mfunction-return=): New option.
29726         (indirect_branch): Mention -mfunction-return=.
29727         * doc/extend.texi: Document function_return function attribute.
29728         * doc/invoke.texi: Document -mfunction-return= option.
29730 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29732         * config/i386/i386-opts.h (indirect_branch): New.
29733         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
29734         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
29735         with local indirect jump when converting indirect call and jump.
29736         (ix86_set_indirect_branch_type): New.
29737         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
29738         (indirectlabelno): New.
29739         (indirect_thunk_needed): Likewise.
29740         (indirect_thunk_bnd_needed): Likewise.
29741         (indirect_thunks_used): Likewise.
29742         (indirect_thunks_bnd_used): Likewise.
29743         (INDIRECT_LABEL): Likewise.
29744         (indirect_thunk_name): Likewise.
29745         (output_indirect_thunk): Likewise.
29746         (output_indirect_thunk_function): Likewise.
29747         (ix86_output_indirect_branch_via_reg): Likewise.
29748         (ix86_output_indirect_branch_via_push): Likewise.
29749         (ix86_output_indirect_branch): Likewise.
29750         (ix86_output_indirect_jmp): Likewise.
29751         (ix86_code_end): Call output_indirect_thunk_function if needed.
29752         (ix86_output_call_insn): Call ix86_output_indirect_branch if
29753         needed.
29754         (ix86_handle_fndecl_attribute): Handle indirect_branch.
29755         (ix86_attribute_table): Add indirect_branch.
29756         * config/i386/i386.h (machine_function): Add indirect_branch_type
29757         and has_local_indirect_jump.
29758         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
29759         to true.
29760         (tablejump): Likewise.
29761         (*indirect_jump): Use ix86_output_indirect_jmp.
29762         (*tablejump_1): Likewise.
29763         (simple_return_indirect_internal): Likewise.
29764         * config/i386/i386.opt (mindirect-branch=): New option.
29765         (indirect_branch): New.
29766         (keep): Likewise.
29767         (thunk): Likewise.
29768         (thunk-inline): Likewise.
29769         (thunk-extern): Likewise.
29770         * doc/extend.texi: Document indirect_branch function attribute.
29771         * doc/invoke.texi: Document -mindirect-branch= option.
29773 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
29775         PR ipa/83051
29776         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
29778 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
29780         * ipa-inline.c (want_inline_small_function_p): Return false if
29781         inlining has already failed with CIF_FINAL_ERROR.
29782         (update_caller_keys): Call want_inline_small_function_p before
29783         can_inline_edge_p.
29784         (update_callee_keys): Likewise.
29786 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29788         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29789         New function.
29790         (rs6000_quadword_masked_address_p): Likewise.
29791         (quad_aligned_load_p): Likewise.
29792         (quad_aligned_store_p): Likewise.
29793         (const_load_sequence_p): Add comment to describe the outer-most loop.
29794         (mimic_memory_attributes_and_flags): New function.
29795         (rs6000_gen_stvx): Likewise.
29796         (replace_swapped_aligned_store): Likewise.
29797         (rs6000_gen_lvx): Likewise.
29798         (replace_swapped_aligned_load): Likewise.
29799         (replace_swapped_load_constant): Capitalize argument name in
29800         comment describing this function.
29801         (rs6000_analyze_swaps): Add a third pass to search for vector loads
29802         and stores that access quad-word aligned addresses and replace
29803         with stvx or lvx instructions when appropriate.
29804         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29805         New function prototype.
29806         (rs6000_quadword_masked_address_p): Likewise.
29807         (rs6000_gen_lvx): Likewise.
29808         (rs6000_gen_stvx): Likewise.
29809         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29810         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29811         when memory address is aligned.
29812         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29813         this split to select lvx instruction when memory address is aligned.
29814         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29815         instruction when memory address is aligned.
29816         (*vsx_le_perm_load_v16qi): Likewise.
29817         (four unnamed splitters): Modify to select the stvx instruction
29818         when memory is aligned.
29820 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
29822         * predict.c (determine_unlikely_bbs): Handle correctly BBs
29823         which appears in the queue multiple times.
29825 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29826             Alan Hayward  <alan.hayward@arm.com>
29827             David Sherwood  <david.sherwood@arm.com>
29829         * tree-vectorizer.h (vec_lower_bound): New structure.
29830         (_loop_vec_info): Add check_nonzero and lower_bounds.
29831         (LOOP_VINFO_CHECK_NONZERO): New macro.
29832         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29833         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29834         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29835         fields.  Make seg_len the distance travelled, not including the
29836         access size.
29837         (dr_direction_indicator): Declare.
29838         (dr_zero_step_indicator): Likewise.
29839         (dr_known_forward_stride_p): Likewise.
29840         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29841         tree-ssanames.h.
29842         (runtime_alias_check_p): Allow runtime alias checks with
29843         variable strides.
29844         (operator ==): Compare access_size and align.
29845         (prune_runtime_alias_test_list): Rework for new distinction between
29846         the access_size and seg_len.
29847         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
29848         segment lengths.
29849         (get_segment_min_max): New function.
29850         (create_intersect_range_checks): Use it.
29851         (dr_step_indicator): New function.
29852         (dr_direction_indicator): Likewise.
29853         (dr_zero_step_indicator): Likewise.
29854         (dr_known_forward_stride_p): Likewise.
29855         * tree-loop-distribution.c (data_ref_segment_size): Return
29856         DR_STEP * (niters - 1).
29857         (compute_alias_check_pairs): Update call to the dr_with_seg_len
29858         constructor.
29859         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29860         (vect_preserves_scalar_order_p): New function, split out from...
29861         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
29862         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29863         (vect_vfa_access_size): New function.
29864         (vect_vfa_align): Likewise.
29865         (vect_compile_time_alias): Take access_size_a and access_b arguments.
29866         (dump_lower_bound): New function.
29867         (vect_check_lower_bound): Likewise.
29868         (vect_small_gap_p): Likewise.
29869         (vectorizable_with_step_bound_p): Likewise.
29870         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29871         depencies if the vectorization factor is 1.  Convert the checks
29872         for nonzero steps into checks on the bounds of DR_STEP.  Try using
29873         a bunds check for variable steps if the minimum required step is
29874         relatively small. Update calls to the dr_with_seg_len
29875         constructor and to vect_compile_time_alias.
29876         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
29877         function.
29878         (vect_loop_versioning): Call it.
29879         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
29880         when retrying.
29881         (vect_estimate_min_profitable_iters): Account for any bounds checks.
29883 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29884             Alan Hayward  <alan.hayward@arm.com>
29885             David Sherwood  <david.sherwood@arm.com>
29887         * doc/sourcebuild.texi (vect_scatter_store): Document.
29888         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
29889         optabs.
29890         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
29891         Document.
29892         * genopinit.c (main): Add supports_vec_scatter_store and
29893         supports_vec_scatter_store_cached to target_optabs.
29894         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
29895         IFN_MASK_SCATTER_STORE.
29896         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
29897         functions.
29898         * internal-fn.h (internal_store_fn_p): Declare.
29899         (internal_fn_stored_value_index): Likewise.
29900         * internal-fn.c (scatter_store_direct): New macro.
29901         (expand_scatter_store_optab_fn): New function.
29902         (direct_scatter_store_optab_supported_p): New macro.
29903         (internal_store_fn_p): New function.
29904         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
29905         IFN_MASK_SCATTER_STORE.
29906         (internal_fn_mask_index): Likewise.
29907         (internal_fn_stored_value_index): New function.
29908         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
29909         for scatter stores.
29910         * optabs-query.h (supports_vec_scatter_store_p): Declare.
29911         * optabs-query.c (supports_vec_scatter_store_p): New function.
29912         * tree-vectorizer.h (vect_get_store_rhs): Declare.
29913         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
29914         true for scatter stores.
29915         (vect_gather_scatter_fn_p): Handle scatter stores too.
29916         (vect_check_gather_scatter): Consider using scatter stores if
29917         supports_vec_scatter_store_p.
29918         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
29919         scatter stores too.
29920         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29921         internal_fn_stored_value_index.
29922         (check_load_store_masking): Handle scatter stores too.
29923         (vect_get_store_rhs): Make public.
29924         (vectorizable_call): Use internal_store_fn_p.
29925         (vectorizable_store): Handle scatter store internal functions.
29926         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
29927         when deciding whether the end of the group has been reached.
29928         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
29929         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
29930         (mask_scatter_store<mode>): New insns.
29932 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29933             Alan Hayward  <alan.hayward@arm.com>
29934             David Sherwood  <david.sherwood@arm.com>
29936         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
29937         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
29938         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
29939         function.
29940         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
29941         Use vect_truncate_gather_scatter_offset if we can't treat the
29942         operation as a normal gather load or scatter store.
29943         (get_group_load_store_type): Take the gather_scatter_info
29944         as argument.  Try using a gather load or scatter store for
29945         single-element groups.
29946         (get_load_store_type): Update calls to get_group_load_store_type
29947         and vect_use_strided_gather_scatters_p.
29949 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29950             Alan Hayward  <alan.hayward@arm.com>
29951             David Sherwood  <david.sherwood@arm.com>
29953         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
29954         optional tree argument.
29955         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
29956         null target hooks.
29957         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
29958         but continue to use the current value as a fallback.
29959         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
29960         to compare the updates.
29961         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
29962         (get_load_store_type): Use it when handling a strided access.
29963         (vect_get_strided_load_store_ops): New function.
29964         (vect_get_data_ptr_increment): Likewise.
29965         (vectorizable_load): Handle strided gather loads.  Always pass
29966         a step to vect_create_data_ref_ptr and bump_vector_ptr.
29968 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29969             Alan Hayward  <alan.hayward@arm.com>
29970             David Sherwood  <david.sherwood@arm.com>
29972         * doc/md.texi (gather_load@var{m}): Document.
29973         (mask_gather_load@var{m}): Likewise.
29974         * genopinit.c (main): Add supports_vec_gather_load and
29975         supports_vec_gather_load_cached to target_optabs.
29976         * optabs-tree.c (init_tree_optimization_optabs): Use
29977         ggc_cleared_alloc to allocate target_optabs.
29978         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
29979         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
29980         functions.
29981         * internal-fn.h (internal_load_fn_p): Declare.
29982         (internal_gather_scatter_fn_p): Likewise.
29983         (internal_fn_mask_index): Likewise.
29984         (internal_gather_scatter_fn_supported_p): Likewise.
29985         * internal-fn.c (gather_load_direct): New macro.
29986         (expand_gather_load_optab_fn): New function.
29987         (direct_gather_load_optab_supported_p): New macro.
29988         (direct_internal_fn_optab): New function.
29989         (internal_load_fn_p): Likewise.
29990         (internal_gather_scatter_fn_p): Likewise.
29991         (internal_fn_mask_index): Likewise.
29992         (internal_gather_scatter_fn_supported_p): Likewise.
29993         * optabs-query.c (supports_at_least_one_mode_p): New function.
29994         (supports_vec_gather_load_p): Likewise.
29995         * optabs-query.h (supports_vec_gather_load_p): Declare.
29996         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
29997         and memory_type field.
29998         (NUM_PATTERNS): Bump to 15.
29999         * tree-vect-data-refs.c: Include internal-fn.h.
30000         (vect_gather_scatter_fn_p): New function.
30001         (vect_describe_gather_scatter_call): Likewise.
30002         (vect_check_gather_scatter): Try using internal functions for
30003         gather loads.  Recognize existing calls to a gather load function.
30004         (vect_analyze_data_refs): Consider using gather loads if
30005         supports_vec_gather_load_p.
30006         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30007         (vect_get_gather_scatter_offset_type): Likewise.
30008         (vect_convert_mask_for_vectype): Likewise.
30009         (vect_add_conversion_to_patterm): Likewise.
30010         (vect_try_gather_scatter_pattern): Likewise.
30011         (vect_recog_gather_scatter_pattern): New pattern recognizer.
30012         (vect_vect_recog_func_ptrs): Add it.
30013         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30014         internal_fn_mask_index and internal_gather_scatter_fn_p.
30015         (check_load_store_masking): Take the gather_scatter_info as an
30016         argument and handle gather loads.
30017         (vect_get_gather_scatter_ops): New function.
30018         (vectorizable_call): Check internal_load_fn_p.
30019         (vectorizable_load): Likewise.  Handle gather load internal
30020         functions.
30021         (vectorizable_store): Update call to check_load_store_masking.
30022         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30023         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30024         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30025         (aarch64_gather_scale_operand_d): New predicates.
30026         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30027         (mask_gather_load<mode>): New insns.
30029 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30030             Alan Hayward  <alan.hayward@arm.com>
30031             David Sherwood  <david.sherwood@arm.com>
30033         * optabs.def (fold_left_plus_optab): New optab.
30034         * doc/md.texi (fold_left_plus_@var{m}): Document.
30035         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30036         * internal-fn.c (fold_left_direct): Define.
30037         (expand_fold_left_optab_fn): Likewise.
30038         (direct_fold_left_optab_supported_p): Likewise.
30039         * fold-const-call.c (fold_const_fold_left): New function.
30040         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30041         * tree-parloops.c (valid_reduction_p): New function.
30042         (gather_scalar_reductions): Use it.
30043         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30044         (vect_finish_replace_stmt): Declare.
30045         * tree-vect-loop.c (fold_left_reduction_fn): New function.
30046         (needs_fold_left_reduction_p): New function, split out from...
30047         (vect_is_simple_reduction): ...here.  Accept reductions that
30048         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30049         (vect_force_simple_reduction): Also store the reduction type in
30050         the assignment's STMT_VINFO_REDUC_TYPE.
30051         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30052         (merge_with_identity): New function.
30053         (vect_expand_fold_left): Likewise.
30054         (vectorize_fold_left_reduction): Likewise.
30055         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
30056         scalar phi in place for it.  Check for target support and reject
30057         cases that would reassociate the operation.  Defer the transform
30058         phase to vectorize_fold_left_reduction.
30059         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30060         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30061         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30063 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30065         * tree-if-conv.c (predicate_mem_writes): Remove redundant
30066         call to ifc_temp_var.
30068 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30069             Alan Hayward  <alan.hayward@arm.com>
30070             David Sherwood  <david.sherwood@arm.com>
30072         * target.def (legitimize_address_displacement): Take the original
30073         offset as a poly_int.
30074         * targhooks.h (default_legitimize_address_displacement): Update
30075         accordingly.
30076         * targhooks.c (default_legitimize_address_displacement): Likewise.
30077         * doc/tm.texi: Regenerate.
30078         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30079         as an argument, moving assert of ad->disp == ad->disp_term to...
30080         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
30081         Try calling targetm.legitimize_address_displacement before expanding
30082         the address rather than afterwards, and adjust for the new interface.
30083         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30084         Match the new hook interface.  Handle SVE addresses.
30085         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30086         new hook interface.
30088 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30090         * Makefile.in (OBJS): Add early-remat.o.
30091         * target.def (select_early_remat_modes): New hook.
30092         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30093         * doc/tm.texi: Regenerate.
30094         * targhooks.h (default_select_early_remat_modes): Declare.
30095         * targhooks.c (default_select_early_remat_modes): New function.
30096         * timevar.def (TV_EARLY_REMAT): New timevar.
30097         * passes.def (pass_early_remat): New pass.
30098         * tree-pass.h (make_pass_early_remat): Declare.
30099         * early-remat.c: New file.
30100         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30101         function.
30102         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30104 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30105             Alan Hayward  <alan.hayward@arm.com>
30106             David Sherwood  <david.sherwood@arm.com>
30108         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30109         vfm1 with a bound_epilog parameter.
30110         (vect_do_peeling): Update calls accordingly, and move the prologue
30111         call earlier in the function.  Treat the base bound_epilog as 0 for
30112         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
30113         this base when peeling for gaps.
30114         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30115         with fully-masked loops.
30116         (vect_estimate_min_profitable_iters): Handle the single peeled
30117         iteration in that case.
30119 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30120             Alan Hayward  <alan.hayward@arm.com>
30121             David Sherwood  <david.sherwood@arm.com>
30123         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30124         single-element interleaving even if the size is not a power of 2.
30125         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30126         accesses for single-element interleaving if the group size is
30127         not a power of 2.
30129 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30130             Alan Hayward  <alan.hayward@arm.com>
30131             David Sherwood  <david.sherwood@arm.com>
30133         * doc/md.texi (fold_extract_last_@var{m}): Document.
30134         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30135         * optabs.def (fold_extract_last_optab): New optab.
30136         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30137         * internal-fn.c (fold_extract_direct): New macro.
30138         (expand_fold_extract_optab_fn): Likewise.
30139         (direct_fold_extract_optab_supported_p): Likewise.
30140         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30141         * tree-vect-loop.c (vect_model_reduction_cost): Handle
30142         EXTRACT_LAST_REDUCTION.
30143         (get_initial_def_for_reduction): Do not create an initial vector
30144         for EXTRACT_LAST_REDUCTION reductions.
30145         (vectorizable_reduction): Leave the scalar phi in place for
30146         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
30147         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
30148         epilogue code for EXTRACT_LAST_REDUCTION and defer the
30149         transform phase to vectorizable_condition.
30150         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30151         split out from...
30152         (vect_finish_stmt_generation): ...here.
30153         (vect_finish_replace_stmt): New function.
30154         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30155         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30156         pattern.
30157         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30159 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30160             Alan Hayward  <alan.hayward@arm.com>
30161             David Sherwood  <david.sherwood@arm.com>
30163         * doc/md.texi (extract_last_@var{m}): Document.
30164         * optabs.def (extract_last_optab): New optab.
30165         * internal-fn.def (EXTRACT_LAST): New internal function.
30166         * internal-fn.c (cond_unary_direct): New macro.
30167         (expand_cond_unary_optab_fn): Likewise.
30168         (direct_cond_unary_optab_supported_p): Likewise.
30169         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30170         loops using EXTRACT_LAST.
30171         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30172         (extract_last_<mode>): ...this optab.
30173         (vec_extract<mode><Vel>): Update accordingly.
30175 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30176             Alan Hayward  <alan.hayward@arm.com>
30177             David Sherwood  <david.sherwood@arm.com>
30179         * target.def (empty_mask_is_expensive): New hook.
30180         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30181         * doc/tm.texi: Regenerate.
30182         * targhooks.h (default_empty_mask_is_expensive): Declare.
30183         * targhooks.c (default_empty_mask_is_expensive): New function.
30184         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30185         if the target says that empty masks are expensive.
30186         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30187         New function.
30188         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30190 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30191             Alan Hayward  <alan.hayward@arm.com>
30192             David Sherwood  <david.sherwood@arm.com>
30194         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30195         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30196         (vect_use_loop_mask_for_alignment_p): New function.
30197         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30198         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30199         niters_skip argument.  Make sure that the first niters_skip elements
30200         of the first iteration are inactive.
30201         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30202         Update call to vect_set_loop_masks_directly.
30203         (get_misalign_in_elems): New function, split out from...
30204         (vect_gen_prolog_loop_niters): ...here.
30205         (vect_update_init_of_dr): Take a code argument that specifies whether
30206         the adjustment should be added or subtracted.
30207         (vect_update_init_of_drs): Likewise.
30208         (vect_prepare_for_masked_peels): New function.
30209         (vect_do_peeling): Skip prologue peeling if we're using a mask
30210         instead.  Update call to vect_update_inits_of_drs.
30211         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30212         mask_skip_niters.
30213         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
30214         alignment.  Do not include the number of peeled iterations in
30215         the minimum threshold in that case.
30216         (vectorizable_induction): Adjust the start value down by
30217         LOOP_VINFO_MASK_SKIP_NITERS iterations.
30218         (vect_transform_loop): Call vect_prepare_for_masked_peels.
30219         Take the number of skipped iterations into account when calculating
30220         the loop bounds.
30221         * tree-vect-stmts.c (vect_gen_while_not): New function.
30223 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30224             Alan Hayward  <alan.hayward@arm.com>
30225             David Sherwood  <david.sherwood@arm.com>
30227         * doc/sourcebuild.texi (vect_fully_masked): Document.
30228         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
30229         default value to 0.
30230         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
30231         split out from...
30232         (vect_analyze_loop_2): ...here. Don't check the vectorization
30233         factor against the number of loop iterations if the loop is
30234         fully-masked.
30236 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30237             Alan Hayward  <alan.hayward@arm.com>
30238             David Sherwood  <david.sherwood@arm.com>
30240         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
30241         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
30242         (dump_groups): Update accordingly.
30243         (iv_use::mem_type): New member variable.
30244         (address_p): New function.
30245         (record_use): Add a mem_type argument and initialize the new
30246         mem_type field.
30247         (record_group_use): Add a mem_type argument.  Use address_p.
30248         Remove obsolete null checks of base_object.  Update call to record_use.
30249         (find_interesting_uses_op): Update call to record_group_use.
30250         (find_interesting_uses_cond): Likewise.
30251         (find_interesting_uses_address): Likewise.
30252         (get_mem_type_for_internal_fn): New function.
30253         (find_address_like_use): Likewise.
30254         (find_interesting_uses_stmt): Try find_address_like_use before
30255         calling find_interesting_uses_op.
30256         (addr_offset_valid_p): Use the iv mem_type field as the type
30257         of the addressed memory.
30258         (add_autoinc_candidates): Likewise.
30259         (get_address_cost): Likewise.
30260         (split_small_address_groups_p): Use address_p.
30261         (split_address_groups): Likewise.
30262         (add_iv_candidate_for_use): Likewise.
30263         (autoinc_possible_for_pair): Likewise.
30264         (rewrite_groups): Likewise.
30265         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
30266         (determine_group_iv_cost): Update after split of USE_ADDRESS.
30267         (get_alias_ptr_type_for_ptr_address): New function.
30268         (rewrite_use_address): Rewrite address uses in calls that were
30269         identified by find_address_like_use.
30271 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30272             Alan Hayward  <alan.hayward@arm.com>
30273             David Sherwood  <david.sherwood@arm.com>
30275         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
30276         TARGET_MEM_REFs.
30277         * gimple-expr.h (is_gimple_addressable: Likewise.
30278         * gimple-expr.c (is_gimple_address): Likewise.
30279         * internal-fn.c (expand_call_mem_ref): New function.
30280         (expand_mask_load_optab_fn): Use it.
30281         (expand_mask_store_optab_fn): Likewise.
30283 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30284             Alan Hayward  <alan.hayward@arm.com>
30285             David Sherwood  <david.sherwood@arm.com>
30287         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
30288         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
30289         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
30290         (cond_umax@var{mode}): Document.
30291         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
30292         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
30293         (cond_umin_optab, cond_umax_optab): New optabs.
30294         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
30295         (COND_IOR, COND_XOR): New internal functions.
30296         * internal-fn.h (get_conditional_internal_fn): Declare.
30297         * internal-fn.c (cond_binary_direct): New macro.
30298         (expand_cond_binary_optab_fn): Likewise.
30299         (direct_cond_binary_optab_supported_p): Likewise.
30300         (get_conditional_internal_fn): New function.
30301         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
30302         Cope with reduction statements that are vectorized as calls rather
30303         than assignments.
30304         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
30305         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
30306         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
30307         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
30308         (UNSPEC_COND_EOR): New unspecs.
30309         (optab): Add mappings for them.
30310         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
30311         (sve_int_op, sve_fp_op): New int attributes.
30313 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30314             Alan Hayward  <alan.hayward@arm.com>
30315             David Sherwood  <david.sherwood@arm.com>
30317         * optabs.def (while_ult_optab): New optab.
30318         * doc/md.texi (while_ult@var{m}@var{n}): Document.
30319         * internal-fn.def (WHILE_ULT): New internal function.
30320         * internal-fn.h (direct_internal_fn_supported_p): New override
30321         that takes two types as argument.
30322         * internal-fn.c (while_direct): New macro.
30323         (expand_while_optab_fn): New function.
30324         (convert_optab_supported_p): Likewise.
30325         (direct_while_optab_supported_p): New macro.
30326         * wide-int.h (wi::udiv_ceil): New function.
30327         * tree-vectorizer.h (rgroup_masks): New structure.
30328         (vec_loop_masks): New typedef.
30329         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
30330         and fully_masked_p.
30331         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
30332         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
30333         (vect_max_vf): New function.
30334         (slpeel_make_loop_iterate_ntimes): Delete.
30335         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
30336         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
30337         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
30338         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
30339         internal-fn.h, stor-layout.h and optabs-query.h.
30340         (vect_set_loop_mask): New function.
30341         (add_preheader_seq): Likewise.
30342         (add_header_seq): Likewise.
30343         (interleave_supported_p): Likewise.
30344         (vect_maybe_permute_loop_masks): Likewise.
30345         (vect_set_loop_masks_directly): Likewise.
30346         (vect_set_loop_condition_masked): Likewise.
30347         (vect_set_loop_condition_unmasked): New function, split out from
30348         slpeel_make_loop_iterate_ntimes.
30349         (slpeel_make_loop_iterate_ntimes): Rename to..
30350         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
30351         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
30352         (vect_do_peeling): Update call accordingly.
30353         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
30354         loops.
30355         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30356         mask_compare_type, can_fully_mask_p and fully_masked_p.
30357         (release_vec_loop_masks): New function.
30358         (_loop_vec_info): Use it to free the loop masks.
30359         (can_produce_all_loop_masks_p): New function.
30360         (vect_get_max_nscalars_per_iter): Likewise.
30361         (vect_verify_full_masking): Likewise.
30362         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
30363         retries, and free the mask rgroups before retrying.  Check loop-wide
30364         reasons for disallowing fully-masked loops.  Make the final decision
30365         about whether use a fully-masked loop or not.
30366         (vect_estimate_min_profitable_iters): Do not assume that peeling
30367         for the number of iterations will be needed for fully-masked loops.
30368         (vectorizable_reduction): Disable fully-masked loops.
30369         (vectorizable_live_operation): Likewise.
30370         (vect_halve_mask_nunits): New function.
30371         (vect_double_mask_nunits): Likewise.
30372         (vect_record_loop_mask): Likewise.
30373         (vect_get_loop_mask): Likewise.
30374         (vect_transform_loop): Handle the case in which the final loop
30375         iteration might handle a partial vector.  Call vect_set_loop_condition
30376         instead of slpeel_make_loop_iterate_ntimes.
30377         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
30378         (check_load_store_masking): New function.
30379         (prepare_load_store_mask): Likewise.
30380         (vectorizable_store): Handle fully-masked loops.
30381         (vectorizable_load): Likewise.
30382         (supportable_widening_operation): Use vect_halve_mask_nunits for
30383         booleans.
30384         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
30385         (vect_gen_while): New function.
30386         * config/aarch64/aarch64.md (umax<mode>3): New expander.
30387         (aarch64_uqdec<mode>): New insn.
30389 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30390             Alan Hayward  <alan.hayward@arm.com>
30391             David Sherwood  <david.sherwood@arm.com>
30393         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
30394         (reduc_xor_scal_optab): New optabs.
30395         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
30396         (reduc_xor_scal_@var{m}): Document.
30397         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
30398         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
30399         internal functions.
30400         * fold-const-call.c (fold_const_call): Handle them.
30401         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
30402         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
30403         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
30404         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
30405         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
30406         (UNSPEC_XORV): New unspecs.
30407         (optab): Add entries for them.
30408         (BITWISEV): New int iterator.
30409         (bit_reduc_op): New int attributes.
30411 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30412             Alan Hayward  <alan.hayward@arm.com>
30413             David Sherwood  <david.sherwood@arm.com>
30415         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
30416         * internal-fn.def (VEC_SHL_INSERT): New internal function.
30417         * optabs.def (vec_shl_insert_optab): New optab.
30418         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
30419         (duplicate_and_interleave): Likewise.
30420         * tree-vect-loop.c: Include internal-fn.h.
30421         (neutral_op_for_slp_reduction): New function, split out from
30422         get_initial_defs_for_reduction.
30423         (get_initial_def_for_reduction): Handle option 2 for variable-length
30424         vectors by loading the neutral value into a vector and then shifting
30425         the initial value into element 0.
30426         (get_initial_defs_for_reduction): Replace the code argument with
30427         the neutral value calculated by neutral_op_for_slp_reduction.
30428         Use gimple_build_vector for constant-length vectors.
30429         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
30430         but the first group_size elements have a neutral value.
30431         Use duplicate_and_interleave otherwise.
30432         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
30433         Update call to get_initial_defs_for_reduction.  Handle SLP
30434         reductions for variable-length vectors by creating one vector
30435         result for each scalar result, with the elements associated
30436         with other scalar results stubbed out with the neutral value.
30437         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
30438         Require IFN_VEC_SHL_INSERT for double reductions on
30439         variable-length vectors, or SLP reductions that have
30440         a neutral value.  Require can_duplicate_and_interleave_p
30441         support for variable-length unchained SLP reductions if there
30442         is no neutral value, such as for MIN/MAX reductions.  Also require
30443         the number of vector elements to be a multiple of the number of
30444         SLP statements when doing variable-length unchained SLP reductions.
30445         Update call to vect_create_epilog_for_reduction.
30446         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
30447         and remove initial values.
30448         (duplicate_and_interleave): Make public.
30449         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
30450         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
30452 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30453             Alan Hayward  <alan.hayward@arm.com>
30454             David Sherwood  <david.sherwood@arm.com>
30456         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
30457         (can_duplicate_and_interleave_p): New function.
30458         (vect_get_and_check_slp_defs): Take the vector of statements
30459         rather than just the current one.  Remove excess parentheses.
30460         Restriction rejectinon of vect_constant_def and vect_external_def
30461         for variable-length vectors to boolean types, or types for which
30462         can_duplicate_and_interleave_p is false.
30463         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
30464         (duplicate_and_interleave): New function.
30465         (vect_get_constant_vectors): Use gimple_build_vector for
30466         constant-length vectors and suitable variable-length constant
30467         vectors.  Use duplicate_and_interleave for other variable-length
30468         vectors.  Don't defer the update when inserting new statements.
30470 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30471             Alan Hayward  <alan.hayward@arm.com>
30472             David Sherwood  <david.sherwood@arm.com>
30474         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
30475         min_profitable_iters doesn't go negative.
30477 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30478             Alan Hayward  <alan.hayward@arm.com>
30479             David Sherwood  <david.sherwood@arm.com>
30481         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
30482         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
30483         * optabs.def (vec_mask_load_lanes_optab): New optab.
30484         (vec_mask_store_lanes_optab): Likewise.
30485         * internal-fn.def (MASK_LOAD_LANES): New internal function.
30486         (MASK_STORE_LANES): Likewise.
30487         * internal-fn.c (mask_load_lanes_direct): New macro.
30488         (mask_store_lanes_direct): Likewise.
30489         (expand_mask_load_optab_fn): Handle masked operations.
30490         (expand_mask_load_lanes_optab_fn): New macro.
30491         (expand_mask_store_optab_fn): Handle masked operations.
30492         (expand_mask_store_lanes_optab_fn): New macro.
30493         (direct_mask_load_lanes_optab_supported_p): Likewise.
30494         (direct_mask_store_lanes_optab_supported_p): Likewise.
30495         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
30496         parameter.
30497         (vect_load_lanes_supported): Likewise.
30498         * tree-vect-data-refs.c (strip_conversion): New function.
30499         (can_group_stmts_p): Likewise.
30500         (vect_analyze_data_ref_accesses): Use it instead of checking
30501         for a pair of assignments.
30502         (vect_store_lanes_supported): Take a masked_p parameter.
30503         (vect_load_lanes_supported): Likewise.
30504         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
30505         vect_store_lanes_supported and vect_load_lanes_supported.
30506         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
30507         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
30508         parameter.  Don't allow gaps for masked accesses.
30509         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
30510         and vect_load_lanes_supported.
30511         (get_load_store_type): Take a masked_p parameter and update
30512         call to get_group_load_store_type.
30513         (vectorizable_store): Update call to get_load_store_type.
30514         Handle IFN_MASK_STORE_LANES.
30515         (vectorizable_load): Update call to get_load_store_type.
30516         Handle IFN_MASK_LOAD_LANES.
30518 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30519             Alan Hayward  <alan.hayward@arm.com>
30520             David Sherwood  <david.sherwood@arm.com>
30522         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
30523         modes for SVE.
30524         * config/aarch64/aarch64-protos.h
30525         (aarch64_sve_struct_memory_operand_p): Declare.
30526         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
30527         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
30528         (VPRED, vpred): Handle SVE structure modes.
30529         * config/aarch64/constraints.md (Utx): New constraint.
30530         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
30531         (aarch64_sve_struct_nonimmediate_operand): New predicates.
30532         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
30533         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
30534         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
30535         structure modes.  Split into pieces after RA.
30536         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
30537         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
30538         New patterns.
30539         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
30540         SVE structure modes.
30541         (aarch64_classify_address): Likewise.
30542         (sizetochar): Move earlier in file.
30543         (aarch64_print_operand): Handle SVE register lists.
30544         (aarch64_array_mode): New function.
30545         (aarch64_sve_struct_memory_operand_p): Likewise.
30546         (TARGET_ARRAY_MODE): Redefine.
30548 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30549             Alan Hayward  <alan.hayward@arm.com>
30550             David Sherwood  <david.sherwood@arm.com>
30552         * target.def (array_mode): New target hook.
30553         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
30554         * doc/tm.texi: Regenerate.
30555         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
30556         * hooks.c (hook_optmode_mode_uhwi_none): New function.
30557         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
30558         targetm.array_mode.
30559         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
30560         type sizes.
30562 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30563             Alan Hayward  <alan.hayward@arm.com>
30564             David Sherwood  <david.sherwood@arm.com>
30566         * fold-const.c (fold_binary_loc): Check the argument types
30567         rather than the result type when testing for a vector operation.
30569 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30571         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
30572         * doc/tm.texi: Regenerate.
30574 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30575             Alan Hayward  <alan.hayward@arm.com>
30576             David Sherwood  <david.sherwood@arm.com>
30578         * doc/invoke.texi (-msve-vector-bits=): Document new option.
30579         (sve): Document new AArch64 extension.
30580         * doc/md.texi (w): Extend the description of the AArch64
30581         constraint to include SVE vectors.
30582         (Upl, Upa): Document new AArch64 predicate constraints.
30583         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
30584         enum.
30585         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
30586         (msve-vector-bits=): New option.
30587         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
30588         SVE when these are disabled.
30589         (sve): New extension.
30590         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
30591         modes.  Adjust their number of units based on aarch64_sve_vg.
30592         (MAX_BITSIZE_MODE_ANY_MODE): Define.
30593         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
30594         aarch64_addr_query_type.
30595         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
30596         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
30597         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
30598         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
30599         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
30600         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
30601         (aarch64_simd_imm_zero_p): Delete.
30602         (aarch64_check_zero_based_sve_index_immediate): Declare.
30603         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30604         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30605         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30606         (aarch64_sve_float_mul_immediate_p): Likewise.
30607         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30608         rather than an rtx.
30609         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
30610         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
30611         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
30612         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
30613         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
30614         (aarch64_regmode_natural_size): Likewise.
30615         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
30616         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
30617         left one place.
30618         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
30619         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
30620         for VG and the SVE predicate registers.
30621         (V_ALIASES): Add a "z"-prefixed alias.
30622         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
30623         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
30624         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
30625         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
30626         (REG_CLASS_NAMES): Add entries for them.
30627         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
30628         and the predicate registers.
30629         (aarch64_sve_vg): Declare.
30630         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
30631         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
30632         (REGMODE_NATURAL_SIZE): Define.
30633         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
30634         SVE macros.
30635         * config/aarch64/aarch64.c: Include cfgrtl.h.
30636         (simd_immediate_info): Add a constructor for series vectors,
30637         and an associated step field.
30638         (aarch64_sve_vg): New variable.
30639         (aarch64_dbx_register_number): Handle VG and the predicate registers.
30640         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
30641         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
30642         (VEC_ANY_DATA, VEC_STRUCT): New constants.
30643         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
30644         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
30645         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
30646         (aarch64_get_mask_mode): New functions.
30647         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
30648         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
30649         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
30650         predicate modes and predicate registers.  Explicitly restrict
30651         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
30652         to store a vector mode if it is recognized by
30653         aarch64_classify_vector_mode.
30654         (aarch64_regmode_natural_size): New function.
30655         (aarch64_hard_regno_caller_save_mode): Return the original mode
30656         for predicates.
30657         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
30658         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
30659         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
30660         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
30661         functions.
30662         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
30663         does not overlap dest if the function is frame-related.  Handle
30664         SVE constants.
30665         (aarch64_split_add_offset): New function.
30666         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
30667         them aarch64_add_offset.
30668         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
30669         and update call to aarch64_sub_sp.
30670         (aarch64_add_cfa_expression): New function.
30671         (aarch64_expand_prologue): Pass extra temporary registers to the
30672         functions above.  Handle the case in which we need to emit new
30673         DW_CFA_expressions for registers that were originally saved
30674         relative to the stack pointer, but now have to be expressed
30675         relative to the frame pointer.
30676         (aarch64_output_mi_thunk): Pass extra temporary registers to the
30677         functions above.
30678         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
30679         IP0 and IP1 values for SVE frames.
30680         (aarch64_expand_vec_series): New function.
30681         (aarch64_expand_sve_widened_duplicate): Likewise.
30682         (aarch64_expand_sve_const_vector): Likewise.
30683         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
30684         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
30685         into the register, rather than emitting a SET directly.
30686         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
30687         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
30688         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
30689         (offset_9bit_signed_scaled_p): New functions.
30690         (aarch64_replicate_bitmask_imm): New function.
30691         (aarch64_bitmask_imm): Use it.
30692         (aarch64_cannot_force_const_mem): Reject expressions involving
30693         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
30694         (aarch64_classify_index): Handle SVE indices, by requiring
30695         a plain register index with a scale that matches the element size.
30696         (aarch64_classify_address): Handle SVE addresses.  Assert that
30697         the mode of the address is VOIDmode or an integer mode.
30698         Update call to aarch64_classify_symbol.
30699         (aarch64_classify_symbolic_expression): Update call to
30700         aarch64_classify_symbol.
30701         (aarch64_const_vec_all_in_range_p): New function.
30702         (aarch64_print_vector_float_operand): Likewise.
30703         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
30704         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
30705         and the FP immediates 1.0 and 0.5.
30706         (aarch64_print_address_internal): Handle SVE addresses.
30707         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
30708         (aarch64_regno_regclass): Handle predicate registers.
30709         (aarch64_secondary_reload): Handle big-endian reloads of SVE
30710         data modes.
30711         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
30712         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
30713         (aarch64_convert_sve_vector_bits): New function.
30714         (aarch64_override_options): Use it to handle -msve-vector-bits=.
30715         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30716         rather than an rtx.
30717         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
30718         Handle SVE vector and predicate modes.  Accept VL-based constants
30719         that need only one temporary register, and VL offsets that require
30720         no temporary registers.
30721         (aarch64_conditional_register_usage): Mark the predicate registers
30722         as fixed if SVE isn't available.
30723         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
30724         Return true for SVE vector and predicate modes.
30725         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
30726         rather than an unsigned int.  Handle SVE modes.
30727         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
30728         SVE modes.
30729         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
30730         if SVE is enabled.
30731         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30732         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30733         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30734         (aarch64_sve_float_mul_immediate_p): New functions.
30735         (aarch64_sve_valid_immediate): New function.
30736         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
30737         Explicitly reject structure modes.  Check for INDEX constants.
30738         Handle PTRUE and PFALSE constants.
30739         (aarch64_check_zero_based_sve_index_immediate): New function.
30740         (aarch64_simd_imm_zero_p): Delete.
30741         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
30742         vector modes.  Accept constants in the range of CNT[BHWD].
30743         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
30744         ask for an Advanced SIMD mode.
30745         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
30746         (aarch64_simd_vector_alignment): Handle SVE predicates.
30747         (aarch64_vectorize_preferred_vector_alignment): New function.
30748         (aarch64_simd_vector_alignment_reachable): Use it instead of
30749         the vector size.
30750         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
30751         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
30752         functions.
30753         (MAX_VECT_LEN): Delete.
30754         (expand_vec_perm_d): Add a vec_flags field.
30755         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
30756         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
30757         (aarch64_evpc_ext): Don't apply a big-endian lane correction
30758         for SVE modes.
30759         (aarch64_evpc_rev): Rename to...
30760         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
30761         (aarch64_evpc_rev_global): New function.
30762         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
30763         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
30764         MAX_VECT_LEN.
30765         (aarch64_evpc_sve_tbl): New function.
30766         (aarch64_expand_vec_perm_const_1): Update after rename of
30767         aarch64_evpc_rev.  Handle SVE permutes too, trying
30768         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
30769         than aarch64_evpc_tbl.
30770         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
30771         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
30772         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
30773         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
30774         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
30775         (aarch64_expand_sve_vcond): New functions.
30776         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
30777         of aarch64_vector_mode_p.
30778         (aarch64_dwarf_poly_indeterminate_value): New function.
30779         (aarch64_compute_pressure_classes): Likewise.
30780         (aarch64_can_change_mode_class): Likewise.
30781         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
30782         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
30783         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
30784         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30785         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30786         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30787         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30788         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30789         constraints.
30790         (Dn, Dl, Dr): Accept const as well as const_vector.
30791         (Dz): Likewise.  Compare against CONST0_RTX.
30792         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30793         of "vector" where appropriate.
30794         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30795         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30796         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30797         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30798         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30799         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30800         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30801         (v_int_equiv): Extend to SVE modes.
30802         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30803         mode attributes.
30804         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30805         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30806         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30807         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30808         (SVE_COND_FP_CMP): New int iterators.
30809         (perm_hilo): Handle the new unpack unspecs.
30810         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30811         attributes.
30812         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30813         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30814         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30815         (aarch64_equality_operator, aarch64_constant_vector_operand)
30816         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30817         (aarch64_sve_nonimmediate_operand): Likewise.
30818         (aarch64_sve_general_operand): Likewise.
30819         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30820         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30821         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30822         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30823         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30824         (aarch64_sve_float_arith_immediate): Likewise.
30825         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30826         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30827         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30828         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30829         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30830         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30831         (aarch64_sve_float_arith_operand): Likewise.
30832         (aarch64_sve_float_arith_with_sub_operand): Likewise.
30833         (aarch64_sve_float_mul_operand): Likewise.
30834         (aarch64_sve_vec_perm_operand): Likewise.
30835         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30836         (aarch64_mov_operand): Accept const_poly_int and const_vector.
30837         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30838         as well as const_vector.
30839         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30840         in file.  Use CONST0_RTX and CONSTM1_RTX.
30841         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
30842         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30843         Use aarch64_simd_imm_zero.
30844         * config/aarch64/aarch64-sve.md: New file.
30845         * config/aarch64/aarch64.md: Include it.
30846         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30847         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30848         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30849         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30850         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30851         (sve): New attribute.
30852         (enabled): Disable instructions with the sve attribute unless
30853         TARGET_SVE.
30854         (movqi, movhi): Pass CONST_POLY_INT operaneds through
30855         aarch64_expand_mov_immediate.
30856         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30857         CNT[BHSD] immediates.
30858         (movti): Split CONST_POLY_INT moves into two halves.
30859         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30860         Split additions that need a temporary here if the destination
30861         is the stack pointer.
30862         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30863         (*add<mode>3_poly_1): New instruction.
30864         (set_clobber_cc): New expander.
30866 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30868         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30869         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
30870         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30871         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30872         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
30873         Change innermode from fixed_mode_size to machine_mode.
30874         (simplify_subreg): Update call accordingly.  Handle a constant-sized
30875         subreg of a variable-length CONST_VECTOR.
30877 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30878             Alan Hayward  <alan.hayward@arm.com>
30879             David Sherwood  <david.sherwood@arm.com>
30881         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
30882         (add_offset_to_base): New function, split out from...
30883         (create_mem_ref): ...here.  When handling a scale other than 1,
30884         check first whether the address is valid without the offset.
30885         Add it into the base if so, leaving the index and scale as-is.
30887 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
30889         PR c++/83778
30890         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
30891         fold_for_warn before checking if arg2 is INTEGER_CST.
30893 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
30895         * config/rs6000/predicates.md (load_multiple_operation): Delete.
30896         (store_multiple_operation): Delete.
30897         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
30898         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
30899         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
30900         guarded by TARGET_STRING.
30901         (rs6000_output_load_multiple): Delete.
30902         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
30903         OPTION_MASK_STRING / TARGET_STRING handling.
30904         (print_operand) <'N', 'O'>: Add comment that these are unused now.
30905         (const rs6000_opt_masks) <"string">: Change mask to 0.
30906         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
30907         (MASK_STRING): Delete.
30908         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
30909         parts.  Simplify.
30910         (load_multiple): Delete.
30911         (*ldmsi8): Delete.
30912         (*ldmsi7): Delete.
30913         (*ldmsi6): Delete.
30914         (*ldmsi5): Delete.
30915         (*ldmsi4): Delete.
30916         (*ldmsi3): Delete.
30917         (store_multiple): Delete.
30918         (*stmsi8): Delete.
30919         (*stmsi7): Delete.
30920         (*stmsi6): Delete.
30921         (*stmsi5): Delete.
30922         (*stmsi4): Delete.
30923         (*stmsi3): Delete.
30924         (movmemsi_8reg): Delete.
30925         (corresponding unnamed define_insn): Delete.
30926         (movmemsi_6reg): Delete.
30927         (corresponding unnamed define_insn): Delete.
30928         (movmemsi_4reg): Delete.
30929         (corresponding unnamed define_insn): Delete.
30930         (movmemsi_2reg): Delete.
30931         (corresponding unnamed define_insn): Delete.
30932         (movmemsi_1reg): Delete.
30933         (corresponding unnamed define_insn): Delete.
30934         * config/rs6000/rs6000.opt (mno-string): New.
30935         (mstring): Replace by deprecation warning stub.
30936         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
30938 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
30940         * regrename.c (regrename_do_replace): If replacing the same
30941         reg multiple times, try to reuse last created gen_raw_REG.
30943         PR debug/81155
30944         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
30945         main to workaround a bug in GDB.
30947 2018-01-12  Tom de Vries  <tom@codesourcery.com>
30949         PR target/83737
30950         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
30952 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
30954         PR rtl-optimization/80481
30955         * ira-color.c (get_cap_member): New function.
30956         (allocnos_conflict_by_live_ranges_p): Use it.
30957         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
30958         (setup_slot_coalesced_allocno_live_ranges): Ditto.
30960 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
30962         PR target/83628
30963         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
30964         (*saddl_se_1): Ditto.
30965         (*ssubsi_1): Ditto.
30966         (*ssubl_se_1): Ditto.
30968 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
30970         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
30971         rather than wi::to_widest for DR_INITs.
30972         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
30973         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
30974         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
30975         INTEGER_CSTs.
30976         (vect_analyze_group_access_1): Note that here.
30978 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
30980         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
30981         polynomial type sizes.
30983 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
30985         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
30986         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
30987         (gimple_add_tmp_var): Likewise.
30989 2018-01-12  Martin Liska  <mliska@suse.cz>
30991         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
30992         (gimple_alloc_sizes): Likewise.
30993         (dump_gimple_statistics): Use PRIu64 in printf format.
30994         * gimple.h: Change uint64_t to int.
30996 2018-01-12  Martin Liska  <mliska@suse.cz>
30998         * tree-core.h: Use uint64_t instead of int.
30999         * tree.c (tree_node_counts): Likewise.
31000         (tree_node_sizes): Likewise.
31001         (dump_tree_statistics): Use PRIu64 in printf format.
31003 2018-01-12  Martin Liska  <mliska@suse.cz>
31005         * Makefile.in: As qsort_chk is implemented in vec.c, add
31006         vec.o to linkage of gencfn-macros.
31007         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31008         passing the info to record_node_allocation_statistics.
31009         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31010         and pass the info.
31011         * ggc-common.c (struct ggc_usage): Add operator== and use
31012         it in operator< and compare function.
31013         * mem-stats.h (struct mem_usage): Likewise.
31014         * vec.c (struct vec_usage): Remove operator< and compare
31015         function. Can be simply inherited.
31017 2018-01-12  Martin Jambor  <mjambor@suse.cz>
31019         PR target/81616
31020         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31021         * tree-ssa-math-opts.c: Include domwalk.h.
31022         (convert_mult_to_fma_1): New function.
31023         (fma_transformation_info): New type.
31024         (fma_deferring_state): Likewise.
31025         (cancel_fma_deferring): New function.
31026         (result_of_phi): Likewise.
31027         (last_fma_candidate_feeds_initial_phi): Likewise.
31028         (convert_mult_to_fma): Added deferring logic, split actual
31029         transformation to convert_mult_to_fma_1.
31030         (math_opts_dom_walker): New type.
31031         (math_opts_dom_walker::after_dom_children): New method, body moved
31032         here from pass_optimize_widening_mul::execute, added deferring logic
31033         bits.
31034         (pass_optimize_widening_mul::execute): Moved most of code to
31035         math_opts_dom_walker::after_dom_children.
31036         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31037         * config/i386/i386.c (ix86_option_override_internal): Added
31038         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31040 2018-01-12  Richard Biener  <rguenther@suse.de>
31042         PR debug/83157
31043         * dwarf2out.c (gen_variable_die): Do not reset old_die for
31044         inline instance vars.
31046 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
31048         PR target/81819
31049         * config/rx/rx.c (rx_is_restricted_memory_address):
31050         Handle SUBREG case.
31052 2018-01-12  Richard Biener  <rguenther@suse.de>
31054         PR tree-optimization/80846
31055         * target.def (split_reduction): New target hook.
31056         * targhooks.c (default_split_reduction): New function.
31057         * targhooks.h (default_split_reduction): Declare.
31058         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31059         target requests first reduce vectors by combining low and high
31060         parts.
31061         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31062         (get_vectype_for_scalar_type_and_size): Export.
31063         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31064         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31065         * doc/tm.texi: Regenerate.
31066         * config/i386/i386.c (ix86_split_reduction): Implement
31067         TARGET_VECTORIZE_SPLIT_REDUCTION.
31069 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31071         PR target/83368
31072         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31073         in PIC mode except for TARGET_VXWORKS_RTP.
31074         * config/sparc/sparc.c: Include cfgrtl.h.
31075         (TARGET_INIT_PIC_REG): Define.
31076         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31077         (sparc_pic_register_p): New predicate.
31078         (sparc_legitimate_address_p): Use it.
31079         (sparc_legitimize_pic_address): Likewise.
31080         (sparc_delegitimize_address): Likewise.
31081         (sparc_mode_dependent_address_p): Likewise.
31082         (gen_load_pcrel_sym): Remove 4th parameter.
31083         (load_got_register): Adjust call to above.  Remove obsolete stuff.
31084         (sparc_expand_prologue): Do not call load_got_register here.
31085         (sparc_flat_expand_prologue): Likewise.
31086         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31087         (sparc_use_pseudo_pic_reg): New function.
31088         (sparc_init_pic_reg): Likewise.
31089         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31090         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31092 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
31094         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31095         Add item for branch_cost.
31097 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
31099         PR rtl-optimization/83565
31100         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31101         not extend the result to a larger mode for rotate operations.
31102         (num_sign_bit_copies1): Likewise.
31104 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31106         PR target/40411
31107         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31108         -symbolic.
31109         Use values-Xc.o for -pedantic.
31110         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31112 2018-01-12  Martin Liska  <mliska@suse.cz>
31114         PR ipa/83054
31115         * ipa-devirt.c (final_warning_record::grow_type_warnings):
31116         New function.
31117         (possible_polymorphic_call_targets): Use it.
31118         (ipa_devirt): Likewise.
31120 2018-01-12  Martin Liska  <mliska@suse.cz>
31122         * profile-count.h (enum profile_quality): Use 0 as invalid
31123         enum value of profile_quality.
31125 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
31127         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31128         -mext-string options.
31130 2018-01-12  Richard Biener  <rguenther@suse.de>
31132         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31133         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31134         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31135         Likewise.
31136         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31138 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
31140         * configure.ac (--with-long-double-format): Add support for the
31141         configuration option to change the default long double format on
31142         PowerPC systems.
31143         * config.gcc (powerpc*-linux*-*): Likewise.
31144         * configure: Regenerate.
31145         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31146         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31147         used without modification.
31149 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31151         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31152         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31153         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31154         MISC_BUILTIN_SPEC_BARRIER.
31155         (rs6000_init_builtins): Likewise.
31156         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31157         enum value.
31158         (speculation_barrier): New define_insn.
31159         * doc/extend.texi: Document __builtin_speculation_barrier.
31161 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31163         PR target/83203
31164         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31165         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31166         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31167         iterators.
31168         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
31169         integral modes instead of "ss" and "sd".
31170         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31171         vectors with 32-bit and 64-bit elements.
31172         (vecdupssescalarmodesuffix): New mode attribute.
31173         (vec_dup<mode>): Use it.
31175 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
31177         PR target/83330
31178         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31179         frame if argument is passed on stack.
31181 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
31183         PR target/82682
31184         * ree.c (combine_reaching_defs): Optimize also
31185         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31186         reg2=any_extend(exp); reg1=reg2;, formatting fix.
31188 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31190         PR middle-end/83189
31191         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31193 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
31195         PR middle-end/83718
31196         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31197         after they are computed.
31199 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
31201         PR tree-optimization/83695
31202         * gimple-loop-linterchange.cc
31203         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31204         reset cached scev information after interchange.
31205         (pass_linterchange::execute): Remove call to scev_reset_htab.
31207 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31209         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
31210         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
31211         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
31212         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
31213         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
31214         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
31215         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
31216         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
31217         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
31218         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
31219         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
31220         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
31221         (V_lane_reg): Likewise.
31222         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
31223         New define_expand.
31224         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
31225         (vfmal_lane_low<mode>_intrinsic,
31226         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
31227         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
31228         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
31229         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
31230         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
31231         vfmsl_lane_high<mode>_intrinsic): New define_insns.
31233 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31235         * config/arm/arm-cpus.in (fp16fml): New feature.
31236         (ALL_SIMD): Add fp16fml.
31237         (armv8.2-a): Add fp16fml as an option.
31238         (armv8.3-a): Likewise.
31239         (armv8.4-a): Add fp16fml as part of fp16.
31240         * config/arm/arm.h (TARGET_FP16FML): Define.
31241         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
31242         when appropriate.
31243         * config/arm/arm-modes.def (V2HF): Define.
31244         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
31245         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
31246         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
31247         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
31248         vfmsl_low, vfmsl_high): New set of builtins.
31249         * config/arm/iterators.md (PLUSMINUS): New code iterator.
31250         (vfml_op): New code attribute.
31251         (VFMLHALVES): New int iterator.
31252         (VFML, VFMLSEL): New mode attributes.
31253         (V_reg): Define mapping for V2HF.
31254         (V_hi, V_lo): New mode attributes.
31255         (VF_constraint): Likewise.
31256         (vfml_half, vfml_half_selector): New int attributes.
31257         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
31258         define_expand.
31259         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
31260         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
31261         New define_insn.
31262         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
31263         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
31264         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
31265         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
31266         documentation.
31267         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
31268         Document new effective target and option set.
31270 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31272         * config/arm/arm-cpus.in (armv8_4): New feature.
31273         (ARMv8_4a): New fgroup.
31274         (armv8.4-a): New arch.
31275         * config/arm/arm-tables.opt: Regenerate.
31276         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
31277         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
31278         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
31279         Add matching rules for -march=armv8.4-a and extensions.
31280         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
31282 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
31284         PR target/81821
31285         * config/rx/rx.md (BW): New mode attribute.
31286         (sync_lock_test_and_setsi): Add mode suffix to insn output.
31288 2018-01-11  Richard Biener  <rguenther@suse.de>
31290         PR tree-optimization/83435
31291         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
31292         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
31293         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
31295 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31296             Alan Hayward  <alan.hayward@arm.com>
31297             David Sherwood  <david.sherwood@arm.com>
31299         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
31300         field.
31301         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
31302         (aarch64_print_address_internal): Use it to check for a zero offset.
31304 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31305             Alan Hayward  <alan.hayward@arm.com>
31306             David Sherwood  <david.sherwood@arm.com>
31308         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
31309         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
31310         Return a poly_int64 rather than a HOST_WIDE_INT.
31311         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
31312         rather than a HOST_WIDE_INT.
31313         * config/aarch64/aarch64.h (aarch64_frame): Protect with
31314         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
31315         hard_fp_offset, frame_size, initial_adjust, callee_offset and
31316         final_offset from HOST_WIDE_INT to poly_int64.
31317         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
31318         to_constant when getting the number of units in an Advanced SIMD
31319         mode.
31320         (aarch64_builtin_vectorized_function): Check for a constant number
31321         of units.
31322         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
31323         GET_MODE_SIZE.
31324         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
31325         attribute instead of GET_MODE_NUNITS.
31326         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
31327         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
31328         GET_MODE_SIZE for fixed-size registers.
31329         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
31330         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
31331         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
31332         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
31333         (aarch64_print_operand, aarch64_print_address_internal)
31334         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
31335         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
31336         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
31337         Handle polynomial GET_MODE_SIZE.
31338         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
31339         wider than SImode without modification.
31340         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
31341         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
31342         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
31343         passing and returning SVE modes.
31344         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
31345         rather than GEN_INT.
31346         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
31347         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
31348         (aarch64_allocate_and_probe_stack_space): Likewise.
31349         (aarch64_layout_frame): Cope with polynomial offsets.
31350         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
31351         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
31352         polynomial offsets.
31353         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
31354         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
31355         poly_int64 rather than a HOST_WIDE_INT.
31356         (aarch64_get_separate_components, aarch64_process_components)
31357         (aarch64_expand_prologue, aarch64_expand_epilogue)
31358         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
31359         (aarch64_anchor_offset): New function, split out from...
31360         (aarch64_legitimize_address): ...here.
31361         (aarch64_builtin_vectorization_cost): Handle polynomial
31362         TYPE_VECTOR_SUBPARTS.
31363         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
31364         GET_MODE_NUNITS.
31365         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
31366         number of elements from the PARALLEL rather than the mode.
31367         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
31368         rather than GET_MODE_BITSIZE.
31369         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
31370         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
31371         (aarch64_expand_vec_perm_const_1): Handle polynomial
31372         d->perm.length () and d->perm elements.
31373         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
31374         Apply to_constant to d->perm elements.
31375         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
31376         polynomial CONST_VECTOR_NUNITS.
31377         (aarch64_move_pointer): Take amount as a poly_int64 rather
31378         than an int.
31379         (aarch64_progress_pointer): Avoid temporary variable.
31380         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
31381         the mode attribute instead of GET_MODE.
31383 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31384             Alan Hayward  <alan.hayward@arm.com>
31385             David Sherwood  <david.sherwood@arm.com>
31387         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
31388         x exists before using it.
31389         (aarch64_add_constant_internal): Rename to...
31390         (aarch64_add_offset_1): ...this.  Replace regnum with separate
31391         src and dest rtxes.  Handle the case in which they're different,
31392         including when the offset is zero.  Replace scratchreg with an rtx.
31393         Use 2 additions if there is no spare register into which we can
31394         move a 16-bit constant.
31395         (aarch64_add_constant): Delete.
31396         (aarch64_add_offset): Replace reg with separate src and dest
31397         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
31398         Use aarch64_add_offset_1.
31399         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
31400         an rtx rather than an int.  Take the delta as a poly_int64
31401         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
31402         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
31403         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
31404         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
31405         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
31406         and aarch64_add_sp.
31407         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
31408         aarch64_add_constant.
31410 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31412         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
31413         Use scalar_float_mode.
31415 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31417         * config/aarch64/aarch64-simd.md
31418         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
31419         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
31420         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
31421         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
31422         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
31423         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
31424         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
31425         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
31426         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
31427         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
31429 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31431         PR target/83514
31432         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
31433         targ_options->x_arm_arch_string is non NULL.
31435 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
31437         * config/aarch64/aarch64.h
31438         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
31440 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
31442         PR target/82096
31443         * expmed.c (emit_store_flag_force): Swap if const op0
31444         and change VOIDmode to mode of op0.
31446 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
31448         PR rtl-optimization/83761
31449         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
31450         than bytes to mode_for_size.
31452 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31454         PR middle-end/83189
31455         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
31456         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
31457         profile.
31459 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31461         PR middle-end/83575
31462         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
31463         when in layout mode.
31464         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
31465         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
31466         partition fixup.
31468 2018-01-10  Michael Collison  <michael.collison@arm.com>
31470         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
31471         * config/aarch64/aarch64-option-extension.def: Add
31472         AARCH64_OPT_EXTENSION of 'fp16fml'.
31473         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31474         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
31475         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
31476         * config/aarch64/constraints.md (Ui7): New constraint.
31477         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
31478         (VFMLA_SEL_W): Ditto.
31479         (f16quad): Ditto.
31480         (f16mac1): Ditto.
31481         (VFMLA16_LOW): New int iterator.
31482         (VFMLA16_HIGH): Ditto.
31483         (UNSPEC_FMLAL): New unspec.
31484         (UNSPEC_FMLSL): Ditto.
31485         (UNSPEC_FMLAL2): Ditto.
31486         (UNSPEC_FMLSL2): Ditto.
31487         (f16mac): New code attribute.
31488         * config/aarch64/aarch64-simd-builtins.def
31489         (aarch64_fmlal_lowv2sf): Ditto.
31490         (aarch64_fmlsl_lowv2sf): Ditto.
31491         (aarch64_fmlalq_lowv4sf): Ditto.
31492         (aarch64_fmlslq_lowv4sf): Ditto.
31493         (aarch64_fmlal_highv2sf): Ditto.
31494         (aarch64_fmlsl_highv2sf): Ditto.
31495         (aarch64_fmlalq_highv4sf): Ditto.
31496         (aarch64_fmlslq_highv4sf): Ditto.
31497         (aarch64_fmlal_lane_lowv2sf): Ditto.
31498         (aarch64_fmlsl_lane_lowv2sf): Ditto.
31499         (aarch64_fmlal_laneq_lowv2sf): Ditto.
31500         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
31501         (aarch64_fmlalq_lane_lowv4sf): Ditto.
31502         (aarch64_fmlsl_lane_lowv4sf): Ditto.
31503         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
31504         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
31505         (aarch64_fmlal_lane_highv2sf): Ditto.
31506         (aarch64_fmlsl_lane_highv2sf): Ditto.
31507         (aarch64_fmlal_laneq_highv2sf): Ditto.
31508         (aarch64_fmlsl_laneq_highv2sf): Ditto.
31509         (aarch64_fmlalq_lane_highv4sf): Ditto.
31510         (aarch64_fmlsl_lane_highv4sf): Ditto.
31511         (aarch64_fmlalq_laneq_highv4sf): Ditto.
31512         (aarch64_fmlsl_laneq_highv4sf): Ditto.
31513         * config/aarch64/aarch64-simd.md:
31514         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
31515         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31516         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
31517         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31518         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
31519         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
31520         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
31521         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
31522         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
31523         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
31524         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
31525         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
31526         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
31527         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
31528         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
31529         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
31530         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
31531         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
31532         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
31533         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
31534         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
31535         (vfmlsl_low_u32): Ditto.
31536         (vfmlalq_low_u32): Ditto.
31537         (vfmlslq_low_u32): Ditto.
31538         (vfmlal_high_u32): Ditto.
31539         (vfmlsl_high_u32): Ditto.
31540         (vfmlalq_high_u32): Ditto.
31541         (vfmlslq_high_u32): Ditto.
31542         (vfmlal_lane_low_u32): Ditto.
31543         (vfmlsl_lane_low_u32): Ditto.
31544         (vfmlal_laneq_low_u32): Ditto.
31545         (vfmlsl_laneq_low_u32): Ditto.
31546         (vfmlalq_lane_low_u32): Ditto.
31547         (vfmlslq_lane_low_u32): Ditto.
31548         (vfmlalq_laneq_low_u32): Ditto.
31549         (vfmlslq_laneq_low_u32): Ditto.
31550         (vfmlal_lane_high_u32): Ditto.
31551         (vfmlsl_lane_high_u32): Ditto.
31552         (vfmlal_laneq_high_u32): Ditto.
31553         (vfmlsl_laneq_high_u32): Ditto.
31554         (vfmlalq_lane_high_u32): Ditto.
31555         (vfmlslq_lane_high_u32): Ditto.
31556         (vfmlalq_laneq_high_u32): Ditto.
31557         (vfmlslq_laneq_high_u32): Ditto.
31558         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
31559         (AARCH64_FL_FOR_ARCH8_4): New.
31560         (AARCH64_ISA_F16FML): New ISA flag.
31561         (TARGET_F16FML): New feature flag for fp16fml.
31562         (doc/invoke.texi): Document new fp16fml option.
31564 2018-01-10  Michael Collison  <michael.collison@arm.com>
31566         * config/aarch64/aarch64-builtins.c:
31567         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
31568         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31569         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
31570         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
31571         (AARCH64_ISA_SHA3): New ISA flag.
31572         (TARGET_SHA3): New feature flag for sha3.
31573         * config/aarch64/iterators.md (sha512_op): New int attribute.
31574         (CRYPTO_SHA512): New int iterator.
31575         (UNSPEC_SHA512H): New unspec.
31576         (UNSPEC_SHA512H2): Ditto.
31577         (UNSPEC_SHA512SU0): Ditto.
31578         (UNSPEC_SHA512SU1): Ditto.
31579         * config/aarch64/aarch64-simd-builtins.def
31580         (aarch64_crypto_sha512hqv2di): New builtin.
31581         (aarch64_crypto_sha512h2qv2di): Ditto.
31582         (aarch64_crypto_sha512su0qv2di): Ditto.
31583         (aarch64_crypto_sha512su1qv2di): Ditto.
31584         (aarch64_eor3qv8hi): Ditto.
31585         (aarch64_rax1qv2di): Ditto.
31586         (aarch64_xarqv2di): Ditto.
31587         (aarch64_bcaxqv8hi): Ditto.
31588         * config/aarch64/aarch64-simd.md:
31589         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
31590         (aarch64_crypto_sha512su0qv2di): Ditto.
31591         (aarch64_crypto_sha512su1qv2di): Ditto.
31592         (aarch64_eor3qv8hi): Ditto.
31593         (aarch64_rax1qv2di): Ditto.
31594         (aarch64_xarqv2di): Ditto.
31595         (aarch64_bcaxqv8hi): Ditto.
31596         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
31597         (vsha512h2q_u64): Ditto.
31598         (vsha512su0q_u64): Ditto.
31599         (vsha512su1q_u64): Ditto.
31600         (veor3q_u16): Ditto.
31601         (vrax1q_u64): Ditto.
31602         (vxarq_u64): Ditto.
31603         (vbcaxq_u16): Ditto.
31604         * config/arm/types.md (crypto_sha512): New type attribute.
31605         (crypto_sha3): Ditto.
31606         (doc/invoke.texi): Document new sha3 option.
31608 2018-01-10  Michael Collison  <michael.collison@arm.com>
31610         * config/aarch64/aarch64-builtins.c:
31611         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
31612         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31613         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
31614         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
31615         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
31616         (AARCH64_ISA_SM4): New ISA flag.
31617         (TARGET_SM4): New feature flag for sm4.
31618         * config/aarch64/aarch64-simd-builtins.def
31619         (aarch64_sm3ss1qv4si): Ditto.
31620         (aarch64_sm3tt1aq4si): Ditto.
31621         (aarch64_sm3tt1bq4si): Ditto.
31622         (aarch64_sm3tt2aq4si): Ditto.
31623         (aarch64_sm3tt2bq4si): Ditto.
31624         (aarch64_sm3partw1qv4si): Ditto.
31625         (aarch64_sm3partw2qv4si): Ditto.
31626         (aarch64_sm4eqv4si): Ditto.
31627         (aarch64_sm4ekeyqv4si): Ditto.
31628         * config/aarch64/aarch64-simd.md:
31629         (aarch64_sm3ss1qv4si): Ditto.
31630         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
31631         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
31632         (aarch64_sm4eqv4si): Ditto.
31633         (aarch64_sm4ekeyqv4si): Ditto.
31634         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
31635         (sm3part_op): Ditto.
31636         (CRYPTO_SM3TT): Ditto.
31637         (CRYPTO_SM3PART): Ditto.
31638         (UNSPEC_SM3SS1): New unspec.
31639         (UNSPEC_SM3TT1A): Ditto.
31640         (UNSPEC_SM3TT1B): Ditto.
31641         (UNSPEC_SM3TT2A): Ditto.
31642         (UNSPEC_SM3TT2B): Ditto.
31643         (UNSPEC_SM3PARTW1): Ditto.
31644         (UNSPEC_SM3PARTW2): Ditto.
31645         (UNSPEC_SM4E): Ditto.
31646         (UNSPEC_SM4EKEY): Ditto.
31647         * config/aarch64/constraints.md (Ui2): New constraint.
31648         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
31649         * config/arm/types.md (crypto_sm3): New type attribute.
31650         (crypto_sm4): Ditto.
31651         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
31652         (vsm3tt1aq_u32): Ditto.
31653         (vsm3tt1bq_u32): Ditto.
31654         (vsm3tt2aq_u32): Ditto.
31655         (vsm3tt2bq_u32): Ditto.
31656         (vsm3partw1q_u32): Ditto.
31657         (vsm3partw2q_u32): Ditto.
31658         (vsm4eq_u32): Ditto.
31659         (vsm4ekeyq_u32): Ditto.
31660         (doc/invoke.texi): Document new sm4 option.
31662 2018-01-10  Michael Collison  <michael.collison@arm.com>
31664         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
31665         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
31666         (AARCH64_FL_FOR_ARCH8_4): New.
31667         (AARCH64_FL_V8_4): New flag.
31668         (doc/invoke.texi): Document new armv8.4-a option.
31670 2018-01-10  Michael Collison  <michael.collison@arm.com>
31672         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31673         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
31674         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
31675         * config/aarch64/aarch64-option-extension.def: Add
31676         AARCH64_OPT_EXTENSION of 'sha2'.
31677         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
31678         (crypto): Disable sha2 and aes if crypto disabled.
31679         (crypto): Enable aes and sha2 if enabled.
31680         (simd): Disable sha2 and aes if simd disabled.
31681         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
31682         New flags.
31683         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
31684         (TARGET_SHA2): New feature flag for sha2.
31685         (TARGET_AES): New feature flag for aes.
31686         * config/aarch64/aarch64-simd.md:
31687         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
31688         conditional on TARGET_AES.
31689         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
31690         (aarch64_crypto_sha1hsi): Make pattern conditional
31691         on TARGET_SHA2.
31692         (aarch64_crypto_sha1hv4si): Ditto.
31693         (aarch64_be_crypto_sha1hv4si): Ditto.
31694         (aarch64_crypto_sha1su1v4si): Ditto.
31695         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
31696         (aarch64_crypto_sha1su0v4si): Ditto.
31697         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
31698         (aarch64_crypto_sha256su0v4si): Ditto.
31699         (aarch64_crypto_sha256su1v4si): Ditto.
31700         (doc/invoke.texi): Document new aes and sha2 options.
31702 2018-01-10  Martin Sebor  <msebor@redhat.com>
31704         PR tree-optimization/83781
31705         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
31706         as string arrays.
31708 2018-01-11  Martin Sebor  <msebor@gmail.com>
31709             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31711         PR tree-optimization/83501
31712         PR tree-optimization/81703
31714         * tree-ssa-strlen.c (get_string_cst): Rename...
31715         (get_string_len): ...to this.  Handle global constants.
31716         (handle_char_store): Adjust.
31718 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
31719             Jim Wilson  <jimw@sifive.com>
31721         * config/riscv/riscv-protos.h (riscv_output_return): New.
31722         * config/riscv/riscv.c (struct machine_function): New naked_p field.
31723         (riscv_attribute_table, riscv_output_return),
31724         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
31725         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
31726         (riscv_compute_frame_info): Only compute frame->mask if not a naked
31727         function.
31728         (riscv_expand_prologue): Add early return for naked function.
31729         (riscv_expand_epilogue): Likewise.
31730         (riscv_function_ok_for_sibcall): Return false for naked function.
31731         (riscv_set_current_function): New.
31732         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
31733         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
31734         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
31735         * doc/extend.texi (RISC-V Function Attributes): New.
31737 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
31739         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
31740         check for 128-bit long double before checking TCmode.
31741         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
31742         128-bit long doubles before checking TFmode or TCmode.
31743         (FLOAT128_IBM_P): Likewise.
31745 2018-01-10  Martin Sebor  <msebor@redhat.com>
31747         PR tree-optimization/83671
31748         * builtins.c (c_strlen): Unconditionally return zero for the empty
31749         string.
31750         Use -Warray-bounds for warnings.
31751         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
31752         for non-constant array indices with COMPONENT_REF, arrays of
31753         arrays, and pointers to arrays.
31754         (gimple_fold_builtin_strlen): Determine and set length range for
31755         non-constant character arrays.
31757 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
31759         PR middle-end/81897
31760         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
31761         empty blocks.
31763 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
31765         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
31767 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
31769         PR target/83399
31770         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
31771         VECTOR_MEM_ALTIVEC_OR_VSX_P.
31772         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
31773         indexed_or_indirect_operand predicate.
31774         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
31775         (*vsx_le_perm_load_v8hi): Likewise.
31776         (*vsx_le_perm_load_v16qi): Likewise.
31777         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
31778         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
31779         (*vsx_le_perm_store_v8hi): Likewise.
31780         (*vsx_le_perm_store_v16qi): Likewise.
31781         (eight unnamed splitters): Likewise.
31783 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
31785         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31786         * config/rs6000/emmintrin.h: Likewise.
31787         * config/rs6000/mmintrin.h: Likewise.
31788         * config/rs6000/xmmintrin.h: Likewise.
31790 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
31792         PR c++/43486
31793         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31794         "public_flag".
31795         * tree.c (tree_nop_conversion): Return true for location wrapper
31796         nodes.
31797         (maybe_wrap_with_location): New function.
31798         (selftest::check_strip_nops): New function.
31799         (selftest::test_location_wrappers): New function.
31800         (selftest::tree_c_tests): Call it.
31801         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31802         (maybe_wrap_with_location): New decl.
31803         (EXPR_LOCATION_WRAPPER_P): New macro.
31804         (location_wrapper_p): New inline function.
31805         (tree_strip_any_location_wrapper): New inline function.
31807 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
31809         PR target/83735
31810         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31811         stack_realign_offset for the largest alignment of stack slot
31812         actually used.
31813         (ix86_find_max_used_stack_alignment): New function.
31814         (ix86_finalize_stack_frame_flags): Use it.  Set
31815         max_used_stack_alignment if we don't realign stack.
31816         * config/i386/i386.h (machine_function): Add
31817         max_used_stack_alignment.
31819 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
31821         * config/arm/arm.opt (-mbranch-cost): New option.
31822         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31823         account.
31825 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
31827         PR target/83629
31828         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31829         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31831 2018-01-10  Richard Biener  <rguenther@suse.de>
31833         PR debug/83765
31834         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31835         early out so it also covers the case where we have a non-NULL
31836         origin.
31838 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
31840         PR tree-optimization/83753
31841         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31842         for non-strided grouped accesses if the number of elements is 1.
31844 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31846         PR target/81616
31847         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31848         * i386.h (TARGET_USE_GATHER): Define.
31849         * x86-tune.def (X86_TUNE_USE_GATHER): New.
31851 2018-01-10  Martin Liska  <mliska@suse.cz>
31853         PR bootstrap/82831
31854         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31855         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31856         partitioning.
31857         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31858         CLEANUP_NO_PARTITIONING is not set.
31860 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
31862         * doc/rtl.texi: Remove documentation of (const ...) wrappers
31863         for vectors, as a partial revert of r254296.
31864         * rtl.h (const_vec_p): Delete.
31865         (const_vec_duplicate_p): Don't test for vector CONSTs.
31866         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31867         * expmed.c (make_tree): Likewise.
31869         Revert:
31870         * common.md (E, F): Use CONSTANT_P instead of checking for
31871         CONST_VECTOR.
31872         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31873         checking for CONST_VECTOR.
31875 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
31877         PR middle-end/83575
31878         * predict.c (force_edge_cold): Handle in more sane way edges
31879         with no prediction.
31881 2018-01-09  Carl Love  <cel@us.ibm.com>
31883         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
31884         V4SI, V4SF types.
31885         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
31886         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
31887         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
31888         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
31889         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
31890         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
31891         * config/rs6000/rs6000-protos.h: Add extern defition for
31892         rs6000_generate_float2_double_code.
31893         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
31894         function.
31895         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
31896         (float2_v2df): Add define_expand.
31898 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
31900         PR target/83628
31901         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
31902         op_mode in the force_to_mode call.
31904 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
31906         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
31907         instead of checking each element individually.
31908         (aarch64_evpc_uzp): Likewise.
31909         (aarch64_evpc_zip): Likewise.
31910         (aarch64_evpc_ext): Likewise.
31911         (aarch64_evpc_rev): Likewise.
31912         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
31913         instead of checking each element individually.  Return true without
31914         generating rtl if
31915         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
31916         whether all selected elements come from the same input, instead of
31917         checking each element individually.  Remove calls to gen_rtx_REG,
31918         start_sequence and end_sequence and instead assert that no rtl is
31919         generated.
31921 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
31923         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
31924         order of HIGH and CONST checks.
31926 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
31928         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
31929         if the destination isn't an SSA_NAME.
31931 2018-01-09  Richard Biener  <rguenther@suse.de>
31933         PR tree-optimization/83668
31934         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
31935         move prologue...
31936         (canonicalize_loop_form): ... here, renamed from ...
31937         (canonicalize_loop_closed_ssa_form): ... this and amended to
31938         swap successor edges for loop exit blocks to make us use
31939         the RPO order we need for initial schedule generation.
31941 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
31943         PR tree-optimization/64811
31944         * match.pd: When optimizing comparisons with Inf, avoid
31945         introducing or losing exceptions from comparisons with NaN.
31947 2018-01-09  Martin Liska  <mliska@suse.cz>
31949         PR sanitizer/82517
31950         * asan.c (shadow_mem_size): Add gcc_assert.
31952 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
31954         Don't save registers in main().
31956         PR target/83738
31957         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
31958         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
31959         * config/avr/avr.c (avr_set_current_function): Don't error if
31960         naked, OS_task or OS_main are specified at the same time.
31961         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
31962         OS_main.
31963         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
31964         attribute.
31965         * common/config/avr/avr-common.c (avr_option_optimization_table):
31966         Switch on -mmain-is-OS_task for optimizing compilations.
31968 2018-01-09  Richard Biener  <rguenther@suse.de>
31970         PR tree-optimization/83572
31971         * graphite.c: Include cfganal.h.
31972         (graphite_transform_loops): Connect infinite loops to exit
31973         and remove fake edges at the end.
31975 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
31977         * ipa-inline.c (edge_badness): Revert accidental checkin.
31979 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
31981         PR ipa/80763
31982         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
31983         symbols; not inline clones.
31985 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
31987         PR target/83507
31988         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
31989         hard registers.  Formatting fixes.
31991         PR preprocessor/83722
31992         * gcc.c (try_generate_repro): Pass
31993         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
31994         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
31995         do_report_bug.
31997 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
31998             Kito Cheng  <kito.cheng@gmail.com>
32000         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32001         (riscv_leaf_function_p): Delete.
32002         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32004 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32006         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32007         function.
32008         (do_ifelse): New function.
32009         (do_isel): New function.
32010         (do_sub3): New function.
32011         (do_add3): New function.
32012         (do_load_mask_compare): New function.
32013         (do_overlap_load_compare): New function.
32014         (expand_compare_loop): New function.
32015         (expand_block_compare): Call expand_compare_loop() when appropriate.
32016         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32017         option description.
32018         (-mblock-compare-inline-loop-limit): New option.
32020 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32022         PR target/83677
32023         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32024         Reverse order of second and third operands in first alternative.
32025         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32026         of first and second elements in UNSPEC_VPERMR vector.
32027         (altivec_expand_vec_perm_le): Likewise.
32029 2018-01-08  Jeff Law  <law@redhat.com>
32031         PR rtl-optimizatin/81308
32032         * tree-switch-conversion.c (cfg_altered): New file scoped static.
32033         (process_switch): If group_case_labels makes a change, then set
32034         cfg_altered.
32035         (pass_convert_switch::execute): If a switch is converted, then
32036         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
32038         PR rtl-optimization/81308
32039         * recog.c (split_all_insns): Conditionally cleanup the CFG after
32040         splitting insns.
32042 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
32044         PR target/83663 - Revert r255946
32045         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32046         generation for cases where splatting a value is not useful.
32047         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32048         across a vec_duplicate and a paradoxical subreg forming a vector
32049         mode to a vec_concat.
32051 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32053         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32054         -march=armv8.3-a variants.
32055         * config/arm/t-multilib: Likewise.
32056         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
32058 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32060         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32061         to generate rtl.
32062         (cceq_ior_compare_complement): Give it a name so I can use it, and
32063         change boolean_or_operator predicate to boolean_operator so it can
32064         be used to generate a crand.
32065         (eqne): New code iterator.
32066         (bd/bd_neg): New code_attrs.
32067         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32068         a single define_insn.
32069         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32070         decrement (bdnzt/bdnzf/bdzt/bdzf).
32071         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32072         with the new names of the branch decrement patterns, and added the
32073         names of the branch decrement conditional patterns.
32075 2018-01-08  Richard Biener  <rguenther@suse.de>
32077         PR tree-optimization/83563
32078         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32079         cache.
32081 2018-01-08  Richard Biener  <rguenther@suse.de>
32083         PR middle-end/83713
32084         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32086 2018-01-08  Richard Biener  <rguenther@suse.de>
32088         PR tree-optimization/83685
32089         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32090         references to abnormals.
32092 2018-01-08  Richard Biener  <rguenther@suse.de>
32094         PR lto/83719
32095         * dwarf2out.c (output_indirect_strings): Handle empty
32096         skeleton_debug_str_hash.
32097         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32099 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32101         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32102         (emit_store_direct): Likewise.
32103         (arc_trampoline_adjust_address): Likewise.
32104         (arc_asm_trampoline_template): New function.
32105         (arc_initialize_trampoline): Use asm_trampoline_template.
32106         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32107         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32108         * config/arc/arc.md (flush_icache): Delete pattern.
32110 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
32112         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32113         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32114         munaligned-access.
32116 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32118         PR target/83681
32119         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32120         by not USED_FOR_TARGET.
32121         (make_pass_resolve_sw_modes): Likewise.
32123 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32125         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32126         USED_FOR_TARGET.
32128 2018-01-08  Richard Biener  <rguenther@suse.de>
32130         PR middle-end/83580
32131         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32133 2018-01-08  Richard Biener  <rguenther@suse.de>
32135         PR middle-end/83517
32136         * match.pd ((t * 2) / 2) -> t): Add missing :c.
32138 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
32140         PR middle-end/81897
32141         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32142         basic blocks with a small number of successors.
32143         (convert_control_dep_chain_into_preds): Improve handling of
32144         forwarder blocks.
32145         (dump_predicates): Split apart into...
32146         (dump_pred_chain): ...here...
32147         (dump_pred_info): ...and here.
32148         (can_one_predicate_be_invalidated_p): Add debugging printfs.
32149         (can_chain_union_be_invalidated_p): Improve check for invalidation
32150         of paths.
32151         (uninit_uses_cannot_happen): Avoid unnecessary if
32152         convert_control_dep_chain_into_preds yielded nothing.
32154 2018-01-06  Martin Sebor  <msebor@redhat.com>
32156         PR tree-optimization/83640
32157         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32158         subtracting negative offset from size.
32159         (builtin_access::overlap): Adjust offset bounds of the access to fall
32160         within the size of the object if possible.
32162 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
32164         PR rtl-optimization/83699
32165         * expmed.c (extract_bit_field_1): Restrict the vector usage of
32166         extract_bit_field_as_subreg to cases in which the extracted
32167         value is also a vector.
32169         * lra-constraints.c (process_alt_operands): Test for the equivalence
32170         substitutions when detecting a possible reload cycle.
32172 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
32174         PR debug/83480
32175         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32176         by default if flag_selective_schedling{,2}.  Formatting fixes.
32178         PR rtl-optimization/83682
32179         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32180         if it has non-VECTOR_MODE element mode.
32181         (vec_duplicate_p): Likewise.
32183         PR middle-end/83694
32184         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32185         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32187 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32189         PR target/83604
32190         * config/i386/i386-builtin.def
32191         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32192         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32193         Require also OPTION_MASK_ISA_AVX512F in addition to
32194         OPTION_MASK_ISA_GFNI.
32195         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32196         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32197         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32198         to OPTION_MASK_ISA_GFNI.
32199         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32200         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32201         OPTION_MASK_ISA_AVX512BW.
32202         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32203         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32204         addition to OPTION_MASK_ISA_GFNI.
32205         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32206         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32207         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
32208         to OPTION_MASK_ISA_GFNI.
32209         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
32210         a requirement for all ISAs rather than any of them with a few
32211         exceptions.
32212         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
32213         processing.
32214         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
32215         bitmasks to be enabled with 3 exceptions, instead of requiring any
32216         enabled ISA with lots of exceptions.
32217         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
32218         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
32219         Change avx512bw in isa attribute to avx512f.
32220         * config/i386/sgxintrin.h: Add license boilerplate.
32221         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
32222         to __AVX512F__ and __AVX512VL to __AVX512VL__.
32223         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
32224         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
32225         defined.
32226         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
32227         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
32228         temporarily sse2 rather than sse if not enabled already.
32230         PR target/83604
32231         * config/i386/sse.md (VI248_VLBW): Rename to ...
32232         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
32233         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
32234         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
32235         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
32236         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
32237         mode iterator instead of VI248_VLBW.
32239 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
32241         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
32242         (record_modified): Skip clobbers; add debug output.
32243         (param_change_prob): Use sreal frequencies.
32245 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
32247         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
32248         punt for user-aligned variables.
32250 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
32252         * tree-chrec.c (chrec_contains_symbols): Return true for
32253         POLY_INT_CST.
32255 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
32257         PR target/82439
32258         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
32259         of (x|y) == x for BICS pattern.
32261 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
32263         PR tree-optimization/83605
32264         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
32265         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
32266         can throw.
32268 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
32270         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
32271         * config/epiphany/rtems.h: New file.
32273 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32274             Uros Bizjak  <ubizjak@gmail.com>
32276         PR target/83554
32277         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
32278         QIreg_operand instead of register_operand predicate.
32279         * config/i386/i386.c (ix86_rop_should_change_byte_p,
32280         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
32281         comments instead of -fmitigate[-_]rop.
32283 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
32285         PR bootstrap/81926
32286         * cgraphunit.c (symbol_table::compile): Switch to text_section
32287         before calling assembly_start debug hook.
32288         * run-rtl-passes.c (run_rtl_passes): Likewise.
32289         Include output.h.
32291 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32293         * tree-vrp.c (extract_range_from_binary_expr_1): Check
32294         range_int_cst_p rather than !symbolic_range_p before calling
32295         extract_range_from_multiplicative_op_1.
32297 2018-01-04  Jeff Law  <law@redhat.com>
32299         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
32300         redundant test in assertion.
32302 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32304         * doc/rtl.texi: Document machine_mode wrapper classes.
32306 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32308         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
32309         using tree_to_uhwi.
32311 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32313         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
32314         the VEC_PERM_EXPR fold to fail.
32316 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32318         PR debug/83585
32319         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
32320         to switched_sections.
32322 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32324         PR target/83680
32325         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
32326         test for d.testing.
32328 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
32330         PR target/83387
32331         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
32332         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
32334 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32336         PR debug/83666
32337         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
32338         is BLKmode and bitpos not zero or mode change is needed.
32340 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
32342         PR target/83675
32343         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
32344         TARGET_VIS2.
32346 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
32348         PR target/83628
32349         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
32350         instead of MULT rtx.  Update all corresponding splitters.
32351         (*saddl_se): Ditto.
32352         (*ssub<modesuffix>): Ditto.
32353         (*ssubl_se): Ditto.
32354         (*cmp_sadd_di): Update split patterns.
32355         (*cmp_sadd_si): Ditto.
32356         (*cmp_sadd_sidi): Ditto.
32357         (*cmp_ssub_di): Ditto.
32358         (*cmp_ssub_si): Ditto.
32359         (*cmp_ssub_sidi): Ditto.
32360         * config/alpha/predicates.md (const23_operand): New predicate.
32361         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
32362         Look for ASHIFT, not MULT inner operand.
32363         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
32365 2018-01-04  Martin Liska  <mliska@suse.cz>
32367         PR gcov-profile/83669
32368         * gcov.c (output_intermediate_file): Add version to intermediate
32369         gcov file.
32370         * doc/gcov.texi: Document new field 'version' in intermediate
32371         file format. Fix location of '-k' option of gcov command.
32373 2018-01-04  Martin Liska  <mliska@suse.cz>
32375         PR ipa/82352
32376         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
32378 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
32380         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
32382 2018-01-03  Martin Sebor  <msebor@redhat.com>
32384         PR tree-optimization/83655
32385         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
32386         checking calls with invalid arguments.
32388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32390         * tree-vect-stmts.c (vect_get_store_rhs): New function.
32391         (vectorizable_mask_load_store): Delete.
32392         (vectorizable_call): Return false for masked loads and stores.
32393         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
32394         instead of gimple_assign_rhs1.
32395         (vectorizable_load): Handle IFN_MASK_LOAD.
32396         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
32398 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32400         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
32401         split out from..,
32402         (vectorizable_mask_load_store): ...here.
32403         (vectorizable_load): ...and here.
32405 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32407         * tree-vect-stmts.c (vect_build_all_ones_mask)
32408         (vect_build_zero_merge_argument): New functions, split out from...
32409         (vectorizable_load): ...here.
32411 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32413         * tree-vect-stmts.c (vect_check_store_rhs): New function,
32414         split out from...
32415         (vectorizable_mask_load_store): ...here.
32416         (vectorizable_store): ...and here.
32418 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32420         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
32421         split out from...
32422         (vectorizable_mask_load_store): ...here.
32424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32426         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
32427         (vect_model_store_cost): Take a vec_load_store_type instead of a
32428         vect_def_type.
32429         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
32430         (vect_model_store_cost): Take a vec_load_store_type instead of a
32431         vect_def_type.
32432         (vectorizable_mask_load_store): Update accordingly.
32433         (vectorizable_store): Likewise.
32434         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
32436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32438         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
32439         IFN_MASK_LOAD calls here rather than...
32440         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
32442 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32443             Alan Hayward  <alan.hayward@arm.com>
32444             David Sherwood  <david.sherwood@arm.com>
32446         * expmed.c (extract_bit_field_1): For vector extracts,
32447         fall back to extract_bit_field_as_subreg if vec_extract
32448         isn't available.
32450 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32451             Alan Hayward  <alan.hayward@arm.com>
32452             David Sherwood  <david.sherwood@arm.com>
32454         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
32455         they are variable or constant sized.
32456         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
32457         slots for constant-sized data.
32459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32460             Alan Hayward  <alan.hayward@arm.com>
32461             David Sherwood  <david.sherwood@arm.com>
32463         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
32464         handling COND_EXPRs with boolean comparisons, try to find a better
32465         basis for the mask type than the boolean itself.
32467 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32469         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
32470         is calculated and how it can be overridden.
32471         * genmodes.c (max_bitsize_mode_any_mode): New variable.
32472         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
32473         if defined.
32474         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
32475         if nonzero.
32477 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32478             Alan Hayward  <alan.hayward@arm.com>
32479             David Sherwood  <david.sherwood@arm.com>
32481         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
32482         Remove the mode argument.
32483         (aarch64_simd_valid_immediate): Remove the mode and inverse
32484         arguments.
32485         * config/aarch64/iterators.md (bitsize): New iterator.
32486         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
32487         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
32488         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
32489         aarch64_simd_valid_immediate.
32490         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
32491         (aarch64_reg_or_bic_imm): Likewise.
32492         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
32493         with an insn_type enum and msl with a modifier_type enum.
32494         Replace element_width with a scalar_mode.  Change the shift
32495         to unsigned int.  Add constructors for scalar_float_mode and
32496         scalar_int_mode elements.
32497         (aarch64_vect_float_const_representable_p): Delete.
32498         (aarch64_can_const_movi_rtx_p)
32499         (aarch64_simd_scalar_immediate_valid_for_move)
32500         (aarch64_simd_make_constant): Update call to
32501         aarch64_simd_valid_immediate.
32502         (aarch64_advsimd_valid_immediate_hs): New function.
32503         (aarch64_advsimd_valid_immediate): Likewise.
32504         (aarch64_simd_valid_immediate): Remove mode and inverse
32505         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
32506         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
32507         and aarch64_float_const_representable_p on the result.
32508         (aarch64_output_simd_mov_immediate): Remove mode argument.
32509         Update call to aarch64_simd_valid_immediate and use of
32510         simd_immediate_info.
32511         (aarch64_output_scalar_simd_mov_immediate): Update call
32512         accordingly.
32514 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32515             Alan Hayward  <alan.hayward@arm.com>
32516             David Sherwood  <david.sherwood@arm.com>
32518         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
32519         (mode_nunits): Likewise CONST_MODE_NUNITS.
32520         * machmode.def (ADJUST_NUNITS): Document.
32521         * genmodes.c (mode_data::need_nunits_adj): New field.
32522         (blank_mode): Update accordingly.
32523         (adj_nunits): New variable.
32524         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
32525         parameter.
32526         (emit_mode_size_inline): Set need_bytesize_adj for all modes
32527         listed in adj_nunits.
32528         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
32529         listed in adj_nunits.  Don't emit case statements for such modes.
32530         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
32531         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
32532         nothing if adj_nunits is nonnull.
32533         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
32534         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
32535         (emit_mode_fbit): Update use of print_maybe_const_decl.
32536         (emit_move_size): Likewise.  Treat the array as non-const
32537         if adj_nunits.
32538         (emit_mode_adjustments): Handle adj_nunits.
32540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32542         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
32543         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
32544         (VECTOR_MODES): Use it.
32545         (make_vector_modes): Take the prefix as an argument.
32547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32548             Alan Hayward  <alan.hayward@arm.com>
32549             David Sherwood  <david.sherwood@arm.com>
32551         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
32552         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
32553         for MODE_VECTOR_BOOL.
32554         * machmode.def (VECTOR_BOOL_MODE): Document.
32555         * genmodes.c (VECTOR_BOOL_MODE): New macro.
32556         (make_vector_bool_mode): New function.
32557         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
32558         MODE_VECTOR_BOOL.
32559         * lto-streamer-in.c (lto_input_mode_table): Likewise.
32560         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
32561         Likewise.
32562         * stor-layout.c (int_mode_for_mode): Likewise.
32563         * tree.c (build_vector_type_for_mode): Likewise.
32564         * varasm.c (output_constant_pool_2): Likewise.
32565         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
32566         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
32567         for MODE_VECTOR_BOOL.
32568         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
32569         of mode class checks.
32570         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
32571         instead of a list of mode class checks.
32572         (expand_vector_scalar_condition): Likewise.
32573         (type_for_widest_vector_mode): Handle BImode as an inner mode.
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         * machmode.h (mode_size): Change from unsigned short to
32580         poly_uint16_pod.
32581         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
32582         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32583         or if measurement_type is not polynomial.
32584         (fixed_size_mode::includes_p): Check for constant-sized modes.
32585         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
32586         return a poly_uint16 rather than an unsigned short.
32587         (emit_mode_size): Change the type of mode_size from unsigned short
32588         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
32589         (emit_mode_adjustments): Cope with polynomial vector sizes.
32590         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32591         for GET_MODE_SIZE.
32592         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32593         for GET_MODE_SIZE.
32594         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
32595         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
32596         * caller-save.c (setup_save_areas): Likewise.
32597         (replace_reg_with_saved_mem): Likewise.
32598         * calls.c (emit_library_call_value_1): Likewise.
32599         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
32600         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
32601         (gen_lowpart_for_combine): Likewise.
32602         * convert.c (convert_to_integer_1): Likewise.
32603         * cse.c (equiv_constant, cse_insn): Likewise.
32604         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
32605         (cselib_subst_to_values): Likewise.
32606         * dce.c (word_dce_process_block): Likewise.
32607         * df-problems.c (df_word_lr_mark_ref): Likewise.
32608         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
32609         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
32610         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
32611         (rtl_for_decl_location): Likewise.
32612         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
32613         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
32614         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
32615         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
32616         (expand_expr_real_1): Likewise.
32617         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
32618         (pad_below): Likewise.
32619         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32620         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
32621         * ira.c (get_subreg_tracking_sizes): Likewise.
32622         * ira-build.c (ira_create_allocno_objects): Likewise.
32623         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
32624         (ira_sort_regnos_for_alter_reg): Likewise.
32625         * ira-costs.c (record_operand_costs): Likewise.
32626         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
32627         (resolve_simple_move): Likewise.
32628         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
32629         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
32630         (lra_constraints): Likewise.
32631         (CONST_POOL_OK_P): Reject variable-sized modes.
32632         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
32633         (add_pseudo_to_slot, lra_spill): Likewise.
32634         * omp-low.c (omp_clause_aligned_alignment): Likewise.
32635         * optabs-query.c (get_best_extraction_insn): Likewise.
32636         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32637         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
32638         (expand_mult_highpart, valid_multiword_target_p): Likewise.
32639         * recog.c (offsettable_address_addr_space_p): Likewise.
32640         * regcprop.c (maybe_mode_change): Likewise.
32641         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
32642         * regrename.c (build_def_use): Likewise.
32643         * regstat.c (dump_reg_info): Likewise.
32644         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
32645         (find_reloads, find_reloads_subreg_address): Likewise.
32646         * reload1.c (eliminate_regs_1): Likewise.
32647         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
32648         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
32649         (simplify_binary_operation_1, simplify_subreg): Likewise.
32650         * targhooks.c (default_function_arg_padding): Likewise.
32651         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
32652         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
32653         (verify_gimple_assign_ternary): Likewise.
32654         * tree-inline.c (estimate_move_cost): Likewise.
32655         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32656         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
32657         (get_address_cost_ainc): Likewise.
32658         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32659         (vect_supportable_dr_alignment): Likewise.
32660         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32661         (vectorizable_reduction): Likewise.
32662         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
32663         (vectorizable_operation, vectorizable_load): Likewise.
32664         * tree.c (build_same_sized_truth_vector_type): Likewise.
32665         * valtrack.c (cleanup_auto_inc_dec): Likewise.
32666         * var-tracking.c (emit_note_insn_var_location): Likewise.
32667         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
32668         (ADDR_VEC_ALIGN): Likewise.
32670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32671             Alan Hayward  <alan.hayward@arm.com>
32672             David Sherwood  <david.sherwood@arm.com>
32674         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
32675         unsigned short.
32676         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32677         or if measurement_type is polynomial.
32678         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
32679         * combine.c (make_extraction): Likewise.
32680         * dse.c (find_shift_sequence): Likewise.
32681         * dwarf2out.c (mem_loc_descriptor): Likewise.
32682         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
32683         (extract_bit_field, extract_low_bits): Likewise.
32684         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
32685         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
32686         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
32687         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
32688         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32689         * reload.c (find_reloads): Likewise.
32690         * reload1.c (alter_reg): Likewise.
32691         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
32692         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
32693         * tree-if-conv.c (predicate_mem_writes): Likewise.
32694         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
32695         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
32696         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
32697         * valtrack.c (dead_debug_insert_temp): Likewise.
32698         * varasm.c (mergeable_constant_section): Likewise.
32699         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
32701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32702             Alan Hayward  <alan.hayward@arm.com>
32703             David Sherwood  <david.sherwood@arm.com>
32705         * expr.c (expand_assignment): Cope with polynomial mode sizes
32706         when assigning to a CONCAT.
32708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32709             Alan Hayward  <alan.hayward@arm.com>
32710             David Sherwood  <david.sherwood@arm.com>
32712         * machmode.h (mode_precision): Change from unsigned short to
32713         poly_uint16_pod.
32714         (mode_to_precision): Return a poly_uint16 rather than an unsigned
32715         short.
32716         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
32717         or if measurement_type is not polynomial.
32718         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
32719         in which the mode is already known to be a scalar_int_mode.
32720         * genmodes.c (emit_mode_precision): Change the type of mode_precision
32721         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
32722         initializer.
32723         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32724         for GET_MODE_PRECISION.
32725         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32726         for GET_MODE_PRECISION.
32727         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
32728         as polynomial.
32729         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
32730         (expand_field_assignment, make_extraction): Likewise.
32731         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
32732         (get_last_value): Likewise.
32733         * convert.c (convert_to_integer_1): Likewise.
32734         * cse.c (cse_insn): Likewise.
32735         * expr.c (expand_expr_real_1): Likewise.
32736         * lra-constraints.c (simplify_operand_subreg): Likewise.
32737         * optabs-query.c (can_atomic_load_p): Likewise.
32738         * optabs.c (expand_atomic_load): Likewise.
32739         (expand_atomic_store): Likewise.
32740         * ree.c (combine_reaching_defs): Likewise.
32741         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
32742         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
32743         * tree.h (type_has_mode_precision_p): Likewise.
32744         * ubsan.c (instrument_si_overflow): Likewise.
32746 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32747             Alan Hayward  <alan.hayward@arm.com>
32748             David Sherwood  <david.sherwood@arm.com>
32750         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
32751         polynomial numbers of units.
32752         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
32753         (valid_vector_subparts_p): New function.
32754         (build_vector_type): Remove temporary shim and take the number
32755         of units as a poly_uint64 rather than an int.
32756         (build_opaque_vector_type): Take the number of units as a
32757         poly_uint64 rather than an int.
32758         * tree.c (build_vector_from_ctor): Handle polynomial
32759         TYPE_VECTOR_SUBPARTS.
32760         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
32761         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
32762         (build_vector_from_val): If the number of units is variable,
32763         use build_vec_duplicate_cst for constant operands and
32764         VEC_DUPLICATE_EXPR otherwise.
32765         (make_vector_type): Remove temporary is_constant ().
32766         (build_vector_type, build_opaque_vector_type): Take the number of
32767         units as a poly_uint64 rather than an int.
32768         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
32769         VECTOR_CST_NELTS.
32770         * cfgexpand.c (expand_debug_expr): Likewise.
32771         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
32772         (store_constructor, expand_expr_real_1): Likewise.
32773         (const_scalar_mask_from_tree): Likewise.
32774         * fold-const-call.c (fold_const_reduction): Likewise.
32775         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
32776         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
32777         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
32778         (fold_relational_const): Likewise.
32779         (native_interpret_vector): Likewise.  Change the size from an
32780         int to an unsigned int.
32781         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
32782         TYPE_VECTOR_SUBPARTS.
32783         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
32784         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32785         duplicating a non-constant operand into a variable-length vector.
32786         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32787         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32788         * ipa-icf.c (sem_variable::equals): Likewise.
32789         * match.pd: Likewise.
32790         * omp-simd-clone.c (simd_clone_subparts): Likewise.
32791         * print-tree.c (print_node): Likewise.
32792         * stor-layout.c (layout_type): Likewise.
32793         * targhooks.c (default_builtin_vectorization_cost): Likewise.
32794         * tree-cfg.c (verify_gimple_comparison): Likewise.
32795         (verify_gimple_assign_binary): Likewise.
32796         (verify_gimple_assign_ternary): Likewise.
32797         (verify_gimple_assign_single): Likewise.
32798         * tree-pretty-print.c (dump_generic_node): Likewise.
32799         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32800         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32801         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32802         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32803         (vect_shift_permute_load_chain): Likewise.
32804         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32805         (expand_vector_condition, optimize_vector_constructor): Likewise.
32806         (lower_vec_perm, get_compute_type): Likewise.
32807         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32808         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32809         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32810         (vect_recog_mask_conversion_pattern): Likewise.
32811         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32812         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32813         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32814         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32815         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32816         (vectorizable_shift, vectorizable_operation, vectorizable_store)
32817         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32818         (supportable_widening_operation): Likewise.
32819         (supportable_narrowing_operation): Likewise.
32820         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32821         Likewise.
32822         * varasm.c (output_constant): Likewise.
32824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32825             Alan Hayward  <alan.hayward@arm.com>
32826             David Sherwood  <david.sherwood@arm.com>
32828         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32829         so that both the length == 3 and length != 3 cases set up their
32830         own permute vectors.  Add comments explaining why we know the
32831         number of elements is constant.
32832         (vect_permute_load_chain): Likewise.
32834 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32835             Alan Hayward  <alan.hayward@arm.com>
32836             David Sherwood  <david.sherwood@arm.com>
32838         * machmode.h (mode_nunits): Change from unsigned char to
32839         poly_uint16_pod.
32840         (ONLY_FIXED_SIZE_MODES): New macro.
32841         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32842         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32843         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32844         New typedefs.
32845         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32846         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32847         or if measurement_type is not polynomial.
32848         * genmodes.c (ZERO_COEFFS): New macro.
32849         (emit_mode_nunits_inline): Make mode_nunits_inline return a
32850         poly_uint16.
32851         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32852         Use ZERO_COEFFS when emitting initializers.
32853         * data-streamer.h (bp_pack_poly_value): New function.
32854         (bp_unpack_poly_value): Likewise.
32855         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32856         for GET_MODE_NUNITS.
32857         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32858         for GET_MODE_NUNITS.
32859         * tree.c (make_vector_type): Remove temporary shim and make
32860         the real function take the number of units as a poly_uint64
32861         rather than an int.
32862         (build_vector_type_for_mode): Handle polynomial nunits.
32863         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32864         * emit-rtl.c (const_vec_series_p_1): Likewise.
32865         (gen_rtx_CONST_VECTOR): Likewise.
32866         * fold-const.c (test_vec_duplicate_folding): Likewise.
32867         * genrecog.c (validate_pattern): Likewise.
32868         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32869         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32870         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32871         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32872         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32873         * rtlanal.c (subreg_get_info): Likewise.
32874         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32875         (vect_grouped_load_supported): Likewise.
32876         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
32877         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
32878         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
32879         (simplify_const_unary_operation, simplify_binary_operation_1)
32880         (simplify_const_binary_operation, simplify_ternary_operation)
32881         (test_vector_ops_duplicate, test_vector_ops): Likewise.
32882         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
32883         instead of CONST_VECTOR_NUNITS.
32884         * varasm.c (output_constant_pool_2): Likewise.
32885         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
32886         explicit-encoded elements in the XVEC for variable-length vectors.
32888 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32890         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
32892 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32893             Alan Hayward  <alan.hayward@arm.com>
32894             David Sherwood  <david.sherwood@arm.com>
32896         * coretypes.h (fixed_size_mode): Declare.
32897         (fixed_size_mode_pod): New typedef.
32898         * builtins.h (target_builtins::x_apply_args_mode)
32899         (target_builtins::x_apply_result_mode): Change type to
32900         fixed_size_mode_pod.
32901         * builtins.c (apply_args_size, apply_result_size, result_vector)
32902         (expand_builtin_apply_args_1, expand_builtin_apply)
32903         (expand_builtin_return): Update accordingly.
32905 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32907         * cse.c (hash_rtx_cb): Hash only the encoded elements.
32908         * cselib.c (cselib_hash_rtx): Likewise.
32909         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
32910         CONST_VECTOR encoding.
32912 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
32913             Jeff Law  <law@redhat.com>
32915         PR target/83641
32916         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
32917         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
32918         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
32919         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
32921         PR target/83641
32922         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
32923         explicitly probe *sp in a noreturn function if there were any callee
32924         register saves or frame pointer is needed.
32926 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
32928         PR debug/83621
32929         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
32930         BLKmode for ternary, binary or unary expressions.
32932         PR debug/83645
32933         * var-tracking.c (delete_vta_debug_insn): New inline function.
32934         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
32935         insns from get_insns () to NULL instead of each bb separately.
32936         Use delete_vta_debug_insn.  No longer static.
32937         (vt_debug_insns_local, variable_tracking_main_1): Adjust
32938         delete_vta_debug_insns callers.
32939         * rtl.h (delete_vta_debug_insns): Declare.
32940         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
32941         instead of variable_tracking_main.
32943 2018-01-03  Martin Sebor  <msebor@redhat.com>
32945         PR tree-optimization/83603
32946         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
32947         arguments past the endof the argument list in functions declared
32948         without a prototype.
32949         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
32950         Avoid checking when arguments are null.
32952 2018-01-03  Martin Sebor  <msebor@redhat.com>
32954         PR c/83559
32955         * doc/extend.texi (attribute const): Fix a typo.
32956         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
32957         issuing -Wsuggest-attribute for void functions.
32959 2018-01-03  Martin Sebor  <msebor@redhat.com>
32961         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
32962         offset_int::from instead of wide_int::to_shwi.
32963         (maybe_diag_overlap): Remove assertion.
32964         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
32965         * gimple-ssa-sprintf.c (format_directive): Same.
32966         (parse_directive): Same.
32967         (sprintf_dom_walker::compute_format_length): Same.
32968         (try_substitute_return_value): Same.
32970 2018-01-03  Jeff Law  <law@redhat.com>
32972         PR middle-end/83654
32973         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
32974         non-constant residual for zero at runtime and avoid probing in
32975         that case.  Reorganize code for trailing problem to mirror handling
32976         of the residual.
32978 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32980         PR tree-optimization/83501
32981         * tree-ssa-strlen.c (get_string_cst): New.
32982         (handle_char_store): Call get_string_cst.
32984 2018-01-03  Martin Liska  <mliska@suse.cz>
32986         PR tree-optimization/83593
32987         * tree-ssa-strlen.c: Include tree-cfg.h.
32988         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
32989         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
32990         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
32991         to false.
32992         (strlen_dom_walker::before_dom_children): Call
32993         gimple_purge_dead_eh_edges. Dump tranformation with details
32994         dump flags.
32995         (strlen_dom_walker::before_dom_children): Update call by adding
32996         new argument cleanup_eh.
32997         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
32999 2018-01-03  Martin Liska  <mliska@suse.cz>
33001         PR ipa/83549
33002         * cif-code.def (VARIADIC_THUNK): New enum value.
33003         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33004         thunks.
33006 2018-01-03  Jan Beulich  <jbeulich@suse.com>
33008         * sse.md (mov<mode>_internal): Tighten condition for when to use
33009         vmovdqu<ssescalarsize> for TI and OI modes.
33011 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33013         Update copyright years.
33015 2018-01-03  Martin Liska  <mliska@suse.cz>
33017         PR ipa/83594
33018         * ipa-visibility.c (function_and_variable_visibility): Skip
33019         functions with noipa attribure.
33021 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
33023         * gcc.c (process_command): Update copyright notice dates.
33024         * gcov-dump.c (print_version): Ditto.
33025         * gcov.c (print_version): Ditto.
33026         * gcov-tool.c (print_version): Ditto.
33027         * gengtype.c (create_file): Ditto.
33028         * doc/cpp.texi: Bump @copying's copyright year.
33029         * doc/cppinternals.texi: Ditto.
33030         * doc/gcc.texi: Ditto.
33031         * doc/gccint.texi: Ditto.
33032         * doc/gcov.texi: Ditto.
33033         * doc/install.texi: Ditto.
33034         * doc/invoke.texi: Ditto.
33036 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33038         * vector-builder.h (vector_builder::m_full_nelts): Change from
33039         unsigned int to poly_uint64.
33040         (vector_builder::full_nelts): Update prototype accordingly.
33041         (vector_builder::new_vector): Likewise.
33042         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33043         (vector_builder::operator ==): Likewise.
33044         (vector_builder::finalize): Likewise.
33045         * int-vector-builder.h (int_vector_builder::int_vector_builder):
33046         Take the number of elements as a poly_uint64 rather than an
33047         unsigned int.
33048         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33049         from unsigned int to poly_uint64.
33050         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33051         (vec_perm_indices::new_vector): Likewise.
33052         (vec_perm_indices::length): Likewise.
33053         (vec_perm_indices::nelts_per_input): Likewise.
33054         (vec_perm_indices::input_nelts): Likewise.
33055         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33056         number of elements per input as a poly_uint64 rather than an
33057         unsigned int.  Use the original encoding for variable-length
33058         vectors, rather than clamping each individual element.
33059         For the second and subsequent elements in each pattern,
33060         clamp the step and base before clamping their sum.
33061         (vec_perm_indices::series_p): Handle polynomial element counts.
33062         (vec_perm_indices::all_in_range_p): Likewise.
33063         (vec_perm_indices_to_tree): Likewise.
33064         (vec_perm_indices_to_rtx): Likewise.
33065         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33066         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33067         (tree_vector_builder::new_binary_operation): Handle polynomial
33068         element counts.  Return false if we need to know the number
33069         of elements at compile time.
33070         * fold-const.c (fold_vec_perm): Punt if the number of elements
33071         isn't known at compile time.
33073 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33075         * vec-perm-indices.h (vec_perm_builder): Change element type
33076         from HOST_WIDE_INT to poly_int64.
33077         (vec_perm_indices::element_type): Update accordingly.
33078         (vec_perm_indices::clamp): Handle polynomial element_types.
33079         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33080         (vec_perm_indices::all_in_range_p): Likewise.
33081         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33082         than shwi trees.
33083         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33084         polynomial vec_perm_indices element types.
33085         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33086         * fold-const.c (fold_vec_perm): Likewise.
33087         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33088         * tree-vect-generic.c (lower_vec_perm): Likewise.
33089         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33090         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33091         element type to HOST_WIDE_INT.
33093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33094             Alan Hayward  <alan.hayward@arm.com>
33095             David Sherwood  <david.sherwood@arm.com>
33097         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33098         rather than an int.  Use plus_constant.
33099         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33100         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33103             Alan Hayward  <alan.hayward@arm.com>
33104             David Sherwood  <david.sherwood@arm.com>
33106         * calls.c (emit_call_1, expand_call): Change struct_value_size from
33107         a HOST_WIDE_INT to a poly_int64.
33109 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33110             Alan Hayward  <alan.hayward@arm.com>
33111             David Sherwood  <david.sherwood@arm.com>
33113         * calls.c (load_register_parameters): Cope with polynomial
33114         mode sizes.  Require a constant size for BLKmode parameters
33115         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
33116         forces a parameter to be padded at the lsb end in order to
33117         fill a complete number of words, require the parameter size
33118         to be ordered wrt UNITS_PER_WORD.
33120 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33121             Alan Hayward  <alan.hayward@arm.com>
33122             David Sherwood  <david.sherwood@arm.com>
33124         * reload1.c (spill_stack_slot_width): Change element type
33125         from unsigned int to poly_uint64_pod.
33126         (alter_reg): Treat mode sizes as polynomial.
33128 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33129             Alan Hayward  <alan.hayward@arm.com>
33130             David Sherwood  <david.sherwood@arm.com>
33132         * reload.c (complex_word_subreg_p): New function.
33133         (reload_inner_reg_of_subreg, push_reload): Use it.
33135 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33136             Alan Hayward  <alan.hayward@arm.com>
33137             David Sherwood  <david.sherwood@arm.com>
33139         * lra-constraints.c (process_alt_operands): Reject matched
33140         operands whose sizes aren't ordered.
33141         (match_reload): Refer to this check here.
33143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33144             Alan Hayward  <alan.hayward@arm.com>
33145             David Sherwood  <david.sherwood@arm.com>
33147         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33148         that the mode size is in the set {1, 2, 4, 8, 16}.
33150 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33151             Alan Hayward  <alan.hayward@arm.com>
33152             David Sherwood  <david.sherwood@arm.com>
33154         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33155         Use plus_constant instead of gen_rtx_PLUS.
33157 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33158             Alan Hayward  <alan.hayward@arm.com>
33159             David Sherwood  <david.sherwood@arm.com>
33161         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33162         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33163         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33164         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33165         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33166         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33167         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33168         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33169         * config/i386/i386.c (ix86_push_rounding): ...this new function.
33170         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33171         a poly_int64.
33172         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33173         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33174         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33175         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33176         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33177         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33178         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33179         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33180         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33181         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33182         function.
33183         * expr.c (emit_move_resolve_push): Treat the input and result
33184         of PUSH_ROUNDING as a poly_int64.
33185         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33186         (emit_push_insn): Likewise.
33187         * lra-eliminations.c (mark_not_eliminable): Likewise.
33188         * recog.c (push_operand): Likewise.
33189         * reload1.c (elimination_effects): Likewise.
33190         * rtlanal.c (nonzero_bits1): Likewise.
33191         * calls.c (store_one_arg): Likewise.  Require the padding to be
33192         known at compile time.
33194 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33195             Alan Hayward  <alan.hayward@arm.com>
33196             David Sherwood  <david.sherwood@arm.com>
33198         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33199         Use plus_constant instead of gen_rtx_PLUS.
33201 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33202             Alan Hayward  <alan.hayward@arm.com>
33203             David Sherwood  <david.sherwood@arm.com>
33205         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33206         rather than an int.
33208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33209             Alan Hayward  <alan.hayward@arm.com>
33210             David Sherwood  <david.sherwood@arm.com>
33212         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
33213         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
33214         via stack temporaries.  Treat the mode size as polynomial too.
33216 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33217             Alan Hayward  <alan.hayward@arm.com>
33218             David Sherwood  <david.sherwood@arm.com>
33220         * expr.c (expand_expr_real_2): When handling conversions involving
33221         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
33222         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
33223         as a poly_uint64 too.
33225 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33226             Alan Hayward  <alan.hayward@arm.com>
33227             David Sherwood  <david.sherwood@arm.com>
33229         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
33231 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33232             Alan Hayward  <alan.hayward@arm.com>
33233             David Sherwood  <david.sherwood@arm.com>
33235         * combine.c (can_change_dest_mode): Handle polynomial
33236         REGMODE_NATURAL_SIZE.
33237         * expmed.c (store_bit_field_1): Likewise.
33238         * expr.c (store_constructor): Likewise.
33239         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
33240         and polynomial REGMODE_NATURAL_SIZE.
33241         (gen_lowpart_common): Likewise.
33242         * reginfo.c (record_subregs_of_mode): Likewise.
33243         * rtlanal.c (read_modify_subreg_p): Likewise.
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         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
33250         numbers of elements.
33252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33253             Alan Hayward  <alan.hayward@arm.com>
33254             David Sherwood  <david.sherwood@arm.com>
33256         * match.pd: Cope with polynomial numbers of vector elements.
33258 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33259             Alan Hayward  <alan.hayward@arm.com>
33260             David Sherwood  <david.sherwood@arm.com>
33262         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
33263         in a POINTER_PLUS_EXPR.
33265 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33266             Alan Hayward  <alan.hayward@arm.com>
33267             David Sherwood  <david.sherwood@arm.com>
33269         * omp-simd-clone.c (simd_clone_subparts): New function.
33270         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
33271         (ipa_simd_modify_function_body): Likewise.
33273 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33274             Alan Hayward  <alan.hayward@arm.com>
33275             David Sherwood  <david.sherwood@arm.com>
33277         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
33278         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
33279         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
33280         (expand_vector_condition, vector_element): Likewise.
33281         (subparts_gt): New function.
33282         (get_compute_type): Use subparts_gt.
33283         (count_type_subparts): Delete.
33284         (expand_vector_operations_1): Use subparts_gt instead of
33285         count_type_subparts.
33287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33288             Alan Hayward  <alan.hayward@arm.com>
33289             David Sherwood  <david.sherwood@arm.com>
33291         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
33292         (vect_compile_time_alias): ...this new function.  Do the calculation
33293         on poly_ints rather than trees.
33294         (vect_prune_runtime_alias_test_list): Update call accordingly.
33296 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33297             Alan Hayward  <alan.hayward@arm.com>
33298             David Sherwood  <david.sherwood@arm.com>
33300         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
33301         numbers of units.
33302         (vect_schedule_slp_instance): Likewise.
33304 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33305             Alan Hayward  <alan.hayward@arm.com>
33306             David Sherwood  <david.sherwood@arm.com>
33308         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
33309         constant and extern definitions for variable-length vectors.
33310         (vect_get_constant_vectors): Note that the number of units
33311         is known to be constant.
33313 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33314             Alan Hayward  <alan.hayward@arm.com>
33315             David Sherwood  <david.sherwood@arm.com>
33317         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
33318         of units as polynomial.  Choose between WIDE and NARROW based
33319         on multiple_p.
33321 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33322             Alan Hayward  <alan.hayward@arm.com>
33323             David Sherwood  <david.sherwood@arm.com>
33325         * tree-vect-stmts.c (simd_clone_subparts): New function.
33326         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
33328 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33329             Alan Hayward  <alan.hayward@arm.com>
33330             David Sherwood  <david.sherwood@arm.com>
33332         * tree-vect-stmts.c (vectorizable_call): Treat the number of
33333         vectors as polynomial.  Use build_index_vector for
33334         IFN_GOMP_SIMD_LANE.
33336 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33337             Alan Hayward  <alan.hayward@arm.com>
33338             David Sherwood  <david.sherwood@arm.com>
33340         * tree-vect-stmts.c (get_load_store_type): Treat the number of
33341         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
33342         for variable-length vectors.
33343         (vectorizable_mask_load_store): Treat the number of units as
33344         polynomial, asserting that it is constant if the condition has
33345         already been enforced.
33346         (vectorizable_store, vectorizable_load): Likewise.
33348 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33349             Alan Hayward  <alan.hayward@arm.com>
33350             David Sherwood  <david.sherwood@arm.com>
33352         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
33353         of units as polynomial.  Punt if we can't tell at compile time
33354         which vector contains the final result.
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         * tree-vect-loop.c (vectorizable_induction): Treat the number
33361         of units as polynomial.  Punt on SLP inductions.  Use an integer
33362         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
33363         cast of such a series for variable-length floating-point
33364         reductions.
33366 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33367             Alan Hayward  <alan.hayward@arm.com>
33368             David Sherwood  <david.sherwood@arm.com>
33370         * tree.h (build_index_vector): Declare.
33371         * tree.c (build_index_vector): New function.
33372         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
33373         of units as polynomial, forcibly converting it to a constant if
33374         vectorizable_reduction has already enforced the condition.
33375         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
33376         to create a {1,2,3,...} vector.
33377         (vectorizable_reduction): Treat the number of units as polynomial.
33378         Choose vectype_in based on the largest scalar element size rather
33379         than the smallest number of units.  Enforce the restrictions
33380         relied on above.
33382 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33383             Alan Hayward  <alan.hayward@arm.com>
33384             David Sherwood  <david.sherwood@arm.com>
33386         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
33387         number of units as polynomial.
33389 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33390             Alan Hayward  <alan.hayward@arm.com>
33391             David Sherwood  <david.sherwood@arm.com>
33393         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
33394         * target.def (autovectorize_vector_sizes): Return the vector sizes
33395         by pointer, using vector_sizes rather than a bitmask.
33396         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
33397         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
33398         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
33399         Likewise.
33400         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
33401         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
33402         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
33403         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
33404         * omp-general.c (omp_max_vf): Likewise.
33405         * omp-low.c (omp_clause_aligned_alignment): Likewise.
33406         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
33407         * tree-vect-loop.c (vect_analyze_loop): Likewise.
33408         * tree-vect-slp.c (vect_slp_bb): Likewise.
33409         * doc/tm.texi: Regenerate.
33410         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
33411         to a poly_uint64.
33412         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
33413         the vector size as a poly_uint64 rather than an unsigned int.
33414         (current_vector_size): Change from an unsigned int to a poly_uint64.
33415         (get_vectype_for_scalar_type): Update accordingly.
33416         * tree.h (build_truth_vector_type): Take the size and number of
33417         units as a poly_uint64 rather than an unsigned int.
33418         (build_vector_type): Add a temporary overload that takes
33419         the number of units as a poly_uint64 rather than an unsigned int.
33420         * tree.c (make_vector_type): Likewise.
33421         (build_truth_vector_type): Take the number of units as a poly_uint64
33422         rather than an unsigned int.
33424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33425             Alan Hayward  <alan.hayward@arm.com>
33426             David Sherwood  <david.sherwood@arm.com>
33428         * target.def (get_mask_mode): Take the number of units and length
33429         as poly_uint64s rather than unsigned ints.
33430         * targhooks.h (default_get_mask_mode): Update accordingly.
33431         * targhooks.c (default_get_mask_mode): Likewise.
33432         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
33433         * doc/tm.texi: Regenerate.
33435 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33436             Alan Hayward  <alan.hayward@arm.com>
33437             David Sherwood  <david.sherwood@arm.com>
33439         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
33440         * omp-general.c (omp_max_vf): Likewise.
33441         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
33442         (expand_omp_simd): Handle polynomial safelen.
33443         * omp-low.c (omplow_simd_context): Add a default constructor.
33444         (omplow_simd_context::max_vf): Change from int to poly_uint64.
33445         (lower_rec_simd_input_clauses): Update accordingly.
33446         (lower_rec_input_clauses): Likewise.
33448 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33449             Alan Hayward  <alan.hayward@arm.com>
33450             David Sherwood  <david.sherwood@arm.com>
33452         * tree-vectorizer.h (vect_nunits_for_cost): New function.
33453         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
33454         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
33455         (vect_analyze_slp_cost): Likewise.
33456         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
33457         (vect_model_load_cost): Likewise.
33459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33460             Alan Hayward  <alan.hayward@arm.com>
33461             David Sherwood  <david.sherwood@arm.com>
33463         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
33464         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
33465         from an unsigned int * to a poly_uint64_pod *.
33466         (calculate_unrolling_factor): New function.
33467         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
33469 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33470             Alan Hayward  <alan.hayward@arm.com>
33471             David Sherwood  <david.sherwood@arm.com>
33473         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
33474         from an unsigned int to a poly_uint64.
33475         (_loop_vec_info::slp_unrolling_factor): Likewise.
33476         (_loop_vec_info::vectorization_factor): Change from an int
33477         to a poly_uint64.
33478         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
33479         (vect_get_num_vectors): New function.
33480         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
33481         (vect_get_num_copies): Use vect_get_num_vectors.
33482         (vect_analyze_data_ref_dependences): Change max_vf from an int *
33483         to an unsigned int *.
33484         (vect_analyze_data_refs): Change min_vf from an int * to a
33485         poly_uint64 *.
33486         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33487         than an unsigned HOST_WIDE_INT.
33488         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
33489         (vect_analyze_data_ref_dependence): Change max_vf from an int *
33490         to an unsigned int *.
33491         (vect_analyze_data_ref_dependences): Likewise.
33492         (vect_compute_data_ref_alignment): Handle polynomial vf.
33493         (vect_enhance_data_refs_alignment): Likewise.
33494         (vect_prune_runtime_alias_test_list): Likewise.
33495         (vect_shift_permute_load_chain): Likewise.
33496         (vect_supportable_dr_alignment): Likewise.
33497         (dependence_distance_ge_vf): Take the vectorization factor as a
33498         poly_uint64 rather than an unsigned HOST_WIDE_INT.
33499         (vect_analyze_data_refs): Change min_vf from an int * to a
33500         poly_uint64 *.
33501         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
33502         vfm1 as a poly_uint64 rather than an int.  Make the same change
33503         for the returned bound_scalar.
33504         (vect_gen_vector_loop_niters): Handle polynomial vf.
33505         (vect_do_peeling): Likewise.  Update call to
33506         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
33507         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
33508         be constant.
33509         * tree-vect-loop.c (vect_determine_vectorization_factor)
33510         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
33511         (vect_get_known_peeling_cost): Likewise.
33512         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
33513         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
33514         (vect_transform_loop): Likewise.  Use the lowest possible VF when
33515         updating the upper bounds of the loop.
33516         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
33517         rather than an int.
33518         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
33519         polynomial unroll factors.
33520         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
33521         (vect_make_slp_decision): Likewise.
33522         (vect_supported_load_permutation_p): Likewise, and polynomial
33523         vf too.
33524         (vect_analyze_slp_cost): Handle polynomial vf.
33525         (vect_slp_analyze_node_operations): Likewise.
33526         (vect_slp_analyze_bb_1): Likewise.
33527         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33528         than an unsigned HOST_WIDE_INT.
33529         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
33530         (vectorizable_load): Handle polynomial vf.
33531         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
33532         a poly_uint64.
33533         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
33535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33536             Alan Hayward  <alan.hayward@arm.com>
33537             David Sherwood  <david.sherwood@arm.com>
33539         * match.pd: Handle bit operations involving three constants
33540         and try to fold one pair.
33542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
33544         * tree-vect-loop-manip.c: Include gimple-fold.h.
33545         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
33546         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
33547         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
33548         Add a path that uses a step of VF instead of 1, but disable it
33549         for now.
33550         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
33551         and niters_no_overflow parameters.  Update calls to
33552         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
33553         Create a new SSA name if the latter choses to use a ste other
33554         than zero, and return it via niters_vector_mult_vf_var.
33555         * tree-vect-loop.c (vect_transform_loop): Update calls to
33556         vect_do_peeling, vect_gen_vector_loop_niters and
33557         slpeel_make_loop_iterate_ntimes.
33558         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
33559         (vect_gen_vector_loop_niters): Update declarations after above changes.
33561 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
33563         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
33564         128-bit round to integer instructions.
33565         (ceil<mode>2): Likewise.
33566         (btrunc<mode>2): Likewise.
33567         (round<mode>2): Likewise.
33569 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33571         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
33572         unaligned VSX load/store on P8/P9.
33573         (expand_block_clear): Allow the use of unaligned VSX
33574         load/store on P8/P9.
33576 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33578         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
33579         New function.
33580         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
33581         swap associated with both a load and a store.
33583 2018-01-02  Andrew Waterman  <andrew@sifive.com>
33585         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
33586         * config/riscv/riscv.md (clear_cache): Use it.
33588 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
33590         * web.c: Remove out-of-date comment.
33592 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33594         * expr.c (fixup_args_size_notes): Check that any existing
33595         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
33596         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
33597         (emit_single_push_insn): ...here.
33599 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33601         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
33602         (const_vector_encoded_nelts): New function.
33603         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
33604         (const_vector_int_elt, const_vector_elt): Declare.
33605         * emit-rtl.c (const_vector_int_elt_1): New function.
33606         (const_vector_elt): Likewise.
33607         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
33608         of CONST_VECTOR_ELT.
33610 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33612         * expr.c: Include rtx-vector-builder.h.
33613         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
33614         directly on the tree encoding.
33615         (const_vector_from_tree): Likewise.
33616         * optabs.c: Include rtx-vector-builder.h.
33617         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
33618         sequence of "u" values.
33619         * vec-perm-indices.c: Include rtx-vector-builder.h.
33620         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
33621         directly on the vec_perm_indices encoding.
33623 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33625         * doc/rtl.texi (const_vector): Describe new encoding scheme.
33626         * Makefile.in (OBJS): Add rtx-vector-builder.o.
33627         * rtx-vector-builder.h: New file.
33628         * rtx-vector-builder.c: Likewise.
33629         * rtl.h (rtx_def::u2): Add a const_vector field.
33630         (CONST_VECTOR_NPATTERNS): New macro.
33631         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
33632         (CONST_VECTOR_DUPLICATE_P): Likewise.
33633         (CONST_VECTOR_STEPPED_P): Likewise.
33634         (CONST_VECTOR_ENCODED_ELT): Likewise.
33635         (const_vec_duplicate_p): Check for a duplicated vector encoding.
33636         (unwrap_const_vec_duplicate): Likewise.
33637         (const_vec_series_p): Check for a non-duplicated vector encoding.
33638         Say that the function only returns true for integer vectors.
33639         * emit-rtl.c: Include rtx-vector-builder.h.
33640         (gen_const_vec_duplicate_1): Delete.
33641         (gen_const_vector): Call gen_const_vec_duplicate instead of
33642         gen_const_vec_duplicate_1.
33643         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
33644         (gen_const_vec_duplicate): Use rtx_vector_builder.
33645         (gen_const_vec_series): Likewise.
33646         (gen_rtx_CONST_VECTOR): Likewise.
33647         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
33648         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33649         Build a new vector rather than modifying a CONST_VECTOR in-place.
33650         (handle_special_swappables): Update call accordingly.
33651         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
33652         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33653         Build a new vector rather than modifying a CONST_VECTOR in-place.
33654         (handle_special_swappables): Update call accordingly.
33656 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33658         * simplify-rtx.c (simplify_const_binary_operation): Use
33659         CONST_VECTOR_ELT instead of XVECEXP.
33661 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33663         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
33664         the selector elements to be different from the data elements
33665         if the selector is a VECTOR_CST.
33666         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
33667         ssizetype for the selector.
33669 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33671         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
33672         before testing each element individually.
33673         * tree-vect-generic.c (lower_vec_perm): Likewise.
33675 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33677         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
33678         * selftest-run-tests.c (selftest::run_tests): Call it.
33679         * vector-builder.h (vector_builder::operator ==): New function.
33680         (vector_builder::operator !=): Likewise.
33681         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
33682         (vec_perm_indices::all_from_input_p): New function.
33683         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33684         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
33685         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
33686         instead of reading the VECTOR_CST directly.  Detect whether both
33687         vector inputs are the same before constructing the vec_perm_indices,
33688         and update the number of inputs argument accordingly.  Use the
33689         utility functions added above.  Only construct sel2 if we need to.
33691 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33693         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
33694         the broadcast of the low byte.
33695         (expand_mult_highpart): Use an explicit encoding for the permutes.
33696         * optabs-query.c (can_mult_highpart_p): Likewise.
33697         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
33698         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33699         (vectorizable_bswap): Likewise.
33700         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
33701         explicit encoding for the power-of-2 permutes.
33702         (vect_permute_store_chain): Likewise.
33703         (vect_grouped_load_supported): Likewise.
33704         (vect_permute_load_chain): Likewise.
33706 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33708         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
33709         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
33710         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
33711         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33712         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
33713         (vect_gen_perm_mask_any): Likewise.
33715 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33717         * int-vector-builder.h: New file.
33718         * vec-perm-indices.h: Include int-vector-builder.h.
33719         (vec_perm_indices): Redefine as an int_vector_builder.
33720         (auto_vec_perm_indices): Delete.
33721         (vec_perm_builder): Redefine as a stand-alone class.
33722         (vec_perm_indices::vec_perm_indices): New function.
33723         (vec_perm_indices::clamp): Likewise.
33724         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
33725         (vec_perm_indices::new_vector): New function.
33726         (vec_perm_indices::new_expanded_vector): Update for new
33727         vec_perm_indices class.
33728         (vec_perm_indices::rotate_inputs): New function.
33729         (vec_perm_indices::all_in_range_p): Operate directly on the
33730         encoded form, without computing elided elements.
33731         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
33732         encoding.  Update for new vec_perm_indices class.
33733         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
33734         the given vec_perm_builder.
33735         (expand_vec_perm_var): Update vec_perm_builder constructor.
33736         (expand_mult_highpart): Use vec_perm_builder instead of
33737         auto_vec_perm_indices.
33738         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
33739         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
33740         or double series encoding as appropriate.
33741         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
33742         vec_perm_indices instead of auto_vec_perm_indices.
33743         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33744         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33745         (vect_permute_store_chain): Likewise.
33746         (vect_grouped_load_supported): Likewise.
33747         (vect_permute_load_chain): Likewise.
33748         (vect_shift_permute_load_chain): Likewise.
33749         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33750         (vect_transform_slp_perm_load): Likewise.
33751         (vect_schedule_slp_instance): Likewise.
33752         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33753         (vectorizable_mask_load_store): Likewise.
33754         (vectorizable_bswap): Likewise.
33755         (vectorizable_store): Likewise.
33756         (vectorizable_load): Likewise.
33757         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
33758         vec_perm_indices instead of auto_vec_perm_indices.  Use
33759         tree_to_vec_perm_builder to read the vector from a tree.
33760         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
33761         vec_perm_builder instead of a vec_perm_indices.
33762         (have_whole_vector_shift): Use vec_perm_builder and
33763         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
33764         truncation to calc_vec_perm_mask_for_shift.
33765         (vect_create_epilog_for_reduction): Likewise.
33766         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
33767         from auto_vec_perm_indices to vec_perm_indices.
33768         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33769         instead of changing individual elements.
33770         (aarch64_vectorize_vec_perm_const): Use new_vector to install
33771         the vector in d.perm.
33772         * config/arm/arm.c (expand_vec_perm_d::perm): Change
33773         from auto_vec_perm_indices to vec_perm_indices.
33774         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33775         instead of changing individual elements.
33776         (arm_vectorize_vec_perm_const): Use new_vector to install
33777         the vector in d.perm.
33778         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
33779         Update vec_perm_builder constructor.
33780         (rs6000_expand_interleave): Likewise.
33781         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
33782         (rs6000_expand_interleave): Likewise.
33784 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33786         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33787         to qimode could truncate the indices.
33788         * optabs.c (expand_vec_perm_var): Likewise.
33790 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33792         * Makefile.in (OBJS): Add vec-perm-indices.o.
33793         * vec-perm-indices.h: New file.
33794         * vec-perm-indices.c: Likewise.
33795         * target.h (vec_perm_indices): Replace with a forward class
33796         declaration.
33797         (auto_vec_perm_indices): Move to vec-perm-indices.h.
33798         * optabs.h: Include vec-perm-indices.h.
33799         (expand_vec_perm): Delete.
33800         (selector_fits_mode_p, expand_vec_perm_var): Declare.
33801         (expand_vec_perm_const): Declare.
33802         * target.def (vec_perm_const_ok): Replace with...
33803         (vec_perm_const): ...this new hook.
33804         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33805         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33806         * doc/tm.texi: Regenerate.
33807         * optabs.def (vec_perm_const): Delete.
33808         * doc/md.texi (vec_perm_const): Likewise.
33809         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33810         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33811         expand_vec_perm for constant permutation vectors.  Assert that
33812         the mode of variable permutation vectors is the integer equivalent
33813         of the mode that is being permuted.
33814         * optabs-query.h (selector_fits_mode_p): Declare.
33815         * optabs-query.c: Include vec-perm-indices.h.
33816         (selector_fits_mode_p): New function.
33817         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33818         is defined, instead of checking whether the vec_perm_const_optab
33819         exists.  Use targetm.vectorize.vec_perm_const instead of
33820         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
33821         fit in the vector mode before using a variable permute.
33822         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33823         vec_perm_indices instead of an rtx.
33824         (expand_vec_perm): Replace with...
33825         (expand_vec_perm_const): ...this new function.  Take the selector
33826         as a vec_perm_indices rather than an rtx.  Also take the mode of
33827         the selector.  Update call to shift_amt_for_vec_perm_mask.
33828         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33829         Use vec_perm_indices::new_expanded_vector to expand the original
33830         selector into bytes.  Check whether the indices fit in the vector
33831         mode before using a variable permute.
33832         (expand_vec_perm_var): Make global.
33833         (expand_mult_highpart): Use expand_vec_perm_const.
33834         * fold-const.c: Includes vec-perm-indices.h.
33835         * tree-ssa-forwprop.c: Likewise.
33836         * tree-vect-data-refs.c: Likewise.
33837         * tree-vect-generic.c: Likewise.
33838         * tree-vect-loop.c: Likewise.
33839         * tree-vect-slp.c: Likewise.
33840         * tree-vect-stmts.c: Likewise.
33841         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33842         Delete.
33843         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33844         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33845         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33846         (aarch64_vectorize_vec_perm_const): ...this new function.
33847         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33848         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33849         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33850         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33851         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33852         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33853         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33854         into...
33855         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
33856         check for NEON modes.
33857         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33858         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33859         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33860         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33861         into...
33862         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
33863         the old VEC_PERM_CONST conditions.
33864         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33865         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33866         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33867         (ia64_vectorize_vec_perm_const_ok): Merge into...
33868         (ia64_vectorize_vec_perm_const): ...this new function.
33869         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33870         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33871         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33872         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33873         * config/mips/mips.c (mips_expand_vec_perm_const)
33874         (mips_vectorize_vec_perm_const_ok): Merge into...
33875         (mips_vectorize_vec_perm_const): ...this new function.
33876         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
33877         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
33878         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
33879         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
33880         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
33881         (rs6000_expand_vec_perm_const): Delete.
33882         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
33883         Delete.
33884         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33885         (altivec_expand_vec_perm_const_le): Take each operand individually.
33886         Operate on constant selectors rather than rtxes.
33887         (altivec_expand_vec_perm_const): Likewise.  Update call to
33888         altivec_expand_vec_perm_const_le.
33889         (rs6000_expand_vec_perm_const): Delete.
33890         (rs6000_vectorize_vec_perm_const_ok): Delete.
33891         (rs6000_vectorize_vec_perm_const): New function.
33892         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33893         an element count and rtx array.
33894         (rs6000_expand_extract_even): Update call accordingly.
33895         (rs6000_expand_interleave): Likewise.
33896         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
33897         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
33898         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
33899         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
33900         (rs6000_expand_vec_perm_const): Delete.
33901         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33902         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33903         (altivec_expand_vec_perm_const_le): Take each operand individually.
33904         Operate on constant selectors rather than rtxes.
33905         (altivec_expand_vec_perm_const): Likewise.  Update call to
33906         altivec_expand_vec_perm_const_le.
33907         (rs6000_expand_vec_perm_const): Delete.
33908         (rs6000_vectorize_vec_perm_const_ok): Delete.
33909         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
33910         reference to the SPE evmerge intructions.
33911         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33912         an element count and rtx array.
33913         (rs6000_expand_extract_even): Update call accordingly.
33914         (rs6000_expand_interleave): Likewise.
33915         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
33916         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
33917         new function.
33918         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33920 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33922         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
33923         vector mode and that that mode matches the mode of the data
33924         being permuted.
33925         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
33926         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
33927         directly using expand_vec_perm_1 when forcing selectors into
33928         registers.
33929         (expand_vec_perm_var): New function, split out from expand_vec_perm.
33931 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33933         * optabs-query.h (can_vec_perm_p): Delete.
33934         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
33935         * optabs-query.c (can_vec_perm_p): Split into...
33936         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
33937         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
33938         particular selector is valid.
33939         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33940         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33941         (vect_grouped_load_supported): Likewise.
33942         (vect_shift_permute_load_chain): Likewise.
33943         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33944         (vect_transform_slp_perm_load): Likewise.
33945         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33946         (vectorizable_bswap): Likewise.
33947         (vect_gen_perm_mask_checked): Likewise.
33948         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
33949         implementations of variable permutation vectors into account
33950         when deciding which selector to use.
33951         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
33952         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
33953         with a false third argument.
33954         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
33955         to test whether the constant selector is valid and can_vec_perm_var_p
33956         to test whether a variable selector is valid.
33958 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33960         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
33961         * optabs-query.c (can_vec_perm_p): Likewise.
33962         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
33963         instead of vec_perm_indices.
33964         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
33965         (vect_gen_perm_mask_checked): Likewise,
33966         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
33967         (vect_gen_perm_mask_checked): Likewise,
33969 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33971         * optabs-query.h (qimode_for_vec_perm): Declare.
33972         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
33973         (qimode_for_vec_perm): ...this new function.
33974         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
33976 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33978         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
33979         does not have a conditional at the top.
33981 2018-01-02  Richard Biener  <rguenther@suse.de>
33983         * ipa-inline.c (big_speedup_p): Fix expression.
33985 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
33987         PR target/81616
33988         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
33989         for generic 4->6.
33991 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
33993         PR target/81616
33994         Generic tuning.
33995         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
33996         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
33997         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
33998         cond_taken_branch_cost 3->4.
34000 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
34002         PR tree-optimization/83581
34003         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34004         TODO_cleanup_cfg if any changes have been made.
34006         PR middle-end/83608
34007         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34008         convert_modes if target mode has the right side, but different mode
34009         class.
34011         PR middle-end/83609
34012         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34013         last argument when extracting from CONCAT.  If either from_real or
34014         from_imag is NULL, use expansion through memory.  If result is not
34015         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34016         the parts directly to inner mode, if even that fails, use expansion
34017         through memory.
34019         PR middle-end/83623
34020         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34021         check for bswap in mode rather than HImode and use that in expand_unop
34022         too.
34024 Copyright (C) 2018 Free Software Foundation, Inc.
34026 Copying and distribution of this file, with or without modification,
34027 are permitted in any medium without royalty provided the copyright
34028 notice and this notice are preserved.