1 2018-11-30 Alan Modra <amodra@gmail.com>
3 * config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
4 num_insns_constant_wide. Make static. Revise comment.
5 (num_insns_constant_multi): New function.
6 (num_insns_constant): Formatting. Correct CONST_WIDE_INT
7 calculation. Simplify and extract code common to both
8 CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
10 * config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
12 2018-11-30 Richard Biener <rguenther@suse.de>
14 PR tree-optimization/88274
15 * tree-vrp.c (ranges_from_anti_range): Fix handling of
18 2018-11-29 Andi Kleen <ak@linux.intel.com>
20 * config/i386/i386.c (current_fentry_section): Add.
21 (x86_function_profiler): Handle fentry section.
22 (ix86_attribute_table): Add fentry section.
23 * config/i386/i386.opt: Add -mfentry-section.
24 * doc/extend.texi: Document fentry_section attribute.
25 * doc/invoke.texi: Document -mfentry-section.
27 2018-11-29 Andi Kleen <ak@linux.intel.com>
29 * config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
30 (current_fentry_name): Add.
31 (x86_function_profiler): Handle fentry_name attribute.
32 (ix86_handle_fentry_name): Add.
33 (ix86_attribute_table): Add fentry_name.
34 * config/i386/i386.opt: Add -mfentry-name
35 * doc/extend.texi: Document fentry_name.
36 * doc/invoke.texi: Document minstrument-return.
38 2018-11-29 Andi Kleen <ak@linux.intel.com>
40 * config/i386/i386-opts.h (enum instrument_return): Add.
41 * config/i386/i386.c (output_return_instrumentation): Add.
42 (ix86_output_function_return): Call output_return_instrumentation.
43 (ix86_output_call_insn): Call output_return_instrumentation.
44 * config/i386/i386.opt: Add -minstrument-return=.
45 * doc/invoke.texi (-minstrument-return): Document.
47 2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
50 * config/sparc/sparc-modes.def: Minor tweak.
51 * config/sparc/sparc.c: Minor reordering.
52 (sparc_pass_by_reference): Move around.
53 (traverse_record_type): Change offset from HOST_WIDE_INT to int.
54 (classify_registers): Likewise for bitpos.
55 (function_arg_slotno): Remove dead test and tweak comments.
56 <MODE_RANDOM>: Remove useless assertion and test whether the
57 parameter is named in order to pass it in FP registers. Return
58 the regno for floating-point vector types.
59 (compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
60 (compute_fp_layout): Likewise.
61 (count_registers): Likewise.
62 (assign_int_registers): Likewise.
63 (assign_fp_registers): Likewise.
64 (assign_registers): Likewise.
65 (function_arg_record_value): Change size from HOST_WIDE_INT to int
66 and use CEIL_NWORDS to compute the number of registers.
67 (function_arg_union_value): Minor tweaks.
68 (function_arg_vector_value): Add slotno and named parameters, use
69 CEIL_NWORDS to compute the number of registers.
70 (sparc_function_arg_1): Rework handling of vector types. Change
71 size from HOST_WIDE_INT to int.
72 (sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
73 with vector types for the 64-bt ABI.
74 (sparc_function_arg_advance): Likewise.
75 (sparc_return_in_memory): Add reference to -fpcc-struct-return.
76 (sparc_struct_value_rtx): Return NULL_RTX instead of 0.
77 (sparc_function_value_1): Rework handling of vector types. Change
78 size from HOST_WIDE_INT to int.
80 2018-11-29 Jakub Jelinek <jakub@redhat.com>
83 * config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
84 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
85 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
86 *<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
87 *<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
88 define_insn_and_split patterns.
92 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
93 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
94 *<sse4_1_avx2>_pblendvb_lt): Change define_insn into
95 define_insn_and_split.
97 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
100 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
101 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
103 2018-11-29 Uros Bizjak <ubizjak@gmail.com>
105 * config/i386/i386.c (inline_memory_move_cost):
106 Check "in" for 2 in MMX_CLASS_P case.
107 * config/i386/mmx.md (*mov<mode>_internal): Correct
108 TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
109 alternatives in preferred_for_speed attribute calculation.
111 2018-11-29 Martin Sebor <msebor@redhat.com>
115 * doc/extend.texi (attribute constructor): Clarify.
117 2018-11-29 Martin Liska <mliska@suse.cz>
120 * builtins.c (expand_movstr): Fix thinko introduced
121 when switching to the new enum.
123 2018-11-29 qing zhao <qing.zhao@oracle.com>
125 * cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
126 * common.opt: Add -flive-patching flag.
127 * doc/invoke.texi: Document -flive-patching.
128 * flag-types.h (enum live_patching_level): New enum.
129 * ipa-inline.c (can_inline_edge_p): Disable external functions from
130 inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
131 * opts.c (control_options_for_live_patching): New function.
132 (finish_options): Make flag_live_patching incompatible with flag_lto.
133 Control IPA optimizations based on different levels of
136 2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
138 * match.pd (sinh (atanh (x))): New simplification rules.
139 (cosh (atanh (x))): Likewise.
141 2018-11-29 Jakub Jelinek <jakub@redhat.com>
144 * config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
145 (ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
146 (*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
147 *<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
148 *<sse4_1_avx2>_pblendvb_lt): New define_insns.
151 * tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
152 * tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
153 * match.pd (define_predicates): Add uniform_integer_cst_p.
154 (cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
155 so that it works also for vector comparisons with uniform constants
156 with INTEGER_CST element.
159 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
160 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
161 in unsigned_type_for instead of vector integral type where overflow
164 2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
166 There can be at most one .resolver clone per function
167 * config/rs6000/rs6000.c (make_resolver_func): Generate
168 resolver symbol with clone_function_name instead of
169 clone_function_name_numbered.
171 2018-11-29 Richard Biener <rguenther@suse.de>
173 PR tree-optimization/88243
174 * tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
175 type of all pattern-sequence stmts to vect_internal_def.
177 2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
180 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
181 (cortex-r7, cortex-r8): Update default and add new configuration.
182 * doc/invoke.texi (armv7-r): Add two new vfp options.
183 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
186 2018-11-29 Alan Modra <amodra@gmail.com>
188 * config/rs6000/rs6000.c (rs6000_emit_move): Disable long
189 double split for targets other than Darwin.
191 2018-11-29 Alan Modra <amodra@gmail.com>
193 * config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
195 2018-11-29 Alan Modra <amodra@gmail.com>
197 * config/rs6000/predicates.md (easy_fp_constant): Remove code
198 dealing with integers in const_double. Assert on unexpected
199 modes. Delete superfluous ABI_V4 test.
200 * config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
201 Don't call easy_fp_constant for Pmode.
202 (rs6000_hash_constant): Remove code dealing with integers in
204 (rs6000_legitimate_constant_p): Likewise.
205 (output_toc): Formatting, use CONST_DOUBLE_P.
207 2018-11-29 Alan Modra <amodra@gmail.com>
209 * config/rs6000/constraints.md (G, H): Comment on purpose of
210 constraint. Correct mode comments and "G" mode test.
211 * config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
212 alternative handling "F". Add length attr. Formatting.
213 (mov<mode>_softfloat <FMOVE128>): Delete "GH" from
214 alternative, and move "F" to separate alternative. Correct
217 2018-11-29 Alan Modra <amodra@gmail.com>
219 * config/rs6000/predicates.md (easy_vector_constant): Don't call
222 2018-11-29 Alan Modra <amodra@gmail.com>
224 * config.in (HAVE_AS_PLTSEQ): Add.
225 * config/rs6000/predicates.md (indirect_call_operand): New.
226 * config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
227 (rs6000_sibcall_sysv): Declare.
228 * config/rs6000/rs6000.c (init_cumulative_args): Set cookie
229 CALL_LONG for -fno-plt.
230 (print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
231 (rs6000_indirect_call_template_1): Emit .reloc directives for
233 (rs6000_pltseq_template): New function.
234 (rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
235 relocs supported by assembler. Move SYMBOL_REF test to callers.
236 (rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
237 insns in UNSPEC_PLTSEQ, preserving original func_desc.
238 (rs6000_call_sysv): Likewise.
239 (rs6000_sibcall_sysv): New function.
240 * config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
241 * config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
242 UNSPEC_PLT16_LO): New.
243 (pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
244 (call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
245 cookie in constraints. Test explicitly for flags in length attr.
246 Handle unspec operand 1.
247 (call_value_indirect_nonlocal_sysv): Likewise.
248 (call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
249 (call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
250 (sibcall, sibcall_value): Use rs6000_sibcall_sysv.
251 (sibcall_indirect_nonlocal_sysv): New pattern.
252 (sibcall_value_indirect_nonlocal_sysv): Likewise.
253 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
255 * configure.ac: Check for gas plt sequence marker support.
256 * configure: Regenerate.
258 2018-11-29 Alan Modra <amodra@gmail.com>
260 * config/rs6000/predicates.md (unspec_tls): New.
261 * config/rs6000/rs6000-protos.h (rs6000_call_template),
262 (rs6000_sibcall_template): Update prototype.
263 (rs6000_longcall_ref): Delete.
264 (rs6000_call_sysv): Declare.
265 * config/rs6000/rs6000.c (edit_tls_call_insn): New function.
266 (global_tlsarg): New variable.
267 (rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
269 (print_operand): Extract UNSPEC_TLSGD address operand.
270 (rs6000_call_template, rs6000_sibcall_template): Remove arg
271 parameter, extract from second call operand instead.
272 (rs6000_longcall_ref): Make static, localize vars.
273 (rs6000_call_aix): Rename parameter to reflect new usage. Take
274 tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
275 (rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
276 tlsarg from global_tlsarg.
277 (rs6000_call_sysv): New function.
278 * config/rs6000/rs6000.md: Adjust rs6000_call_template and
279 rs6000_sibcall_template throughout.
280 (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
281 (tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
282 (tls_gdld_nomark): New insn.
283 (tls_gd): Swap operand order. Simplify mode selection.
284 (tls_gd_high, tls_gd_low): Swap operand order.
285 (tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
286 Simplify mode selection.
287 (tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
288 (call, call_value): Don't assert for second call operand.
289 Use rs6000_call_sysv.
291 2018-11-29 Alan Modra <amodra@gmail.com>
293 * config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
294 (call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
295 (call_value_nonlocal_darwin64): Remove constraints from second call
296 arg, the rounded_stack_size_rtx arg.
297 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
298 (tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
299 (tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
300 (call_value_local64, call_indirect_nonlocal_sysv),
301 (call_nonlocal_sysv, call_nonlocal_sysv_secure),
302 (call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
303 (call_value_nonlocal_sysv_secure, call_local_aix),
304 (call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
305 (call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
306 (call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
307 (sibcall_value_local32, sibcall_value_local64, sibcall_aix),
308 (sibcall_value_aix): Likewise.
310 2018-11-29 Alan Modra <amodra@gmail.com>
312 * config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
313 with P throughout except for call mems which should use SI.
314 (tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
315 attributes. Replace with bits, mode and ptrload respectively.
317 2018-11-29 Alan Modra <amodra@gmail.com>
319 * config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
320 (rs6000_indirect_sibcall_template): Declare.
321 * config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
322 (rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
324 * config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
325 (call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
326 (call_indirect_aix, call_value_indirect_aix): Use
327 rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
328 call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
329 handle both speculation and non-speculation cases.
330 (call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
331 (call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
333 2018-11-29 Alan Modra <amodra@gmail.com>
335 * config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
336 (rs6000_sibcall_template): Declare.
337 (macho_call_template): Rename from output_call.
338 * config/rs6000/rs6000.c (rs6000_call_template_1): New function.
339 (rs6000_call_template, rs6000_sibcall_template): Likewise.
340 (macho_call_template): Rename from output_call.
341 * config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
342 (tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
343 (tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
344 (call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
345 (call_value_nonlocal_sysv_secure, call_nonlocal_aix),
346 (call_value_nonlocal_aix): Use rs6000_call_template and update
347 occurrences of output_call to macho_call_template.
348 (sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
349 (sibcall_value_aix): Use rs6000_sibcall_template.
351 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
353 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
354 we determine if unaligned vsx is ok.
356 2018-11-28 Jan Hubicka <jh@suse.cz>
358 * predict.c (determine_unlikely_bbs): Forward declare; also determine
359 edges that are always known to be taken because it is only likely
360 edge out of given BB.
361 (tree_estimate_probability): Call before profile guessing to get bit
364 2018-11-28 Jan Hubicka <jh@suse.cz>
366 * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
367 profile_probability::always better.
369 2018-11-28 Jan Hubicka <jh@suse.cz>
371 * profile-count.h (profile_count::split): Give better result when
372 splitting profile_probability::always.
374 2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
377 * ira-costs.c (scan_one_insn): Process subregs when updating costs
378 for pseudos and allocnos from insn.
380 2018-11-28 David Edelsohn <dje.gcc@gmail.com>
382 * config/rs6000/aix72.h: Update to match aix71.h changes.
384 2018-11-28 Jeff Law <law@redhat.com>
386 * config/h8300/constraints.md: Add "C" constraint for call insns.
387 * config/h8300/h8300.md (call, call_value): Turn into a define_expand
388 and define_insn pair. Move invalid call targets into a register in
389 the expander and fix constraints in the matching pattern.
390 * config/h8300/predicates.md (call_expander_operand): Renamed from
391 call_insn_operand. Reject things we shouldn't be trying to handle.
392 (call_insn_operand): New predicate for use by the call/call_value
394 (small_call_insn_operand): Update appropriately.
396 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
398 * config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
399 calls to strtok with strtok_r.
401 2018-11-28 Richard Biener <rguenther@suse.de>
403 PR tree-optimization/88223
404 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
405 over a stored-same value may-alias store make sure to consider
406 partial overlaps which are valid when TBAA reasonings do not
407 apply and byte-granular overlaps are possible at all.
409 2018-11-28 Richard Biener <rguenther@suse.de>
411 PR tree-optimization/88217
412 * vr-values.c (vr_values::extract_range_from_phi_node): Make
413 sure to handle results > +INF and < -INF correctly when
414 trying to drop down to +INF - 1 or -INF + 1.
416 2018-11-28 Alan Modra <amodra@gmail.com>
418 * xcoffout.c (do_block): Signed/unsigned warning fix.
420 2018-11-28 Richard Biener <rguenther@suse.de>
422 PR tree-optimization/79351
423 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
424 empty CONSTRUCTORs ensure the store is at a constant position.
426 2018-11-28 Richard Biener <rguenther@suse.de>
428 PR tree-optimization/88229
429 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
430 is an INTEGER_CST before accessing it so.
432 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
434 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
436 2018-11-28 Jakub Jelinek <jakub@redhat.com>
439 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
440 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
441 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
443 2018-11-27 Martin Liska <mliska@suse.cz>
445 * gcov.c (generate_results): Append current_working_directory
448 2018-11-27 Mike Gulick <mgulick@mathworks.com>
450 PR preprocessor/83173
451 * input.c (dump_location_info): Dump reason and included_from
452 fields from line_map_ordinary struct. Fix indentation when
454 * diagnostic-show-locus.c (num_digits, num_digits): Move to
455 diagnostic.c to allow it to be utilized by input.c.
456 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
458 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
459 * diagnostic.h (num_digits): Add extern definition.
461 2018-11-27 Fredrik Noring <noring@nocrew.org>
463 * config/mips/mips.c (mips_reorg_process_insns)
464 (mips_option_override): Handle `-mfix-r5900'.
465 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
467 * config/mips/mips.opt (mfix-r5900): New option.
468 * doc/invoke.texi: Document the `r5900' processor name, and
469 `-mfix-r5900' and `-mno-fix-r5900' options.
471 2018-11-27 Jakub Jelinek <jakub@redhat.com>
474 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
475 output_operand_lossage instead of gcc_assert.
476 <case 't'>: Likewise.
477 <case 'z'>: Likewise.
478 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
480 2018-11-27 Jeff Law <law@redhat.com>
482 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
483 in call to move_by_pieces.
485 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
488 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
489 call to move_by_pieces.
491 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
492 in call to move_by_pieces.
494 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
495 RETURN_BEGIN in call to move_by_pieces.
496 (microblaze_expand_block_move): Likewise.
498 2018-11-27 Tamar Christina <tamar.christina@arm.com>
500 * doc/md.texi (xorsign): Document it.
502 2018-11-27 Martin Liska <mliska@suse.cz>
504 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
505 * gcc.c (find_fortran_preinclude_file): New function
506 to handle Fortran pre-include.
508 2018-11-27 Martin Liska <mliska@suse.cz>
510 * asan.c (asan_emit_stack_protection): Use new enum values
511 instead of int constants.
512 * builtins.c (expand_builtin_memory_copy_args): Replace int
513 type with memop_ret enum type.
514 (expand_builtin_mempcpy_args): Likewise.
515 (expand_builtin_memcpy): Use new enum values
516 instead of int constants. Likewise.
517 (expand_builtin_mempcpy): Likewise.
518 (expand_movstr): Likewise.
519 (expand_builtin_strcpy_args): Likewise.
520 (expand_builtin_stpcpy_1): Likewise.
521 (expand_builtin_strncpy): Likewise.
522 (expand_builtin_memset_args): Likewise.
523 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
524 (move_by_pieces_d::finish_retmode): ... this.
525 (move_by_pieces): Change last argument type to memop_ret.
526 (store_by_pieces): Use new enum values
527 instead of int constants.
528 (emit_block_move_hints): Likewise.
529 (emit_push_insn): Likewise.
530 (store_expr): Likewise.
531 * expr.h (store_by_pieces): Change int to newly added enum
533 * rtl.h (enum memop_ret): Define.
534 (move_by_pieces): Use the enum type.
536 2018-11-27 Alan Modra <amodra@gmail.com>
538 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
540 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
541 form. Error on missing -mcpu case.
542 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
543 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
544 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
545 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
546 else if .. specs form. Error on missing -mcpu case. Don't output
547 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
549 2018-11-26 David Malcolm <dmalcolm@redhat.com>
551 * dump-context.h (dump_context::dump_loc): Convert 1st param from
552 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
553 const dump_location_t & to const dump_user_location_t &.
554 (dump_context::dump_loc_immediate): Convert 2nd param from
555 const dump_location_t & to const dump_user_location_t &.
556 (dump_context::dump_gimple_stmt): Convert 1st param from
557 dump_flags_t to const dump_metadata_t &.
558 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
559 2nd param from const dump_location_t & to
560 const dump_user_location_t &.
561 (dump_context::dump_gimple_expr): Convert 1st param from
562 dump_flags_t to const dump_metadata_t &.
563 (dump_context::dump_gimple_expr_loc): Likewise; convert
564 2nd param from const dump_location_t & to
565 const dump_user_location_t &.
566 (dump_context::dump_generic_expr): Convert 1st param from
567 dump_flags_t to const dump_metadata_t &.
568 (dump_context::dump_generic_expr_loc): Likewise; convert
569 2nd param from const dump_location_t & to
570 const dump_user_location_t &.
571 (dump_context::dump_printf_va): Convert 1st param from
572 dump_flags_t to const dump_metadata_t &.
573 (dump_context::dump_printf_loc_va): Likewise; convert
574 2nd param from const dump_location_t & to
575 const dump_user_location_t &.
576 (dump_context::dump_dec): Convert 1st param from
577 dump_flags_t to const dump_metadata_t &.
578 (dump_context::dump_symtab_node): Likewise.
579 (dump_context::begin_scope): Split out 2nd param into
580 user and impl locations.
581 (dump_context::ensure_pending_optinfo): Add metadata param.
582 (dump_context::begin_next_optinfo): Replace dump_location_t param
583 with metadata and user location.
584 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
585 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
586 const dump_location_t & to const dump_user_location_t &.
587 (dump_context::dump_loc_immediate): Convert 2nd param from
588 const dump_location_t & to const dump_user_location_t &.
589 (dump_context::dump_gimple_stmt): Convert 1st param from
590 dump_flags_t to const dump_metadata_t &.
591 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
592 2nd param from const dump_location_t & to
593 const dump_user_location_t &.
594 (dump_context::dump_gimple_expr): Convert 1st param from
595 dump_flags_t to const dump_metadata_t &.
596 (dump_context::dump_gimple_expr_loc): Likewise; convert
597 2nd param from const dump_location_t & to
598 const dump_user_location_t &.
599 (dump_context::dump_generic_expr): Convert 1st param from
600 dump_flags_t to const dump_metadata_t &.
601 (dump_context::dump_generic_expr_loc): Likewise; convert
602 2nd param from const dump_location_t & to
603 const dump_user_location_t &.
604 (dump_context::dump_printf_va): Convert 1st param from
605 dump_flags_t to const dump_metadata_t &.
606 (dump_context::dump_printf_loc_va): Likewise; convert
607 2nd param from const dump_location_t & to
608 const dump_user_location_t &.
609 (dump_context::dump_dec): Convert 1st param from
610 dump_flags_t to const dump_metadata_t &.
611 (dump_context::dump_symtab_node): Likewise.
612 (dump_context::begin_scope): Split out 2nd param into
613 user and impl locations.
614 (dump_context::ensure_pending_optinfo): Add metadata param.
615 (dump_context::begin_next_optinfo): Replace dump_location_t param
616 with metadata and user location.
617 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
618 const dump_metadata_t &.
619 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
620 const dump_location_t & to const dump_user_location_t &.
621 (dump_gimple_expr): Convert 1st param from dump_flags_t to
622 const dump_metadata_t &.
623 (dump_gimple_expr_loc): Likewise; convert 2nd param from
624 const dump_location_t & to const dump_user_location_t &.
625 (dump_generic_expr): Convert 1st param from dump_flags_t to
626 const dump_metadata_t &.
627 (dump_generic_expr_loc): Likewise; convert 2nd param from
628 const dump_location_t & to const dump_user_location_t &.
629 (dump_printf): Convert 1st param from dump_flags_t to
630 const dump_metadata_t &.
631 (dump_printf_loc): Likewise; convert 2nd param from
632 const dump_location_t & to const dump_user_location_t &.
633 (dump_dec): Convert 1st param from dump_flags_t to
634 const dump_metadata_t &.
635 (dump_symtab_node): Likewise.
636 (dump_begin_scope): Split out 2nd param into user and impl
638 (selftest::assert_impl_location_eq): New function.
639 (ASSERT_IMPL_LOCATION_EQ): New macro.
640 (selftest::test_impl_location): Update to use
641 ASSERT_IMPL_LOCATION_EQ.
642 (selftest::test_capture_of_dump_calls): Convert "loc" to
643 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
644 verifying line numbers of dump emissions.
645 * dumpfile.h (class dump_metadata_t): New class.
646 (dump_printf): Convert 1st param from dump_flags_t to
647 const dump_metadata_t &.
648 (dump_printf_loc): Likewise; convert 2nd param from
649 const dump_location_t & to const dump_user_location_t &.
650 (dump_generic_expr_loc): Likewise.
651 (dump_generic_expr): Convert 1st param from dump_flags_t to
652 const dump_metadata_t &.
653 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
654 const dump_location_t & to const dump_user_location_t &.
655 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
656 const dump_metadata_t &.
657 (dump_gimple_expr_loc): Likewise; convert 2nd param from
658 const dump_location_t & to const dump_user_location_t &.
659 (dump_gimple_expr): Convert 1st param from dump_flags_t to
660 const dump_metadata_t &.
661 (dump_symtab_node): Likewise.
662 (dump_dec): Likewise.
663 (dump_begin_scope): Split out 2nd param into user and impl
665 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
666 location and impl_location, and capture the impl_location.
667 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
668 * loop-unroll.c (report_unroll): Update for changes to
669 dump_printf_loc and dump_printf.
670 * opt-problem.cc (opt_problem::opt_problem): Update for change to
672 * optinfo-emit-json.cc
673 (selftest::test_building_json_from_dump_calls): Convert "loc" from
674 dump_location_t to dump_user_location_t.
675 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
677 * profile.c (compute_branch_probabilities): Update for change to
679 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
680 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
683 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
685 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
686 and check_effective_target_ptr_eq_long.
688 2018-11-27 Alan Modra <amodra@gmail.com>
690 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
691 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
692 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
693 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
694 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
695 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
696 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
697 (ASM_APP_ON, ASM_APP_OFF): Don't define.
698 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
699 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
700 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
701 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
702 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
703 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
704 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
705 (GNU_USER_TARGET_CRTN): Redefine.
706 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
707 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
708 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
709 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
710 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
711 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
712 (LINK_EH_SPEC): Don't define.
714 2018-11-26 Martin Sebor <msebor@redhat.com>
717 * expr.c (string_constant): Handle top-level decls of all character
718 types and subobjects of narrow character type.
720 2018-11-27 Alan Modra <amodra@gmail.com>
722 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
723 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
724 GNU_USER_TARGET_OS_CPP_BUILTINS.
725 (RS6000_ABI_NAME): Define.
726 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
727 GNU_USER_TARGET_OS_CPP_BUILTINS.
728 (MUSL_DYNAMIC_LINKER32): Undef before defining.
729 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
730 (CHOOSE_DYNAMIC_LINKER): Don't define.
731 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
732 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
733 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
735 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
736 TARGET_OS_CPP_BUILTINS.
738 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
740 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
742 2018-11-26 Jakub Jelinek <jakub@redhat.com>
745 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
746 and !TARGET_64BIT, return NULL_TREE.
749 * dwarf2out.c (secname_for_decl): For functions with
750 DECL_SECTION_NAME if in_cold_section_p, try to return
751 current_function_section's name if it is a named section.
753 2018-11-26 Maya Rashish <coypu@sdf.org>
756 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
757 * config/x-netbsd: New file.
758 * config/host-netbsd: New file.
760 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
762 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
763 Clarify documentation for check_effective_target_size32plus.
765 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
767 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
768 and modify expand_strncmp_vec_sequence.
769 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
770 (generate_6432_conversion): New function.
771 (expand_block_compare): Add support for vsx.
772 (expand_block_compare_gpr): New function.
773 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
774 default limit to 63 because of more compact vsx code.
776 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
779 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
780 for registers for which no debug information can be generated.
781 Use INVALID_REGNUM for non-existent registers.
782 (dbx64_register_map): Ditto.
783 (svr4_dbx_register_map): Ditto.
785 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
788 * doc/invoke.texi (Optimize Options): Document that
789 -freorder-functions also uses "hot" and "cold" attributes.
791 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
793 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
795 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
797 * config/arm/types.md (mul64): Rename to...
798 (widen_mul64): ... This.
799 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
800 * config/arm/cortex-a15.md: Likewise.
801 * config/arm/cortex-a5.md: Likewise.
802 * config/arm/cortex-a53.md: Likewise.
803 * config/arm/cortex-a57.md: Likewise.
804 * config/arm/cortex-a7.md: Likewise.
805 * config/arm/cortex-m4.md: Likewise.
806 * config/arm/exynos-m1.md: Likewise.
807 * config/arm/marvell-pj4.md: Likewise.
808 * config/arm/xgene1.md: Likewise.
810 2018-11-26 Richard Biener <rguenther@suse.de>
812 PR tree-optimization/88182
813 * tree-vect-loop.c (vectorizable_reduction): Pick up single
814 correct reduc_def_info.
815 * tree-vect-slp.c (vect_analyze_slp_instance): Set
816 STMT_VINFO_REDUC_DEF of the first stmt.
818 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
820 * doc/invoke.texi: Document z14/arch12 -march option.
822 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
825 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
826 (Warning Options): Likewise.
828 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
831 * doc/extend.texi (Common Function Attributes): Clarify that
832 functions with "const" attribute can read const global variables.
834 2018-11-26 Alan Modra <amodra@gmail.com>
836 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
838 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
841 * doc/extend.texi (Common Variable Attributes): Use preferred
842 placement of type attributes in examples, plus whitespace fixes.
843 (Type Attributes): Clarify why placement of attributes
844 immediately after struct/union/enum keyword is preferred.
845 (Common Type Attributes): Use preferred placement of type
846 attributes in examples, plus more whitespace fixes.
848 2018-11-25 Paul Koning <ni1d@arrl.net>
850 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
852 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
854 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
855 attributes): Document d_runtime.
857 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
860 * ira-costs.c (record_operand_costs): Initiate register move cost
863 2018-11-23 Jeff Law <law@redhat.com>
865 PR rtl-optimization/87468
866 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
867 EDGE_IGNORE on all outgoing edges of the duplicate block.
869 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
872 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
873 its mode does not fit to the original class.
875 2018-11-23 Martin Sebor <msebor@redhat.com>
877 PR tree-optimization/87756
878 * expr.c (string_constant): Synthesize a string literal from
879 the address of a constant character.
880 * tree.c (build_string_literal): Add an argument.
881 * tree.h (build_string_literal): Same.
883 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
885 * config/aarch64/aarch64-cores.def: Define emag.
886 * config/aarch64/aarch64-tune.md: Regenerated with emag.
887 * config/aarch64/aarch64.c (emag_tunings): New struct.
888 * doc/invoke.texi: Document mtune value.
890 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
891 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
893 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
895 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
897 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
899 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
902 2018-11-23 Richard Biener <rguenther@suse.de>
904 PR tree-optimization/88149
905 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
906 the case where there are two different def types for the
907 same operand at different operand position in the same stmt.
909 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
911 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
912 gen_atomic_compare_swap_1.
913 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
914 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
915 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
916 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
917 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
919 * config/arm/arm.md (neon_vext<mode>),
920 (neon_vrev64<mode>, neon_vrev32<mode>),
921 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
922 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
923 before the pattern name.
924 * config/arm/sync.md:
925 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
926 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
928 2018-11-23 Jakub Jelinek <jakub@redhat.com>
930 PR tree-optimization/86614
931 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
932 if TREE_NO_WARNING is set on ref.ref.
934 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
935 Alan Coopersmith <alan.coopersmith@oracle.com>
938 * doc/extend.texi (Designated Inits): Clarify handling of multiple
939 initializers for unions.
941 2018-11-22 Jan Hubicka <jh@suse.cz>
944 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
945 parameters; do not warn here.
946 (odr_subtypes_equivalent_p): Likewise.
947 (warn_odr): Fix typo.
948 (warn_types_mismatch): Do not output confused warnings on integer types.
949 (odr_types_equivalent_p): Update.
951 2018-11-22 Jakub Jelinek <jakub@redhat.com>
953 * config/i386/i386.c (ix86_option_override_internal,
954 ix86_can_inline_p, classify_argument, construct_container,
955 ix86_expand_prologue, ix86_expand_split_stack_prologue,
956 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
957 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
958 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
961 * config/i386/i386.c (ix86_option_override_internal): For
962 stack_protector_guard related options, use opts_set->x_ instead
963 of global_options_set. and prefix options with opts->x_ . Move
964 defaults for offset and reg into else block.
966 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
968 * config/i386/i386.c (ix86_check_avx_upper_register):
969 Return true for all SSE registers with mode bitsize > 128.
971 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
973 PR rtl-optimization/87718
974 * ira-costs.c: Remove trailing white-spaces.
975 (record_operand_costs): Add a special treatment for moves
976 involving a hard register.
978 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
980 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
981 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
983 2018-11-22 Martin Liska <mliska@suse.cz>
985 * common/config/i386/i386-common.c (processor_names): Add
986 static assert and add missing "znver2".
987 (ix86_get_valid_option_values): Add checking assert for null
988 values and add "native" value if feasible.
989 * config/i386/i386.h: Do not declare size of processor_names.
990 * common/config/i386/i386-common.c:
991 * config/i386/i386.c: Add static assert for size
992 of processor_cost_table.
994 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
996 * target-insns.def (stack_protect_combined_set): Define new standard
998 (stack_protect_combined_test): Likewise.
999 * cfgexpand.c (stack_protect_prologue): Try new
1000 stack_protect_combined_set pattern first.
1001 * function.c (stack_protect_epilogue): Try new
1002 stack_protect_combined_test pattern first.
1003 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
1004 parameters to control which register to use as PIC register and force
1005 reloading PIC register respectively. Insert in the stream of insns if
1007 (legitimize_pic_address): Expose above new parameters in prototype and
1008 adapt recursive calls accordingly. Use pic_reg if non null instead of
1010 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
1011 (arm_legitimize_address): Adapt to new legitimize_pic_address
1013 (thumb_legitimize_address): Likewise.
1014 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
1015 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
1016 (thumb1_expand_prologue): Likewise.
1017 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
1019 (arm_load_pic_register): Likewise.
1020 * config/arm/predicated.md (guard_addr_operand): New predicate.
1021 (guard_operand): New predicate.
1022 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
1024 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
1026 (stack_protect_combined_set): New expander..
1027 (stack_protect_combined_set_insn): New insn_and_split pattern.
1028 (stack_protect_set_insn): New insn pattern.
1029 (stack_protect_combined_test): New expander.
1030 (stack_protect_combined_test_insn): New insn_and_split pattern.
1031 (arm_stack_protect_test_insn): New insn pattern.
1032 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
1033 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
1034 (UNSPEC_SP_TEST): Likewise.
1035 * doc/md.texi (stack_protect_combined_set): Document new standard
1037 (stack_protect_set): Clarify that the operand for guard's address is
1039 (stack_protect_combined_test): Document new standard pattern name.
1040 (stack_protect_test): Clarify that the operand for guard's address is
1043 2018-11-22 Richard Biener <rguenther@suse.de>
1045 PR tree-optimization/88148
1046 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
1047 valueization callback parameter and handle it.
1048 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
1049 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
1051 2018-11-22 Richard Biener <rguenther@suse.de>
1055 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1056 which can appear in size expressions.
1057 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1058 CALL_EXPR_BY_DESCRIPTOR.
1059 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1060 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1061 CALL_EXPR_BY_DESCRIPTOR.
1062 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1066 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1069 2018-11-22 Richard Biener <rguenther@suse.de>
1071 PR tree-optimization/88069
1072 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
1073 apply to default defs.
1075 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1079 * config/i386/i386.c (ix86_option_override_internal): Default
1080 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1082 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1083 stack_protect_test, stack_protect_test_<mode>): Use empty condition
1084 instead of TARGET_SSP_TLS_GUARD.
1086 2018-11-22 Martin Liska <mliska@suse.cz>
1089 * config/i386/i386.c (ix86_option_override_internal): Error
1090 about usage -mabi=ms and -fsanitize=thread.
1092 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
1095 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
1098 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
1100 * lra-spills.c (lra_final_code_change): Remove useless move insns.
1102 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
1105 * function.c (expand_function_end): Do not emit extra blockage insn.
1107 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
1110 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
1111 of FIRST_SSE_REG for 4 or 8 byte modes.
1113 2018-11-21 Jan Hubicka <jh@suse.cz>
1116 * tree.c (fld_decl_context): Break out from ...
1117 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
1118 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
1119 (fld_incomplete_type_of): Build copy of TYP_DECL.
1120 * ipa-devirt.c (free_enum_values): Rename to ...
1121 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
1122 and TREE_TYPEs of TYPE_DECLs.
1123 (get_odr_type): Initialize odr_vtable_hash if needed.
1125 2018-11-21 Alexandre Oliva <oliva@adacore.com>
1127 * final.c (compute_discriminator): Declare. Renamed from...
1128 (maybe_set_discriminator): ... this. Set and return a local.
1129 (override_discriminator): New.
1130 (final_scan_insn_1): Set it.
1131 (notice_source_line): Adjust. Always set discriminator.
1133 2018-11-21 Jakub Jelinek <jakub@redhat.com>
1136 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
1137 rIJ constraint for aarch64_plus_operand rather than rn.
1139 2018-11-21 Renlin Li <renlin.li@arm.com>
1142 * explow.h (get_dynamic_stack_size): Declare it as external.
1143 * explow.c (record_new_stack_level): Remove function static attribute.
1144 * function.c (assign_stack_local_1): Dynamically align the stack slot
1145 addr for parameter copy on the stack.
1147 2018-11-21 Richard Biener <rguenther@suse.de>
1150 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
1151 * Makefile.in (bitmap.o-warn): Remove again.
1153 2018-11-20 Jeff Law <law@redhat.com>
1155 PR tree-optimization/88069
1156 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
1157 degenerate virtual PHIs.
1159 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
1162 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
1163 nonimmediate_operand with register_operand.
1164 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
1165 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
1166 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
1167 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
1168 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
1169 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
1170 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
1171 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
1172 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
1173 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
1174 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
1175 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
1176 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
1177 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
1178 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
1179 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
1180 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
1181 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
1182 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
1183 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
1184 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
1185 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
1186 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
1187 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
1188 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
1189 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
1190 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
1192 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
1194 * read-rtl.c (apply_subst_iterator): Handle define_split and
1195 define_insn_and_split.
1197 2018-11-21 Jakub Jelinek <jakub@redhat.com>
1199 PR rtl-optimization/87817
1200 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
1201 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
1202 in the pattern to avoid triggering UB when operands[2] is zero.
1203 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
1204 (*tbm_bextri_<mode>): ... this.
1206 2018-11-21 Tom de Vries <tdevries@suse.de>
1209 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
1212 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
1214 * configure.ac: Add check for Binutils to determine whether vector
1215 load/store alignments hints are being supported.
1216 * config.in: Regenerate.
1217 * configure: Regenerate.
1218 * config/s390/s390.c (print_operand): Support new output
1220 * config/s390/s390.md ("movti"): Append alignment hint output
1221 using the new output modifier 'A'.
1222 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
1223 ("*vec_ti_to_v1ti"): Likewise.
1225 2018-11-20 Martin Sebor <msebor@redhat.com>
1227 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
1229 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1232 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
1233 compare ENUM values.
1235 2018-11-20 Jakub Jelinek <jakub@redhat.com>
1237 PR tree-optimization/87895
1238 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1239 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1240 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1241 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1242 has any preds and always use EDGE_PRED (, 0).
1244 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
1247 * mode-switching.c (create_pre_exit): After reload, always split the
1248 fallthrough edge to the exit block.
1250 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1252 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
1253 * tree.c (build_array_type_1): Forward declare.
1254 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
1255 (fld_type_variant): Likewise.
1256 (fld_simplified_types): New hash.
1257 (fld_process_array_type): New function.
1258 (fld_incomplete_type_of): Handle array and enumeration types.
1259 (fld_simplified_type): Handle simplification of arrays.
1260 (free_lang_data): Allocate and free simplified types hash.
1262 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1265 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
1266 when sybtype already violates ODR.
1267 (get_odr_type): Do not ICE when insert is false and type duplicate
1268 is not registered yet.
1269 (register_odr_type): Be sure to register subtypes first.
1271 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
1273 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
1274 DImode parts of the target operand.
1276 2018-11-20 Nathan Sidwell <nathan@acm.org>
1279 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
1281 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1284 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
1286 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
1288 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
1291 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
1292 * ipa.c (possible_inline_candidate_p): Break out from ..
1293 (process_references): ... here ; drop before_inlining_p;
1294 cleanup handling of alises.
1295 (walk_polymorphic_call_targets): Likewise.
1296 (symbol_table::remove_unreachable_nodes): Likewise.
1297 * passes.c (pass_data_ipa_remove_symbols): New structure.
1298 (pass_ipa_remove_symbols): New pass.
1299 (make_pass_ipa_remove_symbols): New function.
1300 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
1301 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
1303 2018-11-20 Richard Biener <rguenther@suse.de>
1305 * tree-vect-stmts.c (vectorizable_condition): Do not get
1306 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
1307 pointless vect_is_simple_use calls.
1309 2018-11-20 Richard Biener <rguenther@suse.de>
1311 PR tree-optimization/88074
1312 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1315 2018-11-20 Richard Biener <rguenther@suse.de>
1317 PR tree-optimization/88069
1318 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
1319 virtual PHI arguments.
1321 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
1324 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
1326 * rtl.h (contains_constant_pool_address_p): New function.
1327 * rtlanal.c (contains_constant_pool_address_p): Likewise.
1329 2018-11-20 Richard Biener <rguenther@suse.de>
1332 * alias.c (component_uses_parent_alias_set_from): Remove
1333 alias-set zero and TYPE_TYPELESS_STORAGE case both already
1334 handled in other ways.
1336 2018-11-20 Richard Biener <rguenther@suse.de>
1338 PR tree-optimization/88087
1339 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
1341 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
1344 2018-11-20 Richard Biener <rguenther@suse.de>
1347 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
1349 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
1352 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
1354 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
1357 * doc/invoke.texi (Link Options): Mention shared libraries
1358 in documentation for the -l option. Simplify discussion and
1359 point to the system linker documentation for details.
1361 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
1363 PR rtl-optimization/88033
1364 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
1365 to itself. Use HARD_REGISTER_NUM_P.
1367 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1369 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
1370 of the loop if vf is non-constant.
1372 2018-11-19 David Malcolm <dmalcolm@redhat.com>
1374 PR tree-optimization/87025
1375 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
1376 immediately after creating the scope optinfo.
1377 (selftest::test_pr87025): New function.
1378 (selftest::dumpfile_c_tests): Call it.
1379 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
1380 that we're not popping the top-level records array.
1381 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
1382 not changing the kind of a "scope" optinfo.
1384 2018-11-19 David Malcolm <dmalcolm@redhat.com>
1386 PR tree-optimization/87025
1387 * dump-context.h: Include "optinfo.h".
1388 (class optrecord_json_writer): New forward decl.
1389 (dump_context::forcibly_enable_optinfo_p): Delete.
1390 (dump_context::optinfo_enabled_p): New member function.
1391 (dump_context::optimization_records_enabled_p): New member
1393 (dump_context::set_json_writer): New member function.
1394 (dump_context::emit_optinfo): New member function.
1395 (dump_context::m_forcibly_enable_optinfo): Delete.
1396 (dump_context::m_json_writer): New member data.
1397 * dumpfile.c (dump_context::set_json_writer): New member function.
1398 (dump_context::finish_any_json_writer): New member function.
1399 (dump_context::end_scope): Replace call to
1400 optimization_records_maybe_pop_dump_scope with call to
1401 m_json_writer->pop_scope.
1402 (dump_context::optinfo_enabled_p): New member function.
1403 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
1404 to dump_context::emit_optinfo.
1405 (dump_context::emit_optinfo): New member function.
1406 (temp_dump_context::temp_dump_context): Replace
1407 m_forcibly_enable_optinfo with call to set_json_writer.
1408 (temp_dump_context::~temp_dump_context): Clean up any json writer.
1409 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
1411 (the_json_writer): Delete.
1412 (optimization_records_start): Delete.
1413 (optimization_records_finish): Delete.
1414 (optimization_records_enabled_p): Delete, in favor of
1415 dump_context::optimization_records_enabled_p.
1416 (optimization_records_maybe_record_optinfo): Delete.
1417 (optimization_records_maybe_pop_dump_scope): Delete.
1418 * optinfo-emit-json.h: Include "json.h". Delete forward
1420 (optimization_records_start): Delete.
1421 (optimization_records_finish): Delete.
1422 (optimization_records_enabled_p): Delete.
1423 (optimization_records_maybe_record_optinfo): Delete.
1424 (optimization_records_maybe_pop_dump_scope): Delete.
1425 (class optrecord_json_writer): Move here from
1426 optinfo-emit-json.cc.
1427 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
1428 to optinfo::emit with call to dump_context::emit_optinfo.
1429 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1430 (optinfo_enabled_p): Delete, in favor of
1431 dump_context::optinfo_enabled_p.
1432 (optinfo_wants_inlining_info_p): Update for conversion o
1433 optimization_records_enabled_p to a member function of
1435 * optinfo.h (optinfo_enabled_p): Delete, in favor of
1436 dump_context::optinfo_enabled_p.
1437 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1438 * toplev.c: Include "dump-context.h".
1439 (compile_file): Replace call to optimization_records_finish with
1440 dump_context::finish_any_json_writer.
1441 (do_compile): Replace call to optimization_records_start with
1442 conditionally creating a optrecord_json_writer for the
1445 2018-11-19 Jakub Jelinek <jakub@redhat.com>
1447 PR tree-optimization/88071
1448 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
1449 of false as last argument to gsi_remove.
1450 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
1451 false as last argument to gsi_replace.
1454 * omp-expand.c: Don't include debug.h.
1455 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
1456 from innermost outer parallel, task, teams or target that has a
1457 child_fn set, or, if there is no such outer region, use
1458 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
1459 whether a suitable BLOCK is found or not.
1460 (expand_parallel_call, expand_teams_call): Don't call
1461 adjust_context_and_scope here.
1462 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
1463 (expand_omp_taskreg, expand_omp_target): Likewise. Call
1464 adjust_context_and_scope.
1465 * dwarf2out.c (dwarf2out_early_global_decl): For
1466 decl_function_context recurse instead of calling dwarf2out_decl.
1468 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
1470 PR rtl-optimization/85925
1471 * rtl.h (word_register_operation_p): New predicate.
1472 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
1473 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
1474 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
1475 (num_sign_bit_copies1): Likewise.
1477 2018-11-19 Richard Biener <rguenther@suse.de>
1480 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1483 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
1485 * compare-elim.c (struct comparison): Add not_in_a field.
1486 (is_not): New static function.
1487 (strip_not): Likewise.
1488 (conforming_compare): Handle a NOT in the first operand.
1489 (can_eliminate_compare): Likewise.
1490 (find_comparison_dom_walker::before_dom_children): Likewise.
1491 (try_eliminate_compare): Likewise.
1492 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
1493 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
1495 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
1497 * doc/extend.texi (Common Type Attributes): Fix typos.
1499 2018-11-19 Martin Liska <mliska@suse.cz>
1501 PR gcov-profile/88045
1502 * coverage.c (coverage_begin_function): Add assert.
1504 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
1507 * doc/extend.texi (Common Function Attributes): Document that
1508 no_instrument_function applies to -p and -pg, too.
1509 * doc/invoke.texi (Instrumentation Options): Add cross-references
1510 to docs for -p, -pg, and -finstrument-functions.
1512 2018-11-18 Alan Modra <amodra@gmail.com>
1514 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
1515 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
1516 (GNU_USER_TARGET_CRTN): Define.
1517 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
1518 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
1520 2018-11-18 Alan Modra <amodra@gmail.com>
1522 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
1523 !HAVE_LD_PIE variant.
1524 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
1526 2018-11-17 Nick Clifton <nickc@redhat.com>
1527 Sandra Loosemore <sandra@codesourcery.com>
1530 * doc/invoke.texi (Overall Options): Document that --help and
1531 --help=<value> options cannot be combined.
1533 2018-11-17 Jim Wilson <jimw@sifive.com>
1535 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
1536 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
1537 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
1538 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
1539 to step2 if frame_pointer_needed and step1 is 0.
1541 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
1544 * doc/cpp.texi (System Headers): Add note about implicit
1545 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
1547 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
1550 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
1551 -fno-implicit-templates.
1553 2018-11-17 Jakub Jelinek <jakub@redhat.com>
1555 PR tree-optimization/87546
1556 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
1557 min_precision variable, initially set it to orig_precision, only does
1558 something if op_type's precision is <= min_precision and update
1559 min_precision whenever calling set_op.
1561 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
1564 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
1566 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
1568 * doc/invoke.texi (Option Summary): Fix whitespace and line
1569 breaks in @gccoptlist environments.
1570 (Warning Options): Likewise.
1571 (Optimize Options): Likewise.
1572 (PowerPC SPE Options): Likewise.
1573 (RS/6000 and PowerPC Options): Likewise.
1575 2018-11-16 Jeff Law <law@redhat.com>
1577 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
1580 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
1583 * doc/invoke.texi (Optimize Options): Update options enabled by
1584 fprofile-generate, -fprofile-use, and -fauto-profile.
1586 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1589 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
1590 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
1591 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
1593 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
1594 * targhooks.c (default_print_patchable_function_entry): Assert
1595 asm_int_op does not return a NULL string.
1596 * varasm.c (integer_asm_op): Return the op for a partial int type
1597 when the requested size does not correspond to an integer type.
1598 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
1599 * doc/tm.texi: Regenerate.
1601 2018-11-12 Jason Merrill <jason@redhat.com>
1603 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
1605 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
1607 * config/rs6000/constraints.md (wF constraint): Remove power9
1608 fusion documentation. Just document wF's use for power8 fusion.
1609 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
1610 (fusion_gpr_addis): Delete power9 fusion support. Change power8
1611 fusion support to require the upper 12 bits to be all 0's or all
1613 (fusion_gpr_mem_load): Add comment.
1614 (fusion_addis_mem_combo_load): Remove power9 fusion support.
1615 (fusion_addis_mem_combo_store): Delete.
1616 (fusion_offsettable_mem_operand): Delete.
1617 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
1619 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
1620 (POWERPC_MASKS): Delete power9 fusion.
1621 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
1622 (fusion_p9_p): Delete.
1623 (expand_fusion_p9_load): Delete.
1624 (expand_fusion_p9_store): Delete.
1625 (emit_fusion_p9_load): Delete.
1626 (emit_fusion_p9_store): Delete.
1627 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
1629 (rs6000_option_override_internal): Set power8 fusion based on
1630 whether we are tuning for power8. Delete power9 fusion support.
1631 (rs6000_opt_masks): Delete -mpower9-fusion switch.
1632 (emit_fusion_load): Rename emit_fusion_load_store to
1633 emit_fusion_load, and drop fusion store support. Update callers.
1634 (emit_fusion_load_store): Likewise.
1635 (emit_fusion_gpr_load): Likewise.
1636 (fusion_p9_p): Delete.
1637 (expand_fusion_p9_load): Delete.
1638 (expand_fusion_p9_store): Delete.
1639 (emit_fusion_p9_load): Delete.
1640 (emit_fusion_p9_store): Delete.
1641 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
1642 (GPR_FUSION): Delete.
1643 (FPR_FUSION): Delete.
1644 (power9 fusion peephole2s): Delete.
1645 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
1646 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
1647 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
1648 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
1649 (fusion_p9_<mode>_constant): Delete.
1650 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
1651 power9 fusion switch.
1652 * doc/md.texi (PowerPC constraints): Update wF constraint
1653 documentation for power8 fusion only.
1655 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1657 PR rtl-optimization/87475
1658 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
1659 CROSSING_JUMP_P insns.
1660 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
1662 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
1665 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
1666 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
1667 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
1669 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1672 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
1673 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
1675 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
1677 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
1678 location_t parameter.
1679 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1680 (switch_decision_tree::do_jump_if_equal): Likewise.
1681 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
1682 of switch statement to emit_case_nodes.
1683 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
1684 set it on the newly built GIMPLE comparison statement.
1685 (switch_decision_tree::do_jump_if_equal): Likewise.
1686 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
1687 in calls to do_jump_if_equal as well as recursive calls.
1689 2018-11-16 Andi Kleen <ak@linux.intel.com>
1691 * config/i386/i386.md: Allow memory operands to ptwrite.
1693 2018-11-16 Michael Matz <matz@suse.de>
1695 * system.h (PRsa): New macro.
1696 (SIZE_AMOUNT): Cast number to uint64_t.
1697 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
1698 (pool_usage::dump_footer): Likewise and also use PRIu64.
1699 * bitmap.h (bitmap_usage::dump): Likewise.
1700 * ggc-common.c (ggc_usage::dump): Likewise.
1701 * ggc-page.c (ggc_print_statistics): Likewise.
1702 * input.c (dump_line_table_statistics): Likewise.
1703 * mem-stats.h (mem_usage::dump): Likewise.
1704 (mem_usage::dump_footer): Likewise.
1705 * rtl.c (dump_rtx_statistics): Likewise.
1706 * tree-cfg.c (dump_cfg_stats): Likewise.
1707 * tree-dfa.c (dump_dfa_stats): Likewise.
1708 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1709 * tree-ssanames (ssanames_print_statistics): Likewise.
1710 * vec.c (vec_usage::dump): Likewise.
1711 (vec_usage::dump_footer): Likewise.
1713 2018-11-16 Richard Biener <rguenther@suse.de>
1715 PR tree-optimization/88011
1716 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
1717 replacing set_value_range_to_undefined and
1718 set_value_range_to_varying with method calls.
1720 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
1722 * config/s390/s390.md
1723 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
1725 (*r<noxa>sbg_<mode>_sll): Likewise.
1726 (*r<noxa>sbg_<mode>_srl): Likewise.
1727 (*r<noxa>sbg_sidi_srl): New pattern.
1729 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
1731 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
1732 Default to TARGET_VXWORKS_RTP.
1733 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1734 of TARGET_VXWORKS_RTP.
1735 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
1736 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1737 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
1739 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
1742 * doc/extend.texi (Common Type Attributes): Make it explicit
1743 that attribute "packed" can apply to C++ classes.
1745 2018-11-15 Martin Sebor <msebor@redhat.com>
1749 * tree.c (type_argument_type): New function.
1750 * tree.h (type_argument_type): Declare it.
1751 * gcc/doc/extend.texi (alloc_align): Update and clarify.
1752 (alloc_size, nonnull, sentinel): Same.
1754 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
1755 Kwok Cheung Yeung <kcy@codesourcery.com>
1757 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
1758 int_mode_for_size fails.
1759 (vectorizable_load): Likewise.
1761 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1763 * doc/ux.texi (Group logically-related diagnostics): Move
1764 discussion of auto_diagnostic_group into this new subsection.
1765 Give an example of where this grouping is used.
1767 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1770 * Makefile.in (OBJS): Move json.o to...
1771 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
1772 * common.opt (fdiagnostics-format=): New option.
1773 (diagnostics_output_format): New enum.
1774 * diagnostic-format-json.cc: New file.
1775 * diagnostic.c (default_diagnostic_final_cb): New function, taken
1776 from start of diagnostic_finish.
1777 (diagnostic_initialize): Initialize final_cb to
1778 default_diagnostic_final_cb.
1779 (diagnostic_finish): Move "being treated as errors" messages to
1780 default_diagnostic_final_cb. Call any final_cb.
1781 (default_diagnostic_finalizer): Add diagnostic_t param.
1782 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
1783 diagnostic_finalizer callback.
1784 * diagnostic.h (enum diagnostics_output_format): New enum.
1785 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
1786 (struct diagnostic_context): Add "final_cb".
1787 (default_diagnostic_finalizer): Add diagnostic_t param.
1788 (diagnostic_output_format_init): New decl.
1789 * doc/invoke.texi (-fdiagnostics-format): New option.
1790 * dwarf2out.c (gen_producer_string): Ignore
1791 OPT_fdiagnostics_format_.
1792 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
1793 * lto-wrapper.c (append_diag_options): Ignore it.
1794 * opts.c (common_handle_option): Handle it.
1796 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1798 PR tree-optimization/88015
1799 * graphite-isl-ast-to-gimple.c
1800 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
1802 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
1804 2018-11-15 Richard Biener <rguenther@suse.de>
1807 * gimple.c (gimple_call_flags): Union flags from decl, type
1809 * trans-mem.c (is_tm_pure_call): Simplify.
1811 2018-11-15 Richard Biener <rguenther@suse.de>
1813 PR tree-optimization/88031
1814 * tree-vect-loop.c (vectorizable_reduction): Move check
1815 for multiple types earlier so we get the expected dump.
1816 Simplify calls to vectorizable_condition.
1817 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
1818 * tree-vect-stmts.c (vectorizable_condition): Instead of
1819 reduc_def and reduc_index take just a flag. Simplify
1820 code-generation now that we can rely on the defs being set up.
1821 (vectorizable_comparison): Remove unused argument.
1823 2018-11-15 Richard Biener <rguenther@suse.de>
1825 PR tree-optimization/88030
1826 * tree-complex.c (need_eh_cleanup): New global.
1827 (update_complex_assignment): Mark blocks that need EH update.
1828 (expand_complex_comparison): Likewise.
1829 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1830 perform EH cleanup and schedule CFG cleanup if that did anything.
1832 2018-11-15 Jakub Jelinek <jakub@redhat.com>
1834 PR rtl-optimization/88018
1835 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1836 on the presence of fallthru edge, rather than if it is a USE or not.
1838 2018-11-15 Richard Biener <rguenther@suse.de>
1841 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
1842 analyze_subscript_affine_affine properly.
1844 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
1846 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
1847 (GLIBC_DYNAMIC_LINKER): Define.
1848 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
1850 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1852 PR tree-optimization/84648
1853 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
1854 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
1855 by calling adjust_cond_for_loop_until_wrap.
1857 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
1860 * doc/extend.texi (Common Function Attributes): Clarify linker
1861 restrictions on "aligned" attribute.
1862 (Common Variable Attributes): Likewise. Mention that linker
1863 restrictions don't apply to stack-allocated variables.
1865 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
1867 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
1870 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
1874 * doc/invoke.texi (Optimize Options): Remove bad example about
1875 interaction between -flto and -O. Replace it with a note that
1876 you need to compile with -O and not just link. Copy-edit -flto
1877 discussion to reduce verbiage and improve flow.
1879 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
1882 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
1883 also suppress many optimizations. Alphabetize option lists for
1884 -O1, -O2, and -Os. Add list of options disabled with -Og, and
1885 correct documentation for those options to say that.
1886 * opts.c (default_options_table): Sort table by level and option
1887 name, to make it easier to correlate to the manual.
1889 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
1891 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
1892 printing of the names of segment registers.
1894 2018-11-14 Nathan Sidwell <nathan@acm.org>
1898 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1901 2018-11-14 David Malcolm <dmalcolm@redhat.com>
1903 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1905 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1907 P1236R1 - Signed integers are two's complement
1908 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1911 * hash-map.h (hash_map::iterator::reference_pair): New class.
1912 (hash_map::iterator::operator*): Return it rather than std::pair.
1914 2018-11-14 Jeff Law <law@redhat.com>
1916 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1917 iff the operand is a constant.
1919 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
1921 * gimple-ssa-evrp-analyze.c
1922 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1923 ignore_equivs_equal_p to equal_p.
1924 * ipa-cp.c (meet_with_1): Use equal_p instead of
1925 ignore_equivs_equal_p.
1926 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1927 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1928 (value_range::operator==): Remove.
1929 (value_range::operator!=): Remove.
1930 (vrp_prop::visit_stmt): Use equal_p.
1931 * tree-vrp.h (value_range): Remove operator==, operator!=,
1932 ignore_equivs_equal_p.
1933 * vr-values.c (update_value_range): Use equal_p.
1935 2018-11-14 Michael Matz <matz@suse.de>
1938 * gimplify.c (collect_fallthrough_labels): Add new argument,
1939 return location via that, don't modify statements.
1940 (warn_implicit_fallthrough_r): Adjust call, don't use
1941 statement location directly.
1943 2018-11-14 Richard Biener <rguenther@suse.de>
1946 * tree-data-ref.c (split_constant_offset): Add wrapper
1947 allocating a cache hash-map.
1948 (split_constant_offset_1): Cache results of expanding
1949 expressions from SSA def stmts.
1951 2018-11-14 Richard Biener <rguenther@suse.de>
1954 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1956 (lambda_vector_mult_const): Likewise.
1957 (lambda_matrix_right_hermite): Use lambda_int temporaries.
1959 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
1960 Jackson Woodruff <jackson.woodruff@arm.com>
1962 PR 71026/tree-optimization
1963 * match.pd: Simplify floating point comparisons.
1965 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1967 PR rtl-optimization/87817
1968 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1969 last argument has low 8 bits clear, fold to 0.
1971 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
1973 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1974 MAX_OFILE_ALIGNMENT as needed.
1976 2018-11-14 Richard Biener <rguenther@suse.de>
1978 PR tree-optimization/88019
1979 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1980 COND_EXPR arguments to non-trapping overflow.
1982 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
1984 * config/arc/arc.h (reg_class): Reorder registers classes, remove
1985 unused register classes.
1986 (REG_CLASS_NAMES): Likewise.
1987 (REG_CLASS_CONTENTS): Likewise.
1988 (FIXED_REGISTERS): Make lp_count fixed.
1989 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1990 (PROGRAM_COUNTER_REGNO): Remove.
1991 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
1992 register classes, use constants for register numbers, remove
1993 reg_class_contents references.
1994 (arc_process_double_reg_moves): Add asserts.
1995 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
1996 lra_in_progress predicate.
1997 (arc_init_reg_tables): Remove unused register classes.
1998 (arc_register_move_cost): Likewise.
1999 (arc_preferred_reload_class): Likewise.
2000 (hwloop_optimize): Update rtx patterns involving lp_count register.
2001 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
2002 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
2003 CHEAP_CORE_REGS. Former one will be used for LRA.
2004 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
2005 one will be used for LRA.
2006 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
2007 one will be used for LRA.
2008 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
2009 Former one will be used for LRA.
2010 ("f"): Delete constraint.
2013 ("l"): Change it from register constraint to constraint.
2014 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
2015 (movhi_insn): Likewise.
2016 (movsi_insn): Update pattern.
2019 (stack_tie): Remove 'b' constraint letter.
2021 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
2022 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
2023 (R57_REG, R59_REG, PCL_REG): Likewise.
2024 (ILINK1_REGNUM): Renamed to ILINK1_REG.
2025 (ILINK2_REGNUM): Renamed to ILINK2_REG.
2027 (SP_REGS): Likewise.
2028 (Rcw): Remove unused reg classes.
2029 * config/arc/predicates.md (dest_reg_operand): Just default on
2030 register_operand predicate.
2031 (mpy_dest_reg_operand): Likewise.
2032 (move_dest_operand): Use macros instead of constants.
2033 * config/arc/arc.opt (mlra): Switch to lra as default.
2035 2018-11-14 Richard Biener <rguenther@suse.de>
2037 PR tree-optimization/87974
2038 * tree-vect-loop.c (vectorizable_reduction): When computing
2039 the vectorized reduction PHI vector type ignore constant
2042 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2044 PR tree-optimization/87977
2045 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
2046 stmt, build a new one and replace the old one with it. Formatting fix.
2047 Call release_ssa_name (x) if !has_other_use and !delete_div.
2048 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
2049 verify lhs of stmt is still def.
2051 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
2053 PR rtl-optimization/87507
2054 * lower-subreg.c (operand_for_swap_move_operator): New function.
2055 (simple_move): Strip simple operators.
2056 (find_pseudo_copy): Likewise.
2057 (resolve_operand_for_swap_move_operator): New function.
2058 (resolve_simple_move): Strip simple operators and swap operands.
2060 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2062 PR tree-optimization/87898
2063 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
2064 (ipa_simd_modify_function_body): Remove debug stmts where the first
2065 argument was changed into a non-decl.
2067 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
2069 PR rtl-optimization/87899
2070 * lra-lives.c (start_living): Update white space in comment.
2071 (enum point_type): New.
2072 (sparseset_contains_pseudos_p): New function.
2073 (update_pseudo_point): Likewise.
2074 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
2075 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
2076 handling. Move early exit after adding conflicts.
2077 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
2078 if regno is already live. Remove all handling of program points.
2079 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
2080 after adding conflicts. Remove all handling of program points and
2081 ignore_reg_for_conflicts.
2082 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
2083 and do not guard call to mark_pseudo_live.
2084 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
2085 and do not guard call to mark_pseudo_dead.
2086 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
2087 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
2088 Use new function update_pseudo_point. Handle register copies by
2089 removing the source register from the live set. Handle INOUT operands.
2090 Update to the next program point using the unused_set, dead_set and
2092 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2094 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2096 * builtins.c: Replace "source_location" with "location_t".
2097 * diagnostic-show-locus.c: Likewise.
2098 * diagnostic.c: Likewise.
2099 * dumpfile.c: Likewise.
2100 * gcc-rich-location.h: Likewise.
2101 * genmatch.c: Likewise.
2102 * gimple.h: Likewise.
2103 * gimplify.c: Likewise.
2104 * input.c: Likewise.
2105 * input.h: Likewise. Eliminate the typedef.
2106 * omp-expand.c: Likewise.
2107 * selftest.h: Likewise.
2108 * substring-locations.h (get_source_location_for_substring):
2110 (get_location_within_string): ...this.
2111 * tree-cfg.c: Replace "source_location" with "location_t".
2112 * tree-cfgcleanup.c: Likewise.
2113 * tree-diagnostic.c: Likewise.
2114 * tree-into-ssa.c: Likewise.
2115 * tree-outof-ssa.c: Likewise.
2116 * tree-parloops.c: Likewise.
2117 * tree-phinodes.c: Likewise.
2118 * tree-phinodes.h: Likewise.
2119 * tree-ssa-loop-ivopts.c: Likewise.
2120 * tree-ssa-loop-manip.c: Likewise.
2121 * tree-ssa-phiopt.c: Likewise.
2122 * tree-ssa-phiprop.c: Likewise.
2123 * tree-ssa-threadupdate.c: Likewise.
2124 * tree-ssa.c: Likewise.
2125 * tree-ssa.h: Likewise.
2126 * tree-vect-loop-manip.c: Likewise.
2128 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2130 * doc/extend.texi: Fix typo in the weakref description.
2132 2018-11-13 Richard Biener <rguenther@suse.de>
2134 PR tree-optimization/86991
2135 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
2136 group building until we have successfully detected the SLP
2138 (vect_is_simple_reduction): Remove fixup code here.
2140 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2142 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
2143 (dump_gimple_stmt): Use it.
2144 (dump_gimple_stmt_loc): Likewise.
2145 (dump_gimple_expr): Likewise.
2146 (dump_gimple_expr_loc): Likewise.
2147 (dump_generic_expr): Likewise.
2148 (dump_generic_expr_loc): Likewise.
2149 (dump_printf): Likewise.
2150 (dump_printf_loc): Likewise.
2151 (dump_dec): Likewise.
2152 (dump_dec): Likewise.
2153 (dump_hex): Likewise.
2154 (dump_symtab_node): Likewise.
2155 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
2156 Guard dump call with dump_enabled_p.
2157 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
2158 * graphite-optimize-isl.c (optimize_isl): Likewise.
2159 * graphite.c (graphite_transform_loops): Likewise.
2160 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
2161 * tree-parloops.c (parallelize_loops): Likewise.
2162 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
2163 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
2164 (vect_prune_runtime_alias_test_list): Likewise.
2165 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
2166 (vect_estimate_min_profitable_iters): Likewise.
2167 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
2168 (vect_build_slp_tree_2): Likewise.
2169 (vect_supported_load_permutation_p): Likewise.
2170 (vect_slp_analyze_operations): Likewise.
2171 (vect_slp_analyze_bb_1): Likewise.
2172 (vect_slp_bb): Likewise.
2173 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
2174 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
2175 (pass_slp_vectorize::execute): Likewise.
2176 (increase_alignment): Likewise.
2178 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2181 * ipa-inline.c (report_inline_failed_reason): Guard calls to
2182 cl_target_option_print_diff and cl_optimization_print_diff with
2185 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2187 * doc/invoke.texi (-fsave-optimization-record): Note that the
2188 output is compressed.
2189 * optinfo-emit-json.cc: Include <zlib.h>.
2190 (optrecord_json_writer::write): Compress the output.
2192 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
2194 * tree-vrp.c (value_range_base::dump): Dump type.
2195 Do not use INF nomenclature for 1-bit types.
2196 (dump_value_range): Group all variants to common dumping code.
2197 (debug): New overloaded functions for value_ranges.
2198 (value_range_base::dump): Remove no argument version.
2199 (value_range::dump): Same.
2201 2018-11-13 Richard Biener <rguenther@suse.de>
2203 PR tree-optimization/87931
2204 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
2205 nested cycles we support to latch computations vectorizable_reduction
2208 2018-11-13 Martin Liska <mliska@suse.cz>
2210 PR tree-optimization/87885
2211 * cfghooks.c (account_profile_record): Rename
2213 (profile_record_check_consistency): ... this.
2214 Calculate missing num_mismatched_freq_in.
2215 (profile_record_account_profile): New function
2216 that calculates time and size of a function.
2217 * cfghooks.h (struct profile_record): Remove
2219 (struct cfg_hooks): Remove after_pass flag.
2220 (account_profile_record): Rename to ...
2221 (profile_record_check_consistency): ... this.
2222 (profile_record_account_profile): New.
2223 * cfgrtl.c (rtl_account_profile_record): Remove
2225 * passes.c (check_profile_consistency): Do only
2227 (account_profile): Calculate size and time of
2229 (pass_manager::dump_profile_report): Reformat
2231 (execute_one_ipa_transform_pass): Call
2232 consistency check before clean upand call account_profile
2233 after a clean up is done.
2234 (execute_one_pass): Call check_profile_consistency and
2235 account_profile instead of using after_pass flag..
2236 * tree-cfg.c (gimple_account_profile_record): Likewise.
2238 2018-11-13 Martin Liska <mliska@suse.cz>
2241 * config/i386/i386.c (ix86_option_override_internal): Error
2242 about usage -mabi=ms and -fsanitize={,kernel-}address.
2244 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
2246 * config/aarch64/aarch64.c
2247 (aarch64_vectorize_preferred_vector_alignment): Change return type to
2249 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
2250 alignment being a poly int.
2251 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
2252 return type to poly_uint64.
2253 * target.def (default_preferred_vector_alignment): Likewise.
2254 * targhooks.c (default_preferred_vector_alignment): Likewise.
2255 * targhooks.h (default_preferred_vector_alignment): Likewise.
2256 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
2257 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
2259 (vect_update_misalignment_for_peel): Likewise.
2260 (vect_enhance_data_refs_alignment): Likewise.
2261 (vect_find_same_alignment_drs): Likewise.
2262 (vect_duplicate_ssa_name_ptr_info): Likewise.
2263 (vect_setup_realignment): Likewise.
2264 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2266 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
2267 mask with a compile time variable vector alignment.
2268 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
2270 (vect_do_peeling): Exit early if vector alignment is not constant.
2271 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
2273 (vectorizable_store): Likewise.
2274 (vectorizable_load): Likweise.
2275 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
2277 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
2279 (vect_can_force_dr_alignment_p): Change alignment parameter type to
2282 2018-11-13 Richard Biener <rguenther@suse.de>
2284 PR tree-optimization/87962
2285 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
2286 detect outer reduction for disqualifying in-loop uses.
2288 2018-11-13 Richard Biener <rguenther@suse.de>
2290 PR tree-optimization/87967
2291 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
2292 for constants for the scalar loop.
2294 2018-11-13 Alan Modra <amodra@gmail.com>
2296 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
2297 integer constants when -mcmodel=medium.
2299 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2301 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2302 * config/arc/elf.h (PROFILE_HOOK): Define.
2303 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2305 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2307 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2308 jump table data in the text section.
2310 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2312 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2313 to fit the eh_return pattern.
2314 * config/arc/arc.md (eh_return): Define.
2315 (VUNSPEC_ARC_EH_RETURN): Likewise.
2316 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2318 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2321 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2323 * common/config/arc/arc-common.c (arc_option_optimization_table):
2324 Millicode optimization is default on for size optimizations.
2325 * config/arc/arc-protos.h (arc_check_multi): New function.
2326 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
2327 (ENTER_LEAVE_START_REG): Define.
2328 (ENTER_LEAVE_END_REG): Likewise.
2329 (arc_override_options): Disable millicode when long calls option
2331 (arc_frame_info): Change it from int to bool.
2332 (arc_compute_frame_size): Clean up.
2333 (arc_save_restore): Remove.
2334 (frame_save_reg): New function.
2335 (frame_restore_reg): Likewise.
2336 (arc_enter_leave_p): Likewise.
2337 (arc_save_callee_saves): Likewise.
2338 (arc_restore_callee_saves): Likewise.
2339 (arc_save_callee_enter): Likewise.
2340 (arc_restore_callee_leave): Likewise.
2341 (arc_save_callee_milli): Likewise.
2342 (arc_restore_callee_milli): Likewise.
2343 (arc_expand_prologue): Reimplement to emit enter/leave
2345 (arc_expand_epilogue): Likewise.
2346 (arc_check_multi): New function.
2347 * config/arc/arc.md (push_multi_fp): New pattern.
2348 (push_multi_fp_blink): Likewise.
2349 (pop_multi_fp): Likewise.
2350 (pop_multi_fp_blink): Likewise.
2351 (pop_multi_fp_ret): Likewise.
2352 (pop_multi_fp_blink_ret): Likewise.
2353 * config/arc/arc.opt (mmillicode): Update option.
2354 (mcode-density-frame): New option.
2355 * config/arc/predicates.md (push_multi_operand): New predicate.
2356 (pop_multi_operand): Likewise.
2357 * doc/invoke.texi (ARC): Update ARC options information.
2360 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
2362 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
2363 * config/arc/arc.c (operands_ok_ldd_std): New function.
2364 (mem_ok_for_ldd_std): Likewise.
2365 (gen_operands_ldd_std): Likewise.
2366 * config/arc/arc.md: Add peephole2 rules for std/ldd.
2368 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
2370 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
2371 test on stack_usage_file.
2372 (lang_dependent_init): Do not open the .su file if generating LTO.
2374 2018-11-13 Jakub Jelinek <jakub@redhat.com>
2376 PR rtl-optimization/87918
2377 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
2378 simplify_gen_relational rather than simplify_gen_binary.
2380 2018-11-13 Richard Biener <rguenther@suse.de>
2382 * tree-ssanames.h (set_range_info): Use value_range_base.
2383 (get_range_info): Likewise.
2384 * tree-ssanames.c (set_range_info): Likewise.
2385 (get_range_info): Likewise.
2386 * tree-vrp.c (value_range_base::union_helper): Split
2387 out common parts of value_range[_base]::union_.
2388 (value_range_base::union_): Update.
2389 (value_range::union_): Likewise.
2390 (determine_value_range_1): Use value_range_base.
2391 (determine_value_range): Likewise.
2392 * tree-vrp.h (value_range_base::union_helper): Move ...
2393 (value_range::union_helper): ... from here.
2395 2018-11-13 Alan Modra <amodra@gmail.com>
2397 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
2399 (rs6000_secondary_reload_gpr): Don't call find_replacement.
2401 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
2404 * doc/invoke.texi (Optimize Options): Clarify that the
2405 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
2406 apply to data cache size.
2408 2018-11-13 Alan Modra <amodra@gmail.com>
2410 * config/rs6000/predicates.md (logical_const_operand),
2411 (logical_operand): Correct comment.
2412 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
2414 2018-11-13 Alan Modra <amodra@gmail.com>
2416 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
2418 2018-11-13 Alan Modra <amodra@gmail.com>
2420 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
2422 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
2423 covered by alternative.
2424 (movcc_internal1): Ignore h for register preference.
2425 (mov<mode>_hardfloat64): Likewise.
2426 (mov<mode>_softfloat): Ignore c, l, h for register preference.
2428 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
2430 PR preprocessor/47823
2431 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
2434 * doc/extend.texi (Pragmas): Note additional pragmas documented
2437 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2441 * tree-scalar-evolution.c (expression_expensive_p): Make
2442 BUILTIN POPCOUNT as expensive when backend does not define it.
2444 2018-11-12 Fredrik Noring <noring@nocrew.org>
2446 * config.gcc: Update with-llsc defaults for MIPS r5900.
2448 2018-11-12 Martin Liska <mliska@suse.cz>
2450 PR gcov-profile/87442
2451 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
2453 * doc/invoke.texi: Document them.
2454 * tree-profile.c (parse_profile_filter): New.
2455 (parse_profile_file_filtering): Likewise.
2456 (release_profile_file_filtering): Likewise.
2457 (include_source_file_for_profile): Likewise.
2458 (tree_profiling): Filter source files based on the
2459 newly added options.
2461 2018-11-12 Martin Liska <mliska@suse.cz>
2464 * doc/extend.texi: Add missing values for __builtin_cpu_is and
2465 __builtin_cpu_supports for x86 target.
2467 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
2470 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
2472 (Arithmetic): Likewise for "lo_sum".
2474 2018-11-12 Renlin Li <renlin.li@arm.com>
2477 * dse.c (get_stored_val): Add check for compile-time constantness
2480 2018-11-12 Sudakshina Das <sudi.das@arm.com>
2482 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
2483 (ARMv8_5a): New fgroup.
2484 (armv8.5-a): New arch.
2485 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
2487 * config/arm/arm-tables.opt: Regenerate.
2488 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
2489 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
2490 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
2491 Add matching rules for -march=armv8.5-a and extensions.
2492 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
2493 Add sb and predres to all armv8-a except armv8.5-a.
2495 2018-11-12 Richard Biener <rguenther@suse.de>
2497 * tree-vrp.h (value_range[_base]::set): Make public. Provide
2498 overload for single value.
2499 (value_range[_base]::set_nonnull): New.
2500 (value_range[_base]::set_null): Likewise.
2501 (value_range): Document bitmap copying behavior, mark
2502 copy constructor and assignment operator deleted.
2503 (value_range::move): New.
2504 (value_range::set_and_canonicalize): Default bitmap to zero.
2505 (set_value_range_to_nonnull): Remove.
2506 (set_value_range_to_null): Likewise.
2507 (set_value_range): Likewise.
2508 (set_value_range_to_value): Likewise.
2509 (extract_range_from_unary_expr): Work on value_range_base.
2510 (extract_range_from_binary_expr_1): Likewise. Rename to...
2511 (extract_range_from_binary_expr): ... this.
2512 * tree-vrp.c (value_range::update): Clear equiv bitmap
2514 (value_range::move): New, move equiv bitmap.
2515 (value_range_base::set_undefined): Avoid assignment.
2516 (value_range::set_undefined): Likewise.
2517 (value_range_base::set_varying): Likewise.
2518 (value_range::set_varying): Likewise.
2519 (set_value_range): Remove.
2520 (value_range_base::set): New overload for value.
2521 (value_range::set): Likewise.
2522 (set_value_range_to_nonnull): Remove.
2523 (value_range_base::set_nonnull): New.
2524 (value_range::set_nonnull): Likewise.
2525 (set_value_range_to_null): Remove.
2526 (value_range_base::set_null): New.
2527 (value_range::set_null): Likewise.
2528 (range_is_null): Work on value_range_base.
2529 (range_is_nonnull): Likewise.
2530 (ranges_from_anti_range): Likewise.
2531 (extract_range_into_wide_ints): Likewise.
2532 (extract_range_from_multiplicative_op): Likewise.
2533 (extract_range_from_binary_expr): Likewise. Update for API changes.
2534 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
2536 (value_range::intersect_helper): Avoid copy and assignment.
2537 (value_range::union_helper): Likewise.
2538 (determine_value_range_1): Adjust.
2539 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
2540 Avoid assignment by using move.
2541 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
2542 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2544 * tree-ssanames.c (get_range_info): Likewise.
2545 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
2546 * vr-values.c (vr_values::get_value_range): Adjust.
2547 (vr_values::update_value_range): Likewise.
2548 (symbolic_range_based_on_p): Work on value_range_base.
2549 (vr_values::extract_range_from_binary_expr): Use value_range_base.
2550 (vr_values::extract_range_from_unary_expr): Likewise.
2551 (vr_values::extract_range_from_cond_expr): Avoid assignment.
2552 (vr_values::extract_range_from_comparison): Adjust.
2553 (vr_values::check_for_binary_op_overflow): Use value_range_base.
2554 (vr_values::extract_range_basic): Adjust.
2555 (vr_values::adjust_range_with_scev): Likewise.
2556 (vr_values::vrp_visit_assignment_or_call): Likewise.
2557 (vr_values::get_vr_for_comparison): Change API to avoid
2558 assignment and copy construction.
2559 (vr_values::compare_name_with_value): Adjust accordingly.
2560 (vr_values::compare_names): Likewise.
2561 (vr_values::extract_range_from_phi_node): Avoid assignment and
2562 bogus in-place modify of equiv bitmap.
2563 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
2564 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
2565 for extract_range_from_unary_expr API change.
2566 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
2568 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
2570 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
2572 2018-11-12 Richard Biener <rguenther@suse.de>
2574 * tree-vrp.h (value_range_base::symbolic_p,
2575 value_range_base::constant_p, value_range_base::zero_p,
2576 value_range_base::singleton_p): Move from value_range.
2577 (value_range::dump): Add.
2578 * gimple-ssa-evrp-analyze.c
2579 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
2580 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
2581 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2583 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
2584 (value_range::constant_p): Likewise.
2585 (value_range::singleton_p): Likewise.
2586 (value_range_base::dump): Add.
2587 (set_value_range_to_undefined): Remove.
2588 (set_value_range_to_varying): Likewise.
2589 (range_int_cst_p): Take value_range_base argument.
2590 (range_int_cst_singleton_p): Likewise.
2591 (value_range_constant_singleton): Likewise.
2592 (vrp_set_zero_nonzero_bits): Likewise.
2593 (extract_range_from_multiplicative_op): Use set_varying.
2594 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
2595 (extract_range_from_unary_expr): Likewise.
2596 (dump_value_range_base): Change to overload of dump_value_range.
2597 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
2598 (vrp_prop::visit_stmt): Likewise.
2599 (value_range::intersect_helper): Likewise.
2600 (value_range::union_helper): Likewise.
2601 (determine_value_range_1): Likewise.
2603 2018-11-12 Richard Biener <rguenther@suse.de>
2605 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
2606 (set_value_range_to_null): Likewise.
2607 * vr-values.c (vr_values::extract_range_from_comparison):
2608 Clear equiv for constant singleton ranges.
2610 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
2612 * config/i386/sse.md: Combine VFIXUPIMM* patterns
2613 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2614 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2615 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
2616 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2617 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2618 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
2620 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2623 * doc/extend.texi (Common Type Attributes): For the align type
2624 attribute, copy language about decreasing alignment from the
2625 corresponding variable attribute.
2627 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2629 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
2632 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2635 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
2636 -frtti and -fno-rtti code.
2638 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2641 * doc/extend.texi (Other Builtins): Document probability associated
2642 with __builtin_expect.
2644 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2647 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2648 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2649 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2650 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2652 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2654 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
2656 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2658 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2660 2018-11-11 Richard Biener <rguenther@suse.de>
2662 * tree-vrp.h (class value_range_base): New base class for
2663 value_range containing all but the m_equiv member.
2664 (dump_value_range_base): Add.
2665 (range_includes_zero_p): Work on value_range_base.
2666 * tree-vrp.c (value_range_base::set): Split out base handling
2668 (value_range::set): this.
2669 (value_range::set_equiv): New.
2670 (value_range_base::value_range_base): New constructors.
2671 (value_range_base::check): Split out base handling from...
2672 (value_range::check): this.
2673 (value_range::equal_p): Refactor in terms of
2674 ignore_equivs_equal_p which is now member of the base.
2675 (value_range_base::set_undefined): New.
2676 (value_range_base::set_varying): Likewise.
2677 (value_range_base::dump):Split out base handling from...
2678 (value_range::dump): this.
2679 (value_range_base::set_and_canonicalize): Split out base handling
2681 (value_range::set_and_canonicalize): this.
2682 (value_range_base::union_): New.
2683 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
2685 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
2686 instead of value_range everywhere.
2687 (ipcp_vr_lattice::print): Use dump_value_range_base.
2688 (ipcp_vr_lattice::meet_with): Adjust.
2689 (ipcp_vr_lattice::meet_with_1): Likewise.
2690 (ipa_vr_operation_and_type_effects): Likewise.
2691 (propagate_vr_across_jump_function): Likewise.
2692 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
2693 (ipa_get_value_range): Likewise.
2694 (ipa_set_jfunc_vr): Likewise.
2695 (ipa_compute_jump_functions_for_edge): Likewise.
2697 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
2700 * doc/invoke.texi (Optimize Options): Add @opindex entries
2701 for the positive forms of -fno-xxx and -mno-xxx options
2702 that were lacking them.
2704 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
2706 * combine.c (make_more_copies): Only make an intermediate copy if the
2707 dest of a move is a pseudo.
2709 2018-11-09 Maya Rashish <coypu@sdf.org>
2712 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
2713 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2715 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
2719 * doc/invoke.texi (Optimize Options): Clarify default behavior
2720 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2722 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
2724 PR tree-optimization/87940
2725 * expr.c (string_constant): Don't strip NOPS in subexpressions.
2726 Fold PLUS_EXPR correctly.
2728 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
2731 * config/s390/s390.c (s390_safe_relative_long_p): New function.
2732 (annotate_constant_pool_refs): Skip insns which support
2733 relative addressing.
2734 (annotate_constant_pool_refs_1): New helper function.
2735 (find_constant_pool_ref): Skip insns which support relative
2737 (find_constant_pool_ref_1): New helper function.
2738 (replace_constant_pool_ref): Skip insns which support
2739 relative addressing.
2740 (replace_constant_pool_ref_1): New helper function.
2741 (s390_mainpool_start): Adapt to the new signature.
2742 (s390_mainpool_finish): Likewise.
2743 (s390_chunkify_start): Likewise.
2744 (s390_chunkify_finish): Likewise.
2745 (pass_s390_early_mach::execute): Likewise.
2746 (s390_prologue_plus_offset): Likewise.
2747 (s390_emit_prologue): Likewise.
2748 (s390_emit_epilogue): Likewise.
2750 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2752 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
2753 but unsupported lastprivate with conditional modifier.
2755 2018-11-09 Jeff Law <law@redhat.com>
2757 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
2758 unused argument better. Add gcc_unreachable to silence warning.
2760 2018-11-09 Martin Sebor <msebor@redhat.com>
2763 * attribs.c (has_attribute): New helper function.
2764 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
2765 * attribs.h (decls_mismatched_attributes): Declare.
2766 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
2767 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
2768 * common.opt (-Wattribute-alias): Take an argument.
2769 (-Wno-attribute-alias): New option.
2770 * doc/extend.texi (Common Function Attributes): Document copy.
2771 (Common Variable Attributes): Same.
2772 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
2773 (-Wattribute-alias): Document new option argument.
2775 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
2777 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
2778 matching criteria. Remove unused array initializer.
2780 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
2781 Jinsong Ji <jji@us.ibm.com>
2783 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
2784 constraints by introducing a new temporary.
2785 (_mm_cvtss_si64): Likewise.
2787 2018-11-09 Martin Liska <mliska@suse.cz>
2789 * common.opt: Add -fipa-stack-alignment flag.
2790 * doc/invoke.texi: Document it.
2791 * final.c (rest_of_clean_state): Guard stack
2792 shrinking with flag.
2794 2018-11-09 Martin Liska <mliska@suse.cz>
2796 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
2798 (ipa_discover_variable_flags): ... this.
2799 * common.opt: Come up with new flag -fipa-reference-addressable.
2800 * doc/invoke.texi: Document it.
2801 * ipa-reference.c (propagate): Call the renamed fn.
2802 * ipa-visibility.c (whole_program_function_and_variable_visibility):
2804 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
2806 (ipa_discover_variable_flags): ... this. Discover
2807 non-addressable variables only with the newly added flag.
2808 * opts.c: Enable the newly added flag with -O1 and higher
2811 2018-11-09 David Malcolm <dmalcolm@redhat.com>
2813 * json.cc (selftest::test_writing_literals): Fix comment.
2815 2018-11-09 Martin Liska <mliska@suse.cz>
2817 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
2818 string to a stack buffer.
2819 (aarch64_parse_cpu): Likewise.
2820 (aarch64_parse_tune): Likewise.
2822 2018-11-09 Richard Biener <rguenther@suse.de>
2824 PR tree-optimization/87953
2825 * tree-vect-loop.c (vectorizable_reduction): For analysis
2826 always pass ops[0] to vectorizable_condition.
2828 2018-11-09 Stafford Horne <shorne@gmail.com>
2829 Richard Henderson <rth@twiddle.net>
2830 Joel Sherrill <joel@rtems.org>
2832 * common/config/or1k/or1k-common.c: New file.
2833 * config/or1k/*: New.
2834 * config.gcc (or1k*-*-*): New.
2835 * configure.ac (or1k*-*-*): New test for openrisc tls.
2836 * configure: Regenerated.
2837 * doc/install.texi: Document OpenRISC triplets.
2838 * doc/invoke.texi: Document OpenRISC arguments.
2839 * doc/md.texi: Document OpenRISC.
2841 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
2843 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
2844 (arm7tdmi-s): Delete CPU.
2845 (arm710t): Add aliases for arm720t and arm740t.
2846 (arm720t, arm740t): Delete CPUs.
2847 (arm920t): Add aliases for arm920, arm922t and arm940t.
2848 (arm920, arm922t, arm940t): Delete CPUs.
2849 (arm10tdmi): Add alias for arm1020t.
2850 (arm1020t): Delete CPU.
2851 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
2852 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
2853 (arm10e): Add aliases for arm1020e and arm1022e.
2854 (arm1020e, arm1022e): Delete CPU.
2855 * config/arm/arm.md (generic_sched): Remove entries that are now
2857 (generic_vfp): Likewise.
2858 * config/arm/arm1020e.md: Simplify tuning selection based on alias
2860 * config/arm/arm-tune.md: Regenerated.
2861 * config/arm/arm-tables.opt: Regenerated.
2863 2018-11-09 Richard Biener <rguenther@suse.de>
2865 PR tree-optimization/87621
2866 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
2867 op with only phi inputs.
2868 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
2869 (ch_base::copy_headers): Run CSE on copied loop headers.
2870 (pass_ch_vect::process_loop_p): Simplify.
2872 2018-11-09 Alexandre Oliva <oliva@adacore.com>
2874 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
2875 for non-w64 x86_64 biarch.
2877 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
2879 PR rtl-optimization/86438
2880 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
2881 of in_b for the compare if in_b is SET_DEST.
2884 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
2885 non-toplevel UNSPEC.
2887 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2889 * tree-vrp.c (value_range::check): Do not access internals
2891 (value_range::singleton_p): Same.
2892 (value_range::type): Same.
2893 (vrp_finalize): Use value_range API.
2895 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2897 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2899 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2901 * vr-values.c (vr_values::get_value_range): Use value_range API
2902 instead of piecing together ranges.
2903 (vr_values::update_value_range): Same.
2905 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2907 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2908 of performing ad-hoc calculations.
2909 * tree-ssanames.c (set_range_info): New overloaded function
2910 accepting value_range &.
2911 (get_range_info): Same.
2912 * tree-ssanames.h (set_range_info_raw): Remove.
2913 (set_range_info): New prototype.
2914 (get_range_info): Same.
2915 * tree-vrp.h (value_range::null_p): Rename to zero_p.
2916 * tree-vrp.c (value_range::null_p): Same.
2918 2018-11-09 Jan Hubicka <jh@suse.cz>
2920 * tree.c (fld_type_variant_equal_p): Test user align flag.
2921 (flt_type_variant): Copy user align flag.
2922 (fld_incomplete_type_of): Clear it.
2924 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2926 * config/arm/neon.md (div<mode>3): New pattern.
2928 2018-11-08 Andi Kleen <ak@linux.intel.com>
2930 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2931 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2932 (ix86_handle_option): Handle OPT_mptwrite.
2933 * config/i386/cpuid.h (bit_PTWRITE): Add.
2934 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2935 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2936 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2937 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2938 (ix86_option_override_internal): Handle PTA_PTWRITE.
2939 (ix86_valid_target_attribute_inner_p): Define ptwrite.
2940 (def_builtin2): Force UINT64 to be 64bit only.
2941 * config/i386/i386.h (TARGET_PTWRITE): Add.
2942 (TARGET_PTWRITE_P): Add.
2944 * config/i386/i386.md: Define ptwrite.
2945 * config/i386/i386.opt: Add -mptwrite.
2946 * config/i386/immintrin.h (_ptwrite64): Add.
2948 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2949 * doc/invoke.texi: Document -mptwrite.
2951 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
2953 PR rtl-optimization/87600
2954 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2955 * lra-constraints.c (process_alt_operands): Skip illegal hard
2956 register usage. Prefer reloading non hard register operands.
2958 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
2961 * doc/invoke.texi (Optimize Options): Clarify default behavior
2962 for -fno-sched-interblock and -fno-sched-spec.
2964 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
2966 * collect2.c (linker_select): Add USE_LLD_LD.
2967 (ld_suffixes): Add ld.lld.
2968 (main): Handle -fuse-ld=lld.
2969 * common.opt (-fuse-ld=lld): New option.
2970 * doc/invoke.texi (-fuse-ld=lld): Document.
2971 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2973 2018-11-08 Paul Koning <ni1d@arrl.net>
2975 * config/pdp11/constraints.md: Add "Z" series constraints for use
2976 with pre-dec and post-inc addressing.
2977 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2978 (pdp11_expand_operands): Add int argument (word count).
2979 (pdp11_sp_frame_offset): Delete.
2980 (pdp11_cmp_length): New function.
2981 (pushpop_regeq): New function.
2982 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2984 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2986 (pdp11_initial_elimination_offset): Ditto.
2987 (pdp11_expand_operands): Add word count argument. Bugfixes.
2988 (output_move_multiple): Change how pointer adjustment is done.
2989 (pdp11_gen_int_label): Correct format.
2990 (output_ascii): Ditto.
2991 (pdp11_asm_output_var): Add code for DEC assembler case.
2992 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
2994 (legitimate_const_double_p): Ditto.
2995 (pdp11_register_move_cost): Adjust for new register classes.
2996 (pdp11_regno_reg_class): Ditto.
2997 (expand_block_move): Delete.
2998 (pushpop_regeq): New function.
2999 (pdp11_legitimate_address_p): Bugfix in check for constant
3001 (pdp11_sp_frame_offset): Delete.
3002 (pdp11_reg_save_size): New helper function for new frame layout.
3003 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
3004 (pdp11_expand_shift): Bugfix in check for constant shift count.
3005 (pdp11_shift_length): Ditto.
3006 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
3007 (pdp11_cmp_length): New function.
3008 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
3009 some compile options.
3010 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
3011 (CALL_USED_REGISTERS): Ditto.
3012 (ELIMINABLE_REGS): Ditto.
3013 (REGISTER_NAMES): Ditto.
3014 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
3016 (REG_CLASS_NAMES): Ditto.
3017 (REG_CLASS_CONTENTS): Ditto. Also remove
3018 HARD_FRAME_POINTER_REGNUM.
3019 (CPU_REG_CLASS): New macro.
3020 (CLASS_MAX_NREGS): Adjust for new register classes.
3021 (FUNCTION_PROFILER): Make no-op.
3022 (may_call_alloca): Remove unused declaration.
3023 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
3024 (ASM_OUTPUT_SKIP): Fix format.
3025 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
3026 (HARD_FRAME_POINTER_REGNUM): Remove.
3028 (*rts): Rename. Remove epilogue related checks.
3029 (cmpsi, cmpdi): New insn.
3030 (cbranch<mode>4): Change to apply to SI and DI modes as well.
3031 (mov<mode>): Change constraints to enforce that push/pop
3032 destination cannot use the same register as source.
3033 (*mov<mode><cc_cc>): Ditto.
3034 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
3035 at assembly output rather than as RTL expander.
3036 (zero_extendqihi2): Bugfix in check for same registers.
3037 (adddi3_nocc): Bugfix in check for constant operand.
3038 (addsi3_nocc): Ditto.
3039 (subdi3_nocc): Ditto.
3040 (subsi3_nocc): Ditto.
3041 (negdi2_nocc): Copy input to pdp11_expand_operands.
3042 (negsi2_nocc): Ditto.
3043 (bswap2_nocc): Ditto.
3044 * config/pdp11/pdp11.opt (mlra): Fix documentation.
3045 * config/pdp11/t-pdp11: Use -Os.
3047 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
3049 * config/arm/parsecpu.awk (/alias/): New parsing rule.
3050 (/begin cpu/): Check that the cpu name hasn't been previously defined.
3051 (gen_comm_data): Print out CPU alias tables.
3052 (check_cpu): Match aliases when checking the CPU name.
3053 * config/arm/arm-protos.h (cpu_alias): New structure.
3054 (cpu_option): Add entry for aliases.
3055 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
3056 strongarm1100 and strongarm1110.
3057 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
3058 (config/arm/arm-generic.md): Remove redundant references to
3059 strongarm110, strongarm1100 and strongarm1110.
3060 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
3061 Scan aliases for additional hints.
3062 (arm_parse_cpu_option_name): Also match a cpu name against the list
3064 * config/arm/arm-tables.opt: Regenerated.
3065 * config/arm/arm-tune.md: Regenerated.
3067 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3069 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3070 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3071 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3072 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3073 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3074 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3075 * gengtype.c (open_base_files): Add omp-general.h.
3076 * gimple.c (gimple_build_omp_critical):
3077 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
3078 gimple_omp_taskgroup_set_clauses.
3079 (gimple_build_omp_atomic_load): Add mo argument, call
3080 gimple_omp_atomic_set_memory_order.
3081 (gimple_build_omp_atomic_store): Likewise.
3082 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
3083 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
3085 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
3086 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
3087 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
3088 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
3089 different value for GF_OMP_ATOMIC_NEED_VALUE.
3090 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
3092 (struct gimple_statement_omp_single_layout): And remove here.
3093 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
3094 than gimple_statement_omp_single_layout.
3095 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
3097 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
3098 (gimple_omp_subcode): Formatting fix.
3099 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
3100 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
3101 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
3102 gimple_omp_teams_host, gimple_omp_teams_set_host,
3103 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
3104 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
3105 gimple_omp_taskgroup_set_clauses): New inline functions.
3106 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
3107 (gimple_build_omp_atomic_store): Likewise.
3108 (gimple_omp_atomic_seq_cst_p): Remove.
3109 (gimple_omp_atomic_memory_order): New function.
3110 (gimple_omp_atomic_set_seq_cst): Remove.
3111 (gimple_omp_atomic_set_memory_order): New function.
3112 (gimple_build_omp_taskgroup): Add clauses argument.
3113 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
3114 (dump_gimple_omp_task): Print taskwait with depend clauses.
3115 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
3116 dump_omp_atomic_memory_order.
3117 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
3118 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
3119 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
3120 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
3121 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
3122 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
3123 ORT_UNTIED_TASKLOOP enumerators.
3124 (enum gimplify_defaultmap_kind): New.
3125 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
3126 target_map_pointers_as_0len_arrays members, add defaultmap.
3127 (new_omp_context): Initialize defaultmap member.
3128 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3129 (maybe_fold_stmt): Don't fold even in host teams regions.
3130 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
3131 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
3132 ctx->omp_firstprivatize_variable.
3133 (omp_add_variable): Don't add private/firstprivate for VLAs in
3135 (omp_default_clause): Print "taskloop" rather than "task" if
3137 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3138 Handle new defaultmap clause kinds.
3139 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
3140 iterator to be lastprivate or private. Fix up diagnostics if linear
3141 is used on collapse>1 simd iterator.
3142 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
3143 (gimplify_omp_depend): New function.
3144 (gimplify_scan_omp_clauses): Add shared clause on parallel for
3145 combined parallel master taskloop{, simd} if taskloop has
3146 firstprivate, lastprivate or reduction clause. Handle
3147 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
3148 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
3149 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
3150 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
3151 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
3153 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
3154 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
3155 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
3156 OMP_CLAUSE_{TASK,IN}_REDUCTION.
3157 (gimplify_omp_task): Handle taskwait with depend clauses.
3158 (gimplify_omp_for): Add shared clause on parallel for combined
3159 parallel master taskloop{, simd} if taskloop has firstprivate,
3160 lastprivate or reduction clause. Use ORT_TASKLOOP or
3161 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
3162 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
3163 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
3164 __for_end and __for_range temporaries on OMP_PARALLEL for
3165 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
3166 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
3167 sandwiched in between two taskloops.
3168 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
3169 instead of ctx->omp_firstprivatize_variable.
3170 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
3171 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
3172 host teams, use gimplify_and_return_first etc. for body like
3173 for target or target data constructs, and at the end call
3174 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
3175 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
3176 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
3177 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
3178 gimple_omp_atomic_set_seq_cst calls.
3179 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
3180 case, handle taskgroup clauses.
3181 * lto-streamer-out.c (hash_tree): Handle
3182 OMP_CLAUSE_{TASK,IN}_REDUCTION.
3183 * Makefile.in (GTFILES): Add omp-general.h.
3184 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
3185 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
3186 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
3187 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
3188 BUILT_IN_GOMP_LOOP_DOACROSS_START,
3189 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
3190 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3191 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
3192 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
3193 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
3194 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
3195 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
3196 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
3197 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
3198 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
3199 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
3200 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
3201 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
3202 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
3203 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
3204 * omp-expand.c (workshare_safe_to_combine_p): Return false for
3205 non-worksharing loops.
3206 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
3207 (determine_parallel_type): Don't combine parallel with worksharing
3208 which has _reductemp_ clause.
3209 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
3210 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
3211 if there is nonmonotonic modifier or if there is no modifier and no
3212 ordered clause. For dynamic and guided schedule without monotonic
3213 and nonmonotonic modifier, default to nonmonotonic.
3214 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
3215 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
3217 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
3218 there are any reduction clauses.
3219 (expand_taskwait_call): New function.
3220 (expand_teams_call): New function.
3221 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
3222 expand_teams_call for it. Formatting fix. Handle taskwait with
3224 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
3225 of worksharing loops with task reductions.
3226 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
3227 expansion of worksharing loops with task reductions.
3228 (expand_omp_sections): Handle expansion of sections with task
3230 (expand_omp_synch): For host teams call expand_omp_taskreg.
3231 (omp_memory_order_to_memmodel): New function.
3232 (expand_omp_atomic_load, expand_omp_atomic_store,
3233 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
3234 instead of gimple_omp_atomic_seq_cst_p.
3235 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
3236 depend clauses as a standalone directive.
3237 * omp-general.c (enum omp_requires): New variable.
3238 (omp_extract_for_data): Initialize have_reductemp member. Allow
3239 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
3240 GT_EXPR loops depending on incr sign. Formatting fixes.
3241 * omp-general.h (struct omp_for_data): Add have_reductemp member.
3242 (enum omp_requires): New enum.
3243 (omp_requires_mask): Declare.
3244 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
3246 * omp-low.c (struct omp_context): Add task_reductions and
3247 task_reduction_map fields.
3248 (is_host_teams_ctx): New function.
3249 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
3250 (use_pointer_for_field): Use is_global_var instead of
3251 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
3253 (build_outer_var_ref): Ignore taskgroup outer contexts.
3254 (delete_omp_context): Release task_reductions and task_reduction_map.
3255 (scan_sharing_clauses): Don't add any fields for reduction clause on
3256 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
3257 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
3258 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
3259 Handle OMP_CLAUSE_NONTEMPORAL.
3260 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
3262 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
3263 clauses with task modifier.
3264 (scan_omp_task): Handle taskwait with depend clauses.
3265 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
3266 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
3267 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
3268 (scan_omp_for): Fix comment formatting.
3269 (scan_omp_teams): Handle host teams constructs.
3270 (check_omp_nesting_restrictions): Allow teams with no outer
3271 OpenMP context. Adjust diagnostics for teams strictly nested into
3272 some explicit OpenMP construct other than target. Allow OpenMP atomics
3273 inside of simd regions.
3274 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
3275 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
3276 taskreg_nesting_level while scanning host teams construct.
3277 (task_reduction_read): New function.
3278 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
3279 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
3280 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
3281 second argument create_tmp_var if it is NULL. Don't ignore shared
3282 clauses in is_host_teams_ctx contexts. Handle
3283 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
3285 (lower_reduction_clauses): Ignore reduction clauses with task
3286 modifier. Remove second argument create_tmp_var if it is NULL.
3287 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
3288 (lower_send_clauses): Ignore reduction clauses with task modifier.
3289 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
3290 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
3291 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
3292 rely that it is the last stmt in body so far. Ignore outer taskgroup
3294 (omp_task_reductions_find_first, omp_task_reduction_iterate,
3295 lower_omp_task_reductions): New functions.
3296 (lower_omp_sections): Handle reduction clauses with taskgroup
3297 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
3298 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
3299 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
3301 (lower_omp_taskgroup): Handle taskgroup reductions.
3302 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
3303 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
3304 (lower_depend_clauses): If there are any
3305 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3306 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
3307 seen, assume lowering is done already and return early. Set kind
3308 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
3309 (lower_omp_taskreg): Handle reduction clauses with task modifier on
3310 parallel construct. Handle reduction clause on taskloop construct.
3311 Handle taskwait with depend clauses.
3312 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
3313 for host teams constructs.
3314 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
3315 nontemporal and _reductemp_ clause entries.
3316 (omp_clause_code_name): Likewise.
3317 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
3318 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
3319 * tree-core.h (enum omp_clause_code): Add
3320 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
3321 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
3322 (struct tree_base): Add omp_atomic_memory_order field into union.
3323 Remove OMP_ATOMIC_SEQ_CST comment.
3324 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
3325 and OMP_CLAUSE_DEPEND_DEPOBJ.
3326 (struct tree_omp_clause): Add subcode.defaultmap_kind.
3327 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
3328 OpenMP constructs with body and clauses operands.
3329 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
3330 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
3331 (OMP_TASKGROUP_CLAUSES): Define.
3332 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
3333 OMP_CLAUSE__LOOPTEMP_.
3334 (OMP_ATOMIC_SEQ_CST): Remove.
3335 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
3336 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
3337 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
3338 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
3339 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
3340 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
3341 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
3342 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
3343 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
3344 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
3346 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
3347 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
3348 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
3349 (convert_local_omp_clauses): Likewise. Remove useless test.
3350 * tree-parloops.c (create_call_for_reduction_1): Pass
3351 OMP_MEMORY_ORDER_RELAXED as new argument to
3352 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
3353 * tree-pretty-print.c (dump_omp_iterators): New function.
3354 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
3355 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
3356 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
3357 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
3358 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
3359 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
3360 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
3361 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3362 (dump_omp_atomic_memory_order): New function.
3363 (dump_generic_node): Use it. Print taskgroup clauses. Print
3364 taskwait with depend clauses.
3365 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
3366 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
3367 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
3368 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
3369 write_ts_omp_clause_tree_pointers): Likewise.
3371 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3374 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
3375 "-missed", "-note", and "-all" sub-options.
3376 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
3378 (can_early_inline_edge_p): Likewise.
3379 (want_early_inline_function_p): Likewise.
3380 (want_inline_self_recursive_call_p): Likewise.
3381 (recursive_inlining): Likewise.
3382 (inline_small_functions): Likewise.
3383 (flatten_function): Likewise.
3384 (ipa_inline): Likewise.
3385 (inline_always_inline_functions): Likewise.
3386 (early_inline_small_functions): Likewise.
3387 (early_inliner): Likewise.
3388 * tree-inline.c (expand_call_inline): Likewise.
3390 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3392 * pretty-print.c (pp_format): Handle %f.
3393 (selftest::test_pp_format): Add test of %f.
3394 * pretty-print.h (pp_double): New macro.
3396 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3398 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
3399 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
3400 (dump_pretty_printer::decode_format): Implement "%C" for
3402 (selftest::test_capture_of_dump_calls): Rename "where" to
3403 "stmt_loc". Convert test_decl to a function decl and set its
3404 location. Add a symbol_table_test RAII instance and a
3405 cgraph_node, using it to test "%C" and dump_symtab_node.
3407 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
3410 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
3412 2018-11-08 David Malcolm <dmalcolm@redhat.com>
3414 * cgraph.c: Include "selftest.h".
3415 (saved_symtab): New variable.
3416 (selftest::symbol_table_test::symbol_table_test): New ctor.
3417 (selftest::symbol_table_test::~symbol_table_test): New dtor.
3418 (selftest::test_symbol_table_test): New test.
3419 (selftest::cgraph_c_tests): New.
3420 * cgraph.h (saved_symtab): New decl.
3421 (selftest::symbol_table_test): New class.
3422 * selftest-run-tests.c (selftest::run_tests): Call
3423 selftest::cgraph_c_tests.
3424 * selftest.h (selftest::cgraph_c_tests): New decl.
3426 2018-11-08 Richard Biener <rguenther@suse.de>
3428 * tree-data-ref.h (lambda_int): New typedef.
3429 (lambda_vector_gcd): Adjust.
3430 (lambda_vector_new): Likewise.
3431 (lambda_matrix_new): Likewise.
3432 * tree-data-ref.c (print_lambda_vector): Adjust.
3434 2018-11-08 Richard Biener <rguenther@suse.de>
3436 PR tree-optimization/87929
3437 * tree-complex.c (expand_complex_comparison): Clean EH.
3439 2018-11-08 Martin Liska <mliska@suse.cz>
3441 * doc/extend.texi: Reword.
3442 * predict.c (expr_expected_value_1): Likewise.
3444 2018-11-08 Richard Biener <rguenther@suse.de>
3446 PR tree-optimization/87913
3447 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
3448 of extreme values to ordered comparisons.
3450 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3453 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
3455 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3457 * doc/invoke.texi: Remove leading dash from @opindex entries
3458 throughout the file.
3460 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3463 * doc/invoke.texi (Option Summary): Add -e and --entry.
3464 (Link Options): Likewise.
3466 2018-11-07 Nathan Sidwell <nathan@acm.org>
3469 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
3470 --disable-checking bootstrap.
3472 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
3474 * configure: Regenerated.
3476 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3479 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
3480 to the mode of the widest field iff the widest field has mode class
3481 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
3484 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
3486 * common.opt: Add -Wattribute-warning.
3487 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
3488 * expr.c (expand_expr_real_1): Add new attribute to warning_at
3489 call to allow user configure behavior of "warning" attribute.
3491 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
3493 * target.def: Put @: after every vs., e.g., and i.e. where it is
3494 followed by whitespace.
3495 * doc/extend.texi: Ditto.
3496 * doc/fragments.texi: Ditto.
3497 * doc/gimple.texi: Ditto.
3498 * doc/implement-c.texi: Ditto.
3499 * doc/install.texi: Ditto.
3500 * doc/invoke.texi: Ditto.
3501 * doc/md.texi: Ditto.
3502 * doc/plugins.texi: Ditto.
3503 * doc/rtl.texi: Ditto.
3504 * doc/sourcebuild.texi: Ditto.
3505 * doc/tm.texi.in: Ditto.
3506 * doc/ux.texi: Ditto.
3507 * doc/tm.texi: Regenerate.
3509 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3511 * config/arm/arm-cpus.in (ares): New entry.
3512 * config/arm/arm-tables.opt: Regenerate.
3513 * config/arm/arm-tune.md: Likewise.
3514 * doc/invoke.texi (ARM Options): Document ares.
3516 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3518 * config/aarch64/aarch64-cores.def (ares): Define.
3519 * config/aarch64/aarch64-tune.md: Regenerate.
3520 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
3522 2018-11-07 Jan Hubicka <jh@suse.cz>
3524 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
3525 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
3526 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
3529 2018-11-07 Richard Biener <rguenther@suse.de>
3531 PR tree-optimization/87914
3532 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
3534 (vectorizable_reduction): Handle shifts and rotates by dispatching
3535 to vectorizable_shift.
3536 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
3537 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
3539 (vectorizable_shift): Export and handle being called as
3541 (vect_analyze_stmt): Call vectorizable_shift after
3542 vectorizable_reduction.
3543 * tree-vectorizer.h (vectorizable_shift): Declare.
3545 2018-11-07 Jan Hubicka <jh@suse.cz>
3547 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
3548 than const decls in TREE_VALUE of enum.
3549 (dump_type_inheritance_graph): Improve duplicate dumping.
3550 (free_enum_values): New.
3551 (build_type_inheritance_graph): Use it.
3552 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
3553 which are not main variants or not ODR types.
3554 (verify_type_variant): Expect variants to have no TYPE_VALUES.
3556 2018-11-07 Richard Biener <rguenther@suse.de>
3558 * ipa-inline.c (want_inline_small_function_p): Compute
3559 big_speedup_p lazily and last.
3561 2018-11-07 Jan Hubicka <jh@suse.cz>
3563 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
3564 building incomplete variant of complete type.
3565 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
3566 variant of complete type.
3568 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3570 * config/mips/mips.c: Fix typo in documentation of
3571 mips_loongson_ext2_prefetch_cookie.
3572 (mips_option_override): fix brain twister logical.
3573 * config/mips/mips.h: Fix typo in documentation of
3574 ISA_HAS_CTZ_CTO and define pattern.
3575 * config/mips/mips.md (prefetch): Hoist EXT2 above
3577 (prefetch_indexed): Hoist EXT2 above the EXT block.
3579 2018-11-07 Jan Hubicka <jh@suse.cz>
3581 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
3582 return and parameter types of function and method types.
3583 (free_lang_data_in_cgraph): Update.
3585 2018-11-07 Martin Liska <mliska@suse.cz>
3587 PR rtl-optimization/87868
3588 * postreload-gcse.c (eliminate_partially_redundant_load): Set
3589 threshold to max_count if we would overflow.
3590 * profile-count.h: Make max_count a public constant.
3592 2018-11-07 Martin Liska <mliska@suse.cz>
3594 * mem-stats.h: Fix GNU coding style.
3596 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3598 * config/mips/gs264e.md: New.
3599 * config/mips/mips-cpus.def: Define gs264e.
3600 * config/mips/mips-tables.opt: Regenerate.
3601 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3603 (mips_issue_rate): Add support for gs264e.
3604 (mips_multipass_dfa_lookahead): Likewise.
3605 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
3606 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
3607 (MIPS_ASE_MSA_SPEC): New.
3608 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
3609 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
3610 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
3611 * config/mips/mips.md: Include gs264e.md.
3612 (processor): Add gs264e.
3613 * config/mips/mips.opt (MSA): Use Mask instead of Var.
3614 * doc/invoke.texi: Add gs264e to supported architectures.
3616 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3618 * config/mips/gs464e.md: New.
3619 * config/mips/mips-cpus.def: Define gs464e.
3620 * config/mips/mips-tables.opt: Regenerate.
3621 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3623 (mips_issue_rate): Add support for gs464e.
3624 (mips_multipass_dfa_lookahead): Likewise.
3625 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
3626 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
3627 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
3628 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
3629 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
3630 * config/mips/mips.md: Include gs464e.md.
3631 (processor): Add gs464e.
3632 * doc/invoke.texi: Add gs464e to supported architectures.
3634 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3636 * config/mips/loongson3a.md: Rename to ...
3637 * config/mips/gs464.md: ... here.
3638 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
3639 as an alias of gs464 processor.
3640 * config/mips/mips-tables.opt: Regenerate.
3641 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
3642 instead of PROCESSOR_LOONGSON_3A.
3643 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
3645 (mips_option_override): Enable MMI and EXT for gs464.
3646 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
3647 Rename TUNE_LOONGSON_3A to TUNE_GS464.
3648 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
3649 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
3650 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
3652 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
3653 (processor): Add gs464;
3654 * doc/invoke.texi: Add gs464 to supported architectures.
3656 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3658 * config/mips/mips-protos.h
3659 (mips_loongson_ext2_prefetch_cookie): New prototype.
3660 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
3661 (mips_option_override): Enable TARGET_LOONGSON_EXT when
3662 TARGET_LOONGSON_EXT2 is true.
3663 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
3664 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
3665 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
3666 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
3667 TARGET_LOONGSON_EXT2.
3668 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
3669 (define_insn "ctz<mode>2"): New insn pattern.
3670 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
3671 (define_insn "prefetch_indexed_<mode>"): Include
3672 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
3673 * config/mips/mips.opt (-mloongson-ext2): Add option.
3674 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
3676 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3678 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
3679 __mips_loongson_ext.
3680 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
3681 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
3683 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
3684 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
3685 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
3686 instead of TARGET_LOONGSON_3A.
3687 * config/mips/mips.opt (-mloongson-ext): Add option.
3688 * gcc/doc/invoke.texi (-mloongson-ext): Document.
3690 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3692 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
3693 * config/mips/loongson.md: Move to ...
3694 * config/mips/loongson-mmi.md: here; Adjustment.
3695 * config/mips/loongson.h: Move to ...
3696 State as deprecated. Include loongson-mmiintrin.h for back
3697 compatibility and warning.
3698 * config/mips/loongson-mmiintrin.h: ... here.
3699 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
3700 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
3701 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3702 (mips_option_override): Make sure MMI use hard float;
3703 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
3704 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
3705 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
3706 TARGET_LOONGSON_VECTORS.
3707 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
3708 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
3709 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
3710 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
3712 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
3713 TARGET_LOONGSON_VECTORS.
3714 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
3715 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3716 (Loongson MMI patterns): Include loongson-mmi.md instead of
3718 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
3719 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
3721 2018-11-07 Richard Biener <rguenther@suse.de>
3724 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
3725 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
3727 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
3729 PR rtl-optimization/87874
3730 * lra.c (lra_substitute_pseudo): Do not create a subreg for
3733 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
3735 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
3736 if not in indexed or indirect form.
3737 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
3738 (bswap<mode>2_store): Ditto.
3740 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
3742 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
3745 2018-11-06 Richard Biener <rguenther@suse.de>
3747 PR tree-optimization/86850
3748 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
3749 instead of src.m_vec.
3751 2018-11-06 Jan Hubicka <jh@suse.cz>
3753 * tree.c (fld_simplified_type_name): Break out form ...
3754 (free_lang_data_in_type): ... here.
3755 (fld_type_variant_equal_p): Use it.
3757 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3759 * config/default-d.c: Include memmodel.h.
3761 * config/sol2-d.c: New file.
3762 * config/t-sol2 (sol2-d.o): New rule.
3763 * config.gcc <*-*-solaris2*>: Set d_target_objs,
3764 target_has_targetdm.
3766 2018-11-06 Jan Hubicka <jh@suse.cz>
3768 * tree.c (fld_type_variant): Also copy alignment; be sure that
3769 new variant is equal.
3771 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
3774 * config/s390/s390.md: Add relative_long attribute.
3776 2018-11-06 Jan Hubicka <jh@suse.cz>
3778 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
3779 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
3780 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
3781 stream TYPE_NEEDS_CONSTRUCTING.
3782 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
3783 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
3785 2018-11-06 Richard Biener <rguenther@suse.de>
3787 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
3789 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
3791 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3793 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
3794 REG_CLASS_CONTENTS[GEN_REGS].
3795 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
3797 2018-11-06 Jan Hubicka <jh@suse.cz>
3799 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
3801 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3804 * config/sol2.h (ASAN_CC1_SPEC): Define.
3805 (LD_WHOLE_ARCHIVE_OPTION): Define.
3806 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
3807 (ASAN_REJECT_SPEC): Provide default.
3808 (LIBASAN_EARLY_SPEC): Define.
3809 (LIBTSAN_EARLY_SPEC): Define.
3810 (LIBLSAN_EARLY_SPEC): Define.
3811 * config/i386/sol2.h (CC1_SPEC): Redefine.
3812 (ASAN_REJECT_SPEC): Define.
3814 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
3815 (TARGET_ASAN_SHADOW_OFFSET): Define.
3816 (sparc_asan_shadow_offset): New function.
3817 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
3818 (ASAN_REJECT_SPEC): Define.
3820 2018-11-06 Jan Hubicka <jh@suse.cz>
3822 * tree.c (fld_type_variant): Copy canonical type.
3823 (fld_incomplete_type_of): Check that canonical types looks sane;
3824 copy canonical type.
3825 (verify_type): Accept when incomplete type has complete canonical type.
3827 2018-11-06 Jan Hubicka <jh@suse.cz>
3829 * tree.c (free_lang_data): Reset overwite_assembler_name,
3830 print_xnode, print_decl, print_type and print_identifier of
3833 2018-11-06 Richard Biener <rguenther@suse.de>
3835 PR tree-optimization/87889
3836 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3837 Do nothing if old and new arg are the same
3839 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
3842 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
3843 attributes for operands 3 and 4.
3845 2018-11-06 Richard Biener <rguenther@suse.de>
3848 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
3849 matching bitfield insertion.
3851 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
3853 * auto-inc-dec.c: Include valtrack.h. Improve comments.
3854 (reg_next_debug_use): New.
3855 (attempt_change): Propagate adjusted expression into affected
3857 (merge_in_block): Track uses in debug insns.
3858 (pass_inc_dec::execute): Allocate and release
3861 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
3863 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
3864 (_mm512_fixupimm_round_pd): Update parameters and builtin.
3865 (_mm512_maskz_fixupimm_round_pd): Ditto.
3866 (_mm512_fixupimm_round_ps): Ditto.
3867 (_mm512_maskz_fixupimm_round_ps): Ditto.
3868 (_mm_fixupimm_round_sd): Ditto.
3869 (_mm_maskz_fixupimm_round_sd): Ditto.
3870 (_mm_fixupimm_round_ss): Ditto.
3871 (_mm_maskz_fixupimm_round_ss): Ditto.
3872 (_mm512_fixupimm_pd): Ditto.
3873 (_mm512_maskz_fixupimm_pd): Ditto.
3874 (_mm512_fixupimm_ps): Ditto.
3875 (_mm512_maskz_fixupimm_ps): Ditto.
3876 (_mm_fixupimm_sd): Ditto.
3877 (_mm_maskz_fixupimm_sd): Ditto.
3878 (_mm_fixupimm_ss): Ditto.
3879 (_mm_maskz_fixupimm_ss): Ditto.
3880 (_mm512_mask_fixupimm_round_pd): Update builtin.
3881 (_mm512_mask_fixupimm_round_ps): Ditto.
3882 (_mm_mask_fixupimm_round_sd): Ditto.
3883 (_mm_mask_fixupimm_round_ss): Ditto.
3884 (_mm512_mask_fixupimm_pd): Ditto.
3885 (_mm512_mask_fixupimm_ps): Ditto.
3886 (_mm_mask_fixupimm_sd): Ditto.
3887 (_mm_mask_fixupimm_ss): Ditto.
3888 * config/i386/avx512vlintrin.h:
3889 (_mm256_fixupimm_pd): Update parameters and builtin.
3890 (_mm256_maskz_fixupimm_pd): Ditto.
3891 (_mm256_fixupimm_ps): Ditto.
3892 (_mm256_maskz_fixupimm_ps): Ditto.
3893 (_mm_fixupimm_pd): Ditto.
3894 (_mm_maskz_fixupimm_pd): Ditto.
3895 (_mm_fixupimm_ps): Ditto.
3896 (_mm_maskz_fixupimm_ps): Ditto.
3897 (_mm256_mask_fixupimm_pd): Update builtin.
3898 (_mm256_mask_fixupimm_ps): Ditto.
3899 (_mm_mask_fixupimm_pd): Ditto.
3900 (_mm_mask_fixupimm_ps): Ditto.
3901 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3902 * config/i386/i386-builtin.def: Update builtin definitions.
3903 * config/i386/i386.c: Handle new builtin types and remove useless ones.
3904 * config/i386/sse.md: Update VFIXUPIMM* patterns.
3905 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3906 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3907 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3908 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3909 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3910 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3911 * config/i386/subst.md:
3912 (round_saeonly_sd_mask_operand4): Add new subst_attr.
3913 (round_saeonly_sd_mask_op4): Ditto.
3914 (round_saeonly_expand_operand5): Ditto.
3915 (round_saeonly_expand): Update.
3917 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
3919 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3921 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
3923 PR rtl-optimization/87871
3924 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3926 2018-11-05 Paul Koning <ni1d@arrl.net>
3928 * doc/sourcebuild.texi (target attributes): Document new "inf"
3929 effective target keyword.
3931 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3933 * config/s390/s390.c (s390_register_move_cost): Increase costs for
3934 moves involving the CC reg.
3936 2018-11-05 Richard Biener <rguenther@suse.de>
3938 PR tree-optimization/87873
3939 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3941 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3942 * tree-vect-loop.c (vect_transform_loop): When splitting the
3943 loop exit also create forwarder PHIs for constants.
3944 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3945 Handle constant to_arg, add extra checking we match up the correct
3948 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3950 * config/s390/s390.md: QImode and HImode for load on condition.
3952 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3954 * config/s390/predicates.md: Fix typo.
3955 * config/s390/s390.md: Allow immediates for load on condition.
3957 2018-11-05 Martin Liska <mliska@suse.cz>
3959 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3960 * bitmap.h (struct bitmap_usage): Likewise.
3961 * ggc-common.c (SCALE): Remove.
3963 (struct ggc_usage): Use SIZE_AMOUNT. And update
3965 * ggc-page.c (SCALE): Remove.
3966 (STAT_LABEL): Remove.
3967 (ggc_print_statistics): Use SIZE_AMOUNT.
3968 * gimple.h (SCALE): Remove.
3970 * input.c (ONE_K): Remove.
3973 (STAT_LABEL): Likewise.
3974 (FORMAT_AMOUNT): Likewise.
3975 (dump_line_table_statistics): Use SIZE_AMOUNT.
3976 * mem-stats.h (struct mem_usage): Likewise.
3977 * rtl.c (dump_rtx_statistics): Likewise.
3978 (rtx_alloc_counts): Change type to size_t.
3979 (rtx_alloc_sizes): Likewise.
3980 (rtx_count_cmp): New.
3981 (dump_rtx_statistics): Sort first based on counts.
3982 * tree.c (tree_nodes_cmp): New.
3983 (tree_codes_cmp): New.
3984 (dump_tree_statistics): Sort first based on counts.
3985 * system.h (ONE_K): New.
3987 (SIZE_SCALE): Likewise.
3988 (SIZE_LABEL): Likewise.
3989 (SIZE_AMOUNT): Likewise.
3990 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
3991 * tree-dfa.c (dump_dfa_stats): Likewise.
3992 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3993 * tree-ssanames.c (ssanames_print_statistics): Likewise.
3994 * tree.c (dump_tree_statistics): Likewise.
3995 * vec.c (struct vec_usage): Likewise.
3996 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
3997 trigger a -Werror=format-overflow with
3998 --enable-gather-detailed-stats.
4000 2018-11-05 Martin Liska <mliska@suse.cz>
4002 * mem-stats.h (mem_alloc_description::release_instance_overhead):
4004 * vec.c (struct vec_usage): Register m_element_size.
4005 (vec_prefix::register_overhead): New arguments: elements and
4007 (vec_prefix::release_overhead): Subtract elements.
4008 * vec.h (struct vec_prefix): Change signature.
4009 (va_heap::reserve): Pass proper arguments.
4010 (va_heap::release): Likewise.
4012 2018-11-05 Martin Liska <mliska@suse.cz>
4014 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
4018 2018-11-05 Richard Biener <rguenther@suse.de>
4020 * tree-scalar-evolution.h (final_value_replacement_loop): Update
4022 * tree-scalar-evolution.c (final_value_replacement_loop): Return
4023 whether anything was done.
4024 (scev_const_prop): Remove constant propagation part, fold
4026 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
4027 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
4030 2018-11-05 Jakub Jelinek <jakub@redhat.com>
4032 PR tree-optimization/87859
4033 * gimple-ssa-store-merging.c (struct merged_store_group): Add
4034 only_constants and first_nonmergeable_order members.
4035 (merged_store_group::merged_store_group): Initialize them.
4036 (merged_store_group::do_merge): Clear only_constants member if
4037 adding something other than INTEGER_CST store.
4038 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
4039 stores with order >= first_nonmergeable_order. Use
4040 merged_store->only_constants instead of always recomputing it.
4041 Set merged_store->first_nonmergeable_order if we've skipped any
4042 stores. Attempt to merge overlapping INTEGER_CST stores that
4043 we would otherwise skip.
4046 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
4048 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
4051 * config/i386/emmintrin.h (__v16qs): New to cope with option
4053 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
4054 (_mm_cmplt_epi8): Likewise.
4055 (_mm_cmpgt_epi8): Likewise.
4057 2018-11-05 Richard Biener <rguenther@suse.de>
4059 PR rtl-optimization/87852
4060 * fwprop.c (use_killed_between): Only consider single-defs of the
4061 use whose definition statement dominates the use.
4063 2018-11-05 Martin Liska <mliska@suse.cz>
4066 * doc/invoke.texi: Remove options that are
4067 not disabled with -Os.
4069 2018-11-05 Martin Liska <mliska@suse.cz>
4072 * doc/extend.texi: Update constrain about the last argument
4073 of __builtin_expect_with_probability.
4075 2018-11-05 Martin Liska <mliska@suse.cz>
4078 * predict.c (expr_expected_value_1): Verify
4079 that last argument is a real constants and emit
4082 2018-11-05 Martin Liska <mliska@suse.cz>
4084 PR gcov-profile/77698
4085 * ipa-profile.c (ipa_profile): Adjust hotness threshold
4088 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4090 PR tree-optimization/86572
4091 * builtins.c (c_strlen): Handle negative offsets in a safe way.
4093 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4095 PR tree-optimization/87672
4096 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
4097 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
4099 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
4102 * cfgexpand.c (pass_expand::execute): Move the call to
4103 finish_eh_generation in front of the call to expand_stack_alignment.
4105 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
4107 * common/config/i386/i386-common.c (processor_alias_table): Add
4109 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
4110 (case ${target}): Add znver2.
4111 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
4112 -march=native recognize znver2 processors.
4113 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
4114 * config/i386/i386.c (m_znver2): New definition.
4115 (m_ZNVER): New definition.
4116 (m_AMD_MULTIPLE): Includes m_znver2.
4117 (processor_cost_table): Add znver2 entry.
4118 (processor_target_table): Add znver2 entry.
4119 (get_builtin_code_for_version): Set priority for
4121 (processor_model): Add M_AMDFAM17H_ZNVER2.
4122 (arch_names_table): Ditto.
4123 (ix86_reassociation_width): Include znver2.
4124 * config/i386/i386.h (TARGET_znver2): New definition.
4125 (struct ix86_size_cost): Add TARGET_ZNVER2.
4126 (enum processor_type): Add PROCESSOR_ZNVER2.
4127 * config/i386/i386.md (define_attr "cpu"): Add znver2.
4128 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
4129 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
4130 (ix86_adjust_cost): Add znver2.
4131 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
4132 * gcc/doc/extend.texi: Add details about znver2.
4133 * gcc/doc/invoke.texi: Add details about znver2.
4135 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
4139 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
4142 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4144 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
4145 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
4147 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
4149 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
4150 shrink-wrapping when -mtrack-speculation.
4152 2018-11-02 Richard Biener <rguenther@suse.de>
4154 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
4155 (pop_cost_one_pair): Do not free pair.
4156 (pop_best_coalesce): Likewise.
4157 (create_coalesce_list): Initialize obstack.
4158 (delete_coalesce_list): Free obstack.
4159 (find_coalesce_pair): Obstack-allocate coalesce pairs.
4160 (add_cost_one_coalesce): Likewise.
4161 (struct live_track): Remove bitmap pointer indirections.
4162 (new_live_track): Adjust.
4163 (delete_live_track): Likewise.
4164 (live_track_remove_partition): Likewise.
4165 (live_track_add_partition): Likewise.
4166 (live_track_live_p): Likewise.
4167 (live_track_process_def): Likewise.
4168 (live_track_clear_base_vars): Likewise.
4170 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4172 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
4173 * configure: Regenerate.
4174 * config.in: Regenerate.
4175 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
4176 HAVE_AS_REGISTER_PSEUDO_OP guard.
4177 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
4178 !HAVE_AS_REGISTER_PSEUDO_OP support.
4179 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
4182 2018-11-02 Richard Biener <rguenther@suse.de>
4184 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
4187 2018-11-02 Richard Biener <rguenther@suse.de>
4189 PR tree-optimization/87776
4190 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
4191 executable when iterating but running into rpo-vn-max-loop-depth
4192 and not eliding the iteration.
4194 2018-11-30 Jan Hubicka <jh@suse.cz>
4196 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
4199 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
4201 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
4203 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
4204 Combine with rs6000_address_for_fpconvert.
4205 (rs6000_address_for_fpconvert): Combine with
4206 rs6000_force_indexed_or_indirect_mem.
4207 (rs6000_expand_vector_init): Change function call from
4208 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4209 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
4210 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
4211 (floatsi<mode>2_lfiwax_mem): Ditto.
4212 (floatunssi<mode>2_lfiwzx): Ditto.
4213 (floatunssi<mode>2_lfiwzx_mem): Ditto.
4214 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
4215 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
4216 (fix_trunc<mode>si2_stfiwx): Ditto.
4217 (fixuns_trunc<mode>si2_stfiwx): Ditto.
4218 (float_<mode>si2_hw): Ditto.
4219 (floatuns_<mode>si2_hw): Ditto.
4220 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
4221 (vsx_splat_<mode>): Ditto.
4223 2018-11-01 Joseph Myers <joseph@codesourcery.com>
4225 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
4226 at end of assembler input text.
4227 * configure: Regenerate.
4229 2018-11-01 Jakub Jelinek <jakub@redhat.com>
4231 PR tree-optimization/87826
4232 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
4233 negative or larger or equal to type's precision.
4235 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
4237 * opts.c (default_options_table): Do not enable
4238 OPT_fdelayed_branch at -Og.
4239 * doc/invoke.texi (-fdelayed-branch): Document it.
4241 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
4243 * optabs-libfuncs.c (build_libfunc_function_visibility):
4244 New, split out from...
4245 (build_libfunc_function): ... here.
4246 (init_one_libfunc_visibility): New, split out from ...
4247 (init_one_libfunc): ... here.
4249 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
4250 scratch register need not be early-clobber. Document the reason
4251 why we cannot use ST<OP>.
4253 2018-10-31 Joseph Myers <joseph@codesourcery.com>
4256 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
4257 line for second argument of AC_DEFINE_UNQUOTED.
4258 * doc/install.texi (Tools/packages necessary for modifying GCC):
4259 Update to autoconf 2.69 and automake 1.15.1.
4260 * aclocal.m4, config.in, configure: Regenerate.
4262 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
4264 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
4267 2018-10-31 Martin Liska <mliska@suse.cz>
4270 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
4271 Add new argument invalid_extension.
4272 (aarch64_get_all_extension_candidates): New function.
4273 (aarch64_rewrite_selected_cpu): Add NULL to function call.
4274 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
4276 (aarch64_get_all_extension_candidates): New function.
4277 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
4278 argument invalid_extension.
4279 (aarch64_parse_cpu): Likewise.
4280 (aarch64_print_hint_for_extensions): New function.
4281 (aarch64_validate_mcpu): Provide hint about invalid extension.
4282 (aarch64_validate_march): Likewise.
4283 (aarch64_handle_attr_arch): Pass new argument.
4284 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
4285 (aarch64_handle_attr_isa_flags): Likewise.
4287 2018-10-31 Richard Biener <rguenther@suse.de>
4291 * tree-outof-ssa.c (insert_backedge_copies): Restrict
4292 copy generation to useful cases. Place the copy before
4293 the definition of the backedge value when possible.
4295 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4297 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
4298 * config/arc/arc.c (arc_active_insn): New function.
4299 (check_store_cacheline_hazard): Likewise.
4300 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
4301 (arc_override_options): Disable delay slot scheduler for older
4303 (arc_store_addr_hazard_p): New implementation, old one renamed to
4305 (arc_store_addr_hazard_internal_p): Renamed.
4306 (arc_reorg): Don't combine into brcc instructions which are part
4307 of hardware hazard solution.
4308 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
4309 (tune_arc700): Likewise.
4310 * config/arc/arc.opt (arc7xx): New tune value.
4311 * config/arc/arc700.md: Improve A7 scheduler.
4313 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4315 * config/arc/arc.c (arc_override_options): Remove
4316 TARGET_COMPACT_CASESI.
4317 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
4318 (CASE_VECTOR_MODE): Likewise.
4319 (CASE_VECTOR_PC_RELATIVE): Likewise.
4320 (CASE_VECTOR_SHORTEN_MODE): Likewise.
4321 (CASE_VECTOR_SHORTEN_MODE1): Delete.
4322 (ADDR_VEC_ALIGN): Update.
4323 (ASM_OUTPUT_CASE_LABEL): Undefine.
4324 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
4325 (TARGET_BI_BIH): Define.
4326 (DEFAULT_BRANCH_INDEX): Likewise.
4327 * config/arc/arc.md (casesi): Rework to accept BI/BIH
4328 instructions, remove compact_casesi use case.
4329 (casesi_compact_jump): Remove.
4330 (casesi_dispatch): New pattern.
4331 * config/arc/arc.opt: Add mbranch-index option. Deprecate
4332 compact_casesi option.
4333 * doc/invoke.texi: Document mbranch-index option.
4335 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4337 * config/arc/arc.c (arc_get_tp): Remove function.
4338 (arc_emit_call_tls_get_addr): Likewise.
4339 (arc_call_tls_get_addr): New function.
4340 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
4341 * config/arc/arc.md (tls_load_tp_soft): Remove.
4342 (tls_gd_get_addr): Likewise.
4344 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
4346 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
4347 (mulsi3_600_lib): Remove pattern.
4348 (umulsi3_highpart_600_lib_le): Likewise.
4349 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
4350 (umulsidi3): Remove call to umulsidi3_600_lib.
4351 (umulsidi3_600_lib): Remove pattern.
4352 (peephole2): Remove peephole using the above deprecated patterns.
4354 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
4357 * config/arm/arm.c (arm_option_check_internal): Disable the combined
4358 use of -mslow-flash-data and -mword-relocations.
4359 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
4360 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
4362 * doc/invoke.texi (-mword-relocations): Mention conflict with
4364 (-mslow-flash-data): Reciprocally.
4366 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
4368 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
4369 16-byte modes held in GP registers to use an even regno.
4371 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
4372 (aarch64_atomic_ldop_supported_p): Remove.
4373 (aarch64_gen_atomic_ldop): Remove.
4374 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
4375 Fully expand LSE operations here.
4376 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
4377 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
4378 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
4379 and use ATOMIC_LDOP instead; use register_operand for the input;
4380 drop the split and emit insns directly.
4381 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
4382 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
4383 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
4385 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
4386 (aarch64_gen_atomic_ldop): Don't call it.
4387 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
4388 Use aarch64_reg_or_zero.
4389 (aarch64_atomic_exchange<ALLI>): Likewise.
4390 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
4391 operand 0; use aarch64_reg_or_zero for input; merge ...
4392 (@aarch64_atomic_swp<ALLI>): ... this and remove.
4394 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
4395 (aarch64_split_compare_and_swap): Use it.
4396 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
4397 test oldval against the proper predicate.
4398 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
4399 Use nonmemory_operand for expected.
4400 (cas_short_expected_pred): New.
4401 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
4402 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
4403 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
4404 (aarch64_plushi_operand): New.
4406 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
4407 Force oldval into the rval register for TARGET_LSE; emit the compare
4408 during initial expansion so that it may be deleted if unused.
4409 (aarch64_gen_atomic_cas): Remove.
4410 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
4411 Change =&r to +r for operand 0; use match_dup for operand 2;
4412 remove is_weak and mod_f operands as unused. Drop the split
4414 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
4415 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
4416 (@aarch64_atomic_cas<GPI>): Similarly.
4418 2018-10-31 Richard Biener <rguenther@suse.de>
4420 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
4423 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4425 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
4426 * config/aarch64/aarch64.md: Include saphira.md
4427 * config/aarch64/saphira.md: New file for pipeline description.
4429 2018-10-30 Martin Sebor <msebor@redhat.com>
4432 * gimple-ssa-sprintf.c (format_directive): Use %G to include
4434 (sprintf_dom_walker::compute_format_length):
4435 Avoid setting POSUNDER4K here.
4436 (get_destination_size): Handle null argument values.
4437 (get_user_idx_format): New function.
4438 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
4439 functions, including user-defined with attribute format printf.
4440 Use %G to include inlining context.
4441 Set POSUNDER4K here.
4443 2018-10-30 Jan Hubicka <jh@suse.cz>
4445 * params.def (lto-partitions): Bump from 32 to 128.
4447 2018-10-30 Jan Hubicka <jh@suse.cz>
4450 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
4452 (free_lang_data_in_type): Forward declare.
4453 (fld_type_variant_equal_p): New function.
4454 (fld_type_variant): New function
4455 (fld_incomplete_types): New hash.
4456 (fld_incomplete_type_of): New function
4457 (fld_simplfied-type): New function.
4458 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
4459 (free_lang_data): Allocate and free fld_incomplete_type; update call
4460 of free_lang_data_in_decl.
4462 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
4464 * gcov.c (output_lines): Remove duplicate line.
4466 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4468 * config/rs6000/rs6000.md (bswapdi2): Force address into register
4469 if not in indexed or indirect form.
4470 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
4471 (bswapdi2_store): Ditto.
4472 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
4474 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
4475 Prototype for helper function.
4477 2018-10-30 Martin Sebor <msebor@redhat.com>
4479 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
4480 (target, pragma GCC optimize, pragma GCC target): Ditto.
4482 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
4484 * doc/extend.texi: Fix prototype and description of
4485 __builtin_expect_with_probability.
4487 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4489 * cgraph.h (clone_function_name_1): Replaced by new
4490 clone_function_name_numbered that takes name as string; for
4491 privatize_symbol_name_1 use only.
4492 (clone_function_name): Renamed to
4493 clone_function_name_numbered to be explicit about numbering.
4494 (clone_function_name): New two-argument function that does
4495 not number its output.
4496 (clone_function_name): New three-argument function that
4497 takes a number to append to its output.
4498 * cgraphclones.c (duplicate_thunk_for_node):
4499 (clone_function_name_1): Renamed.
4500 (clone_function_name_numbered): Two new functions.
4501 (clone_function_name): Improved documentation.
4502 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
4503 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
4504 * final.c (final_scan_insn_1): Use the new clone_function_name
4506 * multiple_target.c (create_dispatcher_calls): Ditto.
4507 (create_target_clone): Ditto.
4508 * omp-expand.c (grid_expand_target_grid_body): Ditto.
4509 * omp-low.c (create_omp_child_function_name): Ditto.
4510 * omp-simd-clone.c (simd_clone_create): Ditto.
4511 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
4512 new clone_function_name without numbering.
4514 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
4516 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
4517 Assert that the allocation size is not zero.
4519 2018-10-30 Richard Biener <rguenther@suse.de>
4521 PR tree-optimization/87800
4522 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
4523 non-induction or reduction PHIs.
4525 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
4527 * config/aarch64/falkor-tag-collision-avoidance.c
4528 (execute_tag_collision_avoidance): Call df_note_add_problem.
4530 2018-10-30 Martin Liska <mliska@suse.cz>
4532 * doc/extend.texi: Fix typo in documentation
4533 of __builtin_expect_with_probability.
4535 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4538 * input.c (get_substring_ranges_for_loc): Detect if
4539 linemap_resolve_location gives us a NULL map, and reject
4542 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
4544 * config.gcc (xstormy16-*-elf): Set tm_d_file.
4546 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4547 Martin Sebor <msebor@redhat.com>
4548 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4550 * doc/ux.texi (Quoting): New subsection, adapted from material at
4551 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
4552 MartinSebor and ManuelLopezIbanez.
4553 (Fix-it hints): Note that fix-it hints shouldn't be marked for
4556 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
4559 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
4562 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
4564 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
4566 2018-10-29 Paul Koning <ni1d@arrl.net>
4568 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
4570 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
4572 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
4573 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
4574 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
4575 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
4576 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
4577 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
4578 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
4579 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
4580 Change 'vector' to '__vector'.
4581 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
4582 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
4583 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
4584 _mm_avg_pu16): Likewise. And, whitespace corrections.
4586 2018-10-29 Richard Biener <rguenther@suse.de>
4588 PR tree-optimization/87785
4589 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
4592 2018-10-29 Olivier Hainque <hainque@adacore.com>
4594 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
4596 2018-10-29 Olivier Hainque <hainque@adacore.com>
4598 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
4599 ports configuration macro, defaults to "gnu".
4600 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
4601 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
4603 2018-10-29 Olivier Hainque <hainque@adacore.com>
4605 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
4607 2018-10-29 Richard Biener <rguenther@suse.de>
4609 PR tree-optimization/87790
4610 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
4611 (vect_make_slp_decision): Adjust.
4612 (vect_slp_analyze_bb_1): Likewise.
4613 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
4616 2018-10-29 Richard Biener <rguenther@suse.de>
4618 PR tree-optimization/87785
4619 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
4621 (vect_build_slp_tree): Likewise.
4622 (vect_gather_slp_loads): New function.
4623 (vect_analyze_slp_instance): Gather loads separately from the
4626 2018-10-29 Martin Liska <mliska@suse.cz>
4628 * Makefile.in: Make dependency to json.o.
4629 * doc/gcov.texi: Document new JSON format, remove
4630 old intermediate format documentation.
4631 * gcov.c (struct function_info): Come up with m_name and
4633 (function_info::function_info): Initialize it.
4634 (function_info::~function_info): Release it.
4635 (main): Rename flag_intermediate_format to flag_json_format.
4636 (print_usage): Describe --json-format.
4637 (process_args): Set flag_json_format.
4638 (output_intermediate_line): Remove.
4639 (output_intermediate_json_line): Likewise.
4640 (get_gcov_intermediate_filename): Return new extension
4642 (output_intermediate_file): Implement JSON emission.
4643 (output_json_intermediate_file): Implement JSON emission.
4644 (generate_results): Use ::get_name for function name.
4645 Handle JSON output file.
4646 (read_graph_file): Use ::get_name instead of cplus_demangle.
4647 (read_count_file): Likewise.
4648 (solve_flow_graph): Likewise.
4649 (add_line_counts): Likewise.
4650 (accumulate_line_counts): Use new flag_json_format.
4651 (output_function_details): Use ::get_name instead of cplus_demangle.
4652 (output_lines): Likewise.
4653 * json.cc (test_writing_literals): Add new tests.
4654 * json.h (class literal): Add new boolean constructor.
4656 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
4658 PR rtl-optimization/87701
4659 PR rtl-optimization/87780
4660 * combine.c (make_more_copies): Rewrite.
4662 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
4664 * doc/generic.texi (ABSU_EXPR): Document.
4665 * match.pd (absu(x)*absu(x) -> x*x): Handle.
4666 (absu(absu(X)) -> absu(X)): Likewise.
4667 (absu(-X) -> absu(X)): Likewise.
4668 (absu(X) where X is nonnegative -> X): Likewise.
4670 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
4672 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
4673 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
4674 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
4675 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
4676 (s-tm-texi): Also check timestamp on d-target.def.
4677 (generated_files): Add TM_D_H and d-target-hooks-def.h.
4678 (build/genhooks.o): Also depend on D_TARGET_DEF.
4679 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
4681 * config/aarch64/aarch64-d.c: New file.
4682 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
4684 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
4686 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
4687 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
4688 * config/arm/arm-d.c: New file.
4689 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
4690 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
4691 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4692 * config/arm/t-arm (arm-d.o): New rule.
4693 * config/default-d.c: New file.
4694 * config/glibc-d.c: New file.
4695 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4696 * config/i386/i386-d.c: New file.
4697 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
4698 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
4699 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4700 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
4701 * config/i386/t-i386 (i386-d.o): New rule.
4702 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4703 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4704 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
4705 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4706 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4707 * config/mips/mips-d.c: New file.
4708 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
4709 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
4710 * config/mips/t-mips (mips-d.o): New rule.
4711 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4712 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4713 * config/powerpcspe/powerpcspe-d.c: New file.
4714 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
4716 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4717 Support GNU D by using 0 as the language type.
4718 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
4719 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
4720 * config/riscv/riscv-d.c: New file.
4721 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
4723 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
4724 * config/riscv/t-riscv (riscv-d.o): New rule.
4725 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4726 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4727 * config/rs6000/rs6000-d.c: New file.
4728 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
4730 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4731 Support GNU D by using 0 as the language type.
4732 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
4733 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
4734 * config/s390/s390-d.c: New file.
4735 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
4736 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
4737 * config/s390/t-s390 (s390-d.o): New rule.
4738 * config/sparc/sparc-d.c: New file.
4739 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
4741 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
4742 * config/sparc/t-sparc (sparc-d.o): New rule.
4743 * config/t-glibc (glibc-d.o): New rule.
4744 * configure: Regenerated.
4745 * configure.ac (tm_d_file): New variable.
4746 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
4747 * doc/contrib.texi (Contributors): Add self for the D frontend.
4748 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
4749 * doc/install.texi (Configuration): Mention libphobos as an option for
4750 --enable-shared. Mention d as an option for --enable-languages.
4751 (Testing): Mention check-d as a target.
4752 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
4753 name suffixes. Mention d as a -x option.
4754 * doc/sourcebuild.texi (Top Level): Mention libphobos.
4755 * doc/standards.texi (Standards): Add section on D language.
4756 * doc/tm.texi: Regenerated.
4757 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
4758 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
4759 * dwarf2out.c (is_dlang): New function.
4760 (gen_compile_unit_die): Use DW_LANG_D for D.
4761 (declare_in_namespace): Return module die for D, instead of adding
4762 extra declarations into the namespace.
4763 (gen_namespace_die): Generate DW_TAG_module for D.
4764 (gen_decl_die): Handle CONST_DECLSs for D.
4765 (dwarf2out_decl): Likewise.
4766 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
4767 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
4768 kinds of aggregates.
4769 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
4770 * genhooks.c: Include d/d-target.def.
4772 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
4775 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
4776 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
4777 (STACK_DYNAMIC_OFFSET): Likewise.
4779 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
4782 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
4785 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
4787 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
4788 return type and other typos.
4790 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4792 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
4793 a shorter sequence with fewer branches.
4794 (emit_final_str_compare_gpr): Ditto.
4796 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4798 * config/rs6000/tmmintrin.h: New file.
4799 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
4801 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4803 * config/rs6000/mmintrin.h: Enable 32bit compilation.
4804 * config/rs6000/xmmintrin.h: Likewise.
4806 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4808 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
4810 2018-10-26 Richard Biener <rguenther@suse.de>
4812 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
4814 (vect_mark_slp_stmts_relevant): Likewise.
4815 (vect_detect_hybrid_slp_stmts): Likewise.
4816 (vect_bb_slp_scalar_cost): Likewise.
4817 (vect_remove_slp_scalar_calls): Likewise.
4819 2018-10-26 Jan Hubicka <jh@suse.cz>
4821 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
4822 (warn_types_mismatch): Fix walk of DECL_NAME.
4823 (odr_types_equivalent_p): Fix overactive assert.
4825 2018-10-26 Richard Biener <rguenther@suse.de>
4827 PR tree-optimization/87105
4828 * tree-vectorizer.h (_slp_tree::refcnt): New member.
4829 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
4831 (vect_create_new_slp_node): Initialize refcnt to one.
4833 (scalar_stmts_set_t, bst_fail): Remove.
4834 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
4835 (vect_build_slp_tree): Add bst_map argument and lookup
4836 already created SLP nodes.
4837 (vect_print_slp_tree): Handle a SLP graph, print SLP node
4839 (vect_slp_rearrange_stmts): Handle a SLP graph.
4840 (vect_analyze_slp_instance): Adjust and free SLP nodes from
4841 the CSE map. Fix indenting.
4842 (vect_schedule_slp_instance): Add short-cut.
4844 2018-10-26 Martin Liska <mliska@suse.cz>
4847 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
4848 addr_expr and not with pointers.
4850 2018-10-26 Jan Hubicka <jh@suse.cz>
4852 * tree.c (free_lang_data_in_type): Only check main variants.
4853 * ipa-devirt.c (warn_odr): Make static.
4854 (types_same_for_odr): Drop strict variant.
4855 (types_odr_comparable): Likewise.
4856 (odr_or_derived_type_p): Look for main variants.
4857 (odr_name_hasher::equal): Cleanup comment.
4858 (odr_subtypes_equivalent): Add warn and warned arguments; check main
4860 (type_variants_equivalent_p): break out from ...
4861 (odr_types_equivalent): ... here; go for main variants where needed.
4862 (warn_odr): ... here; turn static.
4863 (warn_types_mismatch): Compare mangled names of main variants.
4864 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
4865 (type_with_linkage_p): Sanity check that we look at main variant.
4866 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
4867 * tree.h (types_same_for_odr): Drop strict argument.
4869 2018-10-26 Richard Biener <rguenther@suse.de>
4871 PR tree-optimization/87746
4872 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
4873 Simplify and fix WRT strided store groups with size not
4874 equal to step in element count.
4875 (vect_analyze_group_access_1): Dump the whole group.
4877 2018-10-25 Carl Love <cel@us.ibm.com>
4879 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
4880 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
4881 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
4882 precicion entry for each overloaded builtin.
4883 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
4884 VSCEDPUO): Rename overloaded name.
4885 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
4886 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
4887 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
4888 define_expand for xscmpexqp instruction.
4889 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
4891 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4892 Jinsong Ji <jji@us.ibm.com>
4894 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
4895 function with vec_sl.
4896 (_mm_slli_epi32): Likewise.
4897 (_mm_slli_epi64): Likewise.
4898 (_mm_srai_epi16): Replace deprecated function with vec_sra.
4899 (_mm_srai_epi32): Likewise.
4900 (_mm_srli_epi16): Replace deprecated function with vec_sr.
4901 (_mm_srli_epi32): Likewise.
4902 (_mm_srli_epi64): Likewise.
4903 (_mm_sll_epi16): Replace deprecated function with vec_sl.
4904 (_mm_sll_epi32): Likewise.
4905 (_mm_sll_epi64): Likewise.
4906 (_mm_sra_epi16): Replace deprecated function with vec_sra.
4907 (_mm_sra_epi32): Likewise.
4908 (_mm_srl_epi16): Replace deprecated function with vec_sr.
4909 (_mm_srl_epi32): Likewise.
4910 (_mm_srl_epi64): Likewise.
4912 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4913 Jinsong Ji <jji@us.ibm.com>
4915 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4916 comparison operators with vec_cmp* for compatibility due to
4917 unfortunate history; clean up formatting and use types more
4919 (_mm_sll_epi32): Likewise.
4920 (_mm_sll_epi64): Likewise.
4921 (_mm_srl_epi16): Likewise.
4922 (_mm_srl_epi32): Likewise.
4923 (_mm_srl_epi64): Likewise.
4925 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4926 Jinsong Ji <jji@us.ibm.com>
4928 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4929 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4930 __vector __bool int. Use vec_cmpgt in preference to deprecated
4931 function vec_vcmpgtfp.
4932 (_mm_max_ps): Likewise.
4934 2018-10-25 Jeff Law <law@redhat.com>
4936 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4939 2018-10-25 Martin Sebor <msebor@redhat.com>
4941 * doc/extend.texi (aligned): Expand attribute description.
4942 (Alignment): Rename section. Discuss function arguments.
4944 2018-10-25 Jan Hubicka <jh@suse.cz>
4946 * ipa-devirt.c (main_odr_variant): Remove.
4947 (hash_odr_name, types_same_for_odr, types_odr_comparable,
4948 odr_name_hasher::equal, odr_subtypes_equivalent_p):
4949 Drop use of main_odr_variant.
4950 (add_type_duplicate): Silence confused warnings on integer types.
4951 (get_odr_type): Always look for main variant.
4952 (register_odr_type): Simplify.
4954 2018-10-25 Richard Biener <rguenther@suse.de>
4956 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4957 Initialize ng to silence error with release checking bootstrap.
4959 2018-10-25 Richard Biener <rguenther@suse.de>
4961 * tree-if-conv.c: Include tree-ssa-sccvn.h.
4962 (tree_if_conversion): Run CSE on the if-converted loop body.
4964 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4966 * config/s390/constraints.md (ZL): New constraint.
4967 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4969 * config/s390/s390.md (movdi_larl): Remove.
4970 (movdi_64): Add the LARL alternative.
4972 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4975 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4976 (RTX_CODE_HWINT_P): New macro.
4977 (rtx_code_size): Use RTX_CODE_HWINT_P ().
4979 2018-10-25 Jan Hubicka <jh@suse.cz>
4981 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4984 2018-10-25 Richard Biener <rguenther@suse.de>
4986 PR tree-optimization/87665
4987 PR tree-optimization/87745
4988 * tree-vectorizer.h (get_earlier_stmt): Remove.
4989 (get_later_stmt): Pick up UID from the original non-pattern stmt.
4991 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
4993 * options.texi (Deprecated): Move list to Var section.
4995 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
4996 Jinsong Ji <jji@us.ibm.com>
4998 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
4999 __vector long to __vector long long.
5000 (_mm_cvtpd_ps): Likewise.
5001 (_mm_cvttpd_epi32): Likewise.
5002 (_mm_cvtpi32_pd): Likewise.
5003 (_mm_unpackhi_epi64): Likewise.
5004 (_mm_unpacklo_epi64): Likewise.
5006 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
5008 PR rtl-optimization/87720
5009 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
5011 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
5013 * gimple-ssa-isolate-paths.c
5014 (find_implicit_erroneous_behavior): Do not change code if the
5015 pass is running for warnings only.
5016 (find_explicit_erroneous_behavior): Likewise.
5018 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
5020 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
5021 Define as rs6000_mangle_decl_assembler_name.
5022 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
5023 long double to IEEE long double, switch the names of the long
5024 double built-in functions to be <func>f128 instead of <func>l.
5026 2018-10-24 Martin Sebor <msebor@redhat.com>
5028 * doc/extend.texi (nonnull): List no-argument form. Reference
5029 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
5031 2018-10-24 Richard Biener <rguenther@suse.de>
5033 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
5035 2018-10-24 Martin Liska <mliska@suse.cz>
5037 PR tree-optimization/84436
5038 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
5040 (switch_conversion::contains_linear_function_p): New.
5041 (switch_conversion::build_one_array): Support linear
5042 transformation on input.
5043 * tree-switch-conversion.h (struct switch_conversion): Add
5044 contains_linear_function_p declaration.
5046 2018-10-24 Richard Biener <rguenther@suse.de>
5048 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
5049 if its argument is CONSTANT_CLASS_P.
5051 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5053 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
5054 it is wrong for forward declarations.
5056 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
5058 * config/s390/s390.c (s390_check_qrst_address): Add the missing
5059 SYMBOL_REF_P () check.
5061 2018-10-24 Richard Biener <rguenther@suse.de>
5063 PR tree-optimization/87105
5064 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
5065 dump classification.
5066 (vect_analyze_data_ref_accesses): Handle duplicate loads and
5067 stores by splitting the affected group after the fact.
5068 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
5069 fail the SLP build because of size constraints.
5071 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5073 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
5074 * configure: Regenerate.
5075 * config.in: Regenerate.
5076 * varasm.c (mergeable_string_section): Use readonly_data_section
5077 if linker doesn't support SHF_MERGE with alignment > 8.
5078 (mergeable_constant_section): Likewise.
5080 2018-10-24 Richard Biener <rguenther@suse.de>
5082 PR tree-optimization/84013
5083 * tree-ssa-structalias.c (struct msdi_data): New struct for
5084 marshalling data to walk_stmt_load_store_ops.
5085 (maybe_set_dependence_info): Refactor as callback for
5086 walk_stmt_load_store_ops.
5087 (compute_dependence_clique): Set restrict info on all stmt kinds.
5089 2018-10-24 Martin Liska <mliska@suse.cz>
5091 * cgraph.c (cgraph_node::dump):
5092 Remove reduntant dumps and make tp_first_run dump more compact.
5094 2018-10-24 Richard Biener <rguenther@suse.de>
5096 PR tree-optimization/87665
5097 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
5100 2018-10-12 Jeff Law <law@redhat.com>
5102 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
5105 2018-10-23 Richard Biener <rguenther@suse.de>
5107 * tree-vrp.c (add_assert_info): Guard dump_printf with
5109 * gimple-ssa-evrp-analyze.c
5110 (evrp_range_analyzer::record_ranges_from_incoming_edge):
5111 Use value_range::ignore_equivs_equal_p.
5113 2018-10-23 Richard Biener <rguenther@suse.de>
5115 PR tree-optimization/87105
5116 PR tree-optimization/87608
5117 * passes.def (pass_all_early_optimizations): Add early phi-opt
5119 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
5120 addition to debug stmts.
5121 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
5122 and abs replacement early.
5123 * tree-cfg.c (gimple_empty_block_p): Likewise.
5125 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
5128 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
5129 specified to configure.
5130 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
5132 2018-10-23 Richard Biener <rguenther@suse.de>
5134 PR tree-optimization/87700
5135 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
5137 2018-10-23 Jakub Jelinek <jakub@redhat.com>
5140 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
5141 second argument from __mmask16 to __mmask8.
5142 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
5143 _mm_mask_packs_epi32): Likewise.
5144 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
5146 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
5148 2018-10-23 Richard Biener <rguenther@suse.de>
5150 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
5152 2018-10-23 Richard Biener <rguenther@suse.de>
5154 PR tree-optimization/86144
5155 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
5156 over simd attribute.
5158 2018-10-23 Richard Biener <rguenther@suse.de>
5160 PR tree-optimization/87693
5161 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
5162 the case we do not find the taken edge.
5164 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
5165 Jinsong Ji <jji@us.ibm.com>
5167 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
5168 (_mm_store_pd): Use unaligned vector type for pointer cast.
5169 (_mm_maskmoveu_si128): Likewise.
5170 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
5171 (_mm_store_ps): Use unaligned vector type for pointer cast.
5173 2018-10-22 Paul Koning <ni1d@arrl.net>
5175 * symtab.c (symtab_node::increase_alignment): Correct max
5178 2018-10-22 Yury Gribov <tetra2005@gmail.com>
5180 PR tree-optimization/87633
5181 * match.pd: Do not generate unordered integer comparisons.
5183 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
5185 PR rtl-optimization/87600
5186 * combine.c: Add include of expr.h.
5187 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
5188 register to a pseudo.
5189 (make_more_copies): New function, add a copy to a new pseudo after
5190 the moves from hard registers into pseudos.
5191 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
5192 later. Call make_more_copies.
5194 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
5196 * lra-constraints.c (process_alt_operands): New local array,
5197 matching_early_clobber. Check matching_early_clobber before
5198 decrementing reject, and set matching_early_clobber after.
5200 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
5203 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
5204 call output_addr_const and hope for the best.
5206 2018-10-22 Richard Biener <rguenther@suse.de>
5208 * gimple-ssa-evrp-analyze.c
5209 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
5210 smarter about what ranges to use.
5211 * tree-vrp.c (add_assert_info): Dump here.
5212 (register_edge_assert_for_2): Instead of here at multiple but
5215 * gcc.dg/tree-ssa/evrp12.c: New testcase.
5216 * gcc.dg/predict-6.c: Adjust.
5217 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
5218 * gcc.dg/tree-ssa/vrp02.c: Likewise.
5219 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
5221 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
5222 Richard Biener <rguenther@suse.de>
5224 * bitmap.h: Update data structure documentation, including a
5225 description of bitmap views as either linked-lists or splay trees.
5226 (struct bitmap_element_def): Update comments for splay tree bitmaps.
5227 (struct bitmap_head_def): Likewise.
5228 (bitmap_list_view, bitmap_tree_view): New prototypes.
5229 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
5231 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
5232 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
5233 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
5234 released bitmap element here.
5235 (bitmap_element_free): Remove.
5236 (bitmap_elt_clear_from): Work on splay tree bitmaps.
5237 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
5238 this function similar ones such that linked-list bitmap implementation
5239 functions are grouped.
5240 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
5241 and moved for grouping.
5242 (bitmap_list_insert_element_after): Renamed from
5243 bitmap_elt_insert_after, and moved for grouping.
5244 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
5245 (bitmap_tree_link_left, bitmap_tree_link_right,
5246 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
5247 bitmap_tree_link_element, bitmap_tree_unlink_element,
5248 bitmap_tree_find_element): New functions for splay-tree bitmap
5250 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
5251 Renamed and moved, see above entries.
5252 (bitmap_tree_listify_from): New function to convert part of a splay
5253 tree bitmap to a linked-list bitmap.
5254 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
5255 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
5256 (bitmap_find_bit): Remove.
5257 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
5258 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
5259 Handle splay tree bitmaps.
5260 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
5261 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
5262 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
5263 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
5264 bitmap_intersect_compl_p, bitmap_ior_and_compl,
5265 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
5266 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
5267 corresponding changes to use linked-list specific bitmap_element
5268 manipulation functions as applicable for efficiency.
5269 (bitmap_tree_to_vec): New function.
5270 (debug_bitmap_elt_file): New function split out from ...
5271 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
5272 (bitmap_print): Likewise.
5274 PR tree-optimization/63155
5275 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
5277 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
5280 2018-10-22 Martin Liska <mliska@suse.cz>
5282 PR tree-optimization/87686
5284 2018-08-29 Martin Liska <mliska@suse.cz>
5286 * tree-switch-conversion.c (switch_conversion::expand):
5287 Strenghten assumption about gswitch statements.
5289 2018-10-22 Martin Liska <mliska@suse.cz>
5291 * ipa-icf.c (sem_item::compare_attributes): Remove.
5292 (sem_item::compare_referenced_symbol_properties): Use
5293 attribute_list_equal instead.
5294 (sem_function::equals_wpa): Likewise.
5295 * ipa-icf.h: Remove compare_attributes.
5297 2018-10-22 Richard Biener <rguenther@suse.de>
5300 * mem-stats.h (mem_usage::operator==): Fix pasto.
5302 2018-10-22 Richard Biener <rguenther@suse.de>
5304 PR tree-optimization/87640
5305 * tree-vrp.c (set_value_range_with_overflow): Decompose
5307 (extract_range_from_binary_expr_1): Adjust.
5309 2018-10-22 Martin Jambor <mjambor@suse.cz>
5311 * tree-eh.h (stmt_could_throw_p): Add function parameter.
5312 (stmt_can_throw_external): Likewise.
5313 (stmt_can_throw_internal): Likewise.
5314 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
5315 (lower_eh_constructs_2): Likewise.
5316 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
5317 (stmt_can_throw_external): Likewise.
5318 (stmt_can_throw_internal): Likewise.
5319 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
5320 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
5321 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
5322 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
5323 (pass_lower_eh_dispatch::execute): Pass cfun to
5324 stmt_can_throw_external.
5325 (cleanup_empty_eh): Likewise.
5326 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
5327 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
5328 stmt_can_throw_external instead of pushing it to cfun.
5329 (symbol_table::create_edge): Likewise.
5330 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
5331 stmt_can_throw_internal.
5332 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
5333 to stmt_could_throw_p.
5334 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
5335 stmt_can_throw_internal.
5336 (pass_store_merging::execute): Likewise.
5337 * gimple-ssa-strength-reduction.c
5338 (find_candidates_dom_walker::before_dom_children): Pass cfun to
5340 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
5341 stmt_can_throw_internal.
5342 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
5343 to stmt_can_throw_external.
5344 (check_stmt): Pass cfun to stmt_could_throw_p.
5345 (check_stmt): Pass cfun to stmt_can_throw_external.
5346 (pass_nothrow::execute): Likewise.
5347 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
5348 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
5349 stmt_can_throw_internal.
5350 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
5351 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
5352 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
5353 * tree-complex.c (expand_complex_libcall): Pass cfun to
5354 stmt_could_throw_p and to stmt_can_throw_internal.
5355 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
5356 * tree-inline.c (copy_edges_for_bb): Likewise.
5357 (maybe_move_debug_stmts_to_successors): Likewise.
5358 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
5360 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
5361 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
5362 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
5363 stmt_can_throw_internal.
5364 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
5365 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
5367 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
5368 stmt_can_throw_internal.
5369 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
5370 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
5372 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
5373 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
5374 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5375 (convert_mult_to_fma_1): Likewise.
5376 (convert_to_divmod): Likewise.
5377 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
5378 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
5379 * tree-ssa-propagate.c
5380 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
5381 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
5382 (maybe_optimize_range_tests): Likewise.
5383 (linearize_expr_tree): Likewise.
5384 (reassociate_bb): Likewise.
5385 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
5386 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
5387 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
5388 (handle_char_store): Likewise.
5389 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
5390 stmt_can_throw_internal.
5391 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
5393 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
5394 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
5395 (vectorizable_simd_clone_call): Likewise.
5396 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
5397 (gimple_stringop_fixed_value): Likewise.
5399 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
5401 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
5402 literal pool references.
5403 (s390_check_qrst_address): Adapt to the new behavior of
5404 s390_loadrelative_operand_p ().
5406 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5409 * config/i386/sse.md (*andnot<mode>3_bcst): New.
5411 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5414 * config/i386/sse.md (*<code><mode>3_bcst): New.
5416 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5419 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
5420 V4DI, V16SI and V8DI.
5421 (*sub<mode>3<mask_name>_bcst): New.
5422 (*add<mode>3<mask_name>_bcst): Likewise.
5424 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
5425 Jinsong Ji <jji@us.ibm.com>
5427 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
5428 __m64 with __vector unsigned long long for compatibility.
5429 (_mm_movemask_epi8): Likewise.
5430 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
5431 (_mm_cvttps_pi32): Likewise.
5432 (_mm_cvtpi32_ps): Likewise.
5433 (_mm_cvtps_pi16): Likewise.
5434 (_mm_loadh_pi): Likewise.
5435 (_mm_storeh_pi): Likewise.
5436 (_mm_movehl_ps): Likewise.
5437 (_mm_movelh_ps): Likewise.
5438 (_mm_loadl_pi): Likewise.
5439 (_mm_storel_pi): Likewise.
5440 (_mm_movemask_ps): Likewise.
5441 (_mm_shuffle_pi16): Likewise.
5443 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5446 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
5447 __builtin_ia32_vfnmsubpd512_mask.
5448 (_mm512_mask_fnmsub_round_pd): Likewise.
5449 (_mm512_fnmsub_pd): Likewise.
5450 (_mm512_mask_fnmsub_pd): Likewise.
5451 (_mm512_maskz_fnmsub_round_pd): Use
5452 __builtin_ia32_vfnmsubpd512_maskz.
5453 (_mm512_maskz_fnmsub_pd): Likewise.
5454 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
5455 (_mm512_mask_fnmsub_round_ps): Likewise.
5456 (_mm512_fnmsub_ps): Likewise.
5457 (_mm512_mask_fnmsub_ps): Likewise.
5458 (_mm512_maskz_fnmsub_round_ps): Use
5459 __builtin_ia32_vfnmsubps512_maskz.
5460 (_mm512_maskz_fnmsub_ps): Likewise.
5461 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
5462 __builtin_ia32_vfnmsubpd256_mask.
5463 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
5464 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5465 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
5466 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5467 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5468 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
5469 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
5470 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
5471 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
5472 __builtin_ia32_vfnmsubpd.
5473 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
5474 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
5475 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
5476 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
5477 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
5478 * config/i386/i386-builtin.def: Add
5479 __builtin_ia32_vfnmsubpd256_mask,
5480 __builtin_ia32_vfnmsubpd256_maskz,
5481 __builtin_ia32_vfnmsubpd128_mask,
5482 __builtin_ia32_vfnmsubpd128_maskz,
5483 __builtin_ia32_vfnmsubps256_mask,
5484 __builtin_ia32_vfnmsubps256_maskz,
5485 __builtin_ia32_vfnmsubps128_mask,
5486 __builtin_ia32_vfnmsubps128_maskz,
5487 __builtin_ia32_vfnmsubpd512_mask,
5488 __builtin_ia32_vfnmsubpd512_maskz,
5489 __builtin_ia32_vfnmsubps512_mask,
5490 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
5491 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
5492 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
5493 __builtin_ia32_vfnmsubpd256.
5494 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
5495 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
5496 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
5498 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
5500 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
5502 (fmai_vmfnmsub_<mode><round_name>): Likewise.
5504 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5507 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
5508 __builtin_ia32_vfnmaddpd512_mask.
5509 (_mm512_mask_fnmadd_round_pd): Likewise.
5510 (_mm512_fnmadd_pd): Likewise.
5511 (_mm512_mask_fnmadd_pd): Likewise.
5512 (_mm512_maskz_fnmadd_round_pd): Use
5513 __builtin_ia32_vfnmaddpd512_maskz.
5514 (_mm512_maskz_fnmadd_pd): Likewise.
5515 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
5516 (_mm512_mask_fnmadd_round_ps): Likewise.
5517 (_mm512_fnmadd_ps): Likewise.
5518 (_mm512_mask_fnmadd_ps): Likewise.
5519 (_mm512_maskz_fnmadd_round_ps): Use
5520 __builtin_ia32_vfnmaddps512_maskz.
5521 (_mm512_maskz_fnmadd_ps): Likewise.
5522 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
5523 __builtin_ia32_vfnmaddpd256_mask.
5524 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
5525 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
5526 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
5527 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5528 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5529 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
5530 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
5531 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
5532 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
5533 __builtin_ia32_vfnmaddpd.
5534 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
5535 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
5536 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
5537 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
5538 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
5539 * config/i386/i386-builtin.def: Add
5540 __builtin_ia32_vfnmaddpd256_mask,
5541 __builtin_ia32_vfnmaddpd256_maskz,
5542 __builtin_ia32_vfnmaddpd128_mask,
5543 __builtin_ia32_vfnmaddpd128_maskz,
5544 __builtin_ia32_vfnmaddps256_mask,
5545 __builtin_ia32_vfnmaddps256_maskz,
5546 __builtin_ia32_vfnmaddps128_mask,
5547 __builtin_ia32_vfnmaddps128_maskz,
5548 __builtin_ia32_vfnmaddpd512_mask,
5549 __builtin_ia32_vfnmaddpd512_maskz,
5550 __builtin_ia32_vfnmaddps512_mask,
5551 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
5552 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
5553 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
5554 __builtin_ia32_vfnmaddpd256.
5555 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
5556 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
5557 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
5559 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
5561 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
5563 (fmai_vmfnmadd_<mode><round_name>): Likewise.
5565 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5568 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
5569 __builtin_ia32_vfmsubpd512_mask.
5570 (_mm512_mask_fmsub_round_pd): Likewise.
5571 (_mm512_fmsub_pd): Likewise.
5572 (_mm512_mask_fmsub_pd): Likewise.
5573 (_mm512_maskz_fmsub_round_pd): Use
5574 __builtin_ia32_vfmsubpd512_maskz.
5575 (_mm512_maskz_fmsub_pd): Likewise.
5576 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
5577 (_mm512_mask_fmsub_round_ps): Likewise.
5578 (_mm512_fmsub_ps): Likewise.
5579 (_mm512_mask_fmsub_ps): Likewise.
5580 (_mm512_maskz_fmsub_round_ps): Use
5581 __builtin_ia32_vfmsubps512_maskz.
5582 (_mm512_maskz_fmsub_ps): Likewise.
5583 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
5584 __builtin_ia32_vfmsubpd256_mask.
5585 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
5586 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5587 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
5588 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5589 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5590 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
5591 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
5592 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
5593 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
5594 __builtin_ia32_vfmsubpd.
5595 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
5596 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
5597 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
5598 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
5599 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
5600 * config/i386/i386-builtin.def: Add
5601 __builtin_ia32_vfmsubpd256_mask,
5602 __builtin_ia32_vfmsubpd256_maskz,
5603 __builtin_ia32_vfmsubpd128_mask,
5604 __builtin_ia32_vfmsubpd128_maskz,
5605 __builtin_ia32_vfmsubps256_mask,
5606 __builtin_ia32_vfmsubps256_maskz,
5607 __builtin_ia32_vfmsubps128_mask,
5608 __builtin_ia32_vfmsubps128_maskz,
5609 __builtin_ia32_vfmsubpd512_mask,
5610 __builtin_ia32_vfmsubpd512_maskz,
5611 __builtin_ia32_vfmsubps512_mask,
5612 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
5613 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
5614 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
5615 __builtin_ia32_vfmsubpd256.
5616 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
5617 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
5618 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
5620 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
5622 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
5624 (fmai_vmfmsub_<mode><round_name>): Likewise.
5626 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5628 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
5629 Remove plus. Renamed to ...
5630 (*sub<mode>3<mask_name>_bcst): This.
5631 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
5632 (*add<mode>3<mask_name>_bcst): This.
5634 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5637 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
5639 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5642 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
5643 (_mm_or_epi32): Likewise.
5644 (_mm256_xor_epi32): Likewise.
5645 (_mm_xor_epi32): Likewise.
5646 (_mm256_or_epi64): Likewise.
5647 (_mm_or_epi64): Likewise.
5648 (_mm256_xor_epi64): Likewise.
5649 (_mm_xor_epi64): Likewise.
5651 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
5654 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
5656 2018-10-20 Jakub Jelinek <jakub@redhat.com>
5659 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
5661 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
5663 * doc/ux.texi: Move @section directly after @node.
5665 2018-10-19 Jakub Jelinek <jakub@redhat.com>
5669 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
5670 depend closely nested inside of loop with ordered clause with
5673 2018-10-19 David Malcolm <dmalcolm@redhat.com>
5675 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
5676 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
5677 * doc/ux.texi: New file.
5679 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
5681 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
5682 be the first CR field allocated.
5684 2018-10-19 Richard Biener <rguenther@suse.de>
5687 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
5688 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
5690 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
5693 * config/i386/sse.md
5694 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
5695 (*add<mode>3<mask_name>_bcst_2): Likewise.
5697 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
5699 * config/i386/sse.md
5700 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5701 Replace nonimmediate_operand with register_operand.
5702 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5704 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5707 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
5709 PR rtl-optimization/87596
5710 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
5711 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
5712 for instructions in FROM..TO range.
5714 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
5716 * cfgexpand.c (expand_one_var): Use specific wording in error message
5717 for non-local frame variables.
5718 * stor-layout.c (layout_decl): Do not issue a warning for them.
5720 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
5722 * haifa-sched.c (priority): Add force_recompute parameter.
5723 (apply_replacement): Call priority () with force_recompute = true.
5724 (restore_pattern): Likewise.
5726 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5728 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
5729 HOST_BITS_PER_WIDE_INT.
5730 (test_vector_ops_duplicate): Likewise.
5732 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5735 * config/i386/sse.md (VF_AVX512): New.
5736 (avx512bcst): Likewise.
5737 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5739 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5741 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5744 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
5746 * doc/invoke.texi (-dumpversion): Improve grammar.
5747 (-dumpfullversion): Make more consistent with -dumpversion.
5749 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
5751 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
5752 Set JUMP_LABEL to the jump insn.
5753 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
5754 Predict emitted jump and add label to jump insn.
5756 2018-10-18 David Malcolm <dmalcolm@redhat.com>
5758 PR tree-optimization/87562
5759 * input.c (get_substring_ranges_for_loc): Use
5760 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
5761 getting the linemap for the endpoint. Verify that it's either
5762 in the same linemap as the start point's spelling location, or
5763 at least in the same file.
5765 2018-10-18 Richard Biener <rguenther@suse.de>
5767 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
5768 feed width-specific load/store costs through ix86_vec_cost.
5769 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
5770 (k8_cost): Likewise.
5771 (bdver_cost): Likewise.
5772 (znver1_cost): Likewise.
5773 (btver1_cost): Likewise.
5774 (btver2_cost): Likewise.
5776 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5778 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
5779 to simplify subreg of vec_merge.
5781 2018-10-18 Richard Biener <rguenther@suse.de>
5783 * config/i386/i386.c: Fix costing of vector FMA.
5785 2018-10-18 Richard Biener <rguenther@suse.de>
5787 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
5789 (ix86_builtin_vectorization_cost): For vec_construct properly
5790 cost insertion into SSE regs.
5791 (...): Adjust calls to ix86_vec_cost.
5793 2018-10-18 Richard Biener <rguenther@suse.de>
5797 2018-02-07 Richard Biener <rguenther@suse.de>
5799 PR tree-optimization/84204
5800 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
5803 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5806 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
5808 (test_vector_ops_duplicate): Add test for a scalar subreg of a
5809 VEC_MERGE of a VEC_DUPLICATE.
5811 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5813 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
5814 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
5815 * doc/standards.texi (C Language): Document C2X.
5816 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
5817 (rl78_option_override): Handle "GNU C2X" language name.
5819 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5821 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
5822 Document C17 as published in 2018.
5824 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
5827 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
5828 bail out if both sides do not have the same storage order.
5830 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5832 * bitmap.c (bitmap_head::dump): New.
5833 * bitmap.h (bitmap_head): Add dump().
5834 * gimple-ssa-evrp-analyze.c
5835 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
5836 (evrp_range_analyzer::set_ssa_range_info): Same.
5837 (evrp_range_analyzer::record_ranges_from_phis): Same.
5838 (evrp_range_analyzer::record_ranges_from_stmt): Same.
5839 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
5840 * gimple-ssa-sprintf.c (get_int_range): Same.
5841 (format_integer): Same.
5842 (sprintf_dom_walker::handle_gimple_call): Same.
5843 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
5844 (ipcp_vr_lattice::top_p): Same.
5845 (ipcp_vr_lattice::bottom_p): Same.
5846 (ipcp_vr_lattice::set_to_bottom): Same.
5847 (ipa_vr_operation_and_type_effects): Same.
5848 (propagate_vr_across_jump_function): Same.
5849 (ipcp_store_vr_results): Same.
5850 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
5851 (ipa_print_node_jump_functions_for_edge): Same.
5852 (ipa_get_value_range): Same.
5853 (ipa_compute_jump_functions_for_edge): Same.
5854 (ipa_write_jump_function): Same.
5855 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
5856 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
5858 * vr-values.c (set_value_range_to_nonnegative): Same.
5859 (set_value_range_to_truthvalue): Same.
5860 (vr_values::get_value_range): Same.
5861 (vr_values::set_defs_to_varying): Same.
5862 (vr_values::update_value_range): Same.
5863 (symbolic_range_based_on_p): Same.
5864 (vr_values::op_with_boolean_value_range_p): Same.
5865 (vr_values::extract_range_for_var_from_comparison_expr): Same.
5866 (vr_values::extract_range_from_ssa_name): Same.
5867 (vr_values::extract_range_from_binary_expr): Same.
5868 (vr_values::extract_range_from_unary_expr): Same.
5869 (vr_values::extract_range_from_cond_expr): Same.
5870 (vr_values::extract_range_from_comparison): Same.
5871 (vr_values::check_for_binary_op_overflow): Same.
5872 (vr_values::extract_range_basic): Same.
5873 (vr_values::extract_range_from_assignment): Same.
5874 (compare_ranges): Same.
5875 (compare_range_with_value): Same.
5876 (vr_values::adjust_range_with_scev): Same.
5877 (vrp_valueize): Same.
5878 (vrp_valueize_1): Same.
5879 (vr_values::get_vr_for_comparison): Same.
5880 (vr_values::compare_name_with_value): Same.
5881 (vr_values::compare_names): Same.
5882 (vr_values::vrp_evaluate_conditional): Same.
5883 (find_case_label_ranges): Same.
5884 (vr_values::vrp_visit_switch_stmt): Same.
5885 (vr_values::extract_range_from_phi_node): Same.
5886 (vr_values::simplify_div_or_mod_using_ranges): Same.
5887 (vr_values::simplify_bit_ops_using_ranges): Same.
5888 (test_for_singularity): Same.
5889 (range_fits_type_p): Same.
5890 (vr_values::simplify_cond_using_ranges_1): Same.
5891 (vr_values::simplify_switch_using_ranges): Same.
5892 (vr_values::simplify_float_conversion_using_ranges): Same.
5893 (vr_values::two_valued_val_range_p): Same.
5894 (vr_values::add_equivalence): Move to value_range::equiv_add.
5895 * vr-values.h (vr_values::add_equivalence): Remove.
5896 (VR_INITIALIZER): Remove.
5897 * tree-vrp.c (value_range::set): New.
5898 (value_range::equiv_add): New.
5899 (value_range::value_range): New.
5900 (value_range::deep_copy): New.
5901 (value_range::check): New.
5902 (value_range::equal_p): New.
5903 (value_range::ignore_equivs_equal_p): New.
5904 (value_range::operator==): New.
5905 (value_range::operator!=): New.
5906 (value_range::symbolic_p): New.
5907 (value_range::numeric_p): New.
5908 (value_range::set_undefined): New.
5909 (value_range::set_varying): New.
5910 (value_range::may_contain_p): New.
5911 (value_range::equiv_clear): New.
5912 (value_range::singleton_p): New.
5913 (value_range::intersect): New.
5914 (value_range::dump): New.
5915 (value_range::set_and_canonicalize): New.
5916 (set_value_range): Adjust for value_range API.
5917 (set_value_range_to_undefined): Same.
5918 (set_value_range_to_varying): Same.
5919 (set_and_canonicalize_value_range): Same.
5920 (set_value_range_to_nonnull): Same.
5921 (set_value_range_to_null): Same.
5922 (range_is_null): Same.
5923 (range_is_nonnull): Same.
5924 (range_int_cst_p): Same.
5925 (range_int_cst_singleton_p): Same.
5926 (symbolic_range_p): Same.
5927 (range_includes_zero_p): Same.
5928 (value_range_constant_singleton): Same.
5929 (vrp_set_zero_nonzero_bits): Same.
5930 (ranges_from_anti_range): Same.
5931 (extract_range_into_wide_ints): Same.
5932 (extract_range_from_multiplicative_op): Same.
5933 (set_value_range_with_overflow): Same.
5934 (extract_range_from_binary_expr_1): Same.
5935 (extract_range_from_unary_expr): Same.
5936 (dump_value_range): Same.
5937 (debug_value_range): Same.
5938 (vrp_prop::check_array_ref): Same.
5939 (vrp_prop::check_mem_ref): Same.
5940 (vrp_prop::vrp_initialize): Same.
5941 (vrp_prop::visit_stmt): Same.
5942 (intersect_ranges): Same.
5943 (vrp_prop::visit_phi): Same.
5944 (vrp_prop::vrp_finalize): Same.
5945 (determine_value_range_1): Same.
5946 (determine_value_range): Same.
5947 (vrp_intersect_ranges_1): Rename to...
5948 (vrp_intersect_1): this.
5949 (vrp_intersect_ranges): Rename to...
5950 (value_range::intersect_helper): ...this.
5951 (vrp_meet_1): Rename to...
5952 (value_range::union_helper): ...this.
5953 (vrp_meet): Rename to...
5954 (value_range::union_): ...this.
5955 (copy_value_range): Remove.
5956 * tree-vrp.h (struct value_range): Rewrite into a proper class.
5957 (value_range::vrtype): New.
5958 (value_range::type): New.
5959 (value_range::equiv): New.
5960 (value_range::min): New.
5961 (value_range::max): New.
5962 (value_range::varying_p): New.
5963 (value_range::undefined_p): New.
5964 (value_range::null_p): New.
5965 (value_range::equiv_add): New.
5966 (copy_value_range): Remove.
5968 2018-10-17 David Malcolm <dmalcolm@redhat.com>
5970 * Makefile.in (SELFTEST_TARGETS): New.
5971 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5972 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5973 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5975 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5976 (selftest-c++-gdb, selftest-c++-valgrind): Move to
5978 * configure: Regenerate.
5979 * configure.ac (selftest_languages): New.
5981 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5983 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5984 overflow wraps argument.
5985 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5986 wide_int_range_multiplicative_op.
5987 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5988 overflow wraps argument.
5989 (wide_int_range_multiplicative_op): Same.
5990 (wide_int_range_lshift): Same.
5991 (wide_int_range_div): Same.
5992 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
5993 (wide_int_range_lshift): Same.
5994 (wide_int_range_div): Same.
5996 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5998 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
5999 use sign as argument.
6000 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
6001 wide_int_range_shift_undefined_p.
6003 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6005 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
6007 (@despeculate_copy<ALLI_TI:mode>): ... This.
6008 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
6011 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6013 * config.gcc: Obsolete *-*-solaris2.10*.
6014 * doc/install.texi (Specific, *-*-solaris2*): Document it.
6016 2018-10-12 Jeff Law <law@redhat.com>
6018 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
6019 reg + sym +- const_int addressing modes.
6021 2018-10-15 David Malcolm <dmalcolm@redhat.com>
6023 * common.opt (fdiagnostics-minimum-margin-width=): New option.
6024 * diagnostic-show-locus.c (layout::layout): Apply the minimum
6026 (layout::start_annotation_line): Only print up to 3 of the
6027 margin character, to avoid touching the left-hand side.
6028 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
6029 minimum margin width, as set by test_diagnostic_context's ctor.
6030 (selftest::test_fixit_insert_containing_newline): Likewise.
6031 (selftest::test_fixit_insert_containing_newline_2): Likewise.
6032 (selftest::test_line_numbers_multiline_range): Clear
6033 dc.min_margin_width.
6034 * diagnostic.c (diagnostic_initialize): Initialize
6036 * diagnostic.h (struct diagnostic_context): Add field
6038 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
6039 * opts.c (common_handle_option): Handle
6040 OPT_fdiagnostics_minimum_margin_width_.
6041 * selftest-diagnostic.c
6042 (selftest::test_diagnostic_context::test_diagnostic_context):
6043 Initialize min_margin_width to 6.
6044 * toplev.c (general_init): Initialize global_dc->min_margin_width.
6046 2018-10-15 David Malcolm <dmalcolm@redhat.com>
6048 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
6049 Fix usage of "error_at_rich_loc" in the comment.
6051 2018-10-15 Renlin Li <renlin.li@arm.com>
6054 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
6055 if-conversioned loop when it contains ifn with types not
6056 supported by backend.
6057 * internal-fn.c (expand_direct_optab_fn): Add an assert.
6058 (direct_internal_fn_supported_p): New helper function.
6059 * internal-fn.h (direct_internal_fn_supported_p): Declare.
6061 2018-10-15 Jakub Jelinek <jakub@redhat.com>
6064 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6065 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6066 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6068 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
6070 PR tree-optimization/87022
6071 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
6072 bits in dist vector rather than the first one.
6074 2018-10-15 Richard Biener <rguenther@suse.de>
6077 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
6078 (visit_loadstore): When a used restrict tag escaped verify that
6079 the points-to solution of "other" pointers do not include
6081 (compute_dependence_clique): If a used restrict tag escaped
6082 communicated that down to visit_loadstore.
6084 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
6086 * config/s390/s390.c (s390_expand_vec_init): Force vector element
6087 into reg if it isn't a general operand.
6089 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
6092 * config/i386/sse.md (*vec_dupv2di): Add register source to
6095 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
6098 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
6099 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
6100 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
6101 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
6103 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
6105 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
6106 (notice_args_size): Set it in the current trace if no insn that can
6107 throw internally has been seen yet.
6108 (connect_traces): When connecting args_size between traces, allow the
6109 incoming values not to match if there is an insn setting it before the
6110 first insn that can throw internally; in that case, force the creation
6111 of a CFI note on this latter insn.
6113 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
6115 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
6116 the base class, because using the injected-class-name was not clearly
6117 specified until DR 176.
6119 2018-10-12 Paul Koning <ni1d@arrl.net>
6121 * config/pdp11/pdp11.md (doloop_end): New expander.
6122 (doloop_end_insn): renamed from "doloop_end".
6123 (addqi3): New pattern.
6124 (subqi3): New pattern.
6125 * config/pdp11/predicates.md (incdec_operand): New predicate.
6127 2018-10-12 Yury Gribov <tetra2005@gmail.com>
6130 * real.c (format_helper::can_represent_integral_type_p): New function
6131 * real.h (format_helper::can_represent_integral_type_p): Ditto.
6132 * match.pd: New pattern.
6134 2018-10-12 Alexandre Oliva <oliva@adacore.com>
6136 * configure.ac: Introduce --enable-large-address-aware
6137 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
6138 * doc/install.texi: Document it.
6139 * configure, config.in: Rebuilt.
6140 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
6141 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
6142 (LINK_SPEC): Insert it.
6143 * config/i386/mingw-w64.h: Likewise.
6145 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
6147 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
6149 PR rtl-optimization/87600
6150 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
6152 2018-10-12 Paul Koning <ni1d@arrl.net>
6154 * doc/md.texi (doloop_end): Document that the pattern code may
6155 need to check operand mode.
6157 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
6159 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
6160 to zero-extend between int and floating-point registers.
6161 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
6162 ldp into floating-point registers. Add type and arch attributes.
6163 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
6164 Use f_loads for type attribute.
6166 2018-10-11 Martin Sebor <msebor@redhat.com>
6168 * doc/extend.texi (attribute packed): Correct typos.
6170 2018-10-11 Martin Sebor <msebor@redhat.com>
6172 * doc/extend.texi (attribute flatten): Mention interaction with
6175 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
6178 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
6179 Set new_decl virtual flag to zero.
6181 2018-10-11 Martin Sebor <msebor@redhat.com>
6184 * doc/extend.texi (attribute format_arg): Discuss using multiple
6185 attributes on a single function.
6187 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
6189 PR tree-optimization/86829
6190 * match.pd (sin (atan (x))): New simplification rules.
6191 (cos (atan (x))): Likewise.
6192 * real.c (build_sinatan_real): New function.
6193 * real.h (build_sinatan_real): Prototype.
6195 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
6197 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
6199 (fold_mergeeo_helper): New helper function.
6200 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
6201 intrinsics. Correct some whitespace indentation issues.
6203 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
6206 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
6207 Use HOST_WIDE_INT_1U for shift.
6209 2018-10-11 Doug Rupp <rupp@adacore.com>
6210 Olivier Hainque <hainque@adacore.com>
6212 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
6213 Pass --relax to the linker for RTPs.
6214 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
6216 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
6217 Jan Hubicka <jh@suse.cz>
6218 Martin Jambor <mjambor@suse.cz>
6220 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
6221 the same elements are repeated rather than printing all of them.
6222 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
6223 "repeated" elements.
6224 * read-rtl-function.c (test_loading_repeat): New function.
6225 (read_rtl_function_c_tests): Call test_loading_repeat.
6226 * rtl-tests.c (test_dumping_repeat): New function.
6227 (rtl_tests_c_tests): Call test_dumping_repeat.
6229 2018-10-11 Richard Biener <rguenther@suse.de>
6231 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
6232 bdver?_cost): Unify to ...
6233 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
6234 * config/i386/i386.c (processor_cost_table): Adjust.
6236 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
6239 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
6240 the thunk when expanding to GIMPLE.
6242 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
6244 * varasm.c (mergeable_string_section): Don't try to move zero-length
6245 strings to the merge section.
6247 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
6250 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
6252 2018-10-10 Jakub Jelinek <jakub@redhat.com>
6255 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
6256 to special_args set.
6258 2018-10-10 Richard Biener <rguenther@suse.de>
6260 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
6261 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
6262 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
6263 and recursing and pattern terminating the recursion on SSE
6264 vector width using ix86_expand_reduc.
6265 (reduc_sminmax_scal_<mode>): Split into part reducing to half
6266 width and recursing and SSE2 vector variant doing the final
6267 reduction with ix86_expand_reduc.
6268 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
6269 with terminating the recursion at AVX level, splitting that
6272 2018-10-09 David Malcolm <dmalcolm@redhat.com>
6274 * genmatch.c (error_cb): Rename to...
6275 (diagnostic_cb): ...this, converting int params to enums.
6276 (fatal_at): Update for renaming.
6277 (warning_at): Likewise.
6279 * input.c (selftest::ebcdic_execution_charset::apply):
6280 Update for renaming of...
6281 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
6283 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
6284 converting level and reason to enums.
6285 (class selftest::lexer_error_sink): Rename to...
6286 (class selftest::lexer_test_options): ...this, renaming field
6287 "m_errors" to "m_diagnostics".
6288 (selftest::lexer_test_options::apply): Update for renaming of...
6289 (selftest::lexer_test_options::on_error): ...this, renaming to...
6290 (selftest::lexer_test_options::on_diagnostic): ...this
6291 converting level and reason to enums.
6292 (selftest::test_lexer_string_locations_raw_string_unterminated):
6293 Update for renamings.
6294 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
6297 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
6299 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
6300 * config/rs6000/pmmintrin.h: New file.
6302 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
6304 PR tree-optimization/86659
6305 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6307 2018-10-09 Richard Biener <rguenther@suse.de>
6309 PR tree-optimization/63155
6310 * tree-ssa-structalias.c: Include tree-ssa.h.
6311 (get_constraint_for_ssa_var): For undefs return nothing_id.
6312 (find_func_aliases): Cleanup PHI handling.
6314 2018-10-09 Richard Biener <rguenther@suse.de>
6316 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
6319 2018-10-09 Martin Liska <mliska@suse.cz>
6321 * asan.c (asan_emit_stack_protection): If a stack variable
6322 is located in a same file as current function, then emit
6323 line info into variable definition string.
6325 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
6327 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
6330 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
6332 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
6335 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
6337 PR tree-optimization/86659
6338 * gimple-match.h (struct gimple_match_op): Add reverse field.
6339 (gimple_match_op::set_op): New overloaded method.
6340 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
6341 the REF_REVERSE_STORAGE_ORDER flag on the value.
6342 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
6343 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
6345 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
6348 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
6349 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
6351 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
6354 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
6355 Defined with __builtin_ia32_vfmaddsubpd512_mask.
6357 2018-10-08 Richard Biener <rguenther@suse.de>
6359 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
6360 cost the same as AVX128 ones.
6362 2018-10-08 Paul Koning <ni1d@arrl.net>
6364 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
6365 (expand_block_move): New function.
6366 * config/pdp11/pdp11.c (output_block_move): Remove.
6367 (expand_block_move): New function.
6368 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
6369 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
6370 (*movmemhi1): Remove.
6372 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
6374 * config/s390/2827.md: Increase latencies for some FP instructions.
6376 2018-10-08 Richard Biener <rguenther@suse.de>
6378 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
6380 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
6381 * tree-vectorizer.h (dump_stmt_cost): Adjust.
6382 (add_stmt_cost): Dump return value of the hook.
6384 2018-10-08 Richard Biener <rguenther@suse.de>
6386 PR tree-optimization/63155
6387 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
6388 (ssa_propagation_engine::ssa_propagate): Remove redundant
6389 bitmap bit clearing.
6391 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
6393 PR rtl-optimization/86939
6394 PR rtl-optimization/87479
6395 * ira.h (non_conflicting_reg_copy_p): New prototype.
6396 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
6397 (make_hard_regno_dead): Don't add conflicts for register
6398 ignore_reg_for_conflicts.
6399 (make_object_dead): Likewise.
6400 (non_conflicting_reg_copy_p): New function.
6401 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
6402 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
6403 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
6404 (make_hard_regno_dead): Don't add conflicts for register
6405 ignore_reg_for_conflicts. Remove special conflict handling of
6406 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
6407 check_pic_pseudo_p and update callers.
6408 (mark_pseudo_dead): Don't add conflicts for register
6409 ignore_reg_for_conflicts.
6410 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
6412 2018-10-05 Andrew Waterman <andrew@sifive.com>
6413 Jim Wilson <jimw@sifive.com>
6415 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
6416 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
6417 new pattern using HONOR_SNANS that emits one extra instruction.
6419 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
6421 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
6422 patterns): Merge SI and DI patterns to a GPR pattern.
6423 (unnamed define_insn and define_split for record form of that): Merge
6424 to a single define_insn_and_split pattern.
6426 2018-10-05 David Malcolm <dmalcolm@redhat.com>
6429 * input.c (expand_location_to_spelling_point): Add param "aspect"
6430 and use rather than hardcoding LOCATION_ASPECT_CARET.
6431 (get_substring_ranges_for_loc): Handle the case of a single token
6432 within a macro expansion.
6433 * input.h (expand_location_to_spelling_point): Add "aspect" param,
6434 defaulting to LOCATION_ASPECT_CARET.
6436 2018-10-05 Paul Koning <ni1d@arrl.net>
6438 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
6439 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
6440 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
6441 (pdp11_guard_type): New function.
6443 2018-10-05 Paul Koning <ni1d@arrl.net>
6445 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
6446 * config/pdp11/pdp11.opt (mfloat32): Remove.
6448 * doc/invoke.texi (pdp11 -mfloat32): Remove:
6449 (pdp11 -mfloat64): Remove.
6451 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6453 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
6454 (*cmp<mode>_cc_i387): Ditto.
6455 (*cmpu<mode>_cc_i387): Ditto.
6456 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6457 * config/i386/i386.c (ix86_expand_fp_compare): Remove
6459 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
6460 Emit x86_sahf_1 pattern.
6461 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
6462 (ix86_expand_carry_flag_compare): Ditto.
6464 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6466 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
6467 to reg_or_0_operand. Add "C" constraint.
6468 (*cmpxf_cc_i387): Ditto.
6469 (*cmp<mode>_i387): Change operand 2 predicate
6470 to nonimm_or_0_operand. Add "C" constraint.
6471 (*cmp<mode>_cc_i387): Ditto.
6472 (*cmp<mode>_0_i387): Remove insn pattern.
6473 (*cmp<mode>_0_cc_i387): Ditto.
6475 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6477 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
6478 * config/i386/predicates.md (nonimm_or_0_operand): Rename
6479 from vector_move_operand. Update all uses.
6481 2018-10-05 Martin Sebor <msebor@redhat.com>
6483 PR tree-optimization/87490
6484 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
6487 2018-10-05 Richard Biener <rguenther@suse.de>
6489 PR tree-optimization/63155
6490 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
6491 vertical space in dumpfiles.
6492 * tree-ssa-propagate.h
6493 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
6494 * tree-ssa-propagate.c (cfg_blocks_back): New global.
6495 (ssa_edge_worklist_back): Likewise.
6496 (curr_order): Likewise.
6497 (cfg_blocks_get): Remove abstraction.
6498 (cfg_blocks_add): Likewise.
6499 (cfg_blocks_empty_p): Likewise.
6500 (add_ssa_edge): Add to current or next worklist based on
6502 (add_control_edge): Likewise.
6503 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
6505 (ssa_propagation_engine::ssa_propagate): ... here. Unify
6506 iteration from CFG and SSA edge worklist so we process
6507 everything in RPO order, prioritizing forward progress
6509 (ssa_prop_init): Allocate new worklists, do not dump
6511 (ssa_prop_fini): Free new worklists.
6513 2018-10-05 Richard Biener <rguenther@suse.de>
6515 * tree-core.h (tree_block::abstract_flag): Remove.
6516 (tree_block::block_num): Make full 32bits.
6517 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
6518 * tree.h (BLOCK_ABSTRACT): Remove.
6519 * dwarf2out.c (gen_lexical_block_die): Remove dead code
6520 resulting from BLOCK_ABSTRACT being always false.
6521 (gen_inlined_subroutine_die): Likewise.
6522 (gen_block_die): Likewise.
6523 * tree.c (block_ultimate_origin): Likewise.
6524 * tree-pretty-print.c (dump_block_node): Remove code dealing
6525 with BLOCK_ABSTRACT.
6526 * tree-ssa-live.c (dump_scope_block): Likewise.
6527 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
6528 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
6530 2018-10-05 Richard Biener <rguenther@suse.de>
6532 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
6533 is asked for initialize mode to the component mode of the
6536 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
6539 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
6540 assembler for -mavx.
6541 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
6543 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
6546 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
6548 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
6549 to be DImode. When using mffscrn, force the operand to a register.
6551 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
6553 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
6554 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
6555 X87MODEF mode iterator.
6556 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
6557 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
6558 X87MODEF mode iterator.
6560 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
6562 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
6563 -Wno-prio-ctor-dtor.
6565 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6567 * Makefile.in (OBJS): Add opt-problem.o.
6568 * dump-context.h: Include "selftest.h.
6569 (selftest::temp_dump_context): New forward decl.
6570 (class dump_context): Make friend of class
6571 selftest::temp_dump_context.
6572 (dump_context::dump_loc_immediate): New decl.
6573 (class dump_pretty_printer): Move here from dumpfile.c.
6574 (class temp_dump_context): Move to namespace selftest.
6575 (temp_dump_context::temp_dump_context): Add param
6576 "forcibly_enable_dumping".
6577 (selftest::verify_dumped_text):
6578 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
6579 (selftest::verify_item):
6580 (ASSERT_IS_TEXT): Move here from dumpfile.c.
6581 (ASSERT_IS_TREE): Likewise.
6582 (ASSERT_IS_GIMPLE): Likewise.
6583 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
6585 (dump_context::dump_loc_immediate): ...this new function.
6586 (class dump_pretty_printer): Move to dump-context.h.
6587 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
6588 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
6589 (temp_dump_context::temp_dump_context): Move to "selftest"
6590 namespace. Add param "forcibly_enable_dumping", and use it to
6591 conditionalize the use of m_pp;
6592 (selftest::verify_dumped_text): Make non-static.
6593 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
6594 (selftest::verify_item): Make non-static.
6595 (ASSERT_IS_TEXT): Move to dump-context.h.
6596 (ASSERT_IS_TREE): Likewise.
6597 (ASSERT_IS_GIMPLE): Likewise.
6598 (selftest::test_capture_of_dump_calls): Pass "true" for new
6599 param of temp_dump_context.
6600 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
6601 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
6603 * opt-problem.cc: New file.
6604 * opt-problem.h: New file.
6605 * optinfo-emit-json.cc
6606 (selftest::test_building_json_from_dump_calls): Pass "true" for
6607 new param of temp_dump_context.
6608 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
6609 (optinfo::emit_for_opt_problem): New function.
6610 (optinfo::emit): Clarity which emit_item is used.
6611 * optinfo.h (optinfo::get_dump_location): New accessor.
6612 (optinfo::emit_for_opt_problem): New decl.
6613 (optinfo::emit): Make const.
6614 * selftest-run-tests.c (selftest::run_tests): Call
6615 selftest::opt_problem_cc_tests.
6616 * selftest.h (selftest::opt_problem_cc_tests): New decl.
6617 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
6618 bool to opt_result, converting fprintf messages to
6619 opt_result::failure_at calls. Add "stmt" param for use by the
6621 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
6622 (runtime_alias_check_p): Convert return type from bool to
6623 opt_result, converting dump_printf calls to
6624 opt_result::failure_at, using the statement DDR_A for their
6626 (find_data_references_in_stmt): Convert return type from bool to
6627 opt_result, converting "return false" to opt_result::failure_at
6629 * tree-data-ref.h: Include "opt-problem.h".
6630 (dr_analyze_innermost): Convert return type from bool to opt_result,
6631 and add a const gimple * param.
6632 (find_data_references_in_stmt): Convert return type from bool to
6634 (runtime_alias_check_p): Likewise.
6635 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
6636 dr_analyze_innermost.
6637 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
6638 Convert return type from bool to opt_result, adding a message for
6639 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
6640 (vect_analyze_data_ref_dependence): Convert return type from bool
6641 to opt_result. Change sense of return type from "false"
6642 effectively meaning "no problems" to "false" meaning a problem,
6643 so that "return false" becomes "return opt_result::success".
6644 Convert "return true" calls to opt_result::failure_at, using
6645 the location of statement A rather than vect_location.
6646 (vect_analyze_data_ref_dependences): Convert return type from bool
6648 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
6649 calls to opt_result::failure_at, using the stmt location rather
6651 (vect_verify_datarefs_alignment): Convert return type from bool
6653 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
6654 into multiple more-tightly-scoped copies.
6655 (vect_analyze_data_refs_alignment): Convert return type from bool
6657 (vect_analyze_data_ref_accesses): Likewise, converting a
6658 "return false" to a "return opt_result::failure_at", adding a
6660 (vect_prune_runtime_alias_test_list): Convert return type from
6661 bool to opt_result, converting dump_printf_loc to
6662 opt_result::failure_at. Add a %G to show the pertinent statement,
6663 and use the stmt's location rather than vect_location.
6664 (vect_find_stmt_data_reference): Convert return type from
6665 bool to opt_result, converting dump_printf_loc to
6666 opt_result::failure_at, using stmt's location.
6667 (vect_analyze_data_refs): Convert return type from bool to
6668 opt_result. Convert "return false" to "return
6669 opt_result::failure_at", adding messages as needed.
6670 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
6671 type from bool to opt_result.
6672 (vect_determine_vf_for_stmt): Likewise.
6673 (vect_determine_vectorization_factor): Likewise, converting
6674 dump_printf_loc to opt_result::failure_at, using location of phi
6675 rather than vect_location.
6676 (vect_analyze_loop_form_1): Convert return type from bool to
6677 opt_result, converting dump_printf_loc calls, retaining the use of
6679 (vect_analyze_loop_form): Convert return type from loop_vec_info
6680 to opt_loop_vec_info.
6681 (vect_analyze_loop_operations): Convert return type from bool to
6682 opt_result, converting dump_printf_loc calls, using the location
6683 of phi/stmt rather than vect_location where available. Convert
6684 various "return false" to "return opt_result::failure_at" with
6685 "unsupported phi" messages.
6686 (vect_get_datarefs_in_loop): Convert return type from bool to
6687 opt_result. Add a message for the
6688 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
6689 (vect_analyze_loop_2): Convert return type from bool to
6690 opt_result. Ensure "ok" is set to a opt_result::failure_at before
6691 each "goto again;", adding new messages where needed.
6692 Add "unsupported grouped {store|load}" messages.
6693 (vect_analyze_loop): Convert return type from loop_vec_info to
6695 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
6697 * tree-vect-stmts.c (process_use): Likewise, converting
6698 dump_printf_loc call and using stmt location, rather than
6700 (vect_mark_stmts_to_be_vectorized): Likeise.
6701 (vect_analyze_stmt): Likewise, adding a %G.
6702 (vect_get_vector_types_for_stmt): Convert return type from bool to
6703 opt_result, converting dump_printf_loc calls and using stmt
6704 location, rather than vect_location.
6705 (vect_get_mask_type_for_stmt): Convert return type from tree to
6706 opt_tree, converting dump_printf_loc calls and using stmt location.
6707 * tree-vectorizer.c: Include "opt-problem.h.
6708 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
6709 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
6710 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
6711 enabled, use it to report at the top level "couldn't vectorize
6712 loop" followed by the problem.
6713 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
6714 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
6716 (vect_analyze_stmt): Likewise.
6717 (vect_get_vector_types_for_stmt): Likewise.
6718 (tree vect_get_mask_type_for_stmt): Likewise.
6719 (vect_analyze_data_ref_dependences): Likewise.
6720 (vect_enhance_data_refs_alignment): Likewise.
6721 (vect_analyze_data_refs_alignment): Likewise.
6722 (vect_verify_datarefs_alignment): Likewise.
6723 (vect_analyze_data_ref_accesses): Likewise.
6724 (vect_prune_runtime_alias_test_list): Likewise.
6725 (vect_find_stmt_data_reference): Likewise.
6726 (vect_analyze_data_refs): Likewise.
6727 (vect_analyze_loop): Convert return type from loop_vec_info to
6729 (vect_analyze_loop_form): Likewise.
6730 (vect_analyze_slp): Convert return type from bool to opt_result.
6732 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6734 * doc/invoke.texi (-fopt-info): Document new "internals"
6736 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
6737 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
6739 (optinfo_verbosity_options): Add "internals".
6740 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
6741 (dump_context::apply_dump_filter_p): New member function.
6742 (dump_context::dump_loc): Use apply_dump_filter_p rather than
6743 explicitly masking the dump_kind.
6744 (dump_context::begin_scope): Increment the scope depth first. Use
6745 apply_dump_filter_p rather than explicitly masking the dump_kind.
6746 (dump_context::emit_item): Use apply_dump_filter_p rather than
6747 explicitly masking the dump_kind.
6748 (dump_dec): Likewise.
6749 (dump_hex): Likewise.
6750 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
6751 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
6752 (opt_info_switch_p): Update handling of default
6753 MSG_OPTIMIZED_LOCATIONS to cope with default of
6754 MSG_PRIORITY_USER_FACING.
6755 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
6756 masking the dump_kind.
6757 (selftest::test_capture_of_dump_calls): Update test_dump_context
6758 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
6759 than MSG_ALL. Generalize scope test to be run at all four
6760 combinations of with/without MSG_PRIORITY_USER_FACING and
6761 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
6762 for each of the two values.
6763 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
6764 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
6765 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
6766 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
6767 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
6768 with MSG_PRIORITY_*.
6769 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
6770 dump messages as MSG_PRIORITY_USER_FACING.
6771 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
6772 about the interaction with MSG_PRIORITY_*.
6774 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6776 * varasm.c (output_constant): Add new parameter merge_strings.
6777 Make strings properly zero terminated in merge string sections.
6778 (mergeable_string_section): Don't fail if the last char is non-zero.
6779 (assemble_variable_contents): Handle merge string sections.
6780 (assemble_variable): Likewise.
6781 (assemble_constant_contents): Likewise.
6782 (output_constant_def_contents): Likewise.
6783 (output_constructor_array_range,
6784 output_constructor_regular_field): Adjust call to output_constant.
6785 (output_object_block): Adjust call to assemble_constant_contents
6786 and assemble_variable_contents.
6788 2018-10-04 Martin Liska <mliska@suse.cz>
6791 * cgraphunit.c (process_function_and_variable_attributes):
6792 Warn about a function with alias attribute and a body.
6794 2018-10-04 Martin Liska <mliska@suse.cz>
6797 * multiple_target.c (redirect_to_specific_clone): New function.
6798 (ipa_target_clone): Use it.
6799 * tree-inline.c: Fix comment.
6801 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6803 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
6805 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
6806 (gcc::dump_manager::register_pass): New member function, adapted
6807 from loop body in gcc::pass_manager::register_pass, adding a
6808 call to update_dfi_for_opt_info.
6809 (gcc::dump_manager::opt_info_enable_passes): Store the
6810 -fopt-info options into the new fields. Move the loop
6812 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
6814 * dumpfile.h (struct opt_pass): New forward decl.
6815 (gcc::dump_manager::register_pass): New decl.
6816 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
6817 (class gcc::dump_manager): Add fields "m_optgroup_flags",
6818 "m_optinfo_flags", and "m_optinfo_filename".
6819 * passes.c (gcc::pass_manager::register_pass): Move all of the
6820 dump-handling code to gcc::dump_manager::register_pass.
6822 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
6824 PR rtl-optimization/87466
6825 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
6826 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
6827 * doc/tm.texi: Regenerate.
6828 * ira-lives.c (process_bb_node_lives): Use the new target hook.
6829 * lra-lives.c (process_bb_lives): Likewise.
6830 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
6833 2018-10-04 Tamar Christina <tamar.christina@arm.com>
6835 * params.c (add_params): Fix initialization.
6837 2018-10-04 Martin Liska <mliska@suse.cz>
6839 PR gcov-profile/84107
6840 * tree-profile.c (init_ic_make_global_vars):
6841 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6842 Come up with new ic_tuple* variables. Emit
6843 __gcov_indirect_call{,_topn} variables.
6844 (gimple_gen_ic_profiler): Access the variable
6846 (gimple_gen_ic_func_profiler): Access
6847 __gcov_indirect_call.callee field.
6848 (gimple_init_gcov_profiler): Use ptr_type_node.
6849 * value-prof.c (gimple_ic): Use ptr_type_node.
6851 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6853 PR tree-optimization/85787
6854 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
6855 malloc_candidate_p into this function and add support for
6856 detecting multiple phis.
6857 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
6859 2018-10-04 Martin Liska <mliska@suse.cz>
6862 * ipa-inline.c (inline_to_all_callers_1):
6863 Call ultimate_alias_target for node being inlined.
6865 2018-10-03 Jeff Law <law@redhat.com>
6867 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
6869 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
6870 * tree.h (get_typenode_from_name): Prototype.
6872 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6874 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6875 Change operand 2 predicate to nonimmediate_operand.
6876 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6878 2018-10-03 Martin Sebor <msebor@redhat.com>
6879 Jeff Law <law@redhat.com>
6881 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
6883 (get_string_length): Detect unterminated arrays.
6884 (format_string): Same.
6885 (format_directive): Warn about unterminated arrays.
6886 (handle_gimple_call): Mark statements with no_warning as needed.
6888 2018-10-03 Jim Wilson <jimw@sifive.com>
6890 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
6891 also define __riscv_abi_rve. Delete trailing white space.
6893 2018-10-03 Paul Koning <ni1d@arrl.net>
6895 Enable LRA register allocator for PDP11.
6896 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
6899 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
6900 * config/pdp11/pdp11.opt (-mlra): New option.
6901 * doc/invoke.texi (PDP-11 Options): Document -mlra.
6903 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6905 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6906 (*<absneg:code>extend<mode>xf2): Ditto.
6908 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6910 PR tree-optimization/87415
6911 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6914 2018-10-02 Jeff Law <law@redhat.com>
6916 * gimple-fold.c (get_range_strlen): Only set *nonstr when
6917 an unterminated string is discovered. Bubble up range
6918 even for unterminated strings.
6919 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6920 indicates the string was not terminated via NONSTR.
6922 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6924 * tree-vrp.c (extract_range_from_unary_expr): Special case all
6925 pointer conversions.
6926 Do not do anything special for anti-ranges.
6928 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
6930 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6931 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6933 2018-10-03 Martin Liska <mliska@suse.cz>
6935 PR gcov-profile/86109
6936 * coverage.c (coverage_begin_function): Do not
6937 mark lambdas as artificial.
6938 * tree-core.h (struct GTY): Remove tm_clone_flag
6939 and introduce new lambda_function.
6940 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6942 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6945 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6946 P8_VECTOR and VSX are enabled.
6948 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6950 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6951 0x3907 as CPU model number.
6953 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6955 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6956 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6957 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6958 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6959 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6960 * config/s390/s390.md: Likewise. Rename also the cpu attribute
6961 value from arch12 to z14.
6963 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6965 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6967 (isinf<mode>2): Ditto.
6969 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6971 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6972 before emitting fxam. Perform calculations in XFmode.
6974 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6976 * match.pd (((X /[ex] A) +- B) * A): New transformation.
6978 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6981 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6982 * tree.c (signed_or_unsigned_type_for): Handle complex.
6984 2018-10-02 Jeff Law <law@redhat.com>
6986 * gimple-fold.c (get_range_strlen): Remove dead code.
6988 2018-10-02 Martin Sebor <msebor@redhat.com>
6989 Jeff Law <law@redhat.com>
6991 * builtins.c (unterminated_array): Add new arguments.
6992 If argument is not terminated, bubble up size and exact
6994 (expand_builtin_strnlen): Detect, avoid expanding
6995 and diagnose unterminated arrays.
6996 (c_strlen): Fill in offset of start of unterminated strings.
6997 * builtins.h (unterminated_array): Update prototype.
6999 2018-10-02 Richard Biener <rguenther@suse.de>
7001 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
7002 of haddv4df, first reduce to SSE width and exploit the fact
7003 that we only need element zero with the reduction result.
7004 (reduc_plus_scal_v2df): Likewise.
7006 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
7008 * dojump.h (do_jump): Delete.
7009 (do_jump_1): Likewise.
7010 (split_comparison): Move around.
7011 * dojump.c (do_jump): Make static.
7012 (do_jump_1): Likewise.
7013 (jumpifnot): Move around.
7014 (jumpifnot_1): Likewise.
7016 (jumpif_1): Likewise.
7017 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
7019 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
7021 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
7022 insns in the delay slot and add_insn_after for the jump insn.
7024 2018-10-02 Richard Biener <rguenther@suse.de>
7026 * tree-inline.c (expand_call_inline): Use the location of
7027 the callee declaration for the inline-entry marker.
7028 * final.c (notice_source_line): Remove special-casing of
7029 NOTE_INSN_INLINE_ENTRY.
7031 2018-10-01 Carl Love <cel@us.ibm.com>
7034 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
7035 (__builtin_mtfsb0): New.
7036 (__builtin_mtfsb1): New.
7037 ( __builtin_set_fpscr_rn): New.
7038 (__builtin_set_fpscr_drn): New.
7039 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
7040 (rs6000_expand_set_fpscr_rn_builtin): Add.
7041 (rs6000_expand_set_fpscr_drn_builtin): Add.
7042 (rs6000_expand_builtin): Add case statement entries for
7043 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
7044 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
7045 RS6000_BUILTIN_MFFSL.
7046 (rs6000_init_builtins): Add ftype initialization and def_builtin
7047 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
7048 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
7049 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
7050 rs6000_mffscdrn): Add define_insn.
7051 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
7052 * doc/extend.texi: Add documentation for the builtins.
7054 2018-10-01 Richard Biener <rguenther@suse.de>
7056 PR tree-optimization/87465
7057 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
7058 causing branch miscounts.
7060 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7062 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
7063 aarch64_option_default_param): New.
7064 (params.h): Include.
7065 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
7066 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
7067 stack-clash protection validation code.
7069 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7071 * params.c (validate_param): New.
7072 (add_params): Use it.
7073 (set_param_value): Refactor param validation into validate_param.
7074 (diagnostic.h): Include.
7075 * diagnostic.h (diagnostic_ready_p): New.
7077 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7079 * params.c (set_param_value):
7080 Add index of parameter being validated.
7081 * common/common-target.def (option_validate_param): New.
7082 * common/common-targhooks.h (default_option_validate_param): New.
7083 * common/common-targhooks.c (default_option_validate_param): New.
7084 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
7085 * doc/tm.texi: Regenerate.
7087 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7090 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7091 Add validation for stack-clash parameters and set defaults.
7093 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7096 * configure.ac: Add stack-clash-protection-guard-size.
7097 * doc/install.texi: Document it.
7098 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
7099 * params.def: Update comment for guard-size.
7100 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
7101 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
7102 * configure: Regenerate.
7104 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7107 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
7108 STACK_DYNAMIC_OFFSET): New.
7109 * config/aarch64/aarch64.c (aarch64_layout_frame):
7110 Update outgoing args size.
7111 (aarch64_stack_clash_protection_alloca_probe_range,
7112 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7114 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7117 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
7119 * target.def (stack_clash_protection_alloca_probe_range): New.
7120 (stack_clash_protection_final_dynamic_probe): Remove.
7121 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
7122 (default_stack_clash_protection_final_dynamic_probe): Remove.
7123 * targhooks.c: Likewise.
7124 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
7125 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
7126 * doc/tm.texi: Regenerate.
7128 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7131 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
7132 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
7133 aarch64_clamp_to_uimm12_shift): New.
7134 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
7135 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
7137 2018-10-01 Tamar Christina <tamar.christina@arm.com>
7140 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
7142 2018-10-01 Jeff Law <law@redhat.com>
7143 Richard Sandiford <richard.sandiford@linaro.org>
7144 Tamar Christina <tamar.christina@arm.com>
7147 * config/aarch64/aarch64.md
7148 (probe_stack_range): Add k (SP) constraint.
7149 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
7150 STACK_CLASH_MAX_UNROLL_PAGES): New.
7151 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
7152 stack probes for stack clash.
7153 (aarch64_allocate_and_probe_stack_space): New.
7154 (aarch64_expand_prologue): Use it.
7155 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
7156 (aarch64_sub_sp): Add emit_move_imm optional param.
7158 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
7160 PR tree-optimization/87261
7161 * match.pd: Remove trailing whitespace.
7162 Add (x & y) | ~(x | y) -> ~(x ^ y),
7163 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
7165 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
7167 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
7169 (ashlsi3_insn): Update instruction constraints.
7170 (ashrsi3_insn): Likewise.
7171 (rotrsi3): Likewise.
7172 (add_shift): Likewise.
7173 * config/arc/constraints.md (Csz): New 32 bit constraint. It
7174 avoids placing in the limm field small constants which, otherwise,
7175 could end into a small instruction.
7177 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
7179 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
7180 destination register is not odd-even.
7181 (umaddsidi4_split): Likewise.
7183 2018-10-01 Richard Biener <rguenther@suse.de>
7185 * tree-inline.c (expand_call_inline): Store origin of fn
7186 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
7187 * tree.c (block_ultimate_origin): Simplify and do some
7190 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
7192 * config/i386/mmx.md (EMMS): New int iterator.
7193 (emms): New int attribute.
7194 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
7195 EMMS int iterator. Explicitly declare clobbers.
7196 (mmx_emms): Remove expander.
7198 * config/i386/predicates.md (emms_operation): Remove predicate.
7199 (vzeroall_pattern): New predicate.
7200 (vzeroupper_pattern): Rename from vzeroupper_operation.
7201 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
7202 vzeroupper_pattern and vzeroall_pattern predicates.
7204 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
7206 PR rtl-optimization/86939
7207 * ira-lives.c (make_hard_regno_born): Rename from this...
7208 (make_hard_regno_live): ... to this. Remove update to conflict
7209 information. Update function comment.
7210 (make_hard_regno_dead): Add conflict information update. Update
7212 (make_object_born): Rename from this...
7213 (make_object_live): ... to this. Remove update to conflict information.
7214 Update function comment.
7215 (make_object_dead): Add conflict information update. Update function
7217 (mark_pseudo_regno_live): Call make_object_live.
7218 (mark_pseudo_regno_subword_live): Likewise.
7219 (mark_hard_reg_dead): Update function comment.
7220 (mark_hard_reg_live): Call make_hard_regno_live.
7221 (process_bb_node_lives): Likewise.
7222 * lra-lives.c (make_hard_regno_born): Rename from this...
7223 (make_hard_regno_live): ... to this. Remove update to conflict
7224 information. Remove now uneeded check_pic_pseudo_p argument.
7225 Update function comment.
7226 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
7227 to conflict information. Update function comment.
7228 (mark_pseudo_live): Remove update to conflict information. Update
7230 (mark_pseudo_dead): Add conflict information update.
7231 (mark_regno_live): Call make_hard_regno_live.
7232 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
7233 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
7235 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
7238 * config/i386/i386.c (construct_container): Use TImode for
7239 BLKmode values in 2 integer registers.
7241 2018-09-29 Jeff Law <law@redhat.com>
7243 * builtins.c (unterminated_array): Pass in c_strlen_data * to
7244 c_strlen rather than just a tree *.
7245 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
7246 Update recursive calls appropriately. If caller did not provide a
7247 suitable data pointer, create a local one. When a non-terminated
7248 string is discovered, bubble up information about the string via the
7249 c_strlen_data object.
7250 * builtins.h (c_strlen): Update prototype.
7251 (c_strlen_data): New structure.
7252 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
7253 For a type 2 call, if c_strlen indicates a non-terminated string
7254 use the length of the non-terminated string.
7255 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
7257 2018-09-29 Jakub Jelinek <jakub@redhat.com>
7260 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
7261 __m512d type for __A argument rather than __m512.
7263 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
7265 * match.pd (simple_comparison): Don't optimize if either operand is
7266 a function pointer when target needs function pointer canonicalization.
7268 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7270 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
7271 power5 .. power9 to remove indirection.
7272 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
7273 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
7274 ASM_CPU_476_SPEC): Delete.
7275 (ASM_CPU_SPEC): Adjust.
7276 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
7277 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
7279 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7281 * config.in: Delete HAVE_AS_DCI.
7282 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
7283 * config/rs6000/rs6000.h: Ditto.
7284 * configure.ac: Delete HAVE_AS_DCI.
7285 * configure: Regenerate.
7287 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
7289 * config.in (HAVE_AS_LWSYNC): Delete.
7290 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7291 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
7293 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
7294 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
7296 * configure.ac: Delete HAVE_AS_LWSYNC.
7297 * configure: Regenerate.
7299 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
7300 Pierre-Marie de Rodat <derodat@adacore.com>
7302 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
7303 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
7304 (cgraph_node::create_thunk): Add indirect_offset parameter.
7305 (thunk_adjust): Likewise.
7306 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
7307 and initialize the corresponding field with it.
7308 (cgraph_node::dump): Dump indirect_offset field.
7309 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
7310 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
7311 (thunk_adjust): Add indirect_offset parameter and deal with it.
7312 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
7313 pass it to thunk_adjust. Do not call the target hook if it's non-zero
7314 or if the thunk is external or local. Fix formatting. Do not chain
7315 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
7316 if any, in the GIMPLE representation.
7317 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
7318 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
7319 (input_node): Read indirect_offset field.
7320 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
7321 call to thunk_adjust.
7322 * tree-nested.c (struct nesting_info): Add thunk_p field.
7323 (create_nesting_tree): Set it.
7324 (convert_all_function_calls): Copy static chain from targets to thunks.
7325 (finalize_nesting_tree_1): Return early for thunks.
7326 (unnest_nesting_tree_1): Do not finalize thunks.
7327 (gimplify_all_functions): Do not gimplify thunks.
7329 2018-09-28 David Malcolm <dmalcolm@redhat.com>
7331 * opt-suggestions.c (option_proposer::build_option_suggestions):
7332 Release "option_values".
7334 2018-09-28 David Malcolm <dmalcolm@redhat.com>
7336 * coverage.c (get_coverage_counts): Convert problem-reporting dump
7337 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
7338 * dumpfile.c (kind_as_string): New function.
7339 (dump_loc): Rather than a hardcoded prefix of "note: ", use
7340 kind_as_string to vary the prefix based on dump_kind.
7341 (selftest::test_capture_of_dump_calls): Update for above.
7343 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
7345 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
7346 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
7348 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
7350 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
7351 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
7352 INVALID_REGNUM instead of FPSR_REG.
7353 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
7354 * config/i386/i386.md: Update comment of FP compares.
7355 (fldenv): Do not clobber FPSR_REG.
7357 2018-09-28 Richard Biener <rguenther@suse.de>
7359 * tree.h (BLOCK_ORIGIN): New.
7360 * omp-expand.c (grid_expand_target_grid_body): Assign
7361 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
7362 * tree-inline.c (remap_block): Likewise.
7363 * auto-profile.c (get_function_decl_from_block): Simplify
7364 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
7365 * langhooks.c (lhd_print_error_function): Likewise.
7366 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
7368 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7369 * tree.c (block_nonartificial_location): Likewise.
7370 (block_ultimate_origin): Likewise.
7371 * tree-pretty-print.c (percent_K_format): Likewise. Remove
7372 no longer needed LTO case.
7374 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
7375 Jan Hubicka <jh@suse.cz>
7376 Martin Jambor <mjambor@suse.cz>
7378 * simplify-rtx.c (simplify_merge_mask): New function.
7379 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
7380 same masks are used in op1 or op2.
7381 (test_vec_merge): New function.
7382 (test_vector_ops): Call test_vec_merge.
7384 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
7386 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
7387 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
7388 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
7389 (cypress_costs): Set it.
7390 (supersparc_costs): Likewise.
7391 (hypersparc_costs): Likewise.
7392 (leon_cost): Likewise.
7393 (leon3_costs): Likewise.
7394 (sparclet_costs): Likewise.
7395 (ultrasparc_costs): Likewise.
7396 (ultrasparc_costs): Likewise.
7397 (niagara_costs): Likewise.
7398 (niagara2_costs): Likewise.
7399 (niagara3_costs): Likewise.
7400 (niagara4_costs): Likewise.
7401 (niagara7_costs): Likewise.
7402 (m8_costs): Likewise.
7403 (TARGET_CAN_FOLLOW_JUMP): Define.
7404 (pass_work_around_errata::gate): Minor tweak.
7405 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
7406 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
7407 Automaitcally clear MASK_FSMULD mask for V7 processors.
7408 (sparc_can_follow_jump): New static function.
7409 (output_ubranch): Deal with CROSSING_JUMP_P.
7410 (sparc_use_sched_lookahead): Rewrite using switch statement.
7411 (sparc_issue_rate): Reorder.
7412 (sparc_branch_cost): New function.
7414 2018-09-27 Martin Sebor <msebor@redhat.com>
7416 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
7417 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
7418 (int_fits_type_p): Same.
7420 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
7422 * config/i386/i386.md (FPCR_REG): Remove.
7423 (UNSPEC_FLDCW): Remove.
7424 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
7425 (x86_fldcw_1): Remove insn pattern.
7426 (fnstenv): Do not clobber FPCR_REG.
7428 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
7429 (CALL_USED_REGISTERS): Ditto.
7430 (REG_ALLOC_ORDER): Ditto.
7431 (REG_CLASS_CONTENTS): Ditto.
7432 (HI_REGISTER_NAMES): Ditto.
7433 (ADDITIONAL_REGISTER_NAMES): Use defines instead
7434 of numerical constants.
7435 * config/i386/i386.c (regclass_map): Remove fpsr register.
7436 (dbx_register_map): Ditto.
7437 (dbx64_register_map): Ditto.
7438 (svr4_dbx_register_map): Ditto.
7439 (print_reg): Do not handle FPCR_REG.
7441 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
7444 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
7445 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
7446 Delete, always treat as true.
7447 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7448 Ditto. Simplify remaining code.
7449 * config/powerpcspe/powerpcspe.h: Ditto.
7450 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
7451 Simplify remaining code.
7452 (rs6000_expand_builtin): Ditto.
7453 * config/rs6000/rs6000.h: Ditto.
7454 * configure.ac: Ditto.
7455 * configure: Regenerate.
7457 2018-09-27 Martin Liska <mliska@suse.cz>
7459 * coverage.c (get_coverage_counts): Revert the formatting
7460 of missing profile opt info.
7462 2018-09-27 Richard Biener <rguenther@suse.de>
7466 * dwarf2out.c (set_block_origin_self): Do not mark outermost
7467 block as we do not output that.
7468 (gen_inlined_subroutine_die): Elide the originally outermost
7469 block, matching what we do for concrete instances.
7470 (decls_for_scope): Add parameter specifying whether to recurse
7473 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
7474 Tom de Vries <tom@codesourcery.com>
7478 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
7479 STORE_FLAG_VALUE == 1.
7481 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
7483 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
7484 constant definitions.
7485 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
7486 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
7487 ("speculation_barrier"): New expander definition.
7489 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
7491 PR gcov-profile/86957
7492 * common.opt: New warning option -Wmissing-profile.
7493 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
7494 * doc/invoke.texi: Document -Wmissing-profile.
7496 2018-09-26 Jim Wilson <jimw@sifive.com>
7498 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
7499 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
7501 2018-09-26 Martin Sebor <msebor@redhat.com>
7503 * tree.c (zerop): Change return type to bool.
7504 (integer_zerop, integer_onep, integer_each_onep): Same.
7505 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7506 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7507 (real_onep, real_minus_onep, chain_index): Same.
7508 (print_type_hash_statistics, type_list_equal): Same.
7509 * tree.h (zerop): Same.
7510 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
7511 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7512 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7513 (real_onep, real_minus_onep, chain_index): Same.
7514 (print_type_hash_statistics, type_list_equal): Same.
7516 2018-09-26 Jim Wilson <jimw@sifive.com>
7518 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
7520 2018-09-26 Jakub Jelinek <jakub@redhat.com>
7523 * config/i386/i386.c: Include debug.h and dwarf2out.h.
7524 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
7527 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
7529 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
7531 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
7533 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
7534 and FP_SECOND_SSE_REGS.
7535 (REG_CLASS_NAMES): Ditto.
7536 (REG_CLASS_CONTENTS): Ditto.
7537 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
7538 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
7539 (ix86_preferred_output_reload_class): Ditto.
7540 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
7541 clobber constraint to "=&f".
7542 (fix_truncdi_i387): Ditto.
7543 (lrintxfdi2): Ditto.
7544 (fistdi2_<rounding>): Ditto.
7545 (fpremxf4_i387): Change "=u" constraint to "=f".
7546 (fprem1xf4_i387): Ditto.
7548 (fptanxf4_i387): Ditto.
7549 (fxtractxf3_i387): Ditto.
7550 (fscalexf4_i387): Ditto.
7551 (atan2xf3): Change "u" constraint to "f".
7552 (fyl2xxf3_i387): Ditto.
7553 (fyl2xp1xf3_i387): Ditto.
7555 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
7558 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
7559 for removed I387_MASK_PM entity.
7562 2018-09-26 Jeff Law <law@redhat.com>
7564 2018-09-26 Alexey Neyman <stilor@att.net>
7566 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7567 headers are no longer pulled in by <isl/val.h>.
7569 2018-09-26 Richard Biener <rguenther@suse.de>
7572 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
7573 or concrete instance DIE to the tree. Create abstract origin
7574 attributes also for concrete instances.
7576 2018-09-26 Alexey Neyman <stilor@att.net>
7578 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7579 headers are no longer pulled in by <isl/val.h>.
7581 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
7583 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
7584 Use new helper functions.
7585 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
7586 Use new helper functions.
7587 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
7588 aarch_mm_needs_release): New declarations.
7589 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
7590 aarch_mm_needs_release): New.
7592 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
7594 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
7595 (arm32_output_mi_thunk): Deal with long calls.
7597 2018-09-26 Richard Biener <rguenther@suse.de>
7601 * tree-inline.c (expand_call_inline): When the location
7602 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
7603 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
7604 the inserted BLOCK to make inlined_function_outer_scope_p
7606 * dwarf2out.c (add_call_src_coords_attributes): Do not add
7607 coords for reserved locations.
7609 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7611 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
7612 (*call_indirect_nonlocal_sysv<mode>): Ditto.
7613 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
7614 (*sibcall_nonlocal_sysv<mode>): Ditto.
7615 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
7616 (<bd>_<mode>): Ditto.
7617 (<bd>tf_<mode>): Ditto.
7619 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7621 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
7622 control string as a list of templates instead of as C code.
7623 (*altivec_movti): Ditto.
7624 * config/rs6000/darwin.md (movdf_low_di): Ditto.
7626 2018-09-25 Jim Wilson <jimw@sifive.com>
7628 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
7629 when target symbol is weak.
7631 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
7634 * builtins.c (unterminated_array): Simplify.
7635 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
7636 where pointer arithmetic is safe.
7638 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7641 * config/rs6000/altivec.md (altivec_vspltb): Use
7642 const_0_to_15_operand instead of u5bit_cint_operand.
7643 (*altivec_vspltb_internal): Ditto.
7644 (altivec_vspltb_direct): Ditto.
7645 (altivec_vsplth): Use const_0_to_7_operand instead of
7647 (*altivec_vsplth_internal): Ditto.
7648 (altivec_vsplth_direct): Ditto.
7649 (altivec_vspltw): Use const_0_to_3_operand instead of
7651 (*altivec_vspltw_internal): Ditto.
7652 (altivec_vspltw_direct): Ditto.
7653 (altivec_vspltsf): Ditto.
7654 (*altivec_vspltsf_internal): Ditto.
7655 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
7656 various splats with the proper size immediate. Reorder the various
7657 cases by ascending size of immediate, and put all such together.
7659 2018-09-25 Richard Biener <rguenther@suse.de>
7662 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
7664 (maybe_create_die_with_external_ref): Do not create
7665 DW_TAG_imported_unit here.
7666 (add_abstract_origin_attribute): Handle external BLOCK refs.
7667 (dwarf2out_abstract_function): Simplify LTO case.
7668 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
7669 rather than using maybe_create_die_with_external_ref.
7671 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
7674 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
7675 (frndintxf2_mask_pm_i387): Ditto.
7676 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
7677 Enable for !flag_trapping_math.
7678 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
7679 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
7680 Change operand 1 predicate to nonimmediate_operand.
7681 (attr "i387_cw"): Remove mask_pm.
7682 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
7683 (enum ix86_entity): Remove I387_MASK_PM.
7684 * config/i386/i386.c (ix86_i387_mode_needed): Do not
7685 handle I387_MASK_PM.
7686 (ix86_mode_needed): Ditto.
7687 (ix86_mode_after): Ditto.
7688 (ix86_mode_entry): Ditto.
7689 (ix86_mode_exit): Ditto.
7690 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
7692 2018-09-25 Jakub Jelinek <jakub@redhat.com>
7694 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
7695 to_update_switch_stmts to vNULL instead of calling create on them
7698 2018-09-25 Richard Biener <rguenther@suse.de>
7700 PR tree-optimization/87402
7701 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
7702 (visit_phi): Re-instantiate handling of supposed to be VARYING
7703 but non-VARYING backedge value.
7705 2018-09-25 Richard Biener <rguenther@suse.de>
7708 * dwarf2out.c (struct sym_off_pair): New.
7709 (external_die_map): New global.
7710 (lookup_decl_die): When in LTO create DIEs lazily from the
7712 (lookup_block_die): New function, create DIEs lazily in LTO.
7713 (equate_block_to_die): New function.
7714 (dwarf2out_die_ref_for_decl): During WPA get the association
7715 from the external DIE map.
7716 (dwarf2out_register_external_die): Record mapping into the
7718 (maybe_create_die_with_external_ref): New function split out from
7719 DIE generation part of old dwarf2out_register_external_die.
7720 (add_abstract_origin_attribute): Do not return the DIE. When
7721 in LTO reference externals directly.
7722 (dwarf2out_abstract_function): When in LTO ignore calls for
7723 decls with external DIEs (already present abstract instances).
7724 (gen_call_site_die): Adjust.
7725 (add_high_low_attributes): Likewise.
7726 (gen_lexical_block_die): Likewise.
7727 (gen_inlined_subroutine_die): Likewie.
7728 (gen_block_die): Likewise.
7729 (dwarf2out_inline_entry): Likewise.
7730 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
7733 2018-09-25 Martin Liska <mliska@suse.cz>
7735 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
7736 integers and not by a float value.
7738 2018-09-25 Martin Liska <mliska@suse.cz>
7741 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
7743 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
7744 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
7745 * godump.c (go_format_type): Remove extra parenthesis.
7747 2018-09-25 Martin Liska <mliska@suse.cz>
7749 * alias.c (set_dest_equal_p): Remove unused function.
7750 * config/i386/i386.c (def_builtin_pure2): Likewise.
7751 * diagnostic-show-locus.c (class layout): Remove
7753 (layout::layout): Likewise here.
7754 * dump-context.h (class temp_dump_context): Likewise.
7755 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
7756 (add_AT_loclistsptr): Likewise.
7757 (add_AT_offset): Likewise.
7758 (get_AT_hi_pc): Likewise.
7759 (is_comdat_die): Likewise.
7760 (type_is_enum): Likewise.
7761 (ceiling): Likewise.
7762 (add_AT_vms_delta): Likewise.
7763 (is_class_die): Likewise.
7764 * edit-context.c (class line_event): Remove unused field.
7765 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
7767 * ipa-cp.c (ipa_get_vr_lat): Likewise.
7768 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
7769 (ok_for_base_p_nonstrict): Likewise.
7770 * tree-chrec.c (is_not_constant_evolution): Likewise.
7771 (chrec_fold_poly_cst): Likewise.
7772 * tree-if-conv.c (has_pred_critical_p): Likewise.
7773 * tree-ssa-coalesce.c (print_exprs): Likewise.
7774 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
7775 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
7776 * tree-vrp.c (value_ranges_intersect_p): Likewise.
7777 (value_range_nonnegative_p): Likewise.
7779 2018-09-25 Martin Liska <mliska@suse.cz>
7781 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
7782 Do not handle "GNU Pascal".
7783 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
7785 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
7786 from documentation. Likewise.
7787 * dbxout.c (dbxout_range_type): Likewise.
7788 * doc/cpp.texi: Likewise.
7789 * doc/extend.texi: Likewise.
7790 * doc/frontends.texi: Likewise.
7791 * doc/invoke.texi: Remove Pascal entry.
7792 * tree.def (CLEANUP_POINT_EXPR): Likewise.
7793 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
7795 2018-09-25 Martin Liska <mliska@suse.cz>
7798 * doc/invoke.texi: Document all parameters and remove default
7801 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
7804 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
7805 contains HOST_WIDE_INTs when computing its size.
7807 2018-09-24 Jim Wilson <jimw@sifive.com>
7810 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
7812 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
7814 2018-09-24 Andrew Pinski <apinski@marvell.com>
7816 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
7817 access prev before checking it for NULLness in the
7818 AARCH64_FUSE_CMP_BRANCH case.
7820 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
7823 * config/i386/i386.c (rest_of_insert_endbranch): Set
7824 endbr_queued_at_entrance to true and don't insert ENDBR if
7825 x86_function_profiler will be called.
7826 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
7828 * config/i386/i386.h (machine_function): Add
7829 endbr_queued_at_entrance.
7831 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
7833 * genattrtab.c (mk_attr_alt): Use alternative_mask.
7834 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
7836 (check_attr_test): Use alternative_mask.
7837 (get_attr_value): Likewise.
7838 (compute_alternative_mask): Use alternative_mask and XWINT.
7839 (make_alternative_compare): Use alternative_mask.
7840 (attr_alt_subset_p): Use XWINT.
7841 (attr_alt_subset_of_compl_p): Likewise.
7842 (attr_alt_intersection): Use alternative_mask and XWINT.
7843 (attr_alt_union): Likewise.
7844 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
7845 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
7846 (simplify_test_exp): Use alternative_mask and XWINT.
7847 (write_test_expr): Use alternative_mask and XWINT, adjust bit
7848 number calculation to support 64 bits. Generate code that
7849 checks 64-bit masks.
7850 (main): Use alternative_mask.
7851 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
7853 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
7856 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
7857 RETURN+USE when returning via %r14.
7859 2018-09-24 Martin Liska <mliska@suse.cz>
7861 * gcov.c (output_lines): Print colorization legend
7862 for both flag_use_colors and flag_use_hotness_colors.
7865 2018-09-24 Martin Liska <mliska@suse.cz>
7867 * coverage.c (get_coverage_counts): Use warning_at
7868 with current_function_decl location. Use %qD in warning
7871 2018-09-24 Martin Liska <mliska@suse.cz>
7873 * memory-block.h (memory_block_pool::release): Annotate with
7874 valgrind that the memory is not accessible.
7876 2018-09-24 Martin Liska <mliska@suse.cz>
7879 * asan.c: Make asan_handled_variables extern.
7881 * cfgexpand.c (expand_stack_vars): Make sure
7882 a representative is unpoison if another
7883 variable in the partition is handled by
7884 use-after-scope sanitization.
7886 2018-09-24 Richard Biener <rguenther@suse.de>
7888 PR tree-optimization/63155
7889 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
7890 the worklist when the edge of the respective argument isn't
7893 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7895 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
7896 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
7897 (MASK_CLASS_P): Update for rename.
7898 (MAYBE_MASK_CLASS_P): Ditto.
7899 (REG_CLASS_NAMES): Update.
7900 (REG_CLASS_CONTENT): Update.
7901 * config/i386/i386.c (regclass_map): Update for MASK_REG
7902 and ALL_MASK_REGS rename.
7903 * config/i386/constraints.md (Yk): Update for rename.
7906 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7908 * config/i386/i386.h (enum reg_class): Remove
7909 EVEX_SSE_REGS and MOD4_SSE_REGS.
7910 (REG_CLASS_NAMES): Update.
7911 (REG_CLASS_CONTENT): Update.
7912 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7913 registers as ALL_SSE_REGS.
7914 (ix86_additional_allocno_class_p): Remove.
7915 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7916 (ix86_register_priority): Lower priority of EVEX SSE registers.
7917 Use IN_RANGE macro where appropriate.
7918 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7919 AVX-5124VNNIW checks.
7920 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7921 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7922 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7923 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7924 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7925 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7926 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7927 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7928 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7929 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7930 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7931 * config/i386/constraints.md (Yh): Remove.
7933 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7935 * config/i386/i386.c (regclass_map): Declare integer REX registers
7938 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
7940 * doc/service.texi (Service): Switch the fsf.org link to https.
7942 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
7945 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7946 Define to speculation_safe_value_not_needed.
7948 2018-09-21 Florian Weimer <fweimer@redhat.com>
7951 * doc/extend.texi (Common Function Attributes): Mention that
7952 noreturn suppresses tail call optimization.
7954 2018-09-21 Jeff Law <law@redhat.com>
7956 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7957 vr_values::cleanup_edges_and_switches.
7958 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7960 (identify_jump_threads): Remove EDGE_IGNORE handling.
7961 (execute_vrp): Move handling of to_remove_edges and
7962 to_update_switch_stmts into vr_values class member functions.
7963 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7964 (to_update_switch_stmts): Likewise.
7965 * vr-values.c: Include cfghooks.h.
7966 (vr_values::vr_values): Initialize to_remove_edges and
7967 to_update_switch_stmts.
7968 (vr_values::~vr_values): Verify to_remove_edges and
7969 to_update_switch_stmts are empty.
7970 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7971 (vr_values::cleanup_edges_and_switches): New member function.
7972 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7973 function. Add new data members.
7975 2018-09-21 David Malcolm <dmalcolm@redhat.com>
7977 PR tree-optimization/87309
7978 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7979 calls with pflags and alt_flags.
7980 (selftest::test_capture_of_dump_calls): Add test of interaction of
7981 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7983 2018-09-21 Olivier Hainque <hainque@adacore.com>
7985 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7987 2018-09-21 Olivier Hainque <hainque@adacore.com>
7989 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
7991 2018-09-21 Olivier Hainque <hainque@adacore.com>
7993 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
7994 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
7995 (VXWORKS_LIBS_RTP): Minor reordering.
7997 2018-09-21 Olivier Hainque <hainque@adacore.com>
7999 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
8000 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
8002 2018-09-21 Olivier Hainque <hainque@adacore.com>
8004 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
8005 (PTRDIFF_TYPE): Likewise.
8007 2018-09-21 Olivier Hainque <hainque@adacore.com>
8009 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
8010 triplet, similar to support for VxWorks7.
8011 * config/vxworks-dummy.h: Provide a default definition
8012 of TARGET_VXWORKS64 to 0.
8014 2018-09-21 Olivier Hainque <hainque@adacore.com>
8016 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
8017 * config/vxworks-dummy.h: here.
8019 2018-09-21 Olivier Hainque <hainque@adacore.com>
8021 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
8023 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
8024 Bo Zhou <zbo.zhou@hisilicon.com>
8026 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
8027 * config/aarch64/aarch64-tune.md: Regenerated.
8028 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
8029 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
8030 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
8032 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
8033 Julian Brown <julian@codesourcery.com>
8035 * builtins.c (get_builtin_sync_mem): Handle address spaces.
8037 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
8039 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
8040 if the call takes a static chain.
8042 2018-09-21 Martin Liska <mliska@suse.cz>
8044 * auto-profile.c (autofdo_source_profile::read): Do not
8046 (read_profile): Do not add working sets.
8047 (read_autofdo_file): Remove sum_all.
8048 (afdo_callsite_hot_enough_for_early_inline): Remove const
8050 * coverage.c (struct counts_entry): Remove gcov_summary.
8051 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
8052 do not support GCOV_TAG_PROGRAM_SUMMARY.
8053 (get_coverage_counts): Remove summary and expected
8055 * coverage.h (get_coverage_counts): Likewise.
8056 * doc/gcov-dump.texi: Remove -w option.
8057 * gcov-dump.c (dump_working_sets): Remove.
8058 (main): Do not support '-w' option.
8059 (print_usage): Likewise.
8060 (tag_summary): Likewise.
8061 * gcov-io.c (gcov_write_summary): Do not dump
8063 (gcov_read_summary): Likewise.
8064 (gcov_histo_index): Remove.
8065 (gcov_histogram_merge): Likewise.
8066 (compute_working_sets): Likewise.
8067 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
8069 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
8070 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
8071 (GCOV_HISTOGRAM_SIZE): Remove.
8072 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
8073 (struct gcov_summary): Simplify rapidly just
8074 to runs and sum_max fields.
8075 (gcov_histo_index): Remove.
8076 (NUM_GCOV_WORKING_SETS): Likewise.
8077 (compute_working_sets): Likewise.
8078 * gcov-tool.c (print_overlap_usage_message): Remove
8079 trailing empty line.
8080 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
8081 (output_lines): Remove program related line.
8082 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
8083 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
8085 (input_profile_summary): Do not read it.
8086 (merge_profile_summaries): And do not merge it.
8087 (input_symtab): Do not call removed function.
8088 * modulo-sched.c (sms_schedule): Do not print sum_max.
8089 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
8090 removed when histogram method was invented.
8091 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
8093 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
8095 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
8096 and dump selected value.
8097 * profile.c (add_working_set): Remove.
8098 (get_working_sets): Likewise.
8099 (find_working_set): Likewise.
8100 (get_exec_counts): Do not work with working sets.
8101 (read_profile_edge_counts): Do not inform as sum_max is removed.
8102 (compute_branch_probabilities): Likewise.
8103 (compute_value_histograms): Remove argument for call of
8104 get_coverage_counts.
8105 * profile.h: Do not make gcov_summary const.
8107 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
8109 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
8111 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
8113 PR tree-optimization/86990
8114 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
8115 Check that the entire merged store group is made of constants only for
8118 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
8120 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
8121 (VTABLE_VERIFICATION_SPEC): Likewise.
8122 (SANITIZER_EARLY_SPEC): Likewise.
8123 (SANITIZER_SPEC): Likewise.
8124 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
8125 * doc/invoke.texi (Link Options): Document -r.
8127 2018-09-20 Richard Biener <rguenther@suse.de>
8130 * gimplify.c (gimplify_expr): Retain alignment of
8131 addressable lvalue in dereference.
8133 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
8136 * configure.ac: Check for .loc is_stmt support.
8137 * configure, config.in: Rebuilt.
8138 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
8141 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
8143 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
8144 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
8147 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
8149 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
8151 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
8154 2018-09-20 Marek Polacek <polacek@redhat.com>
8156 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
8158 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
8160 PR tree-optimization/87288
8161 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
8162 into account when determining PEELING_FOR_NITERS.
8164 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
8166 PR tree-optimization/86877
8167 * tree-vect-loop.c (vect_analyze_loop_2): Call
8168 vect_verify_datarefs_alignment.
8170 2018-09-19 Marek Polacek <polacek@redhat.com>
8172 * doc/invoke.texi: Document -Wclass-conversion.
8174 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
8176 * config/pa/pa.c (pa_adjust_priority): Delete.
8177 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
8179 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
8180 (atomic_storehi): Likewise.
8181 (atomic_storesi): Likewise.
8182 (atomic_loaddi): Restore compare and swap exchange loop code.
8184 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
8186 PR rtl-optimization/86902
8187 * combine.c (try_combine): When changing the CC mode used, don't change
8188 an unrelated mode in other_insn to that new CC mode.
8190 2018-09-19 David Malcolm <dmalcolm@redhat.com>
8192 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
8193 with %T in place of calls to dump_generic_expr.
8194 (prune_runtime_alias_test_list): Likewise.
8195 (create_runtime_alias_checks): Likewise.
8196 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
8197 (vect_analyze_data_ref_dependence): Likewise.
8198 (vect_slp_analyze_data_ref_dependence): Likewise.
8199 (vect_record_base_alignment): Likewise. Use %G in place of call
8200 to dump_gimple_stmt.
8201 (vect_compute_data_ref_alignment): Likewise.
8202 (verify_data_ref_alignment): Likewise.
8203 (vect_find_same_alignment_drs): Likewise.
8204 (vect_analyze_group_access_1): Likewise.
8205 (vect_analyze_data_ref_accesses): Likewise.
8206 (dependence_distance_ge_vf): Likewise.
8207 (dump_lower_bound): Likewise.
8208 (vect_prune_runtime_alias_test_list): Likewise.
8209 (vect_find_stmt_data_reference): Likewise.
8210 (vect_analyze_data_refs): Likewise.
8211 (vect_create_addr_base_for_vector_ref): Likewise.
8212 (vect_create_data_ref_ptr): Likewise.
8213 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
8214 (vect_can_advance_ivs_p): Likewise.
8215 (vect_update_ivs_after_vectorizer): Likewise.
8216 (vect_gen_prolog_loop_niters): Likewise.
8217 (vect_prepare_for_masked_peels): Likewise.
8218 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
8219 (vect_determine_vectorization_factor): Likewise.
8220 (vect_is_simple_iv_evolution): Likewise.
8221 (vect_analyze_scalar_cycles_1): Likewise.
8222 (vect_analyze_loop_operations): Likewise.
8223 (report_vect_op): Likewise.
8224 (vect_is_slp_reduction): Likewise.
8225 (check_reduction_path): Likewise.
8226 (vect_is_simple_reduction): Likewise.
8227 (vect_create_epilog_for_reduction): Likewise.
8228 (vect_finalize_reduction:): Likewise.
8229 (vectorizable_induction): Likewise.
8230 (vect_transform_loop_stmt): Likewise.
8231 (vect_transform_loop): Likewise.
8232 (optimize_mask_stores): Likewise.
8233 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
8234 (vect_split_statement): Likewise.
8235 (vect_recog_over_widening_pattern): Likewise.
8236 (vect_recog_average_pattern): Likewise.
8237 (vect_determine_min_output_precision_1): Likewise.
8238 (vect_determine_precisions_from_range): Likewise.
8239 (vect_determine_precisions_from_users): Likewise.
8240 (vect_mark_pattern_stmts): Likewise.
8241 (vect_pattern_recog_1): Likewise.
8242 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
8243 (vect_record_max_nunits): Likewise.
8244 (vect_build_slp_tree_1): Likewise.
8245 (vect_build_slp_tree_2): Likewise.
8246 (vect_print_slp_tree): Likewise.
8247 (vect_analyze_slp_instance): Likewise.
8248 (vect_detect_hybrid_slp_stmts): Likewise.
8249 (vect_detect_hybrid_slp_1): Likewise.
8250 (vect_slp_analyze_operations): Likewise.
8251 (vect_slp_analyze_bb_1): Likewise.
8252 (vect_transform_slp_perm_load): Likewise.
8253 (vect_schedule_slp_instance): Likewise.
8254 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
8255 (vect_mark_stmts_to_be_vectorized): Likewise.
8256 (vect_init_vector_1): Likewise.
8257 (vect_get_vec_def_for_operand): Likewise.
8258 (vect_finish_stmt_generation_1): Likewise.
8259 (vect_check_load_store_mask): Likewise.
8260 (vectorizable_call): Likewise.
8261 (vectorizable_conversion): Likewise.
8262 (vectorizable_operation): Likewise.
8263 (vectorizable_load): Likewise.
8264 (vect_analyze_stmt): Likewise.
8265 (vect_is_simple_use): Likewise.
8266 (vect_get_vector_types_for_stmt): Likewise.
8267 (vect_get_mask_type_for_stmt): Likewise.
8268 * tree-vectorizer.c (increase_alignment): Likewise.
8270 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
8272 * doc/rtl.texi: Adjust vec_select description.
8273 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
8274 non-constant selectors.
8276 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
8278 * config/aarch64/aarch64-protos.h
8279 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
8280 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
8281 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
8282 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
8283 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
8284 (AARCH64_FL_PROFILE): Move index so flags are ordered.
8285 (AARCH64_ISA_RCPC8_4): New flag.
8286 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
8287 to aarch64_offset_9bit_signed_unscaled_p.
8288 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
8290 * config/aarch64/constraints.md (Ust): New constraint.
8291 * config/aarch64/predicates.md.
8292 (aarch64_9bit_offset_memory_operand): New predicate.
8293 (aarch64_rcpc_memory_operand): New predicate.
8295 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
8297 PR rtl-optimization/87361
8298 * rtlanal.c (nonzero_bits1): Revert accidental change.
8300 2018-09-19 Richard Biener <rguenther@suse.de>
8302 PR tree-optimization/87349
8303 PR tree-optimization/87342
8304 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
8306 2018-09-18 Marek Polacek <polacek@redhat.com>
8308 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
8309 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
8311 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
8313 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
8315 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
8317 PR rtl-optimization/86882
8318 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
8320 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
8322 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
8323 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
8325 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
8328 * doc/invoke.texi (Link Options): Fix formatting and grammar.
8330 2018-09-18 Richard Biener <rguenther@suse.de>
8333 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
8334 (compute_samebase_partition_bases): Likewise.
8335 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
8336 (gimple_can_coalesce_p): Simplify.
8338 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
8340 Handle a library implementation of ffs calling __builtin_ffs.
8341 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
8342 (mmix_init_libfuncs): New function: make __builtin_ffs expand
8345 2018-09-17 David Malcolm <dmalcolm@redhat.com>
8347 * diagnostic-show-locus.c (class layout_range): Add field
8349 (layout_range::layout_range): Add "original_idx" param and use it
8350 to initialize new field.
8351 (make_range): Use 0 for original_idx.
8352 (layout::layout): Pass in index to calls to
8353 maybe_add_location_range.
8354 (layout::maybe_add_location_range): Add param "original_idx" and
8355 pass it on to layout_range.
8356 (layout::print_any_labels): Pass on range->m_original_idx to
8358 (gcc_rich_location::add_location_if_nearby): Use 0 for
8360 * gcc-rich-location.h (text_range_label::get_text): Update for new
8362 (range_label_for_type_mismatch::get_text): Likewise.
8364 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
8366 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
8368 2018-09-17 David Malcolm <dmalcolm@redhat.com>
8370 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
8371 format_string_diagnostic_t.
8372 (fmtwarn_n): Likewise.
8373 * substring-locations.c
8374 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
8375 (format_warning_n_va): Convert to...
8376 (format_string_diagnostic_t::emit_warning_n_va): ...this.
8377 (format_warning_va): Convert to...
8378 (format_string_diagnostic_t::emit_warning_va): ...this.
8379 (format_warning_at_substring): Convert to...
8380 (format_string_diagnostic_t::emit_warning): ...this.
8381 (format_warning_at_substring_n): Convert to...
8382 (format_string_diagnostic_t::emit_warning_n): ...this.
8383 * substring-locations.h (class format_string_diagnostic_t): New
8385 (format_warning_va): Convert to
8386 format_string_diagnostic_t::emit_warning_va.
8387 (format_warning_n_va): Convert to
8388 format_string_diagnostic_t::emit_warning_n_va.
8389 (format_warning_at_substring): Convert to
8390 format_string_diagnostic_t::emit_warning.
8391 (format_warning_at_substring_n): Convert to
8392 format_string_diagnostic_t::emit_warning_n.
8394 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
8395 Bernd Schmidt <bernds_cb1@t-online.de>
8397 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
8400 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
8402 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
8403 operand 0 predicate to nonimmediate operand.
8404 (rint<mode>2_frndint): Remove insn pattern.
8405 (rint<mode>2): Change operand 1 predicate to general_operand.
8406 Extend operand 1 to XFmode and generate rintxf2 insn.
8407 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
8408 Do not use X87MODEF mode macro.
8409 (frndintxf2_<rounding>_i387): Rename from
8410 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
8411 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
8412 to XFmode and generate significandxf3 insn.
8414 2018-09-17 Richard Biener <rguenther@suse.de>
8416 PR tree-optimization/87328
8417 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
8418 visiting unexecutable backedges when not iterating.
8419 (do_rpo_vn): Mark all edges not executable even when not
8422 2018-09-17 Martin Jambor <mjambor@suse.cz>
8425 * doc/invoke.texi (Warning Options): Likewise.
8427 2018-09-17 Richard Biener <rguenther@suse.de>
8429 PR tree-optimization/87301
8430 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
8431 clean EH info from leftover copy assignments.
8433 2018-09-17 Martin Liska <mliska@suse.cz>
8435 PR gcov-profile/85871
8436 * gcov.c (output_intermediate_file): Fix out of bounds
8439 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
8441 * config/arc/arc.c: Object attributes for core4 not reflected
8443 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
8446 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
8448 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
8450 2018-09-17 Martin Liska <mliska@suse.cz>
8452 * doc/gcov.texi: Document new option --use-hotness-colors.
8453 * gcov.c (struct source_info): Declare new field.
8454 (source_info::source_info): Set default for maximum_count.
8455 (print_usage): Add new -q option.
8456 (process_args): Process it.
8457 (accumulate_line_info): Save src->maximum_count.
8458 (output_line_beginning): Make color line number if
8459 flag_use_hotness_colors is set.
8460 (output_line_details): Pass default argument value.
8461 (output_lines): Pass src->maximum_count.
8463 2018-09-17 Martin Liska <mliska@suse.cz>
8465 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
8466 Use processor_names table.
8467 * config/i386/i386.c (ix86_default_align): Use
8468 processor_cost_table for alignment values.
8469 (ix86_option_override_internal): Use processor_names.
8470 (ix86_function_specific_print): Likewise.
8471 * config/i386/i386.h (struct processor_costs):
8472 Add alignment values.
8473 (struct ptt): Remove and replace with const char *.
8474 * config/i386/x86-tune-costs.h (struct processor_costs):
8475 Declare default alignments for all costs.
8477 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
8479 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
8480 symbolics or VR_VARYING ranges for ABS_EXPR.
8481 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
8482 when range will wrap.
8484 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
8487 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
8488 before and after a JUMP_TABLE_DATA.
8490 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
8493 * dojump.c (do_compare_and_jump): Canonicalize function pointers
8494 when one operand is a function pointer. Use POINTER_TYPE_P and
8495 FUNC_OR_METHOD_TYPE_P.
8496 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
8497 * fold-const.c (build_range_check): Likewise.
8498 * match.pd (simple_comparison): Likewise.
8500 2018-09-14 David Malcolm <dmalcolm@redhat.com>
8503 * spellcheck.c (get_edit_distance_cutoff): New function.
8504 (selftest::test_edit_distance_unit_test_oneway): Rename to...
8505 (selftest::test_get_edit_distance_one_way): ...this.
8506 (selftest::test_get_edit_distance_unit): Rename to...
8507 (selftest::test_get_edit_distance_both_ways): ...this.
8508 (selftest::test_edit_distances): Move tests to this new function,
8509 and test some more pairs of strings. Update for above renaming.
8510 (selftest::get_old_cutoff): New function.
8511 (selftest::test_get_edit_distance_cutoff): New function.
8512 (selftest::assert_suggested_for): New function.
8513 (ASSERT_SUGGESTED_FOR): New macro.
8514 (selftest::assert_not_suggested_for): New function.
8515 (ASSERT_NOT_SUGGESTED_FOR): New macro.
8516 (selftest::test_suggestions): New function.
8517 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
8518 tests to selftest::test_edit_distances and call it. Add calls to
8519 selftest::test_get_edit_distance_cutoff and
8520 selftest::test_suggestions.
8521 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
8522 (best_match::consider): Replace hard-coded cutoff calculation with
8524 (best_match::get_cutoff): New declaration.
8525 (best_match::get_best_meaningful_candidate): Likewise.
8527 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8529 * builtins.c (fold_builtin_strlen): Remove TODO comment.
8531 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8534 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8536 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8537 terminated string literal.
8539 2018-09-14 Martin Sebor <msebor@redhat.com>
8541 * builtins.c (unterminated_array): Handle ARRAY_REF.
8542 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
8543 * builtins.h (unterminated_array): Declare extern.
8544 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
8546 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
8549 2018-09-14 Martin Sebor <msebor@redhat.com>
8550 Jeff Law <law@redhat.com>
8552 * builtins.c (unterminated_array): New.
8553 (expand_builtin_strcpy): Adjust.
8554 (expand_builtin_strcpy_args): Detect unterminated arrays.
8555 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
8556 unterminated arrays.
8557 * gimple-fold.h (get_maxval_strlen): Add argument.
8558 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
8560 * gimple-fold.c (get_range_strlen): Add argument.
8561 (get_maxval_strlen): Adjust.
8562 * gimple-fold.h (get_range_strlen): Add argument.
8564 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
8566 * config/i386/movdirintrin.h: Fix copyright year.
8568 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
8570 * reg-stack.c: Include regs.h.
8571 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
8572 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
8573 FIRST_STACK_REG, not DFmode.
8574 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
8575 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
8576 (change stack): Default register mode to the reg_raw_mode of
8577 FIRST_STACK_REG, not DFmode.
8578 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
8579 (*swapxf): Rename from swapxf.
8581 2018-09-14 Carl Love <cel@us.ibm.com>
8583 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
8584 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
8586 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
8589 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
8592 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
8595 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
8597 2018-09-14 Jason Merrill <jason@redhat.com>
8599 Fix --enable-gather-detailed-mem-stats.
8600 * hash-table.c (hash_table_usage): Change from variable to function.
8601 * hash-table.h: Adjust.
8602 * Makefile.in: Add missing dependencies on hash-table.h.
8604 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8606 PR tree-optimization/87259
8608 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
8609 execute_cse_reciprocals_1 has tried transforming.
8611 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
8613 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
8614 VR_VARYING for PLUS/MINUS_EXPR.
8616 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
8618 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
8621 2018-09-14 Richard Biener <rguenther@suse.de>
8624 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
8625 bits for the merged partition.
8627 2018-09-13 Martin Sebor <msebor@redhat.com>
8628 Bernd Edlinger <bernd.edlinger@hotmail.de>
8630 * builtins.h (c_srlen): Add argument.
8631 * builtins.c (warn_string_no_nul): New function.
8632 (c_strlen): Add argument and use it. Update recursive calls.
8633 Pass DECL argument to string_constant to get info on non
8634 terminated strings. Update *NONSTR as needed.
8635 (fold_builtin_strlen): Add argument to calls to c_strlen.
8636 Warn for unterminated arrays.
8637 (warn_string_no_null): Add prototype.
8638 * expr.c (string_constant): Update arguments. Update recursive
8639 calls appropriately. Detect missing NUL terminator and outermost
8640 declaration its missing in.
8641 Improve checks for arrays with nonzero lower bound or elements
8642 that are not a single byte. Simplify offset computation.
8643 Simplify checks for non-NUL terminated strings.
8644 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
8645 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
8647 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
8649 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
8651 * fold-const.c (c_getstr): Fix function comment. Remove unused third
8652 argument. Fix range checks.
8653 * fold-const.h (c_getstr): Adjust protoype.
8654 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
8655 string is constant but contains no NUL byte.
8657 * expr.c (string_constant): Adjust function comment.
8658 Remove bogus check for zero termination.
8660 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
8662 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
8663 (get_constant_size): Don't make STRING_CSTs larger than they are.
8664 (check_string_literal): New check function for STRING_CSTs.
8665 (output_constant): Use it.
8667 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
8670 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
8672 2018-09-13 Richard Biener <rguenther@suse.de>
8674 PR tree-optimization/87263
8675 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
8676 (struct unwind_state): Add max_rpo field.
8677 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
8678 Compute max_rpo, the max RPO number a block can be backwards reached
8679 from. Re-write non-iterating mode to a RPO ordered worklist approach,
8680 separating it from the iterating mode.
8682 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
8684 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
8685 (rfs_decision): New scheduling decision.
8687 2018-09-13 Richard Biener <rguenther@suse.de>
8690 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
8691 (vn_nary_op_insert_pieces_predicated): Do not write useless
8692 valid_dominated_by_p entry outside of the allocated storage.
8694 2018-09-13 Omar Sandoval <osandov@osandov.com>
8695 Tom de Vries <tdevries@suse.de>
8698 * dwarf2out.c (is_c): New function.
8699 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
8701 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
8704 * config/aarch64/aarch64.md (*aarch64_bfxil):
8706 * config/aarch64/constraints.md (Ulc): Define.
8707 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
8709 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
8712 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
8714 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
8715 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
8716 aarch64_layout_frame call.
8717 (aarch64_expand_epilogue): Likewise.
8718 (aarch64_initial_elimination_offset): Likewise.
8719 (aarch64_get_separate_components): Likewise.
8720 (aarch64_use_return_insn_p): Likewise.
8721 (aarch64_layout_frame): Remove unneeded check.
8723 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8725 * configure.ac: Only append
8726 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
8727 gcc_config_arguments if it was never reconfigured or last reconfigure
8728 was with different arguments.
8729 * configure: Regenerated.
8731 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8732 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8735 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
8736 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8738 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8740 PR tree-optimization/87287
8741 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
8742 X % C == 0 to X % (unsigned) C == 0 optimization to ...
8743 * match.pd (X % C == 0): ... here. New optimization.
8745 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8748 * expr.h (maybe_optimize_mod_cmp): Declare.
8749 * expr.c (mod_inv): New function.
8750 (maybe_optimize_mod_cmp): New function.
8751 (do_store_flag): Use it.
8752 * cfgexpand.c (expand_gimple_cond): Likewise.
8754 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
8755 Julian Brown <julian@codesourcery.com>
8758 * gimplify.c (gimplify_scan_omp_clauses): Set
8759 target_firstprivatize_array_bases in OpenACC parallel and kernels
8760 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
8761 OpenACC data regions.
8763 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
8765 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
8766 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
8768 2018-09-12 Richard Biener <rguenther@suse.de>
8770 PR tree-optimization/87280
8771 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
8772 edge but unreachable target.
8773 (do_rpo_vn): For conservatively handling a PHI only mark
8774 the backedge executable but not the block reachable.
8776 2018-09-12 Richard Biener <rguenther@suse.de>
8778 PR tree-optimization/87266
8779 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
8782 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
8784 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
8786 ("trunc<BFP:mode><DFP_ALL:mode>2")
8787 ("trunc<DFP_ALL:mode><BFP:mode>2")
8788 ("extend<BFP:mode><DFP_ALL:mode>2")
8789 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
8790 according to the target operand type.
8792 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8793 Andreas Krebbel <krebbel@linux.ibm.com>
8795 PR tree-optimization/86844
8796 * gimple-ssa-store-merging.c
8797 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
8798 there are any overlapping stores in between them, make sure they are
8799 also coalesced or we give up completely.
8801 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8804 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
8805 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
8807 2018-09-12 Tom de Vries <tdevries@suse.de>
8809 * common.opt (gdescribe-dies): Add option.
8810 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
8811 attribute for artifical and nameless decls.
8812 (dwarf2out_register_external_die): Add description attribute to
8813 external reference die.
8814 (add_desc_attribute): New functions.
8815 (gen_subprogram_die): Add description attribute to
8816 DW_TAG_call_site_parameter.
8817 * tree-pretty-print.c (print_generic_expr_to_str): New function.
8818 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
8819 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
8821 (@item -gdescribe-dies): Add.
8823 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
8825 * tree-vrp.c (vrp_shift_undefined_p): Remove.
8826 (extract_range_from_binary_expr_1: Call
8827 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
8828 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
8831 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
8833 * gimple-ssa-warn-alloca.c
8834 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
8835 field for ALLOCA_BOUND_*_LARGE.
8837 2018-09-11 Nathan Sidwell <nathan@acm.org>
8839 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
8841 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8843 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8844 for clobbers. Remove obsolete comment.
8846 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8848 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
8849 mpxchk, mpxld and mpxst types.
8850 (define_attr length_immediate): Remove all processing of mpx types.
8851 (define_attr prefix_0f): Ditto.
8852 (define_attr memory): Ditto.
8854 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8856 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
8857 (log<mode>2): Change operand 1 predicate to general_operand.
8858 Extend operand 1 to XFmode and generate logxf3 insn.
8859 (log10<mode>2): Change operand 1 predicate to general_operand.
8860 Extend operand 1 to XFmode and generate log10xf3 insn.
8861 (log2<mode>2): Change operand 1 predicate to general_operand.
8862 Extend operand 1 to XFmode and generate log2xf3 insn.
8863 (fyl2xp1_extend<mode>xf3_i387): Remove.
8864 (log1p<mode>2): Change operand 1 predicate to general_operand.
8865 Extend operand 1 to XFmode and generate log1pxf3 insn.
8866 (fxtract_extend<mode>xf3_i387): Remove.
8867 (logb<mode>2): Change operand 1 predicate to general_operand.
8868 Extend operand 1 to XFmode and generate logbxf3 insn.
8869 (ilogb<mode>2): Change operand 1 predicate to general_operand.
8870 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
8871 (significand<mode>2): Change operand 1 predicate to general_operand.
8872 Extend operand 1 to XFmode and generate significandxf3 insn.
8874 2018-09-11 Nathan Sidwell <nathan@acm.org>
8876 * gcc.c (perror_with_name, pfatal_with_name): Delete.
8877 (load_specs): Use fatal_error.
8878 (DELETE_IF_ORDINARY, process_command): Use error.
8879 (execute, run_attempt): Use fatal_error.
8881 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
8883 * diagnostic-core.h (sorry_at): New prototype.
8884 * diagnostic.c (sorry_at): New function.
8886 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
8888 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
8889 by zero as VR_UNDEFINED.
8891 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8893 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
8894 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
8895 (<sincos>mode2): New expander.
8896 (sincos_extend<mode>xf3_i387): Remove insn pattern.
8897 (sincos -> sin, cos splitters): Remove splitter patterns.
8898 (sincos<mode>3): Change operand 2 predicate to general_operand.
8899 Extend operand 2 to XFmode and generate sincosxf3 insn.
8900 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8901 Change operand 3 predicate to const1_operand.
8902 (fptan_extend<mode>xf4_i387): Remove insn pattern.
8903 (tanxf2): Update operands in the call to fptanxf4_i387.
8904 (tan<mode>2): Change operand 1 predicate to general_operand.
8905 Extend operand 1 to XFmode and generate tanxf3 insn.
8906 (atan2xf3): Rename from *fpatanxf3_i387.
8907 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8908 (atan2xf3): Remove expander.
8909 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
8910 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8911 (atan<mode>2): Change operand 1 predicate to general_operand.
8912 Extend operand 1 to XFmode and generate atanxf3 insn.
8914 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8916 * config/i386/i386.md (x87/SSE constant load splitter): Use
8917 memory_operand instead of nonimmediate_operand for input operand
8920 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
8922 * config/i386/i386.md (float partial SSE register stall splitter): Move
8923 splitter near its instruction pattern.
8924 (float_extend partial SSE register stall splitter): Ditto.
8925 (float_truncate partial SSE register stall splitter): Ditto.
8927 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
8930 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8931 to speculation_safe_value_not_needed.
8934 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8935 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8936 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8937 leaf_function_p, instead use has_hard_reg_initial_val.
8939 2018-09-09 Nathan Sidwell <nathan@acm.org>
8941 * gcc.h (pfatal_with_name): Don't declare here.
8942 * gcc.c (pfatal_with_name): Make static.
8944 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
8946 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8949 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
8951 PR rtl-optimization/85458
8952 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8953 priority hook to reduce the priority of EXPR.
8955 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
8957 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8958 DImode for x87 on 32bit targets. Conditionally disable x87 modes
8959 with X87_ENABLE_FLOAT. Remove preparation code.
8960 (*float<SWI48:mode><MODEF:mode>2): Rename from
8961 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
8962 math using "enabled" attribute.
8963 (*floatdi<MODEF:mode>2_i387): Rename from
8964 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
8965 enable for 32bit targets only.
8966 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8968 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8969 as operand 1 predicate. Rewrite as define_insn_and_split.
8970 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8972 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8974 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8975 to fallthru to FLOAT case.
8977 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8980 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8981 around folding of vec_sl to handle out of range shift values.
8983 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8985 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8986 Update callers to gen_fix_trunc<mode>_i387_fisttp
8987 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8988 nonimmediate_operand.
8989 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8990 and corresponding splitters.
8991 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
8992 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
8993 (fix_truncdi_i387_with_temp): Remove insn pattern
8994 and corresponding splitters.
8995 (fix_trunc<mode>_i387): Change operand 0 predicate to
8996 nonimmediate_operand.
8997 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
8998 and corresponding splitters.
8999 (*fistdi2_1): Remove.
9001 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
9002 (lrintxfdi2): Remove expander. Reimplement as define_insn.
9003 (*fist<mode>2_1): Remove.
9004 (fist<mode>2): Ditto.
9005 (fist<mode>2_with_temp): Remove insn pattern and corresponding
9007 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
9008 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
9009 (fistdi2_<rounding>): Change operand 0 predicate to
9010 nonimmediate_operand.
9011 (fistdi2_<rounding>_with_temp): Remove insn pattern
9012 and corresponding splitters.
9013 (fist<mode>2_<rounding>): Change operand 0 predicate to
9014 nonimmediate_operand.
9015 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
9016 and corresponding splitters.
9018 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
9020 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
9022 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
9025 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9027 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9028 early gimple folding of vec_splat().
9029 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
9030 * gimple-fold.h: Add an extern define for tree_vec_extract().
9032 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
9034 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
9035 wrappers around TREE_TYPE comparisons.
9037 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9040 * config/s390/predicates.md: Add nonsym_memory_operand.
9041 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
9042 contains a SYMBOL_REF, load it into an intermediate pseudo.
9043 (s390_emit_compare_and_swap): Legitimize operand.
9044 * config/s390/s390.md: Use the new nonsym_memory_operand
9045 with UNSPECV_CAS patterns.
9047 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9050 * config/s390/s390-passes.def: New file.
9051 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
9053 (make_pass_s390_early_mach): Add declaration.
9054 * config/s390/s390.c (make_pass_s390_early_mach):
9055 (s390_option_override): Remove dynamic registration.
9056 * config/s390/t-s390: Add s390-passes.def.
9058 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
9060 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9061 Remove UNSPEC_LTREL_BASE check.
9062 (annotate_constant_pool_refs): Likewise.
9063 (find_constant_pool_ref): Likewise.
9064 (find_ltrel_base): Removed.
9065 (replace_ltrel_base): Removed.
9066 (s390_mainpool_finish): Remove replace_ltrel_base call.
9067 (s390_chunkify_start): Remove pending LTREL_BASE logic.
9068 (s390_chunkify_finish): Remove replace_ltrel_base call.
9069 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
9071 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
9074 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9075 to speculation_safe_value_not_needed.
9077 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
9078 Bernd Schmidt <bernds_cb1@t-online.de>
9080 * config/nvptx/nvptx-opts.h: New file.
9081 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
9082 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
9084 (TARGET_SM35): New macro.
9085 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
9087 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
9089 (misa=): New option.
9090 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
9092 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
9094 * config/i386/i386.md (truncdfsf2): Remove expander.
9095 (truncdfsf2_with_temp): Ditto.
9096 (truncxf<mode>2): Ditto.
9097 (*truncdfsf_fast_mixed): Remove insn pattern.
9098 (*truncdfsf_fast_i387): Ditto.
9099 (*truncdfsf_mixed): Ditto.
9100 (*truncdfsf_i387): Ditto.
9101 (*truncdfsf2_i387_1): Ditto.
9102 (*truncxfsf2_mixed): Ditto.
9103 (*truncxfdf2_mixed): Ditto.
9104 (*truncxf<mode>2_i387_noop): Ditto. Update callers
9105 to call gen_truncxf<mode>2 instead.
9106 (*truncxf<mode>2_i387): Remove.
9107 (reg->reg splitters): Remove splitter pattern.
9108 (reg->mem splitters): Ditto.
9110 (truncdfsf2): New insn pattern.
9111 (truncxf<mode>2): Ditto.
9113 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9115 * tree-ssa-math-opts.c (is_mult_by): New function.
9116 (is_square_of): Use the above.
9117 (optimize_recip_sqrt): New function.
9118 (pass_cse_reciprocals::execute): Use the above.
9120 2018-09-05 Richard Biener <rguenther@suse.de>
9123 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
9124 to zero-init the emplaced vec.
9126 2018-09-05 Martin Liska <mliska@suse.cz>
9128 PR tree-optimization/87205
9129 * tree-switch-conversion.c (pass_lower_switch::execute):
9130 Group cases for switch statements.
9132 2018-09-05 Richard Biener <rguenther@suse.de>
9134 PR tree-optimization/87217
9135 * tree-ssa-sccvn.c (vuse_valueize): New.
9136 (vn_reference_lookup_pieces): Use it.
9137 (vn_reference_lookup): Likewise.
9139 2018-09-05 Nathan Sidwell <nathan@acm.org>
9142 * stor-layout.c (place_field): Scan forwards to check last
9143 bitfield when ms_bitfield_placement is in effect.
9145 2018-09-05 Richard Biener <rguenther@suse.de>
9148 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
9151 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
9152 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
9154 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
9155 * config.gcc (extra_objs): Build it.
9156 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
9158 * config/aarch64/aarch64-passes.def
9159 (pass_tag_collision_avoidance): New pass.
9160 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
9161 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
9162 (aarch64_classify_address): Remove static qualifier.
9163 (aarch64_address_info, aarch64_address_type): Move to...
9164 * config/aarch64/aarch64-protos.h: ... here.
9165 (make_pass_tag_collision_avoidance): New function.
9166 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
9169 2018-09-05 Martin Liska <mliska@suse.cz>
9171 * doc/gcov.texi: Update documentation of humar
9173 * gcov.c (format_count): Print one decimal place, it provides
9174 more fine number of situations like '1G' vs. '1.4G'.
9176 2018-09-05 Martin Liska <mliska@suse.cz>
9179 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
9180 * optc-gen.awk: Allow 'Var' for Deprecated options in order
9181 to generate a MASK value.
9183 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
9186 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
9187 if frame pointer isn't used.
9188 (compute_frame_pointer_to_fb_displacement): Likewise.
9190 2018-09-04 Jakub Jelinek <jakub@redhat.com>
9193 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
9194 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
9195 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
9196 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
9197 and OPTION_MASK_ISA_XSAVEC_UNSET.
9199 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
9201 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
9202 XOR operations in NAND case.
9204 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9206 * wide-int-range.cc (wide_int_range_convert): New.
9207 * wide-int-range.h (wide_int_range_convert): New.
9208 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
9209 code into wide_int_range_convert.
9210 (extract_range_into_wide_ints): Do not munge anti range constants
9211 into the entire domain. Just return the range back.
9213 2018-09-04 Martin Liska <mliska@suse.cz>
9215 * genmatch.c (output_line_directive): Add new argument
9217 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
9219 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9221 * doc/invoke.texi (Option Summary): Add whitespace.
9223 * doc/invoke.texi (Option Summary): Add -Waligned-new.
9225 2018-09-04 Richard Biener <rguenther@suse.de>
9227 PR tree-optimization/87211
9228 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
9229 backedge value we're supposed to treat as VARYING also number
9230 the PHI to VARYING in case it got a different value-number already.
9232 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
9234 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
9235 (extract_range_from_binary_expr_1): Do not call
9236 vrp_can_optimize_bit_op.
9237 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
9239 (wide_int_range_get_mask_and_bounds): New.
9240 (wide_int_range_optimize_bit_op): New.
9241 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
9242 (wide_int_range_bit_and): Same.
9243 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
9244 (wide_int_range_optimize_bit_op): New.
9245 (wide_int_range_get_mask_and_bounds): New.
9247 2018-09-04 Richard Biener <rguenther@suse.de>
9249 PR tree-optimization/87176
9250 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
9251 variable. When value-numbering a virtual PHI node make sure
9252 to not value-number to the backedge value.
9254 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
9256 * doc/extend.texi (Long Long, Hex Floats): Document support for
9257 long long and hex floats in more recent versions of ISO C++.
9259 2018-09-03 Richard Biener <rguenther@suse.de>
9261 PR tree-optimization/87177
9262 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
9265 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9267 * bb-reorder.c (edge_order): Convert to C-qsort-style
9268 tri-state comparator.
9269 (reorder_basic_blocks_simple): Change std::stable_sort to
9272 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9274 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
9275 tri-state comparator.
9276 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
9278 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9280 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
9281 (mergesort): ... here as maximum count for using netsort.
9282 (gcc_qsort): Set nlim to 3 if stable sort is requested.
9283 (gcc_stablesort): New.
9284 * system.h (gcc_stablesort): Declare.
9286 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
9288 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
9289 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
9290 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
9292 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
9294 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
9295 lxsdx and stxsdx alternatives.
9296 (*mov<mode>_hardfloat64): Ditto.
9297 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
9299 2018-09-03 Richard Biener <rguenther@suse.de>
9301 PR tree-optimization/87200
9302 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
9305 2018-09-03 Martin Liska <mliska@suse.cz>
9307 PR tree-optimization/87201
9308 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9309 Fix parenthesis in an expression.
9311 2018-09-03 Richard Biener <rguenther@suse.de>
9313 PR tree-optimization/87197
9314 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
9315 visited. CSE the VN_INFO hashtable lookup.
9317 PR tree-optimization/87169
9318 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
9319 iterating make sure there's no extra backedges from irreducible
9320 regions feeding the header. Mark the destination block
9323 2018-09-03 Martin Liska <mliska@suse.cz>
9326 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
9327 * common/common-targhooks.c (default_get_valid_option_values):
9329 * common/common-targhooks.h (default_get_valid_option_values):
9331 * common/config/i386/i386-common.c: Move processor_target_table
9333 (ix86_get_valid_option_values): New function.
9334 (TARGET_GET_VALID_OPTION_VALUES): New macro.
9335 * config/i386/i386.c (struct ptt): Move to i386-common.c.
9336 (PTA_*): Move all defined masks into i386-common.c.
9337 (ix86_function_specific_restore): Use new processor_cost_table.
9338 * config/i386/i386.h (struct ptt): Moved from i386.c.
9339 (struct pta): Likewise.
9340 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
9341 * doc/tm.texi.in: Likewise.
9342 * opt-suggestions.c (option_proposer::suggest_option):
9343 Pass prefix to build_option_suggestions.
9344 (option_proposer::get_completions): Likewise.
9345 (option_proposer::build_option_suggestions): Use the new target
9347 * opts.c (struct option_help_tuple): New struct.
9348 (print_filtered_help): Use the new target hook.
9350 2018-09-03 Martin Liska <mliska@suse.cz>
9353 * predict.c (set_even_probabilities): Add likely_edges
9354 argument and handle cases where we have precisely one
9356 (combine_predictions_for_bb): Catch also likely_edges.
9357 (tree_predict_by_opcode): Handle gswitch statements.
9358 * tree-cfg.h (find_case_label_for_value): New declaration.
9359 (find_taken_edge_switch_expr): Likewise.
9360 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
9361 Find pivot in decision tree based on probabily, not by number of
9364 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
9366 * doc/standards.texi (Standards): Update Objective-C reference.
9368 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
9370 * doc/install.texi (Prerequisites): Update link for MPC.
9372 2018-09-01 Michael Matz <matz@suse.de>
9374 PR tree-optimization/87074
9375 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
9376 PHIs for outer-loop uses.
9378 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
9380 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
9381 * doc/invoke.texi (C Dialect Options): Ditto.
9383 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
9385 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
9387 2018-08-31 Richard Biener <rguenther@suse.de>
9389 PR tree-optimization/87168
9390 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
9391 (rpo_elim::eliminate_avail): When OP was not visited it must
9394 2018-08-31 David Malcolm <dmalcolm@redhat.com>
9396 * tree-vrp.c (copy_value_range): Convert param "from" from
9397 "value_range *" to "const value_range *".
9398 (range_is_null): Likewise for param "vr".
9399 (range_int_cst_p): Likewise.
9400 (range_int_cst_singleton_p): Likewise.
9401 (symbolic_range_p): Likewise.
9402 (value_ranges_intersect_p): Likewise for both params.
9403 (value_range_nonnegative_p): Likewise for param "vr".
9404 (value_range_constant_singleton): Likewise.
9405 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
9406 (extract_range_into_wide_ints): Likewise for param "vr".
9407 (extract_range_from_multiplicative_op): Likewise for params "vr0"
9409 (vrp_can_optimize_bit_op): Likewise.
9410 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
9412 (extract_range_from_unary_expr): Likewise.
9413 (debug_value_range): Likewise for param "vr".
9414 (value_range::dump): Add "const" qualifier.
9415 (vrp_prop::check_array_ref): Convert local "vr" from
9416 "value_range *" to "const value_range *".
9417 (vrp_prop::check_mem_ref): Likewise.
9418 (vrp_prop::visit_stmt): Likewise for local "old_vr".
9419 (vrp_intersect_ranges_1): Likewise for param "vr_1".
9420 (vrp_intersect_ranges): Likewise.
9421 (simplify_stmt_for_jump_threading): Likewise for local "vr".
9422 (vrp_prop::vrp_finalize): Likewise.
9423 * tree-vrp.h (value_range::dump): Add "const" qualifier.
9424 (vrp_intersect_ranges): Add "const" qualifier to params as above.
9425 (extract_range_from_unary_expr): Likewise.
9426 (value_range_constant_singleton): Likewise.
9427 (symbolic_range_p): Likewise.
9428 (copy_value_range): Likewise.
9429 (extract_range_from_binary_expr_1): Likewise.
9430 (range_int_cst_p): Likewise.
9431 (vrp_set_zero_nonzero_bits): Likewise.
9432 (range_int_cst_singleton_p): Likewise.
9434 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
9436 * config/aarch64/arm_neon.h (vabsd_s64): New.
9437 (vnegd_s64): Likewise.
9439 2018-08-31 Martin Jambor <mjambor@suse.cz>
9441 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
9443 2018-08-31 Martin Liska <mliska@suse.cz>
9445 * ipa-icf.c (sem_item::add_type): Use
9446 sem_item::m_type_hash_cache.
9447 * ipa-icf.h: Move the cache from sem_item_optimizer
9450 2018-08-31 Nathan Sidwell <nathan@acm.org>
9452 * doc/extend.texi (Backwards Compatibility): Remove implicit
9453 extern C leeway of () being (...).
9455 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9457 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
9459 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
9463 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
9465 2018-08-31 Jakub Jelinek <jakub@redhat.com>
9468 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
9469 gen_int_mode. Formatting fixes.
9471 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
9473 * target.def (custom_function_descriptors): Improve documentation.
9474 * doc/tm.texi.in (Trampolines): Expand discussion of function
9475 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
9476 beginning of the section.
9477 * doc/tm.texi: Regenerated.
9479 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
9481 * cfg.h (class auto_edge_flag): Spell out the template-id of the
9482 base class in the initializer list. This is a workaround for
9483 building with older GCC.
9484 (class auto_bb_flag): Likewise.
9486 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
9488 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
9489 (altivec_vcmpequ<VI_char>_p): Remove star.
9490 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
9492 (expand_strncmp_vec_sequence): New function.
9493 (emit_final_str_compare_vec): New function.
9494 (expand_strn_compare): Add support for vector strncmp.
9495 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
9496 length specification to bytes.
9497 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
9498 (vcmpnezb_p): New pattern.
9499 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
9500 for option -mstring-compare-inline-limit.
9502 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
9504 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
9505 (PTA_SKYLAKE): Add PTA_AES.
9506 (PTA_GOLDMONT): Likewise.
9508 2018-08-29 Jan Hubicka <jh@suse.cz>
9511 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
9512 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
9514 2018-08-29 Jan Hubicka <jh@suse.cz>
9516 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
9518 (hash_tree): Do not visit TYPE_STUB_DECL.
9519 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
9520 stream TYPE_STUB_DECL.
9521 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
9522 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
9523 after free_lang_data.
9524 (type_in_anonymous_namespace_p): Likewise.
9526 2018-08-29 Jan Hubicka <jh@suse.cz>
9528 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9529 comment that it has to be even number.
9530 (class sreal): Change m_sig type to int32_t.
9531 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9532 int64_t for temporary calculations.
9533 (sreal_verify_basics): Drop one bit from minimum and maximum.
9535 2018-08-30 Richard Biener <rguenther@suse.de>
9537 PR tree-optimization/87147
9538 * tree-ssa-sccvn.c (SSA_VISITED): New function.
9539 (visit_phi): When the degenerate result is from the backedge and
9540 we didn't visit its definition yet drop to VARYING.
9541 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
9543 2018-08-29 Jan Hubicka <jh@suse.cz>
9545 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
9547 (hash_tree): Likewise.
9549 2018-08-29 Jan Hubicka <jh@suse.cz>
9551 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
9552 and TYPE_NEXT_REF_TO.
9554 2018-08-29 Jan Hubicka <jh@suse.cz>
9556 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9557 comment that it has to be even number.
9558 (class sreal): Change m_sig type to int32_t.
9559 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9560 int64_t for temporary calculations.
9561 (sreal_verify_basics): Drop one bit from minimum and maximum.
9563 2018-08-30 Tamar Christina <tamar.christina@arm.com>
9565 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
9567 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
9570 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
9571 if to_add is negative.
9573 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
9576 * builtins.c (c_strlen): Improve range checks.
9578 2018-08-29 Martin Sebor <msebor@redhat.com>
9579 Jeff Law <law@redhat.com>
9581 PR tree-optimization/86714
9582 PR tree-optimization/86711
9583 * builtins.c (c_strlen): Add arguments to call to string_constant.
9584 * expr.c (string_constant): Add argument. Detect missing nul
9585 terminator and outermost declaration it's missing in.
9586 * expr.h (string_constant): Add argument.
9587 * fold-const.c (read_from_constant_string): Add arguments to call to
9589 (c_getstr): Likewise.
9590 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9592 * tree-ssa-strlen.c (get_stridx): Likewise.
9594 2018-08-29 Jan Hubicka <jh@suse.cz>
9596 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
9597 Do not stream DECL_VINDEX.
9598 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
9599 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
9600 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
9602 2018-08-29 Richard Biener <rguenther@suse.de>
9604 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
9605 virtual operands that are not default defs to honor region
9607 (rpo_vn_valueize): Remove ineffective code here.
9609 2018-08-29 Richard Biener <rguenther@suse.de>
9611 PR tree-optimization/87132
9612 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
9613 when skipping defs reachable over backedges.
9615 2018-08-29 Richard Biener <rguenther@suse.de>
9617 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
9618 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
9619 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
9620 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
9621 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
9622 (vn_reference_lookup_3): Remove use of const_parms.
9623 (free_rpo_vn): Do not free const_parms.
9624 (do_rpo_vn): Do not call init_const_parms.
9625 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
9626 SSA_NAME_POINTS_TO_READONLY_MEMORY.
9627 (call_may_clobber_ref_p_1): Likewise.
9629 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
9632 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
9634 (-ftree-scev-cprop): Document.
9636 2018-08-29 Jan Hubicka <jh@suse.cz>
9638 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
9640 (sreal constructor): Update.
9641 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
9642 sreal:operator/): Update.
9644 2018-08-29 Martin Liska <mliska@suse.cz>
9646 * tree-switch-conversion.c (switch_conversion::expand):
9647 Strenghten assumption about gswitch statements.
9649 2018-08-29 Richard Biener <rguenther@suse.de>
9651 PR tree-optimization/87117
9652 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
9653 re-value-number released SSA VDEFs.
9655 2018-08-29 Richard Biener <rguenther@suse.de>
9657 PR tree-optimization/87126
9658 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
9660 2018-08-28 Jim Wilson <jimw@sifive.com>
9662 * config/riscv/pic.md: Rewrite.
9663 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
9665 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
9666 (SOFTF, default_load, softload, softstore): New.
9668 2018-08-28 Jeff Law <law@redhat.com>
9670 * fold-const.c (fold_binary_loc): Remove recently added assert.
9672 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
9674 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
9675 to OP parmeter of generated function.
9677 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
9679 PR tree-optimization/87009
9680 * match.pd: Add boolean optimizations.
9682 2018-08-28 Martin Sebor <msebor@redhat.com>
9685 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
9686 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
9687 (pass_walloca::gate): Use it.
9688 (alloca_call_type): Same.
9689 (pass_walloca::execute): Same.
9690 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
9692 2018-08-28 David Malcolm <dmalcolm@redhat.com>
9694 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
9695 GCC_VERSION for usage of "__gcc_dump_printf__" format from
9698 2018-08-28 Richard Biener <rguenther@suse.de>
9700 PR tree-optimization/87124
9701 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
9702 constants before looking up avail.
9704 2018-08-28 Jakub Jelinek <jakub@redhat.com>
9707 * calls.c (maybe_warn_nonstring_arg): Punt early if
9708 warn_stringop_overflow is zero. Don't call get_range_strlen
9709 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
9710 Swap comparison operands to have constants on rhs. Only use
9711 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
9712 increment lenrng[0].
9714 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
9716 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
9717 use of tree_to_shwi. Remove duplicated test for the size being
9718 a whole number of bytes.
9720 2018-08-28 Richard Biener <rguenther@suse.de>
9722 PR tree-optimization/87117
9723 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
9724 Handle removed stmt without LHS (GIMPLE_NOP).
9726 2018-08-28 Richard Biener <rguenther@suse.de>
9728 PR tree-optimization/87117
9729 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
9730 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
9732 2018-08-28 Richard Biener <rguenther@suse.de>
9734 PR tree-optimization/87117
9735 * tree-ssa-pre.c (compute_avail): Do not make expressions
9736 with predicated values available.
9737 (get_expr_value_id): Assert we do not run into predicated value
9740 2018-08-28 Richard Biener <rguenther@suse.de>
9742 PR tree-optimization/87117
9743 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
9744 get virtual operands.
9745 (get_expr_operands): Handle STRING_CST like other decls.
9747 2018-08-28 Martin Liska <mliska@suse.cz>
9749 * tree.h: Update documentation of fndecl_built_in_p
9753 2018-08-27 Jeff Law <law@redhat.com>
9754 PR tree-optimization/87110
9755 * tree-ssa-dse.c (compute_trims): Handle non-constant
9758 2018-08-27 Martin Sebor <msebor@redhat.com>
9760 PR tree-optimization/86914
9761 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
9763 2018-08-27 Martin Sebor <msebor@redhat.com>
9765 PR tree-optimization/87112
9766 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
9767 the type of the bound argument.
9769 2018-08-27 Jeff Law <law@redhat.com>
9771 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
9772 type does not have a TYPE_SIZE_UNIT.
9774 2018-08-27 Steve Ellcey <sellcey@cavium.com>
9776 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
9777 with include of backend.h.
9779 2018-08-27 Richard Biener <rguenther@suse.de>
9781 PR tree-optimization/86927
9782 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
9783 use const cond reduction code.
9785 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
9787 PR tree-optimization/85758
9788 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
9790 2018-08-27 David Malcolm <dmalcolm@redhat.com>
9793 * diagnostic-show-locus.c (class layout_range): Update for
9794 conversion of show_caret_p to a tri-state.
9795 (layout_range::layout_range): Likewise.
9796 (make_range): Likewise.
9797 (layout::maybe_add_location_range): Likewise.
9798 (layout::should_print_annotation_line_p): Don't show annotation
9799 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
9800 (layout::get_state_at_point): Update for conversion of
9801 show_caret_p to a tri-state. Bail out early for
9802 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
9803 underlining or source colorization.
9804 (gcc_rich_location::add_location_if_nearby): Update for conversion
9805 of show_caret_p to a tri-state.
9806 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
9807 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
9809 (selftest::test_one_liner_labels): Likewise.
9810 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
9811 conversion of show_caret_p to a tri-state.
9812 * pretty-print.c (text_info::set_location): Likewise.
9813 * pretty-print.h (text_info::set_location): Likewise.
9814 * substring-locations.c (format_warning_n_va): Likewise.
9815 * tree-diagnostic.c (default_tree_printer): Likewise.
9816 * tree-pretty-print.c (newline_and_indent): Likewise.
9818 2018-08-27 David Malcolm <dmalcolm@redhat.com>
9821 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
9822 line above for line-insertion fix-it hints.
9823 (selftest::test_fixit_insert_containing_newline): Update the
9824 expected results, and add a test with line-numbering enabled.
9826 2018-08-27 Martin Liska <mliska@suse.cz>
9829 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
9830 params with DECL_HAS_VALUE_EXPR_P.
9832 2018-08-27 Martin Liska <mliska@suse.cz>
9834 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
9835 selected expansion strategy.
9837 2018-08-27 Martin Liska <mliska@suse.cz>
9839 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9840 * builtins.c (is_builtin_fn): Likewise.
9841 * attribs.c (diag_attr_exclusions): Use new function
9842 fndecl_built_in_p and remove check for FUNCTION_DECL if
9844 (builtin_mathfn_code): Likewise.
9845 (fold_builtin_expect): Likewise.
9846 (fold_call_expr): Likewise.
9847 (fold_builtin_call_array): Likewise.
9848 (fold_call_stmt): Likewise.
9849 (set_builtin_user_assembler_name): Likewise.
9850 (is_simple_builtin): Likewise.
9851 * calls.c (gimple_alloca_call_p): Likewise.
9852 (maybe_warn_nonstring_arg): Likewise.
9853 * cfgexpand.c (expand_call_stmt): Likewise.
9854 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
9855 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
9856 (cgraph_node::verify_node): Likewise.
9857 * cgraphclones.c (build_function_decl_skip_args): Likewise.
9858 (cgraph_node::create_clone): Likewise.
9859 * config/arm/arm.c (arm_insert_attributes): Likewise.
9860 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
9861 * dse.c (scan_insn): Likewise.
9862 * expr.c (expand_expr_real_1): Likewise.
9863 * fold-const.c (operand_equal_p): Likewise.
9864 (fold_binary_loc): Likewise.
9865 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9866 * gimple-low.c (lower_stmt): Likewise.
9867 * gimple-pretty-print.c (dump_gimple_call): Likewise.
9868 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9870 * gimple.c (gimple_build_call_from_tree): Likewise.
9871 (gimple_call_builtin_p): Likewise.
9872 (gimple_call_combined_fn): Likewise.
9873 * gimplify.c (gimplify_call_expr): Likewise.
9874 (gimple_boolify): Likewise.
9875 (gimplify_modify_expr): Likewise.
9876 (gimplify_addr_expr): Likewise.
9877 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
9878 * ipa-cp.c (determine_versionability): Likewise.
9879 * ipa-fnsummary.c (compute_fn_summary): Likewise.
9880 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
9881 * ipa-split.c (visit_bb): Likewise.
9882 (split_function): Likewise.
9883 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9884 * lto-cgraph.c (input_node): Likewise.
9885 * lto-streamer-out.c (write_symbol): Likewise.
9886 * omp-low.c (setjmp_or_longjmp_p): Likewise.
9887 (lower_omp_1): Likewise.
9888 * predict.c (strip_predict_hints): Likewise.
9889 * print-tree.c (print_node): Likewise.
9890 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
9891 * trans-mem.c (is_tm_irrevocable): Likewise.
9892 (is_tm_load): Likewise.
9893 (is_tm_simple_load): Likewise.
9894 (is_tm_store): Likewise.
9895 (is_tm_simple_store): Likewise.
9896 (is_tm_abort): Likewise.
9897 (tm_region_init_1): Likewise.
9898 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
9899 * tree-cfg.c (verify_gimple_call): Likewise.
9900 (move_stmt_r): Likewise.
9901 (stmt_can_terminate_bb_p): Likewise.
9902 * tree-eh.c (lower_eh_constructs_2): Likewise.
9903 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9904 * tree-inline.c (remap_gimple_stmt): Likewise.
9905 (copy_bb): Likewise.
9906 (estimate_num_insns): Likewise.
9907 (fold_marked_statements): Likewise.
9908 * tree-sra.c (scan_function): Likewise.
9909 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9910 (optimize_stack_restore): Likewise.
9911 (pass_fold_builtins::execute): Likewise.
9912 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9913 (mark_all_reaching_defs_necessary_1): Likewise.
9914 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9915 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9916 (pass_forwprop::execute): Likewise.
9917 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9918 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9919 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9920 * tree-ssa-strlen.c (get_string_length): Likewise.
9921 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9922 (find_func_aliases_for_call): Likewise.
9923 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9924 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9925 * tree-tailcall.c (find_tail_calls): Likewise.
9926 * tree.c (need_assembler_name_p): Likewise.
9927 (free_lang_data_in_decl): Likewise.
9928 (get_call_combined_fn): Likewise.
9929 * ubsan.c (is_ubsan_builtin_p): Likewise.
9930 * varasm.c (incorporeal_function_p): Likewise.
9931 * tree.h (DECL_BUILT_IN): Remove and replace with
9933 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9934 (fndecl_built_in_p): New.
9936 2018-08-27 Martin Liska <mliska@suse.cz>
9938 PR tree-optimization/86847
9939 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9940 Dump also subtree probability.
9941 (switch_decision_tree::do_jump_if_equal): New function.
9942 (switch_decision_tree::emit_case_nodes): Handle special
9943 situations in balanced tree that can be emitted much simpler.
9944 Fix calculation of probabilities that happen in tree expansion.
9945 * tree-switch-conversion.h (struct cluster): Add
9947 (struct simple_cluster): Likewise.
9948 (struct case_tree_node): Add new function has_child.
9949 (do_jump_if_equal): New.
9951 2018-08-27 Martin Liska <mliska@suse.cz>
9953 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9954 Add new argument to bit_test_cluster constructor.
9955 (bit_test_cluster::emit): Set bits really number of values
9957 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9958 probability argument.
9959 * tree-switch-conversion.h (struct bit_test_cluster):
9960 Add m_handles_entire_switch.
9962 2018-08-27 Martin Liska <mliska@suse.cz>
9964 PR tree-optimization/86702
9965 * tree-switch-conversion.c (jump_table_cluster::emit):
9966 Make probabilities even for values in jump table
9967 according to number of cases handled.
9968 (switch_decision_tree::compute_cases_per_edge): Pass
9969 argument to reset_out_edges_aux function.
9970 (switch_decision_tree::analyze_switch_statement): Likewise.
9971 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9974 2018-08-27 Martin Liska <mliska@suse.cz>
9976 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9977 cfun argument explicitly.
9978 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9979 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9980 function gimple_switch_default_bb.
9981 (convert_switch_statements):
9983 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9984 * stmt.c (label_to_block_fn): Use label_to_block and pass
9985 cfun argument explicitly and use gimple_switch_label_bb.
9986 (expand_case): Likewise.
9987 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9988 cfun argument explicitly. Likewise.
9989 (make_edges_bb): Likewise.
9990 (make_cond_expr_edges): Likewise.
9991 (get_cases_for_edge): Likewise.
9992 (make_gimple_switch_edges): Likewise.
9993 (label_to_block_fn): Likewise.
9994 (label_to_block): Likewise.
9995 (make_goto_expr_edges): Likewise.
9996 (make_gimple_asm_edges): Likewise.
9997 (main_block_label): Likewise.
9998 (group_case_labels_stmt): Likewise.
9999 (find_taken_edge_computed_goto): Likewise.
10000 (find_taken_edge_switch_expr): Likewise.
10001 (gimple_verify_flow_info): Likewise.
10002 (gimple_redirect_edge_and_branch): Likewise.
10003 (gimple_switch_label_bb): New function.
10004 (gimple_switch_default_bb): Likewise.
10005 (gimple_switch_edge): Likewise.
10006 (gimple_switch_default_edge): Likewise.
10007 * tree-cfg.h (label_to_block_fn): Remove and replace ...
10008 (label_to_block): ... with this.
10009 (gimple_switch_label_bb): New.
10010 (gimple_switch_default_bb): Likewise.
10011 (gimple_switch_edge): Likewise.
10012 (gimple_switch_default_edge): Likewise.
10013 * tree-cfgcleanup.c (convert_single_case_switch): Use
10014 new gimple functions and pass new argument to label_to_block.
10015 (cleanup_control_flow_bb):
10016 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
10017 cfun argument explicitly.
10018 (make_eh_edges): Likewise.
10019 (redirect_eh_dispatch_edge): Likewise.
10020 (lower_resx): Likewise.
10021 (lower_eh_dispatch): Likewise.
10022 (maybe_remove_unreachable_handlers): Likewise.
10023 (unsplit_eh): Likewise.
10024 (cleanup_empty_eh): Likewise.
10025 (verify_eh_edges): Likewise.
10026 (verify_eh_dispatch_edge): Likewise.
10027 * tree-ssa-dom.c (record_edge_info): Likewise.
10028 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
10029 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
10030 (thread_through_normal_block): Likewise.
10031 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
10032 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
10033 * tree-switch-conversion.c (switch_conversion::collect): Use new
10035 (switch_conversion::check_final_bb): Likewise.
10036 (switch_conversion::gather_default_values): Pass new argument
10038 (switch_conversion::build_constructors): Likewise.
10039 (switch_decision_tree::compute_cases_per_edge): Use new
10040 gimple_switch_edge function.
10041 (switch_decision_tree::analyze_switch_statement): Pass new argument
10043 (switch_decision_tree::try_switch_expansion): Use
10044 gimple_switch_default_edge.
10045 * tree-vrp.c (find_switch_asserts): Pass new argument
10047 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
10048 (vr_values::simplify_switch_using_ranges): Likewise.
10050 2018-08-27 Richard Biener <rguenther@suse.de>
10052 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
10053 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
10055 * tree-ssa-sccvn.h (struct vn_pval): New structure.
10056 (struct vn_nary_op_s): Add unwind_to member. Add
10057 predicated_values flag and put result into a union together
10058 with a linked list of vn_pval.
10059 (struct vn_ssa_aux): Add name member to make maintaining
10060 a map of SSA name to vn_ssa_aux possible. Remove no longer
10061 needed info, dfsnum, low, visited, on_sccstack, use_processed
10062 and range_info_anti_range_p members.
10063 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
10064 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
10066 (vn_valueize): New global.
10067 (vn_context_bb): Likewise.
10068 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
10069 VN_INFO_PTR_INFO): Remove.
10070 * tree-ssa-sccvn.c: ... (rewrite)
10071 (pass_fre::execute): For -O2+ initialize loops and run
10072 RPO VN in optimistic mode (iterating). For -O1 and -Og
10073 run RPO VN in non-optimistic mode.
10074 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
10075 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
10076 * doc/invoke.texi (sccvn-max-scc-size): Remove.
10077 (rpo-vn-max-loop-depth): Document.
10078 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
10079 when valuezing the VUSE signals we walked out of the region.
10080 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
10081 (phi_translate): Set VN context block to use for availability
10083 (compute_avail): Likewise.
10084 (pre_valueize): New function.
10085 (pass_pre::execute): Adjust to the RPO VN API.
10087 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
10088 (propagate_constants_for_unrolling): Remove.
10089 (tree_unroll_loops_completely): Perform value-numbering
10090 on the unrolled bodies loop parent.
10092 2018-08-27 Richard Biener <rguenther@suse.de>
10094 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
10095 for partial antic compute.
10097 2018-08-27 Jakub Jelinek <jakub@redhat.com>
10099 PR rtl-optimization/87065
10100 * combine.c (simplify_if_then_else): Formatting fix.
10101 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
10103 (known_cond): Don't return const_true_rtx for vector modes. Use
10104 CONST0_RTX instead of const0_rtx. Formatting fixes.
10106 2018-08-27 Martin Liska <mliska@suse.cz>
10108 PR gcov-profile/87069
10109 * gcov.c (process_file): Record files already processed
10110 and warn about a file being processed multiple times.
10112 2018-08-27 Martin Liska <mliska@suse.cz>
10115 * config/aarch64/aarch64.c (aarch64_override_options_internal):
10116 Set default values for x_aarch64_*_string strings.
10117 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
10118 prefix. For -mabi do not print '=ABI' in help and use
10119 <option_value> format for -msve-vector-bits and -moverride
10122 2018-08-26 Jeff Law <law@redhat.com>
10124 * config/mips/frame-header-opt.c: Include "backend.h" rather than
10127 2018-08-26 Marek Polacek <polacek@redhat.com>
10129 PR c++/87029, Implement -Wredundant-move.
10130 * doc/invoke.texi: Document -Wredundant-move.
10132 2018-08-25 Martin Sebor <msebor@redhat.com>
10134 PR tree-optimization/87059
10135 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
10136 to the same type as the other.
10137 * fold-const.c (fold_binary_loc): Assert expectation.
10139 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
10141 * config/darwin.c (machopic_legitimize_pic_address): Clean up
10142 extraneous parentheses, dead code section and formatting.
10144 2018-08-24 David Malcolm <dmalcolm@redhat.com>
10147 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
10148 wide enough for jumps in the line-numbering to be visible.
10149 (layout::print_gap_in_line_numbering): New member function.
10150 (layout::calculate_line_spans): When using line numbering, merge
10151 line spans that are only 1 line apart.
10152 (diagnostic_show_locus): When printing line numbers, show gaps in
10153 line numbering directly, rather than printing headers.
10154 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
10155 line-numbering with multiple line spans.
10156 (selftest::test_fixit_insert_containing_newline_2): Add test of
10157 line-numbering, in which the spans are close enough to be merged.
10159 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10161 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
10162 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
10163 * tree-vrp.c (range_is_nonnull): Remove.
10164 (range_includes_zero_p): Accept value_range instead of min/max.
10165 (extract_range_from_binary_expr_1): Do not early bail on
10167 Use range_includes_zero_p instead of range_is_nonnull.
10168 (extract_range_from_unary_expr): Use range_includes_zero_p instead
10169 of range_is_nonnull.
10170 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
10171 special case VR_ANTI_RANGE.
10172 (vrp_finalize): Same.
10173 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
10174 instead of min/max.
10175 (range_is_nonnull): Remove.
10176 * vr-values.c (vrp_stmt_computes_nonzero): Use
10177 range_includes_zero_p instead of range_is_nonnull.
10178 (extract_range_basic): Pass value_range to range_includes_zero_p
10179 instead of range_is_nonnull.
10181 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
10183 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
10184 * emit-rtl.h (rtl_data): Remove return_bnd.
10185 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
10186 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
10187 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
10188 (POINTER_BOUNDS_MODE): Remove definition.
10189 (make_pointer_bounds_mode): Remove.
10190 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
10191 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
10192 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
10193 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
10194 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
10195 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
10196 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
10198 * config/i386/i386-modes.def (BND32, BND64): Remove.
10199 * config/i386/i386.c (dbx_register_map): Remove bound registers.
10200 (dbx64_register_map): Ditto.
10201 (svr4_dbx_register_map): Ditto.
10202 (indirect_thunk_bnd_needed): Remove.
10203 (indirect_thunks_bnd_used): Ditto.
10204 (indirect_return_bnd_needed): Ditto.
10205 (indirect_return_via_cx_bnd): Ditto.
10206 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
10207 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
10208 (output_indirect_thunk): Ditto. Remove need_prefix argument.
10209 (output_indirect_thunk_function): Remove handling of
10210 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
10211 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
10212 (ix86_save_reg): Remove handling of crtl->return_bnd.
10213 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
10214 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
10215 and UNSPEC_BNDLX_ADDR.
10216 (ix86_output_indirect_branch_via_reg): Remove handling of
10217 indirect_thunk_prefix_bnd.
10218 (ix86_output_indirect_branch_via_push): Ditto.
10219 (ix86_output_function_return): Ditto.
10220 (ix86_output_indirect_function_return): Ditto.
10221 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
10222 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
10223 (CALL_USED_REGISTERS): Ditto.
10224 (REG_ALLOC_ORDER): Update for removal of bound registers.
10225 (HI_REGISTER_NAMES): Ditto.
10226 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
10227 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
10228 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
10229 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
10230 (FIRST_PSEUDO_REG): Update.
10231 (BND): Remove mode iterator.
10232 * config/i386/predicates.md (bnd_mem_operator): Remove.
10234 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10236 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
10239 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
10241 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
10242 the case in which the permute needs only a single element and
10243 repeats for every vector of the result. Extend that case to
10244 handle variable-length vectors.
10245 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10247 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
10250 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
10251 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
10253 2018-08-24 Richard Biener <rguenther@suse.de>
10255 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
10256 bb_flags_allocated members.
10257 (auto_flag): New RAII class for allocating flags.
10258 (auto_edge_flag): New RAII class for allocating edge flags.
10259 (auto_bb_flag): New RAII class for allocating bb flags.
10260 * cfgloop.c (verify_loop_structure): Allocate temporary edge
10262 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
10263 in favor of temporarily allocated BB flag.
10264 * hsa-brig.c: Re-order includes.
10265 * hsa-dump.c: Likewise.
10266 * hsa-regalloc.c: Likewise.
10267 * print-rtl.c: Likewise.
10268 * profile-count.c: Likewise.
10270 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
10273 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
10276 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
10279 * wide-int-range.cc (wide_int_range_div): Do not ignore result
10280 from wide_int_range_multiplicative_op.
10282 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10284 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
10287 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
10289 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
10292 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
10294 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
10295 full GENERIC expression used for replacement.
10297 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
10299 * tree-vrp.c (abs_extent_range): Remove.
10300 (extract_range_into_wide_ints): Pass wide ints by reference.
10301 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
10302 Pass wide ints by reference in all calls to
10303 extract_range_into_wide_ints.
10304 * wide-int-range.cc (wide_int_range_div): New.
10305 * wide-int-range.h (wide_int_range_div): New.
10306 (wide_int_range_includes_zero_p): New.
10307 (wide_int_range_zero_p): New.
10309 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
10311 * config/aarch64/aarch64.md (arches): New enum.
10312 (arch): New enum attr.
10313 (arch_enabled): New attr.
10314 (enabled): Now uses arch_enabled only.
10315 (simd, sve, fp16): Removed attribute.
10316 (fp): Attr now defined in terms of 'arch'.
10317 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
10318 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
10319 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
10320 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
10321 attributes into 'arch'.
10322 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
10323 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
10324 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
10325 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
10326 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
10327 'simd' attribute into 'arch'.
10328 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
10329 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
10330 Convert use of 'fp' attribute to 'arch'.
10331 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
10332 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
10334 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
10335 (different modes) Merge 'fp' and 'simd' into 'arch'.
10336 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
10337 'simd' into 'arch'.
10339 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
10341 PR rtl-optimization/87026
10342 * expmed.c (canonicalize_comparison): If we can no longer create
10343 pseudoregisters, don't.
10345 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
10348 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
10350 * config/arm/arm.c (speculation_barrier_libfunc): New static
10352 (arm_init_libfuncs): Initialize it.
10353 (arm_emit_speculation_barrier): New function.
10354 * config/arm/arm.md (speculation_barrier): Call
10355 arm_emit_speculation_barrier for architectures that do not have
10357 (speculation_barrier_insn): Only match on Armv7 or later.
10359 2018-08-23 Richard Biener <rguenther@suse.de>
10361 PR middle-end/87024
10362 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
10365 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
10367 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
10368 of single-vector TBLs.
10369 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
10370 one input is given.
10372 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
10375 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
10376 aarch64_evpc_tbl guard.
10378 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
10380 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
10383 2018-08-22 Martin Sebor <msebor@redhat.com>
10385 PR middle-end/87052
10386 * tree-pretty-print.c (pretty_print_string): Add argument.
10387 (dump_generic_node): Call to pretty_print_string with string size.
10389 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
10391 PR rtl-optimization/86771
10392 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
10393 of two SETs into those two SETs, one to be placed at i2, if that SETs
10394 destination is modified between i2 and i3.
10396 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10398 PR tree-optimization/86725
10399 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
10401 (vect_analyze_scalar_cycles_1): Check it.
10403 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10405 PR tree-optimization/86725
10406 * tree-vect-loop.c (vect_is_simple_reduction): When treating
10407 an outer loop phi as a double reduction, make sure that the
10408 single user of the phi result is an inner loop phi.
10410 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10412 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
10413 grouped stores with gaps to a strided group.
10415 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10417 * tree-vect-stmts.c (get_group_load_store_type)
10418 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
10419 first statement in a group.
10421 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10423 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
10424 the sequence used in gcc/gcc.c.
10426 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10429 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
10432 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10434 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
10435 Darwin10-specific unwinder-shim.
10436 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
10437 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
10438 New to cater for Darwin10 Rosetta.
10440 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10442 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
10443 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
10445 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10450 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
10451 (dwarf2out_switch_text_section): Generate a local label for the
10452 second function sub-section and apply it as the second FDE start
10454 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
10455 second sub-section start.
10457 2018-08-22 Richard Biener <rguenther@suse.de>
10459 PR tree-optimization/86988
10460 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
10462 2018-08-22 Richard Biener <rguenther@suse.de>
10464 PR tree-optimization/86945
10465 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
10467 2018-08-22 Alexandre Oliva <oliva@adacore.com>
10469 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
10470 a comment about how uses of r2 for .sdata2 come about.
10472 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
10474 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
10476 2018-08-21 Marek Polacek <polacek@redhat.com>
10478 PR c++/86981, Implement -Wpessimizing-move.
10479 * doc/invoke.texi: Document -Wpessimizing-move.
10481 2018-08-21 Jan Hubicka <jh@suse.cz>
10483 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
10484 * tree.h (is_redundant_typedef): Remove.
10485 * dwarf2out.c (is_redundant_typedef): Turn into static function.
10487 2018-08-21 Jan Hubicka <jh@suse.cz>
10489 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
10492 2018-08-21 Tamar Christina <tamar.christina@arm.com>
10494 * expmed.c (extract_low_bits): Reject invalid subregs early.
10496 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
10498 PR middle-end/86121
10499 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
10502 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10504 * config/vxworks.h: Guard vxworks_asm_out_constructor and
10505 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
10506 * config/vxworks.c: Likewise.
10508 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10510 * config/vxworks.c: Set targetm.have_ctors_dtors
10511 if HAVE_INITFINI_ARRAY_SUPPORT.
10512 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
10513 if HAVE_INITFINI_ARRAY_SUPPORT.
10515 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10517 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
10518 default search path for VxWorks < 7.
10520 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
10522 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
10523 (get_format_string): Refer to c_getstr.
10525 2018-08-21 Tom de Vries <tdevries@suse.de>
10527 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10528 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10529 (debuginfo_early_stop): Declare.
10530 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10531 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10532 (debuginfo_early_stop): New function.
10533 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
10534 and debuginfo_early_stop.
10535 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
10536 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
10537 (general_init): Call debuginfo_early_init.
10538 (finalize): Call debuginfo_fini.
10539 (do_compile): Call debuginfo_init.
10540 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
10541 -fdump-early-debug.
10542 (@item -fdump-debug, @item -fdump-earlydebug): Add.
10544 2018-08-21 Tom de Vries <tdevries@suse.de>
10546 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
10547 flag_dump_noaddr and flag_dump_unnumbered.
10549 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
10551 * wide-int-range.cc (wide_int_range_abs): New.
10552 (wide_int_range_order_set): Rename from wide_int_range_min_max.
10553 * wide-int-range.h (wide_int_range_abs): New.
10554 (wide_int_range_min_max): New.
10555 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
10556 case to call wide_int_range_abs.
10557 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
10558 (extract_range_from_abs_expr): Delete.
10560 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
10563 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
10564 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
10567 2018-08-20 Nathan Sidwell <nathan@acm.org>
10568 Jeff Law <law@redhat.com>
10570 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
10571 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
10573 2018-08-20 David Malcolm <dmalcolm@redhat.com>
10576 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
10577 (decl_attributes): Likewise.
10578 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
10580 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10581 * diagnostic-core.h (class auto_diagnostic_group): New class.
10582 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
10583 (diagnostic_report_diagnostic): Handle the first diagnostics within
10585 (emit_diagnostic): Add auto_diagnostic_group instance.
10586 (inform): Likewise.
10587 (inform_n): Likewise.
10588 (warning): Likewise.
10589 (warning_at): Likewise.
10590 (warning_n): Likewise.
10591 (pedwarn): Likewise.
10592 (permerror): Likewise.
10594 (error_n): Likewise.
10595 (error_at): Likewise.
10597 (fatal_error): Likewise.
10598 (internal_error): Likewise.
10599 (internal_error_no_backtrace): Likewise.
10600 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
10601 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
10602 * diagnostic.h (struct diagnostic_context): Add fields
10603 "diagnostic_group_nesting_depth",
10604 "diagnostic_group_emission_count", "begin_group_cb",
10606 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
10607 Add auto_diagnostic_group instance(s).
10608 (find_explicit_erroneous_behavior): Likewise.
10609 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
10610 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
10611 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
10612 (gimplify_va_arg_expr): Likewise.
10613 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
10614 (HSA_SORRY_AT): Likewise.
10615 * ipa-devirt.c (compare_virtual_tables): Likewise.
10616 (warn_odr): Likewise.
10617 * multiple_target.c (expand_target_clones): Likewise.
10618 * opts-common.c (cmdline_handle_error): Likewise.
10619 * reginfo.c (globalize_reg): Likewise.
10620 * substring-locations.c (format_warning_n_va): Likewise.
10621 * tree-inline.c (expand_call_inline): Likewise.
10622 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
10623 * tree-ssa-loop-niter.c
10624 (do_warn_aggressive_loop_optimizations): Likewise.
10625 * tree-ssa-uninit.c (warn_uninit): Likewise.
10626 * tree.c (warn_deprecated_use): Likewise.
10628 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
10631 * config/i386/i386.md (eh_return): Always update EH return
10632 address in word_mode.
10634 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
10636 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
10637 TARGET_SPLIT_COMPLEX_ARG is defined.
10639 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
10641 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
10643 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
10646 * expr.c (expand_assignment): Assert that bitpos is positive.
10647 (store_field): Likewise
10648 (expand_expr_real_1): Make sure that bitpos is positive.
10649 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
10652 2018-08-20 Nathan Sidwell <nathan@acm.org>
10654 * Makefile.in (CPP_ID_DATA_H): Delete.
10655 (CPP_INTERNAL_H): Don't add it.
10656 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
10657 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
10659 2018-08-20 Richard Biener <rguenther@suse.de>
10661 PR tree-optimization/78655
10662 * tree-vrp.c (extract_range_from_binary_expr_1): Make
10663 pointer + offset nonnull if either operand is nonnull work.
10665 2018-08-20 Tom de Vries <tdevries@suse.de>
10667 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
10668 unless the referenced die describes the added property using
10669 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
10670 Otherwise, add a DW_AT_location to the referenced die.
10672 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
10675 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
10676 register_operand when calling ix86_set_reg_reg_cost.
10677 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
10678 Set *total to 0 for operands that satisfy x86_64_immediate_operand
10679 predicate and to 1 otherwise.
10681 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
10683 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
10684 emit a diagnostic that it is not supported and reset the option.
10685 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
10686 supported and consume the option. (ASM_FINAL_SPEC): New.
10688 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
10690 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
10693 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
10695 C-SKY port: Documentation
10697 * doc/extend.texi (C-SKY Function Attributes): New section.
10698 * doc/invoke.texi (Option Summary): Add C-SKY options.
10699 (C-SKY Options): New section.
10700 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
10702 2018-08-17 Jojo <jijie_rong@c-sky.com>
10703 Huibin Wang <huibin_wang@c-sky.com>
10704 Sandra Loosemore <sandra@codesourcery.com>
10705 Chung-Lin Tang <cltang@codesourcery.com>
10707 C-SKY port: Backend implementation
10709 * config/csky/*: New.
10710 * common/config/csky/*: New.
10712 2018-08-17 Jojo <jijie_rong@c-sky.com>
10713 Huibin Wang <huibin_wang@c-sky.com>
10714 Sandra Loosemore <sandra@codesourcery.com>
10715 Chung-Lin Tang <cltang@codesourcery.com>
10716 Andrew Jenner <andrew@codesourcery.com>
10718 C-SKY port: Configury
10720 * config.gcc (csky-*-*): New.
10721 * configure.ac: Add csky to targets for dwarf2 debug_line support.
10722 * configure: Regenerated.
10724 2018-08-17 David Malcolm <dmalcolm@redhat.com>
10726 * dump-context.h: Include "dumpfile.h".
10727 (dump_context::dump_printf_va): Convert final param from va_list
10728 to va_list *. Convert from ATTRIBUTE_PRINTF to
10729 ATTRIBUTE_GCC_DUMP_PRINTF.
10730 (dump_context::dump_printf_loc_va): Likewise.
10731 * dumpfile.c: Include "stringpool.h".
10732 (make_item_for_dump_printf_va): Delete.
10733 (make_item_for_dump_printf): Delete.
10734 (class dump_pretty_printer): New class.
10735 (dump_pretty_printer::dump_pretty_printer): New ctor.
10736 (dump_pretty_printer::emit_items): New member function.
10737 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
10739 (dump_pretty_printer::emit_item): New member function.
10740 (dump_pretty_printer::stash_item): New member function.
10741 (dump_pretty_printer::format_decoder_cb): New member function.
10742 (dump_pretty_printer::decode_format): New member function.
10743 (dump_context::dump_printf_va): Reimplement in terms of
10744 dump_pretty_printer.
10745 (dump_context::dump_printf_loc_va): Convert final param from va_list
10747 (dump_context::begin_scope): Reimplement call to
10748 make_item_for_dump_printf.
10749 (dump_printf): Update for change to dump_printf_va.
10750 (dump_printf_loc): Likewise.
10751 (selftest::test_capture_of_dump_calls): Convert "stmt" from
10752 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
10753 with %T, %E, and %G.
10754 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
10755 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
10756 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
10757 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
10758 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
10759 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
10760 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
10761 within a dump_printf_loc call to "%wu".
10762 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
10763 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
10764 missing space after "=".
10765 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
10766 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
10767 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
10768 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
10769 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
10770 duplicate "vectorized" from message.
10772 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
10774 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
10775 polyNxK_t element's TYPE_STRING_FLAG.
10777 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
10779 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
10780 (they were unnamed before). Fix comments.
10782 2018-08-17 Nathan Sidwell <nathan@acm.org>
10784 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
10786 2018-08-17 Richard Biener <rguenther@suse.de>
10788 PR tree-optimization/86841
10789 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
10791 2018-08-17 Martin Liska <mliska@suse.cz>
10793 * common.opt: Remove Warn, Init and Report for options with
10794 Ignore/Deprecated flag. Warning is done automatically for
10796 * config/i386/i386.opt: Likewise.
10797 * config/ia64/ia64.opt: Likewise.
10798 * config/rs6000/rs6000.opt: Likewise.
10799 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
10800 Remove usage of flag_check_pointer_bounds.
10801 * lto-wrapper.c (merge_and_complain): Do not handle
10802 OPT_fcheck_pointer_bounds.
10803 (append_compiler_options): Likewise.
10804 * opt-functions.awk: Do not handle Deprecated.
10805 * optc-gen.awk: Check that Var, Report and Init are not
10806 used for an option with Ignore/Deprecated flag.
10807 * opts-common.c (decode_cmdline_option): Do not report
10809 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
10811 * opts.h (struct cl_option): Remove cl_deprecated flag.
10812 (CL_ERR_DEPRECATED): Remove error enum value.
10814 2018-08-17 Richard Biener <rguenther@suse.de>
10816 PR middle-end/86505
10817 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
10818 across a va-arg-pack using call adjust its return value accordingly.
10820 2018-08-16 Martin Sebor <msebor@redhat.com>
10822 PR tree-optimization/86853
10823 * gimple-ssa-sprintf.c (struct format_result): Rename member.
10824 (struct fmtresult): Add member and initialize it in ctors.
10825 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
10826 (format_string): Handle %S the same as %ls. Set MAYFAIL.
10827 (format_directive): Set POSUNDER4K when MAYFAIL is set.
10828 (parse_directive): Handle %C same as %c.
10829 (sprintf_dom_walker::compute_format_length): Adjust.
10830 (is_call_safe): Adjust.
10832 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10834 * builtins.c (c_strlen): Add new parameter eltsize. Use it
10835 for determining how to count the elements.
10836 * builtins.h (c_strlen): Adjust prototype.
10837 * expr.c (string_constant): Add new parameter mem_size.
10838 Set *mem_size appropriately.
10839 * expr.h (string_constant): Adjust protoype.
10840 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
10841 * gimple-fold.h (get_range_strlen): Adjust prototype.
10842 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
10843 (format_string): Call get_string_length with eltsize.
10845 2018-08-16 David Malcolm <dmalcolm@redhat.com>
10847 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
10848 to emit the span, rather than setting it as the prefix.
10850 2018-08-16 David Malcolm <dmalcolm@redhat.com>
10852 * diagnostic-show-locus.c (layout::start_annotation_line): Add
10853 "margin_char" parameter, defaulting to space. Use it in place
10854 of pp_space for the initial part of the margin.
10855 (layout::print_leading_fixits): Use '+' when filling the margin
10856 of line-insertion fix-it hints.
10858 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10860 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
10863 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10865 * config/rs6000/altivec.md: Don't set length attribute to the default
10867 * config/rs6000/darwin.md: Ditto.
10868 * config/rs6000/dfp.md: Ditto.
10869 * config/rs6000/htm.md: Ditto.
10870 * config/rs6000/rs6000.md: Ditto.
10871 * config/rs6000/sync.md: Ditto.
10872 * config/rs6000/vsx.md: Ditto.
10874 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10876 * config/rs6000/altivec.md: Don't set length attribute to the default
10877 value, for branch instructions.
10878 * config/rs6000/darwin.md: Ditto.
10879 * config/rs6000/rs6000.md: Ditto.
10881 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10883 * config/rs6000/rs6000.md (length): Always define as const_int 4.
10884 (unnamed conditional branch define_insn): Set length to 4 or 8
10885 depending on offset.
10886 (<bd>_<mode>): Similar, for alternative 0.
10887 (<bd>tf_<mode>): Ditto.
10889 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10891 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
10893 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
10895 * doc/rtl.texi: Replace old RTX class names with new names.
10898 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
10900 * expmed.h (canonicalize_comparison): New declaration.
10901 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10902 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10903 * optabs.c (prepare_cmp_insn): Likewise.
10904 * rtl.h (unsigned_condition_p): New function which checks if a
10905 comparison operator is unsigned.
10907 2018-08-16 Nathan Sidwell <nathan@acm.org>
10909 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10910 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10912 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10915 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10916 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10917 (mov<mov>): ..this and enable unconditionally.
10919 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10921 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10923 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
10925 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10926 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10927 "Common" with "Target".
10929 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10931 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10932 * doc/invoke.texi (mmitigate-rop): Remove.
10933 * config/i386/i386.c: Do not include "regrename.h".
10934 (ix86_rop_should_change_byte_p, reg_encoded_number)
10935 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10937 (ix86_reorg): Remove call to ix86_mitigate_rop.
10938 * config/i386/i386.md (attr "modrm_class"): Remove.
10939 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10940 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10941 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10943 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
10945 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10946 allow folding of mergeh() and mergel() for the float and double types.
10947 (fold_mergehl_helper): Rework to handle building a permute tree
10950 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10952 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10955 2018-08-15 David Malcolm <dmalcolm@redhat.com>
10957 * common.opt (fdiagnostics-show-labels): New option.
10958 * diagnostic-show-locus.c (class layout_range): Add field
10960 (class layout): Add field "m_show_labels_p".
10961 (layout_range::layout_range): Add param "label" and use it to
10962 initialize m_label.
10963 (make_range): Pass in NULL for new "label" param of layout_range's
10965 (layout::layout): Initialize m_show_labels_p.
10966 (layout::maybe_add_location_range): Pass in loc_range->m_label
10967 when constructing layout_range instances.
10968 (struct line_label): New struct.
10969 (layout::print_any_labels): New member function.
10970 (layout::print_line): Call it if label-printing is enabled.
10971 (selftest::test_one_liner_labels): New test.
10972 (selftest::test_diagnostic_show_locus_one_liner): Call it.
10973 * diagnostic.c (diagnostic_initialize): Initialize
10974 context->show_labels_p.
10975 * diagnostic.h (struct diagnostic_context): Add field
10977 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10978 -fno-diagnostics-show-labels.
10979 * dwarf2out.c (gen_producer_string): Add
10980 OPT_fdiagnostics_show_labels to the ignored options.
10981 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10983 (gcc_rich_location::maybe_add_expr): Likewise.
10984 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10985 label" param, defaulting to NULL.
10986 (gcc_rich_location::add_expr): Add "label" param.
10987 (gcc_rich_location::maybe_add_expr): Likewise.
10988 (class text_range_label): New class.
10989 (class range_label_for_type_mismatch): New class.
10990 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
10991 of format_warning_va.
10992 (fmtwarn_n): Likewise for new params of format_warning_n_va.
10993 * lto-wrapper.c (merge_and_complain): Add
10994 OPT_fdiagnostics_show_labels to the "pick one setting" options.
10995 (append_compiler_options): Likewise to the dropped options.
10996 (append_diag_options): Likewise to the passed-on options.
10997 * opts.c (common_handle_option): Handle the new option.
10998 * selftest-diagnostic.c
10999 (test_diagnostic_context::test_diagnostic_context): Enable
11001 * substring-locations.c: Include "gcc-rich-location.h".
11002 (format_warning_n_va): Add "fmt_label" and "param_label" params
11003 and use them as appropriate.
11004 (format_warning_va): Add "fmt_label" and "param_label" params,
11005 passing them on to format_warning_n_va.
11006 (format_warning_at_substring): Likewise.
11007 (format_warning_at_substring_n): Likewise.
11008 * substring-locations.h (format_warning_va): Add "fmt_label" and
11009 "param_label" params.
11010 (format_warning_n_va): Likewise.
11011 (format_warning_at_substring): Likewise.
11012 (format_warning_at_substring_n): Likewise.
11013 * toplev.c (general_init): Initialize global_dc->show_labels_p.
11015 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
11018 * builtins.c (expand_builtin_memcmp): Do not expand the call
11019 when overflow is detected.
11021 2018-08-15 Martin Sebor <msebor@redhat.com>
11023 PR tree-optimization/71625
11024 * config/aarch64/aarch64-builtins.c
11025 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
11027 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
11029 * config/s390/s390.c (s390_reorg): Remove loop.
11031 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
11034 (darwin_function_switched_text_sections): Delete.
11035 * gcc/config/darwin.h
11036 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
11038 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
11041 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
11042 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
11043 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
11045 2018-08-15 Martin Liska <mliska@suse.cz>
11047 PR tree-optimization/86925
11048 * predict.c (expr_expected_value_1): When taking
11049 later predictor, assign also probability.
11050 Use fold_build2_initializer_loc in order to fold
11051 the expression in -frounding-math.
11053 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
11055 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
11057 (expand_vec_perm_1): Try the new method.
11059 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
11062 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
11063 Check whether lra_live_max_point is 0 before dividing.
11065 2018-08-14 Martin Sebor <msebor@redhat.com>
11067 PR tree-optimization/86650
11068 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
11069 (vrp_prop::check_mem_ref): Same.
11071 2018-08-13 Liu Hao <lh_mouse@126.com>
11073 * pretty-print.c (eat_esc_sequence): Swap the foreground and
11074 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
11075 and clear it thereafter, as it only works for DBCS.
11077 2018-08-13 Liu Hao <lh_mouse@126.com>
11079 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
11080 handle returned by _get_osf_handle().
11082 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11084 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
11085 for folding vec_perm.
11087 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11089 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
11090 Add support for gimple-folding of vec_pack() and vec_unpack()
11093 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
11095 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
11096 vec_xst variants to the list.
11097 (rs6000_gimple_fold_builtin): Add support for folding unaligned
11098 vector loads and stores.
11100 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
11102 * config.gcc (rs6000-ibm-aix4.x): Delete.
11103 (rs6000-ibm-aix5.1): Delete.
11104 (rs6000-ibm-aix5.2): Delete.
11105 (rs6000-ibm-aix5.3): Delete.
11106 * config/rs6000/aix43.h: Delete.
11107 * config/rs6000/aix51.h: Delete.
11108 * config/rs6000/aix52.h: Delete.
11109 * config/rs6000/t-aix43: Delete.
11111 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
11113 * config/s390/s390.c (s390_decompose_constant_pool_ref):
11115 (s390_decompose_address): Factor out constant pool ref
11118 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11120 * config/nds32/nds32-predicates.c
11121 (nds32_can_use_bclr_p): Change return type as bool.
11122 (nds32_can_use_bset_p): Ditto.
11123 (nds32_can_use_btgl_p): Ditto.
11124 (nds32_can_use_bitci_p): Ditto.
11125 * config/nds32/nds32-protos.h
11126 (nds32_can_use_bclr_p): Change declaration.
11127 (nds32_can_use_bset_p): Ditto.
11128 (nds32_can_use_btgl_p): Ditto.
11129 (nds32_can_use_bitci_p): Ditto.
11131 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11133 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
11134 Support -msched-prolog-epilog option.
11135 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
11137 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11139 * common/config/nds32/nds32-common.c
11140 (nds32_option_optimization_table): Enalbe -malways-align.
11142 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
11144 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
11146 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
11147 OPT_misr_secure_ case.
11148 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
11149 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
11150 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
11152 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
11153 (nds32_isr_info): New field security_level.
11154 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
11155 * config/nds32/nds32.md (return_internal): Consider critical attribute.
11156 * config/nds32/nds32.opt (misr-secure): New option.
11157 * config/nds32/nds32_init.inc: New file.
11158 * config/nds32/nds32_isr.h: New file.
11160 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
11162 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
11163 Update comment for atomic instructions.
11164 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
11165 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
11167 (atomic_loaddi): Revise fence expansion to only emit fence prior to
11168 load for __ATOMIC_SEQ_CST model.
11169 (atomic_loaddi_1): Remove float register target.
11170 (atomic_storedi): Handle CONST_INT values.
11171 (atomic_storedi_1): Remove float register source. Add special case
11173 (memory_barrier): New expander and insn.
11175 2018-08-11 Jakub Jelinek <jakub@redhat.com>
11177 PR tree-optimization/86835
11178 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
11179 new_stmt after def_gsi, make sure to insert new_square_stmt after
11180 that stmt, not 2 stmts before it.
11182 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
11185 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
11188 2018-08-10 Martin Liska <mliska@suse.cz>
11191 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
11193 * builtins.c (expand_builtin_expect_with_probability):
11195 (expand_builtin_expect_with_probability): New function.
11196 (build_builtin_expect_predicate): Add new argumnet probability
11197 for BUILT_IN_EXPECT_WITH_PROBABILITY.
11198 (fold_builtin_expect):
11201 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
11202 * builtins.h (fold_builtin_expect): Set new argument.
11203 * doc/extend.texi: Document __builtin_expect_with_probability.
11204 * doc/invoke.texi: Likewise.
11205 * gimple-fold.c (gimple_fold_call): Pass new argument.
11206 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
11207 also BUILT_IN_EXPECT_WITH_PROBABILITY.
11208 * predict.c (get_predictor_value): New function.
11209 (expr_expected_value): Add new argument probability. Assume
11210 that predictor and probability are always non-null.
11211 (expr_expected_value_1): Likewise. For __builtin_expect and
11212 __builtin_expect_with_probability set probability. Handle
11213 combination in binary expressions.
11214 (tree_predict_by_opcode): Simplify code by simply calling
11215 get_predictor_value.
11216 (pass_strip_predict_hints::execute): Add handling of
11217 BUILT_IN_EXPECT_WITH_PROBABILITY.
11218 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
11220 * tree.h (DECL_BUILT_IN_P): New function.
11222 2018-08-10 Martin Liska <mliska@suse.cz>
11224 PR tree-optimization/85799
11225 * passes.def: Add argument for pass_strip_predict_hints.
11226 * predict.c (class pass_strip_predict_hints): Add new argument
11228 (strip_predictor_early): New function.
11229 (pass_strip_predict_hints::execute): Call the function to
11231 (strip_predict_hints): New function.
11232 * predict.def: Fix comment.
11234 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
11236 * Makefile.in: Clarify which tm.texi to copy over to assert the
11237 right to grant a GFDL license for all.
11239 2018-08-09 Jeff Law <law@redhat.com>
11241 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
11244 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
11246 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
11249 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11251 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
11252 reductions for variable-length vectors.
11254 2018-08-09 David Malcolm <dmalcolm@redhat.com>
11257 * common.opt (fdiagnostics-show-line-numbers): New option.
11258 * diagnostic-show-locus.c (class layout): Add fields
11259 "m_show_line_numbers_p" and "m_linenum_width";
11260 (num_digits): New function.
11261 (test_num_digits): New function.
11262 (layout::layout): Initialize new fields. Update m_x_offset
11263 logic to handle any left margin.
11264 (layout::print_source_line): Print line number when requested.
11265 (layout::start_annotation_line): New member function.
11266 (layout::print_annotation_line): Call it.
11267 (layout::print_leading_fixits): Likewise.
11268 (layout::print_trailing_fixits): Likewise. Update calls to
11269 move_to_column for new parameter.
11270 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
11271 it to potentially call start_annotation_line.
11272 (layout::show_ruler): Call start_annotation_line.
11273 (selftest::test_line_numbers_multiline_range): New selftest.
11274 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
11275 and selftest::test_line_numbers_multiline_range.
11276 * diagnostic.c (diagnostic_initialize): Initialize
11277 show_line_numbers_p.
11278 * diagnostic.h (struct diagnostic_context): Add field
11279 "show_line_numbers_p".
11280 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
11281 -fno-diagnostics-show-line-numbers.
11282 * dwarf2out.c (gen_producer_string): Add
11283 OPT_fdiagnostics_show_line_numbers to the ignored options.
11284 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
11285 one setting" options.
11286 (append_compiler_options): Likewise to the dropped options.
11287 (append_diag_options): Likewise to the passed-on options.
11288 * opts.c (common_handle_option): Handle the new option.
11289 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
11291 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
11293 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
11294 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
11295 third argument of type "const signed char" to descriptions of
11296 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
11297 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
11298 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
11299 __builtin_bcdsub_ov functions.
11301 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11303 PR tree-optimization/86858
11304 * tree-vect-loop.c (vect_is_simple_reduction): Restore
11305 flow_bb_inside_loop_p calls.
11307 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
11309 PR tree-optimization/86871
11310 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
11311 instead of gimple_assign_lhs.
11313 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
11316 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
11317 register constraint to operand 0.
11318 (add<mode>3_carryinC): Likewise.
11319 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
11321 2018-08-09 Martin Liska <mliska@suse.cz>
11324 * common.opt: Remove extra line.
11326 2018-08-09 Martin Liska <mliska@suse.cz>
11328 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
11329 at the end of a line, make first letter capital and end up
11330 a sentence with a dot.
11331 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
11332 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
11333 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
11334 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
11335 (PARAM_MAX_ISL_OPERATIONS): Likewise.
11336 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
11337 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
11338 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
11339 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
11340 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
11341 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
11342 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
11343 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
11344 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
11345 (PARAM_TREE_REASSOC_WIDTH): Likewise.
11346 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
11347 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
11348 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
11350 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
11353 * config/s390/s390.c (s390_option_override_internal): Reduce the
11354 stack-clash-protection-probe-interval param if it would be too big
11357 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
11360 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
11361 * config/m68k/m68k.c (handle_move_double): Don't call
11362 m68k_final_prescan_insn.
11363 (m68k_adjust_decorated_operand): Renamed from
11364 m68k_final_prescan_insn, remove first and third operand and
11366 (print_operand): Call it.
11367 (print_operand_address): Call it.
11369 2018-08-08 Nathan Sidwell <nathan@acm.org>
11371 * diagnostic.c (diagnostic_report_current_module): Use
11372 linemap_included_from & linemap_included_from_linemap.
11374 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
11376 * config/aarch64/aarch64-cores.def: Add phecda core.
11377 * config/aarch64/aarch64-tune.md: Regenerate.
11378 * doc/invoke.texi: Add phecda core.
11380 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
11383 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
11385 * config/s390/s390.md ("movti"): Add more alternatives for
11386 constant to GPR copies.
11388 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
11390 * config/s390/s390.c: Fix whitespace damage throughout the file.
11391 * config/s390/s390.h: Likewise.
11392 * config/s390/tpf.h: Likewise.
11394 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
11396 * config/s390/s390.c (s390_loadrelative_operand_p):
11397 Remove TARGET_CPU_ZARCH usages.
11398 (s390_rtx_costs): Likewise.
11399 (s390_legitimate_constant_p): Likewise.
11400 (s390_cannot_force_const_mem): Likewise.
11401 (legitimate_reload_constant_p): Likewise.
11402 (s390_preferred_reload_class): Likewise.
11403 (legitimize_pic_address): Likewise.
11404 (legitimize_tls_address): Likewise.
11405 (s390_split_branches): Removed.
11406 (s390_add_execute): Removed.
11407 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
11408 (s390_mainpool_start): Likewise.
11409 (s390_mainpool_finish): Likewise.
11410 (s390_mainpool_cancel): Removed.
11411 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
11412 (s390_chunkify_cancel): Likewise.
11413 (s390_return_addr_rtx): Likewise.
11414 (s390_register_info): Remove split_branches_pending_p uages.
11415 (s390_optimize_register_info): Likewise.
11416 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
11417 split_branches_pending_p usages.
11418 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
11419 (s390_load_got): Likewise.
11420 (s390_expand_split_stack_prologue): Likewise.
11421 (output_asm_nops): Likewise.
11422 (s390_function_profiler): Likewise.
11423 (s390_emit_call): Likewise.
11424 (s390_conditional_register_usage): Likewise.
11425 (s390_optimize_prologue): Likewise.
11426 (s390_reorg): Remove TARGET_CPU_ZARCH and
11427 split_branches_pending_p usages.
11428 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
11430 (s390_output_indirect_thunk_function): Likewise.
11431 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
11432 (TARGET_CPU_ZARCH_P): Removed.
11433 (struct machine_function): Remove split_branches_pending_p.
11434 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
11436 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
11438 * common/config/s390/s390-common.c (processor_flags_table):
11440 * config.gcc: Remove with_arch/with_tune support.
11441 * config/s390/2064.md: Remove cpu attribute comparisons.
11442 * config/s390/driver-native.c (s390_host_detect_local_cpu):
11444 * config/s390/linux.h (ASM_SPEC):
11445 Remove -march support.
11446 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
11447 Use a table to get an arch level.
11448 * config/s390/s390-opts.h (enum processor_type):
11449 Remove enum values.
11450 * config/s390/s390.c
11451 (processor_table): Remove entries, add arch_level values.
11452 (s390_issue_rate): Remove cases.
11453 (s390_option_override): Adjust
11454 s390_option_override_internal() call.
11455 (s390_option_override_internal): Remove deprecation warning.
11456 (s390_valid_target_attribute_tree): Adjust
11457 s390_option_override_internal() call.
11458 * config/s390/s390.h (struct s390_processor):
11459 Share with s390-c.c, add arch_level field.
11460 * config/s390/s390.md:
11461 Remove occurrences in cpu attribute.
11462 * config/s390/s390.opt: Remove -march/-mtune support.
11463 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
11464 * doc/invoke.texi: Remove deprecation warning.
11466 2018-08-08 Luis Machado <luis.machado@linaro.org>
11468 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
11470 (qdf24xx_tunings): Set vector cost structure to
11471 qdf24xx_vector_cost.
11473 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
11474 <register_sextend>: Set to 3.
11476 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
11479 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
11480 * config/aarch64/aarch64-simd.md
11481 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
11482 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
11483 (aarch64_frecpx<mode>): ...this new pattern.
11484 * config/aarch64/aarch64-simd-builtins.def: Remove comment
11485 about aarch64_frecp<FRECP:frecp_suffix><mode>.
11487 2018-08-07 Martin Liska <mliska@suse.cz>
11489 PR middle-end/83023
11490 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
11491 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
11492 * predict.def (PRED_MALLOC_NONNULL): New predictor.
11493 * doc/extend.texi: Document that malloc attribute adds
11496 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
11499 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11500 Define to speculation_safe_value_not_needed.
11502 2018-08-06 Jeff Law <law@redhat.com>
11504 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
11505 the vr_values instance to cprop_into_stmt.
11506 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
11507 (cprop_operand): Also query EVRP to determine if OP is a constant.
11509 2018-08-06 Nathan Sidwell <nathan@acm.org>
11511 * diagnostic.c (diagnostic_report_current_module): Reroll
11512 included-at loop. Translate text.
11514 2018-08-06 David Malcolm <dmalcolm@redhat.com>
11516 * function-tests.c (selftest::test_expansion_to_rtl): Call
11517 free_after_compilation.
11519 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11521 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
11523 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
11525 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
11526 loops with memory block operations from getting unrolled.
11528 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
11531 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11532 Define to speculation_safe_value_not_needed.
11534 2018-08-06 Jeff Law <law@redhat.com>
11536 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
11539 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11542 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
11543 with all enabled __intN types.
11545 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
11547 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11549 * alias.c (record_set): Check for clobber high.
11550 * cfgexpand.c (expand_gimple_stmt): Likewise.
11551 * combine-stack-adj.c (single_set_for_csa): Likewise.
11552 * combine.c (find_single_use_1): Likewise.
11553 (set_nonzero_bits_and_sign_copies): Likewise.
11554 (get_combine_src_dest): Likewise.
11555 (is_parallel_of_n_reg_sets): Likewise.
11556 (try_combine): Likewise.
11557 (record_dead_and_set_regs_1): Likewise.
11558 (reg_dead_at_p_1): Likewise.
11559 (reg_dead_at_p): Likewise.
11560 * dce.c (deletable_insn_p): Likewise.
11561 (mark_nonreg_stores_1): Likewise.
11562 (mark_nonreg_stores_2): Likewise.
11563 * df-scan.c (df_find_hard_reg_defs): Likewise.
11564 (df_uses_record): Likewise.
11565 (df_get_call_refs): Likewise.
11566 * dwarf2out.c (mem_loc_descriptor): Likewise.
11567 * haifa-sched.c (haifa_classify_rtx): Likewise.
11568 * ira-build.c (create_insn_allocnos): Likewise.
11569 * ira-costs.c (scan_one_insn): Likewise.
11570 * ira.c (equiv_init_movable_p): Likewise.
11571 (rtx_moveable_p): Likewise.
11572 (interesting_dest_for_shprep): Likewise.
11573 * jump.c (mark_jump_label_1): Likewise.
11574 * postreload-gcse.c (record_opr_changes): Likewise.
11575 * postreload.c (reload_cse_simplify): Likewise.
11576 (struct reg_use): Add source expr.
11577 (reload_combine): Check for clobber high.
11578 (reload_combine_note_use): Likewise.
11579 (reload_cse_move2add): Likewise.
11580 (move2add_note_store): Likewise.
11581 * print-rtl.c (print_pattern): Likewise.
11582 * recog.c (decode_asm_operands): Likewise.
11583 (store_data_bypass_p): Likewise.
11584 (if_test_bypass_p): Likewise.
11585 * regcprop.c (kill_clobbered_value): Likewise.
11586 (kill_set_value): Likewise.
11587 * reginfo.c (reg_scan_mark_refs): Likewise.
11588 * reload1.c (maybe_fix_stack_asms): Likewise.
11589 (eliminate_regs_1): Likewise.
11590 (elimination_effects): Likewise.
11591 (mark_not_eliminable): Likewise.
11592 (scan_paradoxical_subregs): Likewise.
11593 (forget_old_reloads_1): Likewise.
11594 * reorg.c (find_end_label): Likewise.
11595 (try_merge_delay_insns): Likewise.
11596 (redundant_insn): Likewise.
11597 (own_thread_p): Likewise.
11598 (fill_simple_delay_slots): Likewise.
11599 (fill_slots_from_thread): Likewise.
11600 (dbr_schedule): Likewise.
11601 * resource.c (update_live_status): Likewise.
11602 (mark_referenced_resources): Likewise.
11603 (mark_set_resources): Likewise.
11604 * rtl.c (copy_rtx): Likewise.
11605 * rtlanal.c (reg_referenced_p): Likewise.
11606 (single_set_2): Likewise.
11607 (noop_move_p): Likewise.
11608 (note_stores): Likewise.
11609 * sched-deps.c (sched_analyze_reg): Likewise.
11610 (sched_analyze_insn): Likewise.
11612 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11614 * cse.c (invalidate_reg): New function extracted from...
11615 (invalidate): ...here.
11616 (canonicalize_insn): Check for clobber high.
11617 (invalidate_from_clobbers): invalidate clobber highs.
11618 (invalidate_from_sets_and_clobbers): Likewise.
11619 (count_reg_usage): Check for clobber high.
11620 (insn_live_p): Likewise.
11621 * cselib.c (cselib_expand_value_rtx_1):Likewise.
11622 (cselib_invalidate_regno): Check for clobber in setter.
11623 (cselib_invalidate_rtx): Pass through setter.
11624 (cselib_invalidate_rtx_note_stores):
11625 (cselib_process_insn): Check for clobber high.
11626 * cselib.h (cselib_invalidate_rtx): Add operand.
11628 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11630 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
11631 (mark_not_eliminable): Likewise.
11632 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
11633 * lra-lives.c (process_bb_lives): Check for clobber high.
11634 * lra.c (new_insn_reg): Remember clobber highs.
11635 (collect_non_operand_hard_regs): Check for clobber high.
11636 (lra_set_insn_recog_data): Likewise.
11637 (add_regs_to_insn_regno_info): Likewise.
11638 (lra_update_insn_regno_info): Likewise.
11640 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11642 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
11643 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
11645 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11647 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
11648 (copy_insn_1): Likewise.
11649 (gen_hard_reg_clobber_high): New gen function.
11650 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
11651 * genemit.c (gen_exp): Likewise.
11652 (gen_emit_seq): Pass through info.
11653 (gen_insn): Check for CLOBBER_HIGH.
11654 (gen_expand): Pass through info.
11655 (gen_split): Likewise.
11656 (output_add_clobbers): Likewise.
11657 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
11658 (remove_clobbers): Likewise.
11659 * rtl.h (gen_hard_reg_clobber_high): New declaration.
11661 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11663 * doc/rtl.texi (clobber_high): Add.
11664 (parallel): Add in clobber high
11665 * rtl.c (rtl_check_failed_code3): Add function.
11666 * rtl.def (CLOBBER_HIGH): Add expression.
11667 * rtl.h (RTL_CHECKC3): Add macro.
11668 (rtl_check_failed_code3): Add declaration.
11669 (XC3EXP): Add macro.
11671 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
11674 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
11675 cfun->machine->max_used_stack_alignment if needed.
11677 2018-08-04 Martin Sebor <msebor@redhat.com>
11679 PR tree-optimization/86571
11680 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
11683 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
11686 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11689 2018-08-03 Jeff Law <law@redhat.com>
11692 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11693 Define to speculation_safe_value_not_needed.
11695 2018-08-03 David Malcolm <dmalcolm@redhat.com>
11697 * doc/gcov.texi (-x): Remove duplicate "to".
11698 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
11699 (-Wif-not-aligned): Remove duplicate "is".
11700 (-flto): Remove duplicate "the".
11701 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
11702 duplicate "v5.00.b".
11703 (MSP430 Options): Remove duplicate "and" from the description
11704 of "-mgprel-sec=regexp".
11705 (x86 Options): Remove duplicate copies of "vmldLog102" and
11706 vmlsLog104 from description of "-mveclibabi=type".
11708 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
11710 * internal-fn.h (first_commutative_argument): Declare.
11711 * internal-fn.c (first_commutative_argument): New function.
11712 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
11713 restrictions for pattern statements. Use first_commutative_argument
11714 to look for commutative operands in calls to internal functions.
11716 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
11718 * Makefile.in (wide-int-range.o): New.
11719 * tree-vrp.c: Move all the wide_int_* functions to...
11720 * wide-int-range.cc: ...here.
11721 * tree-vrp.h: Move all the wide_int_* prototypes to...
11722 * wide-int-range.h: ...here.
11724 2018-08-03 Tom de Vries <tdevries@suse.de>
11726 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
11728 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
11729 * except.c (output_function_exception_table): Do early exit if
11730 targetm_common.except_unwind_info (&global_options) == UI_NONE.
11732 2018-08-03 Martin Liska <mliska@suse.cz>
11734 * predict.c (dump_prediction): Change to 2 digits
11737 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
11739 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
11741 (falkor_am_1_gtov_gtov): ... a new insn reservation.
11743 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
11745 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
11746 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
11747 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
11748 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
11749 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
11751 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11753 * diagnostic-show-locus.c (diagnostic_show_locus): Use
11754 pp_take_prefix when saving the existing prefix.
11755 * diagnostic.c (diagnostic_append_note): Likewise.
11756 * langhooks.c (lhd_print_error_function): Likewise.
11757 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
11758 param's type. Free the existing prefix.
11759 (pp_take_prefix): New function.
11760 (pretty_printer::pretty_printer): Drop the prefix parameter.
11761 Rename the length parameter to match the comment.
11762 (pretty_printer::~pretty_printer): Free the prefix.
11763 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
11765 (struct pretty_printer): Drop the "const" from "prefix" field's
11766 type and clarify memory management.
11767 (pp_set_prefix): Drop the "const" from the 2nd param.
11768 (pp_take_prefix): New decl.
11770 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
11772 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
11773 for word_mode_ok here instead of passing as argument.
11774 (expand_block_compare): Change select_block_compare_mode() call.
11775 (expand_strncmp_gpr_sequence): New function.
11776 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
11778 2018-08-02 Jeff Law <law@redhat.com>
11781 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11782 Define to speculation_safe_value_not_needed.
11785 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11786 Define to speculation_safe_value_not_needed.
11788 2018-08-02 Tom de Vries <tdevries@suse.de>
11791 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
11792 function. Return UI_TARGET unconditionally.
11793 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
11794 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
11796 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11798 * genemit.c (print_overload_test): Fix typo.
11800 2018-08-02 Richard Biener <rguenther@suse.de>
11802 PR tree-optimization/86816
11803 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
11804 which checks for value availability before querying it.
11805 (gvn_uses_equal): Use it.
11806 (same_succ_hash): Likewise.
11807 (gimple_equal_p): Likewise.
11809 2018-08-02 Nick Clifton <nickc@redhat.com>
11812 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11813 Define to speculation_safe_value_not_needed.
11816 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11817 Define to speculation_safe_value_not_needed.
11820 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11821 Define to speculation_safe_value_not_needed.
11824 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11825 Define to speculation_safe_value_not_needed.
11828 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11829 Define to speculation_safe_value_not_needed.
11832 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11833 Define to speculation_safe_value_not_needed.
11836 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11837 Define to speculation_safe_value_not_needed.
11840 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11841 Define to speculation_safe_value_not_needed.
11844 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11845 speculation_safe_value_not_needed.
11848 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
11849 to speculation_safe_value_not_needed.
11851 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11853 * doc/md.texi: Expand the documentation of instruction names
11854 to mention port-local uses. Document '@' in pattern names.
11855 * read-md.h (overloaded_instance, overloaded_name): New structs.
11856 (mapping): Declare.
11857 (md_reader::handle_overloaded_name): New member function.
11858 (md_reader::get_overloads): Likewise.
11859 (md_reader::m_first_overload): New member variable.
11860 (md_reader::m_next_overload_ptr): Likewise.
11861 (md_reader::m_overloads_htab): Likewise.
11862 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
11863 m_next_overload_ptr and m_overloads_htab.
11864 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
11865 (get_mode_token, get_code_token, get_int_token): New functions.
11866 (map_attr_string): Add an optional argument that passes back
11867 the associated iterator.
11868 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
11869 (md_reader::handle_overloaded_name, add_overload_instance): New
11871 (apply_iterators): Handle '@' names. Report an error if '@'
11872 is used without iterators.
11873 (initialize_iterators): Initialize the new iterator_group fields.
11874 * genopinit.c (handle_overloaded_code_for)
11875 (handle_overloaded_gen): New functions.
11876 (main): Use them to print declarations of maybe_code_for_* and
11877 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
11878 * genemit.c (print_overload_arguments, print_overload_test)
11879 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
11880 (main): Use it to print definitions of maybe_code_for_* and
11881 maybe_gen_* functions.
11882 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
11883 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
11884 instead of explicit mode checks.
11885 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
11886 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
11887 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
11888 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
11889 (aarch64_expand_compare_and_swap): Likewise
11890 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
11891 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
11892 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
11893 (aarch64_constant_pool_reload_icode): Delete.
11894 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
11895 instead of aarch64_constant_pool_reload_icode. Use
11896 code_for_aarch64_reload_mov instead of explicit mode checks.
11897 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
11898 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
11899 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
11900 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11901 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11902 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11903 (aarch64_atomic_load_op_code): Delete.
11904 (aarch64_emit_atomic_load_op): Likewise.
11905 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11906 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
11907 instead of aarch64_emit_atomic_load_op.
11908 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11909 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11910 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11911 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11912 character before the pattern name.
11913 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11914 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11915 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11916 (aarch64_frecps<mode>): Likewise.
11917 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11918 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11919 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11920 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11921 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11923 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11925 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11926 Allow HFmode constants if TARGET_FP_F16INST.
11928 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
11931 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11932 No longer check last store for clobber of address register.
11934 2018-08-02 Martin Liska <mliska@suse.cz>
11936 PR gcov-profile/86817
11937 * gcov.c (process_all_functions): New function.
11939 (process_file): Move functions processing to
11940 process_all_functions.
11942 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11944 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11945 "const" to the "gimple *" and "rtx_insn *" parameters.
11946 * dumpfile.h (dump_user_location_t::dump_user_location_t):
11948 (dump_location_t::dump_location_t): Likewise.
11950 2018-08-01 Martin Sebor <msebor@redhat.com>
11952 PR tree-optimization/86650
11953 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11954 rather than a "gcall *". Directly pass the data of interest
11955 to percent_K_format, rather than building a temporary CALL_EXPR
11957 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11958 (gimple_fold_builtin_strncat): Adjust.
11959 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11960 gcall* argument with gimple*.
11961 * gimple-ssa-warn-restrict.c (check_call): Same.
11962 (wrestrict_dom_walker::before_dom_children): Same.
11963 (builtin_access::builtin_access): Same.
11964 (check_bounds_or_overlap): Same
11965 (maybe_diag_overlap): Same.
11966 (maybe_diag_offset_bounds): Same.
11967 * tree-diagnostic.c (default_tree_printer): Move usage of
11968 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11970 * tree-pretty-print.c (percent_K_format): Add argument.
11971 * tree-pretty-print.h: Add argument.
11972 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11973 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11974 (maybe_diag_stxncpy_trunc): Same.
11975 (handle_builtin_stxncpy): Same.
11976 (handle_builtin_strcat): Same.
11978 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11980 * match.pd: Optimise pointer range checks.
11982 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11984 PR tree-optimization/86758
11985 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11986 to remove pattern statements.
11988 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11990 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
11991 result of dfs_enumerate_from when constructing stmt_vec_infos,
11992 instead of additionally calling get_loop_body.
11994 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11996 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
11998 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
11999 When creating an iv, assert that the step is not known to be zero.
12000 (vect_setup_realignment): Update call accordingly.
12001 * tree-vect-stmts.c (vectorizable_store): Likewise.
12002 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
12004 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12006 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
12007 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
12008 (vectorizable_reduction): Likewise.
12009 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12010 (vect_detect_hybrid_slp_stmts): Likewise.
12011 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12013 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
12015 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
12016 (wide_int_set_zero_nonzero_bits): ...this.
12017 (zero_nonzero_bits_from_vr): Rename to...
12018 (vrp_set_zero_nonzero_bits): ...this.
12019 (extract_range_from_multiplicative_op_1): Abstract wide int
12021 (wide_int_range_multiplicative_op): ...here.
12022 (extract_range_from_binary_expr_1): Extract wide int binary
12023 operations into their own functions.
12024 (wide_int_range_lshift): New.
12025 (wide_int_range_can_optimize_bit_op): New.
12026 (wide_int_range_shift_undefined_p): New.
12027 (wide_int_range_bit_xor): New.
12028 (wide_int_range_bit_ior): New.
12029 (wide_int_range_bit_and): New.
12030 (wide_int_range_trunc_mod): New.
12031 (extract_range_into_wide_ints): New.
12032 (vrp_shift_undefined_p): New.
12033 (extract_range_from_multiplicative_op): New.
12034 (vrp_can_optimize_bit_op): New.
12035 * tree-vrp.h (value_range::dump): New.
12036 (wide_int_range_multiplicative_op): New.
12037 (wide_int_range_lshift):New.
12038 (wide_int_range_shift_undefined_p): New.
12039 (wide_int_range_bit_xor): New.
12040 (wide_int_range_bit_ior): New.
12041 (wide_int_range_bit_and): New.
12042 (wide_int_range_trunc_mod): New.
12043 (zero_nonzero_bits_from_bounds): Rename to...
12044 (wide_int_set_zero_nonzero_bits): ...this.
12045 (zero_nonzero_bits_from_vr): Rename to...
12046 (vrp_set_zero_nonzero_bits): ...this.
12047 (range_easy_mask_min_max): Rename to...
12048 (wide_int_range_can_optimize_bit_op): this.
12049 * vr-values.c (simplify_bit_ops_using_ranges): Rename
12050 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
12052 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12054 * tree-vectorizer.h (vect_orig_stmt): New function.
12055 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
12056 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
12057 (vect_create_epilog_for_reduction): Likewise.
12058 (vectorizable_live_operation): Likewise.
12059 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12060 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
12061 * tree-vect-stmts.c (vectorizable_call): Likewise.
12062 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
12064 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12066 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
12068 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
12069 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
12070 (vect_transform_loop): Likewise.
12071 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12073 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12075 * tree-vectorizer.h (vect_schedule_slp): Return void.
12076 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
12077 (vect_schedule_slp): Likewise.
12079 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12081 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
12083 (vect_transform_loop): Update calls accordingly. Schedule SLP
12084 instances before the main loop, if any exist.
12086 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
12088 PR tree-optimization/86749
12089 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
12090 If the lhs is used in a COND_EXPR, check that it is being used
12091 as the "then" or "else" value.
12093 2018-08-01 Tom de Vries <tdevries@suse.de>
12096 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
12097 speculation_safe_value_not_needed.
12099 2018-08-01 Richard Biener <rguenther@suse.de>
12101 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
12102 as base and offset.
12104 2018-08-01 Martin Liska <mliska@suse.cz>
12106 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
12107 format how successful transformation is dumped.
12108 (gimple_mod_pow2_value_transform): Likewise.
12109 (gimple_mod_subtract_transform): Likewise.
12110 (gimple_stringops_transform): Likewise.
12112 2018-08-01 Martin Liska <mliska@suse.cz>
12114 PR value-prof/35543
12115 * value-prof.c (interesting_stringop_to_profile_p):
12116 Simplify the code and add BUILT_IN_MEMMOVE.
12117 (gimple_stringops_transform): Likewise.
12119 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
12121 * config/aarch64/aarch64-simd.md
12122 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
12123 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
12124 use GPI iterator instead of SI mode.
12126 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
12128 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
12129 rs6000_speculation_barrier.
12130 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
12131 new barrier pattern name.
12133 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
12135 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
12136 (speculation_barrier): New insn.
12138 2018-08-01 Richard Biener <rguenther@suse.de>
12141 * graphite.h: Include isl/id.h and isl/space.h to allow build
12144 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
12147 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
12148 mode for COFF targets.
12149 * defaults.h (TARGET_COFF): Define.
12150 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
12151 TARGET_COFF): Define.
12152 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
12153 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
12154 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
12156 2018-07-31 Alexandre Oliva <oliva@adacore.com>
12158 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
12159 * gimple-streamer-out.c (output_bb): Save it.
12160 * lto-streamer-in.c (input_struct_function_base): Restore
12161 instance discriminator if available. Create map on demand.
12162 * lto-streamer-out.c (output_struct_function_base): Save it if
12164 * final.c (decl_to_instance_map): Document LTO strategy.
12166 2018-07-31 Alexandre Oliva <oliva@adacore.com>
12167 Olivier Hainque <hainque@adacore.com>
12169 * debug.h (decl_to_instance_map_t): New type.
12170 (decl_to_instance_map): Declare.
12171 (maybe_create_decl_to_instance_map): New inline function.
12172 * final.c (bb_discriminator, last_bb_discriminator): New statics,
12173 to track basic block discriminators.
12174 (final_start_function_1): Initialize them.
12175 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
12177 (decl_to_instance_map): New variable.
12178 (map_decl_to_instance, maybe_set_discriminator): New functions.
12179 (notice_source_line): Set discriminator.
12181 2018-07-31 Ian Lance Taylor <iant@golang.org>
12183 * targhooks.c (default_have_speculation_safe_value): Add
12186 2018-07-31 David Malcolm <dmalcolm@redhat.com>
12188 * dump-context.h: Include "pretty-print.h".
12189 (dump_context::refresh_dumps_are_enabled): New decl.
12190 (dump_context::emit_item): New decl.
12191 (class dump_context): Add fields "m_test_pp" and
12193 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12194 (temp_dump_context::get_dumped_text): New decl.
12195 (class temp_dump_context): Add field "m_pp".
12196 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
12197 (dump_context::refresh_dumps_are_enabled): ...and add a test for
12199 (set_dump_file): Update for above change.
12200 (set_alt_dump_file): Likewise.
12201 (dump_loc): New overload, taking a pretty_printer *.
12202 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
12203 to any test pretty-printer.
12204 (make_item_for_dump_gimple_stmt): New function, adapted from
12205 optinfo::add_gimple_stmt.
12206 (dump_context::dump_gimple_stmt): Call it, and use the result,
12207 eliminating the direct usage of dump_file and alt_dump_file in
12208 favor of indirectly using them via emit_item.
12209 (make_item_for_dump_gimple_expr): New function, adapted from
12210 optinfo::add_gimple_expr.
12211 (dump_context::dump_gimple_expr): Call it, and use the result,
12212 eliminating the direct usage of dump_file and alt_dump_file in
12213 favor of indirectly using them via emit_item.
12214 (make_item_for_dump_generic_expr): New function, adapted from
12216 (dump_context::dump_generic_expr): Call it, and use the result,
12217 eliminating the direct usage of dump_file and alt_dump_file in
12218 favor of indirectly using them via emit_item.
12219 (make_item_for_dump_printf_va): New function, adapted from
12220 optinfo::add_printf_va.
12221 (make_item_for_dump_printf): New function.
12222 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
12223 and use the result, eliminating the direct usage of dump_file and
12224 alt_dump_file in favor of indirectly using them via emit_item.
12225 (make_item_for_dump_dec): New function.
12226 (dump_context::dump_dec): Call it, and use the result,
12227 eliminating the direct usage of dump_file and alt_dump_file in
12228 favor of indirectly using them via emit_item.
12229 (make_item_for_dump_symtab_node): New function, adapted from
12230 optinfo::add_symtab_node.
12231 (dump_context::dump_symtab_node): Call it, and use the result,
12232 eliminating the direct usage of dump_file and alt_dump_file in
12233 favor of indirectly using them via emit_item.
12234 (dump_context::begin_scope): Reimplement, avoiding direct usage
12235 of dump_file and alt_dump_file in favor of indirectly using them
12237 (dump_context::emit_item): New member function.
12238 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
12239 Set up test pretty-printer on the underlying context. Call
12240 refresh_dumps_are_enabled.
12241 (temp_dump_context::~temp_dump_context): Call
12242 refresh_dumps_are_enabled.
12243 (temp_dump_context::get_dumped_text): New member function.
12244 (selftest::verify_dumped_text): New function.
12245 (ASSERT_DUMPED_TEXT_EQ): New macro.
12246 (selftest::test_capture_of_dump_calls): Run all tests twice, with
12247 and then without optinfo enabled. Add uses of
12248 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
12249 * dumpfile.h: Update comment for the dump_* API.
12250 * optinfo-emit-json.cc
12251 (selftest::test_building_json_from_dump_calls): Update for new
12252 param for temp_dump_context ctor.
12253 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
12254 and "m_owned" field.
12255 (optinfo_item::~optinfo_item): Likewise.
12256 (optinfo::add_item): New member function.
12257 (optinfo::emit): Update comment.
12258 (optinfo::add_string): Delete.
12259 (optinfo::add_printf): Delete.
12260 (optinfo::add_printf_va): Delete.
12261 (optinfo::add_gimple_stmt): Delete.
12262 (optinfo::add_gimple_expr): Delete.
12263 (optinfo::add_tree): Delete.
12264 (optinfo::add_symtab_node): Delete.
12265 (optinfo::add_dec): Delete.
12266 * optinfo.h (class dump_context): New forward decl.
12267 (optinfo::add_item): New decl.
12268 (optinfo::add_string): Delete.
12269 (optinfo::add_printf): Delete.
12270 (optinfo::add_printf_va): Delete.
12271 (optinfo::add_gimple_stmt): Delete.
12272 (optinfo::add_gimple_expr): Delete.
12273 (optinfo::add_tree): Delete.
12274 (optinfo::add_symtab_node): Delete.
12275 (optinfo::add_dec): Delete.
12276 (optinfo::add_poly_int): Delete.
12277 (optinfo_item::optinfo_item): Remove "owned" param.
12278 (class optinfo_item): Remove field "m_owned".
12280 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12282 PR middle-end/86705
12283 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
12284 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
12285 requested variable alignment.
12286 (expand_one_ssa_partition): Likewise.
12287 (expand_one_var): Likewise.
12289 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12291 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
12292 to speculation_safe_value_not_needed.
12294 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12296 * targhooks.h (speculation_safe_value_not_needed): New prototype.
12297 * targhooks.c (speculation_safe_value_not_needed): New function.
12298 * target.def (have_speculation_safe_value): Update documentation.
12299 * doc/tm.texi: Regenerated.
12301 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12303 * config/aarch64/iterators.md (ALLI_TI): New iterator.
12304 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
12306 (despeculate_copy<ALLI:mode>_insn): New insn.
12307 (despeculate_copyti_insn): New insn.
12308 (despeculate_simple<ALLI:mode>): New insn
12309 (despeculate_simpleti): New insn.
12310 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
12312 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
12313 aarch64_speculation_safe_value.
12314 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
12316 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12318 * config/aarch64/aarch64-speculation.cc: New file.
12319 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
12320 before pass_reorder_blocks.
12321 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
12323 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
12324 X14 and X15 when tracking speculation.
12325 * config/aarch64/aarch64.md (register name constants): Add
12326 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
12327 (unspec): Add UNSPEC_SPECULATION_TRACKER.
12328 (speculation_barrier): New insn attribute.
12329 (cmp<mode>): Allow SP in comparisons.
12330 (speculation_tracker): New insn.
12331 (speculation_barrier): Add speculation_barrier attribute.
12332 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
12333 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
12334 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
12336 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12338 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
12339 aarch64_track_speculation is true.
12340 (tb<optab><mode>1): Likewise.
12341 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
12342 generate CB[N]Z when tracking speculation.
12343 (aarch64_split_compare_and_swap): Likewise.
12344 (aarch64_split_atomic_op): Likewise.
12346 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12348 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
12350 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12352 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
12353 (speculation_barrier): New insn.
12355 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12357 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
12358 * config/arm/arm.md (speculation_barrier): New expand.
12359 (speculation_barrier_insn): New pattern.
12361 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
12363 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
12364 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
12365 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
12366 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
12368 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
12369 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
12370 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
12371 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
12372 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
12373 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
12374 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
12375 * builtins.c (expand_speculation_safe_value): New function.
12376 (expand_builtin): Call it.
12377 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
12378 * doc/extend.texi: Document __builtin_speculation_safe_value.
12379 * doc/md.texi: Document "speculation_barrier" pattern.
12380 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
12381 TARGET_HAVE_SPECULATION_SAFE_VALUE.
12382 * doc/tm.texi: Regenerated.
12383 * target.def (have_speculation_safe_value, speculation_safe_value): New
12385 * targhooks.c (default_have_speculation_safe_value): New function.
12386 (default_speculation_safe_value): New function.
12387 * targhooks.h (default_have_speculation_safe_value): Add prototype.
12388 (default_speculation_safe_value): Add prototype.
12390 2018-07-31 David Malcolm <dmalcolm@redhat.com>
12392 * dump-context.h (dump_context::dump_loc): New decl.
12393 * dumpfile.c (dump_context::dump_loc): New member function.
12394 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
12395 and dump_gimple_stmt.
12396 (dump_context::dump_gimple_expr_loc): Likewise, using
12398 (dump_context::dump_generic_expr_loc): Likewise, using
12400 (dump_context::dump_printf_loc_va): Likewise, using
12402 (dump_context::begin_scope): Explicitly using the global function
12403 "dump_loc", rather than the member function.
12405 2018-07-31 Martin Sebor <msebor@redhat.com>
12407 PR tree-optimization/86741
12408 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
12410 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
12412 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
12413 depend on whether prefetch instructions will be emitted or not.
12414 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
12415 will be emitted or not.
12416 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
12417 (TARGET_SETMEM_PFD): New macros.
12419 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12421 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
12422 (NULL_STMT_VEC_INFO): Delete.
12423 (stmt_vec_info::operator*): Likewise.
12424 (stmt_vec_info::operator gimple *): Likewise.
12425 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
12426 of NULL_STMT_VEC_INFO.
12427 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12428 (vect_reassociating_reduction_p): Likewise.
12429 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12430 (vectorizable_store): Likewise.
12431 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
12432 (vec_info::free_stmt_vec_infos): Likewise.
12434 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12436 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
12437 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
12439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12441 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
12442 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12443 (vec_info::free_stmt_vec_info): New private member functions.
12444 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
12445 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
12446 * tree-parloops.c (gather_scalar_reductions): Remove calls to
12447 set_stmt_vec_info_vec and free_stmt_vec_infos.
12448 * tree-vect-loop.c (_loop_vec_info): Remove call to
12449 set_stmt_vec_info_vec.
12450 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
12451 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
12452 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
12453 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12454 (vec_info::free_stmt_vec_info): ...these new functions. Remove
12455 assignments in {vec_info::,}new_stmt_vec_info that are redundant
12456 with the clearing in the xcalloc.
12457 (stmt_vec_info_vec): Delete.
12458 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
12459 (vectorize_loops): Likewise.
12460 (vec_info::~vec_info): Remove argument from call to
12461 free_stmt_vec_infos.
12462 (vec_info::add_stmt): Remove vinfo argument from call to
12465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12467 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
12468 rather than a gimple stmt.
12469 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
12470 information for pattern statements when passed the original
12471 statement; instead wait to be passed the pattern statement itself.
12472 Don't call set_vinfo_for_stmt here.
12473 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
12474 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
12475 stmt_vec_infos here.
12476 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
12477 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
12478 stmt_vec_infos entry.
12480 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12482 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
12483 * tree-vectorizer.c (vec_info::replace_stmt): New function.
12484 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
12485 * tree-vect-stmts.c (vectorizable_call): Likewise.
12486 (vectorizable_simd_clone_call): Likewise.
12488 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12490 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
12491 * tree-vectorizer.c (vec_info::remove_stmt): New function.
12492 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
12493 * tree-vect-loop.c (vect_transform_loop): Likewise.
12494 * tree-vect-slp.c (vect_schedule_slp): Likewise.
12495 * tree-vect-stmts.c (vect_remove_stores): Likewise.
12497 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12499 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
12500 (vect_dr_stmt): Delete.
12501 * tree-vectorizer.c (vec_info::lookup_dr): New function.
12502 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
12504 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12505 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
12506 (vect_verify_datarefs_alignment, vect_peeling_supportable)
12507 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12508 (vect_analyze_data_refs): Likewise.
12509 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
12511 (vect_find_same_alignment_drs): Likewise.
12512 (vect_slp_analyze_node_dependences): Update calls accordingly.
12513 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
12514 instead of DR_VECT_AUX.
12515 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
12516 of a vector data references. Use vec_info::lookup_dr instead of
12518 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
12519 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
12520 instead of DR_VECT_AUX.
12522 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12524 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
12526 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12528 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12529 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12530 (vect_gen_prolog_loop_niters): Likewise.
12532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12534 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
12535 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
12536 (vect_known_alignment_in_bytes, vect_dr_behavior)
12537 (vect_get_scalar_dr_size): Take references as dr_vec_infos
12538 instead of data_references. Update calls to other routines for
12539 which the same change has been made.
12540 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
12541 dr_vec_infos instead of stmt_vec_infos.
12542 (vect_analyze_data_ref_dependence): Update call accordingly.
12543 (vect_slp_analyze_data_ref_dependence)
12544 (vect_record_base_alignments): Use DR_VECT_AUX.
12545 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
12546 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
12547 (vector_alignment_reachable_p, vect_get_data_access_cost)
12548 (vect_peeling_supportable, vect_analyze_group_access_1)
12549 (vect_analyze_group_access, vect_analyze_data_ref_access)
12550 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
12551 (vect_compile_time_alias, vect_small_gap_p)
12552 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
12553 (vect_supportable_dr_alignment): Take references as dr_vec_infos
12554 instead of data_references. Update calls to other routines for
12555 which the same change has been made.
12556 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
12557 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12558 (vect_slp_analyze_and_verify_node_alignment)
12559 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12560 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12561 (vect_setup_realignment): Use dr_vec_infos. Update calls after
12563 (_vect_peel_info::dr): Replace with...
12564 (_vect_peel_info::dr_info): ...this new field.
12565 (vect_peeling_hash_get_most_frequent)
12566 (vect_peeling_hash_choose_best_peeling): Update accordingly.
12567 (vect_peeling_hash_get_lowest_cost):
12568 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
12569 routines for which the same change has been made.
12570 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
12572 * tree-vect-loop-manip.c (get_misalign_in_elems)
12573 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
12575 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12576 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
12577 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
12578 (get_group_load_store_type, get_negative_load_store_type)
12579 (vect_get_data_ptr_increment, vectorizable_store)
12580 (vectorizable_load): Likewise.
12581 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
12582 Update calls to other routines for which the same change has been made.
12584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12586 * tree-vectorizer.h (vec_info::move_dr): New member function.
12587 (dataref_aux): Rename to...
12588 (dr_vec_info): ...this and add "dr" and "stmt" fields.
12589 (_stmt_vec_info::dr_aux): Update accordingly.
12590 (_stmt_vec_info::data_ref_info): Delete.
12591 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
12592 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
12593 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
12594 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
12596 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
12597 (STMT_VINFO_DR_INFO): New macro.
12598 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
12599 (set_dr_misalignment): Update after rename of dataref_aux.
12600 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
12601 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
12602 initialization of STMT_VINFO_DATA_REF.
12603 * tree-vectorizer.c (vec_info::move_dr): New function.
12604 * tree-vect-patterns.c (vect_recog_bool_pattern)
12605 (vect_recog_mask_conversion_pattern)
12606 (vect_recog_gather_scatter_pattern): Use it.
12607 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
12608 the "dr" and "stmt" fields of dr_vec_info instead of
12609 STMT_VINFO_DATA_REF.
12611 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12613 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
12614 (is_pattern_stmt_p): Use it.
12615 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
12616 on pattern statements.
12618 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12620 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
12621 original stmt as a stmt_vec_info rather than a gimple stmt.
12622 (vect_pattern_recog_1): Take the statement directly as a
12623 stmt_vec_info, rather than via a gimple_stmt_iterator.
12624 Update call to vect_mark_pattern_stmts.
12625 (vect_pattern_recog): Update calls accordingly.
12627 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12629 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
12630 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
12631 a vect_def_type for the first argument.
12632 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
12633 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
12634 operand if it isn't defined by a vectorized statement.
12635 (vect_build_gather_load_calls): Remove the mask_dt argument and
12636 update calls to vect_get_vec_def_for_stmt_copy.
12637 (vectorizable_bswap): Likewise the dt argument.
12638 (vectorizable_call): Update calls to vectorizable_bswap and
12639 vect_get_vec_def_for_stmt_copy.
12640 (vectorizable_simd_clone_call, vectorizable_assignment)
12641 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
12642 (vectorizable_comparison): Update calls to
12643 vect_get_vec_def_for_stmt_copy.
12644 (vectorizable_store): Likewise. Remove now-unnecessary calls to
12645 vect_is_simple_use.
12646 (vect_get_loop_based_defs): Remove dt argument and update call
12647 to vect_get_vec_def_for_stmt_copy.
12648 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
12649 and vect_get_vec_def_for_stmt_copy.
12650 (vectorizable_load): Update calls to vect_build_gather_load_calls
12651 and vect_get_vec_def_for_stmt_copy.
12652 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12653 (vectorizable_reduction, vectorizable_live_operation): Update calls
12654 to vect_get_vec_def_for_stmt_copy.
12656 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12658 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
12659 and gimple stmt arguments with a stmt_vec_info.
12660 (vect_record_base_alignments): Update calls accordingly.
12661 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
12662 and gimple stmt arguments with a stmt_vec_info.
12663 (vect_build_slp_tree_1): Remove vinfo argument and update call
12664 to vect_record_max_nunits.
12665 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
12666 and vect_record_max_nunits.
12668 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12670 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
12671 file and take a stmt_vec_info instead of a gimple stmt.
12672 (supportable_widening_operation, vect_finish_replace_stmt)
12673 (vect_finish_stmt_generation, vect_get_store_rhs)
12674 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
12675 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
12676 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
12677 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
12678 (vect_create_data_ref_ptr, bump_vector_ptr)
12679 (vect_permute_store_chain, vect_setup_realignment)
12680 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
12681 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
12682 (vectorizable_reduction, vectorizable_induction)
12683 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
12684 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
12685 than gimple stmts as arguments.
12686 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
12687 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
12688 (can_group_stmts_p, vect_check_gather_scatter)
12689 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12690 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
12691 (vect_permute_load_chain, vect_shift_permute_load_chain)
12692 (vect_transform_grouped_load)
12693 (vect_record_grouped_load_vectors): Likewise.
12694 * tree-vect-loop.c (vect_fixup_reduc_chain)
12695 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
12696 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
12697 (vectorizable_reduction, vectorizable_induction)
12698 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
12699 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
12700 (vect_get_load_store_mask): Likewise.
12701 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
12702 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
12703 * tree-vect-stmts.c (vect_mark_relevant)
12704 (is_simple_and_all_uses_invariant)
12705 (exist_non_indexing_operands_for_use_p, process_use)
12706 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
12707 (vect_get_vec_def_for_operand, vect_get_vec_defs)
12708 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
12709 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
12710 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
12711 (get_negative_load_store_type, get_load_store_type)
12712 (vect_check_load_store_mask, vect_check_store_rhs)
12713 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
12714 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12715 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12716 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12717 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
12718 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
12719 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
12720 (supportable_widening_operation): Likewise.
12722 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12724 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
12725 a stmt_vec_info instead of a gcall.
12726 (vect_check_gather_scatter): Update call accordingly.
12727 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
12729 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
12730 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
12731 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
12732 instead of a gimple stmt.
12733 (vect_transform_loop): Update calls accordingly.
12734 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
12735 stmt_vec_infos instead of gimple stmts.
12736 (vect_analyze_slp_instance): Update use accordingly.
12737 * tree-vect-stmts.c (read_vector_array, write_vector_array)
12738 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
12739 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
12740 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
12741 (vect_gen_widened_results_half, vect_get_loop_based_defs)
12742 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
12743 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
12744 down to subroutines.
12746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12748 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
12749 of the worklist from a vector of gimple stmts to a vector of
12751 * tree-vect-stmts.c (vect_mark_relevant, process_use)
12752 (vect_mark_stmts_to_be_vectorized): Likewise
12754 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12756 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
12757 statement before passing it to vect_analyze_stmt.
12758 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
12759 the chain of phi vector definitions. Track the exit phi via its
12761 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
12762 STMT_VINFO_REDUC_DEF.
12763 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
12764 stmt_vec_infos to handle the statement chains.
12765 (vect_get_slp_defs): Record the first statement in the node
12766 using a stmt_vec_info.
12767 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
12768 statements here and pass their stmt_vec_info down to subroutines.
12769 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
12770 down to vect_finish_stmt_generation.
12771 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
12772 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
12773 stmt_vec_infos to subroutines.
12774 (vect_remove_stores): Use stmt_vec_infos to handle the statement
12777 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12779 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
12780 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
12781 (vect_permute_store_chain, vect_setup_realignment)
12782 (vect_permute_load_chain, vect_shift_permute_load_chain)
12783 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
12784 stmts internally, and when passing values to other vectorizer routines.
12785 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12786 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
12787 (vect_analyze_loop_operations, get_initial_def_for_reduction)
12788 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
12789 (vectorizable_reduction, vectorizable_induction)
12790 (vectorizable_live_operation, vect_transform_loop_stmt)
12791 (vect_transform_loop): Likewise.
12792 * tree-vect-patterns.c (vect_reassociating_reduction_p)
12793 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
12794 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
12795 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12796 (vect_slp_analyze_node_operations_1): Likewise.
12797 * tree-vect-stmts.c (vect_mark_relevant, process_use)
12798 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
12799 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
12800 (vect_finish_stmt_generation_1, get_group_load_store_type)
12801 (get_load_store_type, vect_build_gather_load_calls)
12802 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12803 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12804 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12805 (vectorizable_store, vectorizable_load, vectorizable_condition)
12806 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
12807 (supportable_widening_operation): Likewise.
12808 (vect_get_vector_types_for_stmt): Likewise.
12809 * tree-vectorizer.h (vect_dr_behavior): Likewise.
12811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12813 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12814 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
12815 (vect_permute_store_chain, vect_permute_load_chain)
12816 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
12817 repeated stmt_vec_info lookups.
12818 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12819 (vect_update_ivs_after_vectorizer): Likewise.
12820 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
12821 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12822 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
12823 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12824 (vect_bb_slp_scalar_cost): Likewise.
12825 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
12827 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12829 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
12830 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
12831 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
12832 to get gassigns and gcalls, rather than operating on generc gimple
12834 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
12835 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
12836 (vectorizable_load, vect_analyze_stmt): Likewise.
12837 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
12839 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12841 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
12842 return stmt_vec_infos rather than gimple stmts. Do not accept
12844 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
12846 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12847 Update use of get_later_stmt.
12848 (vect_get_constant_vectors): Update call accordingly.
12849 (vect_schedule_slp_instance): Likewise
12850 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
12851 (vect_slp_analyze_instance_dependence): Likewise.
12852 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
12854 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12856 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
12857 (stmt_info_for_cost::stmt_info): ...this new field.
12858 (add_stmt_costs): Update accordingly.
12859 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12860 (vect_get_known_peeling_cost): Likewise.
12861 (vect_estimate_min_profitable_iters): Likewise.
12862 * tree-vect-stmts.c (record_stmt_cost): Likewise.
12864 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12866 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
12867 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12868 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12870 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
12872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12874 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
12875 a gimple stmt to a stmt_vec_info.
12876 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12878 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12880 * tree-vectorizer.h (vec_info::grouped_stores): Change from
12881 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12882 (_loop_vec_info::reduction_chains): Likewise.
12883 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
12885 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12887 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12889 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
12890 a gimple stmt to a stmt_vec_info.
12891 (_stmt_vec_info::next_element): Likewise.
12892 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
12893 (vect_slp_analyze_and_verify_node_alignment)
12894 (vect_analyze_group_access_1, vect_analyze_group_access)
12895 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
12896 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
12897 (vect_supportable_dr_alignment): Update accordingly.
12898 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
12899 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
12900 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12901 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12902 * tree-vect-slp.c (vect_build_slp_tree_1)
12903 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12904 (vect_split_slp_store_group, vect_analyze_slp_instance)
12905 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12906 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12907 (get_group_load_store_type, get_load_store_type)
12908 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12909 (vect_transform_stmt, vect_remove_stores): Likewise.
12911 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12913 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12914 than a gimple stmt.
12915 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12916 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12917 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12918 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12919 (vector_alignment_reachable_p, vect_get_data_access_cost)
12920 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12921 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12922 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12923 (vect_analyze_group_access_1, vect_analyze_group_access)
12924 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12925 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12926 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12927 result of vect_dr_stmt and use the stmt_vec_info instead of
12928 the associated gimple stmt.
12929 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12930 (vect_gen_prolog_loop_niters): Likewise.
12931 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12933 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12935 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12936 to a vec<stmt_vec_info>.
12937 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12938 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12939 vec<stmt_vec_info>.
12940 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12941 to a vec<stmt_vec_info>.
12942 (bst_traits::value_type, bst_traits::value_type): Likewise.
12943 (bst_traits::hash): Update accordingly.
12944 (vect_get_and_check_slp_defs): Change the stmts parameter from
12945 a vec<gimple *> to a vec<stmt_vec_info>.
12946 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12947 (vect_build_slp_tree): Likewise.
12948 (vect_build_slp_tree_2): Likewise. Update uses of
12949 SLP_TREE_SCALAR_STMTS.
12950 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12951 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12952 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12953 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12954 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12955 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12956 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12957 (vect_get_constant_vectors, vect_get_slp_defs)
12958 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12959 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12960 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12961 instead of gimple stmts.
12962 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12963 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12964 (vect_slp_analyze_instance_dependence): Update uses of
12965 SLP_TREE_SCALAR_STMTS.
12966 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12967 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12968 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12969 (get_initial_defs_for_reduction): Likewise.
12970 (vect_create_epilog_for_reduction): Likewise.
12971 (vectorize_fold_left_reduction): Likewise.
12972 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12973 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12974 (can_vectorize_live_stmts): Likewise.
12976 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12978 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12979 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12980 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12982 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12984 (gather_scalar_reductions): Update after above interface changes.
12985 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12986 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12988 (vect_force_simple_reduction): Likewise.
12989 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12990 LOOP_VINFO_REDUCTIONS.
12991 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12993 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12995 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
12996 a gimple stmt to a stmt_vec_info.
12997 * tree-vect-loop.c (vect_active_double_reduction_p)
12998 (vect_force_simple_reduction, vectorizable_reduction): Update
13001 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13003 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
13004 vec<gimple *> to a vec<stmt_vec_info>.
13005 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
13006 the reduction_phis argument from a vec<gimple *> to a
13007 vec<stmt_vec_info>.
13008 (vectorizable_reduction): Likewise the phis local variable that
13009 is passed to vect_create_epilog_for_reduction. Update for new type
13010 of SLP_TREE_VEC_STMTS.
13011 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
13012 (vectorizable_live_operation): Likewise.
13013 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
13014 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
13016 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13018 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
13019 a gimple stmt to a stmt_vec_info.
13020 (vectorizable_condition, vectorizable_live_operation)
13021 (vectorizable_reduction, vectorizable_induction): Pass back the
13022 vectorized statement as a stmt_vec_info.
13023 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
13024 use of STMT_VINFO_VEC_STMT.
13025 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
13026 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
13027 as stmt_vec_infos rather than gimple stmts.
13028 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
13029 to a stmt_vec_info.
13030 (vectorizable_live_operation): Likewise.
13031 (vectorizable_reduction, vectorizable_induction): Likewise,
13032 updating use of STMT_VINFO_VEC_STMT.
13033 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
13034 of STMT_VINFO_VEC_STMT.
13035 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
13036 (vectorizable_simd_clone_call, vectorizable_conversion)
13037 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13038 (vectorizable_store, vectorizable_load, vectorizable_condition)
13039 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
13040 from a gimple stmt to a stmt_vec_info.
13041 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
13042 pointer to a stmt_vec_info to the vectorizable_* routines.
13044 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13046 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
13047 a gimple stmt to a stmt_vec_info.
13048 (is_pattern_stmt_p): Update accordingly.
13049 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
13050 (vect_record_grouped_load_vectors): Likewise.
13051 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
13052 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
13053 (vect_model_reduction_cost): Likewise.
13054 (vect_create_epilog_for_reduction): Likewise.
13055 (vectorizable_reduction, vectorizable_induction): Likewise.
13056 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13057 Return the stmt_vec_info for the pattern statement.
13058 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
13059 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
13060 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13061 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
13062 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
13063 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
13064 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
13065 (free_stmt_vec_info, vect_is_simple_use): Likewise.
13067 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13069 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
13070 (vect_finish_stmt_generation): Likewise.
13071 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13072 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
13073 (vect_build_gather_load_calls): Use the return value of the above
13074 functions instead of a separate call to vinfo_for_stmt. Use narrow
13075 scopes for the input gimple stmt and wider scopes for the associated
13076 stmt_vec_info. Use vec_info::lookup_def when setting these
13077 stmt_vec_infos from an SSA_NAME definition.
13078 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
13079 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
13080 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
13081 (vectorizable_store, vectorizable_load, vectorizable_condition)
13082 (vectorizable_comparison): Likewise.
13083 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
13084 (vectorizable_reduction): Likewise.
13086 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13088 * tree-vectorizer.h (vect_is_simple_use): Add an optional
13089 stmt_vec_info * parameter before the optional gimple **.
13090 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13091 (process_use, vect_get_vec_def_for_operand_1): Update callers.
13092 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
13093 * tree-vect-loop.c (vectorizable_reduction): Likewise.
13094 (vectorizable_live_operation): Likewise.
13095 * tree-vect-patterns.c (type_conversion_p): Likewise.
13096 (vect_look_through_possible_promotion): Likewise.
13097 (vect_recog_rotate_pattern): Likewise.
13098 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13102 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
13103 a typedef to a wrapper class.
13104 (NULL_STMT_VEC_INFO): New macro.
13105 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
13106 (stmt_vec_info::operator*): New function.
13107 (stmt_vec_info::operator gimple *): Likewise.
13108 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
13109 (add_stmt_costs): Likewise.
13110 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
13111 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
13112 (vect_get_known_peeling_cost): Likewise.
13113 (vect_estimate_min_profitable_iters): Likewise.
13114 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13115 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
13116 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
13117 (vectorizable_store, free_stmt_vec_infos): Likewise.
13118 (new_stmt_vec_info): Change return type of xcalloc to
13121 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13123 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
13124 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
13125 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
13126 a single_imm_use-based sequence.
13127 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
13129 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13131 * tree-vectorizer.h (vec_info::lookup_def): Declare.
13132 * tree-vectorizer.c (vec_info::lookup_def): New function.
13133 * tree-vect-patterns.c (vect_get_internal_def): Use it.
13134 (vect_widened_op_tree): Likewise.
13135 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
13136 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
13137 (vectorizable_reduction): Likewise.
13138 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
13140 (vect_is_slp_reduction): Update calls accordingly. Use
13141 vec_info::lookup_def.
13142 (vect_is_simple_reduction): Likewise
13143 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
13145 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13147 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
13148 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
13149 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
13151 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
13152 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
13153 (vect_update_vf_for_slp, vect_analyze_loop_operations)
13154 (vect_is_slp_reduction, vectorizable_induction)
13155 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
13156 * tree-vect-patterns.c (vect_init_pattern_stmt):
13157 (vect_determine_min_output_precision_1, vect_determine_precisions)
13158 (vect_pattern_recog): Likewise.
13159 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
13160 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
13161 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
13162 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
13163 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
13164 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
13165 info field from a loop to a loop_vec_info.
13167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13169 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
13170 (vec_info::add_stmt): Declare.
13171 * tree-vectorizer.c (vec_info::add_stmt): New function.
13172 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
13173 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
13174 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
13175 (vectorizable_induction): Likewise.
13176 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
13177 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
13178 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
13179 (vectorizable_load): Likewise.
13180 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
13181 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
13182 (vect_recog_gather_scatter_pattern): Likewise.
13183 (append_pattern_def_seq): Likewise. Remove a check that is
13184 performed by add_stmt itself.
13186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13188 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
13189 which make_ssa_name was called with new_stmt before new_stmt
13192 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13194 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
13196 (vect_is_slp_reduction): ...here...
13197 (vect_is_simple_reduction): ...and here. Remove repetition of tests
13198 that are already known to be false.
13200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13202 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
13203 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
13204 STMT_VINFO_NUM_SLP_USES when it's true.
13205 (vect_free_slp_instance): Add a final_p parameter and pass it to
13206 vect_free_slp_tree.
13207 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
13208 (vect_analyze_slp_instance): Likewise.
13209 (vect_slp_analyze_operations): Likewise.
13210 (vect_slp_analyze_bb_1): Likewise.
13211 * tree-vectorizer.c (vec_info): Likewise.
13212 * tree-vect-loop.c (vect_transform_loop): Likewise.
13214 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13216 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13217 function is not called for second and subsequent members of
13220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
13222 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
13223 cases for nested loops from here to ...
13224 (vect_create_epilog_for_reduction): ...here. Only call
13225 vect_is_simple_use for inner-loop reductions.
13227 2018-07-31 Martin Liska <mliska@suse.cz>
13229 PR gcov-profile/85338
13230 PR gcov-profile/85350
13231 PR gcov-profile/85372
13232 * profile.c (struct location_triplet): New.
13233 (struct location_triplet_hash): Likewise.
13234 (output_location): Do not output a BB that
13235 is already recorded for a line.
13236 (branch_prob): Use streamed_locations.
13238 2018-07-31 Martin Liska <mliska@suse.cz>
13240 PR gcov-profile/85370
13241 * coverage.c (coverage_begin_function): Do not mark target
13242 clones as artificial functions.
13244 2018-07-31 Martin Liska <mliska@suse.cz>
13246 PR gcov-profile/83813
13247 PR gcov-profile/84758
13248 PR gcov-profile/85217
13249 PR gcov-profile/85332
13250 * profile.c (branch_prob): Do not record GOTO expressions
13251 for GIMPLE statements which locations are already streamed.
13253 2018-07-31 Olivier Hainque <hainque@adacore.com>
13255 * gcc.c (handle_spec_function): Accept a soft_matched_part
13256 argument, as do_spec_1. Pass it down to ...
13257 (eval_spec_function): Accept a soft_matched_part argument,
13258 and pass it down to ...
13259 (do_spec_2): Accept a soft_matched_part argument, and pass
13260 it down to do_spec_1.
13261 (do_spec_1): Pass soft_matched_part to handle_spec_function.
13262 (handle_braces): Update call to handle_spec_function.
13263 (driver::set_up_specs): Update calls to do_spec_2.
13264 (compare_debug_dump_opt_spec_function): Likewise.
13265 (compare_debug_self_opt_spec_function): Likewise.
13267 2018-07-31 Olivier Hainque <hainque@adacore.com>
13269 * common.opt (nolibc): New option.
13270 * doc/invoke.texi (Link Options): Document it.
13271 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
13272 * config/alpha/linux.h: Likewise.
13273 * config/arc/elf.h: Likewise.
13274 * config/arm/uclinux-elf.h: Likewise.
13275 * config/arm/unknown-elf.h: Likewise.
13276 * config/avr/avrlibc.h: Likewise.
13277 * config/bfin/bfin.h: Likewise.
13278 * config/bfin/linux.h: Likewise.
13279 * config/bfin/uclinux.h: Likewise.
13280 * config/darwin.h: Likewise.
13281 * config/darwin10.h: Likewise.
13282 * config/darwin12.h: Likewise.
13283 * config/gnu-user.h: Likewise.
13284 * config/lm32/uclinux-elf.h: Likewise.
13285 * config/pa/pa-hpux11.h: Likewise.
13286 * config/pa/pa64-hpux.h: Likewise.
13287 * config/sparc/sparc.h: Likewise.
13289 2018-07-31 Olivier Hainque <hainque@adacore.com>
13291 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
13292 undefined variables.
13294 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13297 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
13298 instead of GEN_INT.
13300 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13302 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
13303 terminated string literal.
13305 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
13307 PR rtl-optimization/85160
13308 * combine.c (is_just_move): New function.
13309 (try_combine): Allow combining two instructions into two if neither of
13310 the original instructions was a move.
13312 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
13315 * doc/extend.texi (Global Register Variables): Discourage use of type
13317 (Local Register Variables): Likewise.
13319 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
13321 PR tree-optimization/86506
13322 * hwint.h (ceil_log2): Resync with hwint.c implementation.
13324 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
13327 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
13328 hard_regno, make sure no insn between `from` and `to` clobbers it.
13330 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
13331 Tom de Vries <tdevries@suse.de>
13333 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
13334 (PTX_DEFAULT_RUNTIME_DIM): ... this.
13335 (nvptx_goacc_validate_dims): Set default worker and gang dims to
13336 PTX_DEFAULT_RUNTIME_DIM.
13337 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
13339 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
13341 * config/pa/pa.c (pa_output_addr_vec): Align address table.
13342 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
13343 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
13345 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
13347 * config/rs6000/constraints.md (wG constraint): Delete, no longer
13349 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
13350 predicate to reflect toc fusion has been deleted.
13351 (toc_fusion_mem_raw): Delete, no longer used.
13352 (toc_fusion_mem_wrapped): Likewise.
13353 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
13355 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
13356 Delete, no longer used.
13357 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
13358 meant to be used for toc fusion.
13359 (rs6000_debug_print_mode): Delete toc fusion debugging.
13360 (rs6000_debug_reg_global): Likewise.
13361 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
13362 fusion and secondary reload support that were never used.
13363 (rs6000_option_override_internal): Delete TOC fusion, that was only
13364 partially defined, and it did not work unless you also used the
13366 (rs6000_legitimate_address_p): Delete TOC fusion support.
13367 (rs6000_opt_masks): Likewise.
13368 (fusion_wrap_memory_address): Delete function, no longer used.
13369 (fusion_split_address); Delete TOC fusion support.
13370 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
13371 longer used with toc fusion being deleted.
13372 (TARGET_TOC_FUSION_FP): Likewise.
13373 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
13375 (toc fusion spliter): Delete TOC fusion support.
13376 (toc_fusionload_<mode>): Likewise.
13377 (toc_fusionload_di): Likewise.
13378 (fusion_gpr_load_<mode>): Delete generator function, this insn no
13379 longer needs to be named. Rename predicate to delete TOC fusion.
13380 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13381 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13382 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
13383 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
13384 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
13386 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
13388 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
13389 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
13390 __int128 in built-in function prototypes.
13391 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
13392 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
13394 2018-07-27 Martin Sebor <msebor@redhat.com>
13396 PR tree-optimization/86696
13397 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
13398 types, including enums.
13399 (handle_char_store): Be prepared for the above function to fail.
13401 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
13403 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
13404 when optimization level is lower than 2 or optimize for size.
13406 2018-07-26 Martin Sebor <msebor@redhat.com>
13408 PR tree-optimization/86043
13409 PR tree-optimization/86042
13410 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
13411 (get_string_cst_length): Rename...
13412 (get_min_string_length): ...to this. Add argument.
13413 (handle_char_store): Extend to handle multi-character stores by
13415 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
13416 * tree.h (initializer_zerop): Add argument.
13418 2018-07-26 Jakub Jelinek <jakub@redhat.com>
13420 PR middle-end/86660
13421 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
13422 declare target to variables if they have always,{to,from,tofrom} map
13425 2018-07-26 Martin Liska <mliska@suse.cz>
13428 * lto-wrapper.c: Add linker_output as prefix
13429 for ltrans_output_file.
13431 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
13433 PR rtl-optimization/85805
13434 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
13435 value for hard registers if that was written in the same mode.
13437 2018-07-26 Martin Liska <mliska@suse.cz>
13439 PR gcov-profile/86536
13440 * gcov.c (format_gcov): Use printf format %.*f directly
13441 and do not handle special values.
13443 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13445 * common/config/arc/arc-common.c (arc_option_optimization_table):
13446 Update default optimizations for size.
13448 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13450 * config/arc/arc.md (movsf_insn): Add short instruction selection.
13451 * config/arc/constraints.md (CfZ): New constraint.
13452 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
13453 (subsf3_fpu): Likewise.
13454 (cmpsf_fpu): Likewise.
13455 (cmpsf_fpu_uneq): Likewise.
13457 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13459 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
13461 (arc_is_uncached_mem_p): uncached applies to both the variable and
13464 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13466 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
13469 2018-07-25 David Malcolm <dmalcolm@redhat.com>
13471 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
13472 field "m_scopes" from vec to auto_vec.
13474 2018-07-25 Martin Liska <mliska@suse.cz>
13476 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
13479 2018-07-25 Richard Biener <rguenther@suse.de>
13482 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
13483 special wrt context_die late.
13484 (gen_subprogram_die): Re-use DIEs in local scope.
13486 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
13488 PR tree-optimization/86644
13489 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
13491 2018-07-25 Martin Liska <mliska@suse.cz>
13493 PR middle-end/86645
13494 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
13495 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
13497 2018-07-25 Martin Liska <mliska@suse.cz>
13500 * params.def: Explain ASan abbreviation and provide
13501 a documentation link.
13503 2018-07-24 Martin Sebor <msebor@redhat.com>
13505 PR tree-optimization/86622
13506 PR tree-optimization/86532
13507 * builtins.h (string_length): Declare.
13508 * builtins.c (c_strlen): Correct handling of non-constant offsets.
13509 (check_access): Be prepared for non-constant length ranges.
13510 (string_length): Make extern.
13511 * expr.c (string_constant): Only handle the minor non-constant
13512 array index. Use string_constant to compute the length of
13513 a generic string constant.
13515 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
13517 PR tree-optimization/86618
13518 * tree-vect-stmts.c (vectorizable_call): Don't take the address
13519 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
13521 2018-07-24 David Malcolm <dmalcolm@redhat.com>
13523 PR tree-optimization/86636
13524 * json.cc (json::object::set): Fix comment. Add assertions.
13525 (json::array::append): Move here from json.h. Add comment and an
13527 (json::string::string): Likewise.
13528 * json.h (json::array::append): Move to json.cc.
13529 (json::string::string): Likewise.
13530 * optinfo-emit-json.cc
13531 (optrecord_json_writer::impl_location_to_json): Assert that we
13532 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
13533 wrapper around it. Expand the location once, rather than three
13535 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
13536 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
13538 (optrecord_json_writer::optinfo_to_json): Likewise, in four
13539 places. Fix some overlong lines.
13541 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
13543 * config/aarch64/aarch64-simd.md
13544 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
13545 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
13546 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
13547 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
13548 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
13549 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
13550 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
13551 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
13552 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
13554 2018-07-24 Jakub Jelinek <jakub@redhat.com>
13556 PR middle-end/86627
13557 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
13558 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
13559 and abs_d == d, do the power of two handling if profitable.
13561 2018-07-24 Richard Biener <rguenther@suse.de>
13563 * match.pd: Add BIT_FIELD_REF canonicalizations.
13565 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13568 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
13570 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13572 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
13573 terminated STRING_CST object.
13575 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13577 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
13579 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
13581 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
13582 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
13583 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
13584 the elements into a register.
13585 (rs6000_split_v4si_init_di_reg): Delete.
13586 (rs6000_split_v4si_init): Delete.
13587 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
13588 (vsx_init_v4si): Rewrite as a define_expand.
13590 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
13592 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
13593 zero_extend argument from memory): New.
13595 2018-07-22 Martin Sebor <msebor@redhat.com>
13598 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
13599 diagnosing calls with unknown arguments unless -Walloca-larger-than
13600 is restricted to less than PTRDIFF_MAX bytes.
13602 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
13604 * doc/gcov.texi (Invoking Gcov): Editorial changes.
13606 2018-07-20 David Malcolm <dmalcolm@redhat.com>
13608 * pretty-print.c (text_info::set_location): Remove redundant
13609 "line_table" parameter from call to rich_location::set_range.
13611 2018-07-20 Martin Sebor <msebor@redhat.com>
13613 PR middle-end/82063
13614 * builtins.c (expand_builtin_alloca): Adjust.
13615 * calls.c (alloc_max_size): Simplify.
13616 * cgraphunit.c (cgraph_node::expand): Adjust.
13617 * common.opt (larger_than_size, warn_frame_larger_than): Remove
13619 (frame_larger_than_size): Same.
13620 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
13621 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
13623 * doc/invoke.texi (GCC Command Options): Document option arguments.
13624 Explain byte-size arguments and suffixes.
13625 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
13626 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
13627 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
13628 * doc/options.texi (UInteger): Expand.
13629 (Host_Wide_Int, ByteSize): Document new properties.
13630 * final.c (final_start_function_1): Include sizes in an error message.
13631 * function.c (frame_offset_overflow): Same.
13632 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
13633 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
13634 Diagnose unbounded alloca calls only for limits of less than
13636 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
13637 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
13639 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
13640 only for limits of less than PTRDIFF_MAX.
13641 * langhooks-def.h (lhd_handle_option): Change function argument
13643 * langhooks.c (lhd_handle_option): Same.
13644 * langhooks.h (handle_option): Same.
13645 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
13647 (var_type, var_type_struct): Same.
13648 (var_set): Handle ByteSize flag.
13649 * optc-gen.awk: Add comments to output to ease debugging. Make
13650 use of HOST_WIDE_INT where appropriate.
13651 * opts-gen-save.awk: Use %lx to format unsigned long.
13652 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
13653 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
13654 arguments. Parse bytes-size suffixes.
13655 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
13656 (enum_value_to_arg): Same.
13657 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
13658 (handle_option): Adjust.
13659 (generate_option): Change function argument to HOST_WIDE_INT.
13660 (cmdline_handle_error): Adjust.
13661 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
13662 (set_option): Change function argument to HOST_WIDE_INT.
13663 (option_enabled): Handle cl_host_wide_int.
13664 (get_option_state): Handle CLVC_SIZE.
13665 (control_warning_option): Same.
13666 * opts.c (common_handle_option): Change function argument to
13667 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
13668 OPT_Wvla_larger_than_.
13669 * opts.h (enum cl_var_type): Add an enumerator.
13670 * stor-layout.c (layout_decl): Print a more meaningful warning.
13671 * toplev.c (output_stack_usage): Adjust.
13673 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
13675 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
13676 call to inline_expand_builtin_string_cmp.
13677 (expand_builtin_strcmp): Likewise.
13678 (expand_builtin_strncmp): Likewise.
13679 (inline_string_cmp): Delete the last parameter, change char_type_node
13680 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
13682 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
13683 the inlining expansion on target where the type of the call has same or
13684 narrower precision than unsigned char.
13686 2018-07-20 David Malcolm <dmalcolm@redhat.com>
13688 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
13689 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
13690 * common.opt (fsave-optimization-record): New option.
13691 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
13692 * doc/invoke.texi (-fsave-optimization-record): New option.
13693 * dumpfile.c: Include "optinfo-emit-json.h".
13694 (struct kv_pair): Move to coretypes.h.
13695 (optgroup_options): Make non-static.
13696 (dump_context::end_scope): Call
13697 optimization_records_maybe_pop_dump_scope.
13698 * dumpfile.h (optgroup_options): New decl.
13699 * json.cc: New file.
13700 * json.h: New file.
13701 * optinfo-emit-json.cc: New file.
13702 * optinfo-emit-json.h: New file.
13703 * optinfo.cc: Include "optinfo-emit-json.h".
13704 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
13705 (optinfo_enabled_p): Check optimization_records_enabled_p.
13706 (optinfo_wants_inlining_info_p): Likewise.
13707 * optinfo.h: Update comment.
13708 * profile-count.c (profile_quality_as_string): New function.
13709 * profile-count.h (profile_quality_as_string): New decl.
13710 (profile_count::quality): New accessor.
13711 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
13712 and optinfo_emit_json_cc_tests.
13713 * selftest.h (selftest::json_cc_tests): New decl.
13714 (selftest::optinfo_emit_json_cc_tests): New decl.
13715 * toplev.c: Include "optinfo-emit-json.h".
13716 (compile_file): Call optimization_records_finish.
13717 (do_compile): Call optimization_records_start.
13718 * tree-ssa-live.c: Include optinfo.h.
13719 (remove_unused_scope_block_p): Retain inlining information if
13720 optinfo_wants_inlining_info_p returns true.
13722 2018-07-20 Richard Biener <rguenther@suse.de>
13725 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
13726 to cover -flto-partition=none.
13728 2018-07-20 Martin Liska <mliska@suse.cz>
13730 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
13731 (get_decl_source_range): Remove unused function.
13733 2018-07-20 Richard Biener <rguenther@suse.de>
13735 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
13736 (struct vn_phi_s): Likewise.
13737 (struct vn_reference_s): Likewise.
13738 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
13739 for searching the slot of an entry known to be in the hash itself.
13740 (vn_phi_hasher::equal): Likewise.
13741 (vn_reference_hasher::equal): Likewise.
13742 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
13744 (optimistic_info, current_info): Remove, keeping only valid_info.
13745 (vn_reference_lookup_1): Remove fallback lookup.
13746 (vn_reference_lookup_2): Likewise.
13747 (vn_nary_op_lookup_1): Likewise.
13748 (vn_phi_lookup): Likewise.
13749 (vn_nary_build_or_lookup_1): Make sure to not chain the built
13751 (vn_reference_insert): Adjust, chain the inserted hash element
13752 at last_inserted_ref.
13753 (vn_reference_insert_pieces): Likewise.
13754 (visit_reference_op_call): Likewise.
13755 (vn_nary_op_insert_into): Chain the inserted hash element at
13756 last_inserted_nary.
13757 (vn_nary_op_insert_pieces): Adjust.
13758 (vn_nary_op_insert): Likewise.
13759 (vn_nary_op_insert_stmt): Likewise.
13760 (vn_phi_insert): Adjust, chain the inserted hash element at
13762 (process_scc): Remove clearing and copying the optimistic
13763 table. Instead remove elements inserted during an optimistic
13764 iteration from the single table we maintain.
13765 (init_scc_vn): Adjust.
13766 (free_scc_vn): Likewise.
13767 (sccvn_dom_walker::record_cond): Likewise.
13768 (sccvn_dom_walker::after_dom_children): Likewise.
13770 2018-07-19 Martin Sebor <msebor@redhat.com>
13772 PR tree-optimization/84047
13773 PR tree-optimization/83776
13774 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
13775 (check_array_bounds): Call it.
13777 2018-07-19 Martin Sebor <msebor@redhat.com>
13779 * align.h (align_flags): Use member initialization.
13781 2018-07-19 David Malcolm <dmalcolm@redhat.com>
13783 * Makefile.in (OBJS): Add optinfo.o.
13784 * coretypes.h (class symtab_node): New forward decl.
13785 (struct cgraph_node): New forward decl.
13786 (class varpool_node): New forward decl.
13787 * dump-context.h: New file.
13788 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
13790 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
13791 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
13792 (set_alt_dump_file): Likewise.
13793 (dump_context::~dump_context): New dtor.
13794 (dump_gimple_stmt): Move implementation to...
13795 (dump_context::dump_gimple_stmt): ...this new member function.
13796 Add the stmt to any pending optinfo, creating one if need be.
13797 (dump_gimple_stmt_loc): Move implementation to...
13798 (dump_context::dump_gimple_stmt_loc): ...this new member function.
13799 Start a new optinfo and add the stmt to it.
13800 (dump_gimple_expr): Move implementation to...
13801 (dump_context::dump_gimple_expr): ...this new member function.
13802 Add the stmt to any pending optinfo, creating one if need be.
13803 (dump_gimple_expr_loc): Move implementation to...
13804 (dump_context::dump_gimple_expr_loc): ...this new member function.
13805 Start a new optinfo and add the stmt to it.
13806 (dump_generic_expr): Move implementation to...
13807 (dump_context::dump_generic_expr): ...this new member function.
13808 Add the tree to any pending optinfo, creating one if need be.
13809 (dump_generic_expr_loc): Move implementation to...
13810 (dump_context::dump_generic_expr_loc): ...this new member
13811 function. Add the tree to any pending optinfo, creating one if
13813 (dump_printf): Move implementation to...
13814 (dump_context::dump_printf_va): ...this new member function. Add
13815 the text to any pending optinfo, creating one if need be.
13816 (dump_printf_loc): Move implementation to...
13817 (dump_context::dump_printf_loc_va): ...this new member function.
13818 Start a new optinfo and add the stmt to it.
13819 (dump_dec): Move implementation to...
13820 (dump_context::dump_dec): ...this new member function. Add the
13821 value to any pending optinfo, creating one if need be.
13822 (dump_context::dump_symtab_node): New member function.
13823 (dump_context::get_scope_depth): New member function.
13824 (dump_context::begin_scope): New member function.
13825 (dump_context::end_scope): New member function.
13826 (dump_context::ensure_pending_optinfo): New member function.
13827 (dump_context::begin_next_optinfo): New member function.
13828 (dump_context::end_any_optinfo): New member function.
13829 (dump_context::s_current): New global.
13830 (dump_context::s_default): New global.
13831 (dump_scope_depth): Delete global.
13832 (dumpfile_ensure_any_optinfo_are_flushed): New function.
13833 (dump_symtab_node): New function.
13834 (get_dump_scope_depth): Reimplement in terms of dump_context.
13835 (dump_begin_scope): Likewise.
13836 (dump_end_scope): Likewise.
13837 (selftest::temp_dump_context::temp_dump_context): New ctor.
13838 (selftest::temp_dump_context::~temp_dump_context): New dtor.
13839 (selftest::verify_item): New function.
13840 (ASSERT_IS_TEXT): New macro.
13841 (ASSERT_IS_TREE): New macro.
13842 (ASSERT_IS_GIMPLE): New macro.
13843 (selftest::test_capture_of_dump_calls): New test.
13844 (selftest::dumpfile_c_tests): Call it.
13845 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
13846 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
13847 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
13848 descriptive comment.
13849 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
13850 (dump_node, dump_bb): Move these unrelated decls.
13851 (class dump_manager): Add leading comment.
13852 * optinfo.cc: New file.
13853 * optinfo.h: New file.
13855 2018-07-19 Michael Collison <michael.collison@arm.com>
13856 Richard Henderson <rth@redhat.com>
13858 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
13859 (subti): Handle op1 zero.
13860 (subvti4, usub4ti4): New.
13861 (*sub<GPI>3_compare1_imm): New.
13862 (sub<GPI>3_carryinCV): New.
13863 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
13864 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
13866 2018-07-19 Michael Collison <michael.collison@arm.com>
13867 Richard Henderson <rth@redhat.com>
13869 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
13870 (addti3): Create simpler code if low part is already known to be 0.
13871 (addvti4, uaddvti4): New.
13872 (*add<GPI>3_compareC_cconly_imm): New.
13873 (*add<GPI>3_compareC_cconly): New.
13874 (*add<GPI>3_compareC_imm): New.
13875 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
13876 handle constants within this pattern..
13877 (*add<GPI>3_compareV_cconly_imm): New.
13878 (*add<GPI>3_compareV_cconly): New.
13879 (*add<GPI>3_compareV_imm): New.
13880 (add<GPI>3_compareV): New.
13881 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
13882 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
13883 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
13884 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
13885 with 'comparison' operator.
13886 (*add<GPI>3_compareV_cconly_imm): Ditto.
13887 (*add<GPI>3_compareV_cconly): Ditto.
13888 (*add<GPI>3_compareV_imm): Ditto.
13889 (add<GPI>3_compareV): Ditto.
13890 (add<mode>3_carryinC): Ditto.
13891 (*add<mode>3_carryinC_zero): Ditto.
13892 (*add<mode>3_carryinC): Ditto.
13893 (add<mode>3_carryinV): Ditto.
13894 (*add<mode>3_carryinV_zero): Ditto.
13895 (*add<mode>3_carryinV): Ditto.
13897 2018-07-19 Michael Collison <michael.collison@arm.com>
13898 Richard Henderson <rth@redhat.com>
13900 * config/aarch64/aarch64-modes.def (CC_V): New.
13901 * config/aarch64/aarch64-protos.h
13902 (aarch64_addti_scratch_regs): Declare
13903 (aarch64_subvti_scratch_regs): Declare.
13904 (aarch64_expand_subvti): Declare.
13905 (aarch64_gen_unlikely_cbranch): Declare
13906 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13907 for signed overflow using CC_Vmode.
13908 (aarch64_get_condition_code_1): Handle CC_Vmode.
13909 (aarch64_gen_unlikely_cbranch): New function.
13910 (aarch64_addti_scratch_regs): New function.
13911 (aarch64_subvti_scratch_regs): New function.
13912 (aarch64_expand_subvti): New function.
13914 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13916 * config/aarch64/aarch64-option-extensions.def: New entry for profile
13918 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13919 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13922 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13925 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13926 address check not strict.
13928 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13930 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13932 (store_pair_lanes<mode>): Likewise.
13933 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13934 enum value 'ADDR_QUERY_LDP_STP_N'.
13935 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13936 (aarch64_print_address_internal): Add declaration.
13937 (aarch64_print_ldpstp_address): Remove.
13938 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13939 (aarch64_print_operand): Change printing of 'y'.
13940 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13941 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13942 'true' rather than '1'.
13943 * config/aarch64/constraints.md (Uml): Likewise.
13944 (Uml): Rename to Umn.
13947 2018-07-19 Richard Biener <rguenther@suse.de>
13949 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13951 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13952 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13953 (vn_reference_hasher): Likewise.
13954 (struct vn_tables_s): Remove obstack and alloc-pool members.
13955 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13956 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13957 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13958 (vn_reference_insert_pieces): Likewise.
13959 (alloc_vn_nary_op_noinit): Adjust.
13960 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13961 (vn_phi_eq): Adjust.
13962 (shared_lookup_phiargs): Remove.
13963 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13964 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13965 (visit_reference_op_call): Likewise.
13966 (copy_nary, copy_phi, copy_reference): Remove.
13967 (process_scc): Rewind the obstack when iterating. Do not
13968 copy the elements to valid_info but just move them from one
13969 hashtable to the other.
13970 (allocate_vn_table): Adjust.
13971 (free_vn_table): Likewise.
13972 (init_scc_vn): Likewise.
13973 (free_scc_vn): Likewise.
13975 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
13978 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13979 indirect_return as function type attribute.
13980 (ix86_attribute_table): Change indirect_return to function
13982 * doc/extend.texi: Update indirect_return attribute.
13984 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
13986 * wide-int.h (widest2_int): New.
13987 * gimple-fold.c (arith_overflowed_p): Use it.
13988 * tree.h (widest2_int_cst): New.
13989 * tree-vrp.c (wide_int_binop_overflow): Rename from
13990 vrp_int_const_binop.
13991 Rewrite to work on trees.
13992 (extract_range_from_multiplicative_op_1): Abstract code to...
13993 (wide_int_range_min_max): ...here.
13994 (wide_int_range_cross_product): ...and here.
13995 (extract_range_from_binary_expr_1): Abstract overflow code to...
13996 (wide_int_range_mult_wrapping): ...here.
13997 * tree-vrp.h (wide_int_range_cross_product): New.
13998 (wide_int_range_mult_wrapping): New.
14000 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
14001 Julia Koval <julia.koval@intel.com>
14003 * config/i386/x86-tune-costs.h (skylake_memcpy,
14004 skylake_memset): Replace rep_prefix with unrolling for size 512.
14006 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
14008 PR middle-end/86544
14009 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
14010 comparision with EQ_EXPR in last stmt.
14012 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
14014 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
14015 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
14016 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
14017 previously known as "PowerPC AltiVec Built-in Functions". Move
14018 some material to new subsubsections "PowerPC AltiVec Built-in
14019 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
14021 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
14022 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
14023 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
14024 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
14026 2018-07-18 Richard Biener <rguenther@suse.de>
14028 PR tree-optimization/86557
14029 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
14032 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
14034 * config/s390/s390.c (s390_function_profiler): Generate CFI.
14036 2018-07-17 Jeff Law <law@redhat.com>
14038 * config/arm/arm.c (get_label_padding): Update for recent
14039 changes to label_to_alignment.
14041 PR tree-optimization/86010
14042 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
14044 * config/mips/mips.c (vr4130_align_insns): Update for recent
14045 changes to label_to_alignment.
14047 * config/frv/frv.c (frv_label_align): Update for recent changes
14048 to label_to_alignment.
14050 * config/nios2/nios2.c (nios2_label_align): Update for recent
14051 changes which dropped ALIGN_LABELS_LOG.
14053 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
14055 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
14056 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
14058 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
14060 * config/arc/arc.c (arc_label_align): Use align_labels instead of
14061 deprecated align_labels_log.
14063 2018-07-17 Richard Biener <rguenther@suse.de>
14066 * dwarf2out.c (init_sections_and_labels): Always generate
14067 a debug_line_str_section for early LTO debug.
14068 (dwarf2out_finish): Reset debug_line_str_hash output early.
14069 Bump counter for extra dwarf5 .debug_loc labels to not conflict
14071 (dwarf2out_early_finish): Output debug_line_str.
14073 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
14075 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
14076 index register on z196 or later.
14078 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
14080 * config/s390/s390.c (s390_default_align): Set default function
14082 (s390_override_options_after_change): Call s390_default align.
14083 (s390_option_override_internal): Call s390_default_align.
14084 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
14086 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14088 PR middle-end/86542
14089 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
14090 to _looptemp_ clauses, other than the first two.
14092 2018-07-17 Martin Liska <mliska@suse.cz>
14094 * opts.c: Do not enable OPT_falign_* for -Os.
14096 2018-07-17 Martin Liska <mliska@suse.cz>
14098 * align.h (MAX_CODE_ALIGN): New.
14099 (MAX_CODE_ALIGN_VALUE): New.
14100 * common/config/i386/i386-common.c (ix86_handle_option):
14101 (MAX_CODE_ALIGN): Moved to align.h.
14102 * final.c (MAX_CODE_ALIGN): Likewise.
14103 * opts.c (parse_and_check_align_values):
14104 (MAX_CODE_ALIGN): Likewise.
14105 (MAX_CODE_ALIGN_VALUE): Likewise.
14107 2018-07-17 Martin Liska <mliska@suse.cz>
14109 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
14110 in order to fulfil coding style.
14111 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
14112 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14113 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14114 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
14115 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
14116 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
14117 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
14118 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
14119 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14121 2018-07-17 Martin Liska <mliska@suse.cz>
14123 * align.h: New file.
14124 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
14126 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
14127 align_flags of label_to_alignment.
14128 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
14130 * config/m68k/m68k.c: Do not use removed align_labels_value and
14132 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
14133 (LOOP_ALIGN): Likewise.
14134 (LABEL_ALIGN): Likewise.
14135 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14136 Remove not used macro.
14137 (rs6000_loop_align): Change return type to align_flags.
14138 (rs6000_loop_align_max_skip): Remove.
14139 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
14140 Change return type to align_flags.
14141 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
14142 Remove not used macro.
14143 (rs6000_loop_align): Change return type to align_flags.
14144 (rs6000_loop_align_max_skip): Remove.
14145 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
14146 * config/rx/rx-protos.h (rx_align_for_label): Make it
14148 * config/rx/rx.c (rx_align_for_label): Change return type
14150 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
14152 into align_flags class.
14153 (LABEL_ALIGN): Likewise.
14154 (LOOP_ALIGN): Likewise.
14155 * config/s390/s390.c (s390_label_align): Use align_flags
14157 (s390_asm_output_function_label): Likewise.
14158 * config/sh/sh.c (sh_override_options_after_change):
14159 Use align_flags class directly without macros.
14160 (find_barrier): Likewise.
14161 (barrier_align): Likewise.
14162 (sh_loop_align): Likewise.
14163 * config/spu/spu.c (spu_option_override):
14164 Use align_flags_tuple::get_value instead of removed macros.
14165 (spu_sched_init): Likewise.
14166 * config/spu/spu.h (GTY): Likewise.
14167 * config/visium/visium.c (visium_option_override):
14168 Set "8" as default secondary alignment.
14169 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
14170 in order to guarantee secondary alignment of 8.
14171 * coretypes.h: Include align.h header file.
14172 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
14173 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
14174 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
14175 * doc/tm.texi.in: Likewise.
14176 * final.c (struct label_alignment): Remove not used structure.
14177 (LABEL_ALIGN): Change type to align_flags.
14178 (LOOP_ALIGN): Likewise.
14179 (JUMP_ALIGN): Likewise.
14180 (default_loop_align_max_skip): Remove.
14181 (default_label_align_max_skip): Likewise.
14182 (default_jump_align_max_skip): Likewise.
14183 (default_label_align_after_barrier_max_skip):
14184 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
14185 (LABEL_TO_MAX_SKIP): Remove.
14186 (label_to_alignment): Return align_flags type instead of integer.
14187 (label_to_max_skip): Remove.
14188 (align_fuzz): Use align_flags type.
14189 (compute_alignments): Use align_flags type and use align_flags::max
14190 to combine multiple alignments.
14191 (grow_label_align): Grow vec instead of C array.
14192 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
14193 (shorten_branches): Use align_flags type and use align_flags::max
14194 to combine multiple alignments.
14195 (final_scan_insn_1): Remove usage of secondary alignment that comes
14196 from label alignment, but instead use proper secondary alignment
14197 which is computed in grow_label_align.
14198 * flags.h (struct align_flags_tuple): Move to align.h.
14199 (struct align_flags): Likewise.
14200 (state_align_loops): Rename to align_loops.
14201 (state_align_jumps): Rename to align_jumps.
14202 (state_align_labels): Rename to align_labels.
14203 (state_align_functions): Rename to align_functions.
14204 (align_loops_log): Remove.
14205 (align_jumps_log): Remove.
14206 (align_labels_log): Remove.
14207 (align_functions_log): Remove.
14208 (align_loops_max_skip): Remove.
14209 (align_jumps_max_skip): Remove.
14210 (align_labels_max_skip): Remove.
14211 (align_functions_max_skip): Remove.
14212 (align_loops_value): Remove.
14213 (align_jumps_value): Remove.
14214 (align_labels_value): Remove.
14215 (align_functions_value): Remove.
14216 * output.h (label_to_alignment): Change return type to align_flags.
14217 (label_to_max_skip): Remove.
14218 * target.def: Remove loop_align_max_skip, label_align_max_skip,
14219 jump_align_max_skip macros.
14220 * targhooks.h (default_loop_align_max_skip): Remove.
14221 (default_label_align_max_skip): Likewise.
14222 (default_jump_align_max_skip): Likewise.
14223 (default_label_align_after_barrier_max_skip): Remove.
14224 * toplev.c (read_log_maxskip): Use ::normalize function.
14225 (parse_N_M): Remove not used argument and also call ::normalize.
14226 (parse_alignment_opts): Do not pass unused arguments.
14227 * varasm.c (assemble_start_function): Use directly align_functions
14228 instead of removed macros.
14229 * system.h: Do not poison removed macros.
14231 2018-07-17 Jakub Jelinek <jakub@redhat.com>
14233 PR middle-end/86539
14234 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
14235 and cond temporaries don't have reference type if iterator has
14236 pointer type. For init use &for_pre_body instead of pre_p if
14237 for_pre_body is non-empty.
14239 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14241 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
14242 double-double modes to SFmode directly directly.
14243 (trunc<mode>sf2_fprs): Delete.
14245 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14247 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
14248 for conversions between IFmode and the decimal floating point modes.
14249 (init_float128_ieee): Use the correct names for conversions between
14250 KFmode and the decimal floating point modes.
14252 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
14254 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
14255 for the conversions between TDmode and IFmode.
14256 (init_float128_ieee): Use more correct names for the conversions
14257 between TDmode and KFmode.
14259 2018-07-16 Jakub Jelinek <jakub@redhat.com>
14261 PR tree-optimization/86526
14262 * builtins.c (expand_builtin_memcmp): Formatting fixes.
14263 (inline_expand_builtin_string_cmp): Likewise.
14264 (inline_string_cmp): Likewise. Use c_readstr instead of
14265 builtin_memcpy_read_str. Add unit_mode temporary.
14267 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
14269 PR middle-end/86528
14270 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
14271 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
14273 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14275 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
14276 Alphabetize prototypes of built-in functions, separating out
14277 built-in functions that are listed in this section but should be
14278 described elsewhere.
14280 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
14283 * expmed.c (emit_store_flag): Do not emit setcc followed by a
14284 conditional move when trapping comparison was split to a
14285 non-trapping one (and vice versa).
14287 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14289 * config/s390/s390.c (s390_function_profiler): Generate nops
14290 instead of profiler call sequences.
14291 * config/s390/s390.opt: Add the new option.
14293 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14295 * config/s390/s390.c (s390_function_profiler): Generate
14296 __mcount_loc section.
14297 * config/s390/s390.opt: Add the new option.
14299 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
14301 * common.opt: Add the new warning.
14302 * config/s390/s390.c (s390_function_profiler): Emit "brasl
14303 %r0,__fentry__" when -mfentry is specified.
14304 (s390_option_override_internal): Disallow -mfentry for 31-bit
14306 * config/s390/s390.opt: Add the new option.
14308 2018-07-16 Richard Biener <rguenther@suse.de>
14311 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
14312 for function-local FUNCTION_DECL and RESULT_DECL immediately.
14314 2018-07-16 Martin Liska <mliska@suse.cz>
14317 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
14320 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
14322 * config/arc/arcHS.md: Update ARCHS scheduling rules.
14324 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
14326 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
14328 * config/arc/arc-cpus.def (hs4x): New cpu.
14330 * config/arc/arc-tables.opt: Regenerate.
14331 * config/arc/arc.c (arc_sched_issue_rate): New function.
14332 (TARGET_SCHED_ISSUE_RATE): Define.
14333 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
14334 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
14336 (attr tune): Add ARCHS4x tune values.
14337 (attr tune_dspmpy): Define.
14338 (*tst): Correct instruction type.
14339 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
14340 * config/arc/arcHS4x.md: New file.
14341 * config/arc/fpu.md: Update instruction type attributes.
14342 * config/arc/t-multilib: Regenerate.
14344 2018-07-16 Tom de Vries <tdevries@suse.de>
14347 * var-tracking.c (vt_initialize): Fix pre_dec handling.
14349 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
14351 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
14354 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
14356 PR tree-optimization/86514
14357 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
14358 conversion to a boolean type from a type with greater precision.
14360 2018-07-16 Tom de Vries <tdevries@suse.de>
14362 * var-tracking.c (vt_initialize): Print adjusted insn slim if
14363 dump_flags request TDF_SLIM.
14365 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
14367 * fold-const.c (int_const_binop_1): Abstract...
14368 (wide_int_binop): ...wide int code here.
14369 (poly_int_binop): ...poly int code here.
14370 Abstract the rest of int_const_binop_1 into int_const_binop.
14371 * fold-const.h (wide_int_binop): New.
14372 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
14373 Remove useless PLUS/MINUS_EXPR case.
14374 (zero_nonzero_bits_from_vr): Move wide int code...
14375 (zero_nonzero_bits_from_bounds): ...here.
14376 (extract_range_from_binary_expr_1): Move mask optimization code...
14377 (range_easy_mask_min_max): ...here.
14378 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
14379 (range_easy_mask_min_max): New.
14381 2018-07-15 Jeff Law <law@redhat.com>
14384 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
14387 2018-07-14 Jim Wilson <jimw@sifive.com>
14389 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
14391 2018-07-14 Paul Koning <ni1d@arrl.net>
14393 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
14395 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
14397 * lto-streamer-out.c (copy_function_or_variable): Dump info about
14400 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
14401 Steve Munroe <munroesj52@gmail.com>
14403 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
14404 (_mm_andnot_si128): Likewise.
14405 (_mm_or_si128): Likewise.
14406 (_mm_xor_si128): Likewise.
14408 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
14410 PR middle-end/78809
14411 * builtins.c (expand_builtin_memcmp): Inline the calls first
14412 when result_eq is false.
14413 (expand_builtin_strcmp): Inline the calls first.
14414 (expand_builtin_strncmp): Likewise.
14415 (inline_string_cmp): New routine. Expand a string compare
14416 call by using a sequence of char comparison.
14417 (inline_expand_builtin_string_cmp): New routine. Inline expansion
14418 a call to str(n)cmp/memcmp.
14419 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
14421 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
14423 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
14425 * config/arm/driver-arm.c: Include arm-native.h.
14426 (host_detect_local_cpu): Use auto-generated data tables.
14427 (vendors, arm_cpu_table): Delete. Move part information to ...
14428 * config/arm/arm-cpus.in: ... here.
14429 * config/arm/parsecpu.awk (gen_native): New function.
14430 (vendor, part): New CPU fields.
14431 (END): Add support for building the native CPU detection tables.
14432 * config/arm/t-arm (arm-native.h): Add build rule.
14433 (driver-arm.o): Add dependency on arm-native.h.
14435 2018-07-13 Richard Biener <rguenther@suse.de>
14437 PR middle-end/85974
14438 * match.pd (addr1 - addr2): Allow either of the operand to
14441 2018-07-13 Tom de Vries <tdevries@suse.de>
14443 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
14446 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
14448 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
14449 arrays instead of numbered variables.
14451 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
14453 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
14454 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
14456 2018-07-13 Richard Biener <rguenther@suse.de>
14459 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
14460 instead of get_context_die.
14462 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
14463 Richard Biener <rguenther@suse.de>
14465 PR middle-end/86489
14466 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
14467 that the loop latch destination where phi is defined.
14469 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
14471 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
14472 (riscv_expand_epilogue): Add assertion to check interrupt mode.
14473 (riscv_set_current_function): Extract getting interrupt type to new
14475 (riscv_get_interrupt_type): New function.
14476 (riscv_merge_decl_attributes): New function, checking interrupt type is
14478 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
14480 2018-07-12 Paul Koning <ni1d@arrl.net>
14482 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
14485 2018-07-12 Paul Koning <ni1d@arrl.net>
14487 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
14488 zero reference, add doloop_end instead.
14489 * doc/md.texi (decrement_and_branch_until_zero): Remove.
14490 (Looping patterns): Remove decrement_and_branch_until_zero. Add
14491 detail for doloop_end.
14493 2018-07-12 Martin Sebor <msebor@redhat.com>
14496 * attribs.c (decl_attributes): Reject conflicting attributes before
14497 calling attribute handlers.
14499 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
14501 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
14503 (gcc::dump_manager::get_dump_file_name): likewise.
14504 (dump_begin): Likewise.
14505 * dumpfile.h (dump_begin): Update prototype.
14506 (gcc::dump_manager::get_dump_file_name,
14507 gcc::dump_manager::get_dump_file_name): Update prototype.
14509 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14511 * internal-fn.h (vectorizable_internal_fn_p): New function.
14512 * tree-vect-slp.c (compatible_calls_p): Likewise.
14513 (vect_build_slp_tree_1): Remove nops argument. Handle calls
14514 to internal functions.
14515 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
14517 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14519 * fold-const.h (inverse_conditions_p): Declare.
14520 * fold-const.c (inverse_conditions_p): New function.
14521 * match.pd: Use inverse_conditions_p. Add folds of view_converts
14522 that test the inverse condition of a conditional internal function.
14523 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
14524 * internal-fn.c (internal_fn_mask_index): Handle conditional
14525 internal functions.
14526 (vectorized_internal_fn_supported_p): New function.
14527 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
14528 (any_pred_load_store): Replace with...
14529 (need_to_predicate): ...this new variable.
14530 (redundant_ssa_names): New variable.
14531 (ifcvt_can_use_mask_load_store): Move initial checks to...
14532 (ifcvt_can_predicate): ...this new function. Handle tree codes
14533 for which a conditional internal function exists.
14534 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
14535 instead of ifcvt_can_use_mask_load_store. Update after variable
14537 (predicate_load_or_store): New function, split out from
14538 predicate_mem_writes.
14539 (check_redundant_cond_expr): New function.
14540 (value_available_p): Likewise.
14541 (predicate_rhs_code): Likewise.
14542 (predicate_mem_writes): Rename to...
14543 (predicate_statements): ...this. Use predicate_load_or_store
14544 and predicate_rhs_code.
14545 (combine_blocks, tree_if_conversion): Update after above name changes.
14546 (ifcvt_local_dce): Handle redundant_ssa_names.
14547 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
14548 general conditional functions.
14549 * tree-vect-stmts.c (vectorizable_call): Likewise.
14551 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14552 Alan Hayward <alan.hayward@arm.com>
14553 David Sherwood <david.sherwood@arm.com>
14555 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
14556 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
14557 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
14558 plus and minus and convert them into IFN_COND_FMA-based sequences.
14559 (convert_mult_to_fma): Handle conditional plus and minus.
14561 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14563 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
14564 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
14565 (cond_fnms_optab): New optabs.
14566 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
14567 internal functions.
14568 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
14569 * internal-fn.h (get_conditional_internal_fn): Declare.
14570 (get_unconditional_internal_fn): Likewise.
14571 * internal-fn.c (cond_ternary_direct): New macro.
14572 (expand_cond_ternary_optab_fn): Likewise.
14573 (direct_cond_ternary_optab_supported_p): Likewise.
14574 (FOR_EACH_COND_FN_PAIR): Likewise.
14575 (get_conditional_internal_fn): New function.
14576 (get_unconditional_internal_fn): Likewise.
14577 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
14578 (gimple_match_op::gimple_match_op): Add a new overload for 5
14580 (gimple_match_op::set_op): Likewise.
14581 (gimple_resimplify5): Declare.
14582 * genmatch.c (decision_tree::gen): Generate simplifications for
14584 * gimple-match-head.c (gimple_simplify): Define an overload for
14585 5 operands. Handle calls with 5 arguments in the top-level overload.
14586 (convert_conditional_op): Handle conversions from unconditional
14587 internal functions to conditional ones.
14588 (gimple_resimplify5): New function.
14589 (build_call_internal): Pass a fifth operand.
14590 (maybe_push_res_to_seq): Likewise.
14591 (try_conditional_simplification): Try converting conditional
14592 internal functions to unconditional internal functions.
14593 Handle 3-operand unconditional forms.
14594 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
14595 Define ternary equivalents of the current rules for binary conditional
14596 internal functions.
14597 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
14598 ternary operations.
14599 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
14600 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
14601 (optab): Handle them.
14602 (SVE_COND_FP_TERNARY): New int iterator.
14603 (sve_fmla_op, sve_fmad_op): New int attributes.
14604 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
14605 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
14606 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
14608 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14610 * target.def (preferred_else_value): New target hook.
14611 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
14612 * doc/tm.texi: Regenerate.
14613 * targhooks.h (default_preferred_else_value): Declare.
14614 * targhooks.c (default_preferred_else_value): New function.
14615 * internal-fn.h (conditional_internal_fn_code): Declare.
14616 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
14617 (get_conditional_internal_fn): Use it.
14618 (conditional_internal_fn_code): New function.
14619 * gimple-match.h (gimple_match_cond): New struct.
14620 (gimple_match_op): Add a cond member function.
14621 (gimple_match_op::gimple_match_op): Update all forms to take a
14623 * genmatch.c (expr::gen_transform): Use the same condition as res_op
14624 for the suboperation, but don't specify a particular else_value.
14625 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
14626 (visit_nary_op, visit_reference_op_load): Pass
14627 gimple_match_cond::UNCOND to the gimple_match_op constructor.
14628 * gimple-match-head.c: Include tree-eh.h
14629 (convert_conditional_op): New function.
14630 (maybe_resimplify_conditional_op): Likewise.
14631 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
14632 (gimple_resimplify2): Likewise.
14633 (gimple_resimplify3): Likewise.
14634 (gimple_resimplify4): Likewise.
14635 (maybe_push_res_to_seq): Return null for conditional operations.
14636 (try_conditional_simplification): New function.
14637 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
14639 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
14641 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
14643 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
14645 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
14647 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14649 (hash_tree): Do not hash DECL_FCONTEXT
14650 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
14651 Do not stream DECL_FCONTEXT.
14652 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
14653 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
14655 2018-07-12 Richard Biener <rguenther@suse.de>
14658 * dwarf2out.c (gen_block_die): Only output blocks when they have
14659 at least one !DECL_IGNORED_P variable.
14661 2018-07-12 Richard Biener <rguenther@suse.de>
14664 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
14665 Remove -mieee-fp handling.
14667 2018-07-12 Richard Biener <rguenther@suse.de>
14669 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
14670 left-over from last patch.
14672 2018-07-12 Jakub Jelinek <jakub@redhat.com>
14674 PR tree-optimization/86492
14675 * gimple-ssa-store-merging.c
14676 (imm_store_chain_info::coalesce_immediate_stores): Call
14677 check_no_overlap even for the merge_overlapping case. Formatting fix.
14679 2018-07-12 Richard Biener <rguenther@suse.de>
14681 PR middle-end/86479
14682 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
14683 move possibly trapping operations into the conditional.
14685 2018-07-12 Richard Biener <rguenther@suse.de>
14687 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
14688 (vn_lookup_simplify_result): Remove recursion limit applied
14690 (vn_nary_build_or_lookup_1): Adjust.
14691 (try_to_simplify): Likewise.
14692 * gimple-match-head.c (gimple_resimplify1): Instead apply one
14694 (gimple_resimplify2): Likewise.
14695 (gimple_resimplify3): Likewise.
14696 (gimple_resimplify4): Likewise.
14698 2018-07-11 Jakub Jelinek <jakub@redhat.com>
14700 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
14701 Use __mmask64 type instead of __mmask8 for __M argument.
14702 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
14703 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
14705 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
14706 __mmask16 for __M argument.
14707 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
14708 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
14709 to __mmask16 instead of __mmask8.
14710 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
14711 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
14712 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
14713 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
14714 instead of __mmask16 for __U argument.
14715 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
14716 __mmask16 instead of __mmask8 for __U argument.
14717 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
14719 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
14721 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
14723 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
14725 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
14727 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
14729 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
14731 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
14733 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
14735 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
14737 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
14738 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
14739 return type as well as __M argument type and all casts from __mmask8
14741 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
14742 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
14743 return type as well as __M argument type and all casts from __mmask8
14745 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
14746 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
14747 return type as well as __M argument type and all casts from __mmask8
14749 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
14750 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
14751 return type as well as __M argument type and all casts from __mmask8
14753 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
14754 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
14757 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
14759 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
14760 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
14763 2018-07-11 Paul Koning <ni1d@arrl.net>
14765 * doc/md.texi (define_subst): Document how multiple occurrences of
14766 the same argument in the replacement pattern are handled.
14768 2018-07-11 Paul Koning <ni1d@arrl.net>
14770 * doc/extend.texi (Common Variable Attributes): Move "mode" into
14771 alphabetical order.
14772 (Common Type Attributes): Add "mode" attribute.
14774 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
14776 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
14777 stream DECL_ORIGINAL_TYPE.
14778 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
14779 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
14780 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
14781 Do not walk original type.
14782 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
14784 (write_ts_decl_non_common_tree_pointers): Do not stream
14786 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
14787 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
14789 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
14791 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
14792 thread twice from the same starting edge.
14794 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
14796 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
14797 * gimple.c (gimple_call_nonnull_result_p): ...here...
14798 (gimple_call_nonnull_arg): ...and here.
14799 * gimple.h (gimple_call_nonnull_result_p): New.
14800 (gimple_call_nonnull_arg): New.
14802 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
14804 * config/arm/arm-cpus.in: Move information from fpu field of each
14805 cpu definition to the isa field.
14806 * config/arm/parsecpu.awk (fpu): Delete match rule.
14807 (gen_comm_data): Don't add bits from the CPU's FPU entry.
14809 2018-07-11 Richard Biener <rguenther@suse.de>
14812 * dwarf2out.c (init_sections_and_labels): Use
14813 output_asm_line_debug_info consistently.
14814 (dwarf2out_early_finish): Likewise.
14815 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
14818 2018-07-11 Richard Biener <rguenther@suse.de>
14820 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
14821 Rework father_bb setting in a way to avoid propagating constants
14822 multiple times on a loop body.
14824 2018-07-10 Mark Wielaard <mark@klomp.org>
14827 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
14829 2018-07-10 Richard Biener <rguenther@suse.de>
14831 * hash-map.h (hash_map::iterator::operator*): Return
14832 references to key and value.
14834 2018-07-10 Jakub Jelinek <jakub@redhat.com>
14837 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
14838 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
14839 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
14840 (gimplify_omp_for): For composite loops, move outer
14841 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14842 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
14843 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
14844 TREE_LIST for both the original class iterator and the "last" helper
14845 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
14846 loop, remember has_decl_expr from outer composite loops for the
14847 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
14849 2018-07-09 Martin Sebor <msebor@redhat.com>
14851 PR middle-end/77357
14852 PR middle-end/86428
14853 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
14854 accessing implicitly initialized array elements.
14855 * expr.c (string_constant): Handle string initializers of
14856 character arrays within aggregates.
14857 * gimple-fold.c (fold_array_ctor_reference): Add argument.
14858 Store element offset. As a special case, handle zero size.
14859 (fold_nonarray_ctor_reference): Same.
14860 (fold_ctor_reference): Add argument. Store subobject offset.
14861 * gimple-fold.h (fold_ctor_reference): Add argument.
14863 2018-07-09 Paul Koning <ni1d@arrl.net>
14865 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
14866 (pdp11_insn_cost): New function.
14867 (pdp11_md_asm_adjust): New function.
14868 (TARGET_INVALID_WITHIN_DOLOOP): Define.
14869 (pdp11_rtx_costs): Update to match machine better.
14870 (output_addr_const_pdp11): Correct format mismatch warnings.
14871 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
14872 * config/pdp11/pdp11.md: General change to add base_cost and/or
14873 length attributes for use by new pdp11_insn_cost function.
14874 (MIN_BRANCH): Correct definition.
14876 (doloop_end): Use standard pattern name for looping pattern.
14877 (doloop_end_nocc): New.
14878 (movsf): Add another constraint alternative.
14879 (zero_extendqihi2): Add constraint alternatives for not in place
14881 (zero_extendhisi2): Remove.
14882 (shift patterns): Add CC handling variants.
14886 (define_peephole2): New peephole to recognize mov that sets CC for
14889 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14891 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
14892 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
14895 2018-07-09 Jakub Jelinek <jakub@redhat.com>
14898 * real.c (real_nextafter): Return true if result is denormal.
14900 2018-07-09 Martin Liska <mliska@suse.cz>
14902 * common.opt: Add back wrongly removed attribute.
14904 2018-07-09 Richard Biener <rguenther@suse.de>
14907 * dwarf2out.c (gen_block_die): For an early generated DIE
14908 always output high/low PC attributes.
14910 2018-07-09 Tom de Vries <tdevries@suse.de>
14912 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14913 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14914 onto VAR_DECL with abstract origin.
14916 2018-07-07 Jim Wilson <jimw@sifive.com>
14918 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14920 2018-07-07 Tom de Vries <tdevries@suse.de>
14922 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14924 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
14926 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14928 (combine_bound): Use wide-int overflow calculation instead of
14930 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14932 * fold-const.c (int_const_binop_2): Same.
14933 (extract_muldiv_1): Same.
14934 (fold_div_compare): Same.
14935 (fold_abs_const): Same.
14937 * poly-int.h (add): Same.
14941 * predict.c (predict_iv_comparison): Same.
14942 * profile-count.c (slow_safe_scale_64bit): Same.
14943 * simplify-rtx.c (simplify_const_binary_operation): Same.
14944 * tree-chrec.c (tree_fold_binomial): Same.
14945 * tree-data-ref.c (split_constant_offset_1): Same.
14946 * tree-if-conv.c (idx_within_array_bound): Same.
14947 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14948 * tree-ssa-phiopt.c (minmax_replacement): Same.
14949 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14950 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14951 * vr-values.c (vr_values::adjust_range_with_scev): Same.
14952 * wide-int.cc (wi::add_large): Same.
14953 (wi::mul_internal): Same.
14954 (wi::sub_large): Same.
14955 (wi::divmod_internal): Same.
14956 * wide-int.h: Change overflow type to overflow_type for neg, add,
14957 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14958 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14959 mul_internal, divmod_internal.
14960 (overflow_type): New enum.
14961 (accumulate_overflow): New.
14963 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
14965 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14966 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14968 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14970 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14971 argument is checked for zero before entering loop, avoid checking again.
14973 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14975 * gimplify.h (generic_expr_could_trap_p): Set as global function.
14976 * gimplify.h (generic_expr_could_trap_p): Likwise.
14977 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14979 2018-07-06 Jakub Jelinek <jakub@redhat.com>
14981 PR tree-optimization/86401
14982 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14983 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14984 (fold_bit_and_mask): ... here. New helper function for match.pd.
14985 * fold-const.h (fold_bit_and_mask): Declare.
14986 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14988 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
14991 * target.def (translate_mode_attribute): New hook.
14992 * targhooks.h (default_translate_mode_attribute): Declare.
14993 * targhooks.c (default_translate_mode_attribute): New function.
14994 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
14995 * doc/tm.texi: Regenerate.
14996 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
14997 (rs6000_translate_mode_attribute): New function.
14999 2018-07-06 Paul Koning <ni1d@arrl.net>
15001 * doc/md.texi (define_split): Document DONE and FAIL.
15002 (define_peephole2): Ditto.
15004 2018-07-05 Jeff Law <law@redhat.com>
15006 PR tree-optimization/86010
15007 * tree-ssa-dse.c (compute_trims): More aggressively trim at
15008 both the head and tail of mem* and str* calls.
15010 2018-07-05 Jim Wilson <jimw@sifive.com>
15012 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
15014 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
15016 * config/aarch64/aarch64-simd.md: correct flags text for
15017 MIN_EXPR replacement.
15019 2018-07-05 James Clarke <jrtc27@jrtc27.com>
15021 * configure: Regenerated.
15023 2018-07-05 Carl Love <cel@us.ibm.com>
15025 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
15026 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
15027 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
15028 VSX_BUILTIN_DOUBLEL_V4SF.
15030 2018-07-05 Martin Sebor <msebor@redhat.com>
15033 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
15034 than its domain to compute its the upper bound of a char array.
15036 2018-07-05 Nathan Sidwell <nathan@acm.org>
15038 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
15039 * doc/cpp.texi: Update comment.
15040 * doc/tm.texi: Rebuilt.
15041 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
15042 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
15043 * doc/extend.texi (Backwards Compatibility): Clarify it is system
15044 headers affected by extern "C".
15045 * system.h: Poison NO_IMPLICIT_EXTERN_C.
15046 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
15047 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
15048 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
15049 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
15050 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
15051 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
15052 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
15053 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
15054 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
15055 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
15056 config/sparc/sp64-elf.h, config/spu/spu.h,
15057 config/stormy16/stormy16.h, config/v850/v850.h,
15058 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
15059 define NO_IMPLICIT_EXTERN_C.
15060 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
15062 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15065 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
15066 instead of GET_MODE_SIZE when comparing Units.
15068 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15071 * rtlanal.c (set_noop_p): Constrain on mode change,
15072 include hard-reg-set.h
15074 2018-07-05 Tamar Christina <tamar.christina@arm.com>
15076 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
15078 2018-07-05 Jakub Jelinek <jakub@redhat.com>
15081 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
15084 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15086 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15088 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
15091 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
15093 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
15095 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
15097 PR middle-end/86380
15098 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
15100 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
15102 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
15103 neg_*_op* variables.
15105 2018-07-04 Martin Liska <mliska@suse.cz>
15107 * tree-switch-conversion.c: Define
15108 max_ratio_for_speed and max_ratio_for_size constants.
15110 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15111 Martin Liska <mliska@suse.cz>
15113 PR middle-end/66240
15116 * common.opt: Rename align options with 'str_' prefix.
15117 * common/config/i386/i386-common.c (set_malign_value): New
15119 (ix86_handle_option): Use it to set -falign-* options/
15120 * config/aarch64/aarch64-protos.h (struct tune_params): Change
15121 type from int to string.
15122 * config/aarch64/aarch64.c: Update default values from int
15124 * config/alpha/alpha.c (alpha_override_options_after_change):
15126 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
15127 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15128 max skip conditionally.
15129 * config/i386/freebsd.h (SUBALIGN_LOG): New.
15130 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15131 max skip conditionally.
15132 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15133 max skip conditionally.
15134 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
15135 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15136 max skip conditionally.
15137 * config/i386/i386.c (struct ptt): Change type from int to
15139 (ix86_default_align): Set default values.
15140 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
15141 max skip conditionally.
15142 * config/i386/iamcu.h (SUBALIGN_LOG): New.
15143 (ASM_OUTPUT_MAX_SKIP_ALIGN):
15144 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
15145 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15146 max skip conditionally.
15147 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
15148 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
15149 * config/i386/x86-64.h (SUBALIGN_LOG): New.
15150 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
15151 max skip conditionally.
15152 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15153 * config/ia64/ia64.c (ia64_option_override): Set default values
15154 for alignment options.
15155 * config/m68k/m68k.c: Handle new str_align_* options.
15156 * config/mips/mips.c (mips_set_compression_mode): Change
15158 (mips_option_override): Set default values for options.
15159 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
15161 * config/rs6000/rs6000.c (rs6000_option_override_internal):
15163 * config/rx/rx.c (rx_option_override): Likewise.
15164 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
15165 (LABEL_ALIGN): Use align_labels_log.
15166 (LOOP_ALIGN): Use align_loops_align.
15167 * config/s390/s390.c (s390_asm_output_function_label): Use new
15169 * config/sh/sh.c (sh_override_options_after_change):
15170 Change type of constants.
15171 * config/spu/spu.c (spu_sched_init): Likewise.
15172 * config/sparc/sparc.c (sparc_option_override): Set default
15173 values for options.
15174 * config/visium/visium.c (visium_option_override): Likewise.
15175 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
15176 emit p2align format with last argument if it's not needed.
15177 * doc/invoke.texi: Document extended format of -falign-*.
15178 * final.c: Use align_labels alignment.
15179 * flags.h (struct target_flag_state): Change type to use
15181 (struct align_flags_tuple): New.
15182 (struct align_flags): Likewise.
15183 (align_loops_log): Redefine macro to use new types.
15184 (align_loops_max_skip): Redefine macro to use new types.
15185 (align_jumps_log): Redefine macro to use new types.
15186 (align_jumps_max_skip): Redefine macro to use new types.
15187 (align_labels_log): Redefine macro to use new types.
15188 (align_labels_max_skip): Redefine macro to use new types.
15189 (align_functions_log): Redefine macro to use new types.
15190 (align_loops): Redefine macro to use new types.
15191 (align_jumps): Redefine macro to use new types.
15192 (align_labels): Redefine macro to use new types.
15193 (align_functions): Redefine macro to use new types.
15194 (align_functions_max_skip): Redefine macro to use new types.
15195 (align_loops_value): New macro.
15196 (align_jumps_value): New macro.
15197 (align_labels_value): New macro.
15198 (align_functions_value): New macro.
15199 * function.c (invoke_set_current_function_hook): Propagate
15200 alignment values from flags to global variables default in
15202 * ipa-icf.c (sem_function::equals_wpa): Use
15203 cl_optimization_option_eq instead of memcmp.
15204 * lto-streamer.h (cl_optimization_stream_out): Support streaming
15206 (cl_optimization_stream_in): Likewise.
15207 * optc-save-gen.awk: Support strings in cl_optimization.
15208 * opth-gen.awk: Likewise.
15209 * opts.c (finish_options): Remove error checking of invalid
15211 (MAX_CODE_ALIGN): Remove.
15212 (MAX_CODE_ALIGN_VALUE): Likewise.
15213 (parse_and_check_align_values): New function.
15214 (check_alignment_argument): Likewise.
15215 (common_handle_option): Use check_alignment_argument.
15216 * opts.h (parse_and_check_align_values): Declare.
15217 * toplev.c (init_alignments): Remove.
15218 (read_log_maxskip): New.
15219 (parse_N_M): Likewise.
15220 (parse_alignment_opts): Likewise.
15221 (backend_init_target): Remove usage of init_alignments.
15222 * toplev.h (parse_alignment_opts): Declare.
15223 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
15225 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
15226 * tree.c (cl_option_hasher::equal): New.
15227 * varasm.c: Use new global macros.
15229 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
15231 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
15232 Use a simpler align directive also if MAXSKIP = ALIGN-1.
15233 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15234 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15235 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15236 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
15237 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
15238 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
15239 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
15240 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15241 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15242 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15243 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
15245 2018-07-04 Martin Liska <mliska@suse.cz>
15246 Jonathan Wakely <jwakely@redhat.com>
15248 * coverage.c: Use correct type.
15249 * doc/invoke.texi: Language correction.
15251 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
15254 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
15255 ENDBRANCH for non-tail call which may return via indirect branch.
15256 * doc/extend.texi: Document indirect_return attribute.
15258 2018-07-03 Martin Sebor <msebor@redhat.com>
15260 PR tree-optimization/86274
15261 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
15263 (format_floating): Correct handling of infinities and NaNs.
15265 2018-07-03 Martin Sebor <msebor@redhat.com>
15267 * print-tree.c (print_real_cst): New function.
15268 (print_node_brief): Call it.
15269 (print_node): Ditto.
15271 2018-07-03 Jeff Law <law@redhat.com>
15273 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
15274 into a single pattern.
15276 * config/h8300/h8300.md (ors code_iterator): New.
15277 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
15278 a single pattern and single splitter.
15279 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
15280 (iorqi3_1, xorqi3_1): Likewise.
15281 (iorqi3, xorqi3 expanders): Similarly.
15283 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
15284 (movmd_internal) into a single pattern using the P mode iterator.
15285 (movmd splitters): Similarly.
15286 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
15287 (movsd splitters): Similarly.
15289 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
15290 ADDB, ADDW and ADDL into a single ADD attribute which selects the
15291 right table based on the size of the operand.
15292 * config/h8300/h8300.md (length_table): Corresponding changes. All
15293 references to "addb", "addw" and "addl" changed to "add".
15294 (btst patterns): Merge two variants into a single pattern.
15295 (tstqi, tsthi): Likewise.
15296 (addhi3_incdec, addsi3_incdec): Likewise.
15297 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
15298 (mulhi3, mulsi3): Likewise.
15299 (udivhi3, udivsi3): Likewise.
15300 (divhi3, divsi3): Likewise.
15301 (andorqi3, andorhi3, andorsi3): Likewise.
15303 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
15306 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
15307 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
15309 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15311 PR tree-optimization/85694
15312 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
15313 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
15315 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
15316 (<u>avg<mode>3_ceil): New patterns.
15318 2018-07-03 David Malcolm <dmalcolm@redhat.com>
15320 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
15321 scan-tree-dump directive.
15322 * gcc.dg/vect/slp-perm-2.c: Likewise.
15323 * gcc.dg/vect/slp-perm-3.c: Likewise.
15324 * gcc.dg/vect/slp-perm-5.c: Likewise.
15325 * gcc.dg/vect/slp-perm-6.c: Likewise.
15326 * gcc.dg/vect/slp-perm-7.c: Likewise.
15327 * gcc.dg/vect/slp-perm-8.c: Likewise.
15329 2018-07-03 Marek Polacek <polacek@redhat.com>
15331 PR middle-end/86202
15332 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
15334 2018-07-03 Richard Biener <rguenther@suse.de>
15337 * tree-ssa-structalias.c (find_func_clobbers): Properly
15338 handle indirect calls.
15340 2018-07-03 Jeff Law <law@redhat.com>
15342 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
15343 (shifts): New code iterator.
15344 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
15345 expander. Fix HImode handling on H8/SX.
15346 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
15347 (subqi3, subhi3, subsi3 expanders): Likewise.
15348 (andqi3, andhi3, andsi3 expanders): Likewise.
15349 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
15350 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
15351 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
15352 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
15353 (zero_extendqihi2, zero_extendqisi2): Likewise.
15354 (extendqihi2, extendqisi2): Likewise.
15355 (rotlqi3, rotlhi3, rotlsi3): Likewise.
15356 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
15357 (rotlqi3_1, rotlhi3_1): Likewise.
15358 (logicalhi3_sn, logicalsi3_sn): Likewise.
15359 (logicalhi3, logicalsi3): Likewise.
15361 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15363 * tree-vect-patterns.c (vect_recog_rotate_pattern)
15364 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15365 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
15366 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
15367 type to append_pattern_def_seq instead of creating a stmt_vec_info
15369 (build_mask_conversion): Likewise. Remove vinfo argument.
15370 (vect_add_conversion_to_patterm): Likewise, renaming to...
15371 (vect_add_conversion_to_pattern): ...this.
15372 (vect_recog_mask_conversion_pattern): Update call to
15373 build_mask_conversion. Pass the vector type to
15374 append_pattern_def_seq here too.
15375 (vect_recog_gather_scatter_pattern): Update call to
15376 vect_add_conversion_to_pattern.
15378 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15380 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
15381 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15382 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
15383 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
15384 STMT_VINFO_PATTERN_DEF_SEQ to null here.
15385 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
15386 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
15387 append_pattern_def_seq instead of new_pattern_def_seq.
15388 (vect_recog_divmod_pattern): Do both of the above.
15389 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
15392 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15394 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
15395 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
15396 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
15397 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
15398 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
15399 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15400 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
15401 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
15402 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
15403 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
15404 parameter with a single stmt_vec_info.
15405 (vect_recog_func_ptr): Likewise.
15406 (vect_recog_gather_scatter_pattern): Likewise, folding in...
15407 (vect_try_gather_scatter_pattern): ...this.
15408 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
15409 the stmt_vec_info of the statement to be matched. Don't clear
15410 STMT_VINFO_RELATED_STMT.
15411 (vect_pattern_recog): Update call accordingly.
15413 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15415 PR tree-optimization/85694
15416 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
15417 (uavgM3_ceil): Document new optabs.
15418 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
15419 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
15421 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
15422 (savg_ceil_optab): New optabs.
15423 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
15424 (vect_vect_recog_func_ptrs): Add it.
15425 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
15426 constant directly from the associated lhs.
15428 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15430 * tree-vect-patterns.c (vect_split_statement): New function.
15431 (vect_convert_input): Use it to try to split an existing cast.
15433 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15435 * poly-int.h (print_hex): New function.
15436 * dumpfile.h (dump_dec, dump_hex): Declare.
15437 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
15438 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
15439 min_input_precision, operation_precision and operation_sign.
15440 * tree-vect-patterns.c (vect_get_range_info): New function.
15441 (vect_same_loop_or_bb_p, vect_single_imm_use)
15442 (vect_operation_fits_smaller_type): Delete.
15443 (vect_look_through_possible_promotion): Add an optional
15444 single_use_p parameter.
15445 (vect_recog_over_widening_pattern): Rewrite to use new
15446 stmt_vec_info infomration. Handle one operation at a time.
15447 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
15448 (vect_truncatable_operation_p, vect_set_operation_type)
15449 (vect_set_min_input_precision): New functions.
15450 (vect_determine_min_output_precision_1): Likewise.
15451 (vect_determine_min_output_precision): Likewise.
15452 (vect_determine_precisions_from_range): Likewise.
15453 (vect_determine_precisions_from_users): Likewise.
15454 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
15455 (vect_vect_recog_func_ptrs): Put over_widening first.
15457 (vect_pattern_recog): Call vect_determine_precisions.
15459 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15461 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
15462 statements that have been replaced by further pattern statements.
15463 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
15465 2018-07-03 Richard Biener <rguenther@suse.de>
15467 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
15468 always set *dt. Dump vectype in vectype overload.
15469 * dumpfile.h (dump_gimple_expr): New function.
15470 (dump_gimple_expr_loc): Likewise.
15471 * dumpfile.c (dump_gimple_expr): New function.
15472 (dump_gimple_expr_loc): Likewise.
15474 2018-07-02 Jeff Law <law@redhat.com>
15476 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
15477 the H8/300, H8/300H and H8/S variants into a single pattern.
15478 (movhi_h8300, movqi_h8300hs): Similarly.
15479 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
15480 (QHI mode iterator): New.
15482 * config/h8300/h8300.md: Remove trailing whitespace.
15484 2018-07-02 Jim Wilson <jimw@sifive.com>
15486 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
15487 instead of emit_insn for interrupt returns.
15488 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
15489 (riscv_sret, riscv_uret): Likewise.
15491 2018-07-02 David Malcolm <dmalcolm@redhat.com>
15493 * pretty-print.c (selftest::test_pp_format): Move save and restore
15494 of quotes to class auto_fix_quotes, and add an instance.
15495 * selftest.c: Include "intl.h".
15496 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
15497 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
15498 * selftest.h (selftest::auto_fix_quotes): New class.
15500 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
15502 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
15503 (aarch64_sve_prepare_conditional_op): Remove.
15504 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
15505 Allow aarch64_simd_reg_or_zero as select operand; remove
15506 the aarch64_sve_prepare_conditional_op call.
15507 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
15508 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15509 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
15510 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
15511 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
15512 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
15513 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
15514 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
15515 and a splitters to match all of the *_any patterns.
15516 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
15518 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
15519 (SVE_COND_FP_BINARY_REV): Remove.
15520 (sve_int_op_rev, sve_fp_op_rev): New.
15521 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
15522 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
15523 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
15524 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
15525 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
15526 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
15527 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
15528 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
15529 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
15531 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
15532 Remove match_dup 1 from the inner unspec.
15533 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15535 * config/aarch64/aarch64.md (movprfx): New attr.
15536 (length): Default movprfx to 8.
15537 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
15538 (*madd<SVE_I>, *msub<SVE_I): Likewise.
15539 (*<su>mul<SVE_I>3_highpart): Likewise.
15540 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
15541 (*v<ASHIFT><SVE_I>3): Likewise.
15542 (*<su><MAXMIN><SVE_I>3): Likewise.
15543 (*<su><MAXMIN><SVE_F>3): Likewise.
15544 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
15545 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
15546 (*div<SVE_F>4): Likewise.
15548 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
15550 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
15553 2018-07-02 Richard Biener <rguenther@suse.de>
15555 PR tree-optimization/86363
15556 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
15557 memset argument refers to a non-variable address.
15559 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
15561 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
15562 {PLUS,MINUS}_EXPR code to...
15563 (adjust_symbolic_bound): ...here,
15564 (combine_bound): ...here,
15565 (set_value_range_with_overflow): ...and here.
15567 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
15569 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
15571 (extract_range_from_abs_expr): ...here.
15573 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
15575 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
15576 -fno-omit-frame-pointer when not optimizing.
15578 2018-07-02 Martin Liska <mliska@suse.cz>
15581 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
15582 (propagate_nothrow): Likewise.
15584 2018-07-02 Martin Liska <mliska@suse.cz>
15587 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
15589 2018-07-02 David Malcolm <dmalcolm@redhat.com>
15591 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
15592 function in r262149, changing "loc" param from source_location to
15593 const dump_location_t &.
15594 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
15595 declaration, as above.
15597 2018-07-01 Paul Koning <ni1d@arrl.net>
15599 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15600 -munit-asm, -mgnu-asm, -mdec-asm.
15601 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
15602 (pdp11_output_labelref): New.
15603 (pdp11_output_def): New.
15604 (pdp11_output_addr_vec_elt): New.
15605 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
15606 %# and %@ format codes.
15607 (pdp11_option_override): New.
15608 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
15609 (pdp11_output_ident): New.
15610 (pdp11_asm_named_section): New.
15611 (pdp11_asm_init_sections): New.
15612 (pdp11_file_start): New.
15613 (pdp11_file_end): New.
15614 (output_ascii): Use .ascii/.asciz for -mdec-asm.
15615 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
15616 %o, like %c but octal.
15617 (pdp11_option_override): New.
15618 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
15620 (DATA_SECTION_ASM_OP): Ditto.
15621 (READONLY_DATA_SECTION_ASM_OP): New.
15622 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
15623 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
15624 (ASM_OUTPUT_LABELREF): Ditto.
15625 (ASM_OUTPUT_DEF): Ditto.
15626 (ASM_OUTPUT_EXTERNAL): New.
15627 (ASM_OUTPUT_SOURCE_FILENAME): New.
15628 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
15629 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
15630 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
15631 %# and %@ format codes.
15632 * config/pdp11/pdp11.opt (mgnu-asm): New.
15633 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
15634 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
15635 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
15637 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
15639 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
15640 dereferencing path[] beyond its length.
15642 (debug_all_paths): New.
15643 (rewire_first_differing_edge): New.
15644 (adjust_paths_after_duplication): New.
15645 (duplicate_thread_path): Call adjust_paths_after_duplication.
15647 (thread_through_all_blocks): Add new argument to
15648 duplicate_thread_path.
15650 2018-06-30 Jim Wilson <jimw@sifive.com>
15652 * config/riscv/predicates.md (p2m1_shift_operand): New.
15653 (high_mask_shift_operand): New.
15654 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
15655 pattern using p2m1_shift_operand.
15656 (lshsi3_zero_extend_3+2): New combiner pattern using
15657 high_mask_shift_operand.
15659 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15661 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
15663 (vect_recog_rotate_pattern): ...here.
15664 (vect_convert_input): Try to insert casts of invariants in the
15666 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
15667 preheader to be empty.
15669 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15671 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
15672 vector type. If given, install it in the new statement's
15673 STMT_VINFO_VECTYPE.
15674 (vect_element_precision): New function.
15675 (vect_unpromoted_value): New struct.
15676 (vect_unpromoted_value::vect_unpromoted_value): New function.
15677 (vect_unpromoted_value::set_op): Likewise.
15678 (vect_look_through_possible_promotion): Likewise.
15679 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
15680 (vect_widened_op_tree, vect_convert_input): Likewise.
15681 (vect_convert_inputs, vect_convert_output): Likewise.
15682 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
15683 to handle the optional cast of the multiplication result and
15684 vect_widened_op_tree to detect the widened multiplication itself.
15685 Do not require the input and output of promotion casts to have
15686 the same sign, but base the signedness of the operation on the
15687 input rather than the result. If the pattern includes two
15688 promotions, check that those promotions have the same sign.
15689 Do not restrict the MULT_EXPR handling to a double-width result;
15690 handle quadruple-width results and wider. Use vect_convert_inputs
15691 to convert the inputs to the common type.
15692 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
15693 to handle the optional cast of the ABS result. Also allow a sign
15694 change or a sign extension between the ABS and MINUS.
15695 Use vect_widened_op_tree to detect the widened subtraction and use
15696 vect_convert_inputs to convert the inputs to the common type.
15697 (vect_handle_widen_op_by_const): Delete.
15698 (vect_recog_widen_op_pattern): New function.
15699 (vect_recog_widen_mult_pattern): Use it.
15700 (vect_recog_widen_shift_pattern): Likewise.
15701 (vect_recog_widen_sum_pattern): Use
15702 vect_look_through_possible_promotion to handle the promoted
15705 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15707 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
15708 the containing gimple_seq *.
15709 * gimple-iterator.h (gsi_for_stmt): Declare it.
15710 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
15711 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
15712 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15713 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15714 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
15716 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
15718 (vect_mark_pattern_stmts): ...here. Handle cases in which the
15719 statement being replaced is part of an existing pattern
15720 definition sequence, inserting the new pattern statements before
15722 (vect_pattern_recog_1): Don't return a bool. If the statement
15723 is already part of a pattern, instead apply pattern matching
15724 to the pattern definition statements. Don't clear the
15725 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
15726 (vect_pattern_recog): Don't break after the first match;
15727 continue processing the pattern definition statements instead.
15728 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
15730 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15732 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15733 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15734 (vect_recog_widen_sum_pattern): Use it.
15736 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15738 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15739 phi is not a pattern statement and has not been replaced by
15740 a pattern statement.
15741 * tree-vect-patterns.c (type_conversion_p): Don't check
15742 STMT_VINFO_IN_PATTERN_P.
15743 (vect_recog_vector_vector_shift_pattern): Likewise.
15744 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
15745 the pattern statement rather than the original statement; check
15746 directly for a WIDEN_MULT_EXPR here.
15747 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
15748 vect_is_simple_use to return the pattern statement rather
15749 than the original statement; use is_pattern_stmt_p to check
15750 for such a pattern statement.
15751 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
15752 to return the pattern statement rather than the original statement;
15753 don't do the same transformation here.
15754 (vect_is_simple_use): If the defining statement has been replaced
15755 by a pattern statement, return the pattern statement instead.
15756 Remove the corresponding (local) transformation from the vectype
15759 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15761 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
15762 end and default to null.
15763 * tree-vect-loop.c (vect_create_epilog_for_reduction)
15764 (vectorizable_reduction): Update calls accordingly, dropping the
15765 gimple ** argument if the passed-back statement isn't needed.
15766 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
15767 (vect_recog_rotate_pattern): Likewise.
15768 (vect_recog_mask_conversion_pattern): Likewise.
15769 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15770 (vect_mask_constant_operand_p): Likewise.
15771 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
15772 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
15773 (get_group_load_store_type, get_load_store_type): Likewise.
15774 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
15775 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
15776 (vectorizable_conversion, vectorizable_assignment): Likewise.
15777 (vectorizable_shift, vectorizable_operation): Likewise.
15778 (vectorizable_store, vect_is_simple_cond): Likewise.
15779 (vectorizable_condition, vectorizable_comparison): Likewise.
15780 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
15781 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
15782 and move it to the end. Cope with null def_stmt_outs.
15784 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15786 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
15788 2018-06-29 Jeff Law <law@redhat.com>
15790 * config/v850/v850.c (v850_legitimate_address_p): Handle large
15791 displacements for TARGET_V850E2V3 and newer.
15792 (TARGET_LRA_P): Remove. Defaults to LRA now.
15793 * config/v850/v850.md (sign23byte_load): Remove.
15794 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
15795 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
15797 2018-06-29 Martin Liska <mliska@suse.cz>
15800 * coverage.c (coverage_init): Mangle full path name.
15801 * doc/invoke.texi: Document the change.
15802 * gcov-io.c (mangle_path): New.
15803 * gcov-io.h (mangle_path): Likewise.
15804 * gcov.c (mangle_name): Use mangle_path for path mangling.
15806 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15808 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
15809 if starting source register is not even.
15811 2018-06-29 Martin Liska <mliska@suse.cz>
15813 PR tree-optimization/86263
15814 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
15815 Make edge redirection.
15817 2018-06-29 David Malcolm <dmalcolm@redhat.com>
15819 * dumpfile.c (dump_loc): Add indentation based on scope depth.
15820 (dump_scope_depth): New variable.
15821 (get_dump_scope_depth): New function.
15822 (dump_begin_scope): New function.
15823 (dump_end_scope): New function.
15824 * dumpfile.h (get_dump_scope_depth): New declaration.
15825 (dump_begin_scope): New declaration.
15826 (dump_end_scope): New declaration.
15827 (class auto_dump_scope): New class.
15828 (AUTO_DUMP_SCOPE): New macro.
15829 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
15832 2018-06-29 Richard Biener <rguenther@suse.de>
15834 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
15835 compute_all_dependences succeeds.
15836 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
15837 exceed --param loop-max-datarefs-for-datadeps.
15839 2018-06-29 Jakub Jelinek <jakub@redhat.com>
15841 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
15843 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
15846 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
15847 alternative 0 in preferred_for_speed attribute.
15849 2018-06-28 Paul Koning <ni1d@arrl.net>
15851 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
15852 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
15853 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
15854 * config/pdp11/pdp11.md: Correct "length" attribute calculation
15855 for shift insn patterns.
15857 2018-06-28 David Malcolm <dmalcolm@redhat.com>
15859 * cgraph.c (cgraph_node::get_body): Replace assignments to
15860 "dump_file" with calls to set_dump_file.
15861 * dumpfile.c (alt_dump_file): Make static, and group with...
15862 (alt_flags): ...this definition.
15863 (dumps_are_enabled): New variable.
15864 (refresh_dumps_are_enabled): New function.
15865 (set_dump_file): New function.
15866 (set_alt_dump_file): New function.
15867 (gcc::dump_manager::dump_start): Replace assignments to
15868 "dump_file" and "alt_dump_file" with calls to set_dump_file and
15870 (gcc::dump_manager::dump_finish): Likewise.
15871 * dumpfile.h (alt_dump_file): Delete decl.
15872 (dumps_are_enabled): New variable decl.
15873 (set_dump_file): New function decl.
15874 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
15876 * tree-nested.c (lower_nested_functions): Replace assignments to
15877 "dump_file" with calls to set_dump_file.
15879 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15881 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
15882 goto_locus of each outgoing edge of each basic block.
15884 2018-06-28 Richard Biener <rguenther@suse.de>
15886 * dwarf2out.c (decl_scope_table): Remove.
15887 (push_decl_scope): Likewise.
15888 (pop_decl_scope): Likewise.
15889 (gen_type_die_for_member): Do not call push/pop_decl_scope.
15890 (gen_struct_or_union_type_die): Likewise.
15891 (gen_tagged_type_die): Likewise.
15892 (dwarf2out_init): Do not initialize decl_scope_table.
15893 (dwarf2out_c_finalize): Do not free it.
15895 2018-06-28 Richard Biener <rguenther@suse.de>
15897 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
15898 deciding whether to not re-use a DIE.
15900 2018-06-28 Richard Biener <rguenther@suse.de>
15902 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15903 DW_AT_abstract_origin attribute.
15905 2018-06-28 Martin Liska <mliska@suse.cz>
15907 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15908 Use newly introduced constants.
15909 * tree-switch-conversion.h (struct jump_table_cluster):
15910 Define max_ratio_for_size and max_ratio_for_speed.
15912 2018-06-28 Martin Liska <mliska@suse.cz>
15914 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15915 Add new checking assert to catch invalid state.
15916 (jump_table_cluster::can_be_handled): Handle single case
15918 (jump_table_cluster::is_beneficial): Bail out for such case.
15919 (bit_test_cluster::find_bit_tests):
15920 Add new checking assert to catch invalid state.
15921 (bit_test_cluster::can_be_handled): Handle single case
15923 (bit_test_cluster::is_beneficial): Bail out for such case.
15924 (switch_decision_tree::analyze_switch_statement):
15927 2018-06-28 Martin Liska <mliska@suse.cz>
15929 * common.opt: Introduce -completion option.
15930 * gcc.c (driver_handle_option): Handle it.
15931 (driver::main): Print completions if completion
15933 * opt-suggestions.c (option_proposer::get_completions):
15935 (option_proposer::suggest_completion): Likewise.
15936 (option_proposer::find_param_completions): Likewise.
15937 (verify_autocompletions): Likewise.
15938 (test_completion_valid_options): Likewise.
15939 (test_completion_valid_params): Likewise.
15940 (in_completion_p): Likewise.
15941 (empty_completion_p): Likewise.
15942 (test_completion_partial_match): Likewise.
15943 (test_completion_garbage): Likewise.
15944 (opt_proposer_c_tests): Likewise.
15945 * opt-suggestions.h: Declare new functions.
15946 * opts.c (common_handle_option): Handle OPT__completion_.
15947 * selftest-run-tests.c (selftest::run_tests): Add
15948 opt_proposer_c_tests.
15949 * selftest.c (assert_str_startswith): New.
15950 * selftest.h (assert_str_startswith): Likewise.
15951 (opt_proposer_c_tests): New.
15952 (ASSERT_STR_STARTSWITH): Likewise.
15954 2018-06-28 Martin Liska <mliska@suse.cz>
15956 * Makefile.in: Add opt-suggestions.o.
15957 * gcc-main.c: Include opt-suggestions.h.
15958 * gcc.c (driver::driver): Likewise.
15959 (driver::~driver): Remove m_option_suggestions.
15960 (driver::build_option_suggestions): Moved to option_proposer.
15961 (driver::suggest_option): Likewise.
15962 (driver::handle_unrecognized_options): Use option_proposer.
15963 * gcc.h (class driver): Add new memver m_option_proposer.
15964 * opt-suggestions.c: New file.
15965 * opt-suggestions.h: New file.
15967 2018-06-28 Martin Liska <mliska@suse.cz>
15969 * vec.h (class auto_string_vec): New (moved from auto_argvec).
15970 (auto_string_vec::~auto_string_vec): Likewise.
15972 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15974 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15975 prevent_decl_creation_for_types fields up and add reset_location field.
15976 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15977 statement if id->reset_location is true.
15978 (copy_edges_for_bb): Do not set goto_locus on the new edges if
15979 id->reset_location is true.
15980 (copy_phis_for_bb): Force input_location on the arguments if
15981 id->reset_location is true.
15982 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15983 is set on the function to be inlined.
15985 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
15987 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15989 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
15991 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
15992 registers for Pmode.
15993 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
15994 hard registers for the clobbered pseudo.
15996 2018-06-27 Paul Koning <ni1d@arrl.net>
15998 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15999 mutually exclusive options.
16000 * config/pdp11/constraints.md (h): New constraint.
16001 (O): Update definition to match shift code generation.
16002 (D): New constraint.
16003 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
16005 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
16007 (output_jump): Change arguments.
16008 (pdp11_fixed_cc_regs): New function.
16009 (pdp11_cc_mode): Ditto.
16010 (pdp11_expand_shift): Ditto.
16011 (pdp11_assemble_shift): Ditto.
16012 (pdp11_small_shift): Ditto.
16013 (pdp11_branch_cost): Remove.
16014 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
16016 (pdp11_register_move_cost): Update for CC registers.
16017 (pdp11_rtx_costs): Add case for LSHIFTRT.
16018 (pdp11_output_jump): Add CCNZ mode conditional branches.
16019 (notice_update_cc_on_set): Remove.
16020 (pdp11_cc_mode): New function.
16021 (simple_memory_operand): Correct pre/post decrement case.
16022 (no_side_effect_operand): New function.
16023 (pdp11_regno_reg_class): Add CC_REGS class.
16024 (pdp11_fixed_cc_regs): New function.
16025 (pdp11_small_shift): New function.
16026 (pdp11_expand_shift): New function to expand shift insns.
16027 (pdp11_assemble_shift): New function to output shifts.
16028 (pdp11_branch_cost): Remove.
16029 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
16030 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
16031 (WCHAR_TYPE): Ditto.
16032 (PTRDIFF_TYPE): Ditto.
16033 (ADJUST_INSN_LENGTH): New macro.
16034 (FIXED_REGISTERS): Add CC registers.
16035 (CALL_USED_REGISTERS): Ditto.
16036 (reg_class): Ditto.
16037 (REG_CLASS_NAMES): Ditto.
16038 (REG_CLASS_CONTENTS): Ditto.
16039 (SELECT_CC_MODE): Use new function.
16040 (TARGET_FLAGS_REGNUM): New macro.
16041 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
16042 (cc0_reg_rtx): Remove.
16043 (CC_STATUS_MDEP): Remove.
16044 (CC_STATUS_MDEFP_INIT): Remove.
16045 (CC_IN_FPU): Remove.
16046 (NOTICE_UPDATE_CC): Remove.
16047 (REGISTER_NAMES): Add CC registers.
16048 (BRANCH_COST): Change to constant 1.
16049 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
16051 * config/pdp11/pdp11.opt (mbcopy): Remove.
16052 (mbcopy-builtin): Remove.
16053 (mbranch-cheap): Remove.
16054 (mbranch-expensive): Remove.
16055 * config/pdp11/predicates.md (expand_shift_operand): Update to
16056 match shift code generation.
16057 (ccnz_operator): New predicate.
16058 * doc/invoke.texi (PDP-11 Options): Remove deleted options
16059 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
16060 Remove non-existent option -mabshi, -mno-abshi. Document mutually
16062 * doc/md.texi (PDP-11): Document new D and h constraints. Update
16063 description of O constraint.
16065 2018-06-27 Jeff Law <law@redhat.com>
16066 Austin Law <austinklaw@gmail.com>
16068 * config/v850/v850.md (addsi3_set_flags): New pattern.
16069 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
16070 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
16071 (zero_extendhisi2_v850_set_flags): Likewise.
16072 (zero_extendqisi2_v850_set_flags): Likewise.
16073 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
16074 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
16075 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
16077 * config/v850/v850-protos.h (notice_update_cc): Remove.
16078 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
16079 (v850_print_operand): Handle 'D' and "d".
16080 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
16081 Add handling of arithmetic/logical operations compared against zero.
16082 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
16083 Do not look at v850_compare_op, instead get mode from last argument.
16084 (v850_gen_compare): Remove
16085 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
16086 after reload for prologue insns.
16087 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
16089 (construct_save_jarl): Likewise.
16090 (TARGET_FLAGS_REGNUM): Define.
16091 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
16092 (NOTICE_UPDATE_CC): Remove.
16093 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
16094 than cc0. Conditionalize on reload_completed.
16095 (cmpsi_insn, setfcc_insn): Likewise.
16096 (tst1 splitter): Turn into define_and_split which sets the flags
16098 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
16099 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
16100 (cstoresf4, cstoredf4): Clobber the flags.
16101 (cmpsi, cmpsf, cmpdf): Remove expanders.
16102 (setf_insn): Remove pattern.
16103 (addsi3): Turn into define_and_split which clobbers the flags after
16104 reload and a suitable pattern (addsi3_clobber_flags) for use after
16106 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
16107 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
16108 (ashrsi3, ashrsi3_v850e2): Likewise.
16109 (bins): Clobber the flags.
16110 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
16111 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
16112 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
16113 (call_value_internal_short, call_value_internal_long): Likewise.
16114 (callt_save_interrupt, callt_return_interrupt): Likewise.
16115 (save_interrupt, return_interrupt): Likewise.
16116 (callt_save_all_interrupt, save_all_interrupt): Likewise.
16117 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
16118 (restore_all_interrupt, _restore_all_interrupt): Likewise.
16119 (All FP comparisons): Only allow after reload has completed.
16121 (divh, divhu): Tweak output template.
16122 (branch_z_normal, branch_z_invert): Remove
16123 (branch_nz_normal, branch_nz_invert): Likewise.
16124 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
16126 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
16127 * config/v850/v850.c (notice_update_cc): Remove.
16128 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
16129 (CC_NO_CARRY): Likewise.
16130 (NOTICE_UPDATE_CC): Define to nothing.
16131 * config/v850/v850.md: Remove block comment on cc0 handling
16132 Remove "cc" attribute from all patterns. Remove cc_status handling
16133 from all patterns. Minor formatting fixes.
16135 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16137 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
16138 (cortex-a76.cortex-a55): Likewise.
16139 * config/aarch64/aarch64-tune.md: Regenerate.
16140 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
16141 cortex-a76.cortex-a55.
16143 2018-06-27 Jeff Law <law@redhat.com>
16145 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
16146 (MULTILIB_DIRNAMES): Similarly.
16148 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
16150 * gimple.h (gimple_return_retbnd): Delete.
16151 (gimple_return_set_retbnd): Likewise.
16152 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
16153 gimple_return_set_retbnd.
16154 * gimple-pretty-print.c (dump_gimple_return): Remove call to
16155 gimple_return_retbnd and adjust.
16156 * tree-inline.h (struct copy_body_data): Remove retbnd field.
16157 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
16158 Explicitly return NULL in a couple more cases. Move assertion
16159 on debug statements and remove unreachable code.
16160 (reset_debug_binding): Do not test id->retbnd.
16161 (expand_call_inline): Do not set it.
16163 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
16165 * configure.ac: Add --disable-gcov option.
16166 * configure: Regenerate.
16167 * Makefile.in: Honour @enable_gcov@.
16168 * doc/install.texi: Document --disable-gcov.
16170 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16172 * config/arm/arm-cpus.in (cortex-a76): New entry.
16173 (cortex-a76.cortex-a55): Likewise.
16174 * config/arm/arm-tables.opt: Regenerate.
16175 * config/arm/arm-tune.md: Likewise.
16176 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
16177 * doc/invoke.texi (ARM Options): Document cortex-a76 and
16178 cortex-a76.cortex-a55.
16180 2018-06-27 Tamar Christina <tamar.christina@arm.com>
16183 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
16185 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
16187 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
16189 (EPILOGUE_USES): Likewise.
16191 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
16193 * tree-inline.c (remap_location): New function extracted from...
16194 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
16195 (copy_phis_for_bb): ...here. Call remap_location.
16196 (copy_cfg_body): Adjust call to copy_edges_for_bb.
16198 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
16200 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
16201 unaligned vsx for 16B memset.
16203 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
16206 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
16207 ieee128_float_type_node to long_double_type_node unless
16208 TARGET_LONG_DOUBLE_128 is set.
16210 2018-06-26 David Malcolm <dmalcolm@redhat.com>
16212 * cfgloop.c (get_loop_location): Convert return type from
16213 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
16214 by implicit construction from rtx_insn *, and using
16215 dump_user_location_t::from_function_decl for the fallback case.
16216 * cfgloop.h (get_loop_location): Convert return type from
16217 location_t to dump_user_location_t.
16218 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
16219 dump_printf_loc to pass in a dump_location_t rather than a
16220 location_t, via the gimple stmt.
16221 * coverage.c (get_coverage_counts): Update calls to
16222 dump_printf_loc to pass in dump_location_t rather than a
16224 * doc/optinfo.texi (Dump types): Convert example of
16225 dump_printf_loc from taking "locus" to taking "insn". Update
16226 description of the "_loc" calls to cover dump_location_t.
16227 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
16229 (dump_user_location_t::dump_user_location_t): New constructors,
16230 from gimple *stmt and rtx_insn *.
16231 (dump_user_location_t::from_function_decl): New function.
16232 (dump_loc): Make static.
16233 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
16234 const dump_location_t &.
16235 (dump_generic_expr_loc): Delete.
16236 (dump_printf_loc): Convert param "loc" from location_t to
16237 const dump_location_t &.
16238 (selftest::test_impl_location): New function.
16239 (selftest::dumpfile_c_tests): New function.
16240 * dumpfile.h: Include "profile-count.h".
16241 (class dump_user_location_t): New class.
16242 (struct dump_impl_location_t): New struct.
16243 (class dump_location_t): New class.
16244 (dump_printf_loc): Convert 2nd param from source_location to
16245 const dump_location_t &.
16246 (dump_generic_expr_loc): Delete.
16247 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
16248 const dump_location_t &.
16249 * gimple-fold.c (fold_gimple_assign): Update call to
16250 dump_printf_loc to pass in a dump_location_t rather than a
16251 location_t, via the gimple stmt.
16252 (gimple_fold_call): Likewise.
16253 * gimple-loop-interchange.cc
16254 (loop_cand::analyze_iloop_reduction_var): Update for change to
16255 check_reduction_path.
16256 (tree_loop_interchange::interchange): Update for change to
16257 find_loop_location.
16258 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
16259 change in return-type of find_loop_location.
16260 (graphite_regenerate_ast_isl): Likewise.
16261 * graphite-optimize-isl.c (optimize_isl): Likewise.
16262 * graphite.c (graphite_transform_loops): Likewise.
16263 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
16264 pass in a dump_location_t rather than a location_t, via the
16266 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16267 * ipa.c (walk_polymorphic_call_targets): Likewise.
16268 * loop-unroll.c (report_unroll): Convert "locus" param from
16269 location_t to dump_location_t.
16270 (decide_unrolling): Update for change to get_loop_location's
16272 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
16273 location_t to dump_user_location_t.
16274 (grid_find_single_omp_among_assignments_1): Updates calls to
16275 dump_printf_loc to pass in a dump_location_t rather than a
16276 location_t, via the gimple stmt.
16277 (grid_parallel_clauses_gridifiable): Convert "tloc" from
16278 location_t to dump_location_t. Updates calls to dump_printf_loc
16279 to pass in a dump_location_t rather than a location_t, via the
16281 (grid_inner_loop_gridifiable_p): Likewise.
16282 (grid_dist_follows_simple_pattern): Likewise.
16283 (grid_gfor_follows_tiling_pattern): Likewise.
16284 (grid_target_follows_gridifiable_pattern): Likewise.
16285 (grid_attempt_target_gridification): Convert initialization
16286 of local "grid" from memset to zero-initialization; FIXME: does
16287 this require C++11? Update call to dump_printf_loc to pass in a
16288 optinfo_location rather than a location_t, via the gimple stmt.
16289 * profile.c (read_profile_edge_counts): Updates call to
16290 dump_printf_loc to pass in a dump_location_t rather than a
16292 (compute_branch_probabilities): Likewise.
16293 * selftest-run-tests.c (selftest::run_tests): Call
16295 * selftest.h (dumpfile_c_tests): New decl.
16296 * tree-loop-distribution.c (pass_loop_distribution::execute):
16297 Update for change in return type of find_loop_location.
16298 * tree-parloops.c (parallelize_loops): Likewise.
16299 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
16300 "locus" from location_t to dump_user_location_t.
16301 (canonicalize_loop_induction_variables): Likewise.
16302 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
16303 for change in return type of find_loop_location.
16304 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
16305 to dump_printf_loc to pass in a dump_location_t rather than a
16306 location_t, via the stmt.
16307 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
16309 * tree-vect-loop-manip.c (find_loop_location): Convert return
16310 type from source_location to dump_user_location_t.
16311 (vect_do_peeling): Update for above change.
16312 (vect_loop_versioning): Update for change in type of
16314 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
16315 from location_t to dump_user_location_t.
16316 (vect_estimate_min_profitable_iters): Update for change in type
16318 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
16319 location_t to dump_location_t.
16320 (vect_slp_bb): Update for change in type of vect_location.
16321 * tree-vectorizer.c (vect_location): Convert from source_location
16322 to dump_user_location_t.
16323 (try_vectorize_loop_1): Update for change in vect_location's type.
16324 (vectorize_loops): Likewise.
16325 (increase_alignment): Likewise.
16326 * tree-vectorizer.h (vect_location): Convert from source_location
16327 to dump_user_location_t.
16328 (find_loop_location): Convert return type from source_location to
16329 dump_user_location_t.
16330 (check_reduction_path): Convert 1st param from location_t to
16331 dump_user_location_t.
16332 * value-prof.c (check_counter): Update call to dump_printf_loc to
16333 pass in a dump_user_location_t rather than a location_t; update
16334 call to error_at for change in type of "locus".
16335 (check_ic_target): Update call to dump_printf_loc to
16336 pass in a dump_user_location_t rather than a location_t, via the
16339 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
16341 * config/s390/s390.h (enum processor_flags): Do not use
16342 default tune parameter when -march was specified.
16344 2018-06-26 Jakub Jelinek <jakub@redhat.com>
16347 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
16348 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
16351 2018-06-26 Richard Biener <rguenther@suse.de>
16353 PR tree-optimization/86287
16355 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
16356 (vect_analyze_loop): Initialize n_stmts.
16358 2018-06-26 Richard Biener <rguenther@suse.de>
16360 PR middle-end/86271
16361 * fold-const.c (fold_convertible_p): Pointer extension
16364 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
16367 * dwarf2out.c (loc_list_has_views): Adjust comments.
16368 (dw_loc_list): Split single cross-partition range with
16371 2018-06-25 Jeff Law <law@redhat.com>
16373 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
16374 on -mbig-switch by default.
16376 * config/v850/predicates.md (const_float_1_operand): Fix match_code
16378 (const_float_0_operand): Remove unused predicate.
16379 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
16380 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
16381 (recipsf2): New expander. Original pattern now called
16383 (recipdf2, recipdf2_insn): Similarly.
16384 (rsqrtsf2, rsqrtsf2_insn): Similarly
16385 (rsqrtdf2, rsqrtdf2_insn): Similarly
16387 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
16389 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
16390 Simplify logic for FreeBSD (twice).
16392 2018-06-25 Martin Sebor <msebor@redhat.com>
16394 PR tree-optimization/86204
16395 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
16396 a strnlen result if it's less than the length of the string.
16398 2018-06-25 Martin Sebor <msebor@redhat.com>
16400 PR tree-optimization/85700
16401 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
16402 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
16403 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
16405 2018-06-25 Martin Sebor <msebor@redhat.com>
16407 * doc/extend.texi (Zero-length arrays): Update and clarify.
16409 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
16411 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
16412 added IEEE/IBM long double multilib support on PowerPC little
16413 endian Linux systems.
16414 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
16415 (MULTILIB_DEFAULTS): Likewise.
16416 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16418 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
16419 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
16420 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
16422 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
16424 PR middle-end/86311
16425 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
16426 (REORDER_45): Likewise.
16428 2018-06-25 Jeff Law <law@redhat.com>
16430 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
16431 dividend to 32 bits. Adjust length.
16432 (udivmodhi4): Cleanup output template. Fix length.
16434 2018-06-25 Carl Love <cel@us.ibm.com>
16436 * config/rs6000/vsx.md: Change word selector to prefered location.
16438 2018-06-25 Richard Biener <rguenther@suse.de>
16440 PR tree-optimization/86304
16441 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
16442 epilogue-if-converted loops as well.
16444 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
16446 * lto-section-out.c (lto_begin_section): Do not print section
16447 name for noaddr and unnumbered dumps.
16449 2018-06-25 Richard Biener <rguenther@suse.de>
16451 * tree-vectorizer.h (struct vec_info_shared): New structure
16452 with parts split out from struct vec_info and loop_nest from
16453 struct _loop_vec_info.
16454 (struct vec_info): Adjust accordingly.
16455 (struct _loop_vec_info): Likewise.
16456 (LOOP_VINFO_LOOP_NEST): Adjust.
16457 (LOOP_VINFO_DATAREFS): Likewise.
16458 (LOOP_VINFO_DDRS): Likewise.
16459 (struct _bb_vec_info): Likewise.
16460 (BB_VINFO_DATAREFS): Likewise.
16461 (BB_VINFO_DDRS): Likewise.
16462 (struct _stmt_vec_info): Add dr_aux member.
16463 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
16464 (DR_MISALIGNMENT_UNINITIALIZED): New.
16465 (set_dr_misalignment): Adjust.
16466 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
16467 (vect_analyze_loop): Adjust prototype.
16468 (vect_analyze_loop_form): Likewise.
16469 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16470 Compute dependences lazily.
16471 (vect_record_base_alignments): Use shared datarefs/ddrs.
16472 (vect_verify_datarefs_alignment): Likewise.
16473 (vect_analyze_data_refs_alignment): Likewise.
16474 (vect_analyze_data_ref_accesses): Likewise.
16475 (vect_analyze_data_refs): Likewise.
16476 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
16477 constructor parameter for shared part.
16478 (vect_analyze_loop_form): Pass in shared part and adjust.
16479 (vect_analyze_loop_2): Pass in storage for the number of
16480 stmts. Move loop nest finding to the caller. Compute
16482 (vect_analyze_loop): Pass in shared part.
16483 (vect_transform_loop): Verify shared datarefs are unchanged.
16484 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
16485 constructor parameter for shared part.
16486 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
16487 (vect_slp_bb): Verify shared datarefs are unchanged before
16489 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
16491 (new_stmt_vec_info): Initialize DR_AUX misalignment to
16492 DR_MISALIGNMENT_UNINITIALIZED.
16493 * tree-vectorizer.c (vec_info::vec_info): Add constructor
16494 parameter for shared part.
16495 (vec_info::~vec_info): Adjust.
16496 (vec_info_shared::vec_info_shared): New.
16497 (vec_info_shared::~vec_info_shared): Likewise.
16498 (vec_info_shared::save_datarefs): Likewise.
16499 (vec_info_shared::check_datarefs): Likewise.
16500 (try_vectorize_loop_1): Construct shared part live for analyses
16501 of a single loop for multiple vector sizes.
16502 * tree-parloops.c (gather_scalar_reductions): Adjust.
16504 2018-06-25 Richard Biener <rguenther@suse.de>
16506 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
16507 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
16508 (vect_analyze_data_refs): Remove similar code from here and
16509 simplify accordingly.
16511 2018-06-25 Richard Biener <rguenther@suse.de>
16513 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
16514 for reverse storage order accesses rather than asserting
16515 they cannot happen here.
16517 2018-06-25 Tom de Vries <tdevries@suse.de>
16520 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
16521 Use data16 instead of .byte for insn prefix.
16523 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
16526 * parser.c (make_char_string_pack): Pass this literal chars
16527 through cpp_interpret_string.
16528 (cp_parser_userdef_numeric_literal): Check the result of
16529 make_char_string_pack.
16531 2018-06-24 Maya Rashish <coypu@sdf.org>
16533 * ginclude/stddef.h: Simplify conditions around avoiding
16534 re-definition of __size_t.
16536 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16538 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
16539 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
16541 2018-06-22 Maya Rashish <coypu@sdf.org>
16543 * doc/invoke.texi (mno-fancy-math-387): Update for changes
16544 made to OpenBSD and NetBSD through the years.
16546 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16548 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16549 behavior of vec_pack (vector double, vector double) to match
16550 behavior of vec_float2 (vector double, vector double).
16552 2018-06-22 Olivier Hainque <hainque@adacore.com>
16554 * gimplify.c (gimplify_function_tree): Prevent creation
16555 of a trampoline for the address of the current function
16556 passed to entry/exit instrumentation hooks.
16558 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
16561 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
16564 2018-06-22 Martin Liska <mliska@suse.cz>
16566 PR tree-optimization/86263
16567 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16568 Bail out if is_enabled is false.
16569 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
16571 (jump_table_cluster::is_enabled): New function.
16573 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16575 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16576 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
16577 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
16578 (lto_input_ts_binfo_tree_pointers): Likewise.
16579 * tree-streamer-out.c (streamer_write_tree_bitfields,
16580 write_ts_binfo_tree_pointers): Likewise.
16581 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
16583 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16585 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
16587 2018-06-22 Martin Liska <mliska@suse.cz>
16589 * symbol-summary.h (get): Make it pure and inline move
16590 functionality from ::get function.
16591 (get): Remove and inline into ::get and ::get_create.
16592 (get_create): Move code from ::get function.
16594 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16597 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
16598 -x assembler-with-cpp.
16600 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16602 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
16603 _FILE_OFFSET_BITS=64 for C++.
16605 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
16607 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
16608 conversion insn that shows up when pr85657-3.c is compiled using
16609 IEEE 128-bit long double.
16610 (neg<mode>2_internal): Use the correct mode to check whether the
16611 mode is IBM extended.
16612 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
16613 multiply and divide external functions from being created more
16616 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16618 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
16620 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
16621 the edge can be forwarded.
16622 (cfg_layout_merge_blocks): Likewise.
16624 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16626 * except.c (finish_eh_generation): Commit edge insertions only after
16627 the EH edges have been redirected from post-landing to landing pads.
16629 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16631 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
16632 create_tmp_var_for to create the FRAME decl.
16633 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
16635 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16637 * tree-inline.c (copy_edges_for_bb): Minor tweak.
16638 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
16639 debug statement when resetting its value.
16640 (expand_call_inline): Copy the locus of the call onto the assignment
16641 of the return value, if any. Use local variable in more cases.
16643 2018-06-21 Martin Liska <mliska@suse.cz>
16645 * ipa-pure-const.c (propagate_nothrow): Use
16646 funct_state_summaries->get.
16647 (dump_malloc_lattice): Likewise.
16648 (propagate_malloc): Likewise.
16650 2018-06-21 Richard Biener <rguenther@suse.de>
16652 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
16653 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
16654 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
16656 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
16657 BLOCK_ABSTRACT_ORIGIN unconditionally.
16659 2018-06-21 David Malcolm <dmalcolm@redhat.com>
16661 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
16663 * ipa-reference.c (ipa_reference_c_finalize): Delete
16664 ipa_ref_opt_sum_summaries and set it to NULL.
16666 2018-06-21 Tom de Vries <tdevries@suse.de>
16668 PR tree-optimization/85859
16669 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
16670 test with comment from bb_no_side_effects_p.
16672 2018-06-21 Richard Biener <rguenther@suse.de>
16674 PR tree-optimization/86232
16675 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
16676 max for constant niter.
16678 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
16680 * config/aarch64/aarch64-simd.md
16681 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
16683 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
16685 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
16686 Make opernads of the unspec commutative.
16688 2018-06-21 Richard Biener <rguenther@suse.de>
16690 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
16691 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
16692 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
16693 (vect_analyze_data_ref_dependence): Re-order checks to deal with
16695 (vect_record_base_alignments): Do not record base alignment
16696 for gathers or scatters.
16697 (vect_compute_data_ref_alignment): Drop return value that is always
16698 true. Bail out early for gathers or scatters.
16699 (vect_enhance_data_refs_alignment): Bail out early for gathers
16701 (vect_find_same_alignment_drs): Likewise.
16702 (vect_analyze_data_refs_alignment): Remove dead code.
16703 (vect_slp_analyze_and_verify_node_alignment): Likewise.
16704 (vect_analyze_data_refs): For possible gathers or scatters do
16705 not create an alternate DR, just check their possible validity
16706 and mark them. Adjust DECL_NONALIASED handling to not rely
16707 on DR_BASE_ADDRESS.
16708 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
16709 update inits of gathers or scatters.
16710 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
16711 Also copy gather/scatter flag to pattern vinfo.
16713 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
16715 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16716 behavior of vec_packsu (vector unsigned long long, vector unsigned
16717 long long) to match behavior of vec_packs with same signature.
16719 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
16720 Thomas Schwinge <thomas@codesourcery.com>
16721 Cesar Philippidis <cesar@codesourcery.com>
16723 * gimplify.c (gimplify_scan_omp_clauses): Add support for
16724 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16725 (gimplify_adjust_omp_clauses): Likewise.
16726 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
16727 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
16728 (gimplify_omp_target_update): Update handling of acc update and
16730 * omp-low.c (install_var_field): Remove unused parameter
16731 base_pointers_restrict.
16732 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
16733 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
16735 (omp_target_base_pointers_restrict_p): Delete.
16736 (scan_omp_target): Update call to scan_sharing_clauses.
16737 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
16739 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
16740 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16741 (convert_local_omp_clauses): Likewise.
16742 * tree-pretty-print.c (dump_omp_clause): Likewise.
16743 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
16745 (omp_clause_code_name): Likewise.
16747 2018-06-20 Jakub Jelinek <jakub@redhat.com>
16750 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
16753 PR tree-optimization/86231
16754 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
16755 anti-range don't overwrite *vr0min before using it to compute *vr0max.
16757 2018-06-20 Tom de Vries <tdevries@suse.de>
16759 PR tree-optimization/86097
16760 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
16761 iv type if signedness of iv type is not the same as that of *nit.
16763 2018-06-20 Jakub Jelinek <jakub@redhat.com>
16765 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
16766 EDGE_EH edges, verify they are all EDGE_EH.
16768 2018-06-20 Maya Rashish <coypu@sdf.org>
16770 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
16772 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16774 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
16775 * config/aarch64/aarch64.c (xgene1_tunings): Add
16776 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
16777 (aarch64_mode_valid_for_sched_fusion_p):
16778 Allow 16-byte modes.
16779 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
16780 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
16782 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
16784 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
16785 * config/aarch64/iterators.md (VQ2): New mode iterator.
16787 2018-06-20 Martin Liska <mliska@suse.cz>
16789 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16790 Change default ratio from 10 to 8.
16792 2018-06-20 Martin Liska <mliska@suse.cz>
16794 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16796 (bit_test_cluster::find_bit_tests): Likewise.
16797 (switch_decision_tree::analyze_switch_statement): Find clusters.
16798 * tree-switch-conversion.h (struct jump_table_cluster): Document
16801 2018-06-20 Martin Liska <mliska@suse.cz>
16803 * tree-switch-conversion.c (switch_conversion::collect):
16804 Record m_uniq property.
16805 (switch_conversion::expand): Bail out for special conditions.
16806 (group_cluster::~group_cluster): New.
16807 (group_cluster::group_cluster): Likewise.
16808 (group_cluster::dump): Likewise.
16809 (jump_table_cluster::emit): New.
16810 (switch_decision_tree::fix_phi_operands_for_edges): New.
16811 (struct case_node): Remove struct.
16812 (jump_table_cluster::can_be_handled): New.
16813 (case_values_threshold): Moved to header.
16814 (reset_out_edges_aux): Likewise.
16815 (jump_table_cluster::is_beneficial): New.
16816 (bit_test_cluster::can_be_handled): Likewise.
16817 (add_case_node): Remove.
16818 (bit_test_cluster::is_beneficial): New.
16819 (case_bit_test::cmp): New.
16820 (bit_test_cluster::emit): New.
16821 (expand_switch_as_decision_tree_p): Remove.
16822 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
16823 (fix_phi_operands_for_edge): Likewise.
16824 (switch_decision_tree::analyze_switch_statement): New.
16825 (compute_cases_per_edge): Move ...
16826 (switch_decision_tree::compute_cases_per_edge): ... here.
16827 (try_switch_expansion): Likewise.
16828 (switch_decision_tree::try_switch_expansion): Likewise.
16829 (record_phi_operand_mapping): Likewise.
16830 (switch_decision_tree::record_phi_operand_mapping): Likewise.
16831 (emit_case_decision_tree): Likewise.
16832 (switch_decision_tree::emit): Likewise.
16833 (balance_case_nodes): Likewise.
16834 (switch_decision_tree::balance_case_nodes): Likewise.
16835 (dump_case_nodes): Likewise.
16836 (switch_decision_tree::dump_case_nodes): Likewise.
16837 (emit_jump): Likewise.
16838 (switch_decision_tree::emit_jump): Likewise.
16839 (emit_cmp_and_jump_insns): Likewise.
16840 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
16841 (emit_case_nodes): Likewise.
16842 (switch_decision_tree::emit_case_nodes): Likewise.
16843 (conditional_probability): Remove.
16844 * tree-switch-conversion.h (enum cluster_type): New.
16846 (struct cluster): Likewise.
16847 (cluster::cluster): Likewise.
16848 (struct simple_cluster): Likewise.
16849 (simple_cluster::simple_cluster): Likewise.
16850 (struct group_cluster): Likewise.
16851 (struct jump_table_cluster): Likewise.
16852 (struct bit_test_cluster): Likewise.
16853 (struct min_cluster_item): Likewise.
16854 (struct case_tree_node): Likewise.
16855 (case_tree_node::case_tree_node): Likewise.
16856 (jump_table_cluster::case_values_threshold): Likewise.
16857 (struct case_bit_test): Likewise.
16858 (struct switch_decision_tree): Likewise.
16859 (struct switch_conversion): Likewise.
16860 (switch_decision_tree::reset_out_edges_aux): Likewise.
16862 2018-06-20 Martin Liska <mliska@suse.cz>
16864 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
16865 (hoist_edge_and_branch_if_true): Likewise.
16866 (expand_switch_using_bit_tests_p): Likewise.
16867 (struct case_bit_test): Likewise.
16868 (case_bit_test_cmp): Likewise.
16869 (emit_case_bit_tests): Likewise.
16870 (switch_conversion::switch_conversion): New class.
16871 (struct switch_conv_info): Remove old struct.
16872 (collect_switch_conv_info): More to ...
16873 (switch_conversion::collect): ... this.
16874 (check_range): Likewise.
16875 (switch_conversion::check_range): Likewise.
16876 (check_all_empty_except_final): Likewise.
16877 (switch_conversion::check_all_empty_except_final): Likewise.
16878 (check_final_bb): Likewise.
16879 (switch_conversion::check_final_bb): Likewise.
16880 (create_temp_arrays): Likewise.
16881 (switch_conversion::create_temp_arrays): Likewise.
16882 (free_temp_arrays): Likewise.
16883 (gather_default_values): Likewise.
16884 (switch_conversion::gather_default_values): Likewise.
16885 (build_constructors): Likewise.
16886 (switch_conversion::build_constructors): Likewise.
16887 (constructor_contains_same_values_p): Likewise.
16888 (switch_conversion::contains_same_values_p): Likewise.
16889 (array_value_type): Likewise.
16890 (switch_conversion::array_value_type): Likewise.
16891 (build_one_array): Likewise.
16892 (switch_conversion::build_one_array): Likewise.
16893 (build_arrays): Likewise.
16894 (switch_conversion::build_arrays): Likewise.
16895 (gen_def_assigns): Likewise.
16896 (switch_conversion::gen_def_assigns): Likewise.
16897 (prune_bbs): Likewise.
16898 (switch_conversion::prune_bbs): Likewise.
16899 (fix_phi_nodes): Likewise.
16900 (switch_conversion::fix_phi_nodes): Likewise.
16901 (gen_inbound_check): Likewise.
16902 (switch_conversion::gen_inbound_check): Likewise.
16903 (process_switch): Use the newly created class.
16904 (switch_conversion::expand): New.
16905 (switch_conversion::~switch_conversion): New.
16906 * tree-switch-conversion.h: New file.
16908 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16910 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16911 tree-vect-patterns.c.
16912 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16913 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
16914 (vect_recog_sad_pattern): Likewise.
16915 (vect_recog_widen_sum_pattern): Likewise.
16916 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
16917 (vect_recog_widen_shift_pattern): Remove the type_in argument.
16918 (vect_recog_rotate_pattern): Likewise.
16919 (vect_recog_mult_pattern): Likewise.
16920 (vect_recog_vector_vector_shift_pattern): Likewise.
16921 (vect_recog_divmod_pattern): Likewise.
16922 (vect_recog_mixed_size_cond_pattern): Likewise.
16923 (vect_recog_bool_pattern): Likewise.
16924 (vect_recog_mask_conversion_pattern): Likewise.
16925 (vect_try_gather_scatter_pattern): Likewise.
16926 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
16927 (vect_recog_over_widening_pattern): Likewise.
16928 (vect_recog_gather_scatter_pattern): Likewise.
16929 (vect_recog_func_ptr): Move from tree-vectorizer.h
16930 (vect_vect_recog_func_ptrs): Move further down the file.
16931 (vect_recog_func): Likewise. Remove the third argument.
16932 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16933 (vect_pattern_recog_1): Expect the pattern function to do any
16934 necessary target tests. Also expect it to provide a vector type.
16935 Remove the type_in handling.
16937 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16939 * tree-vect-patterns.c (vect_pattern_detected): New function.
16940 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16941 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16942 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16943 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16944 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16945 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16946 (vect_recog_mask_conversion_pattern)
16947 (vect_try_gather_scatter_pattern): Likewise.
16949 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16951 * tree-vect-patterns.c (vect_get_internal_def): New function.
16952 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16953 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16954 (search_type_for_mask_1): Use it.
16956 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16958 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16959 redundant WIDEN_SUM_EXPR handling.
16960 (vect_recog_sad_pattern): Likewise.
16962 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16964 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16965 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16966 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16967 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16968 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16970 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16972 * tree-vect-stmts.c (vectorizable_call): Make sure that we
16973 use the stmt_vec_info of the original bb statement for the
16974 new zero assignment, even if the call is part of a pattern.
16976 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16978 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16979 that the sequence is attached to the original statement rather
16980 than the pattern statement.
16981 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16982 PATTERN_DEF_SEQ from the original statement rather than
16983 the main pattern statement.
16984 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16985 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16986 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16988 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16990 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
16991 definition statements before the early exit for statements that aren't
16993 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
16995 (vect_transform_loop): ...here. Process pattern definition
16996 statements without first checking whether the main pattern
16997 statement is live or relevant.
16999 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
17001 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
17002 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
17004 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
17006 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
17007 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
17008 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
17009 (expand_block_compare): Change select_block_compare_mode call.
17010 (expand_strncmp_align_check): Use new functions, fix comment.
17011 (emit_final_str_compare_gpr): New function.
17012 (expand_strn_compare): Refactor and clean up code.
17013 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
17015 2018-06-19 Tony Reix <tony.reix@atos.com>
17016 Damien Bergamini <damien.bergamini@atos.com>
17017 David Edelsohn <dje.gcc@gmail.com>
17019 * collect2.c (static_obj): New variable.
17020 (static_libs): New variable.
17021 (is_in_list): Uncomment declaration.
17022 (main): Track AIX libraries linked statically.
17023 (is_in_list): Uncomment definition.
17024 (scan_prog_file): Don't add AIX shared libraries initializer
17025 to constructor list if linking statically.
17027 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
17029 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
17031 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
17033 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
17035 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
17038 2018-06-19 Martin Liska <mliska@suse.cz>
17040 * config/i386/i386.c (ix86_can_inline_p): Do not use
17041 ipa_fn_summaries::get_create.
17042 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
17044 (devirtualization_time_bonus): Likewise.
17045 (ipcp_propagate_stage): Likewise.
17046 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17047 (edge_set_predicate): Likewise.
17048 (evaluate_conditions_for_known_args): Likewise.
17049 (evaluate_properties_for_edge): Likewise.
17050 (ipa_call_summary::reset): Tranform to ...
17051 (ipa_call_summary::~ipa_call_summary): ... this.
17052 (ipa_fn_summary::reset): Transform to ...
17053 (ipa_fn_summary::~ipa_fn_summary): ... this.
17054 (ipa_fn_summary_t::remove): Rename to ...
17055 (ipa_fn_summary_t::remove_callees): ... this.
17056 (ipa_fn_summary_t::duplicate): Use placement new
17057 instead of memory copy.
17058 (ipa_call_summary_t::duplicate): Likewise.
17059 (ipa_call_summary_t::remove): Remove.
17060 (dump_ipa_call_summary): Change get_create to get.
17061 (ipa_dump_fn_summary): Dump only when summary exists.
17062 (analyze_function_body): Use symbol_summary::get instead
17064 (compute_fn_summary): Likewise.
17065 (estimate_edge_devirt_benefit): Likewise.
17066 (estimate_edge_size_and_time): Likewise.
17067 (inline_update_callee_summaries): Likewise.
17068 (remap_edge_change_prob): Likewise.
17069 (remap_edge_summaries): Likewise.
17070 (ipa_merge_fn_summary_after_inlining): Likewise.
17071 (write_ipa_call_summary): Likewise.
17072 (ipa_fn_summary_write): Likewise.
17073 (ipa_free_fn_summary): Likewise.
17074 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
17075 (struct ipa_call_summary): Likewise.
17076 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
17078 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
17079 (estimate_size_after_inlining): Likewise.
17080 (estimate_growth): Likewise.
17081 (growth_likely_positive): Likewise.
17082 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17083 (inline_call): Likewise.
17084 * ipa-inline.c (caller_growth_limits): Likewise.
17085 (can_inline_edge_p): Likewise.
17086 (can_inline_edge_by_limits_p): Likewise.
17087 (compute_uninlined_call_time): Likewise.
17088 (compute_inlined_call_time): Likewise.
17089 (want_inline_small_function_p): Likewise.
17090 (edge_badness): Likewise.
17091 (update_caller_keys): Likewise.
17092 (update_callee_keys): Likewise.
17093 (inline_small_functions): Likewise.
17094 (inline_to_all_callers_1): Likewise.
17095 (dump_overall_stats): Likewise.
17096 (early_inline_small_functions): Likewise.
17097 (early_inliner): Likewise.
17098 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17099 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17100 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17101 * ipa-split.c (execute_split_functions): Likewise.
17102 * symbol-summary.h: Likewise.
17103 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17105 2018-06-19 Richard Biener <rguenther@suse.de>
17107 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
17108 (vectorize_loops): ... here. Fix dbgcnt handling.
17109 (try_vectorize_loop): Wrap try_vectorize_loop_1.
17111 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
17114 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
17115 ieee128 argument takes up only one (vector) register, not two (floating
17118 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
17120 * gimplify.c (gimplify_init_constructor): Really never clear for an
17121 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
17123 2018-06-19 Richard Biener <rguenther@suse.de>
17125 PR tree-optimization/86179
17126 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
17127 after failed recognition.
17129 2018-06-18 Martin Sebor <msebor@redhat.com>
17131 PR middle-end/85602
17132 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
17133 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
17134 Handle integer subtraction.
17135 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
17136 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
17138 2018-06-18 David Malcolm <dmalcolm@redhat.com>
17140 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
17141 param from rtx to rtx_insn *.
17142 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
17144 (frv_ifcvt_modify_insn): Likwise.
17145 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
17146 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
17147 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
17148 as_a <rtx_insn *> cast to local "unprotected_region" once
17149 it's been established that it's not NULL or pc_rtx.
17150 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
17151 param "sethi" from rtx to rtx_insn *.
17152 (nds32_group_float_insns): Likewise for param "insn".
17153 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
17155 (vax_output_int_subtract): Likewise.
17156 * config/vax/vax.c (vax_output_int_add): Likewise for param
17158 (vax_output_int_subtract): Likewise.
17159 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
17160 (emit_pattern_after): Likewise for param "after".
17161 (emit_insn_after): Likewise.
17162 (emit_jump_insn_after): Likewise.
17163 (emit_call_insn_after): Likewise.
17164 (emit_debug_insn_after): Likewise.
17165 (emit_pattern_before): Likewise for param "before".
17166 (emit_insn_before): Likewise.
17167 (emit_jump_insn_before): Likewise.
17168 * final.c (get_insn_template): Likewise for param "insn", removing
17170 * output.h (get_insn_template): Likewise for 2nd param.
17171 * rtl.h (emit_insn_before): Likewise.
17172 (emit_jump_insn_before): Likewise.
17173 (emit_debug_insn_before_noloc): Likewise.
17174 (emit_insn_after): Likewise.
17175 (emit_jump_insn_after): Likewise.
17176 (emit_call_insn_after): Likewise.
17177 (emit_debug_insn_after): Likewise.
17178 (set_insn_deleted): Likewise for param.
17180 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
17183 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
17184 floating point modes, so that IFmode is numerically greater than
17185 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
17186 to declare the ordering. This prevents IFmode from being
17187 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
17188 machine. Include rs6000-modes.h to share the fractional values
17189 between genmodes* and the rest of the compiler.
17190 (IFmode): Likewise.
17191 (KFmode): Likewise.
17192 (TFmode): Likewise.
17193 * config/rs6000/rs6000-modes.h: New file.
17194 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
17195 meaning of rs6000_long_double_size so that 126..128 selects an
17196 appropriate 128-bit floating point type.
17197 (rs6000_option_override_internal): Likewise.
17198 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
17199 (TARGET_LONG_DOUBLE_128): Change the meaning of
17200 rs6000_long_double_size so that 126..128 selects an appropriate
17201 128-bit floating point type.
17202 (LONG_DOUBLE_TYPE_SIZE): Update comment.
17203 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
17204 source and destination to match the standard usage.
17205 (truncifkf2): Likewise.
17206 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
17207 ISA 2.07 to use an explicit clobber, instead of passing in a
17209 (copysign<mode>3_soft): Likewise.
17211 2018-06-18 David Malcolm <dmalcolm@redhat.com>
17213 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
17214 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
17215 (vect_slp_analyze_instance_dependence): Likewise.
17216 (vect_enhance_data_refs_alignment): Likewise.
17217 (vect_analyze_data_refs_alignment): Likewise.
17218 (vect_slp_analyze_and_verify_instance_alignment
17219 (vect_analyze_data_ref_accesses): Likewise.
17220 (vect_prune_runtime_alias_test_list): Likewise.
17221 (vect_analyze_data_refs): Likewise.
17222 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
17223 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17224 (vect_analyze_scalar_cycles_1): Likewise.
17225 (vect_get_loop_niters): Likewise.
17226 (vect_analyze_loop_form_1): Likewise.
17227 (vect_update_vf_for_slp): Likewise.
17228 (vect_analyze_loop_operations): Likewise.
17229 (vect_analyze_loop): Likewise.
17230 (vectorizable_induction): Likewise.
17231 (vect_transform_loop): Likewise.
17232 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
17233 * tree-vect-slp.c (vect_analyze_slp): Likewise.
17234 (vect_make_slp_decision): Likewise.
17235 (vect_detect_hybrid_slp): Likewise.
17236 (vect_slp_analyze_operations): Likewise.
17237 (vect_slp_bb): Likewise.
17238 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
17239 (vectorizable_bswap): Likewise.
17240 (vectorizable_call): Likewise.
17241 (vectorizable_simd_clone_call): Likewise.
17242 (vectorizable_conversion): Likewise.
17243 (vectorizable_assignment): Likewise.
17244 (vectorizable_shift): Likewise.
17245 (vectorizable_operation): Likewise.
17246 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
17248 2018-06-18 Martin Sebor <msebor@redhat.com>
17250 PR tree-optimization/81384
17251 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
17252 * builtins.c (expand_builtin_strnlen): New function.
17253 (expand_builtin): Call it.
17254 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
17255 * builtins.def (BUILT_IN_STRNLEN): New.
17256 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
17257 Warn for bounds in excess of maximum object size.
17258 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
17259 single-value ranges. Handle strnlen.
17260 (handle_builtin_strlen): Handle strnlen.
17261 (strlen_check_and_optimize_stmt): Same.
17262 * doc/extend.texi (Other Builtins): Document strnlen.
17264 2018-06-18 Maya Rashish <coypu@sdf.org>
17266 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
17267 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
17268 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
17270 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
17272 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
17274 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17276 * tree.c (escaped_string::escape): Replace cast to char * by
17277 const_cast<char *> (unescaped).
17279 2018-06-18 Nick Clifton <nickc@redhat.com>
17282 * tree.c (escaped_string): New class. Converts an unescaped
17283 string into its escaped equivalent.
17284 (warn_deprecated_use): Use the new class to convert the
17285 deprecation message, if present.
17286 (test_escaped_strings): New self test.
17287 (test_c_tests): Add test_escaped_strings.
17288 * doc/extend.texi (deprecated): Add a note that the
17289 deprecation message is affected by the -fmessage-length
17290 option, and that control characters will be escaped.
17291 (#pragma GCC error): Document this pragma.
17292 (#pragma GCC warning): Likewise.
17293 * doc/invoke.texi (-fmessage-length): Document this option's
17294 effect on the #warning and #error preprocessor directives and
17295 the deprecated attribute.
17297 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
17299 * tree.c (decl_value_expr_lookup): Revert latest change.
17300 (decl_value_expr_insert): Likewise.
17302 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
17304 * gimplify.c (nonlocal_vlas): Delete.
17305 (nonlocal_vla_vars): Likewise.
17306 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
17308 (gimplify_body): Do not create and destroy nonlocal_vlas.
17309 * tree-nested.c: Include diagnostic.h.
17310 (use_pointer_in_frame): Tweak.
17311 (lookup_field_for_decl): Add assertion and declare the transformation.
17312 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
17313 internal error when the reference is in a wrong context. Do not
17314 create a debug decl by default.
17315 (note_nonlocal_block_vlas): Delete.
17316 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
17317 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
17318 create a debug decl by default.
17319 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
17320 call is in a wrong context.
17321 (fixup_vla_decls): New function.
17322 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
17323 debug variables were created.
17324 * tree.c (decl_value_expr_lookup): Add checking assertion.
17325 (decl_value_expr_insert): Likewise.
17327 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
17329 PR middle-end/82479
17330 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
17331 * tree-scalar-evolution.c (interpret_expr): Likewise.
17332 (expression_expensive_p): Likewise.
17333 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
17334 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
17335 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
17336 (ssa_defined_by_minus_one_stmt_p): New.
17338 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
17340 PR middle-end/64946
17341 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
17342 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
17343 * dojump.c (do_jump): Likewise.
17344 * expr.c (expand_expr_real_2): Check operand type's sign.
17345 * fold-const.c (const_unop): Handle ABSU_EXPR.
17346 (fold_abs_const): Likewise.
17347 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
17348 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
17349 (strip_sign_op_1): Likesise.
17350 * match.pd: Add new pattern to generate ABSU_EXPR.
17351 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
17352 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17353 * tree-eh.c (operation_could_trap_helper_p): Likewise.
17354 * tree-inline.c (estimate_operator_cost): Likewise.
17355 * tree-pretty-print.c (dump_generic_node): Likewise.
17356 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
17357 * tree.def (ABSU_EXPR): New.
17359 2018-06-16 Jakub Jelinek <jakub@redhat.com>
17361 PR middle-end/86095
17362 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
17363 documented as preserved for backward compatibility only.
17364 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
17366 PR rtl-optimization/86108
17367 * bb-reorder.c (create_forwarder_block): Renamed to ...
17368 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
17369 jump from new landing pad to the second part.
17370 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
17373 2018-06-15 Jakub Jelinek <jakub@redhat.com>
17375 PR middle-end/85878
17376 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
17377 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
17378 Only call store_expr for halves if the mode is the same.
17380 PR middle-end/86123
17381 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
17382 Fix up comment formatting.
17384 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
17386 * typed-splay-tree.h (typed_splay_tree::remove): New function.
17387 (typed_splay_tree::closure,
17388 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
17389 (typed_splay_tree::typed_splay_tree,
17390 typed_splay_tree::operator =): Declared private.
17391 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
17392 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
17393 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
17394 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
17395 typed_splay_tree::splay_tree_splay,
17396 typed_splay_tree::splay_tree_foreach_helper,
17397 typed_splay_tree::splay_tree_insert,
17398 typed_splay_tree::splay_tree_remove,
17399 typed_splay_tree::splay_tree_lookup,
17400 typed_splay_tree::splay_tree_predecessor,
17401 typed_splay_tree::splay_tree_successor,
17402 typed_splay_tree::splay_tree_min,
17403 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
17404 (typed_splay_tree::root, typed_splay_tree::comp,
17405 typed_splay_tree::delete_key,
17406 typed_splay_tree::delete_value): New data members.
17407 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
17408 typed_splay_tree::remove.
17410 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
17412 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
17413 -mginv and -mno-ginv to the assembler.
17414 * config/mips/mips.opt (-mcrc): New option.
17415 (-mginv): Likewise.
17416 * doc/invoke.text (-mcrc): Document.
17417 (-mginv): Likewise.
17419 2018-06-15 Nick Clifton <nickc@redhat.com>
17422 * tree.c (escaped_string): New class. Converts an unescaped
17423 string into its escaped equivalent.
17424 (warn_deprecated_use): Use the new class to convert the
17425 deprecation message, if present.
17426 (test_escaped_strings): New self test.
17427 (test_c_tests): Add test_escaped_strings.
17428 * doc/extend.texi (deprecated): Add a note that the
17429 deprecation message is affected by the -fmessage-length
17430 option, and that control characters will be escaped.
17431 (#pragma GCC error): Document this pragma.
17432 (#pragma GCC warning): Likewise.
17433 * doc/invoke.texi (-fmessage-length): Document this option's
17434 effect on the #warning and #error preprocessor directives and
17435 the deprecated attribute.
17437 2018-06-15 Richard Biener <rguenther@suse.de>
17439 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
17440 here, also noting vector size used.
17441 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
17442 size used in MSG_OPTIMIZED_LOCATIONS dump.
17443 (pass_slp_vectorize::execute): Adjust.
17445 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
17448 * config/arc/arc.c (arc_return_address_register): Fix
17451 2018-06-15 Richard Biener <rguenther@suse.de>
17453 PR middle-end/86159
17454 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
17455 leave useless conversion stripping to force_gimple_operand_gsi.
17456 (gimplify_build2): Likewise.
17457 (gimplify_build1): Likewise.
17459 2018-06-15 Richard Biener <rguenther@suse.de>
17461 PR middle-end/86076
17462 * tree-cfg.c (move_stmt_op): unshare invariant addresses
17463 before adjusting their block.
17465 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
17467 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
17468 multilibs for *-*-rtems*.
17469 * config/riscv/t-rtems: New file.
17471 2018-06-14 Jakub Jelinek <jakub@redhat.com>
17473 PR middle-end/86122
17474 * match.pd ((A +- CST1) +- CST2): Punt if last resort
17475 unsigned_type_for returns NULL.
17478 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
17479 subregs of multi-word pseudos unless the float mode has word size.
17481 2018-06-14 Richard Biener <rguenther@suse.de>
17483 PR middle-end/86139
17484 * tree-vect-generic.c (build_word_mode_vector_type): Remove
17485 duplicate and harmful type_hash_canon.
17486 * tree.c (type_hash_canon): Assert we didn't find ourselves.
17488 2018-06-14 Richard Biener <rguenther@suse.de>
17491 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
17494 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
17496 * config/rtems.h (STDINT_LONG32): Define.
17498 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
17499 Prachi Godbole <prachi.godbole@imgtec.com>
17501 * config/mips/mips-cpus.def: Define P6600.
17502 * config/mips/mips-tables.opt: Regenerate.
17503 * config/mips/mips.c (mips_ucbranch_type): New enum.
17504 (mips_rtx_cost_data): Add support for P6600.
17505 (mips_issue_rate): Likewise.
17506 (mips_multipass_dfa_lookahead): Likewise.
17507 (mips_avoid_hazard): Likewise.
17508 (mips_reorg_process_insns): Likewise.
17509 (mips_classify_branch_p6600): New function.
17510 * config/mips/mips.h (TUNE_P6600): New define.
17511 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
17512 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
17513 * config/mips/mips.md: Include p6600.md.
17514 (processor): Add p6600.
17515 * config/mips/p6600.md: New file.
17516 * doc/invoke.texi: Add p6600 to supported architectures.
17518 2018-06-13 Martin Sebor <msebor@redhat.com>
17520 PR tree-optimization/86114
17521 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
17523 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
17525 2018-06-13 Richard Biener <rguenther@suse.de>
17527 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
17528 Properly set vector type of the intermediate stmt.
17529 * tree-vect-stmts.c (vectorizable_operation): The destination
17530 var always has vectype_out type.
17532 2018-06-13 Jeff Law <law@redhat.com>
17534 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
17535 integer 0 for argument to print_rtl_with_bb.
17536 (rl78_reorg): Likewise.
17538 2018-06-13 David Malcolm <dmalcolm@redhat.com>
17540 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
17541 from rtx to rtx_insn *.
17542 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
17544 (add_sched_insns_for_speculation): Likewise for local "target",
17545 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17546 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
17547 from rtx_insn ** to rtx_code_label **.
17548 (reorg_emit_nops): Likewise.
17549 (c6x_reorg): Likewise for local "call_labels".
17550 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
17552 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
17553 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
17554 the loops over LABEL_REFS.
17555 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
17557 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17558 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
17559 (split_branches): Strengthen local "olabel" from rtx to
17560 rtx_insn *, adding a safe_as_a cast.
17561 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
17563 (add_insn_after): Likewise for first two params.
17564 (add_insn_before): Likewise.
17565 (remove_insn): Likewise for param.
17566 (emit_pattern_before_noloc): Likewise for second and third params.
17567 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
17568 (emit_call_insn_before_noloc): Likewise.
17569 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
17571 (emit_barrier_before): Likewise.
17572 (emit_label_before): Strengthen "label" param from "rtx" to
17573 "rtx_code_label *". Strengthen "before" param from "rtx" to
17575 (emit_insn_after_1): Strengthen "after" param from "rtx" to
17577 (emit_pattern_after_noloc): Likewise.
17578 (emit_insn_after_noloc): Likewise.
17579 (emit_jump_insn_after_noloc): Likewise.
17580 (emit_call_insn_after_noloc): Likewise.
17581 (emit_debug_insn_after_noloc): Likewise.
17582 (emit_barrier_after): Likewise.
17583 (emit_label_after): Likewise for both params.
17584 (emit_pattern_after_setloc): Likewise for "after" param. Convert
17585 "loc" param from "int" to "location_t".
17586 (emit_insn_after_setloc): Likewise.
17587 (emit_jump_insn_after_setloc): Likewise.
17588 (emit_call_insn_after_setloc): Likewise.
17589 (emit_debug_insn_after_setloc): Likewise.
17590 (emit_pattern_before_setloc): Likewise for "before" param. Convert
17591 "loc" param from "int" to "location_t".
17592 (emit_pattern_before): Convert NULL_RTX to NULL.
17593 (emit_insn_before_setloc): Convert "loc" param from "int" to
17595 (emit_jump_insn_before_setloc): Likewise.
17596 (emit_call_insn_before_setloc): Likewise.
17597 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
17598 rtx_insn *. Convert "loc" param from "int" to "location_t".
17599 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
17600 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
17601 Convert 3rd param from "int" to "location_t".
17602 (emit_barrier_before, emit_barrier_after, next_real_insn):
17603 Strengthen param from rtx to rtx_insn *.
17604 (emit_label_before): Strengthen 1st param from "rtx" to
17605 "rtx_code_label *". Strengthen 2nd param from "rtx" to
17607 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
17608 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
17609 Strengthen 2nd param from "rtx" to "rtx_insn *".
17610 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
17611 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
17612 Likewise. Convert 3rd param from "int" to "location_t".
17613 (emit_label_after): Strengthen 1st param from "rtx" to
17614 "rtx_code_label *".
17615 (next_real_insn, remove_insn): Strengthen param from "rtx" to
17617 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
17618 from "rtx" to "rtx_insn *".
17620 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
17622 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
17623 bodies streamed in with -Q.
17624 * dumpfile.c (dump_files): Add lto-stream-out dump file.
17625 * dumpfile.h (tree_dump_index): Add lto_stream_out.
17626 * gimple-streamer-out.c: Include gimple-pretty-print.h
17627 (output_bb): Dump stmts streamed.
17628 * lto-section-out.c: Include print-tree.h
17629 (lto_begin_section): Dump sections created.
17630 (lto_output_decl_index): Dump decl encoded.
17631 * lto-streamer-out.c: Include print-tree.h
17632 (create_output_block): Dump output block created.
17633 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
17634 (output_function): Dump function output.
17635 (output_constructor): Dump constructor streamed.
17636 (write_global_stream): Output indexes encoded.
17637 (produce_asm_for_decls): Dump streams encoded.
17638 * lto-streamer.c (streamer_dump_file): New global var.
17639 * lto-streamer.h (streamer_dump_file): Declare.
17640 * passes.c (ipa_write_summaries): Initialize streamer dump.
17641 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
17644 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
17647 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
17648 offsets for register save directives. Emit a second batch of save
17649 directives, if need be, when the function accesses prior frames.
17651 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17653 * config/arc/fpu.md (fmasf4): Force operand to register.
17654 (fnmasf4): Likewise.
17656 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17658 * config/arc/arc-protos.h (arc_pad_return): Remove.
17659 * config/arc/arc.c (machine_function): Remove force_short_suffix
17661 (arc_print_operand): Adjust printing of '&'.
17662 (arc_verify_short): Remove conditional printing of short suffix.
17663 (arc_final_prescan_insn): Remove reference to size_reason.
17664 (pad_return): New function.
17665 (arc_reorg): Call pad_return.
17666 (arc_pad_return): Remove.
17667 (arc_init_machine_status): Remove reference to force_short_suffix.
17668 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
17669 (attr length): When attribute iscompact is true force to 2
17670 regardless; in the case of maybe check if we want to force the
17671 instruction to have 4 bytes length.
17672 (nopv): Change it to generate 4 byte long nop as well.
17673 (blockage): New pattern.
17674 (simple_return): Remove call to arc_pad_return.
17675 (p_return_i): Likewise.
17677 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17679 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
17681 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17683 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
17686 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17688 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
17689 for ARC700 and ARCv2.
17691 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
17694 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
17695 operands[2] instead of operands[1].
17698 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
17700 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
17701 case, check whether the outer register overlaps an unallocatable
17702 register, not just whether it fits the required class.
17704 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
17706 * poly-int.h (can_div_trunc_p): Add new overload in which all values
17708 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
17709 (memrefs_conflict_p): Likewise.
17710 (init_alias_analysis): Likewise.
17711 * cfgexpand.c (expand_debug_expr): Likewise.
17712 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
17713 * cse.c (fold_rtx): Likewise.
17714 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
17715 * expr.c (emit_block_move_hints): Likewise.
17716 (clear_storage_hints, push_block, emit_push_insn): Likewise.
17717 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
17718 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
17719 (emit_group_store): Likewise.
17720 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
17721 to read the PRE/POST_MODIFY increment.
17722 * calls.c (store_one_arg): Use strip_offset.
17723 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
17725 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
17727 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
17728 (simplify_binary_operation_1): Extend CONST_INT handling to
17730 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
17731 than a HOST_WIDE_INT.
17732 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
17734 (adjust_mems, add_stores): Update accodingly.
17735 (vt_canonicalize_addr): Track polynomial offsets.
17736 (emit_note_insn_var_location): Likewise.
17737 (vt_add_function_parameter): Likewise.
17738 (vt_initialize): Likewise.
17740 2018-06-12 Jeff Law <law@redhat.com>
17742 * config.gcc (alpha*-*-freebsd*): Remove.
17743 * config/alpha/freebsd.h: Remove.
17745 2018-06-12 David Malcolm <dmalcolm@redhat.com>
17748 * spellcheck-tree.c (levenshtein_distance): Rename to...
17749 (get_edit_distance): ...this, and update for underlying renaming.
17750 * spellcheck-tree.h (levenshtein_distance): Rename to...
17751 (get_edit_distance): ...this.
17752 * spellcheck.c (levenshtein_distance): Rename to...
17753 (get_edit_distance): ...this. Convert from Levenshtein distance
17754 to Damerau-Levenshtein distance by supporting transpositions of
17755 adjacent characters. Rename "v1" to "v_next" and "v0" to
17757 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
17758 (selftest::test_edit_distance_unit_test_oneway): ...this, and
17759 update for underlying renaming.
17760 (selftest::levenshtein_distance_unit_test): Rename to...
17761 (selftest::test_get_edit_distance_unit): ...this, and update for
17762 underlying renaming.
17763 (selftest::test_find_closest_string): Add example from PR 69968
17764 where transposition helps
17765 (selftest::test_metric_conditions): Update for renaming.
17766 (selftest::test_metric_conditions): Likewise.
17767 (selftest::spellcheck_c_tests): Likewise.
17768 * spellcheck.h (levenshtein_distance): Rename both overloads to...
17769 (get_edit_distance): ...this.
17770 (best_match::consider): Update for renaming.
17772 2018-06-12 Martin Sebor <msebor@redhat.com>
17774 PR tree-optimization/85259
17775 * builtins.c (compute_objsize): Handle constant offsets.
17776 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
17777 true iff a warning has been issued.
17778 * gimple.h (gimple_nonartificial_location): New function.
17779 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
17780 gimple_nonartificial_location and handle -Wno-system-headers.
17781 (handle_builtin_stxncpy): Same.
17783 2018-06-12 Martin Sebor <msebor@redhat.com>
17786 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
17788 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
17790 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17791 BUILTIN_VEC_XST entries for pointer to double and long long.
17793 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
17796 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17798 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17801 2018-06-12 Martin Liska <mliska@suse.cz>
17803 * doc/options.texi: Document IntegerRange.
17805 2018-06-12 Martin Liska <mliska@suse.cz>
17807 * config/i386/i386.opt: Make MPX-related options as Deprecated.
17808 * opt-functions.awk: Handle Deprecated flag.
17809 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
17811 (read_cmdline_option): Report warning for a deprecated option.
17812 * opts.h (struct cl_option): Add new field cl_deprecated.
17813 (CL_ERR_DEPRECATED): New.
17815 2018-06-12 Martin Liska <mliska@suse.cz>
17817 * doc/options.texi: Document Deprecated option flag.
17819 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17821 * config/arc/arc-arch.h (arc_extras): New enum.
17822 (arc_cpu_t):Add field extra.
17823 (arc_cpu_types): Consider the extras.
17824 * config/arc/arc-cpus.def: Add extras info.
17825 * config/arc/arc-opts.h (processor_type): Consider extra field.
17826 * config/arc/arc.c (arc_override_options): Handle extra field.
17828 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17830 * config/arc/arc-arch.h: Update ARC_OPTX macro.
17831 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
17833 * config/arc/arc.c (arc_init): Update pic warning.
17834 (irq_range): Update irq range parsing warnings.
17835 (arc_override_options): Update various warning messages.
17836 (arc_handle_aux_attribute): Likewise.
17838 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
17840 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
17842 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17844 * doc/sourcebuild.texi: Document usage of line number 0 in verify
17845 compiler messages directives.
17847 2018-06-12 Matthew Fortune <mfortune@gmail.com>
17849 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
17850 * config/mips/mips-tables.opt: Regenerate.
17851 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
17853 * doc/invoke.texi: Document -march=i6500.
17855 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
17857 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
17858 (i6400_gpmul): Add cpu_unit.
17859 (i6400_gpdiv): Likewise.
17860 (i6400_msa_add_d): Update reservations.
17861 (i6400_msa_int_add) Likewise.
17862 (i6400_msa_short_logic3) Likewise.
17863 (i6400_msa_short_logic2) Likewise.
17864 (i6400_msa_short_logic) Likewise.
17865 (i6400_msa_move) Likewise.
17866 (i6400_msa_cmp) Likewise.
17867 (i6400_msa_short_float2) Likewise.
17868 (i6400_msa_div_d) Likewise.
17869 (i6400_msa_long_logic1) Likewise.
17870 (i6400_msa_long_logic2) Likewise.
17871 (i6400_msa_mult) Likewise.
17872 (i6400_msa_long_float2) Likewise.
17873 (i6400_msa_long_float4) Likewise.
17874 (i6400_msa_long_float5) Likewise.
17875 (i6400_msa_long_float8) Likewise.
17876 (i6400_fpu_fadd): Include frint type.
17877 (i6400_fpu_store): New define_insn_reservation.
17878 (i6400_fpu_load): Likewise.
17879 (i6400_fpu_move): Likewise.
17880 (i6400_fpu_fcmp): Likewise.
17881 (i6400_fpu_fmadd): Likewise.
17882 (i6400_int_mult): Include imul3nc type and update reservation.
17883 (i6400_int_div): Include idiv3 type and update reservation.
17884 (i6400_int_load): Update to check type not move_type.
17885 (i6400_int_store): Likewise.
17886 (i6400_int_prefetch): Set zero latency.
17888 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
17890 * gcc.c: Document new %@{...} sequence.
17891 (LINK_COMMAND_SPEC): Use it for the -L switches.
17892 (cpp_unique_options): Use it for the -I switches.
17893 (at_file_argbuf): New global variable.
17894 (in_at_file): Likewise.
17895 (alloc_args): Create at_file_argbuf.
17896 (clear_args): Truncate at_file_argbuf.
17897 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
17898 (open_at_file): New function.
17899 (close_at_file): Likewise.
17900 (create_at_file): Delete.
17901 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17904 (validate_switches_from_spec): Deal with %@{...} sequence.
17905 (validate_switches): Likewise.
17906 (driver::finalize): Call clear_args.
17908 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
17910 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17912 2018-06-11 Martin Sebor <msebor@redhat.com>
17914 * doc/invoke.texi (-Wall): List -Wc++17-compat.
17915 (Wno-class-memaccess): Add @opindex.
17916 (Wno-templates, Wno-multiple-inheritance): Same.
17917 (Wno-virtual-inheritance, Wno-namespaces): Same.
17918 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17919 (Wno-format-overflow, Wno-format-truncation): Same.
17920 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17921 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17922 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17923 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17924 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17925 (Wno-misspelled-isr): Same.
17927 2018-06-11 Martin Sebor <msebor@redhat.com>
17929 * PR tree-optimization/86083
17930 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17932 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
17934 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17936 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
17939 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17940 on the correct operand.
17941 (*movdi_internal64): Ditto.
17943 2018-06-11 Martin Liska <mliska@suse.cz>
17945 PR tree-optimization/86089
17946 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17948 2018-06-11 Julia Koval <julia.koval@intel.com>
17950 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17951 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17952 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17954 2018-06-11 Olivier Hainque <hainque@adacore.com>
17956 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17957 for Ada with strict dwarf2.
17959 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
17962 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17965 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
17967 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17969 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
17971 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17974 2018-06-08 Martin Liska <mliska@suse.cz>
17976 * tree-cfg.h (debug_function): Fix argument type to match
17979 2018-06-08 Martin Liska <mliska@suse.cz>
17981 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17982 Remove usage of MPX-related (and removed) fields.
17983 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17985 2018-06-08 David Malcolm <dmalcolm@redhat.com>
17987 * cfg.c (debug): Use TDF_NONE rather than 0.
17988 * cfghooks.c (debug): Likewise.
17989 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17990 (struct dump_option_value_info): Convert to...
17991 (struct kv_pair): ...this template type.
17992 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
17994 (optinfo_verbosity_options): Likewise.
17995 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
17997 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
17998 than int for "optgroup_flags" param.
17999 (dump_generic_expr_loc): Use dump_flags_t rather than int for
18001 (dump_dec): Likewise.
18002 (dump_finish): Use TDF_NONE rather than 0.
18003 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
18004 rather than int for "optgroup_flags" param. Use TDF_NONE rather
18005 than 0. Update for change to option_ptr.
18006 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
18007 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
18008 0. Update for changes to optinfo_verbosity_options and
18010 (opt_info_switch_p): Convert optgroup_flags from int to
18012 (dump_basic_block): Use dump_flags_t rather than int
18013 for "dump_kind" param.
18014 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
18015 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
18016 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
18017 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
18018 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
18019 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
18020 TDF_NONE): Convert from macros to...
18021 (enum dump_flag): ...this new enum.
18022 (dump_flags_t): Update to use enum.
18023 (operator|, operator&, operator~, operator|=, operator&=):
18024 Implement for dump_flags_t.
18025 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
18026 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
18027 Convert from macros to...
18028 (enum optgroup_flag): ...this new enum.
18029 (optgroup_flags_t): New typedef.
18030 (operator|, operator|=): Implement for optgroup_flags_t.
18031 (struct dump_file_info): Convert field "alt_flags" to
18032 dump_flags_t. Convert field "optgroup_flags" to
18034 (dump_basic_block): Use dump_flags_t rather than int for param.
18035 (dump_generic_expr_loc): Likewise.
18036 (dump_dec): Likewise.
18037 (dump_register): Convert param "optgroup_flags" to
18039 (opt_info_enable_passes): Likewise.
18040 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
18042 * gimple-pretty-print.c (debug): Likewise.
18043 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
18044 (merged_store_group::apply_stores): Likewise.
18045 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
18046 * gimple.c (verify_gimple_pp): Likewise.
18047 * graphite-poly.c (print_pbb_body): Likewise.
18048 * passes.c (pass_manager::register_one_dump_file): Convert
18049 local "optgroup_flags" to optgroup_flags_t.
18050 * print-tree.c (print_node): Use TDF_NONE rather than 0.
18052 (debug_body): Likewise.
18053 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
18054 to optgroup_flags_t.
18055 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
18057 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
18058 (convert_mult_to_fma): Likewise.
18059 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
18060 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
18061 * tree-vect-data-refs.c (dump_lower_bound): Convert param
18062 "dump_kind" to dump_flags_t.
18064 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
18066 * config/rs6000/rs6000.c (min, max): Delete.
18068 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
18070 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
18071 -mabi=spe and -mabi=no-spe.
18073 2018-06-08 Martin Liska <mliska@suse.cz>
18075 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
18076 where we expect an existing summary.
18078 2018-06-08 Martin Liska <mliska@suse.cz>
18080 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
18081 * ipa-inline.h (estimate_edge_growth): Likewise.
18083 2018-06-08 Martin Liska <mliska@suse.cz>
18085 * cgraph.c (function_version_hasher::hash): Use
18086 cgraph_node::get_uid ().
18087 (function_version_hasher::equal):
18088 * cgraph.h (cgraph_node::get_uid): New method.
18089 * ipa-inline.c (update_caller_keys): Use
18090 cgraph_node::get_uid ().
18091 (update_callee_keys): Likewise.
18092 * ipa-utils.c (searchc): Likewise.
18093 (ipa_reduced_postorder): Likewise.
18094 * lto-cgraph.c (input_node): Likewise.
18095 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
18096 * symbol-summary.h (symtab_insertion): Likewise.
18097 (symtab_removal): Likewise.
18098 (symtab_duplication): Likewise.
18099 * tree-pretty-print.c (dump_function_header): Likewise.
18100 * tree-sra.c (convert_callers_for_node): Likewise.
18102 2018-06-08 Martin Liska <mliska@suse.cz>
18104 * cgraph.c (symbol_table::create_edge): Always assign a new
18106 (symbol_table::free_edge): Do not recycle numbers.
18107 * cgraph.h (cgraph_edge::get): New method.
18108 * symbol-summary.h (symtab_removal): Use it.
18109 (symtab_duplication): Likewise.
18110 (call_summary::hashable_uid): Remove.
18112 2018-06-08 Martin Liska <mliska@suse.cz>
18114 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
18115 (initialize_growth_caches): Remove.
18116 (free_growth_caches): Likewise.
18117 (do_estimate_edge_time): Use edge_growth_cache.
18118 (do_estimate_edge_size): Likewise.
18119 (do_estimate_edge_hints): Likewise.
18120 * ipa-inline.c (reset_edge_caches): Likewise.
18121 (recursive_inlining): Likewise.
18122 (inline_small_functions): Likewise.
18123 * ipa-inline.h (initialize_growth_caches): Remove.
18124 (estimate_edge_size): Likewise.
18125 (estimate_edge_time): Likewise.
18126 (estimate_edge_hints): Likewise.
18127 (reset_edge_growth_cache): Likewise.
18128 * symbol-summary.h (call_summary::remove): New method.
18130 2018-06-08 Martin Liska <mliska@suse.cz>
18132 * ipa-cp.c (class edge_clone_summary): New summary.
18133 (grow_edge_clone_vectors): Remove.
18134 (ipcp_edge_duplication_hook): Remove.
18135 (class edge_clone_summary_t): New call_summary class.
18136 (ipcp_edge_removal_hook): Remove.
18137 (edge_clone_summary_t::duplicate): New function.
18138 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
18139 (create_specialized_node): Likewise.
18140 (ipcp_driver): Initialize edge_clone_summaries and do not
18143 2018-06-08 Martin Liska <mliska@suse.cz>
18145 * symbol-summary.h (get): New function.
18146 (call_summary::m_initialize_when_cloning): New class member.
18148 2018-06-08 Martin Liska <mliska@suse.cz>
18150 * cgraph.c (cgraph_node::remove): Do not recycle uid.
18151 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
18152 (symbol_table::allocate_cgraph_symbol): Do not set uid.
18153 * passes.c (uid_hash_t): Record removed_nodes by their uids.
18154 (remove_cgraph_node_from_order): Use the removed_nodes set.
18155 (do_per_function_toporder): Likwise.
18156 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
18157 instead of summary_uid.
18158 (symtab_removal): Likewise.
18159 (symtab_duplication): Likewise.
18161 2018-06-08 Martin Liska <mliska@suse.cz>
18163 * ipa-cp.c (ipcp_store_bits_results): Use
18164 ipcp_transformation_sum.
18165 (ipcp_store_vr_results): Likewise.
18166 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
18168 (ipcp_transformation_initialize): ... this.
18169 (ipa_set_node_agg_value_chain):
18170 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
18171 (write_ipcp_transformation_info): Likewise.
18172 (read_ipcp_transformation_info): Likewise.
18173 (ipcp_update_bits): Likewise.
18174 (ipcp_update_vr): Likewise.
18175 (ipcp_transform_function): Likewise.
18176 * ipa-prop.h: Rename ipcp_transformation_summary to
18177 ipcp_transformation.
18178 (class ipcp_transformation_t): New function summary.
18179 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
18180 (ipa_get_agg_replacements_for_node): Likewise.
18182 2018-06-08 Martin Liska <mliska@suse.cz>
18184 * ipa-pure-const.c (struct funct_state_d): Do it class instead
18186 (class funct_state_summary_t): New function_summary class.
18187 (has_function_state): Remove.
18188 (get_function_state): Likewise.
18189 (set_function_state): Likewise.
18190 (add_new_function): Likewise.
18191 (funct_state_summary_t::insert): New function.
18192 (duplicate_node_data): Remove.
18193 (remove_node_data): Remove.
18194 (funct_state_summary_t::duplicate): New function.
18195 (register_hooks): Create new funct_state_summaries.
18196 (pure_const_generate_summary): Use it.
18197 (pure_const_write_summary): Likewise.
18198 (pure_const_read_summary): Likewise.
18199 (propagate_pure_const): Likewise.
18200 (propagate_nothrow): Likewise.
18201 (dump_malloc_lattice): Likewise.
18202 (propagate_malloc): Likewise.
18203 (execute): Do not register hooks, just remove summary
18205 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
18208 2018-06-08 Martin Liska <mliska@suse.cz>
18210 * ipa-reference.c (remove_node_data): Remove.
18211 (duplicate_node_data): Likewise.
18212 (class ipa_ref_var_info_summary_t): New class.
18213 (class ipa_ref_opt_summary_t): Likewise.
18214 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
18215 (get_reference_optimization_summary): Use
18216 ipa_ref_opt_sum_summaries.
18217 (set_reference_vars_info): Remove.
18218 (set_reference_optimization_summary): Likewise.
18219 (ipa_init): Create summaries.
18220 (init_function_info): Use function summary.
18221 (ipa_ref_opt_summary_t::duplicate): New function.
18222 (ipa_ref_opt_summary_t::remove): New function.
18223 (get_read_write_all_from_node): Fix GNU coding style.
18224 (propagate): Use function summary.
18225 (write_node_summary_p): Fix GNU coding style.
18226 (stream_out_bitmap): Likewise.
18227 (ipa_reference_read_optimization_summary): Use function summary.
18228 (ipa_reference_c_finalize): Do not release hooks.
18230 2018-06-08 Martin Liska <mliska@suse.cz>
18232 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
18233 (analyze_function_body): Extract multiple calls of get_create.
18234 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18235 * ipa-inline.c (recursive_inlining): Use ::get method.
18236 * ipa-inline.h (estimate_edge_growth): Likewise.
18238 2018-06-08 Martin Liska <mliska@suse.cz>
18240 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
18242 (hsa_function_summary::hsa_function_summary): Use the new enum
18244 (hsa_gpu_implementation_p): Use hsa_summaries::get.
18245 * hsa-gen.c (hsa_get_host_function): Likewise.
18246 (get_brig_function_name): Likewise.
18247 * ipa-hsa.c (process_hsa_functions): Likewise.
18248 (ipa_hsa_write_summary): Likewise.
18249 * symbol-summary.h (symtab_duplication): Use ::get function/
18250 (get): New function.
18252 2018-06-08 Martin Liska <mliska@suse.cz>
18254 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
18256 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
18257 (hsa_register_kernel): Likewise.
18258 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
18259 * hsa-gen.c (hsa_get_host_function): Likewise.
18260 (get_brig_function_name): Likewise.
18261 (generate_hsa): Likewise.
18262 (pass_gen_hsail::execute): Likewise.
18263 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
18264 (devirtualization_time_bonus): Likewise.
18265 (ipcp_propagate_stage): Likewise.
18266 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
18267 (edge_set_predicate): Likewise.
18268 (evaluate_conditions_for_known_args): Likewise.
18269 (evaluate_properties_for_edge): Likewise.
18270 (ipa_fn_summary::reset): Likewise.
18271 (ipa_fn_summary_t::duplicate): Likewise.
18272 (dump_ipa_call_summary): Likewise.
18273 (ipa_dump_fn_summary): Likewise.
18274 (analyze_function_body): Likewise.
18275 (compute_fn_summary): Likewise.
18276 (estimate_edge_devirt_benefit): Likewise.
18277 (estimate_edge_size_and_time): Likewise.
18278 (estimate_calls_size_and_time): Likewise.
18279 (estimate_node_size_and_time): Likewise.
18280 (inline_update_callee_summaries): Likewise.
18281 (remap_edge_change_prob): Likewise.
18282 (remap_edge_summaries): Likewise.
18283 (ipa_merge_fn_summary_after_inlining): Likewise.
18284 (ipa_update_overall_fn_summary): Likewise.
18285 (read_ipa_call_summary): Likewise.
18286 (inline_read_section): Likewise.
18287 (write_ipa_call_summary): Likewise.
18288 (ipa_fn_summary_write): Likewise.
18289 (ipa_free_fn_summary): Likewise.
18290 * ipa-hsa.c (process_hsa_functions): Likewise.
18291 (ipa_hsa_write_summary): Likewise.
18292 (ipa_hsa_read_section): Likewise.
18293 * ipa-icf.c (sem_function::merge): Likewise.
18294 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
18295 (do_estimate_edge_time): Likewise.
18296 (estimate_size_after_inlining): Likewise.
18297 (estimate_growth): Likewise.
18298 (growth_likely_positive): Likewise.
18299 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
18300 (inline_call): Likewise.
18301 * ipa-inline.c (caller_growth_limits): Likewise.
18302 (can_inline_edge_p): Likewise.
18303 (can_inline_edge_by_limits_p): Likewise.
18304 (compute_uninlined_call_time): Likewise.
18305 (compute_inlined_call_time): Likewise.
18306 (want_inline_small_function_p): Likewise.
18307 (edge_badness): Likewise.
18308 (update_caller_keys): Likewise.
18309 (update_callee_keys): Likewise.
18310 (recursive_inlining): Likewise.
18311 (inline_small_functions): Likewise.
18312 (inline_to_all_callers_1): Likewise.
18313 (dump_overall_stats): Likewise.
18314 (early_inline_small_functions): Likewise.
18315 (early_inliner): Likewise.
18316 * ipa-inline.h (estimate_edge_growth): Likewise.
18317 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
18318 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
18319 * ipa-prop.h (IPA_NODE_REF): Likewise.
18320 (IPA_EDGE_REF): Likewise.
18321 * ipa-pure-const.c (malloc_candidate_p): Likewise.
18322 (propagate_malloc): Likewise.
18323 * ipa-split.c (execute_split_functions): Likewise.
18324 * symbol-summary.h: Rename get to get_create.
18326 (get_create): Likewise.
18327 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
18329 2018-06-08 Martin Liska <mliska@suse.cz>
18331 * symbol-summary.h (release): Move definition out of class
18333 (symtab_removal): Likewise.
18334 (symtab_duplication): Likewise.
18336 2018-06-08 Martin Liska <mliska@suse.cz>
18338 * symbol-summary.h (function_summary): Move constructor
18339 implementation out of class declaration.
18340 (release): Likewise.
18341 (symtab_insertion): Likewise.
18342 (symtab_removal): Likewise.
18343 (symtab_duplication): Likewise.
18346 2018-06-08 Martin Liska <mliska@suse.cz>
18348 * Makefile.in: Remove support for MPX (macros, related functions,
18349 fields in cgraph_node, ...).
18350 * builtin-types.def (BT_BND): Likewise.
18351 (BT_FN_BND_CONST_PTR): Likewise.
18352 (BT_FN_CONST_PTR_BND): Likewise.
18353 (BT_FN_VOID_PTR_BND): Likewise.
18354 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
18355 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
18356 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
18357 (expand_builtin_mempcpy_with_bounds): Likewise.
18358 (expand_builtin_memset_with_bounds): Likewise.
18359 (expand_builtin_memset_args): Likewise.
18360 (std_expand_builtin_va_start): Likewise.
18361 (expand_builtin): Likewise.
18362 (expand_builtin_with_bounds): Likewise.
18363 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
18364 (DEF_LIB_BUILTIN_CHKP): Likewise.
18365 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
18366 (DEF_CHKP_BUILTIN): Likewise.
18367 (BUILT_IN_MEMCPY): Likewise.
18368 (BUILT_IN_MEMMOVE): Likewise.
18369 (BUILT_IN_MEMPCPY): Likewise.
18370 (BUILT_IN_MEMSET): Likewise.
18371 (BUILT_IN_STPCPY): Likewise.
18372 (BUILT_IN_STRCAT): Likewise.
18373 (BUILT_IN_STRCHR): Likewise.
18374 (BUILT_IN_STRCPY): Likewise.
18375 (BUILT_IN_STRLEN): Likewise.
18376 (BUILT_IN_MEMCPY_CHK): Likewise.
18377 (BUILT_IN_MEMMOVE_CHK): Likewise.
18378 (BUILT_IN_MEMPCPY_CHK): Likewise.
18379 (BUILT_IN_MEMSET_CHK): Likewise.
18380 (BUILT_IN_STPCPY_CHK): Likewise.
18381 (BUILT_IN_STRCAT_CHK): Likewise.
18382 (BUILT_IN_STRCPY_CHK): Likewise.
18383 * calls.c (store_bounds): Likewise.
18384 (emit_call_1): Likewise.
18385 (special_function_p): Likewise.
18386 (maybe_warn_nonstring_arg): Likewise.
18387 (initialize_argument_information): Likewise.
18388 (finalize_must_preallocate): Likewise.
18389 (compute_argument_addresses): Likewise.
18390 (expand_call): Likewise.
18391 * cfgexpand.c (expand_call_stmt): Likewise.
18392 (expand_return): Likewise.
18393 (expand_gimple_stmt_1): Likewise.
18394 (pass_expand::execute): Likewise.
18395 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
18396 (cgraph_node::remove): Likewise.
18397 (cgraph_node::dump): Likewise.
18398 (cgraph_node::verify_node): Likewise.
18399 * cgraph.h (chkp_function_instrumented_p): Likewise.
18400 (symtab_node::get_alias_target): Likewise.
18401 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
18402 (cgraph_local_p): Likewise.
18403 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
18404 (cgraph_edge::rebuild_references): Likewise.
18405 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
18406 (walk_polymorphic_call_targets): Likewise.
18407 (cgraph_node::expand_thunk): Likewise.
18408 (symbol_table::output_weakrefs): Likewise.
18409 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
18410 (ix86_handle_option): Likewise.
18411 * config/i386/constraints.md: Likewise.
18412 * config/i386/i386-builtin-types.def (BND): Likewise.
18416 * config/i386/i386-builtin.def (BDESC_END): Likewise.
18417 (BDESC_FIRST): Likewise.
18419 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
18420 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
18421 * config/i386/i386.c (enum reg_class): Likewise.
18422 (ix86_target_string): Likewise.
18423 (ix86_option_override_internal): Likewise.
18424 (ix86_conditional_register_usage): Likewise.
18425 (ix86_valid_target_attribute_inner_p): Likewise.
18426 (ix86_set_indirect_branch_type): Likewise.
18427 (ix86_set_current_function): Likewise.
18428 (ix86_function_arg_regno_p): Likewise.
18429 (init_cumulative_args): Likewise.
18430 (ix86_function_arg_advance): Likewise.
18431 (ix86_function_arg): Likewise.
18432 (ix86_pass_by_reference): Likewise.
18433 (ix86_function_value_regno_p): Likewise.
18434 (ix86_function_value_1): Likewise.
18435 (ix86_function_value_bounds): Likewise.
18436 (ix86_return_in_memory): Likewise.
18437 (ix86_setup_incoming_vararg_bounds): Likewise.
18438 (ix86_va_start): Likewise.
18439 (indirect_thunk_need_prefix): Likewise.
18440 (print_reg): Likewise.
18441 (ix86_print_operand): Likewise.
18442 (ix86_expand_call): Likewise.
18443 (ix86_output_function_return): Likewise.
18444 (reg_encoded_number): Likewise.
18445 (BDESC_VERIFYS): Likewise.
18446 (ix86_init_mpx_builtins): Likewise.
18447 (ix86_init_builtins): Likewise.
18448 (ix86_emit_cmove): Likewise.
18449 (ix86_emit_move_max): Likewise.
18450 (ix86_expand_builtin): Likewise.
18451 (ix86_builtin_mpx_function): Likewise.
18452 (ix86_get_arg_address_for_bt): Likewise.
18453 (ix86_load_bounds): Likewise.
18454 (ix86_store_bounds): Likewise.
18455 (ix86_load_returned_bounds): Likewise.
18456 (ix86_store_returned_bounds): Likewise.
18457 (ix86_class_likely_spilled_p): Likewise.
18458 (ix86_hard_regno_mode_ok): Likewise.
18459 (x86_order_regs_for_local_alloc): Likewise.
18460 (ix86_mitigate_rop): Likewise.
18461 (ix86_bnd_prefixed_insn_p): Likewise.
18462 (ix86_mpx_bound_mode): Likewise.
18463 (ix86_make_bounds_constant): Likewise.
18464 (ix86_initialize_bounds): Likewise.
18465 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
18466 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
18467 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
18468 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
18469 (TARGET_CHKP_BOUND_MODE): Likewise.
18470 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
18471 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
18472 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
18473 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
18474 * config/i386/i386.h (TARGET_MPX): Likewise.
18475 (TARGET_MPX_P): Likewise.
18476 (VALID_BND_REG_MODE): Likewise.
18477 (FIRST_BND_REG): Likewise.
18478 (LAST_BND_REG): Likewise.
18479 (enum reg_class): Likewise.
18480 (BND_REG_P): Likewise.
18481 (BND_REGNO_P): Likewise.
18482 (BNDmode): Likewise.
18483 (ADJUST_INSN_LENGTH): Likewise.
18484 * config/i386/i386.md: Likewise.
18485 * config/i386/i386.opt: Likewise.
18486 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
18487 (defined): Likewise.
18488 (LINK_MPX): Likewise.
18489 (MPX_SPEC): Likewise.
18490 (LIBMPX_SPEC): Likewise.
18491 (LIBMPXWRAPPERS_SPEC): Likewise.
18492 (CHKP_SPEC): Likewise.
18493 * config/i386/predicates.md: Likewise.
18494 * dbxout.c (dbxout_type): Likewise.
18495 * doc/extend.texi: Likewise.
18496 * doc/invoke.texi: Likewise.
18497 * doc/md.texi: Likewise.
18498 * doc/tm.texi: Likewise.
18499 * doc/tm.texi.in: Likewise.
18500 * dwarf2out.c (is_base_type): Likewise.
18501 (gen_formal_types_die): Likewise.
18502 (gen_subprogram_die): Likewise.
18503 (gen_type_die_with_usage): Likewise.
18504 (gen_decl_die): Likewise.
18505 (dwarf2out_late_global_decl): Likewise.
18506 * expr.c (expand_assignment): Likewise.
18507 (emit_storent_insn): Likewise.
18508 (store_expr_with_bounds): Likewise.
18509 (store_expr): Likewise.
18510 (expand_expr_real_1): Likewise.
18511 * expr.h (store_expr_with_bounds): Likewise.
18512 * function.c (use_register_for_decl): Likewise.
18513 (struct bounds_parm_data): Likewise.
18514 (assign_parms_augmented_arg_list): Likewise.
18515 (assign_parm_find_entry_rtl): Likewise.
18516 (assign_parm_is_stack_parm): Likewise.
18517 (assign_parm_load_bounds): Likewise.
18518 (assign_bounds): Likewise.
18519 (assign_parms): Likewise.
18520 (expand_function_start): Likewise.
18521 * gcc.c (CHKP_SPEC): Likewise.
18522 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
18523 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
18524 (wrestrict_dom_walker::check_call): Likewise.
18525 * gimple.c (gimple_build_call_from_tree): Likewise.
18526 * gimple.h (enum gf_mask): Likewise.
18527 (gimple_call_with_bounds_p): Likewise.
18528 (gimple_call_set_with_bounds): Likewise.
18529 * gimplify.c (gimplify_init_constructor): Likewise.
18530 * ipa-cp.c (initialize_node_lattices): Likewise.
18531 (propagate_constants_across_call): Likewise.
18532 (find_more_scalar_values_for_callers_subset): Likewise.
18533 * ipa-hsa.c (process_hsa_functions): Likewise.
18534 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
18535 * ipa-icf.c (sem_function::merge): Likewise.
18536 * ipa-inline.c (early_inliner): Likewise.
18537 * ipa-pure-const.c (warn_function_noreturn): Likewise.
18538 (warn_function_cold): Likewise.
18539 (propagate_pure_const): Likewise.
18540 * ipa-ref.h (enum GTY): Likewise.
18541 * ipa-split.c (find_retbnd): Likewise.
18542 (consider_split): Likewise.
18543 (split_function): Likewise.
18544 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
18545 * ipa.c (walk_polymorphic_call_targets): Likewise.
18546 (symbol_table::remove_unreachable_nodes): Likewise.
18547 (process_references): Likewise.
18548 (cgraph_build_static_cdtor_1): Likewise.
18549 * lto-cgraph.c (lto_output_node): Likewise.
18550 (output_refs): Likewise.
18551 (compute_ltrans_boundary): Likewise.
18552 (input_overwrite_node): Likewise.
18553 (input_node): Likewise.
18554 (input_cgraph_1): Likewise.
18555 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
18556 * passes.c (pass_manager::execute_early_local_passes): Likewise.
18557 (class pass_chkp_instrumentation_passes): Likewise.
18558 (make_pass_chkp_instrumentation_passes): Likewise.
18559 * passes.def: Likewise.
18560 * rtl.h (struct GTY): Likewise.
18561 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
18562 * stor-layout.c (layout_type): Likewise.
18563 * symtab.c: Likewise.
18564 * target.def: Likewise.
18565 * targhooks.c (default_chkp_bound_type): Likewise.
18566 (default_chkp_bound_mode): Likewise.
18567 (default_builtin_chkp_function): Likewise.
18568 (default_chkp_function_value_bounds): Likewise.
18569 (default_chkp_make_bounds_constant): Likewise.
18570 (default_chkp_initialize_bounds): Likewise.
18571 * targhooks.h (default_chkp_bound_type): Likewise.
18572 (default_chkp_bound_mode): Likewise.
18573 (default_builtin_chkp_function): Likewise.
18574 (default_chkp_function_value_bounds): Likewise.
18575 (default_chkp_make_bounds_constant): Likewise.
18576 (default_chkp_initialize_bounds): Likewise.
18577 * toplev.c (compile_file): Likewise.
18578 (process_options): Likewise.
18579 * tree-core.h (DEF_BUILTIN): Likewise.
18580 (DEF_BUILTIN_CHKP): Likewise.
18581 * tree-inline.c (declare_return_variable): Likewise.
18582 (remap_gimple_stmt): Likewise.
18583 (copy_bb): Likewise.
18584 (initialize_inlined_parameters): Likewise.
18585 (expand_call_inline): Likewise.
18586 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
18587 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
18588 (make_pass_ipa_chkp_produce_thunks): Likewise.
18589 (make_pass_chkp): Likewise.
18590 (make_pass_chkp_opt): Likewise.
18591 (make_pass_chkp_instrumentation_passes): Likewise.
18592 * tree-pretty-print.c (dump_generic_node): Likewise.
18593 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
18594 * tree-ssa-dce.c (propagate_necessity): Likewise.
18595 (eliminate_unnecessary_stmts): Likewise.
18596 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
18597 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
18598 * tree-ssa-sccvn.h: Likewise.
18599 * tree-ssa-strlen.c (get_string_length): Likewise.
18600 (valid_builtin_call): Likewise.
18601 (adjust_last_stmt): Likewise.
18602 (handle_builtin_strchr): Likewise.
18603 (handle_builtin_strcpy): Likewise.
18604 (handle_builtin_stxncpy): Likewise.
18605 (handle_builtin_memcpy): Likewise.
18606 (handle_builtin_strcat): Likewise.
18607 (strlen_check_and_optimize_stmt): Likewise.
18608 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
18609 * tree-streamer-in.c: Likewise.
18610 * tree-streamer.c (record_common_node): Likewise.
18611 * tree.c (tree_code_size): Likewise.
18612 (wide_int_to_tree_1): Likewise.
18613 (type_contains_placeholder_1): Likewise.
18614 (build_common_tree_nodes): Likewise.
18615 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
18616 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
18617 (POINTER_BOUNDS_P): Likewise.
18618 (BOUNDED_TYPE_P): Likewise.
18619 (BOUNDED_P): Likewise.
18620 (CALL_WITH_BOUNDS_P): Likewise.
18621 (pointer_bounds_type_node): Likewise.
18622 * value-prof.c (gimple_ic): Likewise.
18623 * var-tracking.c (vt_add_function_parameters): Likewise.
18624 * varasm.c (make_decl_rtl): Likewise.
18625 (assemble_start_function): Likewise.
18626 (output_constant): Likewise.
18627 (maybe_assemble_visibility): Likewise.
18628 * varpool.c (ctor_for_folding): Likewise.
18629 * chkp-builtins.def: Remove.
18630 * ipa-chkp.c: Remove.
18631 * ipa-chkp.h: Remove.
18632 * rtl-chkp.c: Remove.
18633 * rtl-chkp.h: Remove.
18634 * tree-chkp-opt.c: Remove.
18635 * tree-chkp.c: Remove.
18636 * tree-chkp.h: Remove.
18638 2018-06-07 Carl Love <cel@us.ibm.com>
18640 * config/rs6000/vsx.md (vextract_fp_from_shorth,
18641 vextract_fp_from_shortl): Add BE support.
18643 2018-06-07 Paul Koning <ni1d@arrl.net>
18645 * compare-elim.c (try_merge_compare): Don't merge compare if
18646 address contains a side effect.
18647 (try_eliminate_compare): Likewise.
18649 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
18651 * config.gcc: Support "tremont".
18652 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
18653 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18655 * config/i386/i386.c (m_TREMONT): Define.
18656 (processor_target_table): Add "tremont".
18657 (PTA_TREMONT): Define.
18658 (ix86_lea_outperforms): Add TARGET_TREMONT.
18659 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
18660 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
18661 and M_INTEL_GOLDMONT_PLUS.
18662 (fold_builtin_cpu): Add "tremont".
18663 (ix86_add_stmt_cost): Add TARGET_TREMONT.
18664 (ix86_option_override_internal): Add "tremont".
18665 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
18666 (processor_type): Add PROCESSOR_TREMONT.
18667 * config/i386/x86-tune.def: Add m_TREMONT.
18668 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
18670 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18672 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
18673 symbol defined for msp430i* devices to be lower case.
18675 2018-06-07 Richard Biener <rguenther@suse.de>
18677 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
18678 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
18679 Properly wrap signed arithmetic if overflow wraps.
18681 2018-06-07 Jakub Jelinek <jakub@redhat.com>
18683 PR tree-optimization/69615
18684 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
18685 of a cast from a same precision integral SSA_NAME in a bb dominated
18686 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
18687 cast to utype if rhs2 has already a compatible type.
18689 2018-06-07 Richard Biener <rguenther@suse.de>
18691 PR tree-optimization/85935
18692 * graphite-scop-detection.c (find_params_in_bb): Analyze
18693 condition operands with respect to the correct loop. Assert
18694 the analysis doesn't fail.
18696 2018-06-04 Carl Love <cel@us.ibm.com>
18698 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
18699 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
18700 as it is slightly cheaper.
18701 (first_match_or_eos_index_<mode>):
18702 Calculate index using natural element order.
18703 (first_match_index_<mode>):
18704 Calculate index using natural element order.
18705 (first_match_or_eos_index_<mode>):
18706 Calculate index using natural order.
18707 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
18708 for BE and LE modes.
18709 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
18710 P9V_BUILTIN_VCLZLSBB_V16QI.
18711 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
18714 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
18716 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
18717 indentation and line wrap for many prototypes. Add missing
18718 @smallexample directives around block of prototypes for vec_xl and
18721 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
18723 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
18724 track if we pass or return IEEE 128-bit floating point.
18725 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
18726 C++ mangling that is compatible with GCC 8.1.
18727 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
18728 (init_cumulative_args): Note if we pass or return IEEE 128-bit
18729 floating point types.
18730 (rs6000_function_arg_advance_1): Likewise.
18731 (rs6000_mangle_type): Optionally generate mangled names that match
18732 what GCC 8.1 generated for IEEE 128-bit floating point types.
18733 (rs6000_globalize_decl_name): If we have an external function that
18734 passes or returns IEEE 128-bit types, generate a weak reference
18735 from the mangled name used in GCC 8.1 to the current mangled
18737 (rs6000_init_builtins): Make __ibm128 use the long double type if
18738 long double is IBM extended double. Make __float128 use the long
18739 double type if long double is IEEE 128-bit.
18742 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
18743 macro for __ibm128 built-in functions.
18744 (PACK_IF): Add __ibm128 pack/unpack functions.
18745 (UNPACK_IF): Likewise.
18746 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
18747 enable long double built-in functions if long double is IEEE
18748 128-bit floating point.
18749 (rs6000_invalid_builtin): Update long double built-in function
18751 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
18752 functions, adjust the built-in function to use the long double
18753 built-in function if __ibm128 and long double are the same type.
18754 * doc/extend.texi (PowerPC builtins): Update documention for
18755 __builtin_{,un}pack_longdouble. Add documentation for
18756 __builtin_{,un}pack_ibm128.
18758 2018-06-06 Jim Wilson <jimw@sifive.com>
18760 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
18761 (struct machine_function): New field interrupt_mode.
18762 (riscv_handle_type_attribute): New function. Add forward declaration.
18763 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
18764 (riscv_expand_epilogue): Check interrupt_mode field.
18765 (riscv_set_current_function): Check interrupt attribute args and
18766 set interrupt_mode field.
18767 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
18768 (riscv_sret, riscv_uret): New.
18769 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
18770 new arguments to interrupt attribute.
18772 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
18775 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
18776 Don't handle -mcpu=power8 if -mpower9-vector is also used.
18778 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
18780 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
18781 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
18782 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18783 several redundant entries.
18785 2018-06-06 David Malcolm <dmalcolm@redhat.com>
18787 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
18788 type from "rtx" to "rtx_insn *".
18789 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
18790 for local "call_insn", removing cast.
18791 (ix86_expand_call): Likewise, introducing a "call_insn" local.
18793 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
18795 PR tree-optimization/86066
18796 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
18797 for BIT_INSERT_EXPR stores.
18799 2018-06-06 Richard Biener <rguenther@suse.de>
18801 PR tree-optimization/86062
18802 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18803 component refs ontop
18804 of to be offsetted base.
18806 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18808 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
18809 to be static and remove check on interrupt attribute name.
18811 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
18813 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18814 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
18816 2018-06-05 Steve Ellcey <sellcey@cavium.com>
18819 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
18821 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
18822 Remove second argument, change how error is called.
18823 (aarch64_layout_arg): Remove second argument from
18824 aarch64_err_no_fpadvsimd call.
18825 (aarch64_init_cumulative_args): Ditto.
18826 (aarch64_gimplify_va_arg_expr): Ditto.
18827 * config/aarch64/aarch64.md (mov<mode>): Ditto.
18829 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
18831 * config/i386/i386.md (simple_return_indirect_internal): New expander.
18832 (*simple_return_indirect_internal<mode>): Rename from
18833 simple_return_indirect_internal. Use W mode iterator.
18834 (rstorssp): New expander.
18835 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
18836 (clrssbsy): New expander.
18837 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
18839 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
18841 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
18843 (cmse_check_pointed_object): Likewise.
18845 2018-06-05 Martin Liska <mliska@suse.cz>
18847 PR gcov-profile/47618
18848 * doc/invoke.texi: Document how -fprofile-dir format
18851 2018-06-05 Richard Biener <rguenther@suse.de>
18853 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
18854 removal pretend DOM info isn't available so we do not update
18855 it and only remove edges, not dominated blocks. Actually free
18856 DOM info in case we removed something. Remove unreachable blocks.
18857 (mfb_keep_latches): Work with either DOM info or marked backedges.
18858 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
18859 first. Mark backedges if DOM info isn't available.
18860 (Re-)compute DOM info after cleanup_control_flow_pre.
18862 2018-06-05 Richard Biener <rguenther@suse.de>
18864 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
18865 (locus_discrim_hasher::hash): Adjust.
18866 (locus_discrim_hasher::equal): Likewise.
18867 (next_discriminator_for_locus): Work on line directly.
18868 (same_line_p): Pass in expanded locus1 as well.
18869 (assign_discriminators): Avoid redundant location expansions.
18871 2018-06-05 Richard Biener <rguenther@suse.de>
18873 PR tree-optimization/86046
18874 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
18875 if required after clearing TREE_ADDRESSABLE.
18877 2018-06-05 Richard Biener <rguenther@suse.de>
18879 PR tree-optimization/86047
18880 * tree-ssa-loop.c (for_each_index): Glob handling of all
18881 decls and constants and really handle all of them.
18883 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18886 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
18887 qualifier_void_pointer and qualifier_const_void_pointer.
18888 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
18889 (arm_init_builtins): Handle the above.
18890 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
18891 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
18892 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
18895 2018-06-05 Martin Liska <mliska@suse.cz>
18897 * auto-profile.c (read_autofdo_file): Do not use
18898 gcov_ctr_summary struct.
18899 (afdo_callsite_hot_enough_for_early_inline): Likewise.
18900 * coverage.c (struct counts_entry): Likewise.
18901 (read_counts_file): Read just single summary entry.
18902 (get_coverage_counts): Use gcov_summary struct.
18903 * coverage.h (get_coverage_counts): Likewise.
18904 * gcov-dump.c (dump_working_sets): Likewise.
18905 (tag_summary): Dump just single summary.
18906 * gcov-io.c (gcov_write_summary): Write just histogram
18908 (gcov_read_summary): Read just single summary.
18909 (compute_working_sets): Use gcov_summary struct.
18910 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18911 of GCOV_COUNTERS_SUMMABLE.
18912 (GCOV_COUNTERS_SUMMABLE): Remove.
18913 (GCOV_FIRST_VALUE_COUNTER): Replace with
18914 GCOV_COUNTER_V_INTERVAL.
18915 (struct gcov_ctr_summary): Remove.
18916 (struct gcov_summary): Directly use fields of former
18918 (compute_working_sets): Use gcov_summary struct.
18919 * gcov.c (read_count_file): Do not use ctrs fields.
18920 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18922 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18924 * profile.c: Likewise.
18925 * profile.h: Likewise.
18927 2018-06-05 Martin Liska <mliska@suse.cz>
18929 PR gcov-profile/84846
18930 * gcov.c (output_lines): Print working directory only
18931 in intermediate format.
18933 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
18935 * config/s390/s390-builtin-types.def: Add void function type.
18936 * config/s390/s390-builtins.def: Use the function type for the
18939 2018-06-04 Jim Wilson <jimw@sifive.com>
18941 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18943 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18944 and maybe_eh_return. Change regno to unsigned int. Use new args to
18945 handle EH_RETURN_DATA_REGNO registers properly.
18946 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18947 (riscv_expand_epilogue): Update comment. Change argument name and
18948 type. Update code to use new name and type. Pass new args to
18949 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
18951 * config/riscv/riscv.md (NORMAL_RETURN): New.
18952 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18953 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18954 (eh_return): Call gen_eh_return_internal and emit barrier.
18955 (eh_return_internal): Call riscv_expand_epilogue.
18957 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
18959 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18960 bit_insertion field and declare can_be_merged_into method.
18961 (merged_store_group::can_be_merged_into): New method.
18962 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18963 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
18964 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18966 2018-06-04 Richard Biener <rguenther@suse.de>
18968 PR tree-optimization/85955
18969 * builtins.c (fold_builtin_sincos): Convert pointers to
18970 destination to appropriate type before dereferencing.
18972 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
18974 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18976 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
18978 * expr.c (expand_expr_real_1): Force the operand into memory if
18979 its TYPE_MODE is BLKmode and if there is no integer mode for
18980 the number of bits being extracted.
18982 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18986 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18987 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18989 2018-06-04 Richard Biener <rguenther@suse.de>
18991 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
18992 (cleanup_tree_cfg_noloop): ... single caller. Do
18993 start_recording_case_labels later.
18995 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
18997 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
18998 to _IMMINTRIN_H_INCLUDED.
18999 * config/i386/pconfigintrin.h: Ditto.
19000 * config/i386/waitpkgintrin.h: Ditto.
19001 * config/i386/immintrin.h: Add includes for sgxintrin.h,
19002 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
19003 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
19004 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
19005 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
19006 waitpkgintrin.h and cldemoteintrin.h.
19008 2018-06-04 Richard Biener <rguenther@suse.de>
19010 PR tree-optimization/86038
19011 * tracer.c (find_best_successor): Check probability for
19012 being initialized, bail out if not.
19014 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
19017 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
19018 of bits to ignore when comparing architectures.
19020 2018-06-04 Jakub Jelinek <jakub@redhat.com>
19022 PR tree-optimization/69615
19023 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
19024 maximum or minimum of the type, try to merge it also as if
19025 range1 is + [-, x - 1] or + [x + 1, -].
19028 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
19030 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
19032 PR tree-optimization/86034
19033 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
19034 the unsigned bitfield type in a bit insertion sequence if it does not
19035 have a larger precision than the bitfield size.
19036 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
19038 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
19040 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
19042 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
19044 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
19045 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
19046 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
19047 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
19049 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
19051 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
19052 Disable -fdelete-null-pointer-checks for ELF toolchain.
19054 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
19055 Kito Cheng <kito.cheng@gmail.com>
19057 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
19058 (nds32le-*-*, nds32be-*-*): Integrate checking process.
19059 (nds32*-*-*): Add glibc and uclibc conditions.
19060 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
19061 (TARGET_EXCEPT_UNWIND_INFO): Define.
19062 * config/nds32/elf.h: New file.
19063 * config/nds32/linux.h: New file.
19064 * config/nds32/nds32-elf.opt: New file.
19065 * config/nds32/nds32-linux.opt: New file.
19066 * config/nds32/nds32-fp-as-gp.c
19067 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
19068 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
19070 (nds32_asm_file_end): Ditto.
19071 (nds32_print_operand): Ditto.
19072 (nds32_insert_attributes): Ditto.
19073 (nds32_init_libfuncs): New function.
19074 (TARGET_HAVE_TLS): Define.
19075 (TARGET_INIT_LIBFUNCS): Define.
19076 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
19078 (TARGET_ELF): Apply different mcmodel setting.
19079 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
19080 been migrated into elf.h and linux.h files.
19081 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
19082 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
19083 (mcmodel): The content has been migrated into nds32-elf.opt and
19084 nds32-linux.opt files.
19085 * config/nds32/t-elf: New file.
19086 * config/nds32/t-linux: New file.
19088 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
19089 Shiva Chen <shiva0217@gmail.com>
19091 * config/nds32/constants.md (unspec_volatile_element): Add
19092 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
19093 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
19095 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
19096 (make_pass_nds32_fp_as_gp): Declare.
19097 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
19099 (nds32_asm_function_end_prologue): Remove unused asm output.
19100 (nds32_asm_function_begin_epilogue): Remove unused asm output.
19101 (nds32_asm_file_start): Output necessary fp_as_gp information.
19102 (nds32_option_override): Adjust register usage.
19103 (nds32_expand_prologue): Consider fp_as_gp situation.
19104 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
19105 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
19108 (simple_return): Ditto.
19109 (omit_fp_begin): Output special directive for fp_as_gp.
19110 (omit_fp_end): Output special directive for fp_as_gp.
19111 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
19112 mforbid-fp-as-gp): New options.
19114 2018-06-01 Mark Wielaard <mark@klomp.org>
19116 * dwarf2out.c (dwarf2out_finish): Remove generation of
19117 DW_AT_loclists_base.
19119 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
19121 * gimple-ssa-store-merging.c: Include gimple-fold.h.
19122 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
19123 (struct merged_store_group): Add bit_insertion field.
19124 (dump_char_array): Use standard hexadecimal format.
19125 (merged_store_group::merged_store_group): Set bit_insertion to false.
19126 (merged_store_group::apply_stores): Use optimal buffer size. Deal
19127 with BIT_INSERT_EXPR stores. Move up code updating the mask and
19128 also print the mask in the dump file.
19129 (pass_store_merging::gate): Minor tweak.
19130 (imm_store_chain_info::coalesce_immediate): Fix wrong association
19131 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
19132 stores with INTEGER_CST stores.
19133 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
19134 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
19135 and use it throughout. Generate bit insertion sequences if need be.
19136 (pass_store_merging::process_store): Remove redundant condition.
19137 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
19139 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
19141 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
19142 the 128-bit floating point types. Fix function comment.
19144 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19146 * config/aarch64/aarch64-simd.md
19147 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
19149 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
19152 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
19154 PR tree-optimization/85989
19155 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
19157 (backprop::intersect_uses): Check it when deciding whether this
19158 is a backedge reference.
19159 (backprop::process_block): Add each phi to m_visited_phis
19160 after visiting it, then clear it at the end.
19162 2018-06-01 Richard Biener <rguenther@suse.de>
19164 * tree-vectorizer.h (vect_dr_stmt): New function.
19165 (vect_get_load_cost): Adjust.
19166 (vect_get_store_cost): Likewise.
19167 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
19168 Use vect_dr_stmt instead of DR_SMTT.
19169 (vect_record_base_alignments): Likewise.
19170 (vect_calculate_target_alignment): Likewise.
19171 (vect_compute_data_ref_alignment): Likewise and make static.
19172 (vect_update_misalignment_for_peel): Likewise.
19173 (vect_verify_datarefs_alignment): Likewise.
19174 (vector_alignment_reachable_p): Likewise.
19175 (vect_get_data_access_cost): Likewise. Pass down
19176 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
19177 (vect_get_peeling_costs_all_drs): Likewise.
19178 (vect_peeling_hash_get_lowest_cost): Likewise.
19179 (vect_enhance_data_refs_alignment): Likewise.
19180 (vect_find_same_alignment_drs): Likewise.
19181 (vect_analyze_data_refs_alignment): Likewise.
19182 (vect_analyze_group_access_1): Likewise.
19183 (vect_analyze_group_access): Likewise.
19184 (vect_analyze_data_ref_access): Likewise.
19185 (vect_analyze_data_ref_accesses): Likewise.
19186 (vect_vfa_segment_size): Likewise.
19187 (vect_small_gap_p): Likewise.
19188 (vectorizable_with_step_bound_p): Likewise.
19189 (vect_prune_runtime_alias_test_list): Likewise.
19190 (vect_analyze_data_refs): Likewise.
19191 (vect_supportable_dr_alignment): Likewise.
19192 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
19193 (vect_gen_prolog_loop_niters): Likewise.
19194 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
19195 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
19197 (vect_recog_mask_conversion_pattern): Likewise.
19198 (vect_try_gather_scatter_pattern): Likewise.
19199 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
19200 to vect_get_store_cost.
19201 (vect_get_store_cost): Get stmt_info instead of DR.
19202 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
19203 (vect_get_load_cost): Get stmt_info instead of DR.
19205 2018-06-01 Richard Biener <rguenther@suse.de>
19207 PR middle-end/86017
19208 * gimple-fold.c (var_decl_component_p): Also allow offsetted
19209 vars wrapped in MEM_REFs.
19211 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
19213 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19214 Fix subreg tests so that we only return a choice between
19215 GENERAL_REGS and FP_REGS if the original classes included both.
19217 2018-06-01 Richard Biener <rguenther@suse.de>
19220 * tree-ssa-structalias.c (get_function_part_constraint):
19221 Handle NULL fi->decl.
19222 (find_func_aliases_for_call): Properly handle indirect
19223 fi from direct call.
19224 (find_func_clobbers): Likewise.
19225 (ipa_pta_execute): Likewise.
19226 (create_variable_info_for): For functions that are ifunc_resolver
19227 resolve to a varinfo that contains the result of the resolver call.
19228 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
19231 2018-05-31 Michael Collison <michael.collison@arm.com>
19233 * config/aarch64/aarch64.md:
19234 (*fix_to_zero_extenddfdi2): New pattern.
19235 * gcc.target/aarch64/fix_extend1.c: New testcase.
19237 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
19239 PR middle-end/78809
19240 PR middle-end/83026
19241 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
19242 and BUILT_IN_STRNCMP_EQ.
19243 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
19244 BUILT_IN_STRNCMP_EQ.
19245 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
19246 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19247 (gimple_fold_builtin): Likewise.
19248 * tree-ssa-strlen.c (compute_string_length): New function.
19249 (determine_min_obsize): New function.
19250 (handle_builtin_string_cmp): New function to handle calls to
19251 string compare functions.
19252 (strlen_optimize_stmt): Add handling to builtin string compare
19254 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
19255 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
19256 * tree.c (build_common_builtin_nodes): Add new defines of
19257 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
19259 2018-05-31 Jakub Jelinek <jakub@redhat.com>
19262 * bb-reorder.c (pass_partition_blocks::gate): Return false for
19263 functions with naked attribute.
19265 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
19267 * config/i386/sse.md (avx_vec_concat<mode>):
19268 Substitute concat_tg_mode mode attribute with xtg_mode.
19269 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
19270 (concat_tg_mode): Remove mode attribute.
19272 2018-05-31 Martin Sebor <msebor@redhat.com>
19275 * calls.c (alloc_max_size): Correct a logic error/typo.
19276 Treat excessive arguments as infinite. Warn for invalid arguments.
19277 * doc/invoke.texi (-Walloc-size-larger-than): Update.
19279 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
19282 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
19283 and movx for Haswell.
19285 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
19286 Cesar Philippidis <cesar@codesourcery.com>
19288 PR middle-end/85879
19289 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
19290 when emitting error on private/firstprivate reductions.
19291 * omp-low.c (lower_omp_target): Avoid reference-type processing
19292 on pointers for firstprivate clause.
19294 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19296 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
19299 * config/aarch64/aarch64-simd.md
19300 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
19301 (aarch64_ld1_x3_<mode>): Likewise
19302 (aarch64_st1x2<VALLDIF:mode>): Likewise
19303 (aarch64_st1_x2_<mode>): Likewise
19304 (aarch64_st1x3<VALLDIF:mode>): Likewise
19305 (aarch64_st1_x3_<mode>): Likewise
19306 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
19307 (vld1_s8_x3): Likewise.
19308 (vld1_u16_x3): Likewise.
19309 (vld1_s16_x3): Likewise.
19310 (vld1_u32_x3): Likewise.
19311 (vld1_s32_x3): Likewise.
19312 (vld1_u64_x3): Likewise.
19313 (vld1_s64_x3): Likewise.
19314 (vld1_f16_x3): Likewise.
19315 (vld1_f32_x3): Likewise.
19316 (vld1_f64_x3): Likewise.
19317 (vld1_p8_x3): Likewise.
19318 (vld1_p16_x3): Likewise.
19319 (vld1_p64_x3): Likewise.
19320 (vld1q_u8_x3): Likewise.
19321 (vld1q_s8_x3): Likewise.
19322 (vld1q_u16_x3): Likewise.
19323 (vld1q_s16_x3): Likewise.
19324 (vld1q_u32_x3): Likewise.
19325 (vld1q_s32_x3): Likewise.
19326 (vld1q_u64_x3): Likewise.
19327 (vld1q_s64_x3): Likewise.
19328 (vld1q_f16_x3): Likewise.
19329 (vld1q_f32_x3): Likewise.
19330 (vld1q_f64_x3): Likewise.
19331 (vld1q_p8_x3): Likewise.
19332 (vld1q_p16_x3): Likewise.
19333 (vld1q_p64_x3): Likewise.
19334 (vst1_s64_x2): Likewise.
19335 (vst1_u64_x2): Likewise.
19336 (vst1_f64_x2): Likewise.
19337 (vst1_s8_x2): Likewise.
19338 (vst1_p8_x2): Likewise.
19339 (vst1_s16_x2): Likewise.
19340 (vst1_p16_x2): Likewise.
19341 (vst1_s32_x2): Likewise.
19342 (vst1_u8_x2): Likewise.
19343 (vst1_u16_x2): Likewise.
19344 (vst1_u32_x2): Likewise.
19345 (vst1_f16_x2): Likewise.
19346 (vst1_f32_x2): Likewise.
19347 (vst1_p64_x2): Likewise.
19348 (vst1q_s8_x2): Likewise.
19349 (vst1q_p8_x2): Likewise.
19350 (vst1q_s16_x2): Likewise.
19351 (vst1q_p16_x2): Likewise.
19352 (vst1q_s32_x2): Likewise.
19353 (vst1q_s64_x2): Likewise.
19354 (vst1q_u8_x2): Likewise.
19355 (vst1q_u16_x2): Likewise.
19356 (vst1q_u32_x2): Likewise.
19357 (vst1q_u64_x2): Likewise.
19358 (vst1q_f16_x2): Likewise.
19359 (vst1q_f32_x2): Likewise.
19360 (vst1q_f64_x2): Likewise.
19361 (vst1q_p64_x2): Likewise.
19362 (vst1_s64_x3): Likewise.
19363 (vst1_u64_x3): Likewise.
19364 (vst1_f64_x3): Likewise.
19365 (vst1_s8_x3): Likewise.
19366 (vst1_p8_x3): Likewise.
19367 (vst1_s16_x3): Likewise.
19368 (vst1_p16_x3): Likewise.
19369 (vst1_s32_x3): Likewise.
19370 (vst1_u8_x3): Likewise.
19371 (vst1_u16_x3): Likewise.
19372 (vst1_u32_x3): Likewise.
19373 (vst1_f16_x3): Likewise.
19374 (vst1_f32_x3): Likewise.
19375 (vst1_p64_x3): Likewise.
19376 (vst1q_s8_x3): Likewise.
19377 (vst1q_p8_x3): Likewise.
19378 (vst1q_s16_x3): Likewise.
19379 (vst1q_p16_x3): Likewise.
19380 (vst1q_s32_x3): Likewise.
19381 (vst1q_s64_x3): Likewise.
19382 (vst1q_u8_x3): Likewise.
19383 (vst1q_u16_x3): Likewise.
19384 (vst1q_u32_x3): Likewise.
19385 (vst1q_u64_x3): Likewise.
19386 (vst1q_f16_x3): Likewise.
19387 (vst1q_f32_x3): Likewise.
19388 (vst1q_f64_x3): Likewise.
19389 (vst1q_p64_x3): Likewise.
19391 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19393 * config/msp430/msp430.c (msp430_output_labelref): Prepend
19394 user_label_prefix to name.
19396 * tree-core.h: Update comment about the format of NAME string
19397 passed to handler in attribute_spec.
19399 * config/msp430/msp430.md: Remove erroneous subreg expression from
19400 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
19401 zero_extend{q,h}isi2.
19403 2018-05-30 Borislav Petkov <bp@suse.de>
19405 * doc/extend.texi: Document some architecture specific
19406 constraints and sort entries.
19408 2018-05-30 Martin Sebor <msebor@redhat.com>
19410 PR middle-end/85369
19411 * builtins.c (expand_builtin_stpcpy_1): New function.
19412 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
19413 only if the former succeeds.
19415 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19417 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
19420 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19422 * doc/invoke.texi (-flinker-output): Document
19424 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19426 * passes.c (ipa_write_summaries): Only modify statements if body
19428 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
19429 incrementally linking.
19430 (ipa_passes): Likewise.
19431 * lto-cgraph.c (lto_output_node): When incrementally linking do not
19432 pass down resolution info.
19433 * common.opt (flag_incremental_link): Update info.
19434 * gcc.c (plugin specs): Turn flinker-output=* to
19435 -plugin-opt=-linker-output-known
19436 * toplev.c (compile_file): Also cut compilation when doing incremental
19438 * flag-types. (enum lto_partition_model): Add
19439 LTO_LINKER_OUTPUT_NOLTOREL.
19440 (invoke.texi): Add -flinker-output docs.
19441 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
19442 link same way as WPA; do not stream in dead initializers.
19444 * dwarf2out.c (dwarf2out_die_ref_for_decl,
19445 darf2out_register_external_decl): Support incremental link.
19447 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19449 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
19451 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19453 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
19454 it down to simple_object_copy_lto_debug_sections.
19455 (run_gcc): Determine incremental LTO link time and configure
19456 lto1 into non-wpa mode, disable renaming of debug sections.
19458 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
19460 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19461 descriptions of various incorrectly documented functions.
19463 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
19466 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19467 address check not strict.
19469 2018-05-30 Richard Biener <rguenther@suse.de>
19471 PR tree-optimization/85964
19472 * tracer.c (better_p): Drop initialized count check, we only
19473 call the function with initialized counts now.
19474 (find_best_successor): Do find a best edge if one
19475 has uninitialized count.
19476 (find_best_predecessor): Likewise. Do BB frequency check only
19477 if count is initialized.
19479 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
19481 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
19482 (aarch64_ldrstr_offset_compare): New.
19483 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
19484 load/store orderings.
19485 (aarch64_gen_adjusted_ldpstp): Likewise.
19487 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
19489 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19490 Check for subset of GENERAL_REGS and FP_REGS.
19491 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
19494 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
19496 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
19497 and wi::to_poly_offset. Add the current offset and then check
19498 whether the sum fits, rather than using an unchecked addition of
19499 a checked term. Check for a shwi rather than a uhwi.
19500 * expr.c (get_bit_range): Use tree_to_poly_uint64.
19501 (store_constructor): Use poly_int_tree_p.
19502 (expand_expr_real_1): Likewise.
19503 * function.c (assign_temp): Likewise.
19504 * fold-const.c (const_binop): Use poly_int_tree_p and
19505 wi::to_poly_offset.
19506 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
19508 * ipa-icf-gimple.c (func_checker::compare_operand): Use
19509 to_poly_offset for MEM offsets.
19510 * ipa-icf.c (sem_variable::equals): Likewise.
19511 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
19512 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
19513 wi::to_poly_offset for BIT_FIELD_REF offsets.
19514 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
19515 wi::to_poly_offset.
19516 * var-tracking.c (emit_note_insn_var_location): Use
19517 tree_to_poly_uint64.
19519 2018-05-29 Jim Wilson <jimw@sifive.com>
19521 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
19523 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
19526 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
19527 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
19529 (sse4_1_round<mode>2): Use nonimmediate_operand
19530 for operand 1 predicate.
19532 2018-05-29 Martin Sebor <msebor@redhat.com>
19533 Richard Biener <rguenther@suse.de>
19536 * calls.c (get_size_range): Call determine_value_range instead
19537 of get_value_range..
19538 * tree-vrp.h (determine_value_range): Declared new function.
19539 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
19541 2018-05-29 Richard Biener <rguenther@suse.de>
19543 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
19544 sure to use non-pattern stmts for get_earlier_stmt arguments.
19545 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
19546 called on pattern stmts.
19547 (get_later_stmt): Likewise.
19549 2018-05-29 Martin Liska <mliska@suse.cz>
19551 PR gcov-profile/85759
19552 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
19555 2018-05-29 Jakub Jelinek <jakub@redhat.com>
19557 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
19559 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
19563 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19564 VEC_PACK_FLOAT_EXPR): New tree codes.
19565 * tree-pretty-print.c (op_code_prio): Handle
19566 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19567 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19568 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19569 * tree-inline.c (estimate_operator_cost): Likewise.
19570 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
19571 * fold-const.c (const_binop): Likewise.
19572 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
19573 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19574 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19575 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
19576 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19577 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19578 * expr.c (expand_expr_real_2): Likewise.
19579 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
19580 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
19581 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
19583 * optabs.c (expand_widen_pattern_expr): For
19584 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
19585 sign from result type rather than operand's type.
19586 (expand_binop_directly): For vec_packu_float_optab and
19587 vec_packs_float_optab allow result type to be different from operand's
19589 * optabs-tree.c (optab_for_tree_code): Handle
19590 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19591 VEC_PACK_FLOAT_EXPR. Formatting fixes.
19592 * tree-vect-generic.c (expand_vector_operations_1): Handle
19593 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19594 VEC_PACK_FLOAT_EXPR.
19595 * tree-vect-stmts.c (supportable_widening_operation): Handle
19597 (supportable_narrowing_operation): Handle FLOAT_EXPR.
19598 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
19599 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
19600 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
19601 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
19603 (vec_pack<floatprefix>_float_<mode>): New expander.
19604 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
19606 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
19607 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
19608 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
19609 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
19610 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
19612 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
19613 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
19614 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19615 VEC_PACK_FLOAT_EXPR): Document.
19617 2018-05-29 Richard Biener <rguenther@suse.de>
19619 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
19621 (stmt_vec_info_vec): Make pointer.
19622 (init_stmt_vec_info_vec): Remove.
19623 (free_stmt_vec_info_vec): Likewise.
19624 (set_stmt_vec_info_vec): New function.
19625 (free_stmt_vec_infos): Likewise.
19626 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
19627 (set_vinfo_for_stmt): Likewise.
19628 (get_earlier_stmt): Likewise.
19629 (get_later_stmt): Likewise.
19630 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
19631 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
19632 (vec_info::~vec_info): Free stmt_vec_infos.
19633 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
19634 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
19635 (pass_slp_vectorize::execute): Likewise.
19636 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
19637 (free_stmt_vec_info_vec): Likewise.
19638 (set_stmt_vec_info_vec): New function.
19639 (free_stmt_vec_infos): Likewise.
19640 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
19641 the global stmt_vec_info_vec.
19642 * tree-parloops.c (gather_scalar_reductions): Use
19643 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
19646 2018-05-29 Richard Biener <rguenther@suse.de>
19648 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
19650 2018-05-29 Martin Liska <mliska@suse.cz>
19651 David Malcolm <dmalcolm@redhat.com>
19653 * vec.c (test_reverse): New.
19654 (vec_c_tests): Add new test.
19655 * vec.h (vl_ptr>::reverse): New function.
19657 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
19659 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
19661 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
19664 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
19666 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
19668 2018-05-28 Richard Biener <rguenther@suse.de>
19670 PR tree-optimization/85933
19671 * tree-vect-data-refs.c (vect_record_base_alignments): Only
19672 look at stmts marked as vectorizable.
19674 2018-05-28 Richard Biener <rguenther@suse.de>
19676 PR tree-optimization/85934
19677 * tree-vect-generic.c (expand_vector_operations_1): Hoist
19678 vector boolean check before scalar optimization.
19680 2018-05-28 Jakub Jelinek <jakub@redhat.com>
19682 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
19685 2018-05-28 Mark Wielaard <mark@klomp.org>
19687 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
19688 if it is an expression containing a minus sign.
19690 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
19692 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
19694 2018-05-27 Paul Koning <ni1d@arrl.net>
19696 * config/pdp11/pdp11.md (truncsihi2): Remove.
19698 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
19699 Chung-Ju Wu <jasonwucj@gmail.com>
19701 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
19703 (unaligned_store_dw): Ditto.
19704 * config/nds32/nds32-memory-manipulation.c
19705 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
19706 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
19707 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
19708 (emit_setmem_word_loop): Rename to ...
19709 (emit_setmem_doubleword_loop): ... this.
19710 (nds32_gen_dup_4_byte_to_word_value): New function.
19711 (nds32_gen_dup_8_byte_to_double_word_value): New function.
19712 (nds32_expand_setmem_loop): Refine implementation.
19713 (nds32_expand_setmem_loop_v3m): Ditto.
19714 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
19717 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
19719 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
19721 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
19723 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
19724 (nds32_init_machine_status): Initialize machine->attr_naked_p and
19725 machine->attr_no_prologue_p.
19726 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
19727 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
19728 (nds32_expand_epilogue): Consider attr_naked_p.
19729 (nds32_expand_epilogue_v3pop): Likewise.
19730 (nds32_can_use_return_insn): Likewise.
19731 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
19732 attr_no_prologue_p fields.
19733 * config/nds32/nds32.opt (mret-in-naked-func): New option.
19735 2018-05-27 Jakub Jelinek <jakub@redhat.com>
19738 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19740 * config/i386/sse.md
19741 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
19743 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
19745 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
19747 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
19749 (*<floatsuffix>floatv2div2sf2): Rename to ...
19750 (*float<floatunssuffix>v2div2sf2): ... this.
19751 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
19752 (float<floatunssuffix>v2div2sf2_mask): ... this.
19753 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
19754 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
19755 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
19757 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
19759 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19761 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19763 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19765 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19767 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
19768 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
19769 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
19770 gen_ufix_truncv8dfv8si2.
19771 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
19772 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
19773 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
19774 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
19775 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
19776 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
19777 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
19778 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
19780 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
19784 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
19786 2018-05-25 Jim Wilson <jimw@sifive.com>
19788 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
19789 * config/riscv/riscv.c (struct machine_function): Add
19790 interrupt_handler_p and attribute_checked_p fields.
19791 (riscv_attribute_table): Add interrupt.
19792 (riscv_interrupt_type_p): New.
19793 (riscv_save_reg_p): Save extra regs for interrupt handler.
19794 (riscv_use_save_libcall): Return false for interrupt handler.
19795 (riscv_first_stack_step): Add forward declaration.
19796 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
19797 for interrupt handler with large frame. Use it for saved reg list.
19798 (riscv_expand_prologue): Move flag_stack_usage_info support to
19799 eliminate duplication.
19800 (riscv_expand_epilogue): Generate mret for interrupt handler.
19801 (riscv_epilogue_uses): New.
19802 (riscv_can_use_return_insn): Return false for interrupt handler.
19803 (riscv_function_ok_for_sibcall): Likewise.
19804 (riscv_set_current_function): Add interrupt handler support.
19805 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
19806 * config/riscv/riscv.md (UNSPECV_MRET): New.
19808 (riscv_frflags, riscv_fsflags): Use tab after opcode.
19810 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
19812 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
19814 PR tree-optimization/85712
19815 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
19816 this candidate has already been replaced in-situ by a copy.
19818 2018-05-25 Jason Merrill <jason@redhat.com>
19820 PR c++/80485 - inline function non-zero address.
19821 * symtab.c (nonzero_address): Check DECL_COMDAT.
19823 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
19826 * config/alpha/alpha.md (ashlsi3): New insn pattern.
19827 (*ashlsi_se): Rename from *ashldi_se. Define as sign
19828 extension of SImode operation. Use const123_operand predicate.
19829 (*saddsi_1): Remove.
19830 (*saddl_se_1): Ditto.
19831 (*ssubsi_1): Ditto.
19832 (*ssubl_se_1): Ditto.
19833 * config/alpha/predicates.md (const123_operand): New predicate.
19834 * config/alpha/constraints.md (P): Use IN_RANGE.
19836 2018-05-25 Richard Biener <rguenther@suse.de>
19838 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
19840 (ref_maybe_used_by_stmt_p): Likewise.
19841 (stmt_may_clobber_ref_p): Likewise.
19842 (stmt_may_clobber_ref_p_1): Likewise.
19843 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
19845 (ref_maybe_used_by_stmt_p): Likewise.
19846 (stmt_may_clobber_ref_p): Likewise.
19847 (stmt_may_clobber_ref_p_1): Likewise.
19848 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
19849 the alias oracle to disambiguate DRs with stmts DR analysis
19851 (vect_analyze_data_refs): Do not give up on not analyzable
19852 DRs for BB vectorization. Remove code truncating the dataref
19855 2018-05-25 Jakub Jelinek <jakub@redhat.com>
19858 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19859 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
19860 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
19862 2018-05-25 Richard Biener <rguenther@suse.de>
19864 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
19865 function, combining stmt data ref gathering and fatal analysis
19867 (vect_analyze_data_refs): Remove now redudnant code and simplify.
19868 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
19869 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
19870 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
19871 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
19873 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19875 PR tree-optimization/85720
19876 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
19877 SCC if all partitions are builtins.
19878 (version_loop_by_alias_check): New parameter. Generate cancelable
19879 runtime alias check if all partitions are builtins.
19880 (distribute_loop): Update call to above function.
19882 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19884 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
19885 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
19886 (parm_default_def_partition_arg): Ditto.
19887 (set_parm_default_def_partition): Ditto.
19888 (get_parm_default_def_partitions): Ditto and make it static.
19889 (get_undefined_value_partitions): Ditto and make it static.
19890 (remove_ssa_form): Refactor call to init_var_map here.
19891 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
19892 computation for loop region.
19893 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
19894 (register_default_def): Delete.
19895 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
19896 (parm_default_def_partition_arg): Ditto.
19897 (set_parm_default_def_partition): Ditto.
19898 (get_parm_default_def_partitions): Ditto and make it static.
19899 (get_undefined_value_partitions): Ditto and make it static.
19900 (coalesce_with_default, coalesce_with_default): Update comment.
19901 (create_coalesce_list_for_region): New func factored out from
19902 create_outofssa_var_map.
19903 (populate_coalesce_list_for_outofssa): New func factored out from
19904 create_outofssa_var_map and coalesce_ssa_name.
19905 (create_outofssa_var_map): Delete.
19906 (coalesce_ssa_name): Refactor to support live range computation.
19907 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19908 (get_parm_default_def_partitions): Delete.
19909 (get_undefined_value_partitions): Ditto.
19910 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19911 computation for loop region.
19912 (new_tree_live_info, loe_visit_block): Ditto.
19913 (live_worklist, set_var_live_on_entry): Ditto.
19914 (calculate_live_on_exit, verify_live_on_entry): Ditto.
19915 * tree-ssa-live.h (struct _var_map): New fields.
19916 (init_var_map): Change decl.
19917 (region_contains_p): New.
19919 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19921 * tree-ssa-live.h (live_merge_and_clear): Delete.
19923 2018-05-25 Richard Biener <rguenther@suse.de>
19926 * tree-dump.c (dequeue_and_dump): Remove access to removed
19927 operand 2 of a SWITCH_EXPR.
19929 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19931 * doc/sourcebuild.texi (vect_double_cond_arith): Include
19932 multiplication and division.
19933 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19934 (cond_udiv@var{m}, cond_umod@var{m}): Document.
19935 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19936 (cond_udiv_optab, cond_umod_optab): New optabs.
19937 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19938 (IFN_COND_RDIV): New internal functions.
19939 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19940 TRUNC_MOD_EXPR and RDIV_EXPR.
19941 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19942 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19944 (SVE_INT_BINARY): Include mult.
19945 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19946 (optab, sve_int_op): Handle mult.
19947 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19949 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19950 for SVE_INT_BINARY_SD.
19952 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19954 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19955 (optab, sve_int_op): Handle div and udiv.
19956 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19957 for SVE_INT_BINARY_SD.
19958 (*<optab><mode>3): New insn for the same.
19960 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19962 * tree-vect-patterns.c: Include predict.h.
19963 (vect_recog_divmod_pattern): Restrict check for division support
19964 to when optimizing for size.
19966 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19968 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19969 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19970 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19971 (gimple_match_op::set_op): Likewise.
19972 (gimple_resimplify4): Declare.
19973 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19974 (expr::gen_transform): Likewise.
19975 (decision_tree::gen): Generate a simplification routine for 4 operands.
19976 * gimple-match-head.c (gimple_simplify): Add an overload for
19977 4 operands. In the top-level function, handle up to 4 call
19978 arguments and call gimple_resimplify4.
19979 (gimple_resimplify4): New function.
19980 (build_call_internal): Pass a fourth operand.
19981 (maybe_push_to_seq): Likewise.
19982 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19983 Fold VEC_COND_EXPRs of an operation and a default value into
19984 an IFN_COND_* function if possible.
19985 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19987 (SVE_COND_FP_BINARY): Include them.
19988 (optab, sve_fp_op): Handle them.
19989 (SVE_INT_BINARY_REV): New code iterator.
19990 (SVE_COND_FP_BINARY_REV): New int iterator.
19991 (commutative): New int attribute.
19992 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
19994 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
19996 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
19997 (*cond_<optab><mode>): New patterns for reversed operands.
19999 2018-05-25 Richard Biener <rguenther@suse.de>
20001 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
20002 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
20003 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
20004 (STMT_VINFO_GROUPED_ACCESS): Adjust.
20005 * tree-vect-data-refs.c (everywhere): Adjust users.
20006 * tree-vect-loop.c (everywhere): Likewise.
20007 * tree-vect-slp.c (everywhere): Likewise.
20008 * tree-vect-stmts.c (everywhere): Likewise.
20009 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
20011 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20013 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
20015 (gcc_cv_as_section_exclude): ... this.
20016 Try Solaris as #exclude syntax.
20017 * configure: Regenerate.
20018 * config.in: Regenerate.
20019 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
20021 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
20022 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
20024 * varasm.c (default_elf_asm_named_section): Don't check if
20025 HAVE_GAS_SECTION_EXCLUDE is defined.
20027 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20029 * doc/md.texi: Update the documentation of the cond_* optabs
20030 to mention the new final operand. Fix GET_MODE_NUNITS call.
20031 Describe the scalar case too.
20032 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
20033 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
20035 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
20036 (get_conditional_internal_fn): Update comment.
20037 * tree-vect-loop.c (vectorizable_reduction): Pass the original
20038 accumulator value as a final argument to conditional functions.
20039 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
20040 a define_expand and add an "else" operand. Assert for now that
20041 the else operand is equal to operand 2. Use SVE_INT_BINARY and
20042 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
20043 (*cond_<optab><mode>): New patterns.
20044 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
20045 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
20046 (UNSPEC_COND_EOR): Delete.
20047 (optab): Remove associated mappings.
20048 (SVE_INT_BINARY): New code iterator.
20049 (sve_int_op): Remove int attribute and add "minus" to the code
20051 (SVE_COND_INT_OP): Delete.
20052 (SVE_COND_FP_OP): Rename to...
20053 (SVE_COND_FP_BINARY): ...this.
20055 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
20057 * optabs.c (can_reuse_operands_p): New function.
20058 (maybe_legitimize_operands): Try to reuse the results for
20061 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
20063 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
20064 Add {q} suffix to insn mnemonic.
20066 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
20068 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
20069 (msp430_warn_func_return): New.
20071 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
20073 * fold-const.c (tree_nonzero_bits): New function.
20074 * fold-const.h (tree_nonzero_bits): Likewise.
20075 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
20076 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
20078 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
20082 * varasm.c (assemble_alias): Check ifunc_resolver only on
20085 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
20088 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
20089 when memory input operand is handled.
20091 2018-05-24 Luis Machado <luis.machado@linaro.org>
20093 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
20095 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
20097 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
20099 * match.pd: Delay FMA folds until after vectorization.
20101 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
20104 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
20105 address check not strict.
20107 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
20109 * gimple-match.h (gimple_match_op): New class.
20110 (mprts_hook): Replace parameters with a gimple_match_op *.
20111 (maybe_build_generic_op): Likewise.
20112 (gimple_simplified_result_is_gimple_val): Replace parameters with
20113 a const gimple_match_op *.
20114 (gimple_simplify): Replace code_helper * and tree * parameters with
20115 a gimple_match_op * parameter.
20116 (gimple_resimplify1): Replace code_helper *, tree and tree *
20117 parameters with a gimple_match_op * parameter.
20118 (gimple_resimplify2): Likewise.
20119 (gimple_resimplify3): Likewise.
20120 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
20121 parameters with a gimple_match_op * parameter.
20122 * gimple-match-head.c (gimple_simplify): Change prototypes of
20123 auto-generated functions to take a gimple_match_op * instead of
20124 separate code_helper * and tree * parameters. Make the same
20125 change in the top-level overload and update calls to the
20126 gimple_resimplify routines. Update calls to the auto-generated
20127 functions and to maybe_push_res_to_seq in the publicly-facing
20128 operation-specific gimple_simplify overloads.
20129 (gimple_match_op::MAX_NUM_OPS): Define.
20130 (gimple_resimplify1): Replace rcode and ops with a single res_op
20131 parameter. Update call to gimple_simplify.
20132 (gimple_resimplify2): Likewise.
20133 (gimple_resimplify3): Likewise.
20134 (mprts_hook): Replace parameters with a gimple_match_op *.
20135 (maybe_build_generic_op): Likewise.
20136 (build_call_internal): Replace type, nargs and ops with
20137 a gimple_match_op *.
20138 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
20139 with a single gimple_match_op *. Update calls to mprts_hook,
20140 build_call_internal and gimple_simplified_result_is_gimple_val.
20141 Factor out code that is common to the tree_code and combined_fn cases.
20142 * genmatch.c (expr::gen_transform): Replace tem_code and
20143 tem_ops with a gimple_match_op called tem_op. Update calls
20144 to the gimple_resimplify functions and maybe_push_res_to_seq.
20145 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
20146 res_ops. Update call to the gimple_resimplify functions.
20147 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
20148 (decision_tree::gen): Make the functions take a gimple_match_op *
20149 called res_op instead of separate res_code and res_ops parameters.
20150 Update call accordingly.
20151 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
20152 and ops with a single res_op parameter. Update calls to
20153 maybe_build_generic_op and maybe_push_res_to_seq.
20154 (fold_stmt_1): Update calls to gimple_simplify and
20155 replace_stmt_with_simplification.
20156 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
20157 and gimple_simplified_result_is_gimple_val.
20158 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
20160 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
20161 with a gimple_match_op *.
20162 (vn_nary_build_or_lookup): Likewise. Update call to
20163 vn_nary_build_or_lookup_1.
20164 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
20165 gimple_match_op *. Update calls to the gimple_resimplify routines
20166 and to gimple_simplified_result_is_gimple_val.
20167 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
20168 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
20169 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
20170 (visit_nary_op): Likewise.
20171 (visit_reference_op_load): Likewise.
20173 2018-05-23 Luis Machado <luis.machado@linaro.org>
20175 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
20176 modifier for printing the step amount.
20178 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
20181 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
20184 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
20186 * doc/sourcebuild.texi (Endianness): New subsubsection.
20188 2018-05-23 Luis Machado <luis.machado@linaro.org>
20190 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20191 <prefetch_dynamic_strides>: New const bool field.
20192 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20193 prefetch_dynamic_strides.
20194 (exynosm1_prefetch_tune): Likewise.
20195 (thunderxt88_prefetch_tune): Likewise.
20196 (thunderx_prefetch_tune): Likewise.
20197 (thunderx2t99_prefetch_tune): Likewise.
20198 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
20200 (aarch64_override_options_internal): Update to set
20201 PARAM_PREFETCH_DYNAMIC_STRIDES.
20202 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
20203 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
20204 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
20205 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
20206 prefetch-dynamic-strides setting.
20208 2018-05-23 Luis Machado <luis.machado@linaro.org>
20210 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20211 <minimum_stride>: New const int field.
20212 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20213 minimum_stride field defaulting to -1.
20214 (exynosm1_prefetch_tune): Likewise.
20215 (thunderxt88_prefetch_tune): Likewise.
20216 (thunderx_prefetch_tune): Likewise.
20217 (thunderx2t99_prefetch_tune): Likewise.
20218 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
20219 <default_opt_level>: Set to 3.
20220 (aarch64_override_options_internal): Update to set
20221 PARAM_PREFETCH_MINIMUM_STRIDE.
20222 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20223 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20224 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20225 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20226 stride is constant and is below the minimum stride threshold.
20228 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20230 * config/arm/arm-cpus.in (mode26): Delete.
20231 (armv4): Delete mode26 reference.
20232 * config/arm/arm.c (arm_configure_build_target): Delete use of
20235 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20237 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
20239 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
20240 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
20242 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
20243 (floatunsdidf2): Ditto.
20245 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
20247 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
20248 (fixuns_trunc<mode>si2_avx512f): Ditto.
20249 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
20250 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
20251 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
20253 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20255 PR rtl-optimization/79985
20256 * df-scan.c (df_insn_refs_collect): Remove special case for
20257 global registers and asm statements.
20259 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
20261 * extend.texi (Global Register Variables): Rewrite the bullet list.
20262 Note that the register is available for allocation. Note that access
20263 via inline asm must use constraints. Add note about async-signal
20264 handlers. Remove paragraph about automagic register selection.
20266 2018-05-23 Richard Biener <rguenther@suse.de>
20268 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
20269 of fixed offset from memset VN.
20271 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
20273 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
20274 first_interp field.
20275 (alloc_cand_and_find_basis): Initialize first_interp field.
20276 (slsr_process_mul): Modify first_interp field.
20277 (slsr_process_add): Likewise.
20278 (slsr_process_cast): Modify first_interp field for each new
20280 (slsr_process_copy): Likewise.
20281 (dump_candidate): Dump first_interp field.
20282 (replace_mult_candidate): Process all interpretations, not just
20284 (replace_rhs_if_not_dup): Likewise.
20285 (replace_one_candidate): Likewise.
20287 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
20289 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
20291 (aarch64_needs_frame_chain): New function.
20292 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
20294 2018-05-23 Sudakshina Das <sudi.das@arm.com>
20297 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
20298 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
20299 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
20300 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
20301 as true for strict-align.
20302 (aarch64_can_inline_p): Perform checks even when callee has no
20303 attributes to check for strict alignment.
20304 * doc/extend.texi (AArch64 Function Attributes): Document
20306 * doc/invoke.texi: (AArch64 Options): Likewise.
20308 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
20310 PR tree-optimization/85853
20311 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
20312 the handling of the root of the node to...
20313 (vect_slp_analyze_node_operations_1): ...this new function,
20314 and run the whole thing with the child nodes' def types
20315 set according to their SLP node's def type.
20317 2018-05-23 Richard Biener <rguenther@suse.de>
20319 PR middle-end/85874
20320 * tree-data-ref.c (create_runtime_alias_checks): Defer
20321 and ignore overflow warnings.
20323 2018-05-23 Yury Gribov <tetra2005@gmail.com>
20325 PR tree-optimization/85822
20326 * tree-vrp.c (is_masked_range_test): Fix handling of negative
20329 2018-05-23 Richard Biener <rguenther@suse.de>
20331 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
20332 memset constants via native_interpret_expr.
20334 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
20337 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
20339 (cgraph_node::create_alias): Likewise.
20340 (cgraph_node::get_availability): Check ifunc_resolver instead
20341 of looking up ifunc attribute.
20342 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
20343 * varasm.c (do_assemble_alias): Likewise.
20344 (assemble_alias): Likewise.
20345 (default_binds_local_p_3): Likewise.
20346 * cgraph.h (cgraph_node): Add ifunc_resolver.
20347 (cgraph_node::only_called_directly_or_aliased_p): Return false
20348 for IFUNC resolver.
20349 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
20351 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
20352 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
20353 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
20354 instead of looking up ifunc attribute.
20356 2018-05-22 Luis Machado <luis.machado@linaro.org>
20358 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
20360 2018-05-22 Martin Sebor <msebor@redhat.com>
20362 PR middle-end/85359
20363 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
20364 only when expasion succeeds.
20365 (expand_builtin_strcmp): Same.
20366 (expand_builtin_strncmp): Same.
20368 2018-05-22 Martin Sebor <msebor@redhat.com>
20370 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
20372 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
20373 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20375 * config/aarch64/aarch64-ldpstp.md: Replace uses of
20376 aarch64_mem_pair_operand with memory_operand and delete operand swapping
20378 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20379 Add check for legitimate_address.
20380 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
20381 (aarch64_swap_ldrstr_operands): New.
20382 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
20385 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
20386 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20388 * config/aarch64/aarch64.md: New patterns to generate stp
20390 (store_pair_sw, store_pair_dw): New patterns to generate stp for
20391 single words and double words.
20392 (load_pair_sw, load_pair_dw): Likewise.
20393 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
20395 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
20397 * config/aarch64/aarch64-ldpstp.md: Modify peephole
20398 for different mode ldpstp and add peephole for merged zero stores.
20399 Likewise for loads.
20400 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
20402 (aarch64_gen_store_pair): Rename calls to match new patterns.
20403 (aarch64_gen_load_pair): Rename calls to match new patterns.
20404 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
20405 (load_pair<DREG:mode><DREG2:mode>): ... This.
20406 (store_pair<mode>): Rename to...
20407 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
20408 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
20409 New mode iterators.
20410 (V_INT_EQUIV): Handle SImode.
20411 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
20414 2018-05-22 Martin Sebor <msebor@redhat.com>
20417 * calls.c (maybe_warn_nonstring_arg): Use string length to set
20418 or ajust the presumed bound on an operation to avoid unnecessary
20421 2018-05-22 Martin Sebor <msebor@redhat.com>
20423 PR tree-optimization/85826
20424 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
20425 assuming that a DECL necesarily has a constant size.
20427 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
20429 PR middle-end/85862
20430 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
20432 2018-05-22 Richard Biener <rguenther@suse.de>
20434 PR tree-optimization/85834
20435 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
20436 non-constant and non-zero memset arguments.
20438 2018-05-22 Martin Liska <mliska@suse.cz>
20441 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
20443 2018-05-22 Richard Biener <rguenther@suse.de>
20445 PR tree-optimization/85863
20446 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
20447 comparisons when vectype is specified.
20448 (vectorizable_condition): Do not specify vectype for
20449 vect_is_simple_cond when SLP vectorizing.
20451 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
20454 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
20455 define __ibm128 as long double.
20456 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
20457 as a distinct type when IEEE 128-bit support is enabled.
20458 (init_float128_ieee): Fix up conversions between IFmode and IEEE
20459 128-bit types to use the correct functions.
20460 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
20461 convert between 128-bit floating point types that have different
20462 modes but the same representation, instead of using gen_lowpart to
20464 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
20466 (IFKF_reg): New attributes to give the register constraints for
20468 (extend<mode>tf2_internal): New insns to mark an explicit
20469 conversion between 128-bit floating point types that have a
20470 different mode but share the same representation.
20472 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
20474 PR tree-optimization/85814
20475 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
20476 a null return from get_strinfo when unsharing the next
20477 strinfo in the chain.
20479 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20482 * varasm.c (weak_finish): Clean up weak_decls.
20484 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20486 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
20487 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
20488 UNSPEC_UADALP values.
20489 * config/aarch64/iterators.md (ABAL): New int iterator.
20492 (sur): Add mappings for the above.
20493 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
20495 (aarch64_<sur>abal<mode>_4): Likewise.
20496 (aarch64_<sur>adalp<mode>_3): Likewise.
20497 (<sur>sadv16qi): New define_expand.
20499 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
20501 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
20502 (*movdf_internal): Ditto.
20503 (*rcpsf2_sse): Ditto.
20504 (*rsqrtsf2_sse): Ditto.
20505 (*sqrt<mode>2_sse): Ditto.
20507 2018-05-21 Tamar Christina <tamar.christina@arm.com>
20509 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
20511 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
20512 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
20513 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
20514 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
20516 * config/aarch64/arm_neon.h: Likewise.
20517 * config/aarch64/iterators.md (VQ_I): New.
20519 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
20521 * config.gcc: Add arc/t-multilib-linux to tmake_file for
20523 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
20526 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
20528 * config/nds32/constraints.md (S): New constraint.
20529 * config/nds32/nds32.md (call_internal): Use constraint S.
20530 (call_value_internal): Likewise.
20531 (sibcall_internal): Likewise.
20532 (sibcall_value_internal): Likewise.
20534 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
20535 Chung-Ju Wu <jasonwucj@gmail.com>
20537 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
20538 into consideration.
20540 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
20541 Chung-Ju Wu <jasonwucj@gmail.com>
20543 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
20544 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
20545 (nds32_rtx_costs_impl): Simplify.
20546 (nds32_address_cost_impl): Simplify.
20547 (nds32_init_rtx_costs): New function.
20548 (nds32_rtx_costs_speed_prefer): Likewise.
20549 (nds32_rtx_costs_size_prefer): Likewise.
20550 (nds32_address_cost_speed_prefer): Likewise.
20551 (nds32_address_cost_speed_fwprop): Likewise.
20552 (nds32_address_cost_size_prefer): Likewise.
20553 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
20554 * config/nds32/nds32.c (nds32_option_override): Use
20555 nds32_init_rtx_costs function.
20557 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
20559 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
20560 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
20561 (TARGET_PIPELINE_N8): Likewise.
20562 (TARGET_PIPELINE_N10): Likewise.
20563 (TARGET_PIPELINE_N13): Likewise.
20564 (TARGET_PIPELINE_GRAYWOLF): Likewise.
20566 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
20568 * config/nds32/nds32-fpu.md: Update copyright year.
20570 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20572 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
20574 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20576 * config/nds32/nds32.c
20577 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
20578 * config/nds32/nds32.opt (minline-asm-r15): New option.
20580 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20582 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
20584 * config/nds32/nds32.md (abssi2): New pattern.
20586 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
20588 * config/i386/i386.md (rex64namesuffix): New mode attribute.
20589 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
20590 Merge insn pattern from sse_cvtsi2ss<round_name> and
20591 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
20592 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
20593 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
20594 using SWI48 mode iterator.
20595 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
20596 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
20597 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
20598 pattern from sse_cvttss2si<round_saeonly_name>
20599 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
20600 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
20601 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
20602 using SWI48 mode iterator.
20603 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
20604 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
20605 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
20606 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
20607 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
20608 using SWI48 mode iterator.
20609 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
20610 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
20611 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
20612 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
20613 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
20614 SWI48 mode iterator.
20615 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
20616 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
20617 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
20618 pattern from sse_cvttsd2si<round_saeonly_name>
20619 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
20621 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20623 * config/nds32/nds32-md-auxiliary.c
20624 (nds32_valid_smw_lwm_base_p): Refine.
20625 (nds32_output_smw_single_word): Refine.
20626 (nds32_output_smw_double_word): New.
20627 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
20629 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20631 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
20632 (nds32_output_stack_pop): Refine.
20633 (nds32_expand_unaligned_load): Refine.
20634 (nds32_expand_unaligned_store): Refine.
20636 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20637 Chung-Ju Wu <jasonwucj@gmail.com>
20639 * config/nds32/constants.md: Add TP_REGNUM constant.
20640 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
20641 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
20643 * config/nds32/nds32-doubleword.md: Consider flag_pic.
20644 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
20645 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
20646 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
20647 and PIC code generation.
20648 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
20650 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
20652 * config/nds32/nds32.md: Support TLS and PIC.
20653 * config/nds32/nds32.c: Support TLS and PIC.
20654 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
20655 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
20658 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20660 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
20661 mode with E_ prefix.
20663 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20664 Chung-Ju Wu <jasonwucj@gmail.com>
20666 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
20667 * config/nds32/nds32-md-auxiliary.c
20668 (symbolic_reference_mentioned_p): New.
20669 (nds32_legitimize_ict_address): New.
20670 (nds32_expand_ict_move): New.
20671 (nds32_indirect_call_referenced_p): New.
20672 (nds32_symbol_binds_local_p): Delete.
20673 (nds32_long_call_p): Modify.
20674 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
20675 * config/nds32/nds32-protos.h
20676 (symbolic_reference_mentioned_p): Declare.
20677 (nds32_legitimize_ict_address): Declare.
20678 (nds32_expand_ict_move): Declare.
20679 (nds32_indirect_call_referenced_p): Declare.
20680 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
20681 (nds32_relax_group): Use nds32_ict_const_p as condition.
20682 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
20683 (nds32_asm_file_start): Output ict_model directive in asm code.
20684 (nds32_legitimate_address_p): Consider indirect call.
20685 (nds32_print_operand): Consider indirect call.
20686 (nds32_print_operand_address): Consider indirect call.
20687 (nds32_insert_attributes): Handle "indirect_call" attribute.
20688 (TARGET_LEGITIMATE_ADDRESS_P): Define.
20689 (TARGET_LEGITIMATE_CONSTANT_P): Define.
20690 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
20691 (TARGET_DELEGITIMIZE_ADDRESS): Define.
20692 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
20693 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
20694 (TARGET_ICT_MODEL_SMALL): Define.
20695 (TARGET_ICT_MODEL_LARGE): Define.
20696 * config/nds32/nds32.md (movsi): Consider ict model.
20697 (call, call_value): Consider ict model.
20698 (sibcall, sibcall_value): Consider ict model.
20699 * config/nds32/nds32.opt (mict-model): New option.
20700 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
20703 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
20704 Monk Chiang <sh.chiang04@gmail.com>
20705 Jim Wilson <jimw@sifive.com>
20707 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
20708 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
20709 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
20710 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
20711 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
20712 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
20713 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
20714 compute save_libcall_adjustment properly.
20715 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
20716 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
20717 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
20718 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
20719 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
20720 (ABI_SPEC): Handle mabi=ilp32e.
20721 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
20722 (RVE): Add RVE mask.
20723 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
20724 <-march>: Add rv32e as an example.
20726 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
20729 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
20730 (intra_create_variable_infos): Handle C++ constructors.
20732 2018-05-18 Martin Liska <mliska@suse.cz>
20734 * passes.def: Remove a redundant pass.
20736 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
20739 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
20741 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20743 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
20745 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
20747 (armv2, armv2a, armv3, armv3m): Delete architectures.
20748 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
20749 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
20750 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
20752 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
20753 (*mulsidi3adddi): Likewise.
20754 (mulsidi3): Likewise.
20755 (*mulsidi3_nov6): Likewise.
20756 (umulsidi3): Likewise.
20757 (umulsidi3_nov6): Likewise.
20758 (umaddsidi4): Likewise.
20759 (*umulsidi3adddi): Likewise.
20760 (smulsi3_highpart): Likewise.
20761 (*smulsi3_highpart_nov6): Likewise.
20762 (umulsi3_highpart): Likewise.
20763 (*umulsi3_highpart_nov6): Likewise.
20764 * config/arm/arm.h (arm_arch3m): Delete.
20765 * config/arm/arm.c (arm_arch3m): Delete.
20766 (arm_option_override_internal): Update armv3-related comment.
20767 (arm_configure_build_target): Delete use of isa_bit_mode32.
20768 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
20769 (arm_rtx_costs_internal): Delete check of arm_arch3m.
20770 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
20771 (mulsa3): Likewise.
20772 (mulusa3): Likewise.
20773 * config/arm/arm-protos.h (arm_arch3m): Delete.
20774 * config/arm/arm-tables.opt: Regenerate.
20775 * config/arm/arm-tune.md: Likewise.
20776 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
20777 deleted architectures.
20779 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20781 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
20782 (armv5t, armv5te): New features.
20783 (ARMv5, ARMv5e): Delete fgroups.
20784 (ARMv5t, ARMv5te): Adjust for above changes.
20785 (ARMv6m): Likewise.
20786 (armv5, armv5e): Delete arches.
20787 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
20789 (*call_reg_arm): Likewise.
20790 (*call_value_reg_armv5): Likewise.
20791 (*call_value_reg_arm): Likewise.
20792 (*call_symbol): Likewise.
20793 (*call_value_symbol): Likewise.
20794 (*sibcall_insn): Likewise.
20795 (*sibcall_value_insn): Likewise.
20796 (clzsi2): Likewise.
20797 (prefetch): Likewise.
20798 (define_split and define_peephole2 dependent on arm_arch5):
20800 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
20802 (TARGET_ARM_QBIT): Likewise.
20803 (TARGET_DSP_MULTIPLY): Likewise.
20804 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
20805 (arm_arch5, arm_arch5e): Delete.
20806 (arm_arch5t, arm_arch5te): Declare.
20807 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
20808 (arm_arch5t): Declare.
20809 (arm_option_reconfigure_globals): Update for the above.
20810 (arm_options_perform_arch_sanity_checks): Update comment, replace
20811 use of arm_arch5 with arm_arch5t.
20812 (use_return_insn): Likewise.
20813 (arm_emit_call_insn): Likewise.
20814 (output_return_instruction): Likewise.
20815 (arm_final_prescan_insn): Likewise.
20816 (arm_coproc_builtin_available): Likewise.
20817 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
20818 arm_arch5e with arm_arch5t and arm_arch5te.
20819 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
20820 (arm_arch5t, arm_arch5te): Declare.
20821 * config/arm/arm-tables.opt: Regenerate.
20822 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
20823 * config/arm/t-multilib: Likewise.
20824 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
20825 instead of arm_arch5.
20826 (*call_reg_thumb1): Likewise.
20827 (*call_value_reg_thumb1_v5): Likewise.
20828 (*call_value_reg_thumb1): Likewise.
20829 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
20831 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
20833 2018-05-18 Martin Liska <mliska@suse.cz>
20835 PR gcov-profile/84846
20836 * doc/gcov.texi: Document -t option of gcov tool.
20838 2018-05-18 Martin Liska <mliska@suse.cz>
20840 PR gcov-profile/84846
20841 * gcov.c (print_usage): Add new -t option.
20842 (process_args): Handle the option.
20843 (generate_results): Use stdout as output when requested by
20846 2018-05-18 Martin Liska <mliska@suse.cz>
20848 PR gcov-profile/84846
20849 * coverage.c (coverage_init): Write PWD to .gcno file.
20850 * doc/gcov.texi: Document how working directory is printed.
20851 * gcov-dump.c (dump_gcov_file): Print PWD.
20852 * gcov.c (output_intermediate_file): Likewise.
20853 (read_graph_file): Read PWD string.
20854 (output_lines): Print PWD.
20856 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20858 PR middle-end/85817
20859 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
20860 for retval and return false if all args to phi are zero.
20862 2018-05-18 Richard Biener <rguenther@suse.de>
20864 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
20866 (evrp_dom_walker::before_dom_children): Call it.
20868 2018-05-18 Richard Biener <rguenther@suse.de>
20870 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
20871 results when processing array refs with variable index.
20873 2018-05-18 Toon Moene <toon@moene.org>
20875 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
20876 directly after that of -floop-interchange. Indicate that both
20877 options are enabled by default when specifying -O3.
20879 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20881 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
20882 iterator. Delete separate integer-mode vec_set<mode> expander.
20883 (aarch64_simd_vec_setv2di): Delete.
20884 (vec_setv2di): Delete.
20885 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
20886 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
20887 the "w, r" alternative.
20889 2018-05-18 Martin Liska <mliska@suse.cz>
20891 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
20892 * tree-pass.h (make_pass_lower_switch_O0): New function.
20893 * tree-switch-conversion.c (node_has_low_bound): Remove.
20894 (node_has_high_bound): Likewise.
20895 (node_is_bounded): Likewise.
20896 (class pass_lower_switch): Make it a template type and create
20898 (pass_lower_switch::execute): Add template argument.
20899 (make_pass_lower_switch): New function.
20900 (make_pass_lower_switch_O0): New function.
20901 (do_jump_if_equal): Remove.
20902 (emit_case_nodes): Simplify to just handle all 3 cases and leave
20903 all the hard work to tree optimization passes.
20905 2018-05-18 Martin Liska <mliska@suse.cz>
20907 * dbgcnt.c (limit_low): Renamed from limit.
20908 (limit_high): New variable.
20909 (dbg_cnt_is_enabled): Check for upper limit.
20910 (dbg_cnt): Adjust dumping.
20911 (dbg_cnt_set_limit_by_index): Add new argument for high
20913 (dbg_cnt_set_limit_by_name): Likewise.
20914 (dbg_cnt_process_single_pair): Parse new format.
20915 (dbg_cnt_process_opt): Use strtok.
20916 (dbg_cnt_list_all_counters): Remove 'value' and add
20918 * doc/invoke.texi: Document changes.
20920 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
20922 * doc/sourcebuild.texi (scalar_all_fma): Document.
20923 * tree.def (FMA_EXPR): Delete.
20924 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20925 * internal-fn.c (ternary_direct): New macro.
20926 (expand_ternary_optab_fn): Likewise.
20927 (direct_ternary_optab_supported_p): Likewise.
20928 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20929 * builtins.c (fold_builtin_fma): Delete.
20930 (fold_builtin_3): Don't call it.
20931 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20932 * expr.c (expand_expr_real_2): Likewise.
20933 * fold-const.c (operand_equal_p): Likewise.
20934 (fold_ternary_loc): Likewise.
20935 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20936 * gimple.c (DEFTREECODE): Likewise.
20937 * gimplify.c (gimplify_expr): Likewise.
20938 * optabs-tree.c (optab_for_tree_code): Likewise.
20939 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20940 * tree-eh.c (operation_could_trap_p): Likewise.
20941 (stmt_could_throw_1_p): Likewise.
20942 * tree-inline.c (estimate_operator_cost): Likewise.
20943 * tree-pretty-print.c (dump_generic_node): Likewise.
20944 (op_code_prio): Likewise.
20945 * tree-ssa-loop-im.c (stmt_cost): Likewise.
20946 * tree-ssa-operands.c (get_expr_operands): Likewise.
20947 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20948 * fold-const-call.h (fold_fma): Delete.
20949 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20950 CFN_FNMA and CFN_FNMS.
20951 (fold_fma): Delete.
20952 * genmatch.c (combined_fn): New enum.
20953 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20954 (commutative_op): New function.
20955 (commutate): Use it. Handle more than 2 operands.
20956 (dt_operand::gen_gimple_expr): Use commutative_op.
20957 (parser::parse_expr): Allow :c to be used with non-binary
20958 operators if the commutative operand is known.
20959 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20960 CFN_FMS, CFN_FNMA and CFN_FNMS.
20961 (backprop::process_assign_use): Remove FMA_EXPR handling.
20962 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20963 (gen_hsa_fma): New function.
20964 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20965 IFN_FNMA and IFN_FNMS.
20966 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20967 * gimple-fold.h (follow_all_ssa_edges): Declare.
20968 * gimple-fold.c (follow_all_ssa_edges): New function.
20969 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20970 gimple_build interface and use follow_all_ssa_edges to fold the result.
20971 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20972 instead of checking for optabs directly.
20973 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20974 rather than FMA_EXPRs.
20975 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20976 call to IFN_FMA instead of an FMA_EXPR.
20978 2018-05-17 Jim Wilson <jimw@sifive.com>
20980 * expr.c (do_tablejump): When converting index to Pmode, if we have a
20981 sign extended promoted subreg, and the range does not have the sign bit
20982 set, then do a sign extend.
20984 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20985 test, check for sign extended subreg and/or constant operands, and
20986 do a sign extend in that case.
20988 2018-05-17 Steve Ellcey <sellcey@cavium.com>
20990 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
20991 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
20993 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
20994 Change logics_shift_reg to logics_shift_imm.
20995 (thunderx2t99_fp_loadpair_basic): Delete.
20996 (thunderx2t99_fp_storepair_basic): Delete.
20997 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
20998 (thunderx2t99_asimd_polynomial): Delete.
20999 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
21000 and neon_fp_mul_d_scalar_q.
21001 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
21002 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
21003 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
21004 (thunderx2t99_asimd_lut): Add missing tbl types.
21005 (thunderx2t99_asimd_ext): Delete.
21006 (thunderx2t99_asimd_load1_1_mult): Delete.
21007 (thunderx2t99_asimd_load1_2_mult): Delete.
21008 (thunderx2t99_asimd_load1_ldp): New.
21009 (thunderx2t99_asimd_load1): New.
21010 (thunderx2t99_asimd_load2): Add missing *load2* types.
21011 (thunderx2t99_asimd_load3): New.
21012 (thunderx2t99_asimd_load4): New.
21013 (thunderx2t99_asimd_store1_1_mult): Delete.
21014 (thunderx2t99_asimd_store1_2_mult): Delete.
21015 (thunderx2t99_asimd_store2_mult): Delete.
21016 (thunderx2t99_asimd_store2_onelane): Delete.
21017 (thunderx2t99_asimd_store_stp): New.
21018 (thunderx2t99_asimd_store1): New.
21019 (thunderx2t99_asimd_store2): New.
21020 (thunderx2t99_asimd_store3): New.
21021 (thunderx2t99_asimd_store4): New.
21023 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
21025 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
21026 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
21028 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
21029 Segher Boessenkool <segher@kernel.crashing.org>
21032 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
21035 2018-05-17 Richard Biener <rguenther@suse.de>
21037 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
21038 for pruning loop and prune defs feeding only already visited PHIs.
21040 2018-05-17 Richard Biener <rguenther@suse.de>
21042 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
21044 2018-05-17 Bin Cheng <bin.cheng@arm.com>
21045 Richard Biener <rguenther@suse.de>
21047 PR tree-optimization/85793
21048 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
21049 for VMAT_ELEMENTWISE.
21051 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
21053 * internal-fn.h (lookup_internal_fn): Declare
21054 * internal-fn.c (lookup_internal_fn): New function.
21055 * gimple.c (gimple_build_call_from_tree): Handle calls to
21056 internal functions.
21057 * gimple-pretty-print.c (dump_gimple_call): Print "." before
21058 internal function names.
21059 * tree-pretty-print.c (dump_generic_node): Likewise.
21060 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
21062 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
21064 * gimple-fold.h (gimple_build): Make the function forms take
21065 combined_fn rather than built_in_function.
21066 (gimple_simplify): Likewise.
21067 * gimple-match-head.c (gimple_simplify): Likewise.
21068 * gimple-fold.c (gimple_build): Likewise.
21069 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
21070 rather than gimple_build_call_internal.
21071 (get_initial_defs_for_reduction): Likewise.
21072 (vect_create_epilog_for_reduction): Likewise.
21073 (vectorizable_live_operation): Likewise.
21075 2018-05-17 Martin Liska <mliska@suse.cz>
21077 * gimple-ssa-sprintf.c (format_directive): Do not use
21078 space in between 'G_' and '('.
21080 2018-05-17 Jakub Jelinek <jakub@redhat.com>
21083 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
21084 even if the mask is not all ones.
21087 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
21089 (ix86_gimple_fold_builtin): Likewise.
21092 * config/i386/i386.c: Include tree-vector-builder.h.
21093 (ix86_vector_shift_count): New function.
21094 (ix86_fold_builtin): Fold shift builtins by scalar count.
21095 (ix86_gimple_fold_builtin): Likewise.
21097 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
21098 _mm512_setzero): New intrinsics.
21100 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
21101 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21103 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
21104 code generation for cases where splatting a value is not useful.
21105 * simplify-rtx.c (simplify_ternary_operation): Simplify
21106 vec_merge across a vec_duplicate and a paradoxical subreg forming
21107 a vector mode to a vec_concat.
21109 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
21111 * config.gcc: Support "goldmont-plus".
21112 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21114 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21115 PROCESSOR_GOLDMONT_PLUS.
21116 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
21117 (processor_target_table): Add "goldmont-plus".
21118 (PTA_GOLDMONT_PLUS): Define.
21119 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
21120 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
21121 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
21122 (fold_builtin_cpu): Add "goldmont-plus".
21123 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
21124 (ix86_option_override_internal): Add "goldmont-plus".
21125 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
21126 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
21127 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
21128 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
21130 2018-05-17 Richard Biener <rguenther@suse.de>
21132 PR tree-optimization/85757
21133 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
21134 remove defs that only feed that PHI from further processing.
21136 2018-05-16 Jim Wilson <jimw@sifive.com>
21138 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
21140 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
21142 2018-05-16 Mark Wielaard <mark@klomp.org>
21144 * dwarf2out.c (count_index_strings): New function.
21145 (output_indirect_strings): Call count_index_strings and generate
21146 header for dwarf_version >= 5.
21148 2018-05-16 Mark Wielaard <mark@klomp.org>
21150 * dwarf2out.c (dwarf_FORM): New function.
21151 (set_indirect_string): Use dwarf_FORM.
21152 (reset_indirect_string): Likewise.
21153 (size_of_die): Likewise.
21154 (value_format): Likewise.
21155 (output_die): Likewise.
21156 (add_skeleton_AT_string): Likewise.
21157 (output_macinfo_op): Likewise.
21158 (index_string): Likewise.
21159 (output_index_string_offset): Likewise.
21160 (output_index_string): Likewise.
21161 (count_index_strings): Likewise.
21163 2018-05-16 Carl Love <cel@us.ibm.com>
21165 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21166 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
21168 2018-05-16 Martin Jambor <mjambor@suse.cz>
21170 * ipa-prop.c (ipa_free_all_edge_args): Remove.
21171 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
21173 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
21175 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
21176 (fnma<mode>4): Likewise.
21177 (fms<mode>4): Likewise.
21178 (fnms<mode>4): Likewise.
21179 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
21180 (aarch64_fnma<mode>4): Likewise.
21181 (aarch64_fms<mode>4): Likewise.
21182 (aarch64_fnms<mode>4): Likewise.
21183 (aarch64_fnmadd<mode>4): Likewise.
21185 2018-05-16 Jason Merrill <jason@redhat.com>
21187 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
21189 2018-05-16 Richard Biener <rguenther@suse.de>
21191 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
21192 (dump_stmt_cost): Declare.
21193 (add_stmt_cost): Dump cost we add.
21194 (add_stmt_costs): New function.
21195 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
21196 No longer exported.
21197 (vect_analyze_stmt): Adjust prototype.
21198 (vectorizable_condition): Likewise.
21199 (vectorizable_live_operation): Likewise.
21200 (vectorizable_reduction): Likewise.
21201 (vectorizable_induction): Likewise.
21202 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
21203 cost vector to pass to vectorizable_ and record afterwards.
21204 (vect_model_reduction_cost): Take cost vector argument and adjust.
21205 (vect_model_induction_cost): Likewise.
21206 (vectorizable_reduction): Likewise.
21207 (vectorizable_induction): Likewise.
21208 (vectorizable_live_operation): Likewise.
21209 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
21210 SLP_TREE_NUMBER_OF_VEC_STMTS.
21211 (vect_analyze_slp_cost_1): Remove.
21212 (vect_analyze_slp_cost): Likewise.
21213 (vect_slp_analyze_node_operations): Take visited args and
21214 a target cost vector. Avoid processing already visited stmt sets.
21215 (vect_slp_analyze_operations): Use a local cost vector to gather
21216 costs and register those of non-discarded instances.
21217 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
21218 (vect_schedule_slp_instance): Remove copying of
21219 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
21221 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
21222 adding cost. Record cost entry location.
21223 (vect_prologue_cost_for_slp_op): Function to compute cost of
21224 a constant or invariant generated for SLP vect in the prologue,
21225 split out from vect_analyze_slp_cost_1.
21226 (vect_model_simple_cost): Make static. Adjust for SLP costing.
21227 (vect_model_promotion_demotion_cost): Likewise.
21228 (vect_model_store_cost): Likewise, make static.
21229 (vect_model_load_cost): Likewise.
21230 (vectorizable_bswap): Add cost vector arg and adjust.
21231 (vectorizable_call): Likewise.
21232 (vectorizable_simd_clone_call): Likewise.
21233 (vectorizable_conversion): Likewise.
21234 (vectorizable_assignment): Likewise.
21235 (vectorizable_shift): Likewise.
21236 (vectorizable_operation): Likewise.
21237 (vectorizable_store): Likewise.
21238 (vectorizable_load): Likewise.
21239 (vectorizable_condition): Likewise.
21240 (vectorizable_comparison): Likewise.
21241 (can_vectorize_live_stmts): Likewise.
21242 (vect_analyze_stmt): Likewise.
21243 (vect_transform_stmt): Adjust calls to vectorizable_*.
21244 * tree-vectorizer.c: Include gimple-pretty-print.h.
21245 (dump_stmt_cost): New function.
21247 2018-05-16 Richard Biener <rguenther@suse.de>
21249 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
21250 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
21251 * tree-ssa-dse.c: Include tree-ssa-loop.h.
21252 (check_name): New callback.
21253 (dse_classify_store): Track cycles via a visited bitmap of PHI
21254 defs and simplify handling of in-loop and across loop dead stores
21255 and properly fail for loop-variant refs. Handle byte-tracking with
21256 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
21259 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
21261 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
21262 (vect_get_mask_type_for_stmt): Likewise.
21263 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
21265 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
21266 to determine the statement's vector type and the vector type that
21267 should be used for calculating nunits. Deal with cases in which
21268 the type has to be deferred.
21269 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
21270 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
21271 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
21272 (vect_determine_vf_for_stmt): New functions, split out from...
21273 (vect_determine_vectorization_factor): ...here.
21274 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
21275 (vect_get_mask_type_for_stmt): New functions, split out from
21276 vect_determine_vectorization_factor.
21278 2018-05-16 Richard Biener <rguenther@suse.de>
21280 * tree-cfg.c (verify_gimple_assign_ternary): Properly
21281 verify the [VEC_]COND_EXPR embedded comparison.
21283 2018-05-15 Martin Sebor <msebor@redhat.com>
21285 PR tree-optimization/85753
21286 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
21287 RECORD_TYPE in addition to ARRAY_TYPE.
21289 2018-05-15 Martin Sebor <msebor@redhat.com>
21291 PR middle-end/85643
21292 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
21294 2018-05-15 Richard Biener <rguenther@suse.de>
21296 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
21297 add by_clobber_p one. Change algorithm to collect all defs
21298 representing uses we need to walk and try reducing them to
21299 a single one before failing.
21300 (dse_dom_walker::dse_optimize_stmt): Adjust.
21302 2018-05-13 Mark Wielaard <mark@klomp.org>
21304 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
21305 (size_of_loc_descr): Likewise.
21306 (output_loc_operands): Likewise.
21307 (output_loc_operands_raw): Likewise.
21308 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
21309 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
21310 (hash_loc_operands): Likewise.
21311 (compare_loc_operands): Likewise.
21313 2018-05-14 Mark Wielaard <mark@klomp.org>
21315 * dwarf2out.c (count_index_addrs): New function.
21316 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
21318 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21320 PR tree-optimization/83648
21321 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
21322 return value as malloc candidate.
21324 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21327 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
21328 param as true in call to suggest_attribute.
21330 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
21332 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
21333 -mreadonly-in-sdata.
21335 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21337 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
21339 (aarch64_crypto_aesd_fused): Likewise.
21341 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
21343 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
21344 (movsi_aarch64): Likewise.
21345 (load_pairsi): Likewise.
21346 (load_pairdi): Likewise.
21347 (store_pairsi): Likewise.
21348 (store_pairdi): Likewise.
21349 (load_pairsf): Likewise.
21350 (load_pairdf): Likewise.
21351 (store_pairsf): Likewise.
21352 (store_pairdf): Likewise.
21353 (zero_extend): Likewise.
21354 (trunc): Swap alternatives.
21355 (fcvt_target): Add '?' to prefer w over r.
21357 2018-05-14 Jakub Jelinek <jakub@redhat.com>
21360 * config/i386/i386.md: Disallow non-commutative arithmetics in
21361 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
21362 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
21363 in the peephole2 before it.
21365 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
21367 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
21368 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
21369 (ix86_handle_option): Handle -mcldemote.
21370 * config.gcc: New header.
21371 * config/i386/cldemoteintrin.h: New file.
21372 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
21373 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
21375 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21376 OPTION_MASK_ISA_CLDEMOTE.
21377 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
21378 (ix86_valid_target_attribute_inner_p): Ditto.
21379 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
21380 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
21381 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
21382 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
21383 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
21385 * config/i386/i386.opt: Add -mcldemote.
21386 * config/i386/x86intrin.h: New header.
21387 * doc/invoke.texi: Add -mcldemote.
21389 2018-05-14 Richard Biener <rguenther@suse.de>
21391 * doc/match-and-simplify.texi: Adjust :s documentation.
21393 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
21395 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
21396 intended memcpy size.
21397 (REORDER_45): Likewise.
21399 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
21401 * sort.cc: New file.
21402 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
21403 * vec.c (qsort_chk): Use gcc_qsort.
21404 * Makefile.in (OBJS-libcommon): Add sort.o.
21405 (build/sort.o): New target. Use it...
21406 (BUILD_RTL): ... here, and...
21407 (build/gencfn-macros): ... here, and...
21408 (build/genmatch): ... here.
21410 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21411 Chung-Ju Wu <jasonwucj@gmail.com>
21413 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
21414 * config/nds32/nds32-graywolf.md: New file.
21415 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
21416 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
21418 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
21419 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
21420 * config/nds32/nds32.md (pipeline_model): Add graywolf.
21421 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
21422 * config/nds32/pipelines.md: Include n15 settings.
21424 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21425 Chung-Ju Wu <jasonwucj@gmail.com>
21427 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
21428 * config/nds32/nds32-n13.md: New file.
21429 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
21430 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
21432 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
21433 * config/nds32/nds32.md (pipeline_model): Add n13.
21434 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
21435 * config/nds32/pipelines.md: Include n13 settings.
21437 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21438 Chung-Ju Wu <jasonwucj@gmail.com>
21440 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
21441 * config/nds32/nds32-n10.md: New file.
21442 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
21443 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
21445 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
21446 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
21447 * config/nds32/nds32.md (pipeline_model): Add n10.
21448 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
21449 * config/nds32/pipelines.md: Include n10 settings.
21451 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
21452 Kito Cheng <kito.cheng@gmail.com>
21453 Chung-Ju Wu <jasonwucj@gmail.com>
21455 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
21456 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21457 Add enum values for DSP extension instructions.
21458 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
21460 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
21461 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
21462 New code iterators.
21463 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
21464 * config/nds32/nds32-dspext.md: New file for DSP implementation.
21465 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
21466 * config/nds32/nds32-intrinsic.md: Likewise.
21467 * config/nds32/nds32_intrinsic.h: Likewise.
21468 * config/nds32/nds32-md-auxiliary.c: Likewise.
21469 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
21470 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
21471 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
21472 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
21473 * config/nds32/nds32-protos.h: New declarations for DSP extension.
21474 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
21475 TYPE_DMAC in switch statement.
21476 * config/nds32/nds32.c: New checking and implementation for DSP
21477 extension instructions.
21478 * config/nds32/nds32.h: Likewise.
21479 * config/nds32/nds32.md: Likewise.
21480 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
21481 * config/nds32/predicates.md: Implement new predicates for DSP
21484 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21486 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
21487 Reformat alternatives and attributes so it is easier to identify
21488 which constraints/attributes go with which instruction.
21489 (mov<mode>_hardfloat32, FMOVE64): Likewise.
21490 (mov<mode>_softfloat32, FMOVE64): Likewise.
21491 (mov<mode>_hardfloat64, FMOVE64): Likewise.
21492 (mov<mode>_softfloat64, FMOVE64): Likewise.
21494 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
21496 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21498 (Basic PowerPC Built-in Functions): The new name of the
21499 subsection previously known as "PowerPC Built-in Functions".
21500 (Basic PowerPC Built-in Functions Available on all Configurations):
21502 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
21503 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
21504 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
21505 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
21507 2018-05-11 Martin Jambor <mjambor@suse.cz>
21510 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
21513 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
21516 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
21518 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
21520 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
21521 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
21522 (ix86_handle_option): Handle -mwaitpkg.
21523 * config.gcc: New header.
21524 * config/i386/cpuid.h (bit_WAITPKG): New bit.
21525 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
21526 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
21528 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21529 OPTION_MASK_ISA_WAITPKG.
21530 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
21531 (ix86_option_override_internal): Add PTA_WAITPKG.
21532 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
21533 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
21534 IX86_BUILTIN_TPAUSE.
21535 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
21536 __builtin_ia32_umwait and __builtin_ia32_tpause.
21537 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
21538 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
21539 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
21540 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
21541 UNSPECV_TPAUSE): New.
21542 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
21543 * config/i386/i386.opt: Add -mwaitpkg.
21544 * config/i386/waitpkgintrin.h: New file.
21545 * config/i386/x86intrin.h: New header.
21546 * doc/invoke.texi: Add -mwaitpkg.
21548 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
21551 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
21553 (cortex-m0): Use armv6s-m isa.
21554 (cortex-m0plus): Likewise.
21555 (cortex-m1): Likewise.
21556 (cortex-m0.small-multiply): Likewise.
21557 (cortex-m0plus.small-multiply): Likewise.
21558 (cortex-m1.small-multiply): Likewise.
21560 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
21561 Jakub Jelinek <jakub@redhat.com>
21563 PR tree-optimization/85692
21564 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
21565 source permute as well.
21567 2018-05-11 Martin Liska <mliska@suse.cz>
21570 * doc/extend.texi: Document LLVM style format for no_sanitize
21573 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21575 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
21576 mode_supports_vsx_dform_quad to mode_supports_dq_form.
21577 (mode_supports_vsx_dform_quad): Likewise.
21578 (mode_supports_vmx_dform): Move these functions to be next to the
21579 other mode_supports functions.
21580 (mode_supports_dq_form): Likewise.
21581 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
21582 mode_supports_dq_form.
21583 (reg_offset_addressing_ok_p): Likewise.
21584 (offsettable_ok_by_alignment): Likewise.
21585 (rs6000_legitimate_offset_address_p): Likewise.
21586 (legitimate_lo_sum_address_p): Likewise.
21587 (rs6000_legitimize_address): Likewise.
21588 (rs6000_legitimize_reload_address): Likewise.
21589 (rs6000_secondary_reload_inner): Likewise.
21590 (rs6000_preferred_reload_class): Likewise.
21591 (rs6000_output_move_128bit): Likewise.
21593 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
21595 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
21596 Generate SImode target register for null target.
21597 <case IX86_BUILTIN_XGETBV>: Ditto.
21598 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
21599 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
21601 2018-05-10 Carl Love <cel@us.ibm.com>
21603 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21604 dcbtt and dcbtstt if operands[2] is 0.
21606 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
21609 * config/i386/sse.md (usadv64qi): New expander.
21611 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
21613 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
21614 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
21615 -maltivec=be support.
21616 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
21617 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
21618 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
21619 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
21620 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
21621 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
21622 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
21623 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
21624 altivec_vsumsws): Adjust.
21625 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
21626 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
21627 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
21629 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
21630 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
21631 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
21632 (altivec_lve<VI_char>x): Delete expand.
21633 (*altivec_lve<VI_char>x_internal): Rename to...
21634 (altivec_lve<VI_char>x): ... this.
21635 (altivec_lvxl_<mode>): Delete expand.
21636 (*altivec_lvxl_<mode>_internal): Rename to ...
21637 (altivec_lvxl_<mode>): ... this.
21638 (altivec_stvxl_<mode>): Delete expand.
21639 (*altivec_stvxl_<mode>_internal): Rename to ...
21640 (altivec_stvxl_<mode>): ... this.
21641 (altivec_stve<VI_char>x): Delete expand.
21642 (*altivec_stve<VI_char>x_internal): Rename to ...
21643 (altivec_stve<VI_char>x): ... this.
21644 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
21645 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
21646 reduc_plus_scal_<mode>): Adjust.
21647 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
21649 (rs6000_cpu_cpp_builtins): Adjust.
21650 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
21651 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
21652 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
21653 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
21654 -maltivec=be support.
21655 (rs6000_split_vec_extract_var): Adjust.
21656 (rs6000_split_v4si_init): Adjust.
21657 (swap_selector_for_mode): Delete.
21658 (altivec_expand_lvx_be, altivec_expand_stvx_be,
21659 altivec_expand_stvex_be): Delete.
21660 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
21661 -maltivec=be support.
21662 (rs6000_gimple_fold_builtin): Ditto.
21663 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
21665 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
21666 (TARGET_DIRECT_MOVE_64BIT): Adjust.
21667 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
21668 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
21669 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
21670 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
21671 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
21672 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
21673 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
21674 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
21675 anonymous split): Adjust.
21676 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
21677 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
21679 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
21681 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
21682 when --with-gxx-include-dir is also specified.
21683 * configure: Regenerate.
21685 2018-05-09 Jim Wilson <jimw@sifive.com>
21688 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
21689 * config/riscv/t-withmultilib: New.
21690 * config/riscv/withmultilib.h: New.
21691 * doc/install.texi: Document RISC-V --with-multilib-list support.
21693 2018-05-09 Richard Biener <rguenther@suse.de>
21695 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
21697 (vect_bb_vectorization_profitable_p): Adjust. Compute
21698 actual scalar cost using the cost vector and the add_stmt_cost
21701 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21703 PR rtl-optimization/85645
21704 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
21705 in the REG_CFA_REGISTER note for LR, don't leave it empty.
21707 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21709 PR rtl-optimization/85645
21710 * shrink-wrap.c (spread_components): Return a boolean saying if
21711 anything was changed.
21712 (try_shrink_wrapping_separate): Iterate spread_components until
21713 nothing changes anymore.
21715 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21717 PR rtl-optimization/85645
21718 * regrename.c (build_def_use): Also kill the chains that include the
21719 destination of a REG_CFA_REGISTER note.
21721 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21723 PR rtl-optimization/85645
21724 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
21725 insn that has a REG_CFA_REGISTER note.
21727 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
21729 * cfgexpand.c (expand_clobber): New function.
21730 (expand_gimple_stmt_1): Use it.
21731 * tree-vect-stmts.c (vect_clobber_variable): New function,
21733 (vectorizable_simd_clone_call): ...here.
21734 (vectorizable_store): Emit a clobber either side of an
21735 IFN_STORE_LANES sequence.
21736 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
21738 2018-05-09 Tom de Vries <tom@codesourcery.com>
21741 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
21742 (define_insn "trap_if_false"): Add exit after trap.
21744 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
21746 PR rtl-optimization/85638
21747 * bb-reorder.c: Include common/common-target.h.
21748 (create_forwarder_block): New function extracted from...
21749 (fix_up_crossing_landing_pad): ...here. Rename into...
21750 (dw2_fix_up_crossing_landing_pad): ...this.
21751 (sjlj_fix_up_crossing_landing_pad): New function.
21752 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
21753 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
21754 from both partitions and exit the loop after one iteration.
21756 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
21759 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21761 (Basic PowerPC Built-in Functions): The new name of the
21762 subsection previously known as "PowerPC Built-in Functions".
21763 (Basic PowerPC Built-in Functions Available on all Configurations):
21765 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21767 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21769 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21771 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21774 2018-05-08 Jim Wilson <jimw@sifive.com>
21776 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
21777 (LD_EMUL_SUFFIX): New.
21778 (LINK_SPEC): Use it.
21780 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
21782 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21784 (Basic PowerPC Built-in Functions): The new name of the
21785 subsection previously known as "PowerPC Built-in Functions".
21786 (Basic PowerPC Built-in Functions Available on all Configurations):
21788 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21790 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21792 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21794 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21797 2018-05-08 Jakub Jelinek <jakub@redhat.com>
21800 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
21801 after cmpelim optimization.
21803 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
21805 * config.gcc: Support "goldmont".
21806 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
21807 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21808 PROCESSOR_GOLDMONT.
21809 * config/i386/i386.c (m_GOLDMONT): Define.
21810 (processor_target_table): Add "goldmont".
21811 (PTA_GOLDMONT): Define.
21812 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
21813 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
21814 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
21815 (fold_builtin_cpu): Add "goldmont".
21816 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
21817 (ix86_option_override_internal): Add "goldmont".
21818 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
21819 (processor_type): Add PROCESSOR_GOLDMONT.
21820 * config/i386/i386.md: Add CPU "glm".
21821 * config/i386/glm.md: New file.
21822 * config/i386/x86-tune.def: Add m_GOLDMONT.
21823 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
21825 2018-05-08 Jakub Jelinek <jakub@redhat.com>
21828 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
21830 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
21831 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
21832 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
21835 * config/i386/i386.c (ix86_fold_builtin): Handle
21836 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
21839 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
21840 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
21842 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
21845 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
21846 (check_arch): Likewise.
21847 (check_fpu): Return the result rather than printing it.
21848 (end arch): Fix operator precedence.
21849 (end cpu): Likewise.
21850 (END): Print the result from check_fpu.
21852 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
21853 Alan Hayward <alan.hayward@arm.com>
21854 David Sherwood <david.sherwood@arm.com>
21856 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
21857 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
21858 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
21859 (*fcmuo<mode>_and): New patterns.
21861 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
21863 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
21864 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
21865 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
21866 (cmp_op, sve_imm_con): New code attributes.
21867 (SVE_COND_INT_CMP, imm_con): Delete.
21868 (cmp_op): Remove above unspecs from int attribute.
21869 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
21871 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
21872 comparison-specific unspecs.
21873 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
21874 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
21875 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
21876 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
21877 (*vec_fcm<cmp_op><mode>): Rename to...
21878 (*fcm<cmp_op><mode>): ...this and adjust likewise.
21879 (*vec_fcmuo<mode>): Rename to...
21880 (*fcmuo<mode>): ...this and adjust likewise.
21881 (*pred_fcm<cmp_op><mode>): New pattern.
21882 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
21883 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
21885 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
21887 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
21888 (aarch64_emit_sve_predicated_cond): New function.
21889 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
21890 (aarch64_emit_unspec_cond_or): Replace with...
21891 (aarch64_emit_sve_or_conds): ...this new function. Use
21892 aarch64_emit_sve_ptrue_op for the individual comparisons and
21893 aarch64_emit_binop to OR them together.
21894 (aarch64_emit_inverted_unspec_cond): Replace with...
21895 (aarch64_emit_sve_inverted_cond): ...this new function. Use
21896 aarch64_emit_sve_ptrue_op for the comparison and
21897 aarch64_emit_unop to invert the result.
21898 (aarch64_expand_sve_vec_cmp_float): Update after the above
21899 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
21901 2018-05-07 Nathan Sidwell <nathan@acm.org>
21903 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21904 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21905 (Backwards Compatibility): Likewise.
21907 2018-05-07 Luis Machado <luis.machado@linaro.org>
21911 2018-05-07 Luis Machado <luis.machado@linaro.org>
21913 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21914 <prefetch_dynamic_strides>: New const bool field.
21915 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21916 prefetch_dynamic_strides.
21917 (exynosm1_prefetch_tune): Likewise.
21918 (thunderxt88_prefetch_tune): Likewise.
21919 (thunderx_prefetch_tune): Likewise.
21920 (thunderx2t99_prefetch_tune): Likewise.
21921 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21923 (aarch64_override_options_internal): Update to set
21924 PARAM_PREFETCH_DYNAMIC_STRIDES.
21925 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21926 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21927 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21928 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21929 prefetch-dynamic-strides setting.
21931 2018-05-07 Luis Machado <luis.machado@linaro.org>
21933 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21934 <minimum_stride>: New const int field.
21935 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21936 minimum_stride field.
21937 (exynosm1_prefetch_tune): Likewise.
21938 (thunderxt88_prefetch_tune): Likewise.
21939 (thunderx_prefetch_tune): Likewise.
21940 (thunderx2t99_prefetch_tune): Likewise.
21941 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21942 (aarch64_override_options_internal): Update to set
21943 PARAM_PREFETCH_MINIMUM_STRIDE.
21944 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21945 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21946 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21947 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21948 stride is constant and is below the minimum stride threshold.
21950 2018-05-07 Luis Machado <luis.machado@linaro.org>
21952 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21955 2018-05-07 Luis Machado <luis.machado@linaro.org>
21957 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21958 <prefetch_dynamic_strides>: New const bool field.
21959 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21960 prefetch_dynamic_strides.
21961 (exynosm1_prefetch_tune): Likewise.
21962 (thunderxt88_prefetch_tune): Likewise.
21963 (thunderx_prefetch_tune): Likewise.
21964 (thunderx2t99_prefetch_tune): Likewise.
21965 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21967 (aarch64_override_options_internal): Update to set
21968 PARAM_PREFETCH_DYNAMIC_STRIDES.
21969 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21970 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21971 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21972 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21973 prefetch-dynamic-strides setting.
21975 2018-05-07 Luis Machado <luis.machado@linaro.org>
21977 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21978 <minimum_stride>: New const int field.
21979 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21980 minimum_stride field.
21981 (exynosm1_prefetch_tune): Likewise.
21982 (thunderxt88_prefetch_tune): Likewise.
21983 (thunderx_prefetch_tune): Likewise.
21984 (thunderx2t99_prefetch_tune): Likewise.
21985 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21986 (aarch64_override_options_internal): Update to set
21987 PARAM_PREFETCH_MINIMUM_STRIDE.
21988 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21989 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21990 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21991 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21992 stride is constant and is below the minimum stride threshold.
21994 2018-05-06 Jakub Jelinek <jakub@redhat.com>
21997 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
21998 the type is addressable. Don't force op into register if it has
22001 2018-05-05 Roland McGrath <mcgrathr@google.com>
22004 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
22005 any section for which we don't know a specific type it should have,
22006 regardless of name. Previously this was done only for the exact
22007 names ".init_array", ".fini_array", and ".preinit_array".
22008 (default_elf_asm_named_section): Add comment about
22009 relationship with default_section_type_flags and SECTION_NOTYPE.
22010 (get_section): Don't consider it a type conflict if one side has
22011 SECTION_NOTYPE and the other doesn't, as long as neither has the
22012 SECTION_BSS et al used in the default_section_type_flags logic.
22014 2018-05-05 Tom de Vries <tom@codesourcery.com>
22017 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
22018 (workaround_barsyncs): New function.
22019 (nvptx_reorg): Use workaround_barsyncs.
22020 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
22021 (define_expand "nvptx_membar_cta"): New define_expand.
22022 (define_insn "*nvptx_membar_cta"): New insn.
22024 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
22026 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
22027 To improve optimization opportunities.
22028 * builtin-types.def: The new needed builtin types for the above.
22030 2018-05-04 Richard Biener <rguenther@suse.de>
22032 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
22033 * gimple-ssa-store-merging.c
22034 (imm_store_chain_info::output_merged_store): Remove redundant create,
22035 release split_store vector contents on failure.
22036 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
22037 scalar stmt vector on cache hit.
22039 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
22041 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
22043 * config.gcc (powerpc-xilinx-eabi*): Remove.
22044 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
22046 (fusion_addis_mem_combo_load): Ditto.
22047 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
22049 (rs6000_cpu_cpp_builtins): Ditto.
22050 * config/rs6000/rs6000-linux.c
22051 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
22052 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
22053 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
22055 (rs6000_setup_reg_addr_masks): Ditto.
22056 (rs6000_init_hard_regno_mode_ok): Ditto.
22057 (rs6000_option_override_internal): Ditto.
22058 (legitimate_lo_sum_address_p): Ditto.
22059 (rs6000_legitimize_address): Ditto.
22060 (rs6000_legitimize_reload_address): Ditto.
22061 (rs6000_legitimate_address_p): Ditto.
22062 (abi_v4_pass_in_fpr): Ditto.
22063 (setup_incoming_varargs): Ditto.
22064 (rs6000_gimplify_va_arg): Ditto.
22065 (rs6000_split_multireg_move): Ditto.
22066 (rs6000_savres_strategy): Ditto.
22067 (rs6000_emit_prologue_components): Ditto.
22068 (rs6000_emit_epilogue_components): Ditto.
22069 (rs6000_emit_prologue): Ditto.
22070 (rs6000_emit_epilogue): Ditto.
22071 (rs6000_elf_file_end): Ditto.
22072 (rs6000_function_value): Ditto.
22073 (rs6000_libcall_value): Ditto.
22074 * config/rs6000/rs6000.h: Ditto.
22075 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
22076 (TARGET_MINMAX): ... this. New.
22077 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
22078 * config/rs6000/rs6000.md: Remove Xilinx FP support.
22079 (*movsi_internal1_single): Delete.
22080 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
22081 mfpu=, mxilinx-fpu): Delete.
22082 * config/rs6000/singlefp.h: Delete.
22083 * config/rs6000/sysv4.h: Remove Xilinx FP support.
22084 * config/rs6000/t-rs6000: Ditto.
22085 * config/rs6000/t-xilinx: Delete.
22086 * config/rs6000/titan.md: Adjust for fp_type removal.
22087 * config/rs6000/vsx.md: Remove Xilinx FP support.
22088 (VStype_simple): Delete.
22089 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
22090 * config/rs6000/xfpu.h: Delete.
22091 * config/rs6000/xfpu.md: Delete.
22092 * config/rs6000/xilinx.h: Delete.
22093 * config/rs6000/xilinx.opt: Delete.
22094 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
22095 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
22097 2018-05-04 Tom de Vries <tom@codesourcery.com>
22100 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
22103 2018-05-04 Richard Biener <rguenther@suse.de>
22105 PR middle-end/85627
22106 * tree-complex.c (update_complex_assignment): We are always in SSA form.
22107 (expand_complex_div_wide): Likewise.
22108 (expand_complex_operations_1): Likewise.
22109 (expand_complex_libcall): Preserve EH info of the original stmt.
22110 (tree_lower_complex): Handle removed blocks.
22111 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
22112 on complex multiplication and division libcall builtins.
22114 2018-05-04 Richard Biener <rguenther@suse.de>
22116 PR middle-end/85574
22117 * fold-const.c (negate_expr_p): Restrict negation of operand
22118 zero of a division to when we know that can happen without
22120 (fold_negate_expr_1): Likewise.
22122 2018-05-04 Jakub Jelinek <jakub@redhat.com>
22125 * real.h (real_nextafter): Declare.
22126 * real.c (real_nextafter): New function.
22127 * fold-const-call.c (fold_const_nextafter): New function.
22128 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
22129 CASE_CFN_NEXTTOWARD.
22130 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
22131 even when arg1_mode is different from arg0_mode.
22133 2018-05-03 Nathan Sidwell <nathan@acm.org>
22135 * doc/extend.texi (Deprecated Features): Remove
22136 -ffriend-injection.
22137 (Backwards Compatibility): Likewise.
22138 * doc/invoke.texi (C++ Language Options): Likewise.
22139 (C++ Dialect Options): Likewise.
22141 2018-05-03 Jakub Jelinek <jakub@redhat.com>
22144 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
22145 _mm512_mask_mullox_epi64): New intrinsics.
22147 2018-05-03 Tom de Vries <tom@codesourcery.com>
22150 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22151 dump files): Add offload-tree.
22153 2018-05-03 Richard Biener <rguenther@suse.de>
22155 PR tree-optimization/85615
22156 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
22157 to loops not nested in BBs loop father to avoid creating multi-entry
22160 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22162 PR tree-optimization/70291
22163 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
22164 arguments. Change return type to tree. Emit libcall as a new
22165 statement rather than replacing existing one when inplace_p is true.
22166 (expand_complex_multiplication_components): New function.
22167 (expand_complex_multiplication): Expand floating-point complex
22168 multiplication using the above.
22169 (expand_complex_division): Rename inner_type parameter to type.
22170 Update expand_complex_libcall call-site.
22171 (expand_complex_operations_1): Update expand_complex_multiplication
22172 and expand_complex_division call-sites.
22174 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22177 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22178 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22179 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
22180 the highest significant bit of the shift count mask is clear. In
22181 check whether and[sq]i3 is needed verify that all significant bits
22182 of the shift count other than the highest are set.
22184 2018-05-02 Tom de Vries <tom@codesourcery.com>
22187 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
22188 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
22189 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
22190 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
22191 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
22192 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
22193 __builtin_goacc_parlevel_size.
22195 2018-05-02 Richard Biener <rguenther@suse.de>
22197 PR tree-optimization/85597
22198 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
22199 do not use split vect_get_vec_defs call but call vect_get_slp_defs
22202 2018-05-02 Tom de Vries <tom@codesourcery.com>
22205 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22206 dump files): Add ltrans-tree.
22208 2018-05-02 Tom de Vries <tom@codesourcery.com>
22211 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
22212 dump files): Add wpa-ipa.
22214 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
22216 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
22217 powerpc*-*-linux*paired* target.
22218 * config/rs6000/750cl.h: Delete.
22219 * config/rs6000/paired.h: Delete.
22220 * config/rs6000/paired.md: Delete.
22221 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
22223 * config/rs6000/rs6000-builtin.def: Remove paired float support.
22224 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
22225 comment. Remove paired float support.
22226 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
22227 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
22229 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
22230 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
22232 * config/rs6000/rs6000.c: Remove paired float support.
22233 (paired_expand_vector_init, paired_expand_vector_move,
22234 paired_emit_vector_compare, paired_emit_vector_cond_expr,
22235 (paired_expand_lv_builtin, paired_expand_stv_builtin,
22236 paired_expand_builtin, paired_expand_predicate_builtin,
22237 paired_init_builtins): Delete.
22238 * config/rs6000/rs6000.h: Remove paired float support.
22239 * config/rs6000/rs6000.md: Remove paired float support.
22240 (move_from_CR_ov_bit): Delete.
22241 * config/rs6000/rs6000.opt (mpaired): Delete.
22242 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
22243 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
22245 2018-05-02 Richard Biener <rguenther@suse.de>
22247 PR middle-end/85567
22248 * gimplify.c (gimplify_save_expr): When in SSA form allow
22249 SAVE_EXPRs to compute to SSA vars.
22251 2018-05-02 Jakub Jelinek <jakub@redhat.com>
22254 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
22255 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
22256 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
22257 clobber operands[2], instead use a new pseudo. Formatting fixes.
22259 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
22261 PR tree-optimization/85586
22262 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
22263 exit early for statements in the same group if the accesses are
22266 2018-05-02 Tom de Vries <tom@codesourcery.com>
22269 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
22272 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
22274 PR tree-optimization/85143
22275 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
22277 2018-05-01 Tom de Vries <tom@codesourcery.com>
22280 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
22281 not found" error message.
22283 2018-05-01 Tom de Vries <tom@codesourcery.com>
22286 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
22287 * vec.c (test_ordered_remove_if): New function.
22288 (vec_c_tests): Call test_ordered_remove_if.
22289 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
22290 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
22291 * tree-vect-patterns.c (vect_pattern_recog_1): Use
22292 VEC_ORDERED_REMOVE_IF.
22294 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
22296 PR tree-optimization/82665
22297 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
22298 pointer subtraction where arguments come from a memchr call.
22300 2018-05-01 Jakub Jelinek <jakub@redhat.com>
22302 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
22303 --push-state --as-needed and --pop-state instead of --as-needed and
22304 --no-as-needed if ld supports it.
22305 * configure: Regenerated.
22308 * doc/install.texi2html: Replace _002d with - and _002a with * in
22309 generated html files using sed.
22311 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22314 * gcc-rich-location.c (blank_line_before_p): New function.
22315 (use_new_line): New function.
22316 (gcc_rich_location::add_fixit_insert_formatted): New function.
22317 * gcc-rich-location.h
22318 (gcc_rich_location::add_fixit_insert_formatted): New function.
22320 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22322 * selftest.c (assert_streq): Rename "expected" and "actual" to
22323 "val1" and "val2". Extend NULL-handling to cover both inputs
22324 symmetrically, while still requiring both to be non-NULL for a pass.
22325 * selftest.h (assert_streq): Rename "expected" and "actual" to
22327 (ASSERT_EQ): Likewise.
22328 (ASSERT_EQ_AT): Likewise.
22329 (ASSERT_KNOWN_EQ): Likewise.
22330 (ASSERT_KNOWN_EQ_AT): Likewise.
22331 (ASSERT_NE): Likewise.
22332 (ASSERT_MAYBE_NE): Likewise.
22333 (ASSERT_MAYBE_NE_AT): Likewise.
22334 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
22335 the assertion to pass.
22336 (ASSERT_STREQ_AT): Likewise.
22338 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
22340 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
22341 interaction with -pie.
22343 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22345 * selftest.h: Fix alphabetization of per-source-file selftest
22348 2018-04-30 Jason Merrill <jason@redhat.com>
22350 PR c++/61982 - dead stores to destroyed objects.
22351 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
22354 2018-04-30 Jason Merrill <jason@redhat.com>
22356 * tree.c (build_clobber): New.
22357 * tree.h: Declare it.
22358 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
22360 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22362 * diagnostic-show-locus.c (layout::layout): Update for
22363 location_get_source_line returning a char_span.
22364 (struct char_span): Move to input.h.
22365 (struct correction): Update for fields in char_span becoming
22367 (struct source_line): Update for location_get_source_line
22368 returning a char_span.
22369 (layout::print_line): Likewise.
22370 * edit-context.c (edited_file::print_content): Likewise.
22371 (edited_file::print_diff_hunk): Likewise.
22372 (edited_file::print_run_of_changed_lines): Likewise.
22373 (edited_file::get_num_lines): Likewise.
22374 (edited_line::edited_line): Likewise.
22375 * final.c (asm_show_source): Likewise.
22376 * input.c (location_get_source_line): Convert return type
22377 from const char * to char_span, losing the final "line_len"
22379 (dump_location_info): Update for the above.
22380 (get_substring_ranges_for_loc): Likewise. Use a char_span
22381 when handling the literal within the line.
22382 (test_reading_source_line): Update for location_get_source_line
22383 returning a char_span.
22384 * input.h (class char_span): Move here from
22385 diagnostic-show-locus.c, converting from a struct to a class.
22386 Make data members private.
22387 (char_span::operator bool): New.
22388 (char_span::length): New.
22389 (char_span::get_buffer): New.
22390 (char_span::operator[]): New.
22391 (char_span::subspan): Make const.
22392 (char_span::xstrdup): New.
22393 (location_get_source_line): Convert return type from const char *
22394 to char_span, losing the final "line_size" param.
22396 2018-04-30 Jan Hubicka <jh@suse.cz>
22398 * lto-wrapper.c (ltrans_priorities): New static var.
22399 (cmp_priority): New.
22400 (run_gcc): Read priorities and if doing parallel build order
22401 the Makefile by them.
22403 2018-04-30 David Malcolm <dmalcolm@redhat.com>
22405 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
22407 2018-04-30 Richard Biener <rguenther@suse.de>
22409 * tree-cfg.c (verify_address): Remove base argument, add
22410 flag whether to check TREE_ADDRESSABLE and do that.
22411 (verify_expr): Remove.
22412 (verify_types_in_gimple_reference): Add pieces from verify_expr.
22413 (verify_gimple_assign_single): Likewise.
22414 (verify_gimple_switch): Likewise.
22415 (verify_expr_location_1): Dereference tp once. Add (disabled)
22416 piece from verify_expr.
22417 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
22419 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22421 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
22423 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22425 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
22426 (small_data_pattern): Likewise.
22427 (arc_rewrite_small_data): Likewise.
22428 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
22429 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
22430 (get_symbol_alignment): New function.
22431 (legitimate_small_data_address_p): Likewise.
22432 (legitimate_scaled_address): Update, call
22433 legitimate_small_data_address_p.
22434 (output_sdata): New static variable.
22435 (arc_print_operand): Update how we handle small data operands.
22436 (arc_print_operand_address): Likewise.
22437 (arc_legitimate_address_p): Update, use
22438 legitimate_small_data_address_p.
22439 (arc_rewrite_small_data_p): Remove.
22440 (arc_rewrite_small_data_1): Likewise.
22441 (arc_rewrite_small_data): Likewise.
22442 (small_data_pattern): Likewise.
22443 (compact_sda_memory_operand): Update to use
22444 legitimate_small_data_address_p and get_symbol_alignment.
22445 (prepare_move_operands): Don't rewite sdata pattern.
22446 (prepare_extend_operands): Remove.
22447 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
22449 (zero_extendqisi2): Likewise.
22450 (zero_extendhisi2): Likewise.
22451 (extendqihi2): Likewise.
22452 (extendqisi2): Likewise.
22453 (extendhisi2): Likewise.
22454 (addsi3): Likewise.
22455 (subsi3): Likewise.
22456 (andsi3): Likewise.
22457 * config/arc/constraints.md (Usd): Change it to memory constraint.
22459 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22461 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
22462 as source of std instructions.
22463 * config/arc/arc.md (movsi_insn): Update pattern predicate to
22464 allow 6-bit constants as source for store instructions.
22465 (movdi_insn): Update instruction pattern to allow 6-bit constants
22466 as source for store instructions.
22468 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
22470 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
22472 2018-04-30 Nathan Sidwell <nathan@acm.org>
22473 Sandra Loosemore <sandra@codesourcery.com>
22475 * dumpfile.c (dump_open): Allow '-' for stdout.
22476 * doc/invoke.texi (Developer Options): Document dump filename
22477 determination early. Document stdin/stdout selection.
22479 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
22481 Microblaze Target: PIC data text relative
22483 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
22484 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
22486 * config/microblaze/microblaze.h (microblaze_constant_address_p):
22487 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
22488 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
22489 New addressing mode for data-text relative position indepenedent code.
22490 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
22491 'ADDRESS_SYMBOLIC_TXT_REL'.
22492 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
22493 (microblaze_legitimate_pic_operand): Exclude function calls from
22494 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
22495 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
22497 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22498 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22499 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
22500 for 'address + offset'.
22501 (microblaze_expand_prologue): Add new function prologue call for
22503 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
22504 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
22505 table in case of TARGET_PIC_DATA_TEXT_REL.
22506 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
22507 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
22508 Add new macros 'UNSPEC_TEXT',
22509 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
22510 + exclude function calls from 'UNSPEC_PLT' in case of data text
22512 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22513 new target hook for generating address diff vector tables in case of
22515 * doc/tm.texi : Regenerate.
22516 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
22517 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
22518 of addr diff vector generation.
22519 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22520 target hook definition.
22521 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
22522 Add default function for generate_pic_addr_diff_vec -> flag_pic.
22523 * doc/invoke.texi (Add new pic option): Add new microblaze pic
22524 option for data text relative.
22526 2018-04-30 Richard Biener <rguenther@suse.de>
22528 * tree-chrec.h (evolution_function_is_constant_p): Remove
22530 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
22532 2018-04-30 Richard Biener <rguenther@suse.de>
22535 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
22537 2018-04-30 Richard Biener <rguenther@suse.de>
22539 PR tree-optimization/28364
22540 PR tree-optimization/85275
22541 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
22542 copying first exit test.
22544 2018-04-28 Mark Wielaard <mark@klomp.org>
22546 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
22547 dwarf_version >= 5.
22548 (dwarf_AT): Handle DW_AT_addr_base.
22549 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
22551 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
22554 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
22555 (*ashl<dwi>3_doubleword_mask_1): Ditto.
22556 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
22557 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
22559 2018-04-28 Richard Biener <rguenther@suse.de>
22561 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
22562 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
22563 to reflect use. Only add interesting stmts.
22565 2018-04-27 Martin Jambor <mjambor@suse.cz>
22568 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
22569 the jump function allows for passing through aggregate values.
22571 2018-04-27 David Malcolm <dmalcolm@redhat.com>
22573 * input.h (in_system_header_at): Convert from macro to inline
22575 (from_macro_expansion_at): Likewise.
22576 (from_macro_definition_at): Likewise.
22578 2018-04-27 Jeff Law <law@redhat.com>
22580 * config.gcc: Mark tile* targets as deprecated/obsolete.
22582 2018-04-27 Richard Biener <rguenther@suse.de>
22584 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
22587 2018-04-27 Richard Biener <rguenther@suse.de>
22589 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
22591 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
22593 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
22594 with Yd constraint. Set "preferred_for_speed" attribute from
22595 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
22596 with Yd constraint.
22597 (*movdi_internal): Ditto.
22598 (movti_interunit splitters): Remove
22599 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
22600 (movdi_interunit splitters): Ditto.
22601 * config/i386/constraints.md (Ye): Remove.
22602 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
22604 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22607 * config/aarch64/constraints.md (Usg): Limit to 31.
22608 (Usj): Limit to 63.
22610 2018-04-27 Jakub Jelinek <jakub@redhat.com>
22612 PR tree-optimization/85529
22613 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
22614 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
22615 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
22616 zero extension or masking of the MSB bit.
22617 (optimize_range_tests): Add FIRST_BB argument, pass it through
22618 to optimize_range_tests_var_bound.
22619 (maybe_optimize_range_tests, reassociate_bb): Adjust
22620 optimize_range_tests callers.
22622 2018-04-26 Richard Biener <rguenther@suse.de>
22623 Jakub Jelinek <jakub@redhat.com>
22625 * cgraph.h (symbol_table): Just declare debug method here.
22626 * symtab.c (symbol_table::debug): Define.
22628 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
22630 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
22632 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
22634 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
22635 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
22636 (*movdi_internal): Substitute Yi and Yj constraint with x
22637 and Ym and Yn constraint with y constraint. Update "isa"
22638 attribute and set "preferred_for_speed" attribute from
22639 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
22640 (*movsi_internal): Ditto.
22641 (*movdf_internal): Ditto.
22642 (*movsf_internal): Ditto.
22643 (*zero_extendsidi2): Ditto.
22644 * config/i386/sse.md (vec_set<mode>_0): Ditto.
22645 (sse2_loadld): Ditto.
22646 (*vec_extract<ssevecmodelower>_0): Ditto.
22647 (*vec_extractv4si_0_zext_sse4): Ditto.
22648 (vec_concatv2di): Ditto.
22649 (*vec_dup<mode>): Ditto.
22650 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
22651 * config/i386/constraints.md (Yi): Remove.
22656 2018-04-26 Nathan Sidwell <nathan@acm.org>
22658 * dumpfile.c (dump_open): New.
22659 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
22660 (dump_finish): Detect stdio/stderr by value not name.
22662 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
22664 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
22666 2018-04-26 Tom de Vries <tom@codesourcery.com>
22669 * config/nvptx/nvptx.c (verify_neutering_jumps)
22670 (verify_neutering_labels): New function
22671 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
22673 2018-04-26 Tom de Vries <tom@codesourcery.com>
22676 * config/nvptx/nvptx.c (needs_neutering_p): New function.
22677 (nvptx_single): Use needs_neutering_p to skip over insns that do not
22680 2018-04-26 Richard Biener <rguenther@suse.de>
22681 Tom de Vries <tom@codesourcery.com>
22684 * lto-streamer-out.c (output_function): Fixup loops if required to match
22685 discovery done in the reader.
22687 2018-04-26 Richard Biener <rguenther@suse.de>
22689 PR tree-optimization/85116
22690 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
22691 have a loop exit from the single latch predecessor. Remove
22692 case of header with just condition.
22693 (ch_base::copy_headers): Exclude infinite loops from any
22695 (pass_ch::execute): Record exits.
22697 2018-04-26 Richard Biener <rguenther@suse.de>
22699 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
22700 prologue cost vector and pass it to vect_get_load_cost.
22701 (vect_get_peeling_costs_all_drs): Likewise.
22702 (vect_peeling_hash_get_lowest_cost): Likewise.
22703 (vect_enhance_data_refs_alignment): Likewise.
22705 2018-04-26 Richard Biener <rguenther@suse.de>
22707 PR middle-end/85450
22708 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
22709 checking of integer<->pointer conversions.
22710 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
22711 sign-/zero-extending pointer types.
22712 (expand_omp_for_static_chunk): Likewise.
22714 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
22715 Jean Lee <xiaoyur347@gmail.com>
22717 * config/mips/mips.c (mips_asan_shadow_offset): New function.
22718 (TARGET_ASAN_SHADOW_OFFSET): Define.
22719 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
22720 true for -fsanitize=address.
22722 2018-04-25 Mark Wielaard <mark@klomp.org>
22724 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
22727 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22729 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
22730 than "alu", remove explicit "memory" and "imm_disp" attributes.
22731 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
22733 PR middle-end/85414
22734 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
22735 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
22736 gen_lowpart_no_emit.
22738 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
22741 * config/i386/i386.c (ix86_expand_builtin): Change memory
22742 operand to XI, extend p0 to Pmode.
22743 * config/i386/i386.md: Change unspec volatile and operand
22744 1 mode to XI, change operand 0 mode to P.
22746 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22748 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
22749 GET_MODE_MASK before any checking.
22750 (nds32_can_use_bset_p): Likewise.
22751 (nds32_can_use_btgl_p): Likewise.
22753 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22755 * config/nds32/nds32-doubleword.md: New define_split pattern for
22756 illegal register number.
22758 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22760 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
22762 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22764 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
22766 2018-04-25 Richard Biener <rguenther@suse.de>
22768 * lto-streamer.h (LTO_major_version): Bump to 8.
22770 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22772 * BASE-VER: Set to 9.0.0.
22774 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
22776 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
22777 in __abskf2 and __powikf2.
22779 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22782 * config/aarch64/constraints.md (Usg, Usj): New constraints.
22783 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
22784 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
22785 Use the above on operand 2. Reindent.
22786 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
22788 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
22791 * common/config/i386/i386-common.c (ix86_handle_option): Don't
22793 * config/i386/i386.opt (mcet): Removed.
22794 * doc/install.texi: Remove -mcet documentation.
22795 * doc/invoke.texi: Likewise.
22797 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
22800 * doc/install.texi: Remove -mcet from bootstrap-cet.
22802 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22805 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
22806 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
22810 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
22811 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
22812 containing a CONST_VECTOR.
22814 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
22816 * doc/install.texi: Update newlib dependency for nvptx.
22818 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22821 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
22822 instead of INTVAL when shifting x left.
22824 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
22826 PR tree-optimization/85478
22827 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
22828 vect_grouped_store_supported for single element vectors.
22830 2018-04-24 Richard Biener <rguenther@suse.de>
22833 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
22834 load cost increase to the case of non-constant step.
22836 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22839 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
22840 destination if any_malformed_asm.
22842 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
22844 PR middle-end/85496
22845 * expr.c (store_field): In the bitfield case, if the value comes from
22846 a function call and is returned in registers by means of a PARALLEL,
22847 do not change the mode of the temporary unless BLKmode and VOIDmode.
22849 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
22851 PR rtl-optimization/85423
22852 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
22853 dependencies to debug insns when the previous insn is non-debug.
22855 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
22857 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
22858 enums into a single definition.
22859 (fls): Fix predicates and printing.
22862 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
22864 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
22865 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
22866 and short u6 immediate.
22867 (check_if_valid_sleep_operand): Remove.
22868 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
22870 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22872 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
22873 flag_always_save_lp condition.
22874 * config/nds32/nds32.opt (malways-save-lp): New option.
22876 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22878 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
22879 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
22880 * config/nds32/nds32.h
22881 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
22882 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
22884 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22886 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
22887 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
22889 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22890 Chung-Ju Wu <jasonwucj@gmail.com>
22892 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
22894 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
22895 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
22897 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22899 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22901 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22903 * config/nds32/nds32-protos.h (nds32_data_alignment,
22904 nds32_local_alignment): Declare.
22905 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22906 nds32_local_alignment): New functions.
22907 (TARGET_CONSTANT_ALIGNMENT): Define.
22908 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22910 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22912 * config/nds32/nds32.c
22913 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22914 (TARGET_MODES_TIEABLE_P): Likewise.
22916 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22918 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22919 level Ofast and Og.
22921 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
22922 Chung-Ju Wu <jasonwucj@gmail.com>
22924 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22925 for unaligned access.
22926 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22928 * config/nds32/nds32-intrinsic.md: Likewise.
22929 * config/nds32/nds32_intrinsic.h: Likewise.
22930 * config/nds32/nds32.h (nds32_builtins): Likewise.
22931 * config/nds32/nds32.opt (munaligned-access): New option.
22932 * config/nds32/nds32.c (nds32_asm_file_start): Display
22933 flag_unaligned_access status.
22935 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22937 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22938 -mno-relax is present.
22939 * config/riscv/linux.h (LINK_SPEC): Ditto.
22941 2018-04-20 Martin Sebor <msebor@redhat.com>
22944 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22946 (gimple_fold_builtin_stxcpy_chk): Same.
22947 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22949 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
22952 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22953 __powikf2 when long double is IEEE 128-bit.
22955 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22957 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22958 step to make sure stack always aligned.
22960 2018-04-20 Carl Love <cel@us.ibm.com>
22963 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22964 size check for arg0.
22966 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
22967 Tom de Vries <tom@codesourcery.com>
22970 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22971 Emit insns for calls too.
22972 (nvptx_find_par): Always look for worker-level predecessor insn.
22973 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
22975 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22976 (nvptx_process_pars): Propagate frames for calls.
22978 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
22981 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22983 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22984 (ix86_handle_option): Don't handle OPT_mibt.
22985 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22987 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22989 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22990 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
22991 (ix86_target_macros): Define __CET__ with flag_cf_protection
22992 for -fcf-protection.
22993 * config/i386/i386.c (isa2_opts): Remove -mibt.
22994 * config/i386/i386.h (TARGET_IBT): Removed.
22995 (TARGET_IBT_P): Likewise.
22996 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
22997 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
22998 * config/i386/i386.opt (mcet): Update help message.
22999 (mshstk): Likewise.
23001 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
23002 -mcet as an alias for -mshstk.
23004 2018-04-20 Richard Biener <rguenther@suse.de>
23006 PR middle-end/85475
23007 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
23008 complexity by forcing a single use of the multiply operand.
23010 2018-04-20 Martin Jambor <mjambor@suse.cz>
23013 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
23014 recursion dependency to only apply to non-clones.
23016 2018-04-20 Martin Jambor <mjambor@suse.cz>
23019 * ipa-cp.c (create_specialized_node): Check that clones of
23020 self-recursive edges exist during IPA-CP.
23022 2018-04-19 Toon Moene <toon@moene.org>
23024 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
23027 2018-04-19 Jakub Jelinek <jakub@redhat.com>
23029 PR tree-optimization/85467
23030 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
23031 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
23032 VECTOR_CST element to type.
23034 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23037 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
23038 * config/i386/i386.md (builtin_setjmp_setup): Removed.
23039 (builtin_longjmp): Likewise.
23040 (save_stack_nonlocal): New pattern.
23041 (restore_stack_nonlocal): Likewise.
23043 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23046 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23047 Replace ASM_OUTPUT_LABEL with fprintf.
23049 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
23052 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
23053 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
23054 * config/i386/i386-c.c (ix86_target_macros_internal): Also
23055 define __IBT__ and __SHSTK__ for -fcf-protection.
23056 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
23058 (ix86_trampoline_init): Likewise.
23059 (x86_output_mi_thunk): Likewise.
23060 (ix86_notrack_prefixed_insn_p): Likewise.
23061 (ix86_option_override_internal): Don't disallow -fcf-protection.
23062 * config/i386/i386.md (rdssp<mode>): Also enable for
23064 (incssp<mode>): Likewise.
23065 (nop_endbr): Likewise.
23066 * config/i386/i386.opt (mcet): Change help message to built-in
23069 (mshstk): Likewise.
23070 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
23071 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
23072 enable CET built-in functions.
23074 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
23076 * common/config/i386/i386-common.c
23077 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
23078 OPTION_MASK_ISA_MOVDIRI_UNSET,
23079 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
23080 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
23081 * config.gcc (movdirintrin.h): New header.
23082 * config/i386/cpuid.h (bit_MOVDIRI,
23083 bit_MOVDIR64B): New bits.
23084 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
23086 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
23087 (VOID, PVOID, PCVOID)): New function types.
23088 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
23089 __builtin_ia32_directstoreu_u64,
23090 __builtin_ia32_movdir64b): New builtins.
23091 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
23092 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
23094 (ix86_valid_target_attribute_inner_p): Ditto.
23095 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
23096 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
23097 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
23098 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
23099 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
23100 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
23101 (movdiri<mode>, movdir64b_<mode>): New.
23102 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
23103 * config/i386/immintrin.h: Include movdirintrin.h.
23104 * config/i386/movdirintrin.h: New file.
23105 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
23107 2018-04-19 Richard Biener <rguenther@suse.de>
23109 PR middle-end/85455
23110 * cfg.c (clear_bb_flags): When loop state says we have
23111 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
23113 2018-04-19 Richard Biener <rguenther@suse.de>
23115 PR tree-optimization/84737
23116 * tree-vect-data-refs.c (vect_copy_ref_info): New function
23117 copying restrict info.
23118 (vect_setup_realignment): Use it.
23119 * tree-vectorizer.h (vect_copy_ref_info): Declare.
23120 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
23121 the first DR to all generated stores.
23122 (vectorizable_load): Likewise for loads.
23124 2018-04-19 Jakub Jelinek <jakub@redhat.com>
23126 PR tree-optimization/85446
23127 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
23128 the integral and pointer types to have the same precision.
23130 * doc/install.texi: Document --disable-cet being the default and
23133 2018-04-18 Martin Liska <mliska@suse.cz>
23135 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
23138 2018-04-18 Martin Liska <mliska@suse.cz>
23141 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23144 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23145 arguments if they are comparable.
23147 2018-04-18 Martin Liska <mliska@suse.cz>
23150 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23153 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23156 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
23159 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
23160 ENDBR after calling __morestack.
23162 2018-04-18 David Malcolm <dmalcolm@redhat.com>
23165 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
23166 by using gcc_base_ver to generate a gcc_driver_version, and use
23167 it when generating GCC_DRIVER_NAME.
23168 * configure: Regenerate.
23170 2018-04-18 Jakub Jelinek <jakub@redhat.com>
23173 * config.gcc: Obsolete powerpc*-*-*spe*.
23175 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23178 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
23179 (stabstr_D): Change type of unum from unsigned int to
23180 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
23183 2018-04-17 Jim Wilson <jimw@sifive.com>
23186 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
23187 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
23188 Set arg_pointer_offset after using pretend_args_size.
23190 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23192 PR rtl-optimization/85431
23193 * dse.c (record_store): Ignore zero width stores.
23196 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
23197 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
23198 __builtin_stack_restore rather than after it.
23199 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
23200 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
23201 argument instead of virtual_dynamic_stack_rtx.
23203 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
23205 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
23207 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
23208 Add note to error message to explain internal mapping of overloaded
23209 built-in function name to non-overloaded built-in function name.
23210 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
23213 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23216 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
23217 where the inputs overlap with the output.
23219 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23221 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
23222 (=v, v) alternative and explicit "memory" attribute.
23223 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
23224 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23226 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
23227 "sselog1" type instead of "sselog".
23228 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
23229 "sselog". Remove explicit "memory" attribute.
23230 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
23231 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23233 (vec_extract_hi_v32hi): Merge all alternatives into one, use
23234 "sselog1" type instead of "sselog". Remove explicit "memory"
23236 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
23237 use "sselog1" type instead of "sselog". Remove explicit "memory"
23239 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
23240 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
23242 (vec_extract_hi_v64qi): Merge all alternatives into one, use
23243 "sselog1" type instead of "sselog". Remove explicit "memory"
23245 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
23246 use "sselog1" type instead of "sselog". Remove explicit "memory"
23250 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
23252 PR middle-end/85414
23253 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
23256 2018-04-17 Martin Jambor <mjambor@suse.cz>
23259 * ipa-cp.c (create_specialized_node): Call
23260 expand_all_artificial_thunks if necessary.
23262 2018-04-17 Martin Liska <mliska@suse.cz>
23265 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
23266 in message, remote space in between '_G' and '('.
23268 2018-04-17 Jakub Jelinek <jakub@redhat.com>
23271 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
23272 avx512f_vmcmp<mode>3<round_saeonly_name>,
23273 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
23274 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
23275 avx512f_rndscale<mode><round_saeonly_name>,
23276 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
23277 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
23278 Use %<iptr>2 instead of %2 for -masm=intel.
23279 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
23280 avx512f_vcvttss2usi<round_saeonly_name>,
23281 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
23283 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
23284 avx512f_vcvttsd2usi<round_saeonly_name>,
23285 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
23286 Use %q1 instead of %1 for -masm=intel.
23287 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
23288 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
23289 of %3 for -masm=intel.
23290 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
23292 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
23294 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
23296 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
23297 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
23299 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
23301 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
23302 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
23303 %g1 and one with %0 and %1.
23304 (avx512er_vmrcp28<mode><round_saeonly_name>,
23305 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
23306 %1 for -masm=intel.
23307 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
23308 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
23309 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
23310 of %0 and %{%4%} for -masm=intel.
23311 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
23312 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
23313 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
23314 order of %0 and %{%5%}%{z%} for -masm=intel.
23316 2018-04-17 Jan Hubicka <jh@suse.cz>
23319 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
23321 2018-04-17 Martin Liska <mliska@suse.cz>
23324 * multiple_target.c (create_dispatcher_calls): Set apostrophes
23325 for target_clone error message. Make default implementation
23326 clone to be a local declaration.
23327 (separate_attrs): Add new argument and check for an empty
23329 (expand_target_clones): Handle it.
23330 (ipa_target_clone): Make redirection just for target_clones
23333 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
23334 Tom de Vries <tom@codesourcery.com>
23336 PR middle-end/84955
23337 * omp-expand.c (expand_oacc_for): Add dummy false branch for
23338 tiled basic blocks without omp continue statements.
23340 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
23343 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
23344 vec_extract expression as having side effects to make sure it gets
23347 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
23350 * config/i386/i386.c (get_builtin_code_for_version): Check
23353 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
23356 * config.gcc: Support "skylake".
23357 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
23359 * config/i386/i386.c (m_SKYLAKE): Define.
23360 (processor_target_table): Add "skylake".
23361 (ix86_option_override_internal): Add "skylake".
23362 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
23363 PROCESSOR_CANNONLAKE.
23364 (get_builtin_code_for_version): Fix priority for
23365 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
23366 PROCESSOR_SKYLAKE-AVX512.
23367 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
23368 (processor_type): Add PROCESSOR_SKYLAKE.
23370 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
23371 Jason Merrill <jason@redhat.com>
23374 * convert.c (convert_to_integer_1): Use direct recursion for
23375 enumeral types and types with a precision less than the number
23376 of bits in their mode.
23378 2018-04-16 Julia Koval <julia.koval@intel.com>
23381 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
23382 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
23384 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
23387 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
23388 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
23389 and -mno-direct-move.
23391 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
23394 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
23395 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
23396 Ensure negative shifts result in {0}.
23398 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
23400 PR rtl-optimization/79916
23401 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
23402 regs (if any) to define how to gnerate SD moves when LRA is in
23405 2018-04-13 Jakub Jelinek <jakub@redhat.com>
23407 PR rtl-optimization/85393
23408 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
23409 * except.c (expand_dw2_landing_pad_for_region): Make static.
23410 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
23411 a label and unconditional jump to old_bb, rather than
23412 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
23415 PR rtl-optimization/85376
23416 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
23417 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
23418 instead of a specific value.
23420 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
23421 Bin Cheng <bin.cheng@arm.com>
23423 PR tree-optimization/82965
23424 PR tree-optimization/83991
23425 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
23426 by_profile_only parameter.
23427 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
23428 information if the loop was predicted to iterate too many times.
23429 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
23431 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
23434 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
23437 2018-04-13 Martin Liska <mliska@suse.cz>
23438 Jakub Jelinek <jakub@redhat.com>
23440 PR middle-end/81657
23441 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
23442 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
23443 * builtins.c (expand_builtin_memory_copy_args): Use
23444 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
23445 handle dest_addr == pc_rtx.
23447 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
23450 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
23451 asked to not generate direct moves.
23452 (fix_trunc<mode>si2_stfiwx): Similar.
23453 (fix_trunc<mode>si2_internal): Similar.
23455 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23458 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
23459 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
23460 lookup if dest in some wider mode is known to be const0_rtx and
23461 if so, record permanent equivalence for it to be ZERO_EXTEND of
23462 the narrower mode destination.
23464 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
23466 * lto-streamer-out.c (output_function): Revert 259346.
23467 * omp-expand.c (expand_oacc_for): Likewise.
23469 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
23471 PR rtl-optimization/85354
23472 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
23473 * sel-sched.c (sel_global_init): ... here.
23475 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
23478 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
23479 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
23480 mode for PE-COFF targets.
23481 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
23482 (i386_pe_asm_lto_end): Likewise.
23483 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
23484 (TARGET_ASM_LTO_END): Likewise.
23485 * config/i386/winnt.c (saved_debug_info_level): New static variable.
23486 (i386_pe_asm_lto_start): New function.
23487 (i386_pe_asm_lto_end): Likewise.
23489 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
23490 Richard Biener <rguenther@suse.de>
23492 PR middle-end/84955
23493 * lto-streamer-out.c (output_function): Fix CFG loop state before
23495 * omp-expand.c (expand_oacc_for): Handle calls to internal
23496 functions like regular functions.
23498 2018-04-12 Richard Biener <rguenther@suse.de>
23501 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
23502 for the early LTO debug to properly generate references to it
23503 during DIE emission. Do not re-use that for the skeleton for
23505 (dwarf2out_early_finish): Likewise.
23507 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23510 * config/i386/sse.md
23511 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
23512 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
23513 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
23514 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
23515 and output is a reg, avoid creating invalid lowpart subreg, but
23516 instead split into a 512-bit move. Don't split if not AVX512VL,
23517 input is xmm16+ reg and output is a mem.
23518 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
23519 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
23520 xmm16+ reg and output is a mem.
23522 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23524 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
23525 also for flag_dwarf2_cfi_asm.
23527 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23529 PR rtl-optimization/85342
23530 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
23531 a bool scalar var inside of the loop instead. Don't try to update
23532 recog_data.operand after failed apply_change_group.
23534 2018-04-12 Tom de Vries <tom@codesourcery.com>
23537 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
23538 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
23539 array with flexible array member as array without given dimension.
23540 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
23541 argument for undefined param to true.
23543 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
23546 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23547 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
23548 from PowerPC section.
23549 * config/rs6000/sysv4.opt (mcall-): Improve help text.
23550 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
23551 help text that is too long.
23552 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
23553 help text that is too long.
23554 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
23555 help text that is too long.
23557 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
23559 * config/alpha/alpha.md (stack_probe_internal): Rename
23560 from "probe_stack". Update all callers.
23562 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23564 PR rtl-optimization/84566
23565 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
23566 sched_macro_fuse_insns.
23568 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23571 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
23572 (compute_block_dependences): ... from here.
23574 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23576 PR tree-optimization/85331
23577 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
23578 from int to HOST_WIDE_INT.
23580 2018-04-11 Martin Jambor <mjambor@suse.cz>
23583 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
23584 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
23585 not the same as the source val.
23586 (cgraph_edge_brings_value_p): New parameter.
23587 (gather_edges_for_value): Pass destination value to
23588 cgraph_edge_brings_value_p.
23589 (perhaps_add_new_callers): Likewise.
23590 (get_info_about_necessary_edges): Likewise and exclude values brought
23591 only by self-recursive edges.
23592 (create_specialized_node): Redirect only clones of self-calling edges.
23593 (+self_recursive_pass_through_p): New function.
23594 (find_more_scalar_values_for_callers_subset): Use it.
23595 (find_aggregate_values_for_callers_subset): Likewise.
23596 (known_aggs_to_agg_replacement_list): Removed.
23597 (decide_whether_version_node): Re-calculate known constants for all
23598 remaining context clones.
23600 2018-04-11 Richard Biener <rguenther@suse.de>
23603 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
23604 from early DWARF output.
23605 (dwarf2out_early_finish): Output line info unconditionally into
23606 early DWARF and add reference to it.
23608 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23611 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
23612 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
23613 other than V2DFmode using iptr mode attribute.
23614 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
23616 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23618 PR rtl-optimization/84659
23619 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
23621 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23624 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
23626 (output_loc_list): Pass address of a dummy size variable even in the
23627 locview handling loop.
23628 (index_location_lists): Add comment on why skip_loc_list_entry can't
23631 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
23634 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
23637 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
23640 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23641 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
23642 and -mstring-compare-inline-limit.
23644 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23647 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
23648 for stack clash protection in a register whenever we need it to be in
23651 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23653 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
23654 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
23656 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23659 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
23661 (mlong-double-): Ditto.
23662 * config/rs6000/sysv4.opt (msdata=): Ditto.
23663 (mtls-size=): Ditto.
23665 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23667 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
23668 erroneous entries for
23669 "vector int vec_ldl (int, long int *)", and
23670 "vector unsigned int vec_ldl (int, unsigned long int *)".
23671 Add comments and entries for
23672 "vector bool char vec_ldl (int, bool char *)",
23673 "vector bool short vec_ldl (int, bool short *)",
23674 "vector bool int vec_ldl (int, bool int *)",
23675 "vector bool long long vec_ldl (int, bool long long *)",
23676 "vector pixel vec_ldl (int, pixel *)",
23677 "vector long long vec_ldl (int, long long *)",
23678 "vector unsigned long long vec_ldl (int, unsigned long long *)".
23679 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
23680 type tree bool_long_long_type_node and correct definition of
23681 bool_V2DI_type_node to make reference to this new type tree.
23682 (rs6000_mangle_type): Replace erroneous reference to
23683 bool_long_type_node with bool_long_long_type_node.
23684 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
23685 comments to emphasize sign distinctions for char and int types and
23686 replace RS6000_BTI_bool_long constant with
23687 RS6000_BTI_bool_long_long constant. Also add comment to restrict
23688 use of RS6000_BTI_pixel.
23689 (bool_long_type_node): Remove this macro definition.
23690 (bool_long_long_type_node): New macro definition
23692 2018-04-10 Jakub Jelinek <jakub@redhat.com>
23694 PR rtl-optimization/85300
23695 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
23696 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
23697 simplify_unary_operation fails.
23699 2018-04-10 Martin Liska <mliska@suse.cz>
23701 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
23702 cgraph_edge and ipa_ref.
23704 2018-04-10 Jakub Jelinek <jakub@redhat.com>
23708 * config/i386/sse.md
23709 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
23710 computation of the VEC_MERGE selector from mask.
23711 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
23712 Fix decoding of the VEC_MERGE selector into mask.
23714 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
23716 PR tree-optimization/85286
23717 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
23719 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
23721 * final.c (final_1): Set insn_last_address as well as
23722 insn_current_address.
23724 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23727 * explow.c (emit_stack_probe): Call validize_mem on memory location
23728 before passing it to gen_probe_stack. Create address operand and
23729 legitimize it for the probe_stack_address case.
23731 2018-04-09 Jan Hubicka <jh@suse.cz>
23734 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
23735 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
23736 * tree.c (free_lang_data_in_type): Fix handling of binfos;
23738 (free_lang_data): Rebuild type inheritance graph.
23740 2018-04-09 Martin Sebor <msebor@redhat.com>
23742 * invoke.texi (-finline-small-functions): Mention other optimization
23744 (-findirect-inlining, -fpartial-inlining): Same.
23745 (-finline-functions-called-once): Same.
23746 (-freorder-blocks-and-partition): Same.
23748 2018-04-09 Jan Hubicka <jh@suse.cz>
23751 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
23752 jumps; choose last target that matches the criteria (i.e.
23753 no partition changes for non-crossing jumps).
23754 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
23755 support for redirecting crossing jumps to non-crossing.
23757 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
23759 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
23760 also for naked functions.
23762 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
23764 * config/arc/arc.md (add_shift): New pattern.
23765 (add_shift2): Likewise.
23766 (sub_shift): Likewise.
23767 (sub_shift_cmp0_noout): Likewise.
23768 (compare_si_ashiftsi): Likewise.
23769 (xbfu_cmp0_noout): New combine pattern.
23770 (xbfu_cmp0"): Likewise.
23771 (movsi_set_cc_insn): Place the predicable variant first.
23772 (commutative_binary_cmp0_noout): Remove clobber.
23773 (commutative_binary_cmp0): New pattern.
23774 (noncommutative_binary_cmp0): Likewise.
23775 (noncommutative_binary_cmp0_noout): Likewise.
23776 (noncommutative_binary_comparison_result_used): Removed.
23777 (rsub_cmp0): New pattern.
23778 (rsub_cmp0_noout): Likewise.
23779 (extzvsi): Changed, keep only meaningful variants.
23780 (SQH, SEZ): New iterators.
23781 (SQH_postfix): New mode attribute.
23782 (SEZ_prefix): New code attribute.
23783 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
23784 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
23785 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
23786 of numerical value.
23787 (noncommutative_operator): Check the availability of barrel
23790 2018-04-09 Richard Biener <rguenther@suse.de>
23792 PR tree-optimization/85284
23793 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
23794 Only use the niter constraining form of simple_iv when the exit
23795 is always executed.
23797 2018-04-09 Tom de Vries <tom@codesourcery.com>
23800 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23801 (define_expand "*memory_barrier"): New define_expand.
23802 (define_insn "memory_barrier"): New insn.
23804 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23806 PR rtl-optimization/80463
23807 PR rtl-optimization/83972
23808 PR rtl-optimization/83480
23810 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
23811 correct producer for the insn.
23812 (tidy_control_flow): Fixup seqnos in case of debug insns.
23814 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23816 PR rtl-optimization/83913
23818 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
23819 different sched-times when merging exprs.
23821 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23823 PR rtl-optimization/83962
23825 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
23826 tidy_fallthru_edge and tidy_control_flow.
23828 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23830 PR rtl-optimization/83530
23832 * sel-sched.c (force_next_insn): New global variable.
23833 (remove_insn_for_debug): When force_next_insn is true, also leave only
23834 next insn in the ready list.
23835 (sel_sched_region): When the region wasn't scheduled, make another pass
23836 over it with force_next_insn set to 1.
23838 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23840 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
23842 * config/nds32/constants.md (unspec_volatile_element): Add enum values
23843 for interrupt control.
23844 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23845 functions for interrupt control.
23846 * config/nds32/nds32-intrinsic.md: Likewise.
23847 * config/nds32/nds32_intrinsic.h: Likewise.
23848 * config/nds32/nds32.h (nds32_builtins): Likewise.
23850 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23852 * config/nds32/nds32.c (nds32_init_machine_status,
23853 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
23854 strict_aligned_p field.
23855 (nds32_expand_to_rtl_hook): New function.
23856 (TARGET_EXPAND_TO_RTL_HOOK): Define.
23857 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
23859 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23860 Chung-Ju Wu <jasonwucj@gmail.com>
23862 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
23863 * config/nds32/nds32-n7.md: New file.
23864 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
23865 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
23867 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
23868 * config/nds32/nds32.md (pipeline_model): Add n7.
23869 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
23870 * config/nds32/pipelines.md: Include n7 settings.
23872 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23873 Chung-Ju Wu <jasonwucj@gmail.com>
23875 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
23876 * config/nds32/nds32-e8.md: New file.
23877 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
23878 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
23880 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
23881 * config/nds32/nds32.md (pipeline_model): Add e8.
23882 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
23883 * config/nds32/pipelines.md: Include e8 settings.
23885 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23886 Chung-Ju Wu <jasonwucj@gmail.com>
23888 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
23889 * config/nds32/nds32-n8.md: New file.
23890 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
23891 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
23893 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
23894 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
23895 * config/nds32/nds32.md (pipeline_model): Add n8.
23896 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
23897 * config/nds32/pipelines.md: Include n8 settings.
23899 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23900 Chung-Ju Wu <jasonwucj@gmail.com>
23902 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23903 * config/nds32/nds32-n9-2r1w.md: New file.
23904 * config/nds32/nds32-n9-3r2w.md: New file.
23905 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23906 nds32_register_ports): New or modify for cpu n9.
23907 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23909 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23910 * config/nds32/nds32-utils.c: New file.
23911 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23912 TARGET_MUL_SLOW): Define.
23913 * config/nds32/nds32.md (pipeline_model): New attribute.
23914 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23915 New options that support cpu n9.
23916 * config/nds32/pipelines.md: Include n9 settings.
23917 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23919 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23921 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23922 information if necessary.
23923 (output_cond_branch_compare_zero): Likewise.
23924 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23925 (nds32_target_alignment): Refine for alignment.
23926 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23927 (FUNCTION_BOUNDARY): Modify.
23928 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23930 * config/nds32/nds32.opt (malways-align, malign-functions): New.
23932 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23934 * config/nds32/constants.md (unspec_volatile_element): Add values for
23935 TLB operation and data prefetch.
23936 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23937 functions for TLB operation and data prefetch.
23938 * config/nds32/nds32-intrinsic.md: Likewise.
23939 * config/nds32/nds32_intrinsic.h: Likewise.
23940 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23941 (nds32_print_operand): Likewise.
23942 * config/nds32/nds32.h (nds32_builtins): Likewise.
23944 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
23945 Andrew Pinski <pinsika@gcc.gnu.org>
23947 PR middle-end/82976
23948 * match.pd: Use constant_boolean_node of correct type instead of
23949 boolean_true_node or boolean_false_node for simplifying
23950 pointer comparisons to zero.
23952 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23954 PR tree-optimization/80021
23955 * tree.c (verify_type_variant): Make error call in verify_variant_match
23956 translatable and remove final full stop.
23958 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23960 * config/nds32/constants.md (unspec_volatile_element): Add
23961 UNSPEC_VOLATILE_EH_RETURN.
23962 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23963 nds32_output_stack_pop): Support dwarf exception handling process.
23964 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23965 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23966 exception handling process.
23967 (nds32_compute_stack_frame): Likewise.
23968 (nds32_return_addr_rtx): Likewise.
23969 (nds32_initial_elimination_offset): Likewise.
23970 (nds32_expand_prologue): Likewise.
23971 (nds32_expand_epilogue): Likewise.
23972 (nds32_dynamic_chain_address): New function.
23973 * config/nds32/nds32.h (machine_function): Add fields for dwarf
23974 exception handling.
23975 (DYNAMIC_CHAIN_ADDRESS): Define.
23976 (EH_RETURN_DATA_REGNO): Define.
23977 (EH_RETURN_STACKADJ_RTX): Define.
23978 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23979 patterns for dwarf exception handling.
23981 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23983 * config/nds32/nds32.h: Clean up obsolete macros.
23985 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23987 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23988 Add enum values for particular instructions.
23989 * config/nds32/nds32-intrinsic.c: Implementation of expanding
23990 particular intrinsic functions.
23991 * config/nds32/nds32-intrinsic.md: Likewise.
23992 * config/nds32/nds32_intrinsic.h: Likewise.
23993 * config/nds32/nds32.h (nds32_builtins): Likewise.
23994 * config/nds32/nds32.md (type): Add pbsad and pbsada.
23995 (btst, ave): New patterns for particular instructions.
23997 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23999 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
24000 Add enum values for atomic load/store and memory sync.
24001 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
24003 * config/nds32/nds32-intrinsic.md: Likewise.
24004 * config/nds32/nds32_intrinsic.h: Likewise.
24005 * config/nds32/nds32.h (nds32_builtins): Likewise.
24007 2018-04-07 Jakub Jelinek <jakub@redhat.com>
24009 PR tree-optimization/85257
24010 * fold-const.c (native_encode_vector): If not all elts could fit
24011 and off is -1, return 0 rather than offset.
24012 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
24013 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
24014 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
24015 adjust buffer in native_interpret_expr call.
24017 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24019 * config/nds32/constants.md (unspec_volatile_element): Add cache
24020 control enum values.
24021 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
24022 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
24023 * config/nds32/nds32.c (nds32_cctl_names): New.
24024 (nds32_print_operand): Handle cache control register names.
24025 * config/nds32/nds32.h (nds32_builtins): New enum values.
24026 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
24028 * config/nds32/nds32.md (type): Add mmu.
24029 * config/nds32/pipelines.md (simple_insn): Add mmu.
24031 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24033 * config/nds32/nds32.md (type): Remove call.
24034 * config/nds32/pipelines.md (simple_insn): Likewise.
24036 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24038 * config/nds32/constants.md (unspec_volatile_element): Add
24039 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
24040 UNSPEC_VOLATILE_FMFCFG.
24041 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
24042 description for fmfcfg and fmfcsr.
24043 (bdesc_1arg): Add fmtcsr.
24044 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
24045 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
24046 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
24047 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
24048 unspec_fmfcfg): New patterns.
24049 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
24050 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
24051 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
24052 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
24053 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
24054 __nds32__fmfcfg): Define.
24056 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
24058 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
24059 intrinsic register names.
24060 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
24061 intrinsic register enum values and macros.
24063 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
24065 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
24066 for load/store addressing form.
24067 (nds32_print_operand_address): Likewise.
24069 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
24072 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
24073 based on LABEL_REF. Remove useless assertion.
24074 (pic_address_needs_scratch): Fix formatting.
24075 (sparc_legitimize_pic_address): Minor tweaks.
24076 (sparc_delegitimize_address): Adjust assertion accordingly.
24077 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
24078 into symbolic_operand.
24079 (movsi_high_pic_label_ref): Likewise.
24080 (movsi_lo_sum_pic_label_ref): Likewise.
24081 (movdi_pic_label_ref): Likewise.
24082 (movdi_high_pic_label_ref): Likewise.
24083 (movdi_lo_sum_pic_label_ref): Likewise.
24085 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
24087 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
24088 custom LIB_SPEC setup.
24090 2018-04-06 Ruslan Bukin <br@bsdpad.com>
24091 Kito Cheng <kito.cheng@gmail.com>
24093 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
24094 * config/riscv/freebsd.h: New.
24096 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24098 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
24099 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
24102 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24103 Kito Cheng <kito.cheng@gmail.com>
24105 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
24106 nds32_output_call, nds32_symbol_binds_local_p): New functions.
24107 * config/nds32/nds32-protos.h (nds32_output_call,
24108 nds32_output_return): Declare.
24109 * config/nds32/nds32.md: Refine all the call and return patterns.
24111 2018-04-06 Jakub Jelinek <jakub@redhat.com>
24114 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
24115 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
24117 PR rtl-optimization/84872
24118 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
24119 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
24120 EDGE_CROSSING edge.
24122 2018-04-06 Tamar Christina <tamar.christina@arm.com>
24124 * expr.c (copy_blkmode_to_reg): Revert 254862.
24125 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
24127 2018-04-06 Richard Biener <rguenther@suse.de>
24129 PR middle-end/85244
24130 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
24131 after seeing a component reference with an adjacent field. Treat
24132 refs to arrays at struct end of external decls similar to
24133 refs to unconstrained commons.
24135 2018-04-06 Jakub Jelinek <jakub@redhat.com>
24138 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
24139 look through SAVE_EXPRs with non-side-effects argument. Adjust
24141 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
24144 2018-04-06 Richard Biener <rguenther@suse.de>
24146 PR middle-end/85180
24147 * alias.c (find_base_term): New wrapper around find_base_term
24148 unwinding CSELIB_VAL_PTR changes.
24149 (find_base_term): Do not restore CSELIB_VAL_PTR during the
24152 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24154 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
24156 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
24157 constant definitions.
24158 ("nop"): lr 0,0 -> nopr r0
24159 ("nop_lr0", "nop_lr1"): New insn definitions.
24161 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
24163 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
24164 NDS32_V3PUSH_AVAILABLE_P macro.
24166 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
24167 Chung-Ju Wu <jasonwucj@gmail.com>
24169 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
24170 (nds32*-*-*): Add float and fpu_config into supported_defaults.
24171 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
24172 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
24173 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
24174 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
24175 * config/nds32/constraints.md: New constraints and checking for hard
24176 float configuration.
24177 * config/nds32/iterators.md: New mode iterator and attribute for hard
24178 float configuration.
24179 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
24181 * config/nds32/nds32-fpu.md: New file.
24182 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
24183 deal with hard float code generation.
24184 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
24186 (abi_type, float_reg_number): New enum type.
24187 * config/nds32/nds32-predicates.c: New predicates for hard float.
24188 * config/nds32/nds32-protos.h: Declare functions for hard float.
24189 * config/nds32/nds32.c: Implementation for hard float configuration.
24190 * config/nds32/nds32.h: Definitions for hard float configuration.
24191 * config/nds32/nds32.md: Include hard float machine description and
24192 modify patterns for hard float configuration.
24193 * config/nds32/nds32.opt: New options for hard float configuration.
24194 * config/nds32/predicates.md: New predicates for hard float
24197 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
24199 * common/config/nds32/nds32-common.c
24200 (nds32_option_optimization_table): Enable -mreleax-hint by default.
24202 2018-04-05 Jakub Jelinek <jakub@redhat.com>
24204 PR middle-end/85195
24205 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
24206 CONSTRUCTOR_ELT (ctor, ...)->value.
24208 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
24211 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
24213 2018-04-05 Tom de Vries <tom@codesourcery.com>
24216 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
24219 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24220 Kito Cheng <kito.cheng@gmail.com>
24222 * config/nds32/constraints.md (U33): Fine-tune checking condition.
24223 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
24224 * config/nds32/nds32.h (nds32_16bit_address_type): Add
24225 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
24227 2018-04-05 Shiva Chen <shiva0217@gmail.com>
24228 Kito Cheng <kito.cheng@gmail.com>
24230 * config/nds32/constraints.md (Ufe): New memory constraint.
24231 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
24232 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
24233 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
24235 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
24236 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
24238 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24240 * config/nds32/nds32.md: Use optimize_size in the condition for
24241 alu-shift instructions.
24243 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24245 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
24247 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24249 * config/nds32/nds32.md (negsi2): Refine pattern.
24251 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24252 Chung-Ju Wu <jasonwucj@gmail.com>
24254 * config/nds32/iterators.md (shift_rotate): New code iterator.
24255 (shift): New code attribute.
24256 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
24257 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
24258 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
24259 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
24260 bit-wise operations.
24261 (andsi3, *andsi3): Ditto.
24262 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
24263 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
24264 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
24265 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
24266 nds32_ior_operand, nds32_xor_operand): New predicates.
24268 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24270 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
24271 (addsi3, subsi3): ... this.
24273 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24275 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
24277 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24279 * config/nds32/nds32.md: Adjust indention.
24281 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
24283 * config/nds32/nds32.md (feature): New attribute.
24285 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
24287 * config/nds32/nds32.md (subtype): New attribute.
24289 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
24292 * config/arm/arm-builtins.c (arm_expand_builtin): Change
24293 expansion to perform a bitwise AND of the argument followed by a
24294 boolean negation of the result.
24296 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
24298 PR rtl-optimization/84878
24299 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
24300 the basic block. Assert the use reference is not artificial and that
24301 it has an associated insn.
24303 2018-04-04 Michael Matz <matz@suse.de>
24305 * builtins.c (compute_objsize): Pass correct operand
24306 to array_at_struct_end_p.
24308 2018-04-04 Richard Biener <rguenther@suse.de>
24311 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
24312 from contexts for DINFO_LEVEL_TERSE and below.
24314 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24316 * config/nds32/nds32-doubleword.md (move_<mode>): Require
24317 resiter_operand condition.
24318 * config/nds32/nds32.md (*move<mode>): Ditto.
24320 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24321 Monk Chiang <sh.chiang04@gmail.com>
24323 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
24325 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24327 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
24329 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24330 Kito Cheng <kito.cheng@gmail.com>
24332 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
24333 nds32_cond_code_str, output_cond_branch,
24334 output_cond_branch_compare_zero, nds32_expand_cbranch,
24335 nds32_expand_cstore, nds32_expand_movcc,
24336 nds32_output_cbranchsi4_equality_zero,
24337 nds32_output_cbranchsi4_equality_reg,
24338 nds32_output_cbranchsi4_equality_reg_or_const_int,
24339 nds32_output_cbranchsi4_greater_less_zero: New functions.
24340 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
24341 nds32_expand_cstore, nds32_expand_movcc,
24342 nds32_output_cbranchsi4_equality_zero,
24343 nds32_output_cbranchsi4_equality_reg,
24344 nds32_output_cbranchsi4_equality_reg_or_const_int,
24345 nds32_output_cbranchsi4_greater_less_zero): Declare.
24346 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
24347 nds32_rimm11s_operand): New predicates.
24348 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
24349 * config/nds32/nds32.md: Rewrite all the branch and conditional move
24352 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
24354 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
24355 * config/nds32/nds32.md: Ditto.
24356 * config/nds32/pipelines.md: Ditto.
24358 2018-04-04 Richard Biener <rguenther@suse.de>
24360 PR tree-optimization/85168
24361 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
24362 propagating abnormals.
24364 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24366 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
24368 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
24369 Kito Cheng <kito.cheng@gmail.com>
24371 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
24372 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
24373 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
24374 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
24375 * config/nds32/nds32.md (sibcall_internal): New.
24376 (sibcall_register): Remove.
24377 (sibcall_immediate): Remove.
24378 (sibcall_value_internal): New.
24379 (sibcall_value_register): Remove.
24380 (sibcall_value_immediate): Remove.
24381 * config/nds32/predicates.md (nds32_general_register_operand): New.
24382 (nds32_call_address_operand): New.
24384 2018-04-03 Jakub Jelinek <jakub@redhat.com>
24386 PR rtl-optimization/85167
24387 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
24388 bb_defs if *split_p, instead preinitialize it to NULL.
24390 PR tree-optimization/85156
24391 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
24392 evaluating the argument multiple times.
24394 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
24396 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
24398 (_mm_cvtpd_ps): Likewise.
24399 (_mm_cvttpd_epi32): Likewise.
24400 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
24401 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
24402 vector, pixel, and bool following altivec.h include.
24404 2018-04-03 Martin Sebor <msebor@redhat.com>
24406 * doc/extend.texi (Common Function Attributes): Clarify.
24407 (const attribute): Likewise.
24408 (pure attribute): Likewise.
24410 2018-04-03 Jakub Jelinek <jakub@redhat.com>
24413 * config/i386/i386.c (ix86_expand_vector_set): Use
24414 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
24416 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
24418 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
24419 instructions when changing rounding bits to preserve precision bits
24420 in the x87 control word.
24422 2018-04-03 Martin Liska <mliska@suse.cz>
24424 PR tree-optimization/82491
24425 * rtl.h (strip_offset_and_add): Replace += suboffset with
24426 poly_uint64 () + suboffset.
24428 2018-03-29 Martin Liska <mliska@suse.cz>
24429 Martin Jambor <mjambor@suse.cz>
24432 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
24433 param_type is not an integral or pointer type.
24435 2018-04-03 Richard Biener <rguenther@suse.de>
24437 * sese.h (recompute_all_dominators): Remove.
24439 2018-04-02 Martin Sebor <msebor@redhat.com>
24441 * doc/invoke.texi (-Wrestrict): Fix typos.
24443 2018-04-02 Jim Wilson <jimw@sifive.com>
24445 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
24446 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
24447 (<optab>di3, <optab>si3_extend): Likewise.
24448 (<optab>si3_mask, <optab>si3_mask_1): New.
24449 (<optab>di3_mask, <optab>di3_mask_1): New.
24450 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
24451 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
24452 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
24454 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
24456 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
24459 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
24461 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
24462 (nds32_canonicalize_comparison): New function.
24464 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24465 Kito Cheng <kito.cheng@gmail.com>
24466 Kuan-Lin Chen <kuanlinchentw@gmail.com>
24468 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
24469 * config/nds32/constants.md (unspec_volatile_element): Add
24470 UNSPEC_VOLATILE_RELAX_GROUP.
24471 * config/nds32/nds32-relax-opt.c: New file.
24472 * config/nds32/nds32-predicates.c
24473 (nds32_symbol_load_store_p): New function.
24474 * config/nds32/nds32-protos.h
24475 (nds32_symbol_load_store_p): Declare function.
24476 (make_pass_nds32_relax_opt): Declare new rtl pass function.
24477 * config/nds32/nds32.c
24478 (nds32_register_pass): New function to register pass.
24479 (nds32_register_passes): New function to register passes.
24480 * config/nds32/nds32.md (relax_group): New pattern.
24481 * config/nds32/nds32.opt (mrelax-hint): New option.
24482 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
24484 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
24486 * config/nds32/t-nds32: Modify files dependency.
24488 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24490 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
24491 (PROFILE_HOOK): Define its implementation.
24493 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24495 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
24496 type and 32-bit size.
24498 2018-04-01 Jakub Jelinek <jakub@redhat.com>
24500 PR middle-end/85090
24501 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
24502 (V_128_256): New mode iterator.
24503 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
24504 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
24505 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
24507 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
24508 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
24510 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
24513 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
24514 NaN inputs correctly.
24516 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
24519 * config/rs6000/vsx.md (??r): New mode attribute.
24520 (*vsx_mov<mode>_64bit): Use it.
24521 (*vsx_mov<mode>_32bit): Likewise.
24523 2018-03-30 Martin Sebor <msebor@redhat.com>
24525 PR tree-optimization/84818
24526 * builtins.c (check_access): Use warning_n.
24528 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24531 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
24533 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
24536 2018-03-30 Julia Koval <julia.koval@intel.com>
24539 * x86-tune.def (movx, partial_reg_dependency): Enable for
24542 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
24544 PR inline-asm/84985
24545 * lra-constraints.c (process_alt_operands): Move setting
24546 this_alternative_matches below.
24548 2018-03-29 Martin Liska <mliska@suse.cz>
24551 * doc/invoke.texi: Document how LTO works with debug info.
24552 Describe auto-load support of binutils. Mention 'x86-64'
24553 as valid option value of -march option.
24555 2018-03-29 Jakub Jelinek <jakub@redhat.com>
24557 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
24560 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
24561 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
24562 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
24565 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
24568 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
24569 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
24570 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
24571 for RS6000_BTM_POWERPC64.
24572 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
24573 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
24574 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
24577 (DIVDEU): Likewise.
24579 2018-03-28 Carl Love <cel@us.ibm.com>
24582 2017-09-27 Carl Love <cel@us.ibm.com>
24584 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
24585 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
24586 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
24589 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24591 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
24592 instead of __vector bool.
24593 (_mm_max_pu8): Likewise.
24594 (_mm_min_pi16): Likewise.
24596 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
24599 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
24600 (DIVWEUO): Likewise.
24601 (DIVDEO): Likewise.
24602 (DIVDEUO): Likewise.
24603 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
24604 DIVWEUO and DIVDEUO.
24605 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
24606 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
24607 (div_extend): Likewise.
24608 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
24610 (__builtin_divweuo): Likewise.
24611 (__builtin_divdeo): Likewise.
24612 (__builtin_divdeuo): Likewise.
24614 2018-03-28 Jakub Jelinek <jakub@redhat.com>
24617 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
24618 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
24620 PR tree-optimization/82004
24621 * gimple-match-head.c (optimize_pow_to_exp): New function.
24622 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
24623 Don't fold to exp if optimize_pow_to_exp is false.
24625 2018-03-28 Martin Liska <mliska@suse.cz>
24628 * calls.c (initialize_argument_information): Fix trailing space.
24629 * common.opt: Fix typo and provide better explanation for
24630 -fsanitize-coverage option.
24631 * config/i386/i386.opt: Fix typo.
24633 2018-03-28 Jakub Jelinek <jakub@redhat.com>
24634 Martin Liska <mliska@suse.cz>
24637 * gimplify.c (asan_poison_variable): Don't do the check for
24638 gimplify_omp_ctxp here.
24639 (gimplify_decl_expr): Do it here.
24640 (gimplify_target_expr): Likewise.
24642 2018-03-28 Martin Liska <mliska@suse.cz>
24645 * config/i386/i386.c (ix86_function_arg_advance): Do not call
24646 chkp_type_bounds_count if MPX is not enabled.
24648 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
24650 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
24652 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
24655 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
24656 function to create the function decl for complex long double
24657 multiply and divide for -mabi=ieeelongdouble.
24658 (init_float128_ieee): Call it.
24660 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
24663 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
24664 -fcf-protection=branch -mibt.
24665 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
24667 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24670 * config/arm/arm.c (arm_valid_symbolic_address): Handle
24671 arm_word_relocations.
24673 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
24676 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
24677 extern array declarations.
24679 2018-03-27 Richard Biener <rguenther@suse.de>
24681 PR middle-end/84067
24682 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
24683 explicit single_use checks.
24685 2018-03-27 Richard Biener <rguenther@suse.de>
24687 PR tree-optimization/85082
24688 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
24691 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24693 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
24694 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
24695 Turn on fasynchronous-unwind-tables and funwind-tables.
24697 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
24700 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
24701 (*bmi_blsr_<mode>_ccz): Ditto.
24703 2018-03-26 Tom de Vries <tom@codesourcery.com>
24705 PR tree-optimization/85063
24706 * omp-general.c (offloading_function_p): New function. Factor out
24708 * omp-offload.c (pass_omp_target_link::gate): ... here.
24709 * omp-general.h (offloading_function_p): Declare.
24710 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
24711 with attribute omp declare target for offloading functions.
24713 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
24715 PR tree-optimization/84005
24716 * tree-data-ref.h (get_base_for_alignment): Declare.
24717 * tree-data-ref.c (get_base_for_alignment_1): New function.
24718 (get_base_for_alignment): Likewise.
24719 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24720 get_base_for_alignment to find a suitable base object, instead
24721 of always using drb->base_address.
24723 2018-03-23 Jakub Jelinek <jakub@redhat.com>
24725 PR inline-asm/85022
24726 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
24727 known size by default.
24729 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
24731 PR inline-asm/85030
24732 * lra-constraints.c (process_alt_operands): Don't match BLKmode
24733 and non BLKmode operands.
24735 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24738 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
24739 Clean up attributes.
24741 2018-03-23 Richard Biener <rguenther@suse.de>
24744 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
24745 we are going to emit early debug for LTO.
24747 2018-03-23 Jakub Jelinek <jakub@redhat.com>
24749 PR inline-asm/85034
24750 * function.c (match_asm_constraints_1): Don't optimize if input
24751 doesn't satisfy general_operand predicate for output's mode.
24753 PR inline-asm/85022
24754 * alias.c (write_dependence_p): Don't require for x_canonicalized
24755 non-VOIDmode if x has VOIDmode.
24758 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
24759 just don't try to optimize it rather than assert it never happens.
24761 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
24763 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
24764 macro expansions for definition of ST_INTERNAL_<mode> and
24765 LD_INTERNAL_<mode> builtins.
24766 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
24768 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
24770 (altivec_expand_st_builtin): Likewise.
24771 (altivec_expand_builtin): Remove calls to deleted functions.
24772 (rs6000_address_for_altivec): Delete this function.
24773 * config/rs6000/vector.md: Remove expands for
24774 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
24776 2018-03-22 Sudakshina Das <sudi.das@arm.com>
24779 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
24780 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
24781 re-computing once computed.
24782 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
24783 (arm_init_machine_status): Initialize
24784 machine->static_chain_stack_bytes.
24786 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
24789 * doc/extend.texi: Add four new prototypes for vec_ld.
24790 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
24791 definitions for more logical presentation.
24792 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
24793 entries for V1TI variants of __builtin_altivec_ld builtin.
24794 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
24795 handling of V1TI variant of LVX icode pattern.
24796 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
24797 (rs6000_gimple_fold_builtin): Likewise.
24798 (altivec_init_builtins): Add code to define
24799 __builtin_altivec_lvx_v1ti function.
24801 2018-03-22 Jakub Jelinek <jakub@redhat.com>
24803 PR inline-asm/84941
24804 * function.c (match_asm_constraints_1): Don't do the optimization
24805 if input isn't a REG, SUBREG, MEM or constant.
24807 2018-03-22 Tom de Vries <tom@codesourcery.com>
24809 PR tree-optimization/84956
24810 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
24811 bb_has_abnormal_pred.
24813 2018-03-22 Jakub Jelinek <jakub@redhat.com>
24816 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
24817 DECL_INITIAL (decl) to decl at the end.
24818 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
24819 adjust the comment.
24821 2018-03-21 Joseph Myers <joseph@codesourcery.com>
24823 * doc/extend.texi (__builtin_tgmath): Document when complex
24824 integer types are treated as _Complex _Float64.
24826 2018-03-21 Tom de Vries <tom@codesourcery.com>
24828 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
24830 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24832 PR tree-optimization/84960
24833 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
24834 if it is ENTRY block, move them into single succ of ENTRY in that case.
24836 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
24838 PR tree-optimization/84811
24839 * poly-int.h (poly_span_traits): Remove the T3 parameter and
24840 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
24841 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
24842 (known_subrange_p): Update accordingly. Cast each value involved
24843 in the size comparison, rather than casting the result of the
24846 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24848 PR tree-optimization/84982
24849 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
24850 by flipping the least significant bit rather than all bits from
24851 bitpos to bitpos + bitsize - 1.
24853 2018-03-21 Nathan Sidwell <nathan@acm.org>
24855 * doc/extend.texi (Deprecated Features): Remove mention of
24856 long-deleted deprecations.
24858 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24861 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
24862 * configure: Regenerate.
24864 2018-03-21 Tom de Vries <tom@codesourcery.com>
24866 PR tree-optimization/83126
24867 * tree-parloops.c (num_phis): New function.
24868 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
24870 2018-03-21 Nathan Sidwell <nathan@acm.org>
24872 * doc/extend.texi (Deprecated Features): Update deprecated flags,
24873 mention anon-struct/union members and trailing attributes.
24875 2018-03-21 Bin Cheng <bin.cheng@arm.com>
24877 PR tree-optimization/84969
24878 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
24879 builtin memset partitions if they set different rhs values.
24881 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24883 PR rtl-optimization/84989
24884 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
24885 VEC_DUPLICATE with scalar result mode.
24887 2018-03-21 Martin Liska <mliska@suse.cz>
24890 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
24891 not intended return statement.
24893 2018-03-21 Martin Liska <mliska@suse.cz>
24896 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
24897 (chkp_find_bound_slots_1): Limit number of iterations.
24899 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
24902 * Minor grammar fixes for x86 options.
24904 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24907 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24908 holding REG_CFA_RESTORE notes, instead turn them into a USE.
24910 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
24913 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24914 (altivec_lvx_<mode>_1op): Likewise.
24915 (altivec_stvx_<mode>_2op): Likewise.
24916 (altivec_stvx_<mode>_1op): Likewise.
24917 (altivec_lvx_<VM2:mode>): New define_expand.
24918 (altivec_stvx_<VM2:mode>): Likewise.
24919 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24920 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24921 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24922 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24923 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24924 (rs6000_gen_lvx): Likewise.
24925 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24926 (altivec_expand_stv_builtin): Likewise.
24927 (altivec_expand_builtin): Likewise.
24928 * config/rs6000/vector.md: Likewise.
24930 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24933 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24936 2018-03-20 Richard Biener <rguenther@suse.de>
24939 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24940 sign-conversions as zero, fall back to standard scalar_stmt
24943 2018-03-20 Martin Liska <mliska@suse.cz>
24946 * predict.c (rebuild_frequencies): Handle case when we have
24947 PROFILE_ABSENT, but flag_guess_branch_prob is false.
24949 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24952 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24953 flag_section_anchors.
24954 * varasm.c (use_blocks_for_decl_p): Remove hack for
24955 dw2_force_const_mem.
24958 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24960 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
24961 be created, use lowpart_subreg of operands[0] rather than operands[0]
24963 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24964 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24965 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24966 and n constraint instead of aarch64_shift_imm_di and Usd.
24967 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24968 (*aarch64_<optab>_reg_minus<mode>3): ... this.
24970 2018-03-20 Sudakshina Das <sudi.das@arm.com>
24973 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24974 to favor GPR over NEON registers.
24975 (<shift>di3_neon): Likewise.
24977 2018-03-20 Tom de Vries <tom@codesourcery.com>
24980 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24981 (nvptx_process_pars): Emit bar.sync asap and alap.
24983 2018-03-20 Tom de Vries <tom@codesourcery.com>
24986 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24987 seen_label if seen_label is already set.
24989 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24992 * config/i386/i386.c (fold_builtin_cpu): For features above 31
24993 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
24994 Use 1U instead of 1. Formatting fixes.
24997 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
24998 instead of TREE_TYPE (s1) for the return value.
25000 2018-03-19 Jakub Jelinek <jakub@redhat.com>
25002 PR tree-optimization/84946
25003 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
25004 bitsize + bitsize in poly_uint64 rather than poly_int64.
25007 * dwarf2asm.c: Include fold-const.c.
25008 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
25009 of decl rather than decl itself.
25011 PR rtl-optimization/84643
25012 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
25014 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
25017 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
25018 calling assemble_variable.
25020 2018-03-19 Sudakshina Das <sudi.das@arm.com>
25023 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
25024 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
25026 2018-03-19 Jim Wilson <jimw@sifive.com>
25029 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
25030 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
25031 (riscv_first_stack_step): Likewise.
25032 (riscv_option_override): Use STACK_BOUNDARY instead of
25033 MIN_STACK_BOUNDARY.
25034 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
25035 MIN_STACK_BOUNDARY.
25036 (BIGGEST_ALIGNMENT): Set to 128.
25037 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
25038 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
25041 2018-03-19 Richard Biener <rguenther@suse.de>
25043 PR tree-optimization/84933
25044 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
25045 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
25047 2018-03-19 Richard Biener <rguenther@suse.de>
25049 PR tree-optimization/84859
25050 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
25051 (cond_if_else_store_replacement): Perform sinking operation on
25052 single-store BBs regardless of MAX_STORES_TO_SINK setting.
25053 Generalize what a BB with a single eligible store is.
25055 2018-03-19 Richard Biener <rguenther@suse.de>
25057 PR tree-optimization/84929
25058 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
25059 chrec_is_positive against non-chrec arg.
25061 2018-03-19 Tamar Christina <tamar.christina@arm.com>
25064 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
25066 2018-03-18 Martin Liska <mliska@suse.cz>
25068 PR rtl-optimization/84635
25069 * regrename.c (build_def_use): Use matches_mode only when
25072 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
25074 PR tree-optimization/84913
25075 * tree-vect-loop.c (vectorizable_reduction): Don't try to
25076 vectorize chains of COND_EXPRs.
25078 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25080 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
25082 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25084 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
25086 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
25088 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
25090 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
25091 Kito Cheng <kito.cheng@gmail.com>
25093 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
25094 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
25095 (nds32_adjust_reg_alloc_order): New function.
25096 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
25098 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
25100 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
25101 nds32_print_operand, nds32_print_operand_address): Use
25102 HOST_WIDE_INT_PRINT_DEC instead.
25104 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
25106 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
25108 2018-03-17 Jakub Jelinek <jakub@redhat.com>
25111 * config/i386/i386.c (initial_ix86_tune_features,
25112 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
25113 unsigned long long.
25114 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
25115 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
25116 rather than 1u << ix86_tune. Formatting fix.
25117 (ix86_option_override_internal): Change ix86_arch_mask from
25118 unsigned int to unsigned HOST_WIDE_INT, initialize to
25119 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
25120 (ix86_function_specific_restore): Likewise.
25122 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25125 * postreload.c (reload_combine_recognize_pattern): Perform
25126 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
25127 truncate_int_for_mode the result for the destination's mode.
25130 * hsa-gen.c (mem_type_for_type): Fix comment typo.
25131 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
25133 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25136 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
25139 * lra-assigns.c (lra_split_hard_reg_for): Don't use
25140 regno_allocno_class_array and sorted_pseudos.
25141 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
25142 insns where regno is used.
25144 2018-03-16 Martin Liska <mliska@suse.cz>
25147 * multiple_target.c (create_dispatcher_calls): Redirect
25148 reference in the symbol table.
25150 2018-03-16 Martin Liska <mliska@suse.cz>
25153 * multiple_target.c (create_dispatcher_calls): Redirect also
25156 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25160 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
25161 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
25162 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
25164 2018-03-16 Julia Koval <julia.koval@intel.com>
25166 * doc/invoke.texi (Skylake Server): Add CLWB.
25167 Cannonlake): Remove CLWB.
25169 2018-03-16 Jakub Jelinek <jakub@redhat.com>
25171 PR tree-optimization/84841
25172 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
25174 (FLOAT_ONE_CONST_TYPE): Define.
25175 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
25176 (sort_by_operand_rank): Put entries with higher constant_type last
25177 rather than first to match comments.
25179 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
25181 * config/nios2/nios2.md (movsi_internal): Fix thinko in
25184 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25187 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
25188 check and use address of target always.
25190 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
25193 * config/i386/i386.c (indirect_thunk_needed): Update comments.
25194 (indirect_thunk_bnd_needed): Likewise.
25195 (indirect_thunks_used): Likewise.
25196 (indirect_thunks_bnd_used): Likewise.
25197 (indirect_return_needed): New.
25198 (indirect_return_bnd_needed): Likewise.
25199 (output_indirect_thunk_function): Add a bool argument for
25201 (output_indirect_thunk_function): Don't generate alias for
25202 function return thunk.
25203 (ix86_code_end): Call output_indirect_thunk_function to generate
25204 function return thunks.
25205 (ix86_output_function_return): Set indirect_return_bnd_needed
25206 and indirect_return_needed instead of indirect_thunk_bnd_needed
25207 and indirect_thunk_needed.
25209 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
25211 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
25212 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
25213 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
25215 2018-03-15 David Malcolm <dmalcolm@redhat.com>
25216 Paul Hua <paul.hua.gm@gmail.com>
25219 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
25221 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
25223 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
25224 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
25225 resp. SFmode cases.
25227 2018-03-15 Tamar Christina <tamar.christina@arm.com>
25230 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
25231 instead of GET_MODE_SIZE when comparing Units.
25233 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
25236 * varasm.c (hash_section): Return an unchangeble hash value
25237 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
25238 Return !aarch64_can_use_per_function_literal_pools_p ().
25240 2018-03-15 Jakub Jelinek <jakub@redhat.com>
25243 * optabs.c (emit_conditional_move): Pass address of cmode's copy
25244 rather than address of cmode as last argument to prepare_cmp_insn.
25246 2018-03-15 Julia Koval <julia.koval@intel.com>
25248 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
25249 F_AVX512VNNI, F_AVX512BITALG): New.
25251 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
25254 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
25255 insn for floating-point loads and stores.
25257 2018-03-14 Carl Love <cel@us.ibm.com>
25259 * config/rs6000/rs6000-c.c: Add macro definitions for
25260 ALTIVEC_BUILTIN_VEC_PERMXOR.
25261 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
25262 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
25263 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
25264 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
25266 * config/doc/extend.texi: Add prototypes for vec_permxor.
25268 2018-03-14 David Malcolm <dmalcolm@redhat.com>
25271 * diagnostic-show-locus.c (class layout_point): Convert m_line
25272 from int to linenum_type.
25273 (line_span::comparator): Use linenum "compare" function when
25274 comparing line numbers.
25275 (test_line_span): New function.
25276 (layout_range::contains_point): Convert param "row" from int to
25278 (layout_range::intersects_line_p): Likewise.
25279 (layout::will_show_line_p): Likewise.
25280 (layout::print_source_line): Likewise.
25281 (layout::should_print_annotation_line_p): Likewise.
25282 (layout::print_annotation_line): Likewise.
25283 (layout::print_leading_fixits): Likewise.
25284 (layout::annotation_line_showed_range_p): Likewise.
25285 (struct line_corrections): Likewise for field m_row.
25286 (line_corrections::line_corrections): Likewise for param "row".
25287 (layout::print_trailing_fixits): Likewise.
25288 (layout::get_state_at_point): Likewise.
25289 (layout::get_x_bound_for_row): Likewise.
25290 (layout::print_line): Likewise.
25291 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
25292 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
25293 * input.c (selftest::test_linenum_comparisons): New function.
25294 (selftest::input_c_tests): Call it.
25295 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
25296 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
25297 * selftest.h (ASSERT_GT): New macro.
25298 (ASSERT_GT_AT): New macro.
25299 (ASSERT_LT): New macro.
25300 (ASSERT_LT_AT): New macro.
25302 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
25304 PR rtl-optimization/84780
25305 * combine.c (distribute_links): Don't make a link based on pc_rtx.
25307 2018-03-14 Martin Liska <mliska@suse.cz>
25309 * tree.c (record_node_allocation_statistics): Use
25310 get_stats_node_kind.
25311 (get_stats_node_kind): New function extracted from
25312 record_node_allocation_statistics.
25313 (free_node): Use get_stats_node_kind.
25315 2018-03-14 Richard Biener <rguenther@suse.de>
25317 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
25318 that the value-set of ANTIC_IN doesn't grow.
25321 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25323 (BB_VISITED_WITH_VISITED_SUCCS): New define.
25324 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25326 2018-03-14 Julia Koval <julia.koval@intel.com>
25328 * config.gcc (icelake-client, icelake-server): New.
25330 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
25331 (initial_ix86_arch_features): Ditto.
25332 (PTA_SKYLAKE): Add SGX.
25333 (PTA_ICELAKE): Remove.
25334 (PTA_ICELAKE_CLIENT): New.
25335 (PTA_ICELAKE_SERVER): New.
25336 (ix86_option_override_internal): Split up icelake on icelake client and
25338 (get_builtin_code_for_version): Ditto.
25339 (fold_builtin_cpu): Ditto.
25340 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
25341 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
25342 * config/i386/i386.h (processor_type): Ditto.
25343 * doc/invoke.texi: Ditto.
25345 2018-03-14 Jakub Jelinek <jakub@redhat.com>
25348 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
25349 INTEGER_CST offset, add it together with bitpos / 8 and
25350 sign extend based on POINTER_SIZE.
25354 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
25357 * config/i386/constraints.md (Yc): New register constraint.
25358 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
25359 Use Yc constraint for alternative 2 of operand 0. Remove
25360 preferred_for_speed attribute.
25362 2018-03-14 Richard Biener <rguenther@suse.de>
25364 PR tree-optimization/84830
25365 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
25366 with the old one to avoid oscillations.
25368 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
25371 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
25373 (assign_by_spills): Return a flag of reload assignment failure.
25374 Do not process the reload assignment failures. Do not spill other
25375 reload pseudos if they has the same reg class. Update n if
25377 (lra_assign): Add a return arg. Set up from the result of
25378 assign_by_spills call.
25379 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25380 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25381 usage_insns if it is not NULL.
25382 (spill_hard_reg_in_range): New function.
25383 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25384 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25385 function prototypes.
25386 (lra_assign): Change prototype.
25387 * lra.c (lra): Add code to deal with fails by splitting hard reg
25390 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
25392 * config/riscv/riscv.opt (mrelax): New option.
25393 * config/riscv/riscv.c (riscv_file_start): Emit ".option
25394 "norelax" when riscv_mrelax is disabled.
25395 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
25397 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25400 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
25401 reassociation for int modes.
25403 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25405 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
25406 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
25408 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
25409 * config/aarch64/aarch64-sve.md
25410 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
25411 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
25412 (*extend<mode><Vwide>2): Rename to...
25413 (aarch64_sve_extend<mode><Vwide>2): ...this.
25414 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
25415 renaming the old pattern to...
25416 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
25418 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
25419 define_expand, renaming the old pattern to...
25420 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
25421 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
25422 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
25423 account when deciding which SVE instruction the optab should use.
25424 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
25426 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25428 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
25429 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
25430 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
25431 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
25432 (tlsdesc_small_<mode>): Turn a define_expand and use
25433 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
25434 (tlsdesc_small_advsimd_<mode>): ...this.
25435 (tlsdesc_small_sve_<mode>): New pattern.
25437 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25439 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
25440 (UNSPEC_UMUL_HIGHPART): New constants.
25441 (MUL_HIGHPART): New int iteraor.
25442 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
25443 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
25445 (*<su>mul<mode>3_highpart): New define_insn.
25447 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25450 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25453 2018-03-13 Martin Liska <mliska@suse.cz>
25456 * (sem_item_optimizer::sem_item_optimizer): Initialize new
25458 (sem_item_optimizer::~sem_item_optimizer): Release it.
25459 (sem_item_optimizer::merge_classes): Register variable aliases.
25460 (sem_item_optimizer::fixup_pt_set): New function.
25461 (sem_item_optimizer::fixup_points_to_sets): Likewise.
25462 * ipa-icf.h: Declare new variables and functions.
25464 2018-03-13 Jakub Jelinek <jakub@redhat.com>
25466 PR middle-end/84834
25467 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
25468 integer_pow2p@2 and test integer_pow2p in condition.
25469 (A < 0 ? C : 0): Similarly for @1.
25471 PR middle-end/84831
25472 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
25473 characters starting at p contain '\0' character, don't look beyond
25477 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
25478 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
25481 * reg-stack.c (change_stack): Change update_end var from int to
25482 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
25483 also call set_block_for_insn on the newly added insns and rescan.
25486 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
25487 on the last operand.
25490 * tree.c (stabilize_reference_1): Return save_expr (e) for
25491 STATEMENT_LIST even if it doesn't have side-effects.
25493 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
25495 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
25497 2018-03-12 Renlin Li <renlin.li@arm.com>
25499 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
25500 aarch64_output_scalar_simd_mov_immediate.
25502 2018-03-12 Martin Sebor <msebor@redhat.com>
25504 PR tree-optimization/83456
25505 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
25506 for perfectly overlapping calls to memcpy.
25507 (gimple_fold_builtin_memory_chk): Same.
25508 (gimple_fold_builtin_strcpy): Handle no-warning.
25509 (gimple_fold_builtin_stxcpy_chk): Same.
25510 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
25512 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
25514 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
25515 parameter. Use it for SFmode.
25516 (rs6000_function_arg_advance_1): Adjust.
25517 (rs6000_function_arg): Adjust.
25518 (rs6000_gimplify_va_arg): Pass false for that new parameter.
25520 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
25522 PR rtl-optimization/84169
25523 PR rtl-optimization/84780
25524 * combine.c (can_combine_p): Check for a 2-insn combination whether
25525 the destination register is used between the two insns, too.
25527 2018-03-12 Richard Biener <rguenther@suse.de>
25529 PR tree-optimization/84803
25530 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
25531 for refs DR analysis didn't process.
25533 2018-03-12 Richard Biener <rguenther@suse.de>
25535 PR tree-optimization/84777
25536 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
25537 force-vectorize loops ignore whether we are optimizing for size.
25539 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
25541 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
25542 (TARGET_MD_ASM_ADJUST): Define.
25544 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
25545 Kito Cheng <kito.cheng@gmail.com>
25546 Chung-Ju Wu <jasonwucj@gmail.com>
25548 * config/nds32/nds32.c (nds32_compute_stack_frame,
25549 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
25550 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
25551 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
25552 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
25553 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
25554 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
25555 * config/nds32/nds32.md (prologue, epilogue): Use macro
25556 NDS32_V3PUSH_AVAILABLE_P to do checking.
25558 2018-03-11 Jakub Jelinek <jakub@redhat.com>
25561 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
25562 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
25563 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
25564 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
25565 addition of most attributes on !orig_type_die or the attribute not
25566 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
25568 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25569 Chung-Ju Wu <jasonwucj@gmail.com>
25571 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
25572 __NDS32_VH__ macro.
25573 * config/nds32/nds32.opt (mvh): New option.
25575 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25576 Chung-Ju Wu <jasonwucj@gmail.com>
25578 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
25580 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
25581 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
25584 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25585 Chung-Ju Wu <jasonwucj@gmail.com>
25587 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
25589 * config/nds32/nds32-multiple.md (strlensi): New pattern.
25590 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
25592 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
25593 Kito Cheng <kito.cheng@gmail.com>
25594 Chung-Ju Wu <jasonwucj@gmail.com>
25596 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
25597 UNSPEC_FFMISM and UNSPEC_FLMISM.
25598 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
25599 for ffb, ffmism and flmism.
25600 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
25601 (unspec_ffmism): Ditto.
25602 (unspec_flmism): Ditto.
25603 (nds32_expand_builtin_impl): Check if string extension is available.
25604 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
25605 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
25607 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
25610 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
25613 * lra-assigns.c (assign_by_spills): Return a flag of reload
25614 assignment failure. Do not process the reload assignment
25615 failures. Do not spill other reload pseudos if they has the same
25617 (lra_assign): Add a return arg. Set up from the result of
25618 assign_by_spills call.
25619 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25620 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25621 usage_insns if it is not NULL.
25622 (spill_hard_reg_in_range): New function.
25623 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25624 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25625 function prototypes.
25626 (lra_assign): Change prototype.
25627 * lra.c (lra): Add code to deal with fails by splitting hard reg
25630 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
25633 * config/i386/i386.opt: Replace Enforcment with Enforcement.
25635 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
25638 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
25639 (dw_val_node): Add val_symbolic_view.
25640 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
25641 (symview_upper_bound): New.
25642 (new_line_info_table): Initialize symviews_since_reset.
25643 (dwarf2out_source_line): Count symviews_since_reset and set
25644 symview_upper_bound.
25645 (dw_val_equal_p): Handle symview.
25646 (add_AT_symview): New.
25647 (print_dw_val): Handle symview.
25648 (attr_checksum, attr_checksum_ordered): Likewise.
25649 (same_dw_val_p, size_of_die): Likewise.
25650 (value_format, output_die): Likewise.
25651 (add_high_low_attributes): Use add_AT_symview for entry_view.
25652 (dwarf2out_finish): Reset symview_upper_bound, clear
25655 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
25658 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
25659 Add strict argument and use it.
25660 (rs6000_split_multireg_move): Update for new strict argument.
25661 (mem_operand_gpr): Disallow all non-offsettable addresses.
25662 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
25664 2018-03-09 Jakub Jelinek <jakub@redhat.com>
25667 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
25668 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
25669 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
25672 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
25673 decl, use remap_type if we want to use the type.
25675 2018-03-09 Martin Sebor <msebor@redhat.com>
25677 PR tree-optimization/84526
25678 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25680 (builtin_access::generic_overlap): Be prepared to handle non-array
25683 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
25685 PR rtl-optimization/84682
25686 * lra-constraints.c (process_address_1): Check is_address flag
25687 for address constraints.
25688 (process_alt_operands): Likewise.
25689 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
25690 preprocess_constraints.
25691 * recog.h (preprocess_constraints): Add oploc parameter.
25693 * recog.c (preprocess_constraints): Test address_operand for
25694 CT_ADDRESS constraints.
25696 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
25699 * lra-assigns.c (assign_by_spills): Return a flag of reload
25700 assignment failure. Do not process the reload assignment
25701 failures. Do not spill other reload pseudos if they has the same
25703 (lra_assign): Add a return arg. Set up from the result of
25704 assign_by_spills call.
25705 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25706 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25707 usage_insns if it is not NULL.
25708 (spill_hard_reg_in_range): New function.
25709 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25710 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25711 function prototypes.
25712 (lra_assign): Change prototype.
25713 * lra.c (lra): Add code to deal with fails by splitting hard reg
25716 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25719 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
25720 Accept complain bool parameter. Only emit errors if it is true.
25721 (arm_parse_cpu_option_name): Likewise.
25722 (arm_target_thumb_only): Adjust callers of the above.
25723 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
25724 prototype to take a default true bool parameter.
25725 (arm_parse_arch_option_name): Likewise.
25727 2018-03-09 David Malcolm <dmalcolm@redhat.com>
25728 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
25732 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
25733 * configure: Regenerate.
25734 * configure.ac ("linker --version-script option"): New.
25735 ("linker soname option"): New.
25737 2018-03-09 Richard Biener <rguenther@suse.de>
25739 PR tree-optimization/84775
25740 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
25741 immediate uses of predicate stmts and mark them modified.
25744 PR tree-optimization/84178
25745 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25747 (version_loop_for_if_conversion): Delay update_ssa call.
25748 (tree_if_conversion): Delay update_ssa until after predicate
25751 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
25754 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
25755 when the function accesses prior frames.
25757 2018-03-08 Jakub Jelinek <jakub@redhat.com>
25760 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
25761 gen_llsym, otherwise call maybe_gen_llsym.
25763 PR inline-asm/84742
25764 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
25765 has ',' character inside of it.
25767 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25770 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
25771 as clobbering CC_REGNUM.
25773 2018-03-08 Richard Biener <rguenther@suse.de>
25775 PR middle-end/84552
25776 * tree-scalar-evolution.c: Include tree-into-ssa.h.
25777 (follow_copies_to_constant): Do not follow SSA names registered
25780 2018-03-08 Richard Biener <rguenther@suse.de>
25782 PR tree-optimization/84178
25783 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25785 (version_loop_for_if_conversion): Delay update_ssa call.
25786 (tree_if_conversion): Delay update_ssa until after predicate
25789 2018-03-08 David Malcolm <dmalcolm@redhat.com>
25791 PR tree-optimization/84178
25792 * tree-if-conv.c (release_bb_predicate): Remove the
25793 the assertion that the stmts have NULL use_ops.
25794 Discard the statements, asserting that they haven't
25795 yet been added to a BB.
25797 2018-03-08 Richard Biener <rguenther@suse.de>
25799 PR tree-optimization/84746
25800 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
25801 (phi_translate): Pass in destination ANTIC_OUT set.
25802 (phi_translate_1): Likewise. For a simplified result lookup
25803 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
25804 (phi_translate_set): Adjust.
25805 (do_pre_regular_insertion): Likewise.
25806 (do_pre_partial_partial_insertion): Likewise.
25808 2018-03-08 Martin Liska <mliska@suse.cz>
25810 PR gcov-profile/84735
25811 * doc/gcov.texi: Document usage of profile files.
25812 * gcov-io.h: Document changes in the format.
25814 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
25818 * dwarf2out.c (struct dw_line_info_table): Update comments for
25820 (FORCE_RESET_NEXT_VIEW): New.
25821 (FORCE_RESETTING_VIEW_P): New.
25822 (RESETTING_VIEW_P): Check for -1 too.
25823 (ZERO_VIEW_P): Likewise.
25824 (new_line_info_table): Force-reset next view.
25825 (dwarf2out_begin_function): Likewise.
25826 (dwarf2out_source_line): Simplify zero_view_p initialization.
25827 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
25828 view directly. Omit view when omitting .loc at line 0.
25830 2018-03-08 Jakub Jelinek <jakub@redhat.com>
25832 PR tree-optimization/84740
25833 * tree-switch-conversion.c (process_switch): Call build_constructors
25834 only if info.phi_count is non-zero.
25836 PR tree-optimization/84739
25837 * tree-tailcall.c (find_tail_calls): Check call arguments against
25838 DECL_ARGUMENTS (current_function_decl) rather than
25839 DECL_ARGUMENTS (func) when checking for tail recursion.
25841 2018-03-07 Jakub Jelinek <jakub@redhat.com>
25843 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
25844 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
25845 Volker Reichelt's entry and add entries for people that perform
25846 GCC fuzzy testing and report numerous bugs.
25848 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
25851 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
25852 readonly data in sdata, if that is disabled.
25853 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
25854 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
25855 -mreadonly-in-sdata option.
25857 2018-03-07 Martin Sebor <msebor@redhat.com>
25859 PR tree-optimization/84468
25860 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
25861 basic block when looking for nul assignment.
25863 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
25866 * except.h (output_function_exception_table): Adjust prototype.
25867 * except.c (output_function_exception_table): Remove FNNAME parameter
25868 and add SECTION parameter. Ouput one part of the table at a time.
25869 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
25870 the first part of the exception table and emit unwind directives.
25871 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
25872 (i386_pe_seh_cold_init): Likewise.
25873 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
25874 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
25875 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
25876 (ix86_output_call_insn): Emit a nop in one more case for SEH.
25877 * config/i386/winnt.c: Include except.h.
25878 (struct seh_frame_state): Add reg_offset, after_prologue and
25879 in_cold_section fields.
25880 (i386_pe_seh_end_prologue): Set seh->after_prologue.
25881 (i386_pe_seh_cold_init): New function.
25882 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
25883 to seh->in_cold_section.
25884 (seh_emit_push): Record the offset of the push.
25885 (seh_emit_save): Record the offet of the save.
25886 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
25887 Test seh->after_prologue to disregard the epilogue.
25888 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
25889 (i386_pe_end_cold_function): New function.
25891 2018-03-07 Jakub Jelinek <jakub@redhat.com>
25894 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
25895 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
25898 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
25900 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25901 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25903 PR middle-end/84723
25904 * multiple_target.c: Include tree-inline.h and intl.h.
25905 (expand_target_clones): Diagnose and fail if node->definition and
25906 !tree_versionable_function_p (node->decl).
25908 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
25910 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25912 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25913 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25914 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25916 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25919 * combine.c (try_combine): Use reg_or_subregno instead of handling
25920 just paradoxical SUBREGs and REGs.
25922 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
25924 * config/arc/arc.c (arc_finalize_pic): Remove function.
25925 (arc_must_save_register): We use single base PIC register, remove
25926 checks to save/restore the PIC register.
25927 (arc_expand_prologue): Likewise.
25928 * config/arc/arc-protos.h (arc_set_default_type_attributes):
25930 (arc_verify_short): Likewise.
25931 (arc_attr_type): Likewise.
25932 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25933 (walk_stores): Likewise.
25934 (arc_address_cost): Make it static.
25935 (arc_verify_short): Likewise.
25936 (branch_dest): Likewise.
25937 (arc_attr_type): Likewise.
25938 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25939 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25940 (arc_final_prescan_insn): Remove inserting the nops due to
25941 hardware hazards. It is done in reorg step.
25942 (insn_length_variant_t): Remove.
25943 (insn_length_parameters_t): Likewise.
25944 (arc_insn_length_parameters): Likewise.
25945 (arc_get_insn_variants): Likewise.
25946 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25948 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25950 PR inline-asm/84683
25951 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25954 PR tree-optimization/84687
25955 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25957 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25959 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25961 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25962 Rename to ppc_speculation_barrier.
25963 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25964 __builtin_ppc_speculation_barrier.
25966 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25969 * combine.c (combine_simplify_rtx): Don't try to simplify if
25970 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25973 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
25975 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25976 to 32 bytes when compiling for POWER9.
25978 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25981 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25982 regparm >= 3 with no arg reg available also for calls with
25983 flag_force_indirect_call. Pass decl to ix86_function_regparm.
25986 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25988 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
25990 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
25993 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
25995 2018-03-05 Richard Biener <rguenther@suse.de>
25997 PR tree-optimization/84486
25998 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
25999 When inserting a __builtin_assume_aligned call set the LHS
26000 SSA name alignment info accordingly.
26002 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
26004 PR tree-optimization/84114
26005 * config/aarch64/aarch64.c (aarch64_reassociation_width)
26006 Avoid reassociation of FLOAT_MODE addition.
26008 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
26010 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
26011 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
26012 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
26013 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
26014 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
26015 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
26016 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
26018 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
26019 __builtin_ia32_wbinvd): New builtins.
26020 (SPECIAL_ARGS2): New.
26021 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
26022 (SPECIAL_ARGS2): New.
26023 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
26024 (ix86_valid_target_attribute_inner_p): Ditto.
26025 (ix86_init_mmx_sse_builtins): Add special_args2.
26026 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
26027 TARGET_WBNOINVD_P): New.
26028 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
26029 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
26030 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
26031 * config/i386/immintrin.h (_wbinvd): New intrinsic.
26032 * config/i386/pconfigintrin.h: New file.
26033 * config/i386/wbnoinvdintrin.h: Ditto.
26034 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
26036 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
26038 2018-03-05 Richard Biener <rguenther@suse.de>
26040 PR tree-optimization/84670
26041 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
26043 (BB_VISITED_WITH_VISITED_SUCCS): New define.
26044 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
26045 (compute_antic_aux): Only assert the number of values in ANTIC_IN
26046 doesn't grow if all successors (recursively) were visited at least
26049 2018-03-05 Richard Biener <rguenther@suse.de>
26051 PR tree-optimization/84650
26052 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
26053 if executed in the loop pipeline.
26055 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
26057 * doc/configfiles.texi (Configuration Files): Move info about
26058 conditionalizing $target-protos.h to...
26059 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
26060 differs from $target-protos.h.
26062 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
26063 Chung-Ju Wu <jasonwucj@gmail.com>
26065 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
26066 * config/nds32/nds32-multiple.md (setmemsi): Define.
26067 * config/nds32/nds32-memory-manipulation.c
26068 (nds32_gen_dup_4_byte_to_word_value): New.
26069 (emit_setmem_word_loop): New.
26070 (emit_setmem_byte_loop): New.
26071 (nds32_expand_setmem_loop): New.
26072 (nds32_expand_setmem_loop_v3m): New.
26073 (nds32_expand_setmem_unroll): New.
26074 (nds32_expand_setmem): New.
26076 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26077 Chung-Ju Wu <jasonwucj@gmail.com>
26079 * config/nds32/nds32-memory-manipulation.c
26080 (nds32_emit_load_store): New.
26081 (nds32_emit_post_inc_load_store): New.
26082 (nds32_emit_mem_move): New.
26083 (nds32_emit_mem_move_block): New.
26084 (nds32_expand_movmemsi_loop_unknown_size): New.
26085 (nds32_expand_movmemsi_loop_known_size): New.
26086 (nds32_expand_movmemsi_loop): New.
26087 (nds32_expand_movmemsi_unroll): New.
26088 (nds32_expand_movmemqi): Rename ...
26089 (nds32_expand_movmemsi): ... to this.
26090 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
26091 (movmemsi): ... to this.
26092 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
26093 (nds32_expand_movmemsi): ... to this.
26095 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26096 Monk Chiang <sh.chiang04@gmail.com>
26097 Chung-Ju Wu <jasonwucj@gmail.com>
26099 * config/nds32/nds32-protos.h
26100 (nds32_expand_load_multiple): New arguments.
26101 (nds32_expand_store_multiple): Ditto.
26102 (nds32_valid_multiple_load_store): Rename ...
26103 (nds32_valid_multiple_load_store_p): ... to this.
26104 * config/nds32/nds32-memory-manipulation.c
26105 (nds32_expand_load_multiple): Refine implementation.
26106 (nds32_expand_store_multiple): Ditto.
26107 * config/nds32/nds32-multiple.md
26108 (load_multiple): Update nds32_expand_load_multiple interface.
26109 (store_multiple): Update nds32_expand_store_multiple interface.
26110 * config/nds32/nds32-predicates.c
26111 (nds32_valid_multiple_load_store): Rename ...
26112 (nds32_valid_multiple_load_store_p): ... to this and refine
26114 * config/nds32/predicates.md
26115 (nds32_load_multiple_and_update_address_operation): New predicate.
26116 (nds32_store_multiple_and_update_address_operation): New predicate.
26118 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
26119 Chung-Ju Wu <jasonwucj@gmail.com>
26121 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
26122 (combo): New attribute.
26123 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
26125 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
26127 * config/nds32/nds32.opt: Change -mcmodel= default value.
26129 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
26130 Monk Chiang <sh.chiang04@gmail.com>
26131 Chung-Ju Wu <jasonwucj@gmail.com>
26133 * config/nds32/constants.md (unspec_element): New enum.
26134 * config/nds32/constraints.md (Umw): New constraint.
26135 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
26136 * config/nds32/nds32-intrinsic.md: Likewise.
26137 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
26138 (nds32_valid_smw_lwm_base_p): New.
26139 (nds32_output_smw_single_word): New.
26140 (nds32_output_lmw_single_word): New.
26141 (nds32_expand_unaligned_load): New.
26142 (nds32_expand_unaligned_store): New.
26143 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
26144 (nds32_output_smw_single_word): Declare.
26145 (nds32_output_lmw_single_word): Declare.
26146 (nds32_expand_unaligned_load): Declare.
26147 (nds32_expand_unaligned_store): Declare.
26148 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
26149 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
26150 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
26151 NDS32_BUILTIN_UASTORE_DW.
26152 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
26155 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
26156 Kito Cheng <kito.cheng@gmail.com>
26157 Chung-Ju Wu <jasonwucj@gmail.com>
26159 * config/nds32/nds32-intrinsic.c
26160 (nds32_expand_builtin_null_ftype_reg): Delete.
26161 (nds32_expand_builtin_reg_ftype_imm): Ditto.
26162 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
26163 (nds32_read_argument): New.
26164 (nds32_legitimize_target): Ditto.
26165 (nds32_legitimize_argument): Ditto.
26166 (nds32_check_constant_argument): Ditto.
26167 (nds32_expand_unop_builtin): Ditto.
26168 (nds32_expand_unopimm_builtin): Ditto.
26169 (nds32_expand_binop_builtin): Ditto.
26170 (nds32_builtin_decl_impl): Ditto.
26171 (builtin_description): Ditto.
26172 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
26173 (nds32_init_builtins_impl): Ditto.
26174 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
26175 (nds32_builtin_decl): New.
26176 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
26177 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
26179 2018-03-02 Jeff Law <law@redhat.com>
26181 * reorg.c (stop_search_p): Handle DEBUG_INSN.
26182 (redundant_insn, fill_simple_delay_slots): Likewise.
26183 (fill_slots_from_thread): Likewise.
26184 * resource.c (mark_referenced_resources): Likewise.
26185 (mark_set_resources, find_dead_or_set_registers): Likewise.
26187 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26189 * substring-locations.h (format_warning_va): Formatting fix for
26190 ATTRIBUTE_GCC_DIAG.
26191 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
26193 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
26194 * substring-locations.c: Include intl.h.
26195 (format_warning_va): Turned into small wrapper around
26196 format_warning_n_va, renamed to ...
26197 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
26198 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
26200 (format_warning_at_substring_n): New function.
26201 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
26202 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
26203 format_warning_at_substring with just a shorter name instead of
26204 const function pointer.
26205 (fmtwarn_n): New function.
26206 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
26207 appropriate, get rid of all the fmtstr temporaries, move conditionals
26208 with G_() wrapped string literals directly into fmtwarn arguments,
26209 cast dir.len to (int), formatting fixes.
26211 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
26213 * doc/invoke.texi: Remove "Cilk Plus" references.
26215 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26216 Richard Biener <rguenther@suse.de>
26219 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
26220 for error or warning attributes if CALL_FROM_THUNK_P is set.
26223 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26226 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
26227 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
26230 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
26231 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
26233 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
26234 instead of -1U in last predictors element's probability member.
26236 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
26239 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
26240 arguments if they are comparable.
26242 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26244 PR tree-optimization/84634
26245 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
26246 masks and masked_loop_p with a single loop_masks, making sure it's
26247 null for bb vectorization.
26249 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
26251 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
26252 (vect_analyze_data_ref_access): Use loop->safe_len rather than
26253 loop->force_vectorize to check whether there is no alias.
26255 2018-03-02 Jakub Jelinek <jakub@redhat.com>
26258 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
26260 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
26262 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
26263 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
26264 instead of a loop around prev_real_insn.
26265 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
26268 PR inline-asm/84625
26269 * config/i386/i386.c (ix86_print_operand): Use conditional
26270 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
26273 2018-03-02 Richard Biener <rguenther@suse.de>
26275 PR tree-optimization/84427
26276 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
26277 (bitmap_set_subtract_values): Rewrite to handle multiple
26280 (prune_clobbered_mems): Likewise.
26281 (phi_translate): Take edge instead of pred/phiblock.
26282 (phi_translate_1): Likewise.
26283 (phi_translate_set): Likewise. Insert all translated
26284 exprs for a value into the set, keeping possibly multiple
26285 expressions per value.
26286 (compute_antic_aux): Adjust for phi_translate changes.
26287 When intersecting union the expressions and prune those
26288 not in the final value set, keeping possibly multiple
26289 expressions per value. Do not use value-insertion
26290 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
26291 all expressions. Add verification that the value-sets
26292 only shrink during iteration.
26293 (compute_partial_antic_aux): Adjust for the phi_translate changes.
26294 (do_pre_regular_insertion): Likewise.
26295 (do_pre_partial_partial_insertion): Likewise.
26297 2018-03-02 Richard Biener <rguenther@suse.de>
26300 * config/darwin.c (saved_debug_info_level): New static global.
26301 (darwin_asm_lto_start): Disable debug info generation for LTO out.
26302 (darwin_asm_lto_end): Restore debug info generation settings.
26304 2018-03-01 Martin Liska <mliska@suse.cz>
26307 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
26308 volatile arguments.
26310 2018-03-01 Richard Biener <rguenther@suse.de>
26313 * dwarf2out.c (gen_variable_die): Properly handle late VLA
26314 type annotation with LTO when debug was disabled at compile-time.
26316 2018-03-01 Matthew Fortune <mfortune@gmail.com>
26318 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
26320 (mips_final_postscan_insn): Likewise.
26322 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
26324 PR rtl-optimization/84528
26325 * alias.c (init_alias_target): Add commentary.
26326 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
26327 a unique base value if the frame pointer is not eliminated
26328 to the stack pointer.
26330 2018-03-01 Tom de Vries <tom@codesourcery.com>
26332 PR rtl-optimization/83327
26333 * lra-int.h (hard_regs_spilled_into): Declare.
26334 * lra.c (hard_regs_spilled_into): Define.
26335 (init_reg_info): Init hard_regs_spilled_into.
26336 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
26337 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
26338 (process_bb_lives): Handle hard_regs_spilled_into.
26339 (lra_create_live_ranges_1): Before doing liveness propagation, clear
26340 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
26342 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
26344 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
26345 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
26346 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
26347 * config/rs6000/aix72.h: New file.
26349 2018-02-28 Jakub Jelinek <jakub@redhat.com>
26351 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
26352 instead of warning_at with conditional singular and plural messages
26356 * stor-layout.c (update_alignment_for_field): For
26357 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
26358 && !DECL_PACKED (field), do the alignment update, just use
26359 only desired_align instead of MAX (type_align, desired_align)
26361 (place_field): Don't do known_align < desired_align handling
26362 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
26363 is non-NULL, instead do it after rli->prev_field handling and
26364 only if not within a bitfield word. For DECL_PACKED (field)
26365 use type_align of BITS_PER_UNIT.
26367 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
26369 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
26370 superfluous parentheses and trailing spaces.
26372 2018-02-28 Richard Biener <rguenther@suse.de>
26374 PR tree-optimization/84584
26375 * graphite-scop-detection.c (scop_detection::add_scop): Discard
26376 SCoPs with fake exit edge.
26378 2018-02-28 Martin Liska <mliska@suse.cz>
26381 * timevar.c (timer::print): Fix format to properly print 100%
26384 2018-02-28 Richard Biener <rguenther@suse.de>
26386 PR middle-end/84607
26387 * genmatch.c (capture_info::walk_match): Do not mark
26388 captured expressions without operands as expr_p given
26389 they act more like predicates and should be subject to
26390 "lost tail" side-effect preserving.
26392 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
26394 PR rtl-optimization/81611
26395 * auto-inc-dec.c (attempt_change): Move dead note from
26396 mem_insn if it's the next use of regno
26397 (find_address): Take address use of reg holding
26398 non-incremented value. Add parm to limit search to the named
26400 (merge_in_block): Attempt to use a mem insn that is the next
26401 use of the original regno.
26403 2018-02-27 Martin Sebor <msebor@redhat.com>
26406 * doc/invoke.texi (-Wmissing-attributes): New option.
26407 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
26409 2018-02-27 Martin Sebor <msebor@redhat.com>
26411 PR translation/84207
26412 * diagnostic-core.h (warning_n, error_n, inform_n): Change
26413 n argument to unsigned HOST_WIDE_INT.
26414 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
26415 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
26416 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
26417 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
26419 2018-02-27 Richard Biener <rguenther@suse.de>
26421 PR tree-optimization/84512
26422 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
26423 Do not use the estimate returned from record_stmt_cost for
26424 the scalar iteration cost but sum properly using add_stmt_cost.
26426 2018-02-27 Richard Biener <rguenther@suse.de>
26428 PR tree-optimization/84466
26429 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26430 Adjust last change to less strictly validate use operands.
26432 2018-02-27 Martin Liska <mliska@suse.cz>
26434 PR gcov-profile/84548
26435 * gcov.c (process_file): Allow partial overlap and consider it
26436 also as group functions.
26437 (output_lines): Properly calculate range of lines for a group.
26439 2018-02-27 Martin Liska <mliska@suse.cz>
26441 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
26442 'ggc' suffixes. Change first column width.
26443 (timer::print): Fix formatting of the column.
26445 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
26447 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
26448 preserve inline entry blocks for the sake of debug inline
26449 entry point markers alone.
26450 (remove_unused_locals): Suggest in comments a better place to
26451 force the preservation of inline entry blocks that are
26452 otherwise unused, but do not preserve them.
26454 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26456 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
26458 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26461 * config/i386/constraints.md (Bs): Replace
26462 ix86_indirect_branch_register with
26463 TARGET_INDIRECT_BRANCH_REGISTER.
26465 * config/i386/i386.md (indirect_jump): Likewise.
26466 (tablejump): Likewise.
26467 (*sibcall_memory): Likewise.
26468 (*sibcall_value_memory): Likewise.
26469 Peepholes of indirect call and jump via memory: Likewise.
26470 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
26471 (*sibcall_value_GOT_32): Likewise.
26472 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26473 (GOT_memory_operand): Likewise.
26474 (call_insn_operand): Likewise.
26475 (sibcall_insn_operand): Likewise.
26476 (GOT32_symbol_operand): Likewise.
26477 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
26479 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
26481 PR rtl-optimization/83496
26482 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
26483 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
26484 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
26485 redundant insn, if any.
26486 (relax_delay_slots): Likewise.
26487 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
26489 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
26491 PR tree-optimization/83965
26492 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
26493 that grouped statements are part of a reduction chain. Return
26494 true if the statement is not marked as a reduction itself but
26495 is part of a group.
26496 (vect_recog_dot_prod_pattern): Don't check whether the statement
26497 is part of a group here.
26498 (vect_recog_sad_pattern): Likewise.
26499 (vect_recog_widen_sum_pattern): Likewise.
26501 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
26504 * final.c (rest_of_clean_state): Also look for calls inside sequences.
26506 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26509 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
26511 (ix86_output_indirect_function_return): New prototype.
26512 (ix86_split_simple_return_pop_internal): Likewise.
26513 * config/i386/i386.c (indirect_return_via_cx): New.
26514 (indirect_return_via_cx_bnd): Likewise.
26515 (indirect_thunk_name): Handle return va CX_REG.
26516 (output_indirect_thunk_function): Create alias for
26517 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
26518 (ix86_output_indirect_jmp): Remove the bool argument.
26519 (ix86_output_indirect_function_return): New function.
26520 (ix86_split_simple_return_pop_internal): Likewise.
26521 * config/i386/i386.md (*indirect_jump): Don't pass false
26522 to ix86_output_indirect_jmp.
26523 (*tablejump_1): Likewise.
26524 (simple_return_pop_internal): Change it to define_insn_and_split.
26525 Call ix86_split_simple_return_pop_internal to split it for
26526 -mfunction-return=.
26527 (simple_return_indirect_internal): Call
26528 ix86_output_indirect_function_return instead of
26529 ix86_output_indirect_jmp.
26531 2018-02-26 Jakub Jelinek <jakub@redhat.com>
26534 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
26535 memset and value initialization afterwards.
26537 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
26539 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
26541 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26544 * common/config/aarch64/aarch64-common.c
26545 (aarch_option_optimization_table[]): Switch
26546 off fomit-frame-pointer
26548 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
26549 Chung-Ju Wu <jasonwucj@gmail.com>
26551 * config/nds32/nds32-multiple.md (load_multiple): Disallow
26553 (store_multiple): Ditto.
26555 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
26557 * config.gcc: Add --with-cpu support for nds32 target.
26558 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
26559 * config/nds32/nds32.opt: Add -mcpu= option.
26561 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
26563 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
26564 isel=yes): Warn for these deprecated options.
26566 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
26568 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
26569 ISA_2_5_MASKS_EMBEDDED.
26571 2018-02-23 Jakub Jelinek <jakub@redhat.com>
26573 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
26574 p->max as pointers rather than using iterative_hash_expr.
26576 2018-02-23 Carl Love <cel@us.ibm.com>
26578 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
26579 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
26581 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
26582 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
26583 P8V_BUILTIN_VEC_VUNSIGNED2.
26585 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
26588 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
26589 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
26591 * lra-constraints.c (curr_insn_transform): Set up
26592 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
26594 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
26595 * lra-eliminations.c (spill_pseudos): Ditto.
26596 (process_insn_for_elimination): Ditto.
26597 * lra-lives.c (reg_early_clobber_p): Use the new macros.
26598 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
26599 LRA_NON_CLOBBERED_ALT.
26601 2018-02-22 Martin Sebor <msebor@redhat.com>
26603 PR tree-optimization/84480
26604 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
26605 to maybe_diag_stxncpy_trunc. Call it.
26606 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
26607 from gimple_fold_builtin_strcpy. Print inlining stack.
26608 (handle_builtin_stxncpy): Print inlining stack.
26609 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
26611 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
26614 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
26615 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
26616 and -fcheck-pointer-bounds are used together.
26617 (indirect_thunk_prefix): New enum.
26618 (indirect_thunk_need_prefix): New function.
26619 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
26620 "_nt" instead of "_bnd" for NOTRACK prefix.
26621 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
26622 (output_indirect_thunk_function): Likewise.
26624 (ix86_code_end): Update output_indirect_thunk_function calls.
26625 (ix86_output_indirect_branch_via_reg): Replace
26626 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
26627 (ix86_output_indirect_branch_via_push): Likewise.
26628 (ix86_output_function_return): Likewise.
26629 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
26630 incompatible with -fcf-protection=branch and
26631 -fcheck-pointer-bounds.
26633 2018-02-22 Steve Ellcey <sellcey@cavium.com>
26636 * config/aarch64/aarch64.c (aarch64_print_address_internal):
26637 Change gcc_assert call to output_operand_lossage.
26639 2018-02-22 Steve Ellcey <sellcey@cavium.com>
26641 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
26643 2018-02-22 DJ Delorie <dj@redhat.com>
26644 Sebastian Perta <sebastian.perta@renesas.com>
26645 Oleg Endo <olegendo@gcc.gnu.org>
26647 * config/rx/rx.c (rx_rtx_costs): New function.
26648 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
26650 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
26652 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
26654 2018-02-22 Martin Liska <mliska@suse.cz>
26657 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
26658 Add "native" as a possible value.
26660 2018-02-22 Martin Liska <mliska@suse.cz>
26663 * config/i386/i386.c (ix86_option_override_internal):
26664 Add "native" as a possible value for -march and -mtune.
26666 2018-02-22 Jakub Jelinek <jakub@redhat.com>
26669 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
26670 to all type variants.
26672 PR tree-optimization/84503
26673 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
26674 width as info->bitpos + info->bitsize - start.
26675 (merged_store_group::merge_overlapping): Simplify width computation.
26676 (check_no_overlap): New function.
26677 (imm_store_chain_info::try_coalesce_bswap): Compute expected
26678 start + width and last_order of the group, fail if check_no_overlap
26680 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
26681 to group if check_no_overlap fails.
26683 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
26685 * config/rs6000/altivec.md: Delete contraint arguments to
26686 define_expand, define_split, and define_peephole2, and in
26687 define_insn_and_split if always unused.
26688 * config/rs6000/darwin.md: Ditto.
26689 * config/rs6000/dfp.md: Ditto.
26690 * config/rs6000/rs6000.md: Ditto.
26691 * config/rs6000/sync.md: Ditto.
26692 * config/rs6000/vector.md: Ditto.
26693 * config/rs6000/vsx.md: Ditto.
26695 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
26697 * config/rs6000/altivec.md: Write output control strings as braced
26698 blocks instead of double-quoted strings.
26699 * config/rs6000/darwin.md: Ditto.
26700 * config/rs6000/rs6000.md: Ditto.
26701 * config/rs6000/vector.md: Ditto.
26702 * config/rs6000/vsx.md: Ditto.
26704 2018-02-21 Jason Merrill <jason@redhat.com>
26706 PR c++/84314 - ICE with templates and fastcall attribute.
26707 * attribs.c (build_type_attribute_qual_variant): Remove assert.
26709 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
26711 * ipa-cp.c (determine_versionability): Fix comment typos.
26713 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
26716 * ipa-cp.c (determine_versionability): Do not version functions caling
26719 2018-02-21 Martin Liska <mliska@suse.cz>
26722 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
26723 Add "native" as a possible value.
26724 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
26725 the macro when native cpu detection is available.
26727 2018-02-21 Martin Liska <mliska@suse.cz>
26730 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
26731 Add "native" as a possible value.
26732 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
26733 when native cpu detection is available.
26735 2018-02-21 Jakub Jelinek <jakub@redhat.com>
26736 Martin Sebor <msebor@redhat.com>
26738 PR tree-optimization/84478
26739 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
26741 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
26742 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
26743 support which is conservatively correct, for 2 only stay conservative
26744 for maxlen. Formatting and comment capitalization fixes. Add STRICT
26745 argument to the 2 argument get_range_strlen, adjust 6 arg
26746 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
26748 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
26749 (gimple_fold_builtin_strlen): Pass true as last argument to
26752 2018-02-20 Martin Sebor <msebor@redhat.com>
26754 PR middle-end/84095
26755 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
26756 (builtin_memref::set_base_and_offset): Same. Handle inner references.
26757 (builtin_memref::builtin_memref): Factor out parts into
26758 set_base_and_offset and call it.
26760 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
26762 PR middle-end/84406
26763 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
26764 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
26765 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
26766 search at the associated MODE_INT.
26768 2018-02-20 Jeff Law <law@redhat.com>
26770 PR middle-end/82123
26771 PR tree-optimization/81592
26772 PR middle-end/79257
26773 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
26774 for range data rather than using global data.
26775 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
26776 range data rather than using global data.
26777 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
26778 pass it to children as needed.
26779 (struct directive::fmtresult): Similarly.
26780 (struct directive::set_width): Similarly.
26781 (struct directive::set_precision): Similarly.
26782 (format_integer, format_directive, parse_directive): Similarly.
26783 (format_none): Accept unnamed vr_values parameter.
26784 (format_percent, format_floating, format_character): Similarly.
26785 (format_string, format_plain): Similarly.
26786 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
26787 the EVRP range analyzer for range data rather than using global data.
26788 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
26789 gimple-ssa-evrp-analyze.h
26790 (class sprintf_dom_walker): Add after_dom_children member function.
26791 Add evrp_range_analyzer member.
26792 (sprintf_dom_walker::before_dom_children): Call into the EVRP
26793 range analyzer as needed.
26794 (sprintf_dom_walker::after_dom_children): New member function.
26795 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
26797 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
26798 (evrp_range_analyzer::pop_to_marker): Likewise.
26800 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
26802 PR tree-optimization/84419
26803 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
26804 with the required type if its current type is compatible but
26807 2018-02-20 Jakub Jelinek <jakub@redhat.com>
26809 PR middle-end/82004
26810 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
26811 after vectorization.
26813 2018-02-20 Martin Liska <mliska@suse.cz>
26816 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
26817 possible values if we don't have a hint.
26819 2018-02-20 Martin Liska <mliska@suse.cz>
26823 * final.c (shorten_branches): Build align_tab array with one
26825 * opts.c (finish_options): Add alignment option limit check.
26826 (MAX_CODE_ALIGN): Likewise.
26827 (MAX_CODE_ALIGN_VALUE): Likewise.
26828 * doc/invoke.texi: Document maximum allowed option value for
26829 all -falign-* options.
26831 2018-02-19 Jakub Jelinek <jakub@redhat.com>
26834 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
26835 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
26836 * var-tracking.c (emit_note_insn_var_location): Remove all references
26837 to NOTE_INSN_CALL_ARG_LOCATION.
26838 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
26839 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
26840 Use copy_rtx_if_shared.
26841 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
26842 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
26843 (dwarf2out_var_location): Remove handling of
26844 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
26846 * final.c (final_scan_insn): Remove all references to
26847 NOTE_INSN_CALL_ARG_LOCATION.
26848 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
26849 before dumping final insns.
26850 * except.c (emit_note_eh_region_end): Remove all references to
26851 NOTE_INSN_CALL_ARG_LOCATION.
26852 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
26853 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
26854 * config/arc/arc.c (hwloop_optimize): Likewise.
26855 * config/arm/arm.c (create_fix_barrier): Likewise.
26856 * config/s390/s390.c (s390_chunkify_start): Likewise.
26857 * config/sh/sh.c (find_barrier): Likewise.
26858 * config/i386/i386.c (rest_of_insert_endbranch,
26859 ix86_seh_fixup_eh_fallthru): Likewise.
26860 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
26861 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
26862 * config/frv/frv.c (frv_function_prologue): Likewise.
26863 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
26865 (note_outside_basic_block_p): Remove all references to
26866 NOTE_INSN_CALL_ARG_LOCATION.
26867 * gengtype.c (adjust_field_rtx_def): Likewise.
26868 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
26870 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
26871 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
26874 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
26877 PR tree-optimization/84452
26878 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
26879 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
26882 2018-02-19 Martin Liska <mliska@suse.cz>
26885 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
26887 2018-02-19 Martin Liska <mliska@suse.cz>
26888 Richard Sandiford <richard.sandiford@linaro.org>
26890 PR tree-optimization/82491
26891 * gimple-fold.c (get_base_constructor): Make earlier bail out
26894 2018-02-19 Carl Love <cel@us.ibm.com>
26896 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
26897 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
26899 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
26900 P8V_BUILTIN_VEC_NEG.
26902 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
26904 * config/rl78/rl78.md (movdf): New define expand.
26906 2018-02-19 Martin Liska <mliska@suse.cz>
26909 * doc/invoke.texi: Fix typo.
26910 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26912 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
26914 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26915 handle rs6000_single_float and rs6000_double_float specially for
26918 2018-02-16 Jeff Law <law@redhat.com>
26920 * config/rx/rx.c (add_pop_cfi_notes): New function.;
26921 (pop_regs): Use it.
26923 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26926 * ipa-inline.c (inline_small_functions): Fix a typo.
26928 2018-02-16 Nathan Sidwell <nathan@acm.org>
26930 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26932 2018-02-16 Carl Love <cel@us.ibm.com>
26934 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26935 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26936 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26937 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26938 expansion to P8V_BUILTIN_VEC_FLOAT2.
26940 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
26942 PR rtl-optimization/70023
26943 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26944 src_regno into account.
26946 2018-02-16 Carl Love <cel@us.ibm.com>
26948 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26949 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26950 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26951 * config/rs6000/rs6000.c: Remove case statements for
26952 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26953 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26954 and P9V_BUILTIN_VEC_VINSERT4B.
26955 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26956 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26957 * config/rs6000/vsx.md:
26958 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26961 2018-02-16 Carl Love <cel@us.ibm.com>
26963 * config/rs6000/altivec.h: Add builtin names vec_extract4b
26965 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26967 * config/rs6000/rs6000-c.c: Add the definitions for
26968 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26969 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26970 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26971 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
26972 definition for insert4b and define insn *insert3b_internal.
26973 * doc/extend.texi: Add documentation for vec_extract4b.
26975 2018-02-16 Nathan Sidwell <nathan@acm.org>
26977 * doc/extend.texi (Backwards Compatibility): Mention friend
26978 injection. Note for-scope is deprecated.
26979 * doc/invoke.texi (-ffriend-injection): Deprecate.
26981 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
26983 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26984 that moved to I2, also allow destinations that are a paradoxical
26985 subreg (instead of a normal reg).
26987 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
26990 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
26993 2018-02-16 Richard Biener <rguenther@suse.de>
26995 PR tree-optimization/84037
26996 PR tree-optimization/84016
26998 * config/i386/i386.c (ix86_builtin_vectorization_cost):
26999 Adjust vec_construct for the fact we need additional higher latency
27000 128bit inserts for AVX256 and AVX512 vector builds.
27001 (ix86_add_stmt_cost): Scale vector construction cost for
27004 2018-02-16 Richard Biener <rguenther@suse.de>
27006 PR tree-optimization/84417
27007 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
27008 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
27009 (non_rewritable_lvalue_p): Likewise, use poly-ints.
27011 2018-02-16 Martin Liska <mliska@suse.cz>
27014 * internal-fn.def (ASAN_CHECK): Set proper flags.
27015 (ASAN_MARK): Likewise.
27017 2018-02-16 Julia Koval <julia.koval@intel.com>
27019 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
27020 from PTA_CANNONLAKE.
27022 2018-02-16 Jakub Jelinek <jakub@redhat.com>
27025 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
27026 Use ++iter rather than iter++ for std::list iterators.
27027 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
27028 defer deleting them until all nodes in the forest are processed. Do
27029 free even leaf nodes. Change to_process into auto_vec.
27032 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
27033 * vec.h (vec_default_construct): Use memset instead of placement new
27034 if BROKEN_VALUE_INITIALIZATION is defined.
27035 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
27036 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
27039 PR rtl-optimization/83723
27040 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
27041 * lra.c (lra_substitute_pseudo): Likewise. If true, use
27042 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
27044 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
27046 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
27048 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
27050 PR rtl-optimization/81443
27051 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
27052 from inner REGs to paradoxical SUBREGs.
27054 2018-02-16 Richard Biener <rguenther@suse.de>
27056 PR tree-optimization/84399
27057 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
27058 For operands we can analyze at their definition make sure we can
27059 analyze them at each use as well.
27061 2018-02-16 Richard Biener <rguenther@suse.de>
27063 PR tree-optimization/84190
27064 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
27065 volatile accesses if the decl isn't volatile.
27067 2018-02-15 Jason Merrill <jason@redhat.com>
27069 PR c++/84314 - ICE with templates and fastcall attribute.
27070 * attribs.c (build_type_attribute_qual_variant): Don't clobber
27071 TYPE_CANONICAL on an existing type.
27073 2018-02-15 Jakub Jelinek <jakub@redhat.com>
27075 PR tree-optimization/84383
27076 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
27077 dstoff nor call operand_equal_p if dstbase is NULL.
27079 PR tree-optimization/84334
27080 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
27081 also a CONSTANT_CLASS_P, punt.
27083 2018-02-14 Jim Wilson <jimw@sifive.com>
27085 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
27086 first SMALL_OPERAND check. New local min_second_step. Move assert
27087 to where locals are set. Add TARGET_RVC support.
27088 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
27090 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
27092 * doc/invoke.texi: Correct -Wformat-overflow code sample.
27094 2018-02-14 Martin Sebor <msebor@redhat.com>
27096 PR tree-optimization/83698
27097 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
27098 arrays constrain the offset range to their bounds.
27099 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
27100 (builtin_access::overlap): Avoid setting the size of overlap if it's
27102 (maybe_diag_overlap): Also consider arrays when deciding what values
27103 of offsets to include in diagnostics.
27105 2018-02-14 Martin Sebor <msebor@redhat.com>
27108 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
27109 that correspond to the kind of a declaration.
27111 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
27114 * config/pa/pa.md: Load address of PIC label using the linkage table
27115 if the label is nonlocal.
27117 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
27119 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
27120 warning message if user requests -maltivec=be.
27121 * doc/invoke.texi: Document deprecation of -maltivec=be.
27123 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
27126 * config/rs6000/rs6000-c.c: Update definitions for
27127 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
27128 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
27130 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27133 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
27134 add _get_ssp intrinsics. Remove argument from
27135 __builtin_ia32_rdssp[d|q].
27136 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
27137 * config/i386/i386-builtin.def: Remove argument from
27138 __builtin_ia32_rdssp[d|q].
27139 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
27140 ix86_expand_special_args_builtin for _rdssp[d|q].
27141 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
27142 Clear register before usage.
27143 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
27144 Add documentation for new _get_ssp and _inc_ssp intrinsics.
27146 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
27148 PR tree-optimization/84357
27149 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
27150 operand 1 of an ARRAY_REF too.
27152 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
27155 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
27156 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27158 (set_of_reg): New struct.
27159 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
27160 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
27161 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
27163 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
27164 Split into bitclr, bitset, bitinvert patterns if appropriate.
27165 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
27166 use rx_fuse_in_memory_bitop.
27167 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
27168 to named insn, correct maximum insn length.
27170 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
27173 * machmode.def: Define a complex mode for PARTIAL_INT.
27174 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
27176 * doc/rtl.texi: Document CSPImode.
27177 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
27179 (msp430_hard_regno_nregs_with_padding): Likewise.
27181 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
27184 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
27186 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
27188 PR rtl-optimization/84169
27189 * combine.c (try_combine): New variable split_i2i3. Set it to true if
27190 we generated a parallel as new i3 and we split that to new i2 and i3
27191 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
27192 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
27193 those to i2, not i1. Partially rewrite this scan code.
27195 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27198 * stor-layout.c (place_field): For variable length fields, adjust
27199 offset_align afterwards not just based on the field's alignment,
27200 but also on the size.
27202 PR middle-end/84309
27203 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
27204 of exps and logs in the use_exp2 case.
27206 2018-02-13 Jeff Law <law@redhat.com>
27208 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
27209 entry for "vector".
27211 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
27214 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
27218 * common.opt (gas-loc-support, gas-locview-support): New.
27219 (ginline-points, ginternal-reset-location-views): New.
27220 * doc/invoke.texi: Document them. Use @itemx where intended.
27221 (gvariable-location-views): Adjust.
27222 * target.def (reset_location_view): New.
27223 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
27224 (TARGET_RESET_LOCATION_VIEW): New.
27225 * doc/tm.texi: Rebuilt.
27226 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
27227 (dwarf2out_default_as_locview_support): New.
27228 (output_asm_line_debug_info): Use option variables.
27229 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
27230 (output_loc_list): Likewise.
27231 (add_high_low_attributes): Check option variables.
27232 Don't output entry view attribute in strict mode.
27233 (gen_inlined_subroutine_die): Check option variables.
27234 (dwarf2out_inline_entry): Likewise.
27235 (init_sections_and_labels): Likewise.
27236 (dwarf2out_early_finish): Likewise.
27237 (maybe_reset_location_view): New, from...
27238 (dwarf2out_var_location): ... here. Call it.
27239 * debug.h (dwarf2out_default_as_loc_support): Declare.
27240 (dwarf2out_default_as_locview_support): Declare.
27241 * hooks.c (hook_int_rtx_insn_0): New.
27242 * hooks.h (hook_int_rtx_insn_0): Declare.
27243 * toplev.c (process_options): Take -gas-loc-support and
27244 -gas-locview-support from dwarf2out. Enable
27245 -gvariable-location-views by default only with locview
27246 assembler support. Enable -ginternal-reset-location-views by
27247 default only if the target defines the corresponding hook.
27248 Enable -ginline-points by default if location views are
27249 enabled; force it disabled if statement frontiers are
27251 * tree-inline.c (expand_call_inline): Check option variables.
27252 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
27254 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
27256 PR tree-optimization/84321
27257 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
27258 handling. Also check whether the anti-range contains any values
27259 that satisfy the mask; switch to a VR_RANGE if not.
27261 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
27264 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
27266 2018-02-13 Martin Jambor <mjambor@suse.cz>
27269 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
27270 of call statements, also set location of a load to a temporary.
27272 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
27274 * config/rl78/rl78.c (add_vector_labels): New function.
27275 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
27276 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
27277 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
27278 which checks that no arguments are passed.
27279 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
27280 * doc/extend.texi: Documentation for the new attribute.
27282 2018-02-13 Andreas Schwab <schwab@suse.de>
27284 * config/riscv/linux.h (CPP_SPEC): Define.
27286 2018-02-13 Jakub Jelinek <jakub@redhat.com>
27289 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
27290 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
27291 OPTION_MASK_ISA_AES as first argument to def_builtin_const
27292 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
27293 instead of OPTION_MASK_ISA_PCLMUL as first argument to
27294 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
27295 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
27296 temporarily for AES and PCLMUL builtins.
27298 PR tree-optimization/84339
27299 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
27300 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
27303 PR middle-end/84309
27304 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
27305 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
27306 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
27308 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
27310 * omp-simd-clone.h: New file.
27311 * omp-simd-clone.c: Include omp-simd-clone.h.
27312 (expand_simd_clones): No longer static.
27313 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
27314 cgraph.h and omp-simd-clone.h.
27315 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
27316 (vect_recog_widen_shift_pattern): Formatting fix.
27317 (vect_pattern_recog_1): Don't check optab for calls.
27320 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
27321 operands[2] into a REG before using gen_lowpart on it.
27323 2018-02-12 Jeff Law <law@redhat.com>
27326 * config/sh/sh.c (find_barrier): Consider a sibling call
27329 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
27330 successfully back substituting a reg.
27332 2018-02-12 Richard Biener <rguenther@suse.de>
27334 PR tree-optimization/84037
27335 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
27336 parameter, move visited init to caller.
27337 (vect_slp_analyze_operations): Separate cost from validity
27338 check, initialize visited once for all instances.
27339 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
27341 * tree-vect-stmts.c (vect_model_simple_cost): Make early
27343 (vect_model_promotion_demotion_cost): Likewise.
27344 (vectorizable_bswap): Guard cost modeling with !slp_node
27345 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
27347 (vectorizable_call): Likewise.
27348 (vectorizable_conversion): Likewise.
27349 (vectorizable_assignment): Likewise.
27350 (vectorizable_shift): Likewise.
27351 (vectorizable_operation): Likewise.
27352 (vectorizable_store): Likewise.
27353 (vectorizable_load): Likewise.
27354 (vectorizable_condition): Likewise.
27355 (vectorizable_comparison): Likewise.
27357 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
27360 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
27361 (ASAN_MARK): Fix fnspec to account for return value, change pointer
27362 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
27364 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
27366 PR middle-end/83665
27367 * params.def (inline-min-speedup): Increase from 8 to 15.
27368 (max-inline-insns-auto): Decrease from 40 to 30.
27369 * ipa-split.c (consider_split): Add some buffer for function to
27370 be considered inlining candidate.
27371 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
27374 2018-02-12 Richard Biener <rguenther@suse.de>
27376 PR tree-optimization/84037
27377 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
27378 matched stmts if we cannot swap the non-matched ones.
27380 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
27382 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
27383 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
27384 _mm_maskz_scalef_round_ss): New intrinsics.
27385 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
27386 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
27387 __builtin_ia32_scalefss_round): Remove.
27388 (__builtin_ia32_scalefsd_mask_round,
27389 __builtin_ia32_scalefss_mask_round): New intrinsics.
27390 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
27391 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
27392 ((match_operand:VF_128 2 "<round_nimm_predicate>"
27393 "<round_constraint>")): Changed to ...
27394 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
27395 "<round_scalar_constraint>")): ... this.
27396 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
27397 %0, %1, %2<round_op3>}"): Changed to ...
27398 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
27399 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
27400 %2<round_scalar_mask_op3>}"): ... this.
27401 * config/i386/subst.md (round_scalar_nimm_predicate): New.
27403 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
27405 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
27406 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
27407 (_mm_maskz_sqrt_round_ss): New intrinsics.
27408 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
27409 (__builtin_ia32_sqrtsd_mask_round)
27410 (__builtin_ia32_sqrtss_mask_round): New builtins.
27411 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
27412 (__builtin_ia32_sqrtss_round): Remove.
27413 (__builtin_ia32_sqrtsd_mask_round)
27414 (__builtin_ia32_sqrtss_mask_round): New builtins.
27415 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
27416 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
27417 ((match_operand:VF_128 1 "vector_operand"
27418 "xBm,<round_constraint>")): Changed to ...
27419 ((match_operand:VF_128 1 "vector_operand"
27420 "xBm,<round_scalar_constraint>")): ... this.
27421 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
27422 %0, %2, %<iptr>1<round_op3>}): Changed to ...
27423 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
27424 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
27425 %<iptr>1<round_scalar_mask_op3>}): ... this.
27426 ((set_attr "prefix" "<round_prefix>")): Changed to ...
27427 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
27429 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
27432 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
27433 Cast vec_cmpeq result to correct type.
27434 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
27435 Cast vec_cmpgt result to correct type.
27437 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
27439 * final.c (final_scan_insn_1): Renamed from...
27440 (final_scan_insn): ... this. New wrapper, to recover
27441 seen from the outermost call in recursive ones.
27442 * config/sparc/sparc.c (output_return): Drop seen from call.
27443 (output_sibcall): Likewise.
27444 * config/visium/visium.c (output_branch): Likewise.
27446 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
27448 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
27451 2018-02-10 Alan Modra <amodra@gmail.com>
27454 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
27455 Specify LR as an input.
27457 2018-02-10 Jakub Jelinek <jakub@redhat.com>
27460 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
27461 remove_member_access_dummy_vars): New functions.
27462 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
27463 lower_omp_1, execute_lower_omp): Use them.
27465 PR rtl-optimization/84308
27466 * shrink-wrap.c (spread_components): Release todo vector.
27468 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
27470 PR rtl-optimization/57193
27471 * ira-color.c (struct allocno_color_data): Add member
27472 conflict_allocno_hard_prefs.
27473 (update_conflict_allocno_hard_prefs): New.
27474 (bucket_allocno_compare_func): Add a preference based on
27475 conflict_allocno_hard_prefs.
27476 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
27477 (color_allocnos): Remove a dead code. Initiate
27478 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
27480 2018-02-09 Jakub Jelinek <jakub@redhat.com>
27483 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
27484 constraint from =wa to wa. Avoid a subreg on the output operand,
27485 instead use a pseudo and subreg it in a move.
27486 (p9_xxbrd_<mode>): Changed to ...
27487 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
27488 (p9_xxbrd_v2df): New expander.
27489 (p9_xxbrw_<mode>): Changed to ...
27490 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
27491 (p9_xxbrw_v4sf): New expander.
27493 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
27495 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
27497 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
27500 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
27501 multiply in 32-bit mode.
27502 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
27503 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
27506 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
27508 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
27509 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
27510 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
27511 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
27513 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
27516 * dwarf2out.c (is_trivial_indirect_ref): New function.
27517 (dwarf2out_late_global_decl): Do not generate a location
27518 attribute for variables that have a non-trivial DECL_VALUE_EXPR
27519 and that are not defined in the current unit.
27521 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
27523 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
27524 instead of a libcall for UNORDERED.
27526 2018-02-09 Tamar Christina <tamar.christina@arm.com>
27529 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
27530 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
27532 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27535 * config/s390/s390.c (s390_set_current_function): Invoke
27536 s390_indirect_branch_settings also if fndecl didn't change.
27538 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
27540 * config/rs6000/rs6000.md (blockage): Set length to zero.
27542 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
27544 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
27546 2018-02-09 Jakub Jelinek <jakub@redhat.com>
27549 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
27550 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
27554 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
27555 PARALLEL incoming that failed vt_get_decl_and_offset check.
27557 PR middle-end/84237
27558 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
27559 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
27561 (get_variable_section): For decls in named .bss* sections pass true as
27562 second argument to bss_initializer_p.
27564 2018-02-09 Marek Polacek <polacek@redhat.com>
27565 Jakub Jelinek <jakub@redhat.com>
27568 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
27569 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
27570 Sync some changes from cxx_fold_indirect_ref.
27572 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
27574 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
27576 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
27577 (BLOCK_INLINE_ENTRY_LABEL): New.
27578 (dwarf2out_var_location): Disregard inline entry markers.
27579 (inline_entry_data): New struct.
27580 (inline_entry_data_hasher): New hashtable type.
27581 (inline_entry_data_hasher::hash): New.
27582 (inline_entry_data_hasher::equal): New.
27583 (inline_entry_data_table): New variable.
27584 (add_high_low_attributes): Add DW_AT_entry_pc and
27585 DW_AT_GNU_entry_view attributes if a pending entry is found
27586 in inline_entry_data_table. Add old entry_pc attribute only
27587 if debug nonbinding markers are disabled.
27588 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
27589 markers are enabled.
27590 (block_within_block_p, dwarf2out_inline_entry): New.
27591 (dwarf2out_finish): Check that no entries remained in
27592 inline_entry_data_table.
27593 * final.c (reemit_insn_block_notes): Handle inline entry notes.
27594 (final_scan_insn, notice_source_line): Likewise.
27595 (rest_of_clean_state): Skip inline entry markers.
27596 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
27598 * gimple.c (gimple_build_debug_inline_entry): New.
27599 * gimple.h (enum gimple_debug_subcode): Add
27600 GIMPLE_DEBUG_INLINE_ENTRY.
27601 (gimple_build_debug_inline_entry): Declare.
27602 (gimple_debug_inline_entry_p): New.
27603 (gimple_debug_nonbind_marker_p): Adjust.
27604 * insn-notes.def (INLINE_ENTRY): New.
27605 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
27606 inline entry marker notes.
27607 (print_insn): Likewise.
27608 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
27609 (INSN_DEBUG_MARKER_KIND): Likewise.
27610 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
27611 * tree-inline.c (expand_call_inline): Build and insert
27612 debug_inline_entry stmt.
27613 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
27614 inline entry blocks early, if nonbind markers are enabled.
27615 (dump_scope_block): Dump fragment info.
27616 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
27617 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
27618 (gimple_build_debug_inline_entry): New.
27619 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
27620 Enable/disable inline entry points too.
27621 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
27622 (DEBUG_INSN): Describe inline entry markers.
27624 * common.opt (gvariable-location-views): New.
27625 (gvariable-location-views=incompat5): New.
27626 * config.in: Rebuilt.
27627 * configure: Rebuilt.
27628 * configure.ac: Test assembler for view support.
27629 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
27630 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
27631 * dwarf2out.c (var_loc_view): New typedef.
27632 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
27633 (dwarf2out_locviews_in_attribute): New.
27634 (dwarf2out_locviews_in_loclist): New.
27635 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
27636 (enum dw_line_info_opcode): Add LI_adv_address.
27637 (struct dw_line_info_table): Add view.
27638 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
27639 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
27640 (zero_view_p): New variable.
27641 (ZERO_VIEW_P): New macro.
27642 (output_asm_line_debug_info): New.
27643 (struct var_loc_node): Add view.
27644 (add_AT_view_list, AT_loc_list): New.
27645 (add_var_loc_to_decl): Add view param. Test it against last.
27646 (new_loc_list): Add view params. Record them.
27647 (AT_loc_list_ptr): Handle loc and view lists.
27648 (view_list_to_loc_list_val_node): New.
27649 (print_dw_val): Handle dw_val_class_view_list.
27650 (size_of_die): Likewise.
27651 (value_format): Likewise.
27652 (loc_list_has_views): New.
27653 (gen_llsym): Set vl_symbol too.
27654 (maybe_gen_llsym, skip_loc_list_entry): New.
27655 (dwarf2out_maybe_output_loclist_view_pair): New.
27656 (output_loc_list): Output view list or entries too.
27657 (output_view_list_offset): New.
27658 (output_die): Handle dw_val_class_view_list.
27659 (output_dwarf_version): New.
27660 (output_compilation_unit_header): Use it.
27661 (output_skeleton_debug_sections): Likewise.
27662 (output_rnglists, output_line_info): Likewise.
27663 (output_pubnames, output_aranges): Update version comments.
27664 (output_one_line_info_table): Output view numbers in asm comments.
27665 (dw_loc_list): Determine current endview, pass it to new_loc_list.
27666 Call maybe_gen_llsym.
27667 (loc_list_from_tree_1): Adjust.
27668 (add_AT_location_description): Create view list attribute if
27669 needed, check it's absent otherwise.
27670 (convert_cfa_to_fb_loc_list): Adjust.
27671 (maybe_emit_file): Call output_asm_line_debug_info for test.
27672 (dwarf2out_var_location): Reset views as needed. Precompute
27673 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
27674 attribute. Set view.
27675 (new_line_info_table): Reset next view.
27676 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
27677 (dwarf2out_source_line): Likewise. Output view resets and labels to
27678 the assembler, or select appropriate line info opcodes.
27679 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
27680 (optimize_string_length): Catch it. Adjust.
27681 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
27682 dw_val_class_view_list, and remove it if no longer needed.
27683 (hash_loc_list): Hash view numbers.
27684 (loc_list_hasher::equal): Compare them.
27685 (optimize_location_lists): Check whether a view list symbol is
27686 needed, and whether the locview attribute is present, and
27687 whether they match. Remove the locview attribute if no longer
27689 (index_location_lists): Call skip_loc_list_entry for test.
27690 (dwarf2out_finish): Call output_asm_line_debug_info for test.
27691 Use output_dwarf_version.
27692 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
27693 (struct dw_val_node): Add val_view_list.
27694 * final.c (SEEN_NEXT_VIEW): New.
27695 (set_next_view_needed): New.
27696 (clear_next_view_needed): New.
27697 (maybe_output_next_view): New.
27698 (final_start_function): Rename to...
27699 (final_start_function_1): ... this. Take pointer to FIRST,
27700 add SEEN parameter. Emit param bindings in the initial view.
27701 (final_start_function): Reintroduce SEEN-less interface.
27702 (final): Rename to...
27703 (final_1): ... this. Take SEEN parameter. Output final pending
27704 next view at the end.
27705 (final): Reintroduce seen-less interface.
27706 (final_scan_insn): Output pending next view before switching
27707 sections or ending a block. Mark the next view as needed when
27708 outputting variable locations. Notify debug backend of section
27709 changes, and of location view changes.
27710 (rest_of_handle_final): Adjust.
27711 * toplev.c (process_options): Autodetect value for debug variable
27712 location views option. Warn on incompat5 without -gdwarf-5.
27713 * doc/invoke.texi (gvariable-location-views): New.
27714 (gvariable-location-views=incompat5): New.
27715 (gno-variable-location-views): New.
27717 2018-02-08 David Malcolm <dmalcolm@redhat.com>
27719 PR tree-optimization/84136
27720 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
27721 that the result of find_edge is non-NULL.
27723 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
27726 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
27727 storing integer register in SImode. Fix cost of 256 and 512
27728 byte aligned SSE register store.
27730 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
27732 * config/i386/i386.c (ix86_multiplication_cost): Fix
27733 multiplication cost for TARGET_AVX512DQ.
27735 2018-02-08 Marek Polacek <polacek@redhat.com>
27737 PR tree-optimization/84238
27738 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
27741 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27743 PR tree-optimization/84265
27744 * tree-vect-stmts.c (vectorizable_store): Don't treat
27745 VMAT_CONTIGUOUS accesses as grouped.
27746 (vectorizable_load): Likewise.
27748 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27750 PR tree-optimization/81635
27751 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
27752 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
27753 (test_round_for_mask): New functions.
27754 (wide_int_cc_tests): Call test_round_for_mask.
27755 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
27756 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
27757 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
27758 range returned by get_range_info.
27760 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
27763 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
27764 * symtab.c: Include builtins.h
27765 (symtab_node::output_to_lto_symbol_table_p): Move here
27766 from lto-streamer-out.c:output_symbol_p.
27767 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
27768 (output_symbol_p): Move all logic to symtab.c
27769 (produce_symtab): Update.
27771 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27773 * config/s390/s390-opts.h (enum indirect_branch): Define.
27774 * config/s390/s390-protos.h (s390_return_addr_from_memory)
27775 (s390_indirect_branch_via_thunk)
27776 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
27777 (enum s390_indirect_branch_type): Define.
27778 * config/s390/s390.c (struct s390_frame_layout, struct
27779 machine_function): Remove.
27780 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
27781 (indirect_branch_table_label_no, indirect_branch_table_name):
27783 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
27784 (enum s390_indirect_branch_option): Define.
27785 (s390_return_addr_from_memory): New function.
27786 (s390_handle_string_attribute): New function.
27787 (s390_attribute_table): Add new attribute handler.
27788 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
27789 (s390_indirect_branch_via_thunk): New function.
27790 (s390_indirect_branch_via_inline_thunk): New function.
27791 (s390_function_ok_for_sibcall): When jumping via thunk disallow
27792 sibling call optimization for non z10 compiles.
27793 (s390_emit_call): Force indirect branch target to be a single
27794 register. Add r1 clobber for non-z10 compiles.
27795 (s390_emit_epilogue): Emit return jump via return_use expander.
27796 (s390_reorg): Handle JUMP_INSNs as execute targets.
27797 (s390_option_override_internal): Perform validity checks for the
27798 new command line options.
27799 (s390_indirect_branch_attrvalue): New function.
27800 (s390_indirect_branch_settings): New function.
27801 (s390_set_current_function): Invoke s390_indirect_branch_settings.
27802 (s390_output_indirect_thunk_function): New function.
27803 (s390_code_end): Implement target hook.
27804 (s390_case_values_threshold): Implement target hook.
27805 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
27807 * config/s390/s390.h (struct s390_frame_layout)
27808 (struct machine_function): Move here from s390.c.
27809 (TARGET_INDIRECT_BRANCH_NOBP_RET)
27810 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
27811 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
27812 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
27813 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
27814 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
27815 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
27816 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
27817 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
27818 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
27819 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
27820 (mnemonic attribute): Add values which aren't recognized
27822 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
27823 pattern for branch conversion. Fix mnemonic attribute.
27824 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
27825 indirect branch via thunk if requested.
27826 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
27827 ("*indirect_jump"): Disable for branch conversion using out of
27829 ("indirect_jump_via_thunk<mode>_z10")
27830 ("indirect_jump_via_thunk<mode>")
27831 ("indirect_jump_via_inlinethunk<mode>_z10")
27832 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
27833 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
27834 ("casesi_jump_via_inlinethunk<mode>_z10")
27835 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
27836 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
27837 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
27838 ("*indirect2_jump"): Disable for branch conversion.
27839 ("casesi_jump"): Turn into expander and expand patterns for branch
27841 ("return_use"): New expander.
27842 ("*return"): Emit return via thunk and rename it to ...
27843 ("*return<mode>"): ... this one.
27844 * config/s390/s390.opt: Add new options and and enum for the
27847 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27849 * lra-constraints.c (match_reload): Unconditionally use
27850 gen_lowpart_SUBREG, rather than selecting between that
27851 and equivalent gen_rtx_SUBREG code.
27853 2018-02-08 Richard Biener <rguenther@suse.de>
27855 PR tree-optimization/84233
27856 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
27857 changed flag instead of boguously re-using phi_inserted.
27859 2018-02-08 Martin Jambor <mjambor@suse.cz>
27861 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
27862 static local variables.
27864 2018-02-08 Richard Biener <rguenther@suse.de>
27866 PR tree-optimization/84278
27867 * tree-vect-stmts.c (vectorizable_store): When looking for
27868 smaller vector types to perform grouped strided loads/stores
27869 make sure the mode is supported by the target.
27870 (vectorizable_load): Likewise.
27872 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
27874 * config/aarch64/aarch64.c (aarch64_components_for_bb):
27875 Increase LDP/STP opportunities by adding adjacent callee-saves.
27877 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
27879 PR rtl-optimization/84068
27880 PR rtl-optimization/83459
27881 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
27883 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
27885 PR tree-optimization/84224
27886 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
27887 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
27888 non-zero arguments.
27890 2018-02-07 Iain Sandoe <iain@codesourcery.com>
27893 * config/rs6000/altivec.md (*restore_world): Remove LR use.
27894 * config/rs6000/predicates.md (restore_world_operation): Adjust op
27895 count, remove one USE.
27897 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
27899 * doc/install.texi (Configuration): Document the
27900 --with-long-double-format={ibm,ieee} PowerPC configuration
27904 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27905 Convert from define_expand to be define_insn_and_split. Rework
27906 float/double/_Float128 conversions to QI/HI/SImode to work with
27907 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
27908 conversions to QI/HImode types did a store and then a load to
27909 truncate the value. For conversions to VSX registers, don't split
27910 the insn, instead emit the code directly. Use the code iterator
27911 any_fix to combine signed and unsigned conversions.
27912 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27913 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27914 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27915 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27916 (fix_<mode>di2_hw): Likewise.
27917 (fixuns_<mode>di2_hw): Likewise.
27918 (fix_<mode>si2_hw): Likewise.
27919 (fixuns_<mode>si2_hw): Likewise.
27920 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27921 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27922 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27923 fix<uns>_trunc<SFDF:mode>si2_p8.
27924 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27925 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27926 (fix<uns>_<mode>_mem): Likewise.
27927 (fctiw<u>z_<mode>_mem): Likewise.
27928 (fix<uns>_<mode>_mem): Likewise.
27929 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27930 the register allocator from doing a direct move to the GPRs to do
27931 a store, and instead use the ISA 3.0 store byte/half-word from
27932 vector register instruction. For IEEE 128-bit floating point,
27933 also optimize stores of 32-bit ints.
27934 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27936 2018-02-07 Alan Hayward <alan.hayward@arm.com>
27938 * genextract.c (push_pathstr_operand): New function to support
27940 (walk_rtx): Call push_pathstr_operand.
27941 (print_path): Support [a-zA-Z].
27943 2018-02-07 Richard Biener <rguenther@suse.de>
27945 PR tree-optimization/84037
27946 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27947 (cse_and_gimplify_to_preheader): Declare.
27948 (vect_get_place_in_interleaving_chain): Likewise.
27949 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27951 (_loop_vec_info::~_loop_vec_info): Delete it.
27952 (cse_and_gimplify_to_preheader): New function.
27953 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27954 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27955 (vectorizable_load): Likewise. For grouped stores always base
27956 the IV on the first element.
27957 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27958 condition before gimplifying.
27960 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27962 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27963 *DIV_EXPR and *MOD_EXPR.
27965 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
27968 * config/i386/i386.c (ix86_option_override_internal): Mask out
27969 the CF_SET bit when checking -fcf-protection.
27971 2018-02-07 Tom de Vries <tom@codesourcery.com>
27974 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27977 2018-02-07 Richard Biener <rguenther@suse.de>
27979 PR tree-optimization/84204
27980 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27983 PR tree-optimization/84205
27984 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27985 special-case isl_ast_op_zdiv_r.
27987 PR tree-optimization/84223
27988 * graphite-scop-detection.c (gather_bbs::before_dom_children):
27989 Only add conditions from within the region.
27990 (gather_bbs::after_dom_children): Adjust.
27992 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
27995 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
27996 * config/avr/avr.md: Only post-reload split REG-REG moves if
27997 either register is GENERAL_REG_P.
27999 2018-02-07 Jakub Jelinek <jakub@redhat.com>
28001 PR tree-optimization/84235
28002 * tree-ssa-scopedtables.c
28003 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
28004 if the subtraction is performed in floating point type where NaNs are
28005 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
28006 build 1. Formatting fix.
28008 2018-02-06 Jakub Jelinek <jakub@redhat.com>
28011 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
28012 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
28013 and skip it regardless of bb boundaries. Use CALL_P macro,
28014 don't test INSN_P (insn) together with CALL_P or JUMP_P check
28015 unnecessarily, formatting fix.
28017 2018-02-06 Michael Collison <michael.collison@arm.com>
28019 * config/arm/thumb2.md:
28020 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
28021 (*thumb_mov_notscc): Ditto.
28023 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
28026 * config/rs6000/rs6000.md (su code attribute): Use "u" for
28027 unsigned_fix, not "s".
28029 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28031 * configure.ac (gcc_fn_eh_frame_ro): New function.
28032 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
28033 correct .eh_frame permissions.
28034 * configure: Regenerate.
28036 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
28038 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
28039 irrelevant options.
28041 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28043 * config/rs6000/rs6000.c (rs6000_option_override_internal):
28044 Display warning message for -mno-speculate-indirect-jumps.
28046 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
28048 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
28050 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
28052 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
28054 PR tree-optimization/84225
28055 * tree-eh.c (find_trapping_overflow): Only call
28056 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
28058 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28061 * config/i386/i386.c: Reimplement the check of possible options
28062 -mibt/-mshstk conbination. Change error messages.
28063 * doc/invoke.texi: Fix a typo: remove extra '='.
28065 2018-02-06 Marek Polacek <polacek@redhat.com>
28067 PR tree-optimization/84228
28068 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
28070 2018-02-06 Tamar Christina <tamar.christina@arm.com>
28073 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
28074 emitted arch directives.
28075 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
28076 __ARM_FEATURE_COPROC before changing architectures.
28078 2018-02-06 Richard Biener <rguenther@suse.de>
28080 * config/i386/i386.c (print_reg): Fix typo.
28081 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
28083 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
28085 * configure: Regenerate.
28087 2018-02-05 Martin Sebor <msebor@redhat.com>
28089 PR tree-optimization/83369
28090 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
28093 2018-02-05 Martin Liska <mliska@suse.cz>
28095 * doc/invoke.texi: Cherry-pick upstream r323995.
28097 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
28099 * ira.c (ira_init_register_move_cost): Adjust comment.
28101 2018-02-05 Martin Liska <mliska@suse.cz>
28103 PR gcov-profile/84137
28104 * doc/gcov.texi: Fix typo in documentation.
28106 2018-02-05 Martin Liska <mliska@suse.cz>
28108 PR gcov-profile/83879
28109 * doc/gcov.texi: Document necessity of --dynamic-list-data when
28110 using dlopen functionality.
28112 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
28114 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
28115 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
28116 _mm_maskz_range_ss, _mm_mask_range_round_ss,
28117 _mm_maskz_range_round_ss): New intrinsics.
28118 (__builtin_ia32_rangesd128_round)
28119 (__builtin_ia32_rangess128_round): Remove.
28120 (__builtin_ia32_rangesd128_mask_round,
28121 __builtin_ia32_rangess128_mask_round): New builtins.
28122 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
28123 __builtin_ia32_rangess128_round): Remove.
28124 (__builtin_ia32_rangesd128_mask_round,
28125 __builtin_ia32_rangess128_mask_round): New builtins.
28126 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
28127 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
28128 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
28129 "<round_saeonly_constraint>")): Changed to ...
28130 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
28131 "<round_saeonly_scalar_constraint>")): ... this.
28132 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
28133 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
28134 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
28135 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
28136 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
28138 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
28140 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
28142 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
28143 Remove all values except native, 8540 and 8548.
28145 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
28147 * config/i386/i386.c (ix86_output_function_return): Pass
28148 INVALID_REGNUM, instead of -1, as invalid register number to
28149 indirect_thunk_name and output_indirect_thunk.
28151 2018-02-02 Julia Koval <julia.koval@intel.com>
28153 * config.gcc: Add -march=icelake.
28154 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
28155 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
28156 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
28157 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
28158 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
28159 (processor_target_table): Add icelake.
28160 (ix86_option_override_internal): Handle new PTAs.
28161 (get_builtin_code_for_version): Handle icelake.
28162 (M_INTEL_COREI7_ICELAKE): New.
28163 (fold_builtin_cpu): Handle icelake.
28164 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
28165 * doc/invoke.texi: Add -march=icelake.
28167 2018-02-02 Julia Koval <julia.koval@intel.com>
28169 * config/i386/i386.c (ix86_option_override_internal): Change flags type
28170 to wide_int_bitmask.
28171 * wide-int-bitmask.h: New.
28173 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
28176 * config/i386/i386.md: Replace Pmode with word_mode in
28177 builtin_setjmp_setup and builtin_longjmp to support x32.
28179 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
28183 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
28185 (rs6000_supported_cpu_names): New static variable.
28186 (linux_cpu_translation_table): Likewise.
28187 (elf_platform) <cpu>: Define new static variable and use it.
28188 Translate kernel AT_PLATFORM name to canonical name if needed.
28189 Error if platform name is unknown.
28191 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
28194 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
28196 2018-02-01 Jeff Law <law@redhat.com>
28199 * config/i386/i386.c (release_scratch_register_on_entry): Add new
28200 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
28201 the scratch if RELEASE_VIA_POP is false.
28202 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
28203 If we have to save a temporary register, decrement SIZE appropriately.
28204 Pass new arguments to release_scratch_register_on_entry.
28205 (ix86_adjust_stack_and_probe): Likewise.
28206 (ix86_emit_probe_stack_range): Pass new arguments to
28207 release_scratch_register_on_entry.
28209 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
28211 PR rtl-optimization/84157
28212 * combine.c (change_zero_ext): Use REG_P predicate in
28213 front of HARD_REGISTER_P predicate.
28215 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
28217 * config/avr/avr.c (avr_option_override): Move disabling of
28218 -fdelete-null-pointer-checks to...
28219 * common/config/avr/avr-common.c (avr_option_optimization_table):
28222 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28224 PR tree-optimization/81635
28225 * tree-data-ref.c (split_constant_offset_1): For types that
28226 wrap on overflow, try to use range info to prove that wrapping
28229 2018-02-01 Renlin Li <renlin.li@arm.com>
28232 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
28233 TAILCALL_ADDR_REGS.
28234 (aarch64_register_move_cost): Likewise.
28235 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
28236 TAILCALL_ADDR_REGS.
28237 (REG_CLASS_NAMES): Likewise.
28238 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
28239 TAILCALL_ADDR_REGS. Remove IP registers.
28240 * config/aarch64/aarch64.md (Ucs): Update register constraint.
28242 2018-02-01 Richard Biener <rguenther@suse.de>
28244 * domwalk.h (dom_walker::dom_walker): Add additional constructor
28245 for specifying RPO order and allow NULL for that.
28246 * domwalk.c (dom_walker::dom_walker): Likewise.
28247 (dom_walker::walk): Handle NULL RPO order.
28248 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
28250 (rewrite_update_dom_walker): Likewise.
28251 (mark_def_dom_walker): Likewise.
28253 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28255 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
28256 (aarch64_maybe_expand_sve_subreg_move): Declare.
28257 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
28258 * config/aarch64/predicates.md (aarch64_any_register_operand): New
28260 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
28261 that are semantically a reverse operation.
28262 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
28263 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
28264 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
28266 (aarch64_can_change_mode_class): For big-endian, forbid changes
28267 between two SVE modes if they have different element sizes.
28269 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28271 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
28272 the TImode handling for big-endian targets.
28274 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28276 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
28277 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
28279 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
28280 Remove BSWAP handing for big-endian targets and use the form of
28281 LD1RQ appropariate for the mode.
28283 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28285 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
28286 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
28287 duplicated element.
28289 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
28292 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
28293 check for operands that need to go through aarch64_sve_reload_be.
28295 2018-02-01 Jakub Jelinek <jakub@redhat.com>
28297 PR tree-optimization/81661
28298 PR tree-optimization/84117
28299 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
28300 * tree-eh.c: Include gimplify.h.
28301 (find_trapping_overflow, replace_trapping_overflow,
28302 rewrite_to_non_trapping_overflow): New functions.
28303 * tree-vect-loop.c: Include tree-eh.h.
28304 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
28305 * tree-data-ref.c: Include tree-eh.h.
28306 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
28308 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
28310 PR rtl-optimization/84123
28311 * combine.c (change_zero_ext): Check if hard register satisfies
28312 can_change_dest_mode before calling gen_lowpart_SUBREG.
28314 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
28317 * ira.c (ira_init_register_move_cost): Remove assert.
28319 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28321 PR rtl-optimization/84071
28322 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
28323 * doc/tm.texi: Regenerate.
28325 2018-01-31 Richard Biener <rguenther@suse.de>
28327 PR tree-optimization/84132
28328 * tree-data-ref.c (analyze_miv_subscript): Properly
28329 check whether evolution_function_is_affine_multivariate_p
28330 before calling gcd_of_steps_may_divide_p.
28332 2018-01-31 Julia Koval <julia.koval@intel.com>
28335 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
28336 * config/i386/i386.md (rdpid_rex64) New.
28337 (rdpid): Make 32bit only.
28339 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
28342 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
28343 an IDENTIFIER_NODE for FUNCTION_TYPE's.
28345 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28348 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28350 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28352 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
28354 PR rtl-optimization/84071
28355 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
28356 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
28358 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
28360 * config/arc/arc.c (arc_handle_aux_attribute): New function.
28361 (arc_attribute_table): Add 'aux' attribute.
28362 (arc_in_small_data_p): Consider aux like variables.
28363 (arc_is_aux_reg_p): New function.
28364 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
28365 (arc_get_aux_arg): New function.
28366 (prepare_move_operands): Handle aux-register access.
28367 (arc_handle_aux_attribute): New function.
28368 * doc/extend.texi (ARC Variable attributes): Add subsection.
28370 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
28372 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
28373 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
28374 (arc_attribute_table): Add 'uncached' attribute.
28375 (arc_print_operand): Print '.di' flag for uncached memory
28377 (arc_in_small_data_p): Do not consider for small data the uncached
28379 (arc_is_uncached_mem_p): New function.
28380 * config/arc/predicates.md (compact_store_memory_operand): Check
28381 for uncached memory accesses.
28382 (nonvol_nonimm_operand): Likewise.
28383 * doc/extend.texi (ARC Type Attribute): New subsection.
28385 2018-01-31 Jakub Jelinek <jakub@redhat.com>
28388 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
28389 falign-loops=): Add Optimization flag.
28391 2018-01-30 Jeff Law <law@redhat.com>
28394 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
28395 INT_REGISTERS_SAVED. Check it prior to calling
28396 get_scratch_register_on_entry.
28397 (ix86_adjust_stack_and_probe): Similarly.
28398 (ix86_emit_probe_stack_range): Similarly.
28399 (ix86_expand_prologue): Corresponding changes.
28401 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28404 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
28405 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
28407 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
28410 * lra-constraints.c (curr_insn_transform): Process AND in the
28413 2018-01-30 Jakub Jelinek <jakub@redhat.com>
28415 PR rtl-optimization/83986
28416 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
28417 dependence against last_pending_memory_flush in addition to
28418 pending_jump_insns.
28420 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
28422 PR tree-optimization/81611
28423 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
28426 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28429 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
28432 2018-01-30 Richard Biener <rguenther@suse.de>
28433 Jakub Jelinek <jakub@redhat.com>
28435 PR tree-optimization/84111
28436 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
28437 inner loops added during recursion, as they don't have up-to-date
28440 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
28443 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
28444 (can_inline_edge_by_limits_p): ... here.
28445 (can_early_inline_edge_p, check_callers,
28446 update_caller_keys, update_callee_keys, recursive_inlining,
28447 add_new_edges_to_heap, speculation_useful_p,
28448 inline_small_functions,
28449 inline_small_functions, flatten_function,
28450 inline_to_all_callers_1): Update.
28452 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
28454 * profile-count.c (profile_count::combine_with_ipa_count): Handle
28457 2018-01-30 Richard Biener <rguenther@suse.de>
28459 PR tree-optimization/83008
28460 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
28461 invariant and constant vector uses in stmts when they need
28462 more than one stmt.
28464 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28467 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
28468 * configure: Regenerate.
28470 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28472 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
28474 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
28475 Use gen_rtx_REG rather than gen_lowpart.
28477 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28479 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
28480 rather than 0 when creating partial subregs.
28482 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28484 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
28487 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
28490 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
28491 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
28492 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
28493 flags. This restores the settings used before the 2017-07-24.
28494 Turning off pre increment/decrement/modify allows IVOPTS to
28495 optimize DF/SF loops where the index is an int.
28497 2018-01-29 Richard Biener <rguenther@suse.de>
28498 Kelvin Nilsen <kelvin@gcc.gnu.org>
28501 * tree-vect-stmts.c (vectorizable_call): Don't call
28502 targetm.vectorize_builtin_md_vectorized_function if callee is
28505 2018-01-22 Carl Love <cel@us.ibm.com>
28507 * doc/extend.tex: Fix typo in second arg in
28508 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
28510 2018-01-29 Richard Biener <rguenther@suse.de>
28512 PR tree-optimization/84086
28513 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
28514 (flush_ssaname_freelist): When SSA names were released reset
28515 the SCEV hash table.
28517 2018-01-29 Richard Biener <rguenther@suse.de>
28519 PR tree-optimization/84057
28520 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
28521 removed paths when removing edges.
28523 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
28525 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
28526 -mfunction-return=@var{choice}.
28528 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
28530 PR diagnostic/84034
28531 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
28532 Handle CR like TAB.
28533 (layout::print_source_line): Likewise.
28534 (test_get_line_width_without_trailing_whitespace): Add test cases.
28536 2018-01-27 Jakub Jelinek <jakub@redhat.com>
28538 PR middle-end/84040
28539 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
28542 2018-01-26 Jim Wilson <jimw@sifive.com>
28544 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
28546 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
28549 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28551 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
28552 and CMP + SUB-immediate -> SUBS.
28554 2018-01-26 Martin Sebor <msebor@redhat.com>
28556 PR tree-optimization/83896
28557 * tree-ssa-strlen.c (get_string_len): Rename...
28558 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
28559 Avoid assuming length is constant.
28560 (handle_char_store): Use HOST_WIDE_INT for string length.
28562 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
28565 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
28566 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
28568 2018-01-26 Richard Biener <rguenther@suse.de>
28570 PR rtl-optimization/84003
28571 * dse.c (record_store): Only record redundant stores when
28572 the earlier store aliases at least all accesses the later one does.
28574 2018-01-26 Jakub Jelinek <jakub@redhat.com>
28576 PR rtl-optimization/83985
28577 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
28578 REG_CFA_RESTORE insns.
28579 (delete_unmarked_insns): Don't ignore separate shrink wrapping
28580 REG_CFA_RESTORE insns here.
28583 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
28584 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
28586 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28588 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
28589 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
28590 (arc_init): Likewise.
28591 (arc_override_options): Likewise.
28592 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
28594 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
28596 * config/arc/arc.h (TARGET_DBNZ): Define.
28597 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
28598 properly set the tune attribute.
28599 (dbnz): Use TARGET_DBNZ guard.
28600 * config/arc/arc.opt (mtune): Add core3 option.
28602 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28604 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
28605 recognize new pic like addresses.
28606 (arc_delegitimize_address): Clean up.
28608 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28610 * config/arc/arc-arches.def: Option mrf16 valid for all
28612 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
28613 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
28614 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
28615 * config/arc/arc-tables.opt: Regenerate.
28616 * config/arc/arc.c (arc_conditional_register_usage): Handle
28617 reduced register file case.
28618 (arc_file_start): Set must have build attributes.
28619 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
28620 mrf16 option value.
28621 * config/arc/arc.opt (mrf16): Add new option.
28622 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
28623 * config/arc/genmultilib.awk: Handle new mrf16 option.
28624 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
28625 * config/arc/t-multilib: Regenerate.
28626 * doc/invoke.texi (ARC Options): Document mrf16 option.
28628 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28630 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
28631 * config/arc/arc.c (arc_handle_secure_attribute): New function.
28632 (arc_attribute_table): Add 'secure_call' attribute.
28633 (arc_print_operand): Print secure call operand.
28634 (arc_function_ok_for_sibcall): Don't optimize tail calls when
28636 (arc_is_secure_call_p): New function. * config/arc/arc.md
28637 (call_i): Add support for sjli instruction.
28638 (call_value_i): Likewise.
28639 * config/arc/constraints.md (Csc): New constraint.
28641 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28642 John Eric Martin <John.Martin@emmicro-us.com>
28644 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
28645 * config/arc/arc.c (_arc_jli_section): New struct.
28646 (arc_jli_section): New type.
28647 (rc_jli_sections): New static variable.
28648 (arc_handle_jli_attribute): New function.
28649 (arc_attribute_table): Add jli_always and jli_fixed attribute.
28650 (arc_file_end): New function.
28651 (TARGET_ASM_FILE_END): Define.
28652 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
28653 (arc_add_jli_section): New function.
28654 (jli_call_scan): Likewise.
28655 (arc_reorg): Call jli_call_scan.
28656 (arc_output_addsi): Remove 'S' from printing asm operand.
28657 (arc_is_jli_call_p): New function.
28658 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
28660 (movhi_insn): Likewise.
28661 (movsi_insn): Likewise.
28662 (movsi_set_cc_insn): Likewise.
28663 (loadqi_update): Likewise.
28664 (load_zeroextendqisi_update): Likewise.
28665 (load_signextendqisi_update): Likewise.
28666 (loadhi_update): Likewise.
28667 (load_zeroextendhisi_update): Likewise.
28668 (load_signextendhisi_update): Likewise.
28669 (loadsi_update): Likewise.
28670 (loadsf_update): Likewise.
28671 (movsicc_insn): Likewise.
28672 (bset_insn): Likewise.
28673 (bxor_insn): Likewise.
28674 (bclr_insn): Likewise.
28675 (bmsk_insn): Likewise.
28676 (bicsi3_insn): Likewise.
28677 (cmpsi_cc_c_insn): Likewise.
28678 (movsi_ne): Likewise.
28679 (movsi_cond_exec): Likewise.
28680 (clrsbsi2): Likewise.
28681 (norm_f): Likewise.
28691 (call_i): Remove 'S' asm letter, add jli instruction.
28692 (call_value_i): Likewise.
28693 * config/arc/arc.op (mjli-always): New option.
28694 * config/arc/constraints.md (Cji): New constraint.
28695 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
28697 (subsf3_fpx): Likewise.
28698 (mulsf3_fpx): Likewise.
28699 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
28701 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
28702 function attrbutes.
28703 * doc/invoke.texi (ARC): Document mjli-always option.
28705 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
28707 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
28708 avoid addition with 0 and use incw and decw where possible.
28710 2018-01-26 Richard Biener <rguenther@suse.de>
28712 PR tree-optimization/81082
28713 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
28714 association if it requires casting to unsigned.
28715 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
28716 from fold_plusminus_mult_expr to catch important cases late when
28717 range info is available.
28719 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28721 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
28722 * configure.ac (hidden_linkonce): New test.
28723 * configure: Regenerate.
28724 * config.in: Regenerate.
28726 2018-01-26 Julia Koval <julia.koval@intel.com>
28728 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
28729 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
28730 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
28731 _mm_mask_bitshuffle_epi64_mask): Fix type.
28732 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
28733 USI_FTYPE_V4DI_V4DI_USI): Remove.
28734 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
28735 __builtin_ia32_vpshufbitqmb256_mask,
28736 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
28737 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
28738 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
28740 2018-01-26 Alan Modra <amodra@gmail.com>
28743 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
28744 UNSPEC_VBPERMQ. Sort other unspecs.
28746 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
28748 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
28750 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
28752 PR middle-end/83055
28753 * predict.c (drop_profile): Do not push/pop cfun; update also
28755 (handle_missing_profiles): Fix logic looking for zero profiles.
28757 2018-01-25 Jakub Jelinek <jakub@redhat.com>
28759 PR middle-end/83977
28760 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
28761 on functions with #pragma omp declare simd or functions with simd
28763 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
28764 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
28765 Remove trailing \n from warning_at calls.
28767 2018-01-25 Tom de Vries <tom@codesourcery.com>
28770 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28771 for neutered workers.
28773 2018-01-24 Joseph Myers <joseph@codesourcery.com>
28776 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
28777 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
28779 2018-01-24 Jeff Law <law@redhat.com>
28782 * i386.c (get_probe_interval): Move to earlier point.
28783 (ix86_compute_frame_layout): If -fstack-clash-protection and
28784 the frame is larger than the probe interval, then use pushes
28785 to save registers rather than reg->mem moves.
28786 (ix86_expand_prologue): Remove conditional for int_registers_saved
28789 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
28792 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
28793 min/max for never referenced object.
28795 2018-01-24 Jakub Jelinek <jakub@redhat.com>
28797 PR middle-end/83977
28798 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
28800 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
28801 attributes from DECL_ATTRIBUTES (decl) without affecting
28802 DECL_ATTRIBUTES (current_function_decl).
28803 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
28804 functions with non-NULL DECL_ABSTRACT_ORIGIN.
28806 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
28808 PR tree-optimization/83979
28809 * fold-const.c (fold_comparison): Use constant_boolean_node
28810 instead of boolean_{true,false}_node.
28812 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
28814 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
28817 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28819 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28820 Simplify the clause that sets the length attribute.
28821 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28822 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
28823 clause that sets the length attribute.
28824 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28826 2018-01-24 Tom de Vries <tom@codesourcery.com>
28829 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
28830 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
28831 Add strict parameter.
28832 (prevent_branch_around_nothing): Insert dummy insn between branch to
28833 label and label with no ptx insn inbetween.
28834 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
28836 2018-01-24 Tom de Vries <tom@codesourcery.com>
28839 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28840 for neutered threads in warp.
28841 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
28843 2018-01-24 Richard Biener <rguenther@suse.de>
28845 PR tree-optimization/83176
28846 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
28849 2018-01-24 Richard Biener <rguenther@suse.de>
28851 PR tree-optimization/82819
28852 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
28853 code generating pluses that are no-ops in the target precision.
28855 2018-01-24 Richard Biener <rguenther@suse.de>
28857 PR middle-end/84000
28858 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
28860 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28862 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
28863 to merge probabilities.
28864 * predict.c (probably_never_executed): Also mark as cold functions
28865 with global 0 profile and guessed local profile.
28866 * profile-count.c (profile_probability::combine_with_count): New
28868 * profile-count.h (profile_probability::operator*,
28869 profile_probability::operator*=, profile_probability::operator/,
28870 profile_probability::operator/=): Reduce precision to adjusted
28871 and set value to guessed on contradictory divisions.
28872 (profile_probability::combine_with_freq): Remove.
28873 (profile_probability::combine_wiht_count): Declare.
28874 (profile_count::force_nonzero):: Set to adjusted.
28875 (profile_count::probability_in):: Set quality to adjusted.
28876 * tree-ssa-tail-merge.c (replace_block_by): Use
28877 combine_with_count.
28879 2018-01-23 Andrew Waterman <andrew@sifive.com>
28880 Jim Wilson <jimw@sifive.com>
28882 * config/riscv/riscv.c (riscv_stack_boundary): New.
28883 (riscv_option_override): Set riscv_stack_boundary. Handle
28884 riscv_preferred_stack_boundary_arg.
28885 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
28886 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
28887 (STACK_BOUNDARY): Set to riscv_stack_boundary.
28888 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
28889 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
28890 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
28892 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
28895 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
28896 of struct ix86_frame.
28897 (ix86_expand_epilogue): Likewise. Add a local variable for
28898 the reg_save_offset field in struct ix86_frame.
28900 2018-01-23 Bin Cheng <bin.cheng@arm.com>
28902 PR tree-optimization/82604
28903 * tree-loop-distribution.c (enum partition_kind): New enum item
28904 PKIND_PARTIAL_MEMSET.
28905 (partition_builtin_p): Support above new enum item.
28906 (generate_code_for_partition): Ditto.
28907 (compute_access_range): Differentiate cases that equality can be
28908 proven at all loops, the innermost loops or no loops.
28909 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28910 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
28911 (finalize_partitions, distribute_loop): Don't fuse partition of
28912 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28913 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28914 parloop is enabled.
28916 2018-01-23 Martin Liska <mliska@suse.cz>
28918 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28919 order to ignore the predictor.
28920 (PRED_POLYMORPHIC_CALL): Likewise.
28921 (PRED_RECURSIVE_CALL): Likewise.
28923 2018-01-23 Martin Liska <mliska@suse.cz>
28925 * tree-profile.c (tree_profiling): Print function header to
28926 aware reader which function we are working on.
28927 * value-prof.c (gimple_find_values_to_profile): Do not print
28928 not interesting value histograms.
28930 2018-01-23 Martin Liska <mliska@suse.cz>
28932 * profile-count.h (enum profile_quality): Add
28933 profile_uninitialized as the first value. Do not number values
28934 as they are zero based.
28935 (profile_count::verify): Update sanity check.
28936 (profile_probability::verify): Likewise.
28938 2018-01-23 Nathan Sidwell <nathan@acm.org>
28940 * doc/invoke.texi (ffor-scope): Deprecate.
28942 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28944 PR tree-optimization/83510
28945 * domwalk.c (set_all_edges_as_executable): New function.
28946 (dom_walker::dom_walker): Convert bool param
28947 "skip_unreachable_blocks" to enum reachability. Move setup of
28948 edge flags to set_all_edges_as_executable and only do it when
28949 reachability is REACHABLE_BLOCKS.
28950 * domwalk.h (enum dom_walker::reachability): New enum.
28951 (dom_walker::dom_walker): Convert bool param
28952 "skip_unreachable_blocks" to enum reachability.
28953 (set_all_edges_as_executable): New decl.
28954 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
28955 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28957 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28958 but converting true to REACHABLE_BLOCKS.
28959 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28961 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28962 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28963 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28965 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28966 if check_all_array_refs will be called.
28968 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28970 * tree.c (selftest::test_location_wrappers): Add more test
28973 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28975 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28976 (selftest::test_bit_in_range): Likewise.
28978 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28981 * doc/sourcebuild.texi (vect_float): Say that the selector
28982 only describes the situation when -funsafe-math-optimizations is on.
28983 (vect_float_strict): Document.
28985 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28987 PR tree-optimization/83965
28988 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28989 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28990 instead of checking only for a reduction.
28991 (vect_recog_widen_sum_pattern): Likewise.
28993 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28995 * predict.c (probably_never_executed): Only use precise profile info.
28996 (compute_function_frequency): Skip after inlining hack since we now
28997 have quality checking.
28999 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
29001 * profile-count.h (profile_probability::very_unlikely,
29002 profile_probability::unlikely, profile_probability::even): Set
29003 precision to guessed.
29005 2018-01-23 Richard Biener <rguenther@suse.de>
29007 PR tree-optimization/83963
29008 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
29009 Properly terminate dominator walk when crossing the exit edge not
29010 when visiting its source block.
29012 2018-01-23 Jakub Jelinek <jakub@redhat.com>
29015 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
29016 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
29018 2018-01-22 Jakub Jelinek <jakub@redhat.com>
29020 PR tree-optimization/83957
29021 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
29022 semicolon after for body surrounded by braces.
29024 PR tree-optimization/83081
29025 * profile-count.h (profile_probability::split): New method.
29026 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
29027 Use profile_probability::split.
29028 (do_compare_rtx_and_jump): Fix adjustment of probabilities
29029 when splitting a single conditional jump into 2.
29031 2018-01-22 David Malcolm <dmalcolm@redhat.com>
29033 PR tree-optimization/69452
29034 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
29037 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29039 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
29040 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
29041 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
29043 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29045 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
29047 * config/rl78/rl78.md (movdi): New define_expand.
29048 * config/rl78/rl78.c (rl78_split_movdi): New function.
29050 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
29053 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
29055 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
29056 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
29057 128-bit to produce an UNSPEC move to get the double word with the
29058 signbit and then a shift directly to do signbit.
29059 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
29060 implementation with a new version that just does either a direct
29061 move or a regular move. Move memory interface to separate insns.
29062 Move insns so they are next to the expander.
29063 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
29064 with signbit move. Split big and little endian case.
29065 (signbit<mode>2_dm_mem_le): Likewise.
29066 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
29067 (signbit<mode>2_dm2): Likewise.
29069 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29071 * config/rl78/rl78.md (anddi3): New define_expand.
29073 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29075 * config/rl78/rl78.md (umindi3): New define_expand.
29077 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29079 * config/rl78/rl78.md (smindi3): New define_expand.
29081 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29083 * config/rl78/rl78.md (smaxdi3): New define_expand.
29085 2018-01-22 Carl Love <cel@us.ibm.com>
29087 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
29088 LVX_V1TI): Add macro expansion.
29089 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
29090 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
29091 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
29092 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
29093 Change check to determine if the instruction is a byte reversing
29094 entry. Fix typo in comment.
29095 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
29096 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
29097 Add def_builtin calls for new builtins.
29098 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
29099 Add define_insn expansion.
29101 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29103 * config/rl78/rl78.md (umaxdi3): New define_expand.
29105 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
29107 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
29108 for non-QImode registers.
29110 2018-01-22 Richard Biener <rguenther@suse.de>
29112 PR tree-optimization/83963
29113 * graphite-scop-detection.c (scop_detection::get_sese): Delay
29114 including the loop exit block.
29115 (scop_detection::merge_sese): Likewise.
29116 (scop_detection::add_scop): Do it here instead.
29118 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29120 * doc/sourcebuild.texi (arm_softfloat): Document.
29122 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
29125 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
29126 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
29127 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
29129 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29130 David Edelsohn <dje.gcc@gmail.com>
29133 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29134 Change "crset eq" to "crset 2".
29135 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29136 (*call_indirect_aix<mode>_nospec): Likewise.
29137 (*call_value_indirect_aix<mode>_nospec): Likewise.
29138 (*call_indirect_elfv2<mode>_nospec): Likewise.
29139 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
29140 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
29141 change assembly output from . to $.
29142 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29143 (indirect_jump<mode>_nospec): Change assembly output from . to $.
29144 (*tablejump<mode>_internal1_nospec): Likewise.
29146 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
29149 * config/sh/sh_optimize_sett_clrt.cc:
29150 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
29152 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
29154 PR tree-optimization/83940
29155 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
29156 offset_dt to vect_constant_def rather than vect_unknown_def_type.
29157 (vect_check_load_store_mask): Add a mask_dt_out parameter and
29158 use it to pass back the definition type.
29159 (vect_check_store_rhs): Likewise rhs_dt_out.
29160 (vect_build_gather_load_calls): Add a mask_dt argument and use
29161 it instead of a call to vect_is_simple_use.
29162 (vectorizable_store): Update calls to vect_check_load_store_mask
29163 and vect_check_store_rhs. Use the dt returned by the latter instead
29164 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
29165 instead of calls to vect_is_simple_use. Pass the scalar rather
29166 than the vector operand to vect_is_simple_use when handling
29167 second and subsequent copies of an rhs value.
29168 (vectorizable_load): Update calls to vect_check_load_store_mask
29169 and vect_build_gather_load_calls. Use the cached mask_dt and
29170 gs_info.offset_dt instead of calls to vect_is_simple_use.
29172 2018-01-20 Jakub Jelinek <jakub@redhat.com>
29174 PR middle-end/83945
29175 * tree-emutls.c: Include gimplify.h.
29176 (lower_emutls_2): New function.
29177 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
29178 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
29179 it before further processing.
29182 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
29183 UINTVAL (trueop1) instead of INTVAL (op1).
29185 2018-01-19 Jakub Jelinek <jakub@redhat.com>
29189 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
29190 INCOMING_FRAME_SP_OFFSET if not defined.
29191 (scan_trace): Add ENTRY argument. If true and
29192 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
29193 emit a note to adjust the CFA offset.
29194 (create_cfi_notes): Adjust scan_trace callers.
29195 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
29196 INCOMING_FRAME_SP_OFFSET in the CIE.
29197 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
29198 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
29200 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
29201 * doc/tm.texi: Regenerated.
29203 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
29205 PR rtl-optimization/83147
29206 * lra-constraints.c (remove_inheritance_pseudos): Use
29207 lra_substitute_pseudo_within_insn.
29209 2018-01-19 Tom de Vries <tom@codesourcery.com>
29210 Cesar Philippidis <cesar@codesourcery.com>
29213 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
29215 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
29218 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
29219 spaces for function labels.
29221 2018-01-19 Martin Liska <mliska@suse.cz>
29223 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
29224 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
29225 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
29226 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
29227 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
29228 (PRED_CONST_RETURN): Change from 69 to 65.
29229 (PRED_NULL_RETURN): Change from 91 to 71.
29230 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
29231 (PRED_LOOP_GUARD): Change from 66 to 73.
29233 2018-01-19 Martin Liska <mliska@suse.cz>
29235 * predict.c (predict_insn_def): Add new assert.
29236 (struct branch_predictor): Change type to signed integer.
29237 (test_prediction_value_range): Amend test to cover
29238 PROB_UNINITIALIZED.
29239 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
29240 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
29241 (PRED_LOOP_ITERATIONS_MAX): Likewise.
29242 (PRED_LOOP_IV_COMPARE): Likewise.
29243 * predict.h (PROB_UNINITIALIZED): Define new constant.
29245 2018-01-19 Martin Liska <mliska@suse.cz>
29247 * predict.c (dump_prediction): Add new format for
29248 analyze_brprob.py script which is enabled with -details
29250 * profile-count.h (precise_p): New function.
29252 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29254 PR tree-optimization/83922
29255 * tree-vect-loop.c (vect_verify_full_masking): Return false if
29256 there are no statements that need masking.
29257 (vect_active_double_reduction_p): New function.
29258 (vect_analyze_loop_operations): Use it when handling phis that
29259 are not in the loop header.
29261 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
29263 PR tree-optimization/83914
29264 * tree-vect-loop.c (vectorizable_induction): Don't convert
29265 init_expr or apply the peeling adjustment for inductions
29266 that are nested within the vectorized loop.
29268 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29270 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
29273 2018-01-18 Jakub Jelinek <jakub@redhat.com>
29277 * function.h (gimplify_parameters): Add gimple_seq * argument.
29278 * function.c: Include gimple.h and options.h.
29279 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
29280 for the added local temporaries if needed.
29281 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
29282 if there are any parameter cleanups, wrap whole body into a
29283 try/finally with the cleanups.
29285 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
29288 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
29289 Use GET_MODE_CLASS for scalar floating point.
29291 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29295 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
29296 Fix call of call_cgraph_insertion_hooks.
29298 2018-01-18 Martin Sebor <msebor@redhat.com>
29300 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
29302 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
29305 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
29308 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
29311 * common.opt: (-ffile-prefix-map): New option.
29312 * opts.c (common_handle_option): Defer it.
29313 * opts-global.c (handle_common_deferred_options): Handle it.
29314 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
29315 * file-prefix-map.h: New file.
29316 (remap_debug_filename, add_debug_prefix_map): ...here.
29317 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
29318 * final.c (debug_prefix_map, add_debug_prefix_map
29319 remap_debug_filename): Move to...
29320 * file-prefix-map.c: New file.
29321 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
29322 generalize, get rid of alloca(), use strrchr() instead of strchr().
29323 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
29324 Implement in terms of add_prefix_map().
29325 (remap_macro_filename, remap_debug_filename): Implement in term of
29327 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
29328 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
29329 * dbxout.c: Include file-prefix-map.h.
29330 * varasm.c: Likewise.
29331 * vmsdbgout.c: Likewise.
29332 * xcoffout.c: Likewise.
29333 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
29334 * doc/cppopts.texi (-fmacro-prefix-map): Document.
29335 * doc/invoke.texi (-ffile-prefix-map): Document.
29336 (-fdebug-prefix-map): Update description.
29338 2018-01-18 Martin Liska <mliska@suse.cz>
29340 * config/i386/i386.c (indirect_thunk_name): Document that also
29342 (output_indirect_thunk): Document why both instructions
29343 (pause and lfence) are generated.
29345 2018-01-18 Richard Biener <rguenther@suse.de>
29347 PR tree-optimization/83887
29348 * graphite-scop-detection.c
29349 (scop_detection::get_nearest_dom_with_single_entry): Remove.
29350 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
29351 (scop_detection::merge_sese): Re-implement with a flood-fill
29352 algorithm that properly finds a SESE region if it exists.
29354 2018-01-18 Jakub Jelinek <jakub@redhat.com>
29357 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
29358 pointer_diff optimizations use view_convert instead of convert.
29360 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29362 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
29363 Generate different code for -mno-speculate-indirect-jumps.
29364 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
29365 (*call_indirect_aix<mode>): Disable for
29366 -mno-speculate-indirect-jumps.
29367 (*call_indirect_aix<mode>_nospec): New define_insn.
29368 (*call_value_indirect_aix<mode>): Disable for
29369 -mno-speculate-indirect-jumps.
29370 (*call_value_indirect_aix<mode>_nospec): New define_insn.
29371 (*sibcall_nonlocal_sysv<mode>): Generate different code for
29372 -mno-speculate-indirect-jumps.
29373 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
29375 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
29377 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
29378 long double type, set the flags for noting the default long double
29379 type, even if we don't pass or return a long double type.
29381 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
29384 * ipa-inline.c (flatten_function): Do not overwrite final inlining
29387 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
29389 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
29390 support for merge[hl].
29391 (fold_mergehl_helper): New helper function.
29392 (tree-vector-builder.h): New #include for tree_vector_builder usage.
29393 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
29394 (altivec_vmrglw_direct): Add xxmrglw insn.
29396 2018-01-17 Andrew Waterman <andrew@sifive.com>
29398 * config/riscv/riscv.c (riscv_conditional_register_usage): If
29399 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
29401 2018-01-17 David Malcolm <dmalcolm@redhat.com>
29404 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
29405 call the lto_location_cache before reading the
29406 DECL_SOURCE_LOCATION of the types.
29408 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
29409 Richard Sandiford <richard.sandiford@linaro.org>
29411 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
29412 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
29413 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
29414 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
29415 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
29417 * config/aarch64/constraints.md (aarch64_movti_operand):
29419 * config/aarch64/predicates.md (Uti): Add new constraint.
29421 2018-01-17 Carl Love <cel@us.ibm.com>
29423 * config/rs6000/vsx.md (define_expand xl_len_r,
29424 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
29425 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
29427 (define_expand, define_insn): Move the shift left from the
29428 define_insn to the define_expand for lxvl and stxvl instructions.
29429 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
29430 and XL_LEN_R definitions to PURE.
29432 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
29434 * config/i386/i386.c (indirect_thunk_name): Declare regno
29435 as unsigned int. Compare regno with INVALID_REGNUM.
29436 (output_indirect_thunk): Ditto.
29437 (output_indirect_thunk_function): Ditto.
29438 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
29439 in the call to output_indirect_thunk_function.
29441 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
29443 PR middle-end/83884
29444 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
29445 rather than the size of inner_type to determine the stack slot size
29446 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
29448 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
29451 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
29454 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
29456 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
29457 endian Linux systems to optionally enable multilibs for selecting
29458 the long double type if the user configured an explicit type.
29459 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
29460 have no long double multilibs if not defined.
29461 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
29462 warn if the user used -mabi={ieee,ibm}longdouble and we built
29463 multilibs for long double.
29464 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
29465 appropriate multilib option.
29466 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
29468 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
29469 for building long double multilibs.
29470 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
29472 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
29474 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
29477 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
29479 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
29482 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
29485 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
29488 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
29490 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
29491 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
29493 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
29495 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
29496 different rtl trees depending on TARGET_64BIT.
29497 (rs6000_gen_lvx): Likewise.
29499 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
29501 * config/visium/visium.md (nop): Tweak comment.
29502 (hazard_nop): Likewise.
29504 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29506 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
29507 -mspeculate-indirect-jumps.
29508 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
29509 for -mno-speculate-indirect-jumps.
29510 (*call_indirect_elfv2<mode>_nospec): New define_insn.
29511 (*call_value_indirect_elfv2<mode>): Disable for
29512 -mno-speculate-indirect-jumps.
29513 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
29514 (indirect_jump): Emit different RTL for
29515 -mno-speculate-indirect-jumps.
29516 (*indirect_jump<mode>): Disable for
29517 -mno-speculate-indirect-jumps.
29518 (*indirect_jump<mode>_nospec): New define_insn.
29519 (tablejump): Emit different RTL for
29520 -mno-speculate-indirect-jumps.
29521 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
29522 (tablejumpsi_nospec): New define_expand.
29523 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
29524 (tablejumpdi_nospec): New define_expand.
29525 (*tablejump<mode>_internal1): Disable for
29526 -mno-speculate-indirect-jumps.
29527 (*tablejump<mode>_internal1_nospec): New define_insn.
29528 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
29531 2018-01-16 Artyom Skrobov tyomitch@gmail.com
29533 * caller-save.c (insert_save): Drop unnecessary parameter. All
29536 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29537 Richard Biener <rguenth@suse.de>
29540 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
29541 return early, inline manually is_gimple_sizepos. Make sure if we
29542 call gimplify_expr we don't end up with a gimple constant.
29543 * tree.c (variably_modified_type_p): Don't return true for
29544 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
29545 * gimplify.h (is_gimple_sizepos): Remove.
29547 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29549 PR tree-optimization/83857
29550 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
29551 vectorizable_live_operation for pure SLP statements.
29552 (vectorizable_live_operation): Handle PHIs.
29554 2018-01-16 Richard Biener <rguenther@suse.de>
29556 PR tree-optimization/83867
29557 * tree-vect-stmts.c (vect_transform_stmt): Precompute
29558 nested_in_vect_loop_p since the scalar stmt may get invalidated.
29560 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29563 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
29564 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
29565 If off is not INTEGER_CST, issue a may not be aligned warning
29566 rather than isn't aligned. Use isn%'t rather than isn't.
29567 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
29569 <case MULT_EXPR>: Improve the case when bottom and one of the
29570 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
29571 operand, in that case check if the other operand is multiple of
29572 bottom divided by the INTEGER_CST operand.
29574 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29577 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
29578 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
29579 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
29580 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
29581 * config/pa/pa.c (pa_function_arg_advance): Likewise.
29582 (pa_function_arg, pa_arg_partial_bytes): Likewise.
29583 (pa_function_arg_size): New function.
29585 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29587 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
29588 in a separate statement.
29590 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29592 PR tree-optimization/83847
29593 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
29594 group gathers and scatters.
29596 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29598 PR rtl-optimization/86620
29599 * params.def (max-sched-ready-insns): Bump minimum value to 1.
29601 PR rtl-optimization/83213
29602 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
29603 to last if both are JUMP_INSNs.
29605 PR tree-optimization/83843
29606 * gimple-ssa-store-merging.c
29607 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
29608 store_immediate_info for bswap/nop orig_stores.
29610 2018-01-15 Andrew Waterman <andrew@sifive.com>
29612 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
29614 <UDIV>: Increase cost if !TARGET_DIV.
29616 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
29618 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
29619 (define_attr "cr_logical_3op"): New.
29620 (cceq_ior_compare): Adjust.
29621 (cceq_ior_compare_complement): Adjust.
29622 (*cceq_rev_compare): Adjust.
29623 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
29624 (is_cracked_insn): Adjust.
29625 (insn_must_be_first_in_group): Adjust.
29626 * config/rs6000/40x.md: Adjust.
29627 * config/rs6000/440.md: Adjust.
29628 * config/rs6000/476.md: Adjust.
29629 * config/rs6000/601.md: Adjust.
29630 * config/rs6000/603.md: Adjust.
29631 * config/rs6000/6xx.md: Adjust.
29632 * config/rs6000/7450.md: Adjust.
29633 * config/rs6000/7xx.md: Adjust.
29634 * config/rs6000/8540.md: Adjust.
29635 * config/rs6000/cell.md: Adjust.
29636 * config/rs6000/e300c2c3.md: Adjust.
29637 * config/rs6000/e500mc.md: Adjust.
29638 * config/rs6000/e500mc64.md: Adjust.
29639 * config/rs6000/e5500.md: Adjust.
29640 * config/rs6000/e6500.md: Adjust.
29641 * config/rs6000/mpc.md: Adjust.
29642 * config/rs6000/power4.md: Adjust.
29643 * config/rs6000/power5.md: Adjust.
29644 * config/rs6000/power6.md: Adjust.
29645 * config/rs6000/power7.md: Adjust.
29646 * config/rs6000/power8.md: Adjust.
29647 * config/rs6000/power9.md: Adjust.
29648 * config/rs6000/rs64.md: Adjust.
29649 * config/rs6000/titan.md: Adjust.
29651 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29653 * config/i386/predicates.md (indirect_branch_operand): Rewrite
29654 ix86_indirect_branch_register logic.
29656 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29658 * config/i386/constraints.md (Bs): Update
29659 ix86_indirect_branch_register check. Don't check
29660 ix86_indirect_branch_register with GOT_memory_operand.
29662 * config/i386/predicates.md (GOT_memory_operand): Don't check
29663 ix86_indirect_branch_register here.
29664 (GOT32_symbol_operand): Likewise.
29666 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29668 * config/i386/predicates.md (constant_call_address_operand):
29669 Rewrite ix86_indirect_branch_register logic.
29670 (sibcall_insn_operand): Likewise.
29672 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29674 * config/i386/constraints.md (Bs): Replace
29675 ix86_indirect_branch_thunk_register with
29676 ix86_indirect_branch_register.
29678 * config/i386/i386.md (indirect_jump): Likewise.
29679 (tablejump): Likewise.
29680 (*sibcall_memory): Likewise.
29681 (*sibcall_value_memory): Likewise.
29682 Peepholes of indirect call and jump via memory: Likewise.
29683 * config/i386/i386.opt: Likewise.
29684 * config/i386/predicates.md (indirect_branch_operand): Likewise.
29685 (GOT_memory_operand): Likewise.
29686 (call_insn_operand): Likewise.
29687 (sibcall_insn_operand): Likewise.
29688 (GOT32_symbol_operand): Likewise.
29690 2018-01-15 Jakub Jelinek <jakub@redhat.com>
29692 PR middle-end/83837
29693 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
29694 type rather than type addr's type points to.
29695 (expand_omp_atomic_mutex): Likewise.
29696 (expand_omp_atomic): Likewise.
29698 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29701 * config/i386/i386.c (output_indirect_thunk_function): Use
29702 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
29703 for __x86_return_thunk.
29705 2018-01-15 Richard Biener <rguenther@suse.de>
29707 PR middle-end/83850
29708 * expmed.c (extract_bit_field_1): Fix typo.
29710 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29713 * config/arm/iterators.md (VF): New mode iterator.
29714 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
29715 Remove integer-related logic from pattern.
29716 (neon_vabd<mode>_3): Likewise.
29718 2018-01-15 Jakub Jelinek <jakub@redhat.com>
29720 PR middle-end/82694
29721 * common.opt (fstrict-overflow): No longer an alias.
29722 (fwrapv-pointer): New option.
29723 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
29724 also for pointer types based on flag_wrapv_pointer.
29725 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
29726 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
29727 opts->x_flag_wrapv got set.
29728 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
29729 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
29730 POINTER_TYPE_OVERFLOW_UNDEFINED.
29731 * match.pd: Likewise in address comparison pattern.
29732 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
29734 2018-01-15 Richard Biener <rguenther@suse.de>
29737 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
29738 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
29739 Reset type names to their identifier if their TYPE_DECL doesn't
29740 have linkage (and thus is used for ODR and devirt).
29741 (save_debug_info_for_decl): Remove.
29742 (save_debug_info_for_type): Likewise.
29743 (add_tree_to_fld_list): Adjust.
29744 * tree-pretty-print.c (dump_generic_node): Make dumping of
29745 type names more robust.
29747 2018-01-15 Richard Biener <rguenther@suse.de>
29749 * BASE-VER: Bump to 8.0.1.
29751 2018-01-14 Martin Sebor <msebor@redhat.com>
29754 * builtins.c (check_access): Avoid warning when the no-warning bit
29757 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
29759 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
29760 * ira-color (allocno_hard_regs_compare): Likewise.
29762 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
29765 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
29766 Use .pushsection/.popsection.
29768 2018-01-14 Martin Sebor <msebor@redhat.com>
29771 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
29773 2018-01-14 Jakub Jelinek <jakub@redhat.com>
29775 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
29776 entry from extra_headers.
29777 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
29778 extra_headers, make the list bitwise identical to the i?86-*-* one.
29780 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29782 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
29783 -mcmodel=large with -mindirect-branch=thunk,
29784 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
29785 -mfunction-return=thunk-extern.
29786 * doc/invoke.texi: Document -mcmodel=large is incompatible with
29787 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
29788 -mfunction-return=thunk and -mfunction-return=thunk-extern.
29790 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29792 * config/i386/i386.c (print_reg): Print the name of the full
29793 integer register without '%'.
29794 (ix86_print_operand): Handle 'V'.
29795 * doc/extend.texi: Document 'V' modifier.
29797 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29799 * config/i386/constraints.md (Bs): Disallow memory operand for
29800 -mindirect-branch-register.
29802 * config/i386/predicates.md (indirect_branch_operand): Likewise.
29803 (GOT_memory_operand): Likewise.
29804 (call_insn_operand): Likewise.
29805 (sibcall_insn_operand): Likewise.
29806 (GOT32_symbol_operand): Likewise.
29807 * config/i386/i386.md (indirect_jump): Call convert_memory_address
29808 for -mindirect-branch-register.
29809 (tablejump): Likewise.
29810 (*sibcall_memory): Likewise.
29811 (*sibcall_value_memory): Likewise.
29812 Disallow peepholes of indirect call and jump via memory for
29813 -mindirect-branch-register.
29814 (*call_pop): Replace m with Bw.
29815 (*call_value_pop): Likewise.
29816 (*sibcall_pop_memory): Replace m with Bs.
29817 * config/i386/i386.opt (mindirect-branch-register): New option.
29818 * doc/invoke.texi: Document -mindirect-branch-register option.
29820 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29822 * config/i386/i386-protos.h (ix86_output_function_return): New.
29823 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
29824 set function_return_type.
29825 (indirect_thunk_name): Add ret_p to indicate thunk for function
29827 (output_indirect_thunk_function): Pass false to
29828 indirect_thunk_name.
29829 (ix86_output_indirect_branch_via_reg): Likewise.
29830 (ix86_output_indirect_branch_via_push): Likewise.
29831 (output_indirect_thunk_function): Create alias for function
29832 return thunk if regno < 0.
29833 (ix86_output_function_return): New function.
29834 (ix86_handle_fndecl_attribute): Handle function_return.
29835 (ix86_attribute_table): Add function_return.
29836 * config/i386/i386.h (machine_function): Add
29837 function_return_type.
29838 * config/i386/i386.md (simple_return_internal): Use
29839 ix86_output_function_return.
29840 (simple_return_internal_long): Likewise.
29841 * config/i386/i386.opt (mfunction-return=): New option.
29842 (indirect_branch): Mention -mfunction-return=.
29843 * doc/extend.texi: Document function_return function attribute.
29844 * doc/invoke.texi: Document -mfunction-return= option.
29846 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29848 * config/i386/i386-opts.h (indirect_branch): New.
29849 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
29850 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
29851 with local indirect jump when converting indirect call and jump.
29852 (ix86_set_indirect_branch_type): New.
29853 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
29854 (indirectlabelno): New.
29855 (indirect_thunk_needed): Likewise.
29856 (indirect_thunk_bnd_needed): Likewise.
29857 (indirect_thunks_used): Likewise.
29858 (indirect_thunks_bnd_used): Likewise.
29859 (INDIRECT_LABEL): Likewise.
29860 (indirect_thunk_name): Likewise.
29861 (output_indirect_thunk): Likewise.
29862 (output_indirect_thunk_function): Likewise.
29863 (ix86_output_indirect_branch_via_reg): Likewise.
29864 (ix86_output_indirect_branch_via_push): Likewise.
29865 (ix86_output_indirect_branch): Likewise.
29866 (ix86_output_indirect_jmp): Likewise.
29867 (ix86_code_end): Call output_indirect_thunk_function if needed.
29868 (ix86_output_call_insn): Call ix86_output_indirect_branch if
29870 (ix86_handle_fndecl_attribute): Handle indirect_branch.
29871 (ix86_attribute_table): Add indirect_branch.
29872 * config/i386/i386.h (machine_function): Add indirect_branch_type
29873 and has_local_indirect_jump.
29874 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
29876 (tablejump): Likewise.
29877 (*indirect_jump): Use ix86_output_indirect_jmp.
29878 (*tablejump_1): Likewise.
29879 (simple_return_indirect_internal): Likewise.
29880 * config/i386/i386.opt (mindirect-branch=): New option.
29881 (indirect_branch): New.
29884 (thunk-inline): Likewise.
29885 (thunk-extern): Likewise.
29886 * doc/extend.texi: Document indirect_branch function attribute.
29887 * doc/invoke.texi: Document -mindirect-branch= option.
29889 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
29892 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
29894 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
29896 * ipa-inline.c (want_inline_small_function_p): Return false if
29897 inlining has already failed with CIF_FINAL_ERROR.
29898 (update_caller_keys): Call want_inline_small_function_p before
29900 (update_callee_keys): Likewise.
29902 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
29904 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29906 (rs6000_quadword_masked_address_p): Likewise.
29907 (quad_aligned_load_p): Likewise.
29908 (quad_aligned_store_p): Likewise.
29909 (const_load_sequence_p): Add comment to describe the outer-most loop.
29910 (mimic_memory_attributes_and_flags): New function.
29911 (rs6000_gen_stvx): Likewise.
29912 (replace_swapped_aligned_store): Likewise.
29913 (rs6000_gen_lvx): Likewise.
29914 (replace_swapped_aligned_load): Likewise.
29915 (replace_swapped_load_constant): Capitalize argument name in
29916 comment describing this function.
29917 (rs6000_analyze_swaps): Add a third pass to search for vector loads
29918 and stores that access quad-word aligned addresses and replace
29919 with stvx or lvx instructions when appropriate.
29920 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29921 New function prototype.
29922 (rs6000_quadword_masked_address_p): Likewise.
29923 (rs6000_gen_lvx): Likewise.
29924 (rs6000_gen_stvx): Likewise.
29925 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29926 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29927 when memory address is aligned.
29928 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29929 this split to select lvx instruction when memory address is aligned.
29930 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29931 instruction when memory address is aligned.
29932 (*vsx_le_perm_load_v16qi): Likewise.
29933 (four unnamed splitters): Modify to select the stvx instruction
29934 when memory is aligned.
29936 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
29938 * predict.c (determine_unlikely_bbs): Handle correctly BBs
29939 which appears in the queue multiple times.
29941 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29942 Alan Hayward <alan.hayward@arm.com>
29943 David Sherwood <david.sherwood@arm.com>
29945 * tree-vectorizer.h (vec_lower_bound): New structure.
29946 (_loop_vec_info): Add check_nonzero and lower_bounds.
29947 (LOOP_VINFO_CHECK_NONZERO): New macro.
29948 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29949 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29950 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29951 fields. Make seg_len the distance travelled, not including the
29953 (dr_direction_indicator): Declare.
29954 (dr_zero_step_indicator): Likewise.
29955 (dr_known_forward_stride_p): Likewise.
29956 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29958 (runtime_alias_check_p): Allow runtime alias checks with
29960 (operator ==): Compare access_size and align.
29961 (prune_runtime_alias_test_list): Rework for new distinction between
29962 the access_size and seg_len.
29963 (create_intersect_range_checks_index): Likewise. Cope with polynomial
29965 (get_segment_min_max): New function.
29966 (create_intersect_range_checks): Use it.
29967 (dr_step_indicator): New function.
29968 (dr_direction_indicator): Likewise.
29969 (dr_zero_step_indicator): Likewise.
29970 (dr_known_forward_stride_p): Likewise.
29971 * tree-loop-distribution.c (data_ref_segment_size): Return
29972 DR_STEP * (niters - 1).
29973 (compute_alias_check_pairs): Update call to the dr_with_seg_len
29975 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29976 (vect_preserves_scalar_order_p): New function, split out from...
29977 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
29978 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29979 (vect_vfa_access_size): New function.
29980 (vect_vfa_align): Likewise.
29981 (vect_compile_time_alias): Take access_size_a and access_b arguments.
29982 (dump_lower_bound): New function.
29983 (vect_check_lower_bound): Likewise.
29984 (vect_small_gap_p): Likewise.
29985 (vectorizable_with_step_bound_p): Likewise.
29986 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29987 depencies if the vectorization factor is 1. Convert the checks
29988 for nonzero steps into checks on the bounds of DR_STEP. Try using
29989 a bunds check for variable steps if the minimum required step is
29990 relatively small. Update calls to the dr_with_seg_len
29991 constructor and to vect_compile_time_alias.
29992 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
29994 (vect_loop_versioning): Call it.
29995 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
29997 (vect_estimate_min_profitable_iters): Account for any bounds checks.
29999 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30000 Alan Hayward <alan.hayward@arm.com>
30001 David Sherwood <david.sherwood@arm.com>
30003 * doc/sourcebuild.texi (vect_scatter_store): Document.
30004 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
30006 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
30008 * genopinit.c (main): Add supports_vec_scatter_store and
30009 supports_vec_scatter_store_cached to target_optabs.
30010 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
30011 IFN_MASK_SCATTER_STORE.
30012 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
30014 * internal-fn.h (internal_store_fn_p): Declare.
30015 (internal_fn_stored_value_index): Likewise.
30016 * internal-fn.c (scatter_store_direct): New macro.
30017 (expand_scatter_store_optab_fn): New function.
30018 (direct_scatter_store_optab_supported_p): New macro.
30019 (internal_store_fn_p): New function.
30020 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
30021 IFN_MASK_SCATTER_STORE.
30022 (internal_fn_mask_index): Likewise.
30023 (internal_fn_stored_value_index): New function.
30024 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
30025 for scatter stores.
30026 * optabs-query.h (supports_vec_scatter_store_p): Declare.
30027 * optabs-query.c (supports_vec_scatter_store_p): New function.
30028 * tree-vectorizer.h (vect_get_store_rhs): Declare.
30029 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
30030 true for scatter stores.
30031 (vect_gather_scatter_fn_p): Handle scatter stores too.
30032 (vect_check_gather_scatter): Consider using scatter stores if
30033 supports_vec_scatter_store_p.
30034 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
30035 scatter stores too.
30036 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30037 internal_fn_stored_value_index.
30038 (check_load_store_masking): Handle scatter stores too.
30039 (vect_get_store_rhs): Make public.
30040 (vectorizable_call): Use internal_store_fn_p.
30041 (vectorizable_store): Handle scatter store internal functions.
30042 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
30043 when deciding whether the end of the group has been reached.
30044 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
30045 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
30046 (mask_scatter_store<mode>): New insns.
30048 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30049 Alan Hayward <alan.hayward@arm.com>
30050 David Sherwood <david.sherwood@arm.com>
30052 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
30053 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
30054 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
30056 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
30057 Use vect_truncate_gather_scatter_offset if we can't treat the
30058 operation as a normal gather load or scatter store.
30059 (get_group_load_store_type): Take the gather_scatter_info
30060 as argument. Try using a gather load or scatter store for
30061 single-element groups.
30062 (get_load_store_type): Update calls to get_group_load_store_type
30063 and vect_use_strided_gather_scatters_p.
30065 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30066 Alan Hayward <alan.hayward@arm.com>
30067 David Sherwood <david.sherwood@arm.com>
30069 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
30070 optional tree argument.
30071 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
30073 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
30074 but continue to use the current value as a fallback.
30075 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
30076 to compare the updates.
30077 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
30078 (get_load_store_type): Use it when handling a strided access.
30079 (vect_get_strided_load_store_ops): New function.
30080 (vect_get_data_ptr_increment): Likewise.
30081 (vectorizable_load): Handle strided gather loads. Always pass
30082 a step to vect_create_data_ref_ptr and bump_vector_ptr.
30084 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30085 Alan Hayward <alan.hayward@arm.com>
30086 David Sherwood <david.sherwood@arm.com>
30088 * doc/md.texi (gather_load@var{m}): Document.
30089 (mask_gather_load@var{m}): Likewise.
30090 * genopinit.c (main): Add supports_vec_gather_load and
30091 supports_vec_gather_load_cached to target_optabs.
30092 * optabs-tree.c (init_tree_optimization_optabs): Use
30093 ggc_cleared_alloc to allocate target_optabs.
30094 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
30095 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
30097 * internal-fn.h (internal_load_fn_p): Declare.
30098 (internal_gather_scatter_fn_p): Likewise.
30099 (internal_fn_mask_index): Likewise.
30100 (internal_gather_scatter_fn_supported_p): Likewise.
30101 * internal-fn.c (gather_load_direct): New macro.
30102 (expand_gather_load_optab_fn): New function.
30103 (direct_gather_load_optab_supported_p): New macro.
30104 (direct_internal_fn_optab): New function.
30105 (internal_load_fn_p): Likewise.
30106 (internal_gather_scatter_fn_p): Likewise.
30107 (internal_fn_mask_index): Likewise.
30108 (internal_gather_scatter_fn_supported_p): Likewise.
30109 * optabs-query.c (supports_at_least_one_mode_p): New function.
30110 (supports_vec_gather_load_p): Likewise.
30111 * optabs-query.h (supports_vec_gather_load_p): Declare.
30112 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
30113 and memory_type field.
30114 (NUM_PATTERNS): Bump to 15.
30115 * tree-vect-data-refs.c: Include internal-fn.h.
30116 (vect_gather_scatter_fn_p): New function.
30117 (vect_describe_gather_scatter_call): Likewise.
30118 (vect_check_gather_scatter): Try using internal functions for
30119 gather loads. Recognize existing calls to a gather load function.
30120 (vect_analyze_data_refs): Consider using gather loads if
30121 supports_vec_gather_load_p.
30122 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
30123 (vect_get_gather_scatter_offset_type): Likewise.
30124 (vect_convert_mask_for_vectype): Likewise.
30125 (vect_add_conversion_to_patterm): Likewise.
30126 (vect_try_gather_scatter_pattern): Likewise.
30127 (vect_recog_gather_scatter_pattern): New pattern recognizer.
30128 (vect_vect_recog_func_ptrs): Add it.
30129 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
30130 internal_fn_mask_index and internal_gather_scatter_fn_p.
30131 (check_load_store_masking): Take the gather_scatter_info as an
30132 argument and handle gather loads.
30133 (vect_get_gather_scatter_ops): New function.
30134 (vectorizable_call): Check internal_load_fn_p.
30135 (vectorizable_load): Likewise. Handle gather load internal
30137 (vectorizable_store): Update call to check_load_store_masking.
30138 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
30139 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
30140 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
30141 (aarch64_gather_scale_operand_d): New predicates.
30142 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
30143 (mask_gather_load<mode>): New insns.
30145 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30146 Alan Hayward <alan.hayward@arm.com>
30147 David Sherwood <david.sherwood@arm.com>
30149 * optabs.def (fold_left_plus_optab): New optab.
30150 * doc/md.texi (fold_left_plus_@var{m}): Document.
30151 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
30152 * internal-fn.c (fold_left_direct): Define.
30153 (expand_fold_left_optab_fn): Likewise.
30154 (direct_fold_left_optab_supported_p): Likewise.
30155 * fold-const-call.c (fold_const_fold_left): New function.
30156 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
30157 * tree-parloops.c (valid_reduction_p): New function.
30158 (gather_scalar_reductions): Use it.
30159 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
30160 (vect_finish_replace_stmt): Declare.
30161 * tree-vect-loop.c (fold_left_reduction_fn): New function.
30162 (needs_fold_left_reduction_p): New function, split out from...
30163 (vect_is_simple_reduction): ...here. Accept reductions that
30164 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
30165 (vect_force_simple_reduction): Also store the reduction type in
30166 the assignment's STMT_VINFO_REDUC_TYPE.
30167 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
30168 (merge_with_identity): New function.
30169 (vect_expand_fold_left): Likewise.
30170 (vectorize_fold_left_reduction): Likewise.
30171 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
30172 scalar phi in place for it. Check for target support and reject
30173 cases that would reassociate the operation. Defer the transform
30174 phase to vectorize_fold_left_reduction.
30175 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
30176 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
30177 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
30179 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30181 * tree-if-conv.c (predicate_mem_writes): Remove redundant
30182 call to ifc_temp_var.
30184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30185 Alan Hayward <alan.hayward@arm.com>
30186 David Sherwood <david.sherwood@arm.com>
30188 * target.def (legitimize_address_displacement): Take the original
30189 offset as a poly_int.
30190 * targhooks.h (default_legitimize_address_displacement): Update
30192 * targhooks.c (default_legitimize_address_displacement): Likewise.
30193 * doc/tm.texi: Regenerate.
30194 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
30195 as an argument, moving assert of ad->disp == ad->disp_term to...
30196 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
30197 Try calling targetm.legitimize_address_displacement before expanding
30198 the address rather than afterwards, and adjust for the new interface.
30199 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
30200 Match the new hook interface. Handle SVE addresses.
30201 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
30202 new hook interface.
30204 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30206 * Makefile.in (OBJS): Add early-remat.o.
30207 * target.def (select_early_remat_modes): New hook.
30208 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
30209 * doc/tm.texi: Regenerate.
30210 * targhooks.h (default_select_early_remat_modes): Declare.
30211 * targhooks.c (default_select_early_remat_modes): New function.
30212 * timevar.def (TV_EARLY_REMAT): New timevar.
30213 * passes.def (pass_early_remat): New pass.
30214 * tree-pass.h (make_pass_early_remat): Declare.
30215 * early-remat.c: New file.
30216 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
30218 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
30220 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30221 Alan Hayward <alan.hayward@arm.com>
30222 David Sherwood <david.sherwood@arm.com>
30224 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
30225 vfm1 with a bound_epilog parameter.
30226 (vect_do_peeling): Update calls accordingly, and move the prologue
30227 call earlier in the function. Treat the base bound_epilog as 0 for
30228 fully-masked loops and retain vf - 1 for other loops. Add 1 to
30229 this base when peeling for gaps.
30230 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
30231 with fully-masked loops.
30232 (vect_estimate_min_profitable_iters): Handle the single peeled
30233 iteration in that case.
30235 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30236 Alan Hayward <alan.hayward@arm.com>
30237 David Sherwood <david.sherwood@arm.com>
30239 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
30240 single-element interleaving even if the size is not a power of 2.
30241 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
30242 accesses for single-element interleaving if the group size is
30245 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30246 Alan Hayward <alan.hayward@arm.com>
30247 David Sherwood <david.sherwood@arm.com>
30249 * doc/md.texi (fold_extract_last_@var{m}): Document.
30250 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
30251 * optabs.def (fold_extract_last_optab): New optab.
30252 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
30253 * internal-fn.c (fold_extract_direct): New macro.
30254 (expand_fold_extract_optab_fn): Likewise.
30255 (direct_fold_extract_optab_supported_p): Likewise.
30256 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
30257 * tree-vect-loop.c (vect_model_reduction_cost): Handle
30258 EXTRACT_LAST_REDUCTION.
30259 (get_initial_def_for_reduction): Do not create an initial vector
30260 for EXTRACT_LAST_REDUCTION reductions.
30261 (vectorizable_reduction): Leave the scalar phi in place for
30262 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
30263 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
30264 epilogue code for EXTRACT_LAST_REDUCTION and defer the
30265 transform phase to vectorizable_condition.
30266 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
30268 (vect_finish_stmt_generation): ...here.
30269 (vect_finish_replace_stmt): New function.
30270 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
30271 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
30273 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
30275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30276 Alan Hayward <alan.hayward@arm.com>
30277 David Sherwood <david.sherwood@arm.com>
30279 * doc/md.texi (extract_last_@var{m}): Document.
30280 * optabs.def (extract_last_optab): New optab.
30281 * internal-fn.def (EXTRACT_LAST): New internal function.
30282 * internal-fn.c (cond_unary_direct): New macro.
30283 (expand_cond_unary_optab_fn): Likewise.
30284 (direct_cond_unary_optab_supported_p): Likewise.
30285 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
30286 loops using EXTRACT_LAST.
30287 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
30288 (extract_last_<mode>): ...this optab.
30289 (vec_extract<mode><Vel>): Update accordingly.
30291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30292 Alan Hayward <alan.hayward@arm.com>
30293 David Sherwood <david.sherwood@arm.com>
30295 * target.def (empty_mask_is_expensive): New hook.
30296 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
30297 * doc/tm.texi: Regenerate.
30298 * targhooks.h (default_empty_mask_is_expensive): Declare.
30299 * targhooks.c (default_empty_mask_is_expensive): New function.
30300 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
30301 if the target says that empty masks are expensive.
30302 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
30304 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
30306 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30307 Alan Hayward <alan.hayward@arm.com>
30308 David Sherwood <david.sherwood@arm.com>
30310 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
30311 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
30312 (vect_use_loop_mask_for_alignment_p): New function.
30313 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
30314 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
30315 niters_skip argument. Make sure that the first niters_skip elements
30316 of the first iteration are inactive.
30317 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
30318 Update call to vect_set_loop_masks_directly.
30319 (get_misalign_in_elems): New function, split out from...
30320 (vect_gen_prolog_loop_niters): ...here.
30321 (vect_update_init_of_dr): Take a code argument that specifies whether
30322 the adjustment should be added or subtracted.
30323 (vect_update_init_of_drs): Likewise.
30324 (vect_prepare_for_masked_peels): New function.
30325 (vect_do_peeling): Skip prologue peeling if we're using a mask
30326 instead. Update call to vect_update_inits_of_drs.
30327 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30329 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
30330 alignment. Do not include the number of peeled iterations in
30331 the minimum threshold in that case.
30332 (vectorizable_induction): Adjust the start value down by
30333 LOOP_VINFO_MASK_SKIP_NITERS iterations.
30334 (vect_transform_loop): Call vect_prepare_for_masked_peels.
30335 Take the number of skipped iterations into account when calculating
30337 * tree-vect-stmts.c (vect_gen_while_not): New function.
30339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30340 Alan Hayward <alan.hayward@arm.com>
30341 David Sherwood <david.sherwood@arm.com>
30343 * doc/sourcebuild.texi (vect_fully_masked): Document.
30344 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
30345 default value to 0.
30346 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
30348 (vect_analyze_loop_2): ...here. Don't check the vectorization
30349 factor against the number of loop iterations if the loop is
30352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30353 Alan Hayward <alan.hayward@arm.com>
30354 David Sherwood <david.sherwood@arm.com>
30356 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
30357 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
30358 (dump_groups): Update accordingly.
30359 (iv_use::mem_type): New member variable.
30360 (address_p): New function.
30361 (record_use): Add a mem_type argument and initialize the new
30363 (record_group_use): Add a mem_type argument. Use address_p.
30364 Remove obsolete null checks of base_object. Update call to record_use.
30365 (find_interesting_uses_op): Update call to record_group_use.
30366 (find_interesting_uses_cond): Likewise.
30367 (find_interesting_uses_address): Likewise.
30368 (get_mem_type_for_internal_fn): New function.
30369 (find_address_like_use): Likewise.
30370 (find_interesting_uses_stmt): Try find_address_like_use before
30371 calling find_interesting_uses_op.
30372 (addr_offset_valid_p): Use the iv mem_type field as the type
30373 of the addressed memory.
30374 (add_autoinc_candidates): Likewise.
30375 (get_address_cost): Likewise.
30376 (split_small_address_groups_p): Use address_p.
30377 (split_address_groups): Likewise.
30378 (add_iv_candidate_for_use): Likewise.
30379 (autoinc_possible_for_pair): Likewise.
30380 (rewrite_groups): Likewise.
30381 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
30382 (determine_group_iv_cost): Update after split of USE_ADDRESS.
30383 (get_alias_ptr_type_for_ptr_address): New function.
30384 (rewrite_use_address): Rewrite address uses in calls that were
30385 identified by find_address_like_use.
30387 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30388 Alan Hayward <alan.hayward@arm.com>
30389 David Sherwood <david.sherwood@arm.com>
30391 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
30393 * gimple-expr.h (is_gimple_addressable: Likewise.
30394 * gimple-expr.c (is_gimple_address): Likewise.
30395 * internal-fn.c (expand_call_mem_ref): New function.
30396 (expand_mask_load_optab_fn): Use it.
30397 (expand_mask_store_optab_fn): Likewise.
30399 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30400 Alan Hayward <alan.hayward@arm.com>
30401 David Sherwood <david.sherwood@arm.com>
30403 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
30404 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
30405 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
30406 (cond_umax@var{mode}): Document.
30407 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
30408 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
30409 (cond_umin_optab, cond_umax_optab): New optabs.
30410 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
30411 (COND_IOR, COND_XOR): New internal functions.
30412 * internal-fn.h (get_conditional_internal_fn): Declare.
30413 * internal-fn.c (cond_binary_direct): New macro.
30414 (expand_cond_binary_optab_fn): Likewise.
30415 (direct_cond_binary_optab_supported_p): Likewise.
30416 (get_conditional_internal_fn): New function.
30417 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
30418 Cope with reduction statements that are vectorized as calls rather
30420 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
30421 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
30422 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
30423 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
30424 (UNSPEC_COND_EOR): New unspecs.
30425 (optab): Add mappings for them.
30426 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
30427 (sve_int_op, sve_fp_op): New int attributes.
30429 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30430 Alan Hayward <alan.hayward@arm.com>
30431 David Sherwood <david.sherwood@arm.com>
30433 * optabs.def (while_ult_optab): New optab.
30434 * doc/md.texi (while_ult@var{m}@var{n}): Document.
30435 * internal-fn.def (WHILE_ULT): New internal function.
30436 * internal-fn.h (direct_internal_fn_supported_p): New override
30437 that takes two types as argument.
30438 * internal-fn.c (while_direct): New macro.
30439 (expand_while_optab_fn): New function.
30440 (convert_optab_supported_p): Likewise.
30441 (direct_while_optab_supported_p): New macro.
30442 * wide-int.h (wi::udiv_ceil): New function.
30443 * tree-vectorizer.h (rgroup_masks): New structure.
30444 (vec_loop_masks): New typedef.
30445 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
30446 and fully_masked_p.
30447 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
30448 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
30449 (vect_max_vf): New function.
30450 (slpeel_make_loop_iterate_ntimes): Delete.
30451 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
30452 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
30453 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
30454 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
30455 internal-fn.h, stor-layout.h and optabs-query.h.
30456 (vect_set_loop_mask): New function.
30457 (add_preheader_seq): Likewise.
30458 (add_header_seq): Likewise.
30459 (interleave_supported_p): Likewise.
30460 (vect_maybe_permute_loop_masks): Likewise.
30461 (vect_set_loop_masks_directly): Likewise.
30462 (vect_set_loop_condition_masked): Likewise.
30463 (vect_set_loop_condition_unmasked): New function, split out from
30464 slpeel_make_loop_iterate_ntimes.
30465 (slpeel_make_loop_iterate_ntimes): Rename to..
30466 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
30467 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
30468 (vect_do_peeling): Update call accordingly.
30469 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
30471 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30472 mask_compare_type, can_fully_mask_p and fully_masked_p.
30473 (release_vec_loop_masks): New function.
30474 (_loop_vec_info): Use it to free the loop masks.
30475 (can_produce_all_loop_masks_p): New function.
30476 (vect_get_max_nscalars_per_iter): Likewise.
30477 (vect_verify_full_masking): Likewise.
30478 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
30479 retries, and free the mask rgroups before retrying. Check loop-wide
30480 reasons for disallowing fully-masked loops. Make the final decision
30481 about whether use a fully-masked loop or not.
30482 (vect_estimate_min_profitable_iters): Do not assume that peeling
30483 for the number of iterations will be needed for fully-masked loops.
30484 (vectorizable_reduction): Disable fully-masked loops.
30485 (vectorizable_live_operation): Likewise.
30486 (vect_halve_mask_nunits): New function.
30487 (vect_double_mask_nunits): Likewise.
30488 (vect_record_loop_mask): Likewise.
30489 (vect_get_loop_mask): Likewise.
30490 (vect_transform_loop): Handle the case in which the final loop
30491 iteration might handle a partial vector. Call vect_set_loop_condition
30492 instead of slpeel_make_loop_iterate_ntimes.
30493 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
30494 (check_load_store_masking): New function.
30495 (prepare_load_store_mask): Likewise.
30496 (vectorizable_store): Handle fully-masked loops.
30497 (vectorizable_load): Likewise.
30498 (supportable_widening_operation): Use vect_halve_mask_nunits for
30500 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
30501 (vect_gen_while): New function.
30502 * config/aarch64/aarch64.md (umax<mode>3): New expander.
30503 (aarch64_uqdec<mode>): New insn.
30505 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30506 Alan Hayward <alan.hayward@arm.com>
30507 David Sherwood <david.sherwood@arm.com>
30509 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
30510 (reduc_xor_scal_optab): New optabs.
30511 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
30512 (reduc_xor_scal_@var{m}): Document.
30513 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
30514 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
30515 internal functions.
30516 * fold-const-call.c (fold_const_call): Handle them.
30517 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
30518 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
30519 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
30520 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
30521 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
30522 (UNSPEC_XORV): New unspecs.
30523 (optab): Add entries for them.
30524 (BITWISEV): New int iterator.
30525 (bit_reduc_op): New int attributes.
30527 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30528 Alan Hayward <alan.hayward@arm.com>
30529 David Sherwood <david.sherwood@arm.com>
30531 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
30532 * internal-fn.def (VEC_SHL_INSERT): New internal function.
30533 * optabs.def (vec_shl_insert_optab): New optab.
30534 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
30535 (duplicate_and_interleave): Likewise.
30536 * tree-vect-loop.c: Include internal-fn.h.
30537 (neutral_op_for_slp_reduction): New function, split out from
30538 get_initial_defs_for_reduction.
30539 (get_initial_def_for_reduction): Handle option 2 for variable-length
30540 vectors by loading the neutral value into a vector and then shifting
30541 the initial value into element 0.
30542 (get_initial_defs_for_reduction): Replace the code argument with
30543 the neutral value calculated by neutral_op_for_slp_reduction.
30544 Use gimple_build_vector for constant-length vectors.
30545 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
30546 but the first group_size elements have a neutral value.
30547 Use duplicate_and_interleave otherwise.
30548 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
30549 Update call to get_initial_defs_for_reduction. Handle SLP
30550 reductions for variable-length vectors by creating one vector
30551 result for each scalar result, with the elements associated
30552 with other scalar results stubbed out with the neutral value.
30553 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
30554 Require IFN_VEC_SHL_INSERT for double reductions on
30555 variable-length vectors, or SLP reductions that have
30556 a neutral value. Require can_duplicate_and_interleave_p
30557 support for variable-length unchained SLP reductions if there
30558 is no neutral value, such as for MIN/MAX reductions. Also require
30559 the number of vector elements to be a multiple of the number of
30560 SLP statements when doing variable-length unchained SLP reductions.
30561 Update call to vect_create_epilog_for_reduction.
30562 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
30563 and remove initial values.
30564 (duplicate_and_interleave): Make public.
30565 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
30566 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
30568 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30569 Alan Hayward <alan.hayward@arm.com>
30570 David Sherwood <david.sherwood@arm.com>
30572 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
30573 (can_duplicate_and_interleave_p): New function.
30574 (vect_get_and_check_slp_defs): Take the vector of statements
30575 rather than just the current one. Remove excess parentheses.
30576 Restriction rejectinon of vect_constant_def and vect_external_def
30577 for variable-length vectors to boolean types, or types for which
30578 can_duplicate_and_interleave_p is false.
30579 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
30580 (duplicate_and_interleave): New function.
30581 (vect_get_constant_vectors): Use gimple_build_vector for
30582 constant-length vectors and suitable variable-length constant
30583 vectors. Use duplicate_and_interleave for other variable-length
30584 vectors. Don't defer the update when inserting new statements.
30586 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30587 Alan Hayward <alan.hayward@arm.com>
30588 David Sherwood <david.sherwood@arm.com>
30590 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
30591 min_profitable_iters doesn't go negative.
30593 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30594 Alan Hayward <alan.hayward@arm.com>
30595 David Sherwood <david.sherwood@arm.com>
30597 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
30598 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
30599 * optabs.def (vec_mask_load_lanes_optab): New optab.
30600 (vec_mask_store_lanes_optab): Likewise.
30601 * internal-fn.def (MASK_LOAD_LANES): New internal function.
30602 (MASK_STORE_LANES): Likewise.
30603 * internal-fn.c (mask_load_lanes_direct): New macro.
30604 (mask_store_lanes_direct): Likewise.
30605 (expand_mask_load_optab_fn): Handle masked operations.
30606 (expand_mask_load_lanes_optab_fn): New macro.
30607 (expand_mask_store_optab_fn): Handle masked operations.
30608 (expand_mask_store_lanes_optab_fn): New macro.
30609 (direct_mask_load_lanes_optab_supported_p): Likewise.
30610 (direct_mask_store_lanes_optab_supported_p): Likewise.
30611 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
30613 (vect_load_lanes_supported): Likewise.
30614 * tree-vect-data-refs.c (strip_conversion): New function.
30615 (can_group_stmts_p): Likewise.
30616 (vect_analyze_data_ref_accesses): Use it instead of checking
30617 for a pair of assignments.
30618 (vect_store_lanes_supported): Take a masked_p parameter.
30619 (vect_load_lanes_supported): Likewise.
30620 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
30621 vect_store_lanes_supported and vect_load_lanes_supported.
30622 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
30623 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
30624 parameter. Don't allow gaps for masked accesses.
30625 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
30626 and vect_load_lanes_supported.
30627 (get_load_store_type): Take a masked_p parameter and update
30628 call to get_group_load_store_type.
30629 (vectorizable_store): Update call to get_load_store_type.
30630 Handle IFN_MASK_STORE_LANES.
30631 (vectorizable_load): Update call to get_load_store_type.
30632 Handle IFN_MASK_LOAD_LANES.
30634 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30635 Alan Hayward <alan.hayward@arm.com>
30636 David Sherwood <david.sherwood@arm.com>
30638 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
30640 * config/aarch64/aarch64-protos.h
30641 (aarch64_sve_struct_memory_operand_p): Declare.
30642 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
30643 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
30644 (VPRED, vpred): Handle SVE structure modes.
30645 * config/aarch64/constraints.md (Utx): New constraint.
30646 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
30647 (aarch64_sve_struct_nonimmediate_operand): New predicates.
30648 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
30649 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
30650 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
30651 structure modes. Split into pieces after RA.
30652 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
30653 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
30655 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
30656 SVE structure modes.
30657 (aarch64_classify_address): Likewise.
30658 (sizetochar): Move earlier in file.
30659 (aarch64_print_operand): Handle SVE register lists.
30660 (aarch64_array_mode): New function.
30661 (aarch64_sve_struct_memory_operand_p): Likewise.
30662 (TARGET_ARRAY_MODE): Redefine.
30664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30665 Alan Hayward <alan.hayward@arm.com>
30666 David Sherwood <david.sherwood@arm.com>
30668 * target.def (array_mode): New target hook.
30669 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
30670 * doc/tm.texi: Regenerate.
30671 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
30672 * hooks.c (hook_optmode_mode_uhwi_none): New function.
30673 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
30674 targetm.array_mode.
30675 * stor-layout.c (mode_for_array): Likewise. Support polynomial
30678 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30679 Alan Hayward <alan.hayward@arm.com>
30680 David Sherwood <david.sherwood@arm.com>
30682 * fold-const.c (fold_binary_loc): Check the argument types
30683 rather than the result type when testing for a vector operation.
30685 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30687 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
30688 * doc/tm.texi: Regenerate.
30690 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30691 Alan Hayward <alan.hayward@arm.com>
30692 David Sherwood <david.sherwood@arm.com>
30694 * doc/invoke.texi (-msve-vector-bits=): Document new option.
30695 (sve): Document new AArch64 extension.
30696 * doc/md.texi (w): Extend the description of the AArch64
30697 constraint to include SVE vectors.
30698 (Upl, Upa): Document new AArch64 predicate constraints.
30699 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
30701 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
30702 (msve-vector-bits=): New option.
30703 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
30704 SVE when these are disabled.
30705 (sve): New extension.
30706 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
30707 modes. Adjust their number of units based on aarch64_sve_vg.
30708 (MAX_BITSIZE_MODE_ANY_MODE): Define.
30709 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
30710 aarch64_addr_query_type.
30711 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
30712 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
30713 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
30714 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
30715 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
30716 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
30717 (aarch64_simd_imm_zero_p): Delete.
30718 (aarch64_check_zero_based_sve_index_immediate): Declare.
30719 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30720 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30721 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30722 (aarch64_sve_float_mul_immediate_p): Likewise.
30723 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30724 rather than an rtx.
30725 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
30726 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
30727 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
30728 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
30729 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
30730 (aarch64_regmode_natural_size): Likewise.
30731 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
30732 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
30734 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
30735 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
30736 for VG and the SVE predicate registers.
30737 (V_ALIASES): Add a "z"-prefixed alias.
30738 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
30739 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
30740 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
30741 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
30742 (REG_CLASS_NAMES): Add entries for them.
30743 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
30744 and the predicate registers.
30745 (aarch64_sve_vg): Declare.
30746 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
30747 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
30748 (REGMODE_NATURAL_SIZE): Define.
30749 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
30751 * config/aarch64/aarch64.c: Include cfgrtl.h.
30752 (simd_immediate_info): Add a constructor for series vectors,
30753 and an associated step field.
30754 (aarch64_sve_vg): New variable.
30755 (aarch64_dbx_register_number): Handle VG and the predicate registers.
30756 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
30757 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
30758 (VEC_ANY_DATA, VEC_STRUCT): New constants.
30759 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
30760 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
30761 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
30762 (aarch64_get_mask_mode): New functions.
30763 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
30764 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
30765 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
30766 predicate modes and predicate registers. Explicitly restrict
30767 GPRs to modes of 16 bytes or smaller. Only allow FP registers
30768 to store a vector mode if it is recognized by
30769 aarch64_classify_vector_mode.
30770 (aarch64_regmode_natural_size): New function.
30771 (aarch64_hard_regno_caller_save_mode): Return the original mode
30773 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
30774 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
30775 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
30776 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
30778 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
30779 does not overlap dest if the function is frame-related. Handle
30781 (aarch64_split_add_offset): New function.
30782 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
30783 them aarch64_add_offset.
30784 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
30785 and update call to aarch64_sub_sp.
30786 (aarch64_add_cfa_expression): New function.
30787 (aarch64_expand_prologue): Pass extra temporary registers to the
30788 functions above. Handle the case in which we need to emit new
30789 DW_CFA_expressions for registers that were originally saved
30790 relative to the stack pointer, but now have to be expressed
30791 relative to the frame pointer.
30792 (aarch64_output_mi_thunk): Pass extra temporary registers to the
30794 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
30795 IP0 and IP1 values for SVE frames.
30796 (aarch64_expand_vec_series): New function.
30797 (aarch64_expand_sve_widened_duplicate): Likewise.
30798 (aarch64_expand_sve_const_vector): Likewise.
30799 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
30800 Handle SVE constants. Use emit_move_insn to move a force_const_mem
30801 into the register, rather than emitting a SET directly.
30802 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
30803 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
30804 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
30805 (offset_9bit_signed_scaled_p): New functions.
30806 (aarch64_replicate_bitmask_imm): New function.
30807 (aarch64_bitmask_imm): Use it.
30808 (aarch64_cannot_force_const_mem): Reject expressions involving
30809 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
30810 (aarch64_classify_index): Handle SVE indices, by requiring
30811 a plain register index with a scale that matches the element size.
30812 (aarch64_classify_address): Handle SVE addresses. Assert that
30813 the mode of the address is VOIDmode or an integer mode.
30814 Update call to aarch64_classify_symbol.
30815 (aarch64_classify_symbolic_expression): Update call to
30816 aarch64_classify_symbol.
30817 (aarch64_const_vec_all_in_range_p): New function.
30818 (aarch64_print_vector_float_operand): Likewise.
30819 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
30820 "vN" for FP registers with SVE modes. Handle (const ...) vectors
30821 and the FP immediates 1.0 and 0.5.
30822 (aarch64_print_address_internal): Handle SVE addresses.
30823 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
30824 (aarch64_regno_regclass): Handle predicate registers.
30825 (aarch64_secondary_reload): Handle big-endian reloads of SVE
30827 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
30828 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
30829 (aarch64_convert_sve_vector_bits): New function.
30830 (aarch64_override_options): Use it to handle -msve-vector-bits=.
30831 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30832 rather than an rtx.
30833 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
30834 Handle SVE vector and predicate modes. Accept VL-based constants
30835 that need only one temporary register, and VL offsets that require
30836 no temporary registers.
30837 (aarch64_conditional_register_usage): Mark the predicate registers
30838 as fixed if SVE isn't available.
30839 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
30840 Return true for SVE vector and predicate modes.
30841 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
30842 rather than an unsigned int. Handle SVE modes.
30843 (aarch64_preferred_simd_mode): Update call accordingly. Handle
30845 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
30847 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30848 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30849 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30850 (aarch64_sve_float_mul_immediate_p): New functions.
30851 (aarch64_sve_valid_immediate): New function.
30852 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
30853 Explicitly reject structure modes. Check for INDEX constants.
30854 Handle PTRUE and PFALSE constants.
30855 (aarch64_check_zero_based_sve_index_immediate): New function.
30856 (aarch64_simd_imm_zero_p): Delete.
30857 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
30858 vector modes. Accept constants in the range of CNT[BHWD].
30859 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
30860 ask for an Advanced SIMD mode.
30861 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
30862 (aarch64_simd_vector_alignment): Handle SVE predicates.
30863 (aarch64_vectorize_preferred_vector_alignment): New function.
30864 (aarch64_simd_vector_alignment_reachable): Use it instead of
30866 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
30867 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
30869 (MAX_VECT_LEN): Delete.
30870 (expand_vec_perm_d): Add a vec_flags field.
30871 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
30872 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
30873 (aarch64_evpc_ext): Don't apply a big-endian lane correction
30875 (aarch64_evpc_rev): Rename to...
30876 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
30877 (aarch64_evpc_rev_global): New function.
30878 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
30879 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
30881 (aarch64_evpc_sve_tbl): New function.
30882 (aarch64_expand_vec_perm_const_1): Update after rename of
30883 aarch64_evpc_rev. Handle SVE permutes too, trying
30884 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
30885 than aarch64_evpc_tbl.
30886 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
30887 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
30888 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
30889 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
30890 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
30891 (aarch64_expand_sve_vcond): New functions.
30892 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
30893 of aarch64_vector_mode_p.
30894 (aarch64_dwarf_poly_indeterminate_value): New function.
30895 (aarch64_compute_pressure_classes): Likewise.
30896 (aarch64_can_change_mode_class): Likewise.
30897 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
30898 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
30899 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
30900 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30901 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30902 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30903 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30904 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30906 (Dn, Dl, Dr): Accept const as well as const_vector.
30907 (Dz): Likewise. Compare against CONST0_RTX.
30908 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30909 of "vector" where appropriate.
30910 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30911 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30912 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30913 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30914 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30915 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30916 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30917 (v_int_equiv): Extend to SVE modes.
30918 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30920 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30921 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30922 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30923 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30924 (SVE_COND_FP_CMP): New int iterators.
30925 (perm_hilo): Handle the new unpack unspecs.
30926 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30928 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30929 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30930 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30931 (aarch64_equality_operator, aarch64_constant_vector_operand)
30932 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30933 (aarch64_sve_nonimmediate_operand): Likewise.
30934 (aarch64_sve_general_operand): Likewise.
30935 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30936 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30937 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30938 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30939 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30940 (aarch64_sve_float_arith_immediate): Likewise.
30941 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30942 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30943 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30944 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30945 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30946 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30947 (aarch64_sve_float_arith_operand): Likewise.
30948 (aarch64_sve_float_arith_with_sub_operand): Likewise.
30949 (aarch64_sve_float_mul_operand): Likewise.
30950 (aarch64_sve_vec_perm_operand): Likewise.
30951 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30952 (aarch64_mov_operand): Accept const_poly_int and const_vector.
30953 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30954 as well as const_vector.
30955 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30956 in file. Use CONST0_RTX and CONSTM1_RTX.
30957 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
30958 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30959 Use aarch64_simd_imm_zero.
30960 * config/aarch64/aarch64-sve.md: New file.
30961 * config/aarch64/aarch64.md: Include it.
30962 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30963 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30964 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30965 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30966 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30967 (sve): New attribute.
30968 (enabled): Disable instructions with the sve attribute unless
30970 (movqi, movhi): Pass CONST_POLY_INT operaneds through
30971 aarch64_expand_mov_immediate.
30972 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30973 CNT[BHSD] immediates.
30974 (movti): Split CONST_POLY_INT moves into two halves.
30975 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30976 Split additions that need a temporary here if the destination
30977 is the stack pointer.
30978 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30979 (*add<mode>3_poly_1): New instruction.
30980 (set_clobber_cc): New expander.
30982 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30984 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30985 parameter and use it instead of GET_MODE_SIZE (innermode). Use
30986 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30987 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30988 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
30989 Change innermode from fixed_mode_size to machine_mode.
30990 (simplify_subreg): Update call accordingly. Handle a constant-sized
30991 subreg of a variable-length CONST_VECTOR.
30993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30994 Alan Hayward <alan.hayward@arm.com>
30995 David Sherwood <david.sherwood@arm.com>
30997 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
30998 (add_offset_to_base): New function, split out from...
30999 (create_mem_ref): ...here. When handling a scale other than 1,
31000 check first whether the address is valid without the offset.
31001 Add it into the base if so, leaving the index and scale as-is.
31003 2018-01-12 Jakub Jelinek <jakub@redhat.com>
31006 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
31007 fold_for_warn before checking if arg2 is INTEGER_CST.
31009 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
31011 * config/rs6000/predicates.md (load_multiple_operation): Delete.
31012 (store_multiple_operation): Delete.
31013 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
31014 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
31015 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
31016 guarded by TARGET_STRING.
31017 (rs6000_output_load_multiple): Delete.
31018 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
31019 OPTION_MASK_STRING / TARGET_STRING handling.
31020 (print_operand) <'N', 'O'>: Add comment that these are unused now.
31021 (const rs6000_opt_masks) <"string">: Change mask to 0.
31022 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
31023 (MASK_STRING): Delete.
31024 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
31026 (load_multiple): Delete.
31033 (store_multiple): Delete.
31040 (movmemsi_8reg): Delete.
31041 (corresponding unnamed define_insn): Delete.
31042 (movmemsi_6reg): Delete.
31043 (corresponding unnamed define_insn): Delete.
31044 (movmemsi_4reg): Delete.
31045 (corresponding unnamed define_insn): Delete.
31046 (movmemsi_2reg): Delete.
31047 (corresponding unnamed define_insn): Delete.
31048 (movmemsi_1reg): Delete.
31049 (corresponding unnamed define_insn): Delete.
31050 * config/rs6000/rs6000.opt (mno-string): New.
31051 (mstring): Replace by deprecation warning stub.
31052 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
31054 2018-01-12 Jakub Jelinek <jakub@redhat.com>
31056 * regrename.c (regrename_do_replace): If replacing the same
31057 reg multiple times, try to reuse last created gen_raw_REG.
31060 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
31061 main to workaround a bug in GDB.
31063 2018-01-12 Tom de Vries <tom@codesourcery.com>
31066 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
31068 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
31070 PR rtl-optimization/80481
31071 * ira-color.c (get_cap_member): New function.
31072 (allocnos_conflict_by_live_ranges_p): Use it.
31073 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
31074 (setup_slot_coalesced_allocno_live_ranges): Ditto.
31076 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
31079 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
31080 (*saddl_se_1): Ditto.
31081 (*ssubsi_1): Ditto.
31082 (*ssubl_se_1): Ditto.
31084 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31086 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
31087 rather than wi::to_widest for DR_INITs.
31088 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
31089 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
31090 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
31092 (vect_analyze_group_access_1): Note that here.
31094 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31096 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
31097 polynomial type sizes.
31099 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
31101 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
31102 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
31103 (gimple_add_tmp_var): Likewise.
31105 2018-01-12 Martin Liska <mliska@suse.cz>
31107 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
31108 (gimple_alloc_sizes): Likewise.
31109 (dump_gimple_statistics): Use PRIu64 in printf format.
31110 * gimple.h: Change uint64_t to int.
31112 2018-01-12 Martin Liska <mliska@suse.cz>
31114 * tree-core.h: Use uint64_t instead of int.
31115 * tree.c (tree_node_counts): Likewise.
31116 (tree_node_sizes): Likewise.
31117 (dump_tree_statistics): Use PRIu64 in printf format.
31119 2018-01-12 Martin Liska <mliska@suse.cz>
31121 * Makefile.in: As qsort_chk is implemented in vec.c, add
31122 vec.o to linkage of gencfn-macros.
31123 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
31124 passing the info to record_node_allocation_statistics.
31125 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
31127 * ggc-common.c (struct ggc_usage): Add operator== and use
31128 it in operator< and compare function.
31129 * mem-stats.h (struct mem_usage): Likewise.
31130 * vec.c (struct vec_usage): Remove operator< and compare
31131 function. Can be simply inherited.
31133 2018-01-12 Martin Jambor <mjambor@suse.cz>
31136 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
31137 * tree-ssa-math-opts.c: Include domwalk.h.
31138 (convert_mult_to_fma_1): New function.
31139 (fma_transformation_info): New type.
31140 (fma_deferring_state): Likewise.
31141 (cancel_fma_deferring): New function.
31142 (result_of_phi): Likewise.
31143 (last_fma_candidate_feeds_initial_phi): Likewise.
31144 (convert_mult_to_fma): Added deferring logic, split actual
31145 transformation to convert_mult_to_fma_1.
31146 (math_opts_dom_walker): New type.
31147 (math_opts_dom_walker::after_dom_children): New method, body moved
31148 here from pass_optimize_widening_mul::execute, added deferring logic
31150 (pass_optimize_widening_mul::execute): Moved most of code to
31151 math_opts_dom_walker::after_dom_children.
31152 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
31153 * config/i386/i386.c (ix86_option_override_internal): Added
31154 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
31156 2018-01-12 Richard Biener <rguenther@suse.de>
31159 * dwarf2out.c (gen_variable_die): Do not reset old_die for
31160 inline instance vars.
31162 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
31165 * config/rx/rx.c (rx_is_restricted_memory_address):
31166 Handle SUBREG case.
31168 2018-01-12 Richard Biener <rguenther@suse.de>
31170 PR tree-optimization/80846
31171 * target.def (split_reduction): New target hook.
31172 * targhooks.c (default_split_reduction): New function.
31173 * targhooks.h (default_split_reduction): Declare.
31174 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
31175 target requests first reduce vectors by combining low and high
31177 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
31178 (get_vectype_for_scalar_type_and_size): Export.
31179 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
31180 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
31181 * doc/tm.texi: Regenerate.
31182 * config/i386/i386.c (ix86_split_reduction): Implement
31183 TARGET_VECTORIZE_SPLIT_REDUCTION.
31185 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
31188 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
31189 in PIC mode except for TARGET_VXWORKS_RTP.
31190 * config/sparc/sparc.c: Include cfgrtl.h.
31191 (TARGET_INIT_PIC_REG): Define.
31192 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
31193 (sparc_pic_register_p): New predicate.
31194 (sparc_legitimate_address_p): Use it.
31195 (sparc_legitimize_pic_address): Likewise.
31196 (sparc_delegitimize_address): Likewise.
31197 (sparc_mode_dependent_address_p): Likewise.
31198 (gen_load_pcrel_sym): Remove 4th parameter.
31199 (load_got_register): Adjust call to above. Remove obsolete stuff.
31200 (sparc_expand_prologue): Do not call load_got_register here.
31201 (sparc_flat_expand_prologue): Likewise.
31202 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
31203 (sparc_use_pseudo_pic_reg): New function.
31204 (sparc_init_pic_reg): Likewise.
31205 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
31206 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
31208 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
31210 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
31211 Add item for branch_cost.
31213 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
31215 PR rtl-optimization/83565
31216 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
31217 not extend the result to a larger mode for rotate operations.
31218 (num_sign_bit_copies1): Likewise.
31220 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31223 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
31225 Use values-Xc.o for -pedantic.
31226 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
31228 2018-01-12 Martin Liska <mliska@suse.cz>
31231 * ipa-devirt.c (final_warning_record::grow_type_warnings):
31233 (possible_polymorphic_call_targets): Use it.
31234 (ipa_devirt): Likewise.
31236 2018-01-12 Martin Liska <mliska@suse.cz>
31238 * profile-count.h (enum profile_quality): Use 0 as invalid
31239 enum value of profile_quality.
31241 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
31243 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
31244 -mext-string options.
31246 2018-01-12 Richard Biener <rguenther@suse.de>
31248 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
31249 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
31250 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
31252 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
31254 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
31256 * configure.ac (--with-long-double-format): Add support for the
31257 configuration option to change the default long double format on
31259 * config.gcc (powerpc*-linux*-*): Likewise.
31260 * configure: Regenerate.
31261 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
31262 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
31263 used without modification.
31265 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31267 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
31268 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
31269 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
31270 MISC_BUILTIN_SPEC_BARRIER.
31271 (rs6000_init_builtins): Likewise.
31272 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
31274 (speculation_barrier): New define_insn.
31275 * doc/extend.texi: Document __builtin_speculation_barrier.
31277 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31280 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
31281 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
31282 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
31284 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
31285 integral modes instead of "ss" and "sd".
31286 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
31287 vectors with 32-bit and 64-bit elements.
31288 (vecdupssescalarmodesuffix): New mode attribute.
31289 (vec_dup<mode>): Use it.
31291 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
31294 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
31295 frame if argument is passed on stack.
31297 2018-01-11 Jakub Jelinek <jakub@redhat.com>
31300 * ree.c (combine_reaching_defs): Optimize also
31301 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
31302 reg2=any_extend(exp); reg1=reg2;, formatting fix.
31304 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31306 PR middle-end/83189
31307 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
31309 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
31311 PR middle-end/83718
31312 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
31313 after they are computed.
31315 2018-01-11 Bin Cheng <bin.cheng@arm.com>
31317 PR tree-optimization/83695
31318 * gimple-loop-linterchange.cc
31319 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
31320 reset cached scev information after interchange.
31321 (pass_linterchange::execute): Remove call to scev_reset_htab.
31323 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31325 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
31326 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
31327 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
31328 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
31329 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
31330 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
31331 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
31332 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
31333 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
31334 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
31335 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
31336 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
31337 (V_lane_reg): Likewise.
31338 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
31340 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
31341 (vfmal_lane_low<mode>_intrinsic,
31342 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
31343 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
31344 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
31345 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
31346 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
31347 vfmsl_lane_high<mode>_intrinsic): New define_insns.
31349 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31351 * config/arm/arm-cpus.in (fp16fml): New feature.
31352 (ALL_SIMD): Add fp16fml.
31353 (armv8.2-a): Add fp16fml as an option.
31354 (armv8.3-a): Likewise.
31355 (armv8.4-a): Add fp16fml as part of fp16.
31356 * config/arm/arm.h (TARGET_FP16FML): Define.
31357 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
31359 * config/arm/arm-modes.def (V2HF): Define.
31360 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
31361 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
31362 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
31363 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
31364 vfmsl_low, vfmsl_high): New set of builtins.
31365 * config/arm/iterators.md (PLUSMINUS): New code iterator.
31366 (vfml_op): New code attribute.
31367 (VFMLHALVES): New int iterator.
31368 (VFML, VFMLSEL): New mode attributes.
31369 (V_reg): Define mapping for V2HF.
31370 (V_hi, V_lo): New mode attributes.
31371 (VF_constraint): Likewise.
31372 (vfml_half, vfml_half_selector): New int attributes.
31373 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
31375 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
31376 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
31378 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
31379 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
31380 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
31381 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
31383 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
31384 Document new effective target and option set.
31386 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31388 * config/arm/arm-cpus.in (armv8_4): New feature.
31389 (ARMv8_4a): New fgroup.
31390 (armv8.4-a): New arch.
31391 * config/arm/arm-tables.opt: Regenerate.
31392 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
31393 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
31394 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
31395 Add matching rules for -march=armv8.4-a and extensions.
31396 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
31398 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
31401 * config/rx/rx.md (BW): New mode attribute.
31402 (sync_lock_test_and_setsi): Add mode suffix to insn output.
31404 2018-01-11 Richard Biener <rguenther@suse.de>
31406 PR tree-optimization/83435
31407 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
31408 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
31409 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
31411 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31412 Alan Hayward <alan.hayward@arm.com>
31413 David Sherwood <david.sherwood@arm.com>
31415 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
31417 (aarch64_classify_address): Initialize it. Track polynomial offsets.
31418 (aarch64_print_address_internal): Use it to check for a zero offset.
31420 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31421 Alan Hayward <alan.hayward@arm.com>
31422 David Sherwood <david.sherwood@arm.com>
31424 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
31425 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
31426 Return a poly_int64 rather than a HOST_WIDE_INT.
31427 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
31428 rather than a HOST_WIDE_INT.
31429 * config/aarch64/aarch64.h (aarch64_frame): Protect with
31430 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
31431 hard_fp_offset, frame_size, initial_adjust, callee_offset and
31432 final_offset from HOST_WIDE_INT to poly_int64.
31433 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
31434 to_constant when getting the number of units in an Advanced SIMD
31436 (aarch64_builtin_vectorized_function): Check for a constant number
31438 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
31440 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
31441 attribute instead of GET_MODE_NUNITS.
31442 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
31443 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
31444 GET_MODE_SIZE for fixed-size registers.
31445 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
31446 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
31447 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
31448 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
31449 (aarch64_print_operand, aarch64_print_address_internal)
31450 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
31451 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
31452 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
31453 Handle polynomial GET_MODE_SIZE.
31454 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
31455 wider than SImode without modification.
31456 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
31457 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
31458 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
31459 passing and returning SVE modes.
31460 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
31461 rather than GEN_INT.
31462 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
31463 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
31464 (aarch64_allocate_and_probe_stack_space): Likewise.
31465 (aarch64_layout_frame): Cope with polynomial offsets.
31466 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
31467 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
31468 polynomial offsets.
31469 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
31470 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
31471 poly_int64 rather than a HOST_WIDE_INT.
31472 (aarch64_get_separate_components, aarch64_process_components)
31473 (aarch64_expand_prologue, aarch64_expand_epilogue)
31474 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
31475 (aarch64_anchor_offset): New function, split out from...
31476 (aarch64_legitimize_address): ...here.
31477 (aarch64_builtin_vectorization_cost): Handle polynomial
31478 TYPE_VECTOR_SUBPARTS.
31479 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
31481 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
31482 number of elements from the PARALLEL rather than the mode.
31483 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
31484 rather than GET_MODE_BITSIZE.
31485 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
31486 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
31487 (aarch64_expand_vec_perm_const_1): Handle polynomial
31488 d->perm.length () and d->perm elements.
31489 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
31490 Apply to_constant to d->perm elements.
31491 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
31492 polynomial CONST_VECTOR_NUNITS.
31493 (aarch64_move_pointer): Take amount as a poly_int64 rather
31495 (aarch64_progress_pointer): Avoid temporary variable.
31496 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
31497 the mode attribute instead of GET_MODE.
31499 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31500 Alan Hayward <alan.hayward@arm.com>
31501 David Sherwood <david.sherwood@arm.com>
31503 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
31504 x exists before using it.
31505 (aarch64_add_constant_internal): Rename to...
31506 (aarch64_add_offset_1): ...this. Replace regnum with separate
31507 src and dest rtxes. Handle the case in which they're different,
31508 including when the offset is zero. Replace scratchreg with an rtx.
31509 Use 2 additions if there is no spare register into which we can
31510 move a 16-bit constant.
31511 (aarch64_add_constant): Delete.
31512 (aarch64_add_offset): Replace reg with separate src and dest
31513 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
31514 Use aarch64_add_offset_1.
31515 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
31516 an rtx rather than an int. Take the delta as a poly_int64
31517 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
31518 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
31519 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
31520 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
31521 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
31522 and aarch64_add_sp.
31523 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
31524 aarch64_add_constant.
31526 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31528 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
31529 Use scalar_float_mode.
31531 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31533 * config/aarch64/aarch64-simd.md
31534 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
31535 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
31536 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
31537 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
31538 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
31539 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
31540 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
31541 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
31542 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
31543 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
31545 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31548 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
31549 targ_options->x_arm_arch_string is non NULL.
31551 2018-01-11 Tamar Christina <tamar.christina@arm.com>
31553 * config/aarch64/aarch64.h
31554 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
31556 2018-01-11 Sudakshina Das <sudi.das@arm.com>
31559 * expmed.c (emit_store_flag_force): Swap if const op0
31560 and change VOIDmode to mode of op0.
31562 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31564 PR rtl-optimization/83761
31565 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
31566 than bytes to mode_for_size.
31568 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31570 PR middle-end/83189
31571 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
31572 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
31575 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31577 PR middle-end/83575
31578 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
31579 when in layout mode.
31580 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
31581 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
31584 2018-01-10 Michael Collison <michael.collison@arm.com>
31586 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
31587 * config/aarch64/aarch64-option-extension.def: Add
31588 AARCH64_OPT_EXTENSION of 'fp16fml'.
31589 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31590 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
31591 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
31592 * config/aarch64/constraints.md (Ui7): New constraint.
31593 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
31594 (VFMLA_SEL_W): Ditto.
31597 (VFMLA16_LOW): New int iterator.
31598 (VFMLA16_HIGH): Ditto.
31599 (UNSPEC_FMLAL): New unspec.
31600 (UNSPEC_FMLSL): Ditto.
31601 (UNSPEC_FMLAL2): Ditto.
31602 (UNSPEC_FMLSL2): Ditto.
31603 (f16mac): New code attribute.
31604 * config/aarch64/aarch64-simd-builtins.def
31605 (aarch64_fmlal_lowv2sf): Ditto.
31606 (aarch64_fmlsl_lowv2sf): Ditto.
31607 (aarch64_fmlalq_lowv4sf): Ditto.
31608 (aarch64_fmlslq_lowv4sf): Ditto.
31609 (aarch64_fmlal_highv2sf): Ditto.
31610 (aarch64_fmlsl_highv2sf): Ditto.
31611 (aarch64_fmlalq_highv4sf): Ditto.
31612 (aarch64_fmlslq_highv4sf): Ditto.
31613 (aarch64_fmlal_lane_lowv2sf): Ditto.
31614 (aarch64_fmlsl_lane_lowv2sf): Ditto.
31615 (aarch64_fmlal_laneq_lowv2sf): Ditto.
31616 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
31617 (aarch64_fmlalq_lane_lowv4sf): Ditto.
31618 (aarch64_fmlsl_lane_lowv4sf): Ditto.
31619 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
31620 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
31621 (aarch64_fmlal_lane_highv2sf): Ditto.
31622 (aarch64_fmlsl_lane_highv2sf): Ditto.
31623 (aarch64_fmlal_laneq_highv2sf): Ditto.
31624 (aarch64_fmlsl_laneq_highv2sf): Ditto.
31625 (aarch64_fmlalq_lane_highv4sf): Ditto.
31626 (aarch64_fmlsl_lane_highv4sf): Ditto.
31627 (aarch64_fmlalq_laneq_highv4sf): Ditto.
31628 (aarch64_fmlsl_laneq_highv4sf): Ditto.
31629 * config/aarch64/aarch64-simd.md:
31630 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
31631 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31632 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
31633 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31634 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
31635 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
31636 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
31637 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
31638 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
31639 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
31640 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
31641 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
31642 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
31643 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
31644 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
31645 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
31646 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
31647 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
31648 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
31649 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
31650 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
31651 (vfmlsl_low_u32): Ditto.
31652 (vfmlalq_low_u32): Ditto.
31653 (vfmlslq_low_u32): Ditto.
31654 (vfmlal_high_u32): Ditto.
31655 (vfmlsl_high_u32): Ditto.
31656 (vfmlalq_high_u32): Ditto.
31657 (vfmlslq_high_u32): Ditto.
31658 (vfmlal_lane_low_u32): Ditto.
31659 (vfmlsl_lane_low_u32): Ditto.
31660 (vfmlal_laneq_low_u32): Ditto.
31661 (vfmlsl_laneq_low_u32): Ditto.
31662 (vfmlalq_lane_low_u32): Ditto.
31663 (vfmlslq_lane_low_u32): Ditto.
31664 (vfmlalq_laneq_low_u32): Ditto.
31665 (vfmlslq_laneq_low_u32): Ditto.
31666 (vfmlal_lane_high_u32): Ditto.
31667 (vfmlsl_lane_high_u32): Ditto.
31668 (vfmlal_laneq_high_u32): Ditto.
31669 (vfmlsl_laneq_high_u32): Ditto.
31670 (vfmlalq_lane_high_u32): Ditto.
31671 (vfmlslq_lane_high_u32): Ditto.
31672 (vfmlalq_laneq_high_u32): Ditto.
31673 (vfmlslq_laneq_high_u32): Ditto.
31674 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
31675 (AARCH64_FL_FOR_ARCH8_4): New.
31676 (AARCH64_ISA_F16FML): New ISA flag.
31677 (TARGET_F16FML): New feature flag for fp16fml.
31678 (doc/invoke.texi): Document new fp16fml option.
31680 2018-01-10 Michael Collison <michael.collison@arm.com>
31682 * config/aarch64/aarch64-builtins.c:
31683 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
31684 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31685 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
31686 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
31687 (AARCH64_ISA_SHA3): New ISA flag.
31688 (TARGET_SHA3): New feature flag for sha3.
31689 * config/aarch64/iterators.md (sha512_op): New int attribute.
31690 (CRYPTO_SHA512): New int iterator.
31691 (UNSPEC_SHA512H): New unspec.
31692 (UNSPEC_SHA512H2): Ditto.
31693 (UNSPEC_SHA512SU0): Ditto.
31694 (UNSPEC_SHA512SU1): Ditto.
31695 * config/aarch64/aarch64-simd-builtins.def
31696 (aarch64_crypto_sha512hqv2di): New builtin.
31697 (aarch64_crypto_sha512h2qv2di): Ditto.
31698 (aarch64_crypto_sha512su0qv2di): Ditto.
31699 (aarch64_crypto_sha512su1qv2di): Ditto.
31700 (aarch64_eor3qv8hi): Ditto.
31701 (aarch64_rax1qv2di): Ditto.
31702 (aarch64_xarqv2di): Ditto.
31703 (aarch64_bcaxqv8hi): Ditto.
31704 * config/aarch64/aarch64-simd.md:
31705 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
31706 (aarch64_crypto_sha512su0qv2di): Ditto.
31707 (aarch64_crypto_sha512su1qv2di): Ditto.
31708 (aarch64_eor3qv8hi): Ditto.
31709 (aarch64_rax1qv2di): Ditto.
31710 (aarch64_xarqv2di): Ditto.
31711 (aarch64_bcaxqv8hi): Ditto.
31712 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
31713 (vsha512h2q_u64): Ditto.
31714 (vsha512su0q_u64): Ditto.
31715 (vsha512su1q_u64): Ditto.
31716 (veor3q_u16): Ditto.
31717 (vrax1q_u64): Ditto.
31718 (vxarq_u64): Ditto.
31719 (vbcaxq_u16): Ditto.
31720 * config/arm/types.md (crypto_sha512): New type attribute.
31721 (crypto_sha3): Ditto.
31722 (doc/invoke.texi): Document new sha3 option.
31724 2018-01-10 Michael Collison <michael.collison@arm.com>
31726 * config/aarch64/aarch64-builtins.c:
31727 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
31728 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31729 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
31730 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
31731 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
31732 (AARCH64_ISA_SM4): New ISA flag.
31733 (TARGET_SM4): New feature flag for sm4.
31734 * config/aarch64/aarch64-simd-builtins.def
31735 (aarch64_sm3ss1qv4si): Ditto.
31736 (aarch64_sm3tt1aq4si): Ditto.
31737 (aarch64_sm3tt1bq4si): Ditto.
31738 (aarch64_sm3tt2aq4si): Ditto.
31739 (aarch64_sm3tt2bq4si): Ditto.
31740 (aarch64_sm3partw1qv4si): Ditto.
31741 (aarch64_sm3partw2qv4si): Ditto.
31742 (aarch64_sm4eqv4si): Ditto.
31743 (aarch64_sm4ekeyqv4si): Ditto.
31744 * config/aarch64/aarch64-simd.md:
31745 (aarch64_sm3ss1qv4si): Ditto.
31746 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
31747 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
31748 (aarch64_sm4eqv4si): Ditto.
31749 (aarch64_sm4ekeyqv4si): Ditto.
31750 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
31751 (sm3part_op): Ditto.
31752 (CRYPTO_SM3TT): Ditto.
31753 (CRYPTO_SM3PART): Ditto.
31754 (UNSPEC_SM3SS1): New unspec.
31755 (UNSPEC_SM3TT1A): Ditto.
31756 (UNSPEC_SM3TT1B): Ditto.
31757 (UNSPEC_SM3TT2A): Ditto.
31758 (UNSPEC_SM3TT2B): Ditto.
31759 (UNSPEC_SM3PARTW1): Ditto.
31760 (UNSPEC_SM3PARTW2): Ditto.
31761 (UNSPEC_SM4E): Ditto.
31762 (UNSPEC_SM4EKEY): Ditto.
31763 * config/aarch64/constraints.md (Ui2): New constraint.
31764 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
31765 * config/arm/types.md (crypto_sm3): New type attribute.
31766 (crypto_sm4): Ditto.
31767 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
31768 (vsm3tt1aq_u32): Ditto.
31769 (vsm3tt1bq_u32): Ditto.
31770 (vsm3tt2aq_u32): Ditto.
31771 (vsm3tt2bq_u32): Ditto.
31772 (vsm3partw1q_u32): Ditto.
31773 (vsm3partw2q_u32): Ditto.
31774 (vsm4eq_u32): Ditto.
31775 (vsm4ekeyq_u32): Ditto.
31776 (doc/invoke.texi): Document new sm4 option.
31778 2018-01-10 Michael Collison <michael.collison@arm.com>
31780 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
31781 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
31782 (AARCH64_FL_FOR_ARCH8_4): New.
31783 (AARCH64_FL_V8_4): New flag.
31784 (doc/invoke.texi): Document new armv8.4-a option.
31786 2018-01-10 Michael Collison <michael.collison@arm.com>
31788 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31789 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
31790 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
31791 * config/aarch64/aarch64-option-extension.def: Add
31792 AARCH64_OPT_EXTENSION of 'sha2'.
31793 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
31794 (crypto): Disable sha2 and aes if crypto disabled.
31795 (crypto): Enable aes and sha2 if enabled.
31796 (simd): Disable sha2 and aes if simd disabled.
31797 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
31799 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
31800 (TARGET_SHA2): New feature flag for sha2.
31801 (TARGET_AES): New feature flag for aes.
31802 * config/aarch64/aarch64-simd.md:
31803 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
31804 conditional on TARGET_AES.
31805 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
31806 (aarch64_crypto_sha1hsi): Make pattern conditional
31808 (aarch64_crypto_sha1hv4si): Ditto.
31809 (aarch64_be_crypto_sha1hv4si): Ditto.
31810 (aarch64_crypto_sha1su1v4si): Ditto.
31811 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
31812 (aarch64_crypto_sha1su0v4si): Ditto.
31813 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
31814 (aarch64_crypto_sha256su0v4si): Ditto.
31815 (aarch64_crypto_sha256su1v4si): Ditto.
31816 (doc/invoke.texi): Document new aes and sha2 options.
31818 2018-01-10 Martin Sebor <msebor@redhat.com>
31820 PR tree-optimization/83781
31821 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
31824 2018-01-11 Martin Sebor <msebor@gmail.com>
31825 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31827 PR tree-optimization/83501
31828 PR tree-optimization/81703
31830 * tree-ssa-strlen.c (get_string_cst): Rename...
31831 (get_string_len): ...to this. Handle global constants.
31832 (handle_char_store): Adjust.
31834 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
31835 Jim Wilson <jimw@sifive.com>
31837 * config/riscv/riscv-protos.h (riscv_output_return): New.
31838 * config/riscv/riscv.c (struct machine_function): New naked_p field.
31839 (riscv_attribute_table, riscv_output_return),
31840 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
31841 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
31842 (riscv_compute_frame_info): Only compute frame->mask if not a naked
31844 (riscv_expand_prologue): Add early return for naked function.
31845 (riscv_expand_epilogue): Likewise.
31846 (riscv_function_ok_for_sibcall): Return false for naked function.
31847 (riscv_set_current_function): New.
31848 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
31849 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
31850 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
31851 * doc/extend.texi (RISC-V Function Attributes): New.
31853 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
31855 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
31856 check for 128-bit long double before checking TCmode.
31857 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
31858 128-bit long doubles before checking TFmode or TCmode.
31859 (FLOAT128_IBM_P): Likewise.
31861 2018-01-10 Martin Sebor <msebor@redhat.com>
31863 PR tree-optimization/83671
31864 * builtins.c (c_strlen): Unconditionally return zero for the empty
31866 Use -Warray-bounds for warnings.
31867 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
31868 for non-constant array indices with COMPONENT_REF, arrays of
31869 arrays, and pointers to arrays.
31870 (gimple_fold_builtin_strlen): Determine and set length range for
31871 non-constant character arrays.
31873 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
31875 PR middle-end/81897
31876 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
31879 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
31881 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
31883 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31886 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
31887 VECTOR_MEM_ALTIVEC_OR_VSX_P.
31888 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
31889 indexed_or_indirect_operand predicate.
31890 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
31891 (*vsx_le_perm_load_v8hi): Likewise.
31892 (*vsx_le_perm_load_v16qi): Likewise.
31893 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
31894 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
31895 (*vsx_le_perm_store_v8hi): Likewise.
31896 (*vsx_le_perm_store_v16qi): Likewise.
31897 (eight unnamed splitters): Likewise.
31899 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31901 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31902 * config/rs6000/emmintrin.h: Likewise.
31903 * config/rs6000/mmintrin.h: Likewise.
31904 * config/rs6000/xmmintrin.h: Likewise.
31906 2018-01-10 David Malcolm <dmalcolm@redhat.com>
31909 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31911 * tree.c (tree_nop_conversion): Return true for location wrapper
31913 (maybe_wrap_with_location): New function.
31914 (selftest::check_strip_nops): New function.
31915 (selftest::test_location_wrappers): New function.
31916 (selftest::tree_c_tests): Call it.
31917 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31918 (maybe_wrap_with_location): New decl.
31919 (EXPR_LOCATION_WRAPPER_P): New macro.
31920 (location_wrapper_p): New inline function.
31921 (tree_strip_any_location_wrapper): New inline function.
31923 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
31926 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31927 stack_realign_offset for the largest alignment of stack slot
31929 (ix86_find_max_used_stack_alignment): New function.
31930 (ix86_finalize_stack_frame_flags): Use it. Set
31931 max_used_stack_alignment if we don't realign stack.
31932 * config/i386/i386.h (machine_function): Add
31933 max_used_stack_alignment.
31935 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
31937 * config/arm/arm.opt (-mbranch-cost): New option.
31938 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31941 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
31944 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31945 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31947 2018-01-10 Richard Biener <rguenther@suse.de>
31950 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31951 early out so it also covers the case where we have a non-NULL
31954 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31956 PR tree-optimization/83753
31957 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31958 for non-strided grouped accesses if the number of elements is 1.
31960 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31963 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31964 * i386.h (TARGET_USE_GATHER): Define.
31965 * x86-tune.def (X86_TUNE_USE_GATHER): New.
31967 2018-01-10 Martin Liska <mliska@suse.cz>
31970 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31971 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31973 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31974 CLEANUP_NO_PARTITIONING is not set.
31976 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31978 * doc/rtl.texi: Remove documentation of (const ...) wrappers
31979 for vectors, as a partial revert of r254296.
31980 * rtl.h (const_vec_p): Delete.
31981 (const_vec_duplicate_p): Don't test for vector CONSTs.
31982 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31983 * expmed.c (make_tree): Likewise.
31986 * common.md (E, F): Use CONSTANT_P instead of checking for
31988 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31989 checking for CONST_VECTOR.
31991 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31993 PR middle-end/83575
31994 * predict.c (force_edge_cold): Handle in more sane way edges
31995 with no prediction.
31997 2018-01-09 Carl Love <cel@us.ibm.com>
31999 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
32001 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
32002 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
32003 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
32004 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
32005 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
32006 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
32007 * config/rs6000/rs6000-protos.h: Add extern defition for
32008 rs6000_generate_float2_double_code.
32009 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
32011 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
32012 (float2_v2df): Add define_expand.
32014 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
32017 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
32018 op_mode in the force_to_mode call.
32020 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32022 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
32023 instead of checking each element individually.
32024 (aarch64_evpc_uzp): Likewise.
32025 (aarch64_evpc_zip): Likewise.
32026 (aarch64_evpc_ext): Likewise.
32027 (aarch64_evpc_rev): Likewise.
32028 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
32029 instead of checking each element individually. Return true without
32031 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
32032 whether all selected elements come from the same input, instead of
32033 checking each element individually. Remove calls to gen_rtx_REG,
32034 start_sequence and end_sequence and instead assert that no rtl is
32037 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32039 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
32040 order of HIGH and CONST checks.
32042 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
32044 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
32045 if the destination isn't an SSA_NAME.
32047 2018-01-09 Richard Biener <rguenther@suse.de>
32049 PR tree-optimization/83668
32050 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
32052 (canonicalize_loop_form): ... here, renamed from ...
32053 (canonicalize_loop_closed_ssa_form): ... this and amended to
32054 swap successor edges for loop exit blocks to make us use
32055 the RPO order we need for initial schedule generation.
32057 2018-01-09 Joseph Myers <joseph@codesourcery.com>
32059 PR tree-optimization/64811
32060 * match.pd: When optimizing comparisons with Inf, avoid
32061 introducing or losing exceptions from comparisons with NaN.
32063 2018-01-09 Martin Liska <mliska@suse.cz>
32066 * asan.c (shadow_mem_size): Add gcc_assert.
32068 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
32070 Don't save registers in main().
32073 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
32074 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
32075 * config/avr/avr.c (avr_set_current_function): Don't error if
32076 naked, OS_task or OS_main are specified at the same time.
32077 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
32079 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
32081 * common/config/avr/avr-common.c (avr_option_optimization_table):
32082 Switch on -mmain-is-OS_task for optimizing compilations.
32084 2018-01-09 Richard Biener <rguenther@suse.de>
32086 PR tree-optimization/83572
32087 * graphite.c: Include cfganal.h.
32088 (graphite_transform_loops): Connect infinite loops to exit
32089 and remove fake edges at the end.
32091 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32093 * ipa-inline.c (edge_badness): Revert accidental checkin.
32095 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
32098 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
32099 symbols; not inline clones.
32101 2018-01-09 Jakub Jelinek <jakub@redhat.com>
32104 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
32105 hard registers. Formatting fixes.
32107 PR preprocessor/83722
32108 * gcc.c (try_generate_repro): Pass
32109 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
32110 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
32113 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
32114 Kito Cheng <kito.cheng@gmail.com>
32116 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
32117 (riscv_leaf_function_p): Delete.
32118 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
32120 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32122 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
32124 (do_ifelse): New function.
32125 (do_isel): New function.
32126 (do_sub3): New function.
32127 (do_add3): New function.
32128 (do_load_mask_compare): New function.
32129 (do_overlap_load_compare): New function.
32130 (expand_compare_loop): New function.
32131 (expand_block_compare): Call expand_compare_loop() when appropriate.
32132 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
32133 option description.
32134 (-mblock-compare-inline-loop-limit): New option.
32136 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
32139 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
32140 Reverse order of second and third operands in first alternative.
32141 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
32142 of first and second elements in UNSPEC_VPERMR vector.
32143 (altivec_expand_vec_perm_le): Likewise.
32145 2018-01-08 Jeff Law <law@redhat.com>
32147 PR rtl-optimizatin/81308
32148 * tree-switch-conversion.c (cfg_altered): New file scoped static.
32149 (process_switch): If group_case_labels makes a change, then set
32151 (pass_convert_switch::execute): If a switch is converted, then
32152 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
32154 PR rtl-optimization/81308
32155 * recog.c (split_all_insns): Conditionally cleanup the CFG after
32158 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
32160 PR target/83663 - Revert r255946
32161 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
32162 generation for cases where splatting a value is not useful.
32163 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
32164 across a vec_duplicate and a paradoxical subreg forming a vector
32165 mode to a vec_concat.
32167 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
32169 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
32170 -march=armv8.3-a variants.
32171 * config/arm/t-multilib: Likewise.
32172 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
32174 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32176 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
32178 (cceq_ior_compare_complement): Give it a name so I can use it, and
32179 change boolean_or_operator predicate to boolean_operator so it can
32180 be used to generate a crand.
32181 (eqne): New code iterator.
32182 (bd/bd_neg): New code_attrs.
32183 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
32184 a single define_insn.
32185 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
32186 decrement (bdnzt/bdnzf/bdzt/bdzf).
32187 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
32188 with the new names of the branch decrement patterns, and added the
32189 names of the branch decrement conditional patterns.
32191 2018-01-08 Richard Biener <rguenther@suse.de>
32193 PR tree-optimization/83563
32194 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
32197 2018-01-08 Richard Biener <rguenther@suse.de>
32199 PR middle-end/83713
32200 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
32202 2018-01-08 Richard Biener <rguenther@suse.de>
32204 PR tree-optimization/83685
32205 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
32206 references to abnormals.
32208 2018-01-08 Richard Biener <rguenther@suse.de>
32211 * dwarf2out.c (output_indirect_strings): Handle empty
32212 skeleton_debug_str_hash.
32213 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
32215 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32217 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
32218 (emit_store_direct): Likewise.
32219 (arc_trampoline_adjust_address): Likewise.
32220 (arc_asm_trampoline_template): New function.
32221 (arc_initialize_trampoline): Use asm_trampoline_template.
32222 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
32223 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
32224 * config/arc/arc.md (flush_icache): Delete pattern.
32226 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
32228 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
32229 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
32232 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32235 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
32236 by not USED_FOR_TARGET.
32237 (make_pass_resolve_sw_modes): Likewise.
32239 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
32241 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
32244 2018-01-08 Richard Biener <rguenther@suse.de>
32246 PR middle-end/83580
32247 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
32249 2018-01-08 Richard Biener <rguenther@suse.de>
32251 PR middle-end/83517
32252 * match.pd ((t * 2) / 2) -> t): Add missing :c.
32254 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
32256 PR middle-end/81897
32257 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
32258 basic blocks with a small number of successors.
32259 (convert_control_dep_chain_into_preds): Improve handling of
32261 (dump_predicates): Split apart into...
32262 (dump_pred_chain): ...here...
32263 (dump_pred_info): ...and here.
32264 (can_one_predicate_be_invalidated_p): Add debugging printfs.
32265 (can_chain_union_be_invalidated_p): Improve check for invalidation
32267 (uninit_uses_cannot_happen): Avoid unnecessary if
32268 convert_control_dep_chain_into_preds yielded nothing.
32270 2018-01-06 Martin Sebor <msebor@redhat.com>
32272 PR tree-optimization/83640
32273 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
32274 subtracting negative offset from size.
32275 (builtin_access::overlap): Adjust offset bounds of the access to fall
32276 within the size of the object if possible.
32278 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
32280 PR rtl-optimization/83699
32281 * expmed.c (extract_bit_field_1): Restrict the vector usage of
32282 extract_bit_field_as_subreg to cases in which the extracted
32283 value is also a vector.
32285 * lra-constraints.c (process_alt_operands): Test for the equivalence
32286 substitutions when detecting a possible reload cycle.
32288 2018-01-06 Jakub Jelinek <jakub@redhat.com>
32291 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
32292 by default if flag_selective_schedling{,2}. Formatting fixes.
32294 PR rtl-optimization/83682
32295 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
32296 if it has non-VECTOR_MODE element mode.
32297 (vec_duplicate_p): Likewise.
32299 PR middle-end/83694
32300 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
32301 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
32303 2018-01-05 Jakub Jelinek <jakub@redhat.com>
32306 * config/i386/i386-builtin.def
32307 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
32308 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
32309 Require also OPTION_MASK_ISA_AVX512F in addition to
32310 OPTION_MASK_ISA_GFNI.
32311 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
32312 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
32313 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
32314 to OPTION_MASK_ISA_GFNI.
32315 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
32316 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
32317 OPTION_MASK_ISA_AVX512BW.
32318 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
32319 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
32320 addition to OPTION_MASK_ISA_GFNI.
32321 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
32322 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
32323 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
32324 to OPTION_MASK_ISA_GFNI.
32325 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
32326 a requirement for all ISAs rather than any of them with a few
32328 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
32330 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
32331 bitmasks to be enabled with 3 exceptions, instead of requiring any
32332 enabled ISA with lots of exceptions.
32333 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
32334 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
32335 Change avx512bw in isa attribute to avx512f.
32336 * config/i386/sgxintrin.h: Add license boilerplate.
32337 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
32338 to __AVX512F__ and __AVX512VL to __AVX512VL__.
32339 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
32340 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
32342 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
32343 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
32344 temporarily sse2 rather than sse if not enabled already.
32347 * config/i386/sse.md (VI248_VLBW): Rename to ...
32348 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
32349 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
32350 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
32351 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
32352 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
32353 mode iterator instead of VI248_VLBW.
32355 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
32357 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
32358 (record_modified): Skip clobbers; add debug output.
32359 (param_change_prob): Use sreal frequencies.
32361 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
32363 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
32364 punt for user-aligned variables.
32366 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
32368 * tree-chrec.c (chrec_contains_symbols): Return true for
32371 2018-01-05 Sudakshina Das <sudi.das@arm.com>
32374 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
32375 of (x|y) == x for BICS pattern.
32377 2018-01-05 Jakub Jelinek <jakub@redhat.com>
32379 PR tree-optimization/83605
32380 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
32381 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
32384 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
32386 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
32387 * config/epiphany/rtems.h: New file.
32389 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32390 Uros Bizjak <ubizjak@gmail.com>
32393 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
32394 QIreg_operand instead of register_operand predicate.
32395 * config/i386/i386.c (ix86_rop_should_change_byte_p,
32396 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
32397 comments instead of -fmitigate[-_]rop.
32399 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
32402 * cgraphunit.c (symbol_table::compile): Switch to text_section
32403 before calling assembly_start debug hook.
32404 * run-rtl-passes.c (run_rtl_passes): Likewise.
32407 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32409 * tree-vrp.c (extract_range_from_binary_expr_1): Check
32410 range_int_cst_p rather than !symbolic_range_p before calling
32411 extract_range_from_multiplicative_op_1.
32413 2018-01-04 Jeff Law <law@redhat.com>
32415 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
32416 redundant test in assertion.
32418 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32420 * doc/rtl.texi: Document machine_mode wrapper classes.
32422 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32424 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
32425 using tree_to_uhwi.
32427 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32429 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
32430 the VEC_PERM_EXPR fold to fail.
32432 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32435 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
32436 to switched_sections.
32438 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32441 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
32442 test for d.testing.
32444 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
32447 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
32448 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
32450 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32453 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
32454 is BLKmode and bitpos not zero or mode change is needed.
32456 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32459 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
32462 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
32465 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
32466 instead of MULT rtx. Update all corresponding splitters.
32467 (*saddl_se): Ditto.
32468 (*ssub<modesuffix>): Ditto.
32469 (*ssubl_se): Ditto.
32470 (*cmp_sadd_di): Update split patterns.
32471 (*cmp_sadd_si): Ditto.
32472 (*cmp_sadd_sidi): Ditto.
32473 (*cmp_ssub_di): Ditto.
32474 (*cmp_ssub_si): Ditto.
32475 (*cmp_ssub_sidi): Ditto.
32476 * config/alpha/predicates.md (const23_operand): New predicate.
32477 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
32478 Look for ASHIFT, not MULT inner operand.
32479 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
32481 2018-01-04 Martin Liska <mliska@suse.cz>
32483 PR gcov-profile/83669
32484 * gcov.c (output_intermediate_file): Add version to intermediate
32486 * doc/gcov.texi: Document new field 'version' in intermediate
32487 file format. Fix location of '-k' option of gcov command.
32489 2018-01-04 Martin Liska <mliska@suse.cz>
32492 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
32494 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32496 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
32498 2018-01-03 Martin Sebor <msebor@redhat.com>
32500 PR tree-optimization/83655
32501 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
32502 checking calls with invalid arguments.
32504 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32506 * tree-vect-stmts.c (vect_get_store_rhs): New function.
32507 (vectorizable_mask_load_store): Delete.
32508 (vectorizable_call): Return false for masked loads and stores.
32509 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
32510 instead of gimple_assign_rhs1.
32511 (vectorizable_load): Handle IFN_MASK_LOAD.
32512 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
32514 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32516 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
32518 (vectorizable_mask_load_store): ...here.
32519 (vectorizable_load): ...and here.
32521 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32523 * tree-vect-stmts.c (vect_build_all_ones_mask)
32524 (vect_build_zero_merge_argument): New functions, split out from...
32525 (vectorizable_load): ...here.
32527 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32529 * tree-vect-stmts.c (vect_check_store_rhs): New function,
32531 (vectorizable_mask_load_store): ...here.
32532 (vectorizable_store): ...and here.
32534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32536 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
32538 (vectorizable_mask_load_store): ...here.
32540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32542 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
32543 (vect_model_store_cost): Take a vec_load_store_type instead of a
32545 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
32546 (vect_model_store_cost): Take a vec_load_store_type instead of a
32548 (vectorizable_mask_load_store): Update accordingly.
32549 (vectorizable_store): Likewise.
32550 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
32552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32554 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
32555 IFN_MASK_LOAD calls here rather than...
32556 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
32558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32559 Alan Hayward <alan.hayward@arm.com>
32560 David Sherwood <david.sherwood@arm.com>
32562 * expmed.c (extract_bit_field_1): For vector extracts,
32563 fall back to extract_bit_field_as_subreg if vec_extract
32566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32567 Alan Hayward <alan.hayward@arm.com>
32568 David Sherwood <david.sherwood@arm.com>
32570 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
32571 they are variable or constant sized.
32572 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
32573 slots for constant-sized data.
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 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
32580 handling COND_EXPRs with boolean comparisons, try to find a better
32581 basis for the mask type than the boolean itself.
32583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32585 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
32586 is calculated and how it can be overridden.
32587 * genmodes.c (max_bitsize_mode_any_mode): New variable.
32588 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
32590 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
32593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32594 Alan Hayward <alan.hayward@arm.com>
32595 David Sherwood <david.sherwood@arm.com>
32597 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
32598 Remove the mode argument.
32599 (aarch64_simd_valid_immediate): Remove the mode and inverse
32601 * config/aarch64/iterators.md (bitsize): New iterator.
32602 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
32603 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
32604 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
32605 aarch64_simd_valid_immediate.
32606 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
32607 (aarch64_reg_or_bic_imm): Likewise.
32608 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
32609 with an insn_type enum and msl with a modifier_type enum.
32610 Replace element_width with a scalar_mode. Change the shift
32611 to unsigned int. Add constructors for scalar_float_mode and
32612 scalar_int_mode elements.
32613 (aarch64_vect_float_const_representable_p): Delete.
32614 (aarch64_can_const_movi_rtx_p)
32615 (aarch64_simd_scalar_immediate_valid_for_move)
32616 (aarch64_simd_make_constant): Update call to
32617 aarch64_simd_valid_immediate.
32618 (aarch64_advsimd_valid_immediate_hs): New function.
32619 (aarch64_advsimd_valid_immediate): Likewise.
32620 (aarch64_simd_valid_immediate): Remove mode and inverse
32621 arguments. Rewrite to use the above. Use const_vec_duplicate_p
32622 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
32623 and aarch64_float_const_representable_p on the result.
32624 (aarch64_output_simd_mov_immediate): Remove mode argument.
32625 Update call to aarch64_simd_valid_immediate and use of
32626 simd_immediate_info.
32627 (aarch64_output_scalar_simd_mov_immediate): Update call
32630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32631 Alan Hayward <alan.hayward@arm.com>
32632 David Sherwood <david.sherwood@arm.com>
32634 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
32635 (mode_nunits): Likewise CONST_MODE_NUNITS.
32636 * machmode.def (ADJUST_NUNITS): Document.
32637 * genmodes.c (mode_data::need_nunits_adj): New field.
32638 (blank_mode): Update accordingly.
32639 (adj_nunits): New variable.
32640 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
32642 (emit_mode_size_inline): Set need_bytesize_adj for all modes
32643 listed in adj_nunits.
32644 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
32645 listed in adj_nunits. Don't emit case statements for such modes.
32646 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
32647 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
32648 nothing if adj_nunits is nonnull.
32649 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
32650 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
32651 (emit_mode_fbit): Update use of print_maybe_const_decl.
32652 (emit_move_size): Likewise. Treat the array as non-const
32654 (emit_mode_adjustments): Handle adj_nunits.
32656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32658 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
32659 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
32660 (VECTOR_MODES): Use it.
32661 (make_vector_modes): Take the prefix as an argument.
32663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32664 Alan Hayward <alan.hayward@arm.com>
32665 David Sherwood <david.sherwood@arm.com>
32667 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
32668 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
32669 for MODE_VECTOR_BOOL.
32670 * machmode.def (VECTOR_BOOL_MODE): Document.
32671 * genmodes.c (VECTOR_BOOL_MODE): New macro.
32672 (make_vector_bool_mode): New function.
32673 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
32675 * lto-streamer-in.c (lto_input_mode_table): Likewise.
32676 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
32678 * stor-layout.c (int_mode_for_mode): Likewise.
32679 * tree.c (build_vector_type_for_mode): Likewise.
32680 * varasm.c (output_constant_pool_2): Likewise.
32681 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
32682 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
32683 for MODE_VECTOR_BOOL.
32684 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
32685 of mode class checks.
32686 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
32687 instead of a list of mode class checks.
32688 (expand_vector_scalar_condition): Likewise.
32689 (type_for_widest_vector_mode): Handle BImode as an inner mode.
32691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32692 Alan Hayward <alan.hayward@arm.com>
32693 David Sherwood <david.sherwood@arm.com>
32695 * machmode.h (mode_size): Change from unsigned short to
32697 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
32698 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32699 or if measurement_type is not polynomial.
32700 (fixed_size_mode::includes_p): Check for constant-sized modes.
32701 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
32702 return a poly_uint16 rather than an unsigned short.
32703 (emit_mode_size): Change the type of mode_size from unsigned short
32704 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
32705 (emit_mode_adjustments): Cope with polynomial vector sizes.
32706 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32708 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32710 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
32711 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
32712 * caller-save.c (setup_save_areas): Likewise.
32713 (replace_reg_with_saved_mem): Likewise.
32714 * calls.c (emit_library_call_value_1): Likewise.
32715 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
32716 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
32717 (gen_lowpart_for_combine): Likewise.
32718 * convert.c (convert_to_integer_1): Likewise.
32719 * cse.c (equiv_constant, cse_insn): Likewise.
32720 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
32721 (cselib_subst_to_values): Likewise.
32722 * dce.c (word_dce_process_block): Likewise.
32723 * df-problems.c (df_word_lr_mark_ref): Likewise.
32724 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
32725 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
32726 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
32727 (rtl_for_decl_location): Likewise.
32728 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
32729 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
32730 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
32731 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
32732 (expand_expr_real_1): Likewise.
32733 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
32734 (pad_below): Likewise.
32735 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32736 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
32737 * ira.c (get_subreg_tracking_sizes): Likewise.
32738 * ira-build.c (ira_create_allocno_objects): Likewise.
32739 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
32740 (ira_sort_regnos_for_alter_reg): Likewise.
32741 * ira-costs.c (record_operand_costs): Likewise.
32742 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
32743 (resolve_simple_move): Likewise.
32744 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
32745 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
32746 (lra_constraints): Likewise.
32747 (CONST_POOL_OK_P): Reject variable-sized modes.
32748 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
32749 (add_pseudo_to_slot, lra_spill): Likewise.
32750 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32751 * optabs-query.c (get_best_extraction_insn): Likewise.
32752 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32753 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
32754 (expand_mult_highpart, valid_multiword_target_p): Likewise.
32755 * recog.c (offsettable_address_addr_space_p): Likewise.
32756 * regcprop.c (maybe_mode_change): Likewise.
32757 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
32758 * regrename.c (build_def_use): Likewise.
32759 * regstat.c (dump_reg_info): Likewise.
32760 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
32761 (find_reloads, find_reloads_subreg_address): Likewise.
32762 * reload1.c (eliminate_regs_1): Likewise.
32763 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
32764 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
32765 (simplify_binary_operation_1, simplify_subreg): Likewise.
32766 * targhooks.c (default_function_arg_padding): Likewise.
32767 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
32768 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
32769 (verify_gimple_assign_ternary): Likewise.
32770 * tree-inline.c (estimate_move_cost): Likewise.
32771 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32772 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
32773 (get_address_cost_ainc): Likewise.
32774 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32775 (vect_supportable_dr_alignment): Likewise.
32776 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32777 (vectorizable_reduction): Likewise.
32778 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
32779 (vectorizable_operation, vectorizable_load): Likewise.
32780 * tree.c (build_same_sized_truth_vector_type): Likewise.
32781 * valtrack.c (cleanup_auto_inc_dec): Likewise.
32782 * var-tracking.c (emit_note_insn_var_location): Likewise.
32783 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
32784 (ADDR_VEC_ALIGN): Likewise.
32786 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32787 Alan Hayward <alan.hayward@arm.com>
32788 David Sherwood <david.sherwood@arm.com>
32790 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
32792 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32793 or if measurement_type is polynomial.
32794 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
32795 * combine.c (make_extraction): Likewise.
32796 * dse.c (find_shift_sequence): Likewise.
32797 * dwarf2out.c (mem_loc_descriptor): Likewise.
32798 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
32799 (extract_bit_field, extract_low_bits): Likewise.
32800 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
32801 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
32802 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
32803 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
32804 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32805 * reload.c (find_reloads): Likewise.
32806 * reload1.c (alter_reg): Likewise.
32807 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
32808 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
32809 * tree-if-conv.c (predicate_mem_writes): Likewise.
32810 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
32811 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
32812 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
32813 * valtrack.c (dead_debug_insert_temp): Likewise.
32814 * varasm.c (mergeable_constant_section): Likewise.
32815 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
32817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32818 Alan Hayward <alan.hayward@arm.com>
32819 David Sherwood <david.sherwood@arm.com>
32821 * expr.c (expand_assignment): Cope with polynomial mode sizes
32822 when assigning to a CONCAT.
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 * machmode.h (mode_precision): Change from unsigned short to
32830 (mode_to_precision): Return a poly_uint16 rather than an unsigned
32832 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
32833 or if measurement_type is not polynomial.
32834 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
32835 in which the mode is already known to be a scalar_int_mode.
32836 * genmodes.c (emit_mode_precision): Change the type of mode_precision
32837 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
32839 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32840 for GET_MODE_PRECISION.
32841 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32842 for GET_MODE_PRECISION.
32843 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
32845 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
32846 (expand_field_assignment, make_extraction): Likewise.
32847 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
32848 (get_last_value): Likewise.
32849 * convert.c (convert_to_integer_1): Likewise.
32850 * cse.c (cse_insn): Likewise.
32851 * expr.c (expand_expr_real_1): Likewise.
32852 * lra-constraints.c (simplify_operand_subreg): Likewise.
32853 * optabs-query.c (can_atomic_load_p): Likewise.
32854 * optabs.c (expand_atomic_load): Likewise.
32855 (expand_atomic_store): Likewise.
32856 * ree.c (combine_reaching_defs): Likewise.
32857 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
32858 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
32859 * tree.h (type_has_mode_precision_p): Likewise.
32860 * ubsan.c (instrument_si_overflow): Likewise.
32862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32863 Alan Hayward <alan.hayward@arm.com>
32864 David Sherwood <david.sherwood@arm.com>
32866 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
32867 polynomial numbers of units.
32868 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
32869 (valid_vector_subparts_p): New function.
32870 (build_vector_type): Remove temporary shim and take the number
32871 of units as a poly_uint64 rather than an int.
32872 (build_opaque_vector_type): Take the number of units as a
32873 poly_uint64 rather than an int.
32874 * tree.c (build_vector_from_ctor): Handle polynomial
32875 TYPE_VECTOR_SUBPARTS.
32876 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
32877 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
32878 (build_vector_from_val): If the number of units is variable,
32879 use build_vec_duplicate_cst for constant operands and
32880 VEC_DUPLICATE_EXPR otherwise.
32881 (make_vector_type): Remove temporary is_constant ().
32882 (build_vector_type, build_opaque_vector_type): Take the number of
32883 units as a poly_uint64 rather than an int.
32884 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
32886 * cfgexpand.c (expand_debug_expr): Likewise.
32887 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
32888 (store_constructor, expand_expr_real_1): Likewise.
32889 (const_scalar_mask_from_tree): Likewise.
32890 * fold-const-call.c (fold_const_reduction): Likewise.
32891 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
32892 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
32893 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
32894 (fold_relational_const): Likewise.
32895 (native_interpret_vector): Likewise. Change the size from an
32896 int to an unsigned int.
32897 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
32898 TYPE_VECTOR_SUBPARTS.
32899 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
32900 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32901 duplicating a non-constant operand into a variable-length vector.
32902 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32903 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32904 * ipa-icf.c (sem_variable::equals): Likewise.
32905 * match.pd: Likewise.
32906 * omp-simd-clone.c (simd_clone_subparts): Likewise.
32907 * print-tree.c (print_node): Likewise.
32908 * stor-layout.c (layout_type): Likewise.
32909 * targhooks.c (default_builtin_vectorization_cost): Likewise.
32910 * tree-cfg.c (verify_gimple_comparison): Likewise.
32911 (verify_gimple_assign_binary): Likewise.
32912 (verify_gimple_assign_ternary): Likewise.
32913 (verify_gimple_assign_single): Likewise.
32914 * tree-pretty-print.c (dump_generic_node): Likewise.
32915 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32916 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32917 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32918 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32919 (vect_shift_permute_load_chain): Likewise.
32920 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32921 (expand_vector_condition, optimize_vector_constructor): Likewise.
32922 (lower_vec_perm, get_compute_type): Likewise.
32923 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32924 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32925 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32926 (vect_recog_mask_conversion_pattern): Likewise.
32927 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32928 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32929 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32930 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32931 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32932 (vectorizable_shift, vectorizable_operation, vectorizable_store)
32933 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32934 (supportable_widening_operation): Likewise.
32935 (supportable_narrowing_operation): Likewise.
32936 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32938 * varasm.c (output_constant): Likewise.
32940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32941 Alan Hayward <alan.hayward@arm.com>
32942 David Sherwood <david.sherwood@arm.com>
32944 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32945 so that both the length == 3 and length != 3 cases set up their
32946 own permute vectors. Add comments explaining why we know the
32947 number of elements is constant.
32948 (vect_permute_load_chain): Likewise.
32950 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32951 Alan Hayward <alan.hayward@arm.com>
32952 David Sherwood <david.sherwood@arm.com>
32954 * machmode.h (mode_nunits): Change from unsigned char to
32956 (ONLY_FIXED_SIZE_MODES): New macro.
32957 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32958 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32959 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32961 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32962 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32963 or if measurement_type is not polynomial.
32964 * genmodes.c (ZERO_COEFFS): New macro.
32965 (emit_mode_nunits_inline): Make mode_nunits_inline return a
32967 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32968 Use ZERO_COEFFS when emitting initializers.
32969 * data-streamer.h (bp_pack_poly_value): New function.
32970 (bp_unpack_poly_value): Likewise.
32971 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32972 for GET_MODE_NUNITS.
32973 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32974 for GET_MODE_NUNITS.
32975 * tree.c (make_vector_type): Remove temporary shim and make
32976 the real function take the number of units as a poly_uint64
32977 rather than an int.
32978 (build_vector_type_for_mode): Handle polynomial nunits.
32979 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32980 * emit-rtl.c (const_vec_series_p_1): Likewise.
32981 (gen_rtx_CONST_VECTOR): Likewise.
32982 * fold-const.c (test_vec_duplicate_folding): Likewise.
32983 * genrecog.c (validate_pattern): Likewise.
32984 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32985 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32986 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32987 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32988 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32989 * rtlanal.c (subreg_get_info): Likewise.
32990 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32991 (vect_grouped_load_supported): Likewise.
32992 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
32993 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
32994 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
32995 (simplify_const_unary_operation, simplify_binary_operation_1)
32996 (simplify_const_binary_operation, simplify_ternary_operation)
32997 (test_vector_ops_duplicate, test_vector_ops): Likewise.
32998 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
32999 instead of CONST_VECTOR_NUNITS.
33000 * varasm.c (output_constant_pool_2): Likewise.
33001 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
33002 explicit-encoded elements in the XVEC for variable-length vectors.
33004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33006 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
33008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33009 Alan Hayward <alan.hayward@arm.com>
33010 David Sherwood <david.sherwood@arm.com>
33012 * coretypes.h (fixed_size_mode): Declare.
33013 (fixed_size_mode_pod): New typedef.
33014 * builtins.h (target_builtins::x_apply_args_mode)
33015 (target_builtins::x_apply_result_mode): Change type to
33016 fixed_size_mode_pod.
33017 * builtins.c (apply_args_size, apply_result_size, result_vector)
33018 (expand_builtin_apply_args_1, expand_builtin_apply)
33019 (expand_builtin_return): Update accordingly.
33021 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33023 * cse.c (hash_rtx_cb): Hash only the encoded elements.
33024 * cselib.c (cselib_hash_rtx): Likewise.
33025 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
33026 CONST_VECTOR encoding.
33028 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33029 Jeff Law <law@redhat.com>
33032 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
33033 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
33034 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
33035 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
33038 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
33039 explicitly probe *sp in a noreturn function if there were any callee
33040 register saves or frame pointer is needed.
33042 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33045 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
33046 BLKmode for ternary, binary or unary expressions.
33049 * var-tracking.c (delete_vta_debug_insn): New inline function.
33050 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
33051 insns from get_insns () to NULL instead of each bb separately.
33052 Use delete_vta_debug_insn. No longer static.
33053 (vt_debug_insns_local, variable_tracking_main_1): Adjust
33054 delete_vta_debug_insns callers.
33055 * rtl.h (delete_vta_debug_insns): Declare.
33056 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
33057 instead of variable_tracking_main.
33059 2018-01-03 Martin Sebor <msebor@redhat.com>
33061 PR tree-optimization/83603
33062 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
33063 arguments past the endof the argument list in functions declared
33064 without a prototype.
33065 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
33066 Avoid checking when arguments are null.
33068 2018-01-03 Martin Sebor <msebor@redhat.com>
33071 * doc/extend.texi (attribute const): Fix a typo.
33072 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
33073 issuing -Wsuggest-attribute for void functions.
33075 2018-01-03 Martin Sebor <msebor@redhat.com>
33077 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
33078 offset_int::from instead of wide_int::to_shwi.
33079 (maybe_diag_overlap): Remove assertion.
33080 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
33081 * gimple-ssa-sprintf.c (format_directive): Same.
33082 (parse_directive): Same.
33083 (sprintf_dom_walker::compute_format_length): Same.
33084 (try_substitute_return_value): Same.
33086 2018-01-03 Jeff Law <law@redhat.com>
33088 PR middle-end/83654
33089 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
33090 non-constant residual for zero at runtime and avoid probing in
33091 that case. Reorganize code for trailing problem to mirror handling
33094 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
33096 PR tree-optimization/83501
33097 * tree-ssa-strlen.c (get_string_cst): New.
33098 (handle_char_store): Call get_string_cst.
33100 2018-01-03 Martin Liska <mliska@suse.cz>
33102 PR tree-optimization/83593
33103 * tree-ssa-strlen.c: Include tree-cfg.h.
33104 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
33105 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
33106 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
33108 (strlen_dom_walker::before_dom_children): Call
33109 gimple_purge_dead_eh_edges. Dump tranformation with details
33111 (strlen_dom_walker::before_dom_children): Update call by adding
33112 new argument cleanup_eh.
33113 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
33115 2018-01-03 Martin Liska <mliska@suse.cz>
33118 * cif-code.def (VARIADIC_THUNK): New enum value.
33119 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
33122 2018-01-03 Jan Beulich <jbeulich@suse.com>
33124 * sse.md (mov<mode>_internal): Tighten condition for when to use
33125 vmovdqu<ssescalarsize> for TI and OI modes.
33127 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33129 Update copyright years.
33131 2018-01-03 Martin Liska <mliska@suse.cz>
33134 * ipa-visibility.c (function_and_variable_visibility): Skip
33135 functions with noipa attribure.
33137 2018-01-03 Jakub Jelinek <jakub@redhat.com>
33139 * gcc.c (process_command): Update copyright notice dates.
33140 * gcov-dump.c (print_version): Ditto.
33141 * gcov.c (print_version): Ditto.
33142 * gcov-tool.c (print_version): Ditto.
33143 * gengtype.c (create_file): Ditto.
33144 * doc/cpp.texi: Bump @copying's copyright year.
33145 * doc/cppinternals.texi: Ditto.
33146 * doc/gcc.texi: Ditto.
33147 * doc/gccint.texi: Ditto.
33148 * doc/gcov.texi: Ditto.
33149 * doc/install.texi: Ditto.
33150 * doc/invoke.texi: Ditto.
33152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33154 * vector-builder.h (vector_builder::m_full_nelts): Change from
33155 unsigned int to poly_uint64.
33156 (vector_builder::full_nelts): Update prototype accordingly.
33157 (vector_builder::new_vector): Likewise.
33158 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
33159 (vector_builder::operator ==): Likewise.
33160 (vector_builder::finalize): Likewise.
33161 * int-vector-builder.h (int_vector_builder::int_vector_builder):
33162 Take the number of elements as a poly_uint64 rather than an
33164 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
33165 from unsigned int to poly_uint64.
33166 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
33167 (vec_perm_indices::new_vector): Likewise.
33168 (vec_perm_indices::length): Likewise.
33169 (vec_perm_indices::nelts_per_input): Likewise.
33170 (vec_perm_indices::input_nelts): Likewise.
33171 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
33172 number of elements per input as a poly_uint64 rather than an
33173 unsigned int. Use the original encoding for variable-length
33174 vectors, rather than clamping each individual element.
33175 For the second and subsequent elements in each pattern,
33176 clamp the step and base before clamping their sum.
33177 (vec_perm_indices::series_p): Handle polynomial element counts.
33178 (vec_perm_indices::all_in_range_p): Likewise.
33179 (vec_perm_indices_to_tree): Likewise.
33180 (vec_perm_indices_to_rtx): Likewise.
33181 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
33182 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
33183 (tree_vector_builder::new_binary_operation): Handle polynomial
33184 element counts. Return false if we need to know the number
33185 of elements at compile time.
33186 * fold-const.c (fold_vec_perm): Punt if the number of elements
33187 isn't known at compile time.
33189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33191 * vec-perm-indices.h (vec_perm_builder): Change element type
33192 from HOST_WIDE_INT to poly_int64.
33193 (vec_perm_indices::element_type): Update accordingly.
33194 (vec_perm_indices::clamp): Handle polynomial element_types.
33195 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33196 (vec_perm_indices::all_in_range_p): Likewise.
33197 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
33199 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
33200 polynomial vec_perm_indices element types.
33201 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
33202 * fold-const.c (fold_vec_perm): Likewise.
33203 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
33204 * tree-vect-generic.c (lower_vec_perm): Likewise.
33205 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33206 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
33207 element type to HOST_WIDE_INT.
33209 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33210 Alan Hayward <alan.hayward@arm.com>
33211 David Sherwood <david.sherwood@arm.com>
33213 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
33214 rather than an int. Use plus_constant.
33215 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
33216 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
33218 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33219 Alan Hayward <alan.hayward@arm.com>
33220 David Sherwood <david.sherwood@arm.com>
33222 * calls.c (emit_call_1, expand_call): Change struct_value_size from
33223 a HOST_WIDE_INT to a poly_int64.
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 * calls.c (load_register_parameters): Cope with polynomial
33230 mode sizes. Require a constant size for BLKmode parameters
33231 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
33232 forces a parameter to be padded at the lsb end in order to
33233 fill a complete number of words, require the parameter size
33234 to be ordered wrt UNITS_PER_WORD.
33236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33237 Alan Hayward <alan.hayward@arm.com>
33238 David Sherwood <david.sherwood@arm.com>
33240 * reload1.c (spill_stack_slot_width): Change element type
33241 from unsigned int to poly_uint64_pod.
33242 (alter_reg): Treat mode sizes as polynomial.
33244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33245 Alan Hayward <alan.hayward@arm.com>
33246 David Sherwood <david.sherwood@arm.com>
33248 * reload.c (complex_word_subreg_p): New function.
33249 (reload_inner_reg_of_subreg, push_reload): Use it.
33251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33252 Alan Hayward <alan.hayward@arm.com>
33253 David Sherwood <david.sherwood@arm.com>
33255 * lra-constraints.c (process_alt_operands): Reject matched
33256 operands whose sizes aren't ordered.
33257 (match_reload): Refer to this check here.
33259 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33260 Alan Hayward <alan.hayward@arm.com>
33261 David Sherwood <david.sherwood@arm.com>
33263 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
33264 that the mode size is in the set {1, 2, 4, 8, 16}.
33266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33267 Alan Hayward <alan.hayward@arm.com>
33268 David Sherwood <david.sherwood@arm.com>
33270 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
33271 Use plus_constant instead of gen_rtx_PLUS.
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 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
33278 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
33279 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
33280 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
33281 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
33282 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
33283 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
33284 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
33285 * config/i386/i386.c (ix86_push_rounding): ...this new function.
33286 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
33288 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
33289 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
33290 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
33291 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
33292 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
33293 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
33294 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
33295 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
33296 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
33297 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
33299 * expr.c (emit_move_resolve_push): Treat the input and result
33300 of PUSH_ROUNDING as a poly_int64.
33301 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
33302 (emit_push_insn): Likewise.
33303 * lra-eliminations.c (mark_not_eliminable): Likewise.
33304 * recog.c (push_operand): Likewise.
33305 * reload1.c (elimination_effects): Likewise.
33306 * rtlanal.c (nonzero_bits1): Likewise.
33307 * calls.c (store_one_arg): Likewise. Require the padding to be
33308 known at compile time.
33310 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33311 Alan Hayward <alan.hayward@arm.com>
33312 David Sherwood <david.sherwood@arm.com>
33314 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
33315 Use plus_constant instead of gen_rtx_PLUS.
33317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33318 Alan Hayward <alan.hayward@arm.com>
33319 David Sherwood <david.sherwood@arm.com>
33321 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
33322 rather than an int.
33324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33325 Alan Hayward <alan.hayward@arm.com>
33326 David Sherwood <david.sherwood@arm.com>
33328 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
33329 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
33330 via stack temporaries. Treat the mode size as polynomial too.
33332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33333 Alan Hayward <alan.hayward@arm.com>
33334 David Sherwood <david.sherwood@arm.com>
33336 * expr.c (expand_expr_real_2): When handling conversions involving
33337 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
33338 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
33339 as a poly_uint64 too.
33341 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33342 Alan Hayward <alan.hayward@arm.com>
33343 David Sherwood <david.sherwood@arm.com>
33345 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
33347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33348 Alan Hayward <alan.hayward@arm.com>
33349 David Sherwood <david.sherwood@arm.com>
33351 * combine.c (can_change_dest_mode): Handle polynomial
33352 REGMODE_NATURAL_SIZE.
33353 * expmed.c (store_bit_field_1): Likewise.
33354 * expr.c (store_constructor): Likewise.
33355 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
33356 and polynomial REGMODE_NATURAL_SIZE.
33357 (gen_lowpart_common): Likewise.
33358 * reginfo.c (record_subregs_of_mode): Likewise.
33359 * rtlanal.c (read_modify_subreg_p): Likewise.
33361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33362 Alan Hayward <alan.hayward@arm.com>
33363 David Sherwood <david.sherwood@arm.com>
33365 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
33366 numbers of elements.
33368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33369 Alan Hayward <alan.hayward@arm.com>
33370 David Sherwood <david.sherwood@arm.com>
33372 * match.pd: Cope with polynomial numbers of vector elements.
33374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33375 Alan Hayward <alan.hayward@arm.com>
33376 David Sherwood <david.sherwood@arm.com>
33378 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
33379 in a POINTER_PLUS_EXPR.
33381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33382 Alan Hayward <alan.hayward@arm.com>
33383 David Sherwood <david.sherwood@arm.com>
33385 * omp-simd-clone.c (simd_clone_subparts): New function.
33386 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
33387 (ipa_simd_modify_function_body): Likewise.
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 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
33394 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
33395 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
33396 (expand_vector_condition, vector_element): Likewise.
33397 (subparts_gt): New function.
33398 (get_compute_type): Use subparts_gt.
33399 (count_type_subparts): Delete.
33400 (expand_vector_operations_1): Use subparts_gt instead of
33401 count_type_subparts.
33403 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33404 Alan Hayward <alan.hayward@arm.com>
33405 David Sherwood <david.sherwood@arm.com>
33407 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
33408 (vect_compile_time_alias): ...this new function. Do the calculation
33409 on poly_ints rather than trees.
33410 (vect_prune_runtime_alias_test_list): Update call accordingly.
33412 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33413 Alan Hayward <alan.hayward@arm.com>
33414 David Sherwood <david.sherwood@arm.com>
33416 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
33418 (vect_schedule_slp_instance): Likewise.
33420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33421 Alan Hayward <alan.hayward@arm.com>
33422 David Sherwood <david.sherwood@arm.com>
33424 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
33425 constant and extern definitions for variable-length vectors.
33426 (vect_get_constant_vectors): Note that the number of units
33427 is known to be constant.
33429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33430 Alan Hayward <alan.hayward@arm.com>
33431 David Sherwood <david.sherwood@arm.com>
33433 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
33434 of units as polynomial. Choose between WIDE and NARROW based
33437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33438 Alan Hayward <alan.hayward@arm.com>
33439 David Sherwood <david.sherwood@arm.com>
33441 * tree-vect-stmts.c (simd_clone_subparts): New function.
33442 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
33444 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33445 Alan Hayward <alan.hayward@arm.com>
33446 David Sherwood <david.sherwood@arm.com>
33448 * tree-vect-stmts.c (vectorizable_call): Treat the number of
33449 vectors as polynomial. Use build_index_vector for
33450 IFN_GOMP_SIMD_LANE.
33452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33453 Alan Hayward <alan.hayward@arm.com>
33454 David Sherwood <david.sherwood@arm.com>
33456 * tree-vect-stmts.c (get_load_store_type): Treat the number of
33457 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
33458 for variable-length vectors.
33459 (vectorizable_mask_load_store): Treat the number of units as
33460 polynomial, asserting that it is constant if the condition has
33461 already been enforced.
33462 (vectorizable_store, vectorizable_load): Likewise.
33464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33465 Alan Hayward <alan.hayward@arm.com>
33466 David Sherwood <david.sherwood@arm.com>
33468 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
33469 of units as polynomial. Punt if we can't tell at compile time
33470 which vector contains the final result.
33472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33473 Alan Hayward <alan.hayward@arm.com>
33474 David Sherwood <david.sherwood@arm.com>
33476 * tree-vect-loop.c (vectorizable_induction): Treat the number
33477 of units as polynomial. Punt on SLP inductions. Use an integer
33478 VEC_SERIES_EXPR for variable-length integer reductions. Use a
33479 cast of such a series for variable-length floating-point
33482 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33483 Alan Hayward <alan.hayward@arm.com>
33484 David Sherwood <david.sherwood@arm.com>
33486 * tree.h (build_index_vector): Declare.
33487 * tree.c (build_index_vector): New function.
33488 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
33489 of units as polynomial, forcibly converting it to a constant if
33490 vectorizable_reduction has already enforced the condition.
33491 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
33492 to create a {1,2,3,...} vector.
33493 (vectorizable_reduction): Treat the number of units as polynomial.
33494 Choose vectype_in based on the largest scalar element size rather
33495 than the smallest number of units. Enforce the restrictions
33498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33499 Alan Hayward <alan.hayward@arm.com>
33500 David Sherwood <david.sherwood@arm.com>
33502 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
33503 number of units as polynomial.
33505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33506 Alan Hayward <alan.hayward@arm.com>
33507 David Sherwood <david.sherwood@arm.com>
33509 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
33510 * target.def (autovectorize_vector_sizes): Return the vector sizes
33511 by pointer, using vector_sizes rather than a bitmask.
33512 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
33513 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
33514 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
33516 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
33517 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
33518 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
33519 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
33520 * omp-general.c (omp_max_vf): Likewise.
33521 * omp-low.c (omp_clause_aligned_alignment): Likewise.
33522 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
33523 * tree-vect-loop.c (vect_analyze_loop): Likewise.
33524 * tree-vect-slp.c (vect_slp_bb): Likewise.
33525 * doc/tm.texi: Regenerate.
33526 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
33528 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
33529 the vector size as a poly_uint64 rather than an unsigned int.
33530 (current_vector_size): Change from an unsigned int to a poly_uint64.
33531 (get_vectype_for_scalar_type): Update accordingly.
33532 * tree.h (build_truth_vector_type): Take the size and number of
33533 units as a poly_uint64 rather than an unsigned int.
33534 (build_vector_type): Add a temporary overload that takes
33535 the number of units as a poly_uint64 rather than an unsigned int.
33536 * tree.c (make_vector_type): Likewise.
33537 (build_truth_vector_type): Take the number of units as a poly_uint64
33538 rather than an unsigned int.
33540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33541 Alan Hayward <alan.hayward@arm.com>
33542 David Sherwood <david.sherwood@arm.com>
33544 * target.def (get_mask_mode): Take the number of units and length
33545 as poly_uint64s rather than unsigned ints.
33546 * targhooks.h (default_get_mask_mode): Update accordingly.
33547 * targhooks.c (default_get_mask_mode): Likewise.
33548 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
33549 * doc/tm.texi: Regenerate.
33551 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33552 Alan Hayward <alan.hayward@arm.com>
33553 David Sherwood <david.sherwood@arm.com>
33555 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
33556 * omp-general.c (omp_max_vf): Likewise.
33557 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
33558 (expand_omp_simd): Handle polynomial safelen.
33559 * omp-low.c (omplow_simd_context): Add a default constructor.
33560 (omplow_simd_context::max_vf): Change from int to poly_uint64.
33561 (lower_rec_simd_input_clauses): Update accordingly.
33562 (lower_rec_input_clauses): Likewise.
33564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33565 Alan Hayward <alan.hayward@arm.com>
33566 David Sherwood <david.sherwood@arm.com>
33568 * tree-vectorizer.h (vect_nunits_for_cost): New function.
33569 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
33570 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
33571 (vect_analyze_slp_cost): Likewise.
33572 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
33573 (vect_model_load_cost): Likewise.
33575 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33576 Alan Hayward <alan.hayward@arm.com>
33577 David Sherwood <david.sherwood@arm.com>
33579 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
33580 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
33581 from an unsigned int * to a poly_uint64_pod *.
33582 (calculate_unrolling_factor): New function.
33583 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
33585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33586 Alan Hayward <alan.hayward@arm.com>
33587 David Sherwood <david.sherwood@arm.com>
33589 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
33590 from an unsigned int to a poly_uint64.
33591 (_loop_vec_info::slp_unrolling_factor): Likewise.
33592 (_loop_vec_info::vectorization_factor): Change from an int
33594 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
33595 (vect_get_num_vectors): New function.
33596 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
33597 (vect_get_num_copies): Use vect_get_num_vectors.
33598 (vect_analyze_data_ref_dependences): Change max_vf from an int *
33599 to an unsigned int *.
33600 (vect_analyze_data_refs): Change min_vf from an int * to a
33602 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33603 than an unsigned HOST_WIDE_INT.
33604 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
33605 (vect_analyze_data_ref_dependence): Change max_vf from an int *
33606 to an unsigned int *.
33607 (vect_analyze_data_ref_dependences): Likewise.
33608 (vect_compute_data_ref_alignment): Handle polynomial vf.
33609 (vect_enhance_data_refs_alignment): Likewise.
33610 (vect_prune_runtime_alias_test_list): Likewise.
33611 (vect_shift_permute_load_chain): Likewise.
33612 (vect_supportable_dr_alignment): Likewise.
33613 (dependence_distance_ge_vf): Take the vectorization factor as a
33614 poly_uint64 rather than an unsigned HOST_WIDE_INT.
33615 (vect_analyze_data_refs): Change min_vf from an int * to a
33617 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
33618 vfm1 as a poly_uint64 rather than an int. Make the same change
33619 for the returned bound_scalar.
33620 (vect_gen_vector_loop_niters): Handle polynomial vf.
33621 (vect_do_peeling): Likewise. Update call to
33622 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
33623 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
33625 * tree-vect-loop.c (vect_determine_vectorization_factor)
33626 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
33627 (vect_get_known_peeling_cost): Likewise.
33628 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
33629 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
33630 (vect_transform_loop): Likewise. Use the lowest possible VF when
33631 updating the upper bounds of the loop.
33632 (vect_min_worthwhile_factor): Make static. Return an unsigned int
33633 rather than an int.
33634 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
33635 polynomial unroll factors.
33636 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
33637 (vect_make_slp_decision): Likewise.
33638 (vect_supported_load_permutation_p): Likewise, and polynomial
33640 (vect_analyze_slp_cost): Handle polynomial vf.
33641 (vect_slp_analyze_node_operations): Likewise.
33642 (vect_slp_analyze_bb_1): Likewise.
33643 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33644 than an unsigned HOST_WIDE_INT.
33645 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
33646 (vectorizable_load): Handle polynomial vf.
33647 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
33649 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
33651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33652 Alan Hayward <alan.hayward@arm.com>
33653 David Sherwood <david.sherwood@arm.com>
33655 * match.pd: Handle bit operations involving three constants
33656 and try to fold one pair.
33658 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33660 * tree-vect-loop-manip.c: Include gimple-fold.h.
33661 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
33662 niters_maybe_zero parameters. Handle other cases besides a step of 1.
33663 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
33664 Add a path that uses a step of VF instead of 1, but disable it
33666 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
33667 and niters_no_overflow parameters. Update calls to
33668 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
33669 Create a new SSA name if the latter choses to use a ste other
33670 than zero, and return it via niters_vector_mult_vf_var.
33671 * tree-vect-loop.c (vect_transform_loop): Update calls to
33672 vect_do_peeling, vect_gen_vector_loop_niters and
33673 slpeel_make_loop_iterate_ntimes.
33674 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
33675 (vect_gen_vector_loop_niters): Update declarations after above changes.
33677 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
33679 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
33680 128-bit round to integer instructions.
33681 (ceil<mode>2): Likewise.
33682 (btrunc<mode>2): Likewise.
33683 (round<mode>2): Likewise.
33685 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33687 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
33688 unaligned VSX load/store on P8/P9.
33689 (expand_block_clear): Allow the use of unaligned VSX
33690 load/store on P8/P9.
33692 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33694 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
33696 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
33697 swap associated with both a load and a store.
33699 2018-01-02 Andrew Waterman <andrew@sifive.com>
33701 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
33702 * config/riscv/riscv.md (clear_cache): Use it.
33704 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
33706 * web.c: Remove out-of-date comment.
33708 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33710 * expr.c (fixup_args_size_notes): Check that any existing
33711 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
33712 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
33713 (emit_single_push_insn): ...here.
33715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33717 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
33718 (const_vector_encoded_nelts): New function.
33719 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
33720 (const_vector_int_elt, const_vector_elt): Declare.
33721 * emit-rtl.c (const_vector_int_elt_1): New function.
33722 (const_vector_elt): Likewise.
33723 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
33724 of CONST_VECTOR_ELT.
33726 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33728 * expr.c: Include rtx-vector-builder.h.
33729 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
33730 directly on the tree encoding.
33731 (const_vector_from_tree): Likewise.
33732 * optabs.c: Include rtx-vector-builder.h.
33733 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
33734 sequence of "u" values.
33735 * vec-perm-indices.c: Include rtx-vector-builder.h.
33736 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
33737 directly on the vec_perm_indices encoding.
33739 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33741 * doc/rtl.texi (const_vector): Describe new encoding scheme.
33742 * Makefile.in (OBJS): Add rtx-vector-builder.o.
33743 * rtx-vector-builder.h: New file.
33744 * rtx-vector-builder.c: Likewise.
33745 * rtl.h (rtx_def::u2): Add a const_vector field.
33746 (CONST_VECTOR_NPATTERNS): New macro.
33747 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
33748 (CONST_VECTOR_DUPLICATE_P): Likewise.
33749 (CONST_VECTOR_STEPPED_P): Likewise.
33750 (CONST_VECTOR_ENCODED_ELT): Likewise.
33751 (const_vec_duplicate_p): Check for a duplicated vector encoding.
33752 (unwrap_const_vec_duplicate): Likewise.
33753 (const_vec_series_p): Check for a non-duplicated vector encoding.
33754 Say that the function only returns true for integer vectors.
33755 * emit-rtl.c: Include rtx-vector-builder.h.
33756 (gen_const_vec_duplicate_1): Delete.
33757 (gen_const_vector): Call gen_const_vec_duplicate instead of
33758 gen_const_vec_duplicate_1.
33759 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
33760 (gen_const_vec_duplicate): Use rtx_vector_builder.
33761 (gen_const_vec_series): Likewise.
33762 (gen_rtx_CONST_VECTOR): Likewise.
33763 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
33764 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33765 Build a new vector rather than modifying a CONST_VECTOR in-place.
33766 (handle_special_swappables): Update call accordingly.
33767 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
33768 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33769 Build a new vector rather than modifying a CONST_VECTOR in-place.
33770 (handle_special_swappables): Update call accordingly.
33772 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33774 * simplify-rtx.c (simplify_const_binary_operation): Use
33775 CONST_VECTOR_ELT instead of XVECEXP.
33777 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33779 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
33780 the selector elements to be different from the data elements
33781 if the selector is a VECTOR_CST.
33782 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
33783 ssizetype for the selector.
33785 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33787 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
33788 before testing each element individually.
33789 * tree-vect-generic.c (lower_vec_perm): Likewise.
33791 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33793 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
33794 * selftest-run-tests.c (selftest::run_tests): Call it.
33795 * vector-builder.h (vector_builder::operator ==): New function.
33796 (vector_builder::operator !=): Likewise.
33797 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
33798 (vec_perm_indices::all_from_input_p): New function.
33799 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33800 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
33801 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
33802 instead of reading the VECTOR_CST directly. Detect whether both
33803 vector inputs are the same before constructing the vec_perm_indices,
33804 and update the number of inputs argument accordingly. Use the
33805 utility functions added above. Only construct sel2 if we need to.
33807 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33809 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
33810 the broadcast of the low byte.
33811 (expand_mult_highpart): Use an explicit encoding for the permutes.
33812 * optabs-query.c (can_mult_highpart_p): Likewise.
33813 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
33814 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33815 (vectorizable_bswap): Likewise.
33816 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
33817 explicit encoding for the power-of-2 permutes.
33818 (vect_permute_store_chain): Likewise.
33819 (vect_grouped_load_supported): Likewise.
33820 (vect_permute_load_chain): Likewise.
33822 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33824 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
33825 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
33826 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
33827 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33828 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
33829 (vect_gen_perm_mask_any): Likewise.
33831 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33833 * int-vector-builder.h: New file.
33834 * vec-perm-indices.h: Include int-vector-builder.h.
33835 (vec_perm_indices): Redefine as an int_vector_builder.
33836 (auto_vec_perm_indices): Delete.
33837 (vec_perm_builder): Redefine as a stand-alone class.
33838 (vec_perm_indices::vec_perm_indices): New function.
33839 (vec_perm_indices::clamp): Likewise.
33840 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
33841 (vec_perm_indices::new_vector): New function.
33842 (vec_perm_indices::new_expanded_vector): Update for new
33843 vec_perm_indices class.
33844 (vec_perm_indices::rotate_inputs): New function.
33845 (vec_perm_indices::all_in_range_p): Operate directly on the
33846 encoded form, without computing elided elements.
33847 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
33848 encoding. Update for new vec_perm_indices class.
33849 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
33850 the given vec_perm_builder.
33851 (expand_vec_perm_var): Update vec_perm_builder constructor.
33852 (expand_mult_highpart): Use vec_perm_builder instead of
33853 auto_vec_perm_indices.
33854 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
33855 vec_perm_indices instead of auto_vec_perm_indices. Use a single
33856 or double series encoding as appropriate.
33857 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
33858 vec_perm_indices instead of auto_vec_perm_indices.
33859 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33860 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33861 (vect_permute_store_chain): Likewise.
33862 (vect_grouped_load_supported): Likewise.
33863 (vect_permute_load_chain): Likewise.
33864 (vect_shift_permute_load_chain): Likewise.
33865 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33866 (vect_transform_slp_perm_load): Likewise.
33867 (vect_schedule_slp_instance): Likewise.
33868 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33869 (vectorizable_mask_load_store): Likewise.
33870 (vectorizable_bswap): Likewise.
33871 (vectorizable_store): Likewise.
33872 (vectorizable_load): Likewise.
33873 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
33874 vec_perm_indices instead of auto_vec_perm_indices. Use
33875 tree_to_vec_perm_builder to read the vector from a tree.
33876 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
33877 vec_perm_builder instead of a vec_perm_indices.
33878 (have_whole_vector_shift): Use vec_perm_builder and
33879 vec_perm_indices instead of auto_vec_perm_indices. Leave the
33880 truncation to calc_vec_perm_mask_for_shift.
33881 (vect_create_epilog_for_reduction): Likewise.
33882 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
33883 from auto_vec_perm_indices to vec_perm_indices.
33884 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33885 instead of changing individual elements.
33886 (aarch64_vectorize_vec_perm_const): Use new_vector to install
33887 the vector in d.perm.
33888 * config/arm/arm.c (expand_vec_perm_d::perm): Change
33889 from auto_vec_perm_indices to vec_perm_indices.
33890 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33891 instead of changing individual elements.
33892 (arm_vectorize_vec_perm_const): Use new_vector to install
33893 the vector in d.perm.
33894 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
33895 Update vec_perm_builder constructor.
33896 (rs6000_expand_interleave): Likewise.
33897 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
33898 (rs6000_expand_interleave): Likewise.
33900 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33902 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33903 to qimode could truncate the indices.
33904 * optabs.c (expand_vec_perm_var): Likewise.
33906 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33908 * Makefile.in (OBJS): Add vec-perm-indices.o.
33909 * vec-perm-indices.h: New file.
33910 * vec-perm-indices.c: Likewise.
33911 * target.h (vec_perm_indices): Replace with a forward class
33913 (auto_vec_perm_indices): Move to vec-perm-indices.h.
33914 * optabs.h: Include vec-perm-indices.h.
33915 (expand_vec_perm): Delete.
33916 (selector_fits_mode_p, expand_vec_perm_var): Declare.
33917 (expand_vec_perm_const): Declare.
33918 * target.def (vec_perm_const_ok): Replace with...
33919 (vec_perm_const): ...this new hook.
33920 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33921 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33922 * doc/tm.texi: Regenerate.
33923 * optabs.def (vec_perm_const): Delete.
33924 * doc/md.texi (vec_perm_const): Likewise.
33925 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33926 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33927 expand_vec_perm for constant permutation vectors. Assert that
33928 the mode of variable permutation vectors is the integer equivalent
33929 of the mode that is being permuted.
33930 * optabs-query.h (selector_fits_mode_p): Declare.
33931 * optabs-query.c: Include vec-perm-indices.h.
33932 (selector_fits_mode_p): New function.
33933 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33934 is defined, instead of checking whether the vec_perm_const_optab
33935 exists. Use targetm.vectorize.vec_perm_const instead of
33936 targetm.vectorize.vec_perm_const_ok. Check whether the indices
33937 fit in the vector mode before using a variable permute.
33938 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33939 vec_perm_indices instead of an rtx.
33940 (expand_vec_perm): Replace with...
33941 (expand_vec_perm_const): ...this new function. Take the selector
33942 as a vec_perm_indices rather than an rtx. Also take the mode of
33943 the selector. Update call to shift_amt_for_vec_perm_mask.
33944 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33945 Use vec_perm_indices::new_expanded_vector to expand the original
33946 selector into bytes. Check whether the indices fit in the vector
33947 mode before using a variable permute.
33948 (expand_vec_perm_var): Make global.
33949 (expand_mult_highpart): Use expand_vec_perm_const.
33950 * fold-const.c: Includes vec-perm-indices.h.
33951 * tree-ssa-forwprop.c: Likewise.
33952 * tree-vect-data-refs.c: Likewise.
33953 * tree-vect-generic.c: Likewise.
33954 * tree-vect-loop.c: Likewise.
33955 * tree-vect-slp.c: Likewise.
33956 * tree-vect-stmts.c: Likewise.
33957 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33959 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33960 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33961 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33962 (aarch64_vectorize_vec_perm_const): ...this new function.
33963 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33964 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33965 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33966 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33967 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33968 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33969 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33971 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
33972 check for NEON modes.
33973 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33974 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33975 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33976 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33978 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
33979 the old VEC_PERM_CONST conditions.
33980 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33981 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33982 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33983 (ia64_vectorize_vec_perm_const_ok): Merge into...
33984 (ia64_vectorize_vec_perm_const): ...this new function.
33985 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33986 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33987 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33988 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33989 * config/mips/mips.c (mips_expand_vec_perm_const)
33990 (mips_vectorize_vec_perm_const_ok): Merge into...
33991 (mips_vectorize_vec_perm_const): ...this new function.
33992 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
33993 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
33994 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
33995 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
33996 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
33997 (rs6000_expand_vec_perm_const): Delete.
33998 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
34000 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34001 (altivec_expand_vec_perm_const_le): Take each operand individually.
34002 Operate on constant selectors rather than rtxes.
34003 (altivec_expand_vec_perm_const): Likewise. Update call to
34004 altivec_expand_vec_perm_const_le.
34005 (rs6000_expand_vec_perm_const): Delete.
34006 (rs6000_vectorize_vec_perm_const_ok): Delete.
34007 (rs6000_vectorize_vec_perm_const): New function.
34008 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34009 an element count and rtx array.
34010 (rs6000_expand_extract_even): Update call accordingly.
34011 (rs6000_expand_interleave): Likewise.
34012 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
34013 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
34014 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
34015 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
34016 (rs6000_expand_vec_perm_const): Delete.
34017 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
34018 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34019 (altivec_expand_vec_perm_const_le): Take each operand individually.
34020 Operate on constant selectors rather than rtxes.
34021 (altivec_expand_vec_perm_const): Likewise. Update call to
34022 altivec_expand_vec_perm_const_le.
34023 (rs6000_expand_vec_perm_const): Delete.
34024 (rs6000_vectorize_vec_perm_const_ok): Delete.
34025 (rs6000_vectorize_vec_perm_const): New function. Remove stray
34026 reference to the SPE evmerge intructions.
34027 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
34028 an element count and rtx array.
34029 (rs6000_expand_extract_even): Update call accordingly.
34030 (rs6000_expand_interleave): Likewise.
34031 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
34032 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
34034 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
34036 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34038 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
34039 vector mode and that that mode matches the mode of the data
34041 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
34042 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
34043 directly using expand_vec_perm_1 when forcing selectors into
34045 (expand_vec_perm_var): New function, split out from expand_vec_perm.
34047 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34049 * optabs-query.h (can_vec_perm_p): Delete.
34050 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
34051 * optabs-query.c (can_vec_perm_p): Split into...
34052 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
34053 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
34054 particular selector is valid.
34055 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
34056 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
34057 (vect_grouped_load_supported): Likewise.
34058 (vect_shift_permute_load_chain): Likewise.
34059 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
34060 (vect_transform_slp_perm_load): Likewise.
34061 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
34062 (vectorizable_bswap): Likewise.
34063 (vect_gen_perm_mask_checked): Likewise.
34064 * fold-const.c (fold_ternary_loc): Likewise. Don't take
34065 implementations of variable permutation vectors into account
34066 when deciding which selector to use.
34067 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
34068 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
34069 with a false third argument.
34070 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
34071 to test whether the constant selector is valid and can_vec_perm_var_p
34072 to test whether a variable selector is valid.
34074 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34076 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
34077 * optabs-query.c (can_vec_perm_p): Likewise.
34078 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
34079 instead of vec_perm_indices.
34080 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
34081 (vect_gen_perm_mask_checked): Likewise,
34082 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
34083 (vect_gen_perm_mask_checked): Likewise,
34085 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
34087 * optabs-query.h (qimode_for_vec_perm): Declare.
34088 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
34089 (qimode_for_vec_perm): ...this new function.
34090 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
34092 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
34094 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
34095 does not have a conditional at the top.
34097 2018-01-02 Richard Biener <rguenther@suse.de>
34099 * ipa-inline.c (big_speedup_p): Fix expression.
34101 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
34104 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
34107 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
34111 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
34112 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
34113 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
34114 cond_taken_branch_cost 3->4.
34116 2018-01-01 Jakub Jelinek <jakub@redhat.com>
34118 PR tree-optimization/83581
34119 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
34120 TODO_cleanup_cfg if any changes have been made.
34122 PR middle-end/83608
34123 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
34124 convert_modes if target mode has the right side, but different mode
34127 PR middle-end/83609
34128 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
34129 last argument when extracting from CONCAT. If either from_real or
34130 from_imag is NULL, use expansion through memory. If result is not
34131 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
34132 the parts directly to inner mode, if even that fails, use expansion
34135 PR middle-end/83623
34136 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
34137 check for bswap in mode rather than HImode and use that in expand_unop
34140 Copyright (C) 2018 Free Software Foundation, Inc.
34142 Copying and distribution of this file, with or without modification,
34143 are permitted in any medium without royalty provided the copyright
34144 notice and this notice are preserved.