1 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4 * bb-reorder.c (pass_partition_blocks::gate): Return false for
5 functions with naked attribute.
7 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
9 * config/i386/sse.md (avx_vec_concat<mode>):
10 Substitute concat_tg_mode mode attribute with xtg_mode.
11 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
12 (concat_tg_mode): Remove mode attribute.
14 2018-05-31 Martin Sebor <msebor@redhat.com>
17 * calls.c (alloc_max_size): Correct a logic error/typo.
18 Treat excessive arguments as infinite. Warn for invalid arguments.
19 * doc/invoke.texi (-Walloc-size-larger-than): Update.
21 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
24 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
27 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
28 Cesar Philippidis <cesar@codesourcery.com>
31 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
32 when emitting error on private/firstprivate reductions.
33 * omp-low.c (lower_omp_target): Avoid reference-type processing
34 on pointers for firstprivate clause.
36 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
38 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
41 * config/aarch64/aarch64-simd.md
42 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
43 (aarch64_ld1_x3_<mode>): Likewise
44 (aarch64_st1x2<VALLDIF:mode>): Likewise
45 (aarch64_st1_x2_<mode>): Likewise
46 (aarch64_st1x3<VALLDIF:mode>): Likewise
47 (aarch64_st1_x3_<mode>): Likewise
48 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
49 (vld1_s8_x3): Likewise.
50 (vld1_u16_x3): Likewise.
51 (vld1_s16_x3): Likewise.
52 (vld1_u32_x3): Likewise.
53 (vld1_s32_x3): Likewise.
54 (vld1_u64_x3): Likewise.
55 (vld1_s64_x3): Likewise.
56 (vld1_f16_x3): Likewise.
57 (vld1_f32_x3): Likewise.
58 (vld1_f64_x3): Likewise.
59 (vld1_p8_x3): Likewise.
60 (vld1_p16_x3): Likewise.
61 (vld1_p64_x3): Likewise.
62 (vld1q_u8_x3): Likewise.
63 (vld1q_s8_x3): Likewise.
64 (vld1q_u16_x3): Likewise.
65 (vld1q_s16_x3): Likewise.
66 (vld1q_u32_x3): Likewise.
67 (vld1q_s32_x3): Likewise.
68 (vld1q_u64_x3): Likewise.
69 (vld1q_s64_x3): Likewise.
70 (vld1q_f16_x3): Likewise.
71 (vld1q_f32_x3): Likewise.
72 (vld1q_f64_x3): Likewise.
73 (vld1q_p8_x3): Likewise.
74 (vld1q_p16_x3): Likewise.
75 (vld1q_p64_x3): Likewise.
76 (vst1_s64_x2): Likewise.
77 (vst1_u64_x2): Likewise.
78 (vst1_f64_x2): Likewise.
79 (vst1_s8_x2): Likewise.
80 (vst1_p8_x2): Likewise.
81 (vst1_s16_x2): Likewise.
82 (vst1_p16_x2): Likewise.
83 (vst1_s32_x2): Likewise.
84 (vst1_u8_x2): Likewise.
85 (vst1_u16_x2): Likewise.
86 (vst1_u32_x2): Likewise.
87 (vst1_f16_x2): Likewise.
88 (vst1_f32_x2): Likewise.
89 (vst1_p64_x2): Likewise.
90 (vst1q_s8_x2): Likewise.
91 (vst1q_p8_x2): Likewise.
92 (vst1q_s16_x2): Likewise.
93 (vst1q_p16_x2): Likewise.
94 (vst1q_s32_x2): Likewise.
95 (vst1q_s64_x2): Likewise.
96 (vst1q_u8_x2): Likewise.
97 (vst1q_u16_x2): Likewise.
98 (vst1q_u32_x2): Likewise.
99 (vst1q_u64_x2): Likewise.
100 (vst1q_f16_x2): Likewise.
101 (vst1q_f32_x2): Likewise.
102 (vst1q_f64_x2): Likewise.
103 (vst1q_p64_x2): Likewise.
104 (vst1_s64_x3): Likewise.
105 (vst1_u64_x3): Likewise.
106 (vst1_f64_x3): Likewise.
107 (vst1_s8_x3): Likewise.
108 (vst1_p8_x3): Likewise.
109 (vst1_s16_x3): Likewise.
110 (vst1_p16_x3): Likewise.
111 (vst1_s32_x3): Likewise.
112 (vst1_u8_x3): Likewise.
113 (vst1_u16_x3): Likewise.
114 (vst1_u32_x3): Likewise.
115 (vst1_f16_x3): Likewise.
116 (vst1_f32_x3): Likewise.
117 (vst1_p64_x3): Likewise.
118 (vst1q_s8_x3): Likewise.
119 (vst1q_p8_x3): Likewise.
120 (vst1q_s16_x3): Likewise.
121 (vst1q_p16_x3): Likewise.
122 (vst1q_s32_x3): Likewise.
123 (vst1q_s64_x3): Likewise.
124 (vst1q_u8_x3): Likewise.
125 (vst1q_u16_x3): Likewise.
126 (vst1q_u32_x3): Likewise.
127 (vst1q_u64_x3): Likewise.
128 (vst1q_f16_x3): Likewise.
129 (vst1q_f32_x3): Likewise.
130 (vst1q_f64_x3): Likewise.
131 (vst1q_p64_x3): Likewise.
133 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
135 * config/msp430/msp430.c (msp430_output_labelref): Prepend
136 user_label_prefix to name.
138 * tree-core.h: Update comment about the format of NAME string
139 passed to handler in attribute_spec.
141 * config/msp430/msp430.md: Remove erroneous subreg expression from
142 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
143 zero_extend{q,h}isi2.
145 2018-05-30 Borislav Petkov <bp@suse.de>
147 * doc/extend.texi: Document some architecture specific
148 constraints and sort entries.
150 2018-05-30 Martin Sebor <msebor@redhat.com>
153 * builtins.c (expand_builtin_stpcpy_1): New function.
154 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
155 only if the former succeeds.
157 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
159 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
162 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
164 * doc/invoke.texi (-flinker-output): Document
166 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
168 * passes.c (ipa_write_summaries): Only modify statements if body
170 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
171 incrementally linking.
172 (ipa_passes): Likewise.
173 * lto-cgraph.c (lto_output_node): When incrementally linking do not
174 pass down resolution info.
175 * common.opt (flag_incremental_link): Update info.
176 * gcc.c (plugin specs): Turn flinker-output=* to
177 -plugin-opt=-linker-output-known
178 * toplev.c (compile_file): Also cut compilation when doing incremental
180 * flag-types. (enum lto_partition_model): Add
181 LTO_LINKER_OUTPUT_NOLTOREL.
182 (invoke.texi): Add -flinker-output docs.
183 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
184 link same way as WPA; do not stream in dead initializers.
186 * dwarf2out.c (dwarf2out_die_ref_for_decl,
187 darf2out_register_external_decl): Support incremental link.
189 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
191 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
193 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
195 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
196 it down to simple_object_copy_lto_debug_sections.
197 (run_gcc): Determine incremental LTO link time and configure
198 lto1 into non-wpa mode, disable renaming of debug sections.
200 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
202 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
203 descriptions of various incorrectly documented functions.
205 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
208 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
209 address check not strict.
211 2018-05-30 Richard Biener <rguenther@suse.de>
213 PR tree-optimization/85964
214 * tracer.c (better_p): Drop initialized count check, we only
215 call the function with initialized counts now.
216 (find_best_successor): Do find a best edge if one
217 has uninitialized count.
218 (find_best_predecessor): Likewise. Do BB frequency check only
219 if count is initialized.
221 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
223 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
224 (aarch64_ldrstr_offset_compare): New.
225 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
226 load/store orderings.
227 (aarch64_gen_adjusted_ldpstp): Likewise.
229 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
231 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
232 Check for subset of GENERAL_REGS and FP_REGS.
233 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
236 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
238 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
239 and wi::to_poly_offset. Add the current offset and then check
240 whether the sum fits, rather than using an unchecked addition of
241 a checked term. Check for a shwi rather than a uhwi.
242 * expr.c (get_bit_range): Use tree_to_poly_uint64.
243 (store_constructor): Use poly_int_tree_p.
244 (expand_expr_real_1): Likewise.
245 * function.c (assign_temp): Likewise.
246 * fold-const.c (const_binop): Use poly_int_tree_p and
248 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
250 * ipa-icf-gimple.c (func_checker::compare_operand): Use
251 to_poly_offset for MEM offsets.
252 * ipa-icf.c (sem_variable::equals): Likewise.
253 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
254 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
255 wi::to_poly_offset for BIT_FIELD_REF offsets.
256 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
258 * var-tracking.c (emit_note_insn_var_location): Use
261 2018-05-29 Jim Wilson <jimw@sifive.com>
263 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
265 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
268 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
269 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
271 (sse4_1_round<mode>2): Use nonimmediate_operand
272 for operand 1 predicate.
274 2018-05-29 Martin Sebor <msebor@redhat.com>
275 Richard Biener <rguenther@suse.de>
278 * calls.c (get_size_range): Call determine_value_range instead
280 * tree-vrp.h (determine_value_range): Declared new function.
281 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
283 2018-05-29 Richard Biener <rguenther@suse.de>
285 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
286 sure to use non-pattern stmts for get_earlier_stmt arguments.
287 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
288 called on pattern stmts.
289 (get_later_stmt): Likewise.
291 2018-05-29 Martin Liska <mliska@suse.cz>
293 PR gcov-profile/85759
294 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
297 2018-05-29 Jakub Jelinek <jakub@redhat.com>
299 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
301 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
305 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
306 VEC_PACK_FLOAT_EXPR): New tree codes.
307 * tree-pretty-print.c (op_code_prio): Handle
308 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
309 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
310 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
311 * tree-inline.c (estimate_operator_cost): Likewise.
312 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
313 * fold-const.c (const_binop): Likewise.
314 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
315 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
316 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
317 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
318 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
319 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
320 * expr.c (expand_expr_real_2): Likewise.
321 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
322 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
323 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
325 * optabs.c (expand_widen_pattern_expr): For
326 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
327 sign from result type rather than operand's type.
328 (expand_binop_directly): For vec_packu_float_optab and
329 vec_packs_float_optab allow result type to be different from operand's
331 * optabs-tree.c (optab_for_tree_code): Handle
332 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
333 VEC_PACK_FLOAT_EXPR. Formatting fixes.
334 * tree-vect-generic.c (expand_vector_operations_1): Handle
335 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
337 * tree-vect-stmts.c (supportable_widening_operation): Handle
339 (supportable_narrowing_operation): Handle FLOAT_EXPR.
340 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
341 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
342 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
343 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
345 (vec_pack<floatprefix>_float_<mode>): New expander.
346 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
348 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
349 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
350 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
351 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
352 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
354 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
355 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
356 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
357 VEC_PACK_FLOAT_EXPR): Document.
359 2018-05-29 Richard Biener <rguenther@suse.de>
361 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
363 (stmt_vec_info_vec): Make pointer.
364 (init_stmt_vec_info_vec): Remove.
365 (free_stmt_vec_info_vec): Likewise.
366 (set_stmt_vec_info_vec): New function.
367 (free_stmt_vec_infos): Likewise.
368 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
369 (set_vinfo_for_stmt): Likewise.
370 (get_earlier_stmt): Likewise.
371 (get_later_stmt): Likewise.
372 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
373 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
374 (vec_info::~vec_info): Free stmt_vec_infos.
375 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
376 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
377 (pass_slp_vectorize::execute): Likewise.
378 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
379 (free_stmt_vec_info_vec): Likewise.
380 (set_stmt_vec_info_vec): New function.
381 (free_stmt_vec_infos): Likewise.
382 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
383 the global stmt_vec_info_vec.
384 * tree-parloops.c (gather_scalar_reductions): Use
385 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
388 2018-05-29 Richard Biener <rguenther@suse.de>
390 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
392 2018-05-29 Martin Liska <mliska@suse.cz>
393 David Malcolm <dmalcolm@redhat.com>
395 * vec.c (test_reverse): New.
396 (vec_c_tests): Add new test.
397 * vec.h (vl_ptr>::reverse): New function.
399 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
401 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
403 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
406 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
408 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
410 2018-05-28 Richard Biener <rguenther@suse.de>
412 PR tree-optimization/85933
413 * tree-vect-data-refs.c (vect_record_base_alignments): Only
414 look at stmts marked as vectorizable.
416 2018-05-28 Richard Biener <rguenther@suse.de>
418 PR tree-optimization/85934
419 * tree-vect-generic.c (expand_vector_operations_1): Hoist
420 vector boolean check before scalar optimization.
422 2018-05-28 Jakub Jelinek <jakub@redhat.com>
424 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
427 2018-05-28 Mark Wielaard <mark@klomp.org>
429 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
430 if it is an expression containing a minus sign.
432 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
434 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
436 2018-05-27 Paul Koning <ni1d@arrl.net>
438 * config/pdp11/pdp11.md (truncsihi2): Remove.
440 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
441 Chung-Ju Wu <jasonwucj@gmail.com>
443 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
445 (unaligned_store_dw): Ditto.
446 * config/nds32/nds32-memory-manipulation.c
447 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
448 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
449 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
450 (emit_setmem_word_loop): Rename to ...
451 (emit_setmem_doubleword_loop): ... this.
452 (nds32_gen_dup_4_byte_to_word_value): New function.
453 (nds32_gen_dup_8_byte_to_double_word_value): New function.
454 (nds32_expand_setmem_loop): Refine implementation.
455 (nds32_expand_setmem_loop_v3m): Ditto.
456 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
459 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
461 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
463 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
465 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
466 (nds32_init_machine_status): Initialize machine->attr_naked_p and
467 machine->attr_no_prologue_p.
468 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
469 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
470 (nds32_expand_epilogue): Consider attr_naked_p.
471 (nds32_expand_epilogue_v3pop): Likewise.
472 (nds32_can_use_return_insn): Likewise.
473 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
474 attr_no_prologue_p fields.
475 * config/nds32/nds32.opt (mret-in-naked-func): New option.
477 2018-05-27 Jakub Jelinek <jakub@redhat.com>
480 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
483 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
485 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
487 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
489 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
491 (*<floatsuffix>floatv2div2sf2): Rename to ...
492 (*float<floatunssuffix>v2div2sf2): ... this.
493 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
494 (float<floatunssuffix>v2div2sf2_mask): ... this.
495 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
496 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
497 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
499 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
501 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
503 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
505 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
507 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
509 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
510 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
511 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
512 gen_ufix_truncv8dfv8si2.
513 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
514 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
515 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
516 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
517 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
518 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
519 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
520 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
522 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
526 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
528 2018-05-25 Jim Wilson <jimw@sifive.com>
530 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
531 * config/riscv/riscv.c (struct machine_function): Add
532 interrupt_handler_p and attribute_checked_p fields.
533 (riscv_attribute_table): Add interrupt.
534 (riscv_interrupt_type_p): New.
535 (riscv_save_reg_p): Save extra regs for interrupt handler.
536 (riscv_use_save_libcall): Return false for interrupt handler.
537 (riscv_first_stack_step): Add forward declaration.
538 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
539 for interrupt handler with large frame. Use it for saved reg list.
540 (riscv_expand_prologue): Move flag_stack_usage_info support to
541 eliminate duplication.
542 (riscv_expand_epilogue): Generate mret for interrupt handler.
543 (riscv_epilogue_uses): New.
544 (riscv_can_use_return_insn): Return false for interrupt handler.
545 (riscv_function_ok_for_sibcall): Likewise.
546 (riscv_set_current_function): Add interrupt handler support.
547 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
548 * config/riscv/riscv.md (UNSPECV_MRET): New.
550 (riscv_frflags, riscv_fsflags): Use tab after opcode.
552 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
554 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
556 PR tree-optimization/85712
557 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
558 this candidate has already been replaced in-situ by a copy.
560 2018-05-25 Jason Merrill <jason@redhat.com>
562 PR c++/80485 - inline function non-zero address.
563 * symtab.c (nonzero_address): Check DECL_COMDAT.
565 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
568 * config/alpha/alpha.md (ashlsi3): New insn pattern.
569 (*ashlsi_se): Rename from *ashldi_se. Define as sign
570 extension of SImode operation. Use const123_operand predicate.
572 (*saddl_se_1): Ditto.
574 (*ssubl_se_1): Ditto.
575 * config/alpha/predicates.md (const123_operand): New predicate.
576 * config/alpha/constraints.md (P): Use IN_RANGE.
578 2018-05-25 Richard Biener <rguenther@suse.de>
580 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
582 (ref_maybe_used_by_stmt_p): Likewise.
583 (stmt_may_clobber_ref_p): Likewise.
584 (stmt_may_clobber_ref_p_1): Likewise.
585 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
587 (ref_maybe_used_by_stmt_p): Likewise.
588 (stmt_may_clobber_ref_p): Likewise.
589 (stmt_may_clobber_ref_p_1): Likewise.
590 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
591 the alias oracle to disambiguate DRs with stmts DR analysis
593 (vect_analyze_data_refs): Do not give up on not analyzable
594 DRs for BB vectorization. Remove code truncating the dataref
597 2018-05-25 Jakub Jelinek <jakub@redhat.com>
600 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
601 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
602 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
604 2018-05-25 Richard Biener <rguenther@suse.de>
606 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
607 function, combining stmt data ref gathering and fatal analysis
609 (vect_analyze_data_refs): Remove now redudnant code and simplify.
610 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
611 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
612 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
613 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
615 2018-05-25 Bin Cheng <bin.cheng@arm.com>
617 PR tree-optimization/85720
618 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
619 SCC if all partitions are builtins.
620 (version_loop_by_alias_check): New parameter. Generate cancelable
621 runtime alias check if all partitions are builtins.
622 (distribute_loop): Update call to above function.
624 2018-05-25 Bin Cheng <bin.cheng@arm.com>
626 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
627 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
628 (parm_default_def_partition_arg): Ditto.
629 (set_parm_default_def_partition): Ditto.
630 (get_parm_default_def_partitions): Ditto and make it static.
631 (get_undefined_value_partitions): Ditto and make it static.
632 (remove_ssa_form): Refactor call to init_var_map here.
633 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
634 computation for loop region.
635 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
636 (register_default_def): Delete.
637 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
638 (parm_default_def_partition_arg): Ditto.
639 (set_parm_default_def_partition): Ditto.
640 (get_parm_default_def_partitions): Ditto and make it static.
641 (get_undefined_value_partitions): Ditto and make it static.
642 (coalesce_with_default, coalesce_with_default): Update comment.
643 (create_coalesce_list_for_region): New func factored out from
644 create_outofssa_var_map.
645 (populate_coalesce_list_for_outofssa): New func factored out from
646 create_outofssa_var_map and coalesce_ssa_name.
647 (create_outofssa_var_map): Delete.
648 (coalesce_ssa_name): Refactor to support live range computation.
649 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
650 (get_parm_default_def_partitions): Delete.
651 (get_undefined_value_partitions): Ditto.
652 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
653 computation for loop region.
654 (new_tree_live_info, loe_visit_block): Ditto.
655 (live_worklist, set_var_live_on_entry): Ditto.
656 (calculate_live_on_exit, verify_live_on_entry): Ditto.
657 * tree-ssa-live.h (struct _var_map): New fields.
658 (init_var_map): Change decl.
659 (region_contains_p): New.
661 2018-05-25 Bin Cheng <bin.cheng@arm.com>
663 * tree-ssa-live.h (live_merge_and_clear): Delete.
665 2018-05-25 Richard Biener <rguenther@suse.de>
668 * tree-dump.c (dequeue_and_dump): Remove access to removed
669 operand 2 of a SWITCH_EXPR.
671 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
673 * doc/sourcebuild.texi (vect_double_cond_arith): Include
674 multiplication and division.
675 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
676 (cond_udiv@var{m}, cond_umod@var{m}): Document.
677 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
678 (cond_udiv_optab, cond_umod_optab): New optabs.
679 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
680 (IFN_COND_RDIV): New internal functions.
681 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
682 TRUNC_MOD_EXPR and RDIV_EXPR.
683 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
684 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
686 (SVE_INT_BINARY): Include mult.
687 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
688 (optab, sve_int_op): Handle mult.
689 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
691 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
692 for SVE_INT_BINARY_SD.
694 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
696 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
697 (optab, sve_int_op): Handle div and udiv.
698 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
699 for SVE_INT_BINARY_SD.
700 (*<optab><mode>3): New insn for the same.
702 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
704 * tree-vect-patterns.c: Include predict.h.
705 (vect_recog_divmod_pattern): Restrict check for division support
706 to when optimizing for size.
708 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
710 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
711 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
712 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
713 (gimple_match_op::set_op): Likewise.
714 (gimple_resimplify4): Declare.
715 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
716 (expr::gen_transform): Likewise.
717 (decision_tree::gen): Generate a simplification routine for 4 operands.
718 * gimple-match-head.c (gimple_simplify): Add an overload for
719 4 operands. In the top-level function, handle up to 4 call
720 arguments and call gimple_resimplify4.
721 (gimple_resimplify4): New function.
722 (build_call_internal): Pass a fourth operand.
723 (maybe_push_to_seq): Likewise.
724 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
725 Fold VEC_COND_EXPRs of an operation and a default value into
726 an IFN_COND_* function if possible.
727 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
729 (SVE_COND_FP_BINARY): Include them.
730 (optab, sve_fp_op): Handle them.
731 (SVE_INT_BINARY_REV): New code iterator.
732 (SVE_COND_FP_BINARY_REV): New int iterator.
733 (commutative): New int attribute.
734 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
736 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
738 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
739 (*cond_<optab><mode>): New patterns for reversed operands.
741 2018-05-25 Richard Biener <rguenther@suse.de>
743 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
744 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
745 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
746 (STMT_VINFO_GROUPED_ACCESS): Adjust.
747 * tree-vect-data-refs.c (everywhere): Adjust users.
748 * tree-vect-loop.c (everywhere): Likewise.
749 * tree-vect-slp.c (everywhere): Likewise.
750 * tree-vect-stmts.c (everywhere): Likewise.
751 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
753 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
755 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
757 (gcc_cv_as_section_exclude): ... this.
758 Try Solaris as #exclude syntax.
759 * configure: Regenerate.
760 * config.in: Regenerate.
761 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
763 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
764 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
766 * varasm.c (default_elf_asm_named_section): Don't check if
767 HAVE_GAS_SECTION_EXCLUDE is defined.
769 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
771 * doc/md.texi: Update the documentation of the cond_* optabs
772 to mention the new final operand. Fix GET_MODE_NUNITS call.
773 Describe the scalar case too.
774 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
775 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
777 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
778 (get_conditional_internal_fn): Update comment.
779 * tree-vect-loop.c (vectorizable_reduction): Pass the original
780 accumulator value as a final argument to conditional functions.
781 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
782 a define_expand and add an "else" operand. Assert for now that
783 the else operand is equal to operand 2. Use SVE_INT_BINARY and
784 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
785 (*cond_<optab><mode>): New patterns.
786 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
787 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
788 (UNSPEC_COND_EOR): Delete.
789 (optab): Remove associated mappings.
790 (SVE_INT_BINARY): New code iterator.
791 (sve_int_op): Remove int attribute and add "minus" to the code
793 (SVE_COND_INT_OP): Delete.
794 (SVE_COND_FP_OP): Rename to...
795 (SVE_COND_FP_BINARY): ...this.
797 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
799 * optabs.c (can_reuse_operands_p): New function.
800 (maybe_legitimize_operands): Try to reuse the results for
803 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
805 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
806 Add {q} suffix to insn mnemonic.
808 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
810 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
811 (msp430_warn_func_return): New.
813 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
815 * fold-const.c (tree_nonzero_bits): New function.
816 * fold-const.h (tree_nonzero_bits): Likewise.
817 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
818 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
820 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
824 * varasm.c (assemble_alias): Check ifunc_resolver only on
827 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
830 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
831 when memory input operand is handled.
833 2018-05-24 Luis Machado <luis.machado@linaro.org>
835 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
837 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
839 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
841 * match.pd: Delay FMA folds until after vectorization.
843 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
846 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
847 address check not strict.
849 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
851 * gimple-match.h (gimple_match_op): New class.
852 (mprts_hook): Replace parameters with a gimple_match_op *.
853 (maybe_build_generic_op): Likewise.
854 (gimple_simplified_result_is_gimple_val): Replace parameters with
855 a const gimple_match_op *.
856 (gimple_simplify): Replace code_helper * and tree * parameters with
857 a gimple_match_op * parameter.
858 (gimple_resimplify1): Replace code_helper *, tree and tree *
859 parameters with a gimple_match_op * parameter.
860 (gimple_resimplify2): Likewise.
861 (gimple_resimplify3): Likewise.
862 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
863 parameters with a gimple_match_op * parameter.
864 * gimple-match-head.c (gimple_simplify): Change prototypes of
865 auto-generated functions to take a gimple_match_op * instead of
866 separate code_helper * and tree * parameters. Make the same
867 change in the top-level overload and update calls to the
868 gimple_resimplify routines. Update calls to the auto-generated
869 functions and to maybe_push_res_to_seq in the publicly-facing
870 operation-specific gimple_simplify overloads.
871 (gimple_match_op::MAX_NUM_OPS): Define.
872 (gimple_resimplify1): Replace rcode and ops with a single res_op
873 parameter. Update call to gimple_simplify.
874 (gimple_resimplify2): Likewise.
875 (gimple_resimplify3): Likewise.
876 (mprts_hook): Replace parameters with a gimple_match_op *.
877 (maybe_build_generic_op): Likewise.
878 (build_call_internal): Replace type, nargs and ops with
880 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
881 with a single gimple_match_op *. Update calls to mprts_hook,
882 build_call_internal and gimple_simplified_result_is_gimple_val.
883 Factor out code that is common to the tree_code and combined_fn cases.
884 * genmatch.c (expr::gen_transform): Replace tem_code and
885 tem_ops with a gimple_match_op called tem_op. Update calls
886 to the gimple_resimplify functions and maybe_push_res_to_seq.
887 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
888 res_ops. Update call to the gimple_resimplify functions.
889 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
890 (decision_tree::gen): Make the functions take a gimple_match_op *
891 called res_op instead of separate res_code and res_ops parameters.
892 Update call accordingly.
893 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
894 and ops with a single res_op parameter. Update calls to
895 maybe_build_generic_op and maybe_push_res_to_seq.
896 (fold_stmt_1): Update calls to gimple_simplify and
897 replace_stmt_with_simplification.
898 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
899 and gimple_simplified_result_is_gimple_val.
900 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
902 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
903 with a gimple_match_op *.
904 (vn_nary_build_or_lookup): Likewise. Update call to
905 vn_nary_build_or_lookup_1.
906 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
907 gimple_match_op *. Update calls to the gimple_resimplify routines
908 and to gimple_simplified_result_is_gimple_val.
909 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
910 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
911 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
912 (visit_nary_op): Likewise.
913 (visit_reference_op_load): Likewise.
915 2018-05-23 Luis Machado <luis.machado@linaro.org>
917 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
918 modifier for printing the step amount.
920 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
923 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
926 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
928 * doc/sourcebuild.texi (Endianness): New subsubsection.
930 2018-05-23 Luis Machado <luis.machado@linaro.org>
932 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
933 <prefetch_dynamic_strides>: New const bool field.
934 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
935 prefetch_dynamic_strides.
936 (exynosm1_prefetch_tune): Likewise.
937 (thunderxt88_prefetch_tune): Likewise.
938 (thunderx_prefetch_tune): Likewise.
939 (thunderx2t99_prefetch_tune): Likewise.
940 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
942 (aarch64_override_options_internal): Update to set
943 PARAM_PREFETCH_DYNAMIC_STRIDES.
944 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
945 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
946 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
947 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
948 prefetch-dynamic-strides setting.
950 2018-05-23 Luis Machado <luis.machado@linaro.org>
952 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
953 <minimum_stride>: New const int field.
954 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
955 minimum_stride field defaulting to -1.
956 (exynosm1_prefetch_tune): Likewise.
957 (thunderxt88_prefetch_tune): Likewise.
958 (thunderx_prefetch_tune): Likewise.
959 (thunderx2t99_prefetch_tune): Likewise.
960 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
961 <default_opt_level>: Set to 3.
962 (aarch64_override_options_internal): Update to set
963 PARAM_PREFETCH_MINIMUM_STRIDE.
964 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
965 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
966 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
967 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
968 stride is constant and is below the minimum stride threshold.
970 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
972 * config/arm/arm-cpus.in (mode26): Delete.
973 (armv4): Delete mode26 reference.
974 * config/arm/arm.c (arm_configure_build_target): Delete use of
977 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
979 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
981 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
982 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
984 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
985 (floatunsdidf2): Ditto.
987 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
989 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
990 (fixuns_trunc<mode>si2_avx512f): Ditto.
991 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
992 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
993 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
995 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
997 PR rtl-optimization/79985
998 * df-scan.c (df_insn_refs_collect): Remove special case for
999 global registers and asm statements.
1001 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
1003 * extend.texi (Global Register Variables): Rewrite the bullet list.
1004 Note that the register is available for allocation. Note that access
1005 via inline asm must use constraints. Add note about async-signal
1006 handlers. Remove paragraph about automagic register selection.
1008 2018-05-23 Richard Biener <rguenther@suse.de>
1010 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
1011 of fixed offset from memset VN.
1013 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
1015 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
1017 (alloc_cand_and_find_basis): Initialize first_interp field.
1018 (slsr_process_mul): Modify first_interp field.
1019 (slsr_process_add): Likewise.
1020 (slsr_process_cast): Modify first_interp field for each new
1022 (slsr_process_copy): Likewise.
1023 (dump_candidate): Dump first_interp field.
1024 (replace_mult_candidate): Process all interpretations, not just
1026 (replace_rhs_if_not_dup): Likewise.
1027 (replace_one_candidate): Likewise.
1029 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
1031 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
1033 (aarch64_needs_frame_chain): New function.
1034 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
1036 2018-05-23 Sudakshina Das <sudi.das@arm.com>
1039 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
1040 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
1041 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
1042 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
1043 as true for strict-align.
1044 (aarch64_can_inline_p): Perform checks even when callee has no
1045 attributes to check for strict alignment.
1046 * doc/extend.texi (AArch64 Function Attributes): Document
1048 * doc/invoke.texi: (AArch64 Options): Likewise.
1050 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
1052 PR tree-optimization/85853
1053 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
1054 the handling of the root of the node to...
1055 (vect_slp_analyze_node_operations_1): ...this new function,
1056 and run the whole thing with the child nodes' def types
1057 set according to their SLP node's def type.
1059 2018-05-23 Richard Biener <rguenther@suse.de>
1062 * tree-data-ref.c (create_runtime_alias_checks): Defer
1063 and ignore overflow warnings.
1065 2018-05-23 Yury Gribov <tetra2005@gmail.com>
1067 PR tree-optimization/85822
1068 * tree-vrp.c (is_masked_range_test): Fix handling of negative
1071 2018-05-23 Richard Biener <rguenther@suse.de>
1073 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
1074 memset constants via native_interpret_expr.
1076 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
1079 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
1081 (cgraph_node::create_alias): Likewise.
1082 (cgraph_node::get_availability): Check ifunc_resolver instead
1083 of looking up ifunc attribute.
1084 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
1085 * varasm.c (do_assemble_alias): Likewise.
1086 (assemble_alias): Likewise.
1087 (default_binds_local_p_3): Likewise.
1088 * cgraph.h (cgraph_node): Add ifunc_resolver.
1089 (cgraph_node::only_called_directly_or_aliased_p): Return false
1091 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
1093 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
1094 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
1095 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
1096 instead of looking up ifunc attribute.
1098 2018-05-22 Luis Machado <luis.machado@linaro.org>
1100 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
1102 2018-05-22 Martin Sebor <msebor@redhat.com>
1105 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
1106 only when expasion succeeds.
1107 (expand_builtin_strcmp): Same.
1108 (expand_builtin_strncmp): Same.
1110 2018-05-22 Martin Sebor <msebor@redhat.com>
1112 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
1114 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
1115 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1117 * config/aarch64/aarch64-ldpstp.md: Replace uses of
1118 aarch64_mem_pair_operand with memory_operand and delete operand swapping
1120 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1121 Add check for legitimate_address.
1122 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
1123 (aarch64_swap_ldrstr_operands): New.
1124 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
1127 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
1128 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1130 * config/aarch64/aarch64.md: New patterns to generate stp
1132 (store_pair_sw, store_pair_dw): New patterns to generate stp for
1133 single words and double words.
1134 (load_pair_sw, load_pair_dw): Likewise.
1135 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
1137 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
1139 * config/aarch64/aarch64-ldpstp.md: Modify peephole
1140 for different mode ldpstp and add peephole for merged zero stores.
1142 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
1144 (aarch64_gen_store_pair): Rename calls to match new patterns.
1145 (aarch64_gen_load_pair): Rename calls to match new patterns.
1146 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
1147 (load_pair<DREG:mode><DREG2:mode>): ... This.
1148 (store_pair<mode>): Rename to...
1149 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
1150 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
1152 (V_INT_EQUIV): Handle SImode.
1153 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
1156 2018-05-22 Martin Sebor <msebor@redhat.com>
1159 * calls.c (maybe_warn_nonstring_arg): Use string length to set
1160 or ajust the presumed bound on an operation to avoid unnecessary
1163 2018-05-22 Martin Sebor <msebor@redhat.com>
1165 PR tree-optimization/85826
1166 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
1167 assuming that a DECL necesarily has a constant size.
1169 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
1172 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
1174 2018-05-22 Richard Biener <rguenther@suse.de>
1176 PR tree-optimization/85834
1177 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
1178 non-constant and non-zero memset arguments.
1180 2018-05-22 Martin Liska <mliska@suse.cz>
1183 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
1185 2018-05-22 Richard Biener <rguenther@suse.de>
1187 PR tree-optimization/85863
1188 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
1189 comparisons when vectype is specified.
1190 (vectorizable_condition): Do not specify vectype for
1191 vect_is_simple_cond when SLP vectorizing.
1193 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
1196 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
1197 define __ibm128 as long double.
1198 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
1199 as a distinct type when IEEE 128-bit support is enabled.
1200 (init_float128_ieee): Fix up conversions between IFmode and IEEE
1201 128-bit types to use the correct functions.
1202 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
1203 convert between 128-bit floating point types that have different
1204 modes but the same representation, instead of using gen_lowpart to
1206 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
1208 (IFKF_reg): New attributes to give the register constraints for
1210 (extend<mode>tf2_internal): New insns to mark an explicit
1211 conversion between 128-bit floating point types that have a
1212 different mode but share the same representation.
1214 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
1216 PR tree-optimization/85814
1217 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1218 a null return from get_strinfo when unsharing the next
1219 strinfo in the chain.
1221 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
1224 * varasm.c (weak_finish): Clean up weak_decls.
1226 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1228 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1229 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1230 UNSPEC_UADALP values.
1231 * config/aarch64/iterators.md (ABAL): New int iterator.
1234 (sur): Add mappings for the above.
1235 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1237 (aarch64_<sur>abal<mode>_4): Likewise.
1238 (aarch64_<sur>adalp<mode>_3): Likewise.
1239 (<sur>sadv16qi): New define_expand.
1241 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
1243 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1244 (*movdf_internal): Ditto.
1245 (*rcpsf2_sse): Ditto.
1246 (*rsqrtsf2_sse): Ditto.
1247 (*sqrt<mode>2_sse): Ditto.
1249 2018-05-21 Tamar Christina <tamar.christina@arm.com>
1251 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1253 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1254 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1255 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1256 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1258 * config/aarch64/arm_neon.h: Likewise.
1259 * config/aarch64/iterators.md (VQ_I): New.
1261 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
1263 * config.gcc: Add arc/t-multilib-linux to tmake_file for
1265 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1268 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
1270 * config/nds32/constraints.md (S): New constraint.
1271 * config/nds32/nds32.md (call_internal): Use constraint S.
1272 (call_value_internal): Likewise.
1273 (sibcall_internal): Likewise.
1274 (sibcall_value_internal): Likewise.
1276 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
1277 Chung-Ju Wu <jasonwucj@gmail.com>
1279 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1282 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
1283 Chung-Ju Wu <jasonwucj@gmail.com>
1285 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1286 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1287 (nds32_rtx_costs_impl): Simplify.
1288 (nds32_address_cost_impl): Simplify.
1289 (nds32_init_rtx_costs): New function.
1290 (nds32_rtx_costs_speed_prefer): Likewise.
1291 (nds32_rtx_costs_size_prefer): Likewise.
1292 (nds32_address_cost_speed_prefer): Likewise.
1293 (nds32_address_cost_speed_fwprop): Likewise.
1294 (nds32_address_cost_size_prefer): Likewise.
1295 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1296 * config/nds32/nds32.c (nds32_option_override): Use
1297 nds32_init_rtx_costs function.
1299 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
1301 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1302 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1303 (TARGET_PIPELINE_N8): Likewise.
1304 (TARGET_PIPELINE_N10): Likewise.
1305 (TARGET_PIPELINE_N13): Likewise.
1306 (TARGET_PIPELINE_GRAYWOLF): Likewise.
1308 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
1310 * config/nds32/nds32-fpu.md: Update copyright year.
1312 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1314 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1316 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1318 * config/nds32/nds32.c
1319 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1320 * config/nds32/nds32.opt (minline-asm-r15): New option.
1322 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1324 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1326 * config/nds32/nds32.md (abssi2): New pattern.
1328 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
1330 * config/i386/i386.md (rex64namesuffix): New mode attribute.
1331 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1332 Merge insn pattern from sse_cvtsi2ss<round_name> and
1333 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1334 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1335 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1336 using SWI48 mode iterator.
1337 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1338 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1339 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1340 pattern from sse_cvttss2si<round_saeonly_name>
1341 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1342 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1343 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1344 using SWI48 mode iterator.
1345 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1346 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1347 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1348 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1349 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1350 using SWI48 mode iterator.
1351 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1352 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1353 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1354 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1355 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1356 SWI48 mode iterator.
1357 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1358 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1359 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1360 pattern from sse_cvttsd2si<round_saeonly_name>
1361 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1363 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1365 * config/nds32/nds32-md-auxiliary.c
1366 (nds32_valid_smw_lwm_base_p): Refine.
1367 (nds32_output_smw_single_word): Refine.
1368 (nds32_output_smw_double_word): New.
1369 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1371 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1373 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1374 (nds32_output_stack_pop): Refine.
1375 (nds32_expand_unaligned_load): Refine.
1376 (nds32_expand_unaligned_store): Refine.
1378 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1379 Chung-Ju Wu <jasonwucj@gmail.com>
1381 * config/nds32/constants.md: Add TP_REGNUM constant.
1382 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1383 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1385 * config/nds32/nds32-doubleword.md: Consider flag_pic.
1386 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1387 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1388 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1389 and PIC code generation.
1390 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1392 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1394 * config/nds32/nds32.md: Support TLS and PIC.
1395 * config/nds32/nds32.c: Support TLS and PIC.
1396 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1397 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1400 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1402 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1403 mode with E_ prefix.
1405 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1406 Chung-Ju Wu <jasonwucj@gmail.com>
1408 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1409 * config/nds32/nds32-md-auxiliary.c
1410 (symbolic_reference_mentioned_p): New.
1411 (nds32_legitimize_ict_address): New.
1412 (nds32_expand_ict_move): New.
1413 (nds32_indirect_call_referenced_p): New.
1414 (nds32_symbol_binds_local_p): Delete.
1415 (nds32_long_call_p): Modify.
1416 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1417 * config/nds32/nds32-protos.h
1418 (symbolic_reference_mentioned_p): Declare.
1419 (nds32_legitimize_ict_address): Declare.
1420 (nds32_expand_ict_move): Declare.
1421 (nds32_indirect_call_referenced_p): Declare.
1422 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1423 (nds32_relax_group): Use nds32_ict_const_p as condition.
1424 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1425 (nds32_asm_file_start): Output ict_model directive in asm code.
1426 (nds32_legitimate_address_p): Consider indirect call.
1427 (nds32_print_operand): Consider indirect call.
1428 (nds32_print_operand_address): Consider indirect call.
1429 (nds32_insert_attributes): Handle "indirect_call" attribute.
1430 (TARGET_LEGITIMATE_ADDRESS_P): Define.
1431 (TARGET_LEGITIMATE_CONSTANT_P): Define.
1432 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1433 (TARGET_DELEGITIMIZE_ADDRESS): Define.
1434 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1435 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1436 (TARGET_ICT_MODEL_SMALL): Define.
1437 (TARGET_ICT_MODEL_LARGE): Define.
1438 * config/nds32/nds32.md (movsi): Consider ict model.
1439 (call, call_value): Consider ict model.
1440 (sibcall, sibcall_value): Consider ict model.
1441 * config/nds32/nds32.opt (mict-model): New option.
1442 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1445 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1446 Monk Chiang <sh.chiang04@gmail.com>
1447 Jim Wilson <jimw@sifive.com>
1449 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1450 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
1451 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1452 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1453 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
1454 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1455 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1456 compute save_libcall_adjustment properly.
1457 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1458 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1459 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1460 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1461 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1462 (ABI_SPEC): Handle mabi=ilp32e.
1463 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1464 (RVE): Add RVE mask.
1465 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1466 <-march>: Add rv32e as an example.
1468 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
1471 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1472 (intra_create_variable_infos): Handle C++ constructors.
1474 2018-05-18 Martin Liska <mliska@suse.cz>
1476 * passes.def: Remove a redundant pass.
1478 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
1481 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1483 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1485 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1487 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1489 (armv2, armv2a, armv3, armv3m): Delete architectures.
1490 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1491 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1492 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1494 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1495 (*mulsidi3adddi): Likewise.
1496 (mulsidi3): Likewise.
1497 (*mulsidi3_nov6): Likewise.
1498 (umulsidi3): Likewise.
1499 (umulsidi3_nov6): Likewise.
1500 (umaddsidi4): Likewise.
1501 (*umulsidi3adddi): Likewise.
1502 (smulsi3_highpart): Likewise.
1503 (*smulsi3_highpart_nov6): Likewise.
1504 (umulsi3_highpart): Likewise.
1505 (*umulsi3_highpart_nov6): Likewise.
1506 * config/arm/arm.h (arm_arch3m): Delete.
1507 * config/arm/arm.c (arm_arch3m): Delete.
1508 (arm_option_override_internal): Update armv3-related comment.
1509 (arm_configure_build_target): Delete use of isa_bit_mode32.
1510 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1511 (arm_rtx_costs_internal): Delete check of arm_arch3m.
1512 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1514 (mulusa3): Likewise.
1515 * config/arm/arm-protos.h (arm_arch3m): Delete.
1516 * config/arm/arm-tables.opt: Regenerate.
1517 * config/arm/arm-tune.md: Likewise.
1518 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1519 deleted architectures.
1521 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1523 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1524 (armv5t, armv5te): New features.
1525 (ARMv5, ARMv5e): Delete fgroups.
1526 (ARMv5t, ARMv5te): Adjust for above changes.
1528 (armv5, armv5e): Delete arches.
1529 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1531 (*call_reg_arm): Likewise.
1532 (*call_value_reg_armv5): Likewise.
1533 (*call_value_reg_arm): Likewise.
1534 (*call_symbol): Likewise.
1535 (*call_value_symbol): Likewise.
1536 (*sibcall_insn): Likewise.
1537 (*sibcall_value_insn): Likewise.
1539 (prefetch): Likewise.
1540 (define_split and define_peephole2 dependent on arm_arch5):
1542 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1544 (TARGET_ARM_QBIT): Likewise.
1545 (TARGET_DSP_MULTIPLY): Likewise.
1546 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1547 (arm_arch5, arm_arch5e): Delete.
1548 (arm_arch5t, arm_arch5te): Declare.
1549 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1550 (arm_arch5t): Declare.
1551 (arm_option_reconfigure_globals): Update for the above.
1552 (arm_options_perform_arch_sanity_checks): Update comment, replace
1553 use of arm_arch5 with arm_arch5t.
1554 (use_return_insn): Likewise.
1555 (arm_emit_call_insn): Likewise.
1556 (output_return_instruction): Likewise.
1557 (arm_final_prescan_insn): Likewise.
1558 (arm_coproc_builtin_available): Likewise.
1559 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1560 arm_arch5e with arm_arch5t and arm_arch5te.
1561 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1562 (arm_arch5t, arm_arch5te): Declare.
1563 * config/arm/arm-tables.opt: Regenerate.
1564 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1565 * config/arm/t-multilib: Likewise.
1566 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1567 instead of arm_arch5.
1568 (*call_reg_thumb1): Likewise.
1569 (*call_value_reg_thumb1_v5): Likewise.
1570 (*call_value_reg_thumb1): Likewise.
1571 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1573 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1575 2018-05-18 Martin Liska <mliska@suse.cz>
1577 PR gcov-profile/84846
1578 * doc/gcov.texi: Document -t option of gcov tool.
1580 2018-05-18 Martin Liska <mliska@suse.cz>
1582 PR gcov-profile/84846
1583 * gcov.c (print_usage): Add new -t option.
1584 (process_args): Handle the option.
1585 (generate_results): Use stdout as output when requested by
1588 2018-05-18 Martin Liska <mliska@suse.cz>
1590 PR gcov-profile/84846
1591 * coverage.c (coverage_init): Write PWD to .gcno file.
1592 * doc/gcov.texi: Document how working directory is printed.
1593 * gcov-dump.c (dump_gcov_file): Print PWD.
1594 * gcov.c (output_intermediate_file): Likewise.
1595 (read_graph_file): Read PWD string.
1596 (output_lines): Print PWD.
1598 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1601 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1602 for retval and return false if all args to phi are zero.
1604 2018-05-18 Richard Biener <rguenther@suse.de>
1606 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1608 (evrp_dom_walker::before_dom_children): Call it.
1610 2018-05-18 Richard Biener <rguenther@suse.de>
1612 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1613 results when processing array refs with variable index.
1615 2018-05-18 Toon Moene <toon@moene.org>
1617 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1618 directly after that of -floop-interchange. Indicate that both
1619 options are enabled by default when specifying -O3.
1621 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1623 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1624 iterator. Delete separate integer-mode vec_set<mode> expander.
1625 (aarch64_simd_vec_setv2di): Delete.
1626 (vec_setv2di): Delete.
1627 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1628 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
1629 the "w, r" alternative.
1631 2018-05-18 Martin Liska <mliska@suse.cz>
1633 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1634 * tree-pass.h (make_pass_lower_switch_O0): New function.
1635 * tree-switch-conversion.c (node_has_low_bound): Remove.
1636 (node_has_high_bound): Likewise.
1637 (node_is_bounded): Likewise.
1638 (class pass_lower_switch): Make it a template type and create
1640 (pass_lower_switch::execute): Add template argument.
1641 (make_pass_lower_switch): New function.
1642 (make_pass_lower_switch_O0): New function.
1643 (do_jump_if_equal): Remove.
1644 (emit_case_nodes): Simplify to just handle all 3 cases and leave
1645 all the hard work to tree optimization passes.
1647 2018-05-18 Martin Liska <mliska@suse.cz>
1649 * dbgcnt.c (limit_low): Renamed from limit.
1650 (limit_high): New variable.
1651 (dbg_cnt_is_enabled): Check for upper limit.
1652 (dbg_cnt): Adjust dumping.
1653 (dbg_cnt_set_limit_by_index): Add new argument for high
1655 (dbg_cnt_set_limit_by_name): Likewise.
1656 (dbg_cnt_process_single_pair): Parse new format.
1657 (dbg_cnt_process_opt): Use strtok.
1658 (dbg_cnt_list_all_counters): Remove 'value' and add
1660 * doc/invoke.texi: Document changes.
1662 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1664 * doc/sourcebuild.texi (scalar_all_fma): Document.
1665 * tree.def (FMA_EXPR): Delete.
1666 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1667 * internal-fn.c (ternary_direct): New macro.
1668 (expand_ternary_optab_fn): Likewise.
1669 (direct_ternary_optab_supported_p): Likewise.
1670 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1671 * builtins.c (fold_builtin_fma): Delete.
1672 (fold_builtin_3): Don't call it.
1673 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1674 * expr.c (expand_expr_real_2): Likewise.
1675 * fold-const.c (operand_equal_p): Likewise.
1676 (fold_ternary_loc): Likewise.
1677 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1678 * gimple.c (DEFTREECODE): Likewise.
1679 * gimplify.c (gimplify_expr): Likewise.
1680 * optabs-tree.c (optab_for_tree_code): Likewise.
1681 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1682 * tree-eh.c (operation_could_trap_p): Likewise.
1683 (stmt_could_throw_1_p): Likewise.
1684 * tree-inline.c (estimate_operator_cost): Likewise.
1685 * tree-pretty-print.c (dump_generic_node): Likewise.
1686 (op_code_prio): Likewise.
1687 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1688 * tree-ssa-operands.c (get_expr_operands): Likewise.
1689 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1690 * fold-const-call.h (fold_fma): Delete.
1691 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1692 CFN_FNMA and CFN_FNMS.
1694 * genmatch.c (combined_fn): New enum.
1695 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1696 (commutative_op): New function.
1697 (commutate): Use it. Handle more than 2 operands.
1698 (dt_operand::gen_gimple_expr): Use commutative_op.
1699 (parser::parse_expr): Allow :c to be used with non-binary
1700 operators if the commutative operand is known.
1701 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1702 CFN_FMS, CFN_FNMA and CFN_FNMS.
1703 (backprop::process_assign_use): Remove FMA_EXPR handling.
1704 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1705 (gen_hsa_fma): New function.
1706 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1707 IFN_FNMA and IFN_FNMS.
1708 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1709 * gimple-fold.h (follow_all_ssa_edges): Declare.
1710 * gimple-fold.c (follow_all_ssa_edges): New function.
1711 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1712 gimple_build interface and use follow_all_ssa_edges to fold the result.
1713 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1714 instead of checking for optabs directly.
1715 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1716 rather than FMA_EXPRs.
1717 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1718 call to IFN_FMA instead of an FMA_EXPR.
1720 2018-05-17 Jim Wilson <jimw@sifive.com>
1722 * expr.c (do_tablejump): When converting index to Pmode, if we have a
1723 sign extended promoted subreg, and the range does not have the sign bit
1724 set, then do a sign extend.
1726 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1727 test, check for sign extended subreg and/or constant operands, and
1728 do a sign extend in that case.
1730 2018-05-17 Steve Ellcey <sellcey@cavium.com>
1732 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1733 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1735 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1736 Change logics_shift_reg to logics_shift_imm.
1737 (thunderx2t99_fp_loadpair_basic): Delete.
1738 (thunderx2t99_fp_storepair_basic): Delete.
1739 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1740 (thunderx2t99_asimd_polynomial): Delete.
1741 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1742 and neon_fp_mul_d_scalar_q.
1743 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1744 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1745 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1746 (thunderx2t99_asimd_lut): Add missing tbl types.
1747 (thunderx2t99_asimd_ext): Delete.
1748 (thunderx2t99_asimd_load1_1_mult): Delete.
1749 (thunderx2t99_asimd_load1_2_mult): Delete.
1750 (thunderx2t99_asimd_load1_ldp): New.
1751 (thunderx2t99_asimd_load1): New.
1752 (thunderx2t99_asimd_load2): Add missing *load2* types.
1753 (thunderx2t99_asimd_load3): New.
1754 (thunderx2t99_asimd_load4): New.
1755 (thunderx2t99_asimd_store1_1_mult): Delete.
1756 (thunderx2t99_asimd_store1_2_mult): Delete.
1757 (thunderx2t99_asimd_store2_mult): Delete.
1758 (thunderx2t99_asimd_store2_onelane): Delete.
1759 (thunderx2t99_asimd_store_stp): New.
1760 (thunderx2t99_asimd_store1): New.
1761 (thunderx2t99_asimd_store2): New.
1762 (thunderx2t99_asimd_store3): New.
1763 (thunderx2t99_asimd_store4): New.
1765 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
1767 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1768 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
1770 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
1771 Segher Boessenkool <segher@kernel.crashing.org>
1774 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1777 2018-05-17 Richard Biener <rguenther@suse.de>
1779 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1780 for pruning loop and prune defs feeding only already visited PHIs.
1782 2018-05-17 Richard Biener <rguenther@suse.de>
1784 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1786 2018-05-17 Bin Cheng <bin.cheng@arm.com>
1787 Richard Biener <rguenther@suse.de>
1789 PR tree-optimization/85793
1790 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1791 for VMAT_ELEMENTWISE.
1793 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1795 * internal-fn.h (lookup_internal_fn): Declare
1796 * internal-fn.c (lookup_internal_fn): New function.
1797 * gimple.c (gimple_build_call_from_tree): Handle calls to
1799 * gimple-pretty-print.c (dump_gimple_call): Print "." before
1800 internal function names.
1801 * tree-pretty-print.c (dump_generic_node): Likewise.
1802 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1804 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1806 * gimple-fold.h (gimple_build): Make the function forms take
1807 combined_fn rather than built_in_function.
1808 (gimple_simplify): Likewise.
1809 * gimple-match-head.c (gimple_simplify): Likewise.
1810 * gimple-fold.c (gimple_build): Likewise.
1811 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1812 rather than gimple_build_call_internal.
1813 (get_initial_defs_for_reduction): Likewise.
1814 (vect_create_epilog_for_reduction): Likewise.
1815 (vectorizable_live_operation): Likewise.
1817 2018-05-17 Martin Liska <mliska@suse.cz>
1819 * gimple-ssa-sprintf.c (format_directive): Do not use
1820 space in between 'G_' and '('.
1822 2018-05-17 Jakub Jelinek <jakub@redhat.com>
1825 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1826 even if the mask is not all ones.
1829 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1831 (ix86_gimple_fold_builtin): Likewise.
1834 * config/i386/i386.c: Include tree-vector-builder.h.
1835 (ix86_vector_shift_count): New function.
1836 (ix86_fold_builtin): Fold shift builtins by scalar count.
1837 (ix86_gimple_fold_builtin): Likewise.
1839 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1840 _mm512_setzero): New intrinsics.
1842 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1843 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1845 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1846 code generation for cases where splatting a value is not useful.
1847 * simplify-rtx.c (simplify_ternary_operation): Simplify
1848 vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1849 mode to a vec_concat.
1851 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
1853 * config.gcc: Support "goldmont-plus".
1854 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1856 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1857 PROCESSOR_GOLDMONT_PLUS.
1858 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1859 (processor_target_table): Add "goldmont-plus".
1860 (PTA_GOLDMONT_PLUS): Define.
1861 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1862 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1863 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1864 (fold_builtin_cpu): Add "goldmont-plus".
1865 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1866 (ix86_option_override_internal): Add "goldmont-plus".
1867 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1868 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1869 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1870 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1872 2018-05-17 Richard Biener <rguenther@suse.de>
1874 PR tree-optimization/85757
1875 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1876 remove defs that only feed that PHI from further processing.
1878 2018-05-16 Jim Wilson <jimw@sifive.com>
1880 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1882 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1884 2018-05-16 Mark Wielaard <mark@klomp.org>
1886 * dwarf2out.c (count_index_strings): New function.
1887 (output_indirect_strings): Call count_index_strings and generate
1888 header for dwarf_version >= 5.
1890 2018-05-16 Mark Wielaard <mark@klomp.org>
1892 * dwarf2out.c (dwarf_FORM): New function.
1893 (set_indirect_string): Use dwarf_FORM.
1894 (reset_indirect_string): Likewise.
1895 (size_of_die): Likewise.
1896 (value_format): Likewise.
1897 (output_die): Likewise.
1898 (add_skeleton_AT_string): Likewise.
1899 (output_macinfo_op): Likewise.
1900 (index_string): Likewise.
1901 (output_index_string_offset): Likewise.
1902 (output_index_string): Likewise.
1903 (count_index_strings): Likewise.
1905 2018-05-16 Carl Love <cel@us.ibm.com>
1907 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1908 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1910 2018-05-16 Martin Jambor <mjambor@suse.cz>
1912 * ipa-prop.c (ipa_free_all_edge_args): Remove.
1913 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1915 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
1917 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1918 (fnma<mode>4): Likewise.
1919 (fms<mode>4): Likewise.
1920 (fnms<mode>4): Likewise.
1921 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1922 (aarch64_fnma<mode>4): Likewise.
1923 (aarch64_fms<mode>4): Likewise.
1924 (aarch64_fnms<mode>4): Likewise.
1925 (aarch64_fnmadd<mode>4): Likewise.
1927 2018-05-16 Jason Merrill <jason@redhat.com>
1929 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
1931 2018-05-16 Richard Biener <rguenther@suse.de>
1933 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1934 (dump_stmt_cost): Declare.
1935 (add_stmt_cost): Dump cost we add.
1936 (add_stmt_costs): New function.
1937 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1939 (vect_analyze_stmt): Adjust prototype.
1940 (vectorizable_condition): Likewise.
1941 (vectorizable_live_operation): Likewise.
1942 (vectorizable_reduction): Likewise.
1943 (vectorizable_induction): Likewise.
1944 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1945 cost vector to pass to vectorizable_ and record afterwards.
1946 (vect_model_reduction_cost): Take cost vector argument and adjust.
1947 (vect_model_induction_cost): Likewise.
1948 (vectorizable_reduction): Likewise.
1949 (vectorizable_induction): Likewise.
1950 (vectorizable_live_operation): Likewise.
1951 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1952 SLP_TREE_NUMBER_OF_VEC_STMTS.
1953 (vect_analyze_slp_cost_1): Remove.
1954 (vect_analyze_slp_cost): Likewise.
1955 (vect_slp_analyze_node_operations): Take visited args and
1956 a target cost vector. Avoid processing already visited stmt sets.
1957 (vect_slp_analyze_operations): Use a local cost vector to gather
1958 costs and register those of non-discarded instances.
1959 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1960 (vect_schedule_slp_instance): Remove copying of
1961 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
1963 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1964 adding cost. Record cost entry location.
1965 (vect_prologue_cost_for_slp_op): Function to compute cost of
1966 a constant or invariant generated for SLP vect in the prologue,
1967 split out from vect_analyze_slp_cost_1.
1968 (vect_model_simple_cost): Make static. Adjust for SLP costing.
1969 (vect_model_promotion_demotion_cost): Likewise.
1970 (vect_model_store_cost): Likewise, make static.
1971 (vect_model_load_cost): Likewise.
1972 (vectorizable_bswap): Add cost vector arg and adjust.
1973 (vectorizable_call): Likewise.
1974 (vectorizable_simd_clone_call): Likewise.
1975 (vectorizable_conversion): Likewise.
1976 (vectorizable_assignment): Likewise.
1977 (vectorizable_shift): Likewise.
1978 (vectorizable_operation): Likewise.
1979 (vectorizable_store): Likewise.
1980 (vectorizable_load): Likewise.
1981 (vectorizable_condition): Likewise.
1982 (vectorizable_comparison): Likewise.
1983 (can_vectorize_live_stmts): Likewise.
1984 (vect_analyze_stmt): Likewise.
1985 (vect_transform_stmt): Adjust calls to vectorizable_*.
1986 * tree-vectorizer.c: Include gimple-pretty-print.h.
1987 (dump_stmt_cost): New function.
1989 2018-05-16 Richard Biener <rguenther@suse.de>
1991 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1992 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1993 * tree-ssa-dse.c: Include tree-ssa-loop.h.
1994 (check_name): New callback.
1995 (dse_classify_store): Track cycles via a visited bitmap of PHI
1996 defs and simplify handling of in-loop and across loop dead stores
1997 and properly fail for loop-variant refs. Handle byte-tracking with
1998 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
2001 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
2003 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
2004 (vect_get_mask_type_for_stmt): Likewise.
2005 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
2007 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
2008 to determine the statement's vector type and the vector type that
2009 should be used for calculating nunits. Deal with cases in which
2010 the type has to be deferred.
2011 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
2012 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
2013 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
2014 (vect_determine_vf_for_stmt): New functions, split out from...
2015 (vect_determine_vectorization_factor): ...here.
2016 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
2017 (vect_get_mask_type_for_stmt): New functions, split out from
2018 vect_determine_vectorization_factor.
2020 2018-05-16 Richard Biener <rguenther@suse.de>
2022 * tree-cfg.c (verify_gimple_assign_ternary): Properly
2023 verify the [VEC_]COND_EXPR embedded comparison.
2025 2018-05-15 Martin Sebor <msebor@redhat.com>
2027 PR tree-optimization/85753
2028 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
2029 RECORD_TYPE in addition to ARRAY_TYPE.
2031 2018-05-15 Martin Sebor <msebor@redhat.com>
2034 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
2036 2018-05-15 Richard Biener <rguenther@suse.de>
2038 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
2039 add by_clobber_p one. Change algorithm to collect all defs
2040 representing uses we need to walk and try reducing them to
2041 a single one before failing.
2042 (dse_dom_walker::dse_optimize_stmt): Adjust.
2044 2018-05-13 Mark Wielaard <mark@klomp.org>
2046 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
2047 (size_of_loc_descr): Likewise.
2048 (output_loc_operands): Likewise.
2049 (output_loc_operands_raw): Likewise.
2050 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
2051 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
2052 (hash_loc_operands): Likewise.
2053 (compare_loc_operands): Likewise.
2055 2018-05-14 Mark Wielaard <mark@klomp.org>
2057 * dwarf2out.c (count_index_addrs): New function.
2058 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
2060 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2062 PR tree-optimization/83648
2063 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
2064 return value as malloc candidate.
2066 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2069 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
2070 as true in call to suggest_attribute.
2072 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
2074 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
2075 -mreadonly-in-sdata.
2077 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2079 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
2081 (aarch64_crypto_aesd_fused): Likewise.
2083 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
2085 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
2086 (movsi_aarch64): Likewise.
2087 (load_pairsi): Likewise.
2088 (load_pairdi): Likewise.
2089 (store_pairsi): Likewise.
2090 (store_pairdi): Likewise.
2091 (load_pairsf): Likewise.
2092 (load_pairdf): Likewise.
2093 (store_pairsf): Likewise.
2094 (store_pairdf): Likewise.
2095 (zero_extend): Likewise.
2096 (trunc): Swap alternatives.
2097 (fcvt_target): Add '?' to prefer w over r.
2099 2018-05-14 Jakub Jelinek <jakub@redhat.com>
2102 * config/i386/i386.md: Disallow non-commutative arithmetics in
2103 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
2104 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
2105 in the peephole2 before it.
2107 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
2109 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
2110 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
2111 (ix86_handle_option): Handle -mcldemote.
2112 * config.gcc: New header.
2113 * config/i386/cldemoteintrin.h: New file.
2114 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
2115 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
2117 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2118 OPTION_MASK_ISA_CLDEMOTE.
2119 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
2120 (ix86_valid_target_attribute_inner_p): Ditto.
2121 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
2122 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
2123 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
2124 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
2125 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
2127 * config/i386/i386.opt: Add -mcldemote.
2128 * config/i386/x86intrin.h: New header.
2129 * doc/invoke.texi: Add -mcldemote.
2131 2018-05-14 Richard Biener <rguenther@suse.de>
2133 * doc/match-and-simplify.texi: Adjust :s documentation.
2135 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
2137 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
2138 intended memcpy size.
2139 (REORDER_45): Likewise.
2141 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
2143 * sort.cc: New file.
2144 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
2145 * vec.c (qsort_chk): Use gcc_qsort.
2146 * Makefile.in (OBJS-libcommon): Add sort.o.
2147 (build/sort.o): New target. Use it...
2148 (BUILD_RTL): ... here, and...
2149 (build/gencfn-macros): ... here, and...
2150 (build/genmatch): ... here.
2152 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2153 Chung-Ju Wu <jasonwucj@gmail.com>
2155 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
2156 * config/nds32/nds32-graywolf.md: New file.
2157 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
2158 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
2160 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
2161 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
2162 * config/nds32/nds32.md (pipeline_model): Add graywolf.
2163 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
2164 * config/nds32/pipelines.md: Include n15 settings.
2166 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2167 Chung-Ju Wu <jasonwucj@gmail.com>
2169 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
2170 * config/nds32/nds32-n13.md: New file.
2171 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
2172 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
2174 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
2175 * config/nds32/nds32.md (pipeline_model): Add n13.
2176 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
2177 * config/nds32/pipelines.md: Include n13 settings.
2179 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2180 Chung-Ju Wu <jasonwucj@gmail.com>
2182 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
2183 * config/nds32/nds32-n10.md: New file.
2184 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
2185 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
2187 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
2188 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
2189 * config/nds32/nds32.md (pipeline_model): Add n10.
2190 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
2191 * config/nds32/pipelines.md: Include n10 settings.
2193 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
2194 Kito Cheng <kito.cheng@gmail.com>
2195 Chung-Ju Wu <jasonwucj@gmail.com>
2197 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
2198 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2199 Add enum values for DSP extension instructions.
2200 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
2202 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
2203 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
2205 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
2206 * config/nds32/nds32-dspext.md: New file for DSP implementation.
2207 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
2208 * config/nds32/nds32-intrinsic.md: Likewise.
2209 * config/nds32/nds32_intrinsic.h: Likewise.
2210 * config/nds32/nds32-md-auxiliary.c: Likewise.
2211 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2212 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2213 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2214 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2215 * config/nds32/nds32-protos.h: New declarations for DSP extension.
2216 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2217 TYPE_DMAC in switch statement.
2218 * config/nds32/nds32.c: New checking and implementation for DSP
2219 extension instructions.
2220 * config/nds32/nds32.h: Likewise.
2221 * config/nds32/nds32.md: Likewise.
2222 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2223 * config/nds32/predicates.md: Implement new predicates for DSP
2226 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2228 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2229 Reformat alternatives and attributes so it is easier to identify
2230 which constraints/attributes go with which instruction.
2231 (mov<mode>_hardfloat32, FMOVE64): Likewise.
2232 (mov<mode>_softfloat32, FMOVE64): Likewise.
2233 (mov<mode>_hardfloat64, FMOVE64): Likewise.
2234 (mov<mode>_softfloat64, FMOVE64): Likewise.
2236 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
2238 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2240 (Basic PowerPC Built-in Functions): The new name of the
2241 subsection previously known as "PowerPC Built-in Functions".
2242 (Basic PowerPC Built-in Functions Available on all Configurations):
2244 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2245 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2246 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2247 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2249 2018-05-11 Martin Jambor <mjambor@suse.cz>
2252 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2255 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
2258 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2260 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
2262 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2263 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2264 (ix86_handle_option): Handle -mwaitpkg.
2265 * config.gcc: New header.
2266 * config/i386/cpuid.h (bit_WAITPKG): New bit.
2267 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2268 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2270 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2271 OPTION_MASK_ISA_WAITPKG.
2272 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2273 (ix86_option_override_internal): Add PTA_WAITPKG.
2274 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2275 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2276 IX86_BUILTIN_TPAUSE.
2277 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2278 __builtin_ia32_umwait and __builtin_ia32_tpause.
2279 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2280 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2281 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2282 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2283 UNSPECV_TPAUSE): New.
2284 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2285 * config/i386/i386.opt: Add -mwaitpkg.
2286 * config/i386/waitpkgintrin.h: New file.
2287 * config/i386/x86intrin.h: New header.
2288 * doc/invoke.texi: Add -mwaitpkg.
2290 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
2293 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2295 (cortex-m0): Use armv6s-m isa.
2296 (cortex-m0plus): Likewise.
2297 (cortex-m1): Likewise.
2298 (cortex-m0.small-multiply): Likewise.
2299 (cortex-m0plus.small-multiply): Likewise.
2300 (cortex-m1.small-multiply): Likewise.
2302 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
2303 Jakub Jelinek <jakub@redhat.com>
2305 PR tree-optimization/85692
2306 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2307 source permute as well.
2309 2018-05-11 Martin Liska <mliska@suse.cz>
2312 * doc/extend.texi: Document LLVM style format for no_sanitize
2315 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2317 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2318 mode_supports_vsx_dform_quad to mode_supports_dq_form.
2319 (mode_supports_vsx_dform_quad): Likewise.
2320 (mode_supports_vmx_dform): Move these functions to be next to the
2321 other mode_supports functions.
2322 (mode_supports_dq_form): Likewise.
2323 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2324 mode_supports_dq_form.
2325 (reg_offset_addressing_ok_p): Likewise.
2326 (offsettable_ok_by_alignment): Likewise.
2327 (rs6000_legitimate_offset_address_p): Likewise.
2328 (legitimate_lo_sum_address_p): Likewise.
2329 (rs6000_legitimize_address): Likewise.
2330 (rs6000_legitimize_reload_address): Likewise.
2331 (rs6000_secondary_reload_inner): Likewise.
2332 (rs6000_preferred_reload_class): Likewise.
2333 (rs6000_output_move_128bit): Likewise.
2335 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
2337 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2338 Generate SImode target register for null target.
2339 <case IX86_BUILTIN_XGETBV>: Ditto.
2340 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2341 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2343 2018-05-10 Carl Love <cel@us.ibm.com>
2345 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2346 dcbtt and dcbtstt if operands[2] is 0.
2348 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
2351 * config/i386/sse.md (usadv64qi): New expander.
2353 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
2355 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2356 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2357 -maltivec=be support.
2358 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2359 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2360 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2361 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2362 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2363 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2364 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2365 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2366 altivec_vsumsws): Adjust.
2367 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2368 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2369 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2371 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2372 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2373 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2374 (altivec_lve<VI_char>x): Delete expand.
2375 (*altivec_lve<VI_char>x_internal): Rename to...
2376 (altivec_lve<VI_char>x): ... this.
2377 (altivec_lvxl_<mode>): Delete expand.
2378 (*altivec_lvxl_<mode>_internal): Rename to ...
2379 (altivec_lvxl_<mode>): ... this.
2380 (altivec_stvxl_<mode>): Delete expand.
2381 (*altivec_stvxl_<mode>_internal): Rename to ...
2382 (altivec_stvxl_<mode>): ... this.
2383 (altivec_stve<VI_char>x): Delete expand.
2384 (*altivec_stve<VI_char>x_internal): Rename to ...
2385 (altivec_stve<VI_char>x): ... this.
2386 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2387 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2388 reduc_plus_scal_<mode>): Adjust.
2389 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2391 (rs6000_cpu_cpp_builtins): Adjust.
2392 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2393 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2394 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2395 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2396 -maltivec=be support.
2397 (rs6000_split_vec_extract_var): Adjust.
2398 (rs6000_split_v4si_init): Adjust.
2399 (swap_selector_for_mode): Delete.
2400 (altivec_expand_lvx_be, altivec_expand_stvx_be,
2401 altivec_expand_stvex_be): Delete.
2402 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2403 -maltivec=be support.
2404 (rs6000_gimple_fold_builtin): Ditto.
2405 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2407 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2408 (TARGET_DIRECT_MOVE_64BIT): Adjust.
2409 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2410 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2411 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2412 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2413 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2414 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2415 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2416 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2417 anonymous split): Adjust.
2418 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2419 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2421 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2423 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2424 when --with-gxx-include-dir is also specified.
2425 * configure: Regenerate.
2427 2018-05-09 Jim Wilson <jimw@sifive.com>
2430 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2431 * config/riscv/t-withmultilib: New.
2432 * config/riscv/withmultilib.h: New.
2433 * doc/install.texi: Document RISC-V --with-multilib-list support.
2435 2018-05-09 Richard Biener <rguenther@suse.de>
2437 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2439 (vect_bb_vectorization_profitable_p): Adjust. Compute
2440 actual scalar cost using the cost vector and the add_stmt_cost
2443 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2445 PR rtl-optimization/85645
2446 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2447 in the REG_CFA_REGISTER note for LR, don't leave it empty.
2449 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2451 PR rtl-optimization/85645
2452 * shrink-wrap.c (spread_components): Return a boolean saying if
2453 anything was changed.
2454 (try_shrink_wrapping_separate): Iterate spread_components until
2455 nothing changes anymore.
2457 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2459 PR rtl-optimization/85645
2460 * regrename.c (build_def_use): Also kill the chains that include the
2461 destination of a REG_CFA_REGISTER note.
2463 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2465 PR rtl-optimization/85645
2466 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2467 insn that has a REG_CFA_REGISTER note.
2469 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
2471 * cfgexpand.c (expand_clobber): New function.
2472 (expand_gimple_stmt_1): Use it.
2473 * tree-vect-stmts.c (vect_clobber_variable): New function,
2475 (vectorizable_simd_clone_call): ...here.
2476 (vectorizable_store): Emit a clobber either side of an
2477 IFN_STORE_LANES sequence.
2478 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2480 2018-05-09 Tom de Vries <tom@codesourcery.com>
2483 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2484 (define_insn "trap_if_false"): Add exit after trap.
2486 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
2488 PR rtl-optimization/85638
2489 * bb-reorder.c: Include common/common-target.h.
2490 (create_forwarder_block): New function extracted from...
2491 (fix_up_crossing_landing_pad): ...here. Rename into...
2492 (dw2_fix_up_crossing_landing_pad): ...this.
2493 (sjlj_fix_up_crossing_landing_pad): New function.
2494 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2495 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2496 from both partitions and exit the loop after one iteration.
2498 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
2501 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2503 (Basic PowerPC Built-in Functions): The new name of the
2504 subsection previously known as "PowerPC Built-in Functions".
2505 (Basic PowerPC Built-in Functions Available on all Configurations):
2507 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2509 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2511 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2513 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2516 2018-05-08 Jim Wilson <jimw@sifive.com>
2518 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2519 (LD_EMUL_SUFFIX): New.
2520 (LINK_SPEC): Use it.
2522 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
2524 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2526 (Basic PowerPC Built-in Functions): The new name of the
2527 subsection previously known as "PowerPC Built-in Functions".
2528 (Basic PowerPC Built-in Functions Available on all Configurations):
2530 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2532 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2534 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2536 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2539 2018-05-08 Jakub Jelinek <jakub@redhat.com>
2542 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2543 after cmpelim optimization.
2545 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
2547 * config.gcc: Support "goldmont".
2548 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2549 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2551 * config/i386/i386.c (m_GOLDMONT): Define.
2552 (processor_target_table): Add "goldmont".
2553 (PTA_GOLDMONT): Define.
2554 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2555 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2556 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2557 (fold_builtin_cpu): Add "goldmont".
2558 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2559 (ix86_option_override_internal): Add "goldmont".
2560 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2561 (processor_type): Add PROCESSOR_GOLDMONT.
2562 * config/i386/i386.md: Add CPU "glm".
2563 * config/i386/glm.md: New file.
2564 * config/i386/x86-tune.def: Add m_GOLDMONT.
2565 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2567 2018-05-08 Jakub Jelinek <jakub@redhat.com>
2570 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2572 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2573 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
2574 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
2577 * config/i386/i386.c (ix86_fold_builtin): Handle
2578 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2581 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2582 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2584 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
2587 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2588 (check_arch): Likewise.
2589 (check_fpu): Return the result rather than printing it.
2590 (end arch): Fix operator precedence.
2591 (end cpu): Likewise.
2592 (END): Print the result from check_fpu.
2594 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
2595 Alan Hayward <alan.hayward@arm.com>
2596 David Sherwood <david.sherwood@arm.com>
2598 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2599 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2600 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2601 (*fcmuo<mode>_and): New patterns.
2603 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
2605 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2606 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2607 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2608 (cmp_op, sve_imm_con): New code attributes.
2609 (SVE_COND_INT_CMP, imm_con): Delete.
2610 (cmp_op): Remove above unspecs from int attribute.
2611 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2613 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
2614 comparison-specific unspecs.
2615 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2616 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2617 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2618 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2619 (*vec_fcm<cmp_op><mode>): Rename to...
2620 (*fcm<cmp_op><mode>): ...this and adjust likewise.
2621 (*vec_fcmuo<mode>): Rename to...
2622 (*fcmuo<mode>): ...this and adjust likewise.
2623 (*pred_fcm<cmp_op><mode>): New pattern.
2624 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2625 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2627 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2629 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2630 (aarch64_emit_sve_predicated_cond): New function.
2631 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2632 (aarch64_emit_unspec_cond_or): Replace with...
2633 (aarch64_emit_sve_or_conds): ...this new function. Use
2634 aarch64_emit_sve_ptrue_op for the individual comparisons and
2635 aarch64_emit_binop to OR them together.
2636 (aarch64_emit_inverted_unspec_cond): Replace with...
2637 (aarch64_emit_sve_inverted_cond): ...this new function. Use
2638 aarch64_emit_sve_ptrue_op for the comparison and
2639 aarch64_emit_unop to invert the result.
2640 (aarch64_expand_sve_vec_cmp_float): Update after the above
2641 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
2643 2018-05-07 Nathan Sidwell <nathan@acm.org>
2645 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2646 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2647 (Backwards Compatibility): Likewise.
2649 2018-05-07 Luis Machado <luis.machado@linaro.org>
2653 2018-05-07 Luis Machado <luis.machado@linaro.org>
2655 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2656 <prefetch_dynamic_strides>: New const bool field.
2657 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2658 prefetch_dynamic_strides.
2659 (exynosm1_prefetch_tune): Likewise.
2660 (thunderxt88_prefetch_tune): Likewise.
2661 (thunderx_prefetch_tune): Likewise.
2662 (thunderx2t99_prefetch_tune): Likewise.
2663 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2664 (aarch64_override_options_internal): Update to set
2665 PARAM_PREFETCH_DYNAMIC_STRIDES.
2666 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2667 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2668 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2669 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2670 prefetch-dynamic-strides setting.
2672 2018-05-07 Luis Machado <luis.machado@linaro.org>
2674 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2675 <minimum_stride>: New const int field.
2676 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2677 minimum_stride field.
2678 (exynosm1_prefetch_tune): Likewise.
2679 (thunderxt88_prefetch_tune): Likewise.
2680 (thunderx_prefetch_tune): Likewise.
2681 (thunderx2t99_prefetch_tune): Likewise.
2682 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2683 (aarch64_override_options_internal): Update to set
2684 PARAM_PREFETCH_MINIMUM_STRIDE.
2685 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2686 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2687 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2688 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2689 stride is constant and is below the minimum stride threshold.
2691 2018-05-07 Luis Machado <luis.machado@linaro.org>
2693 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2696 2018-05-07 Luis Machado <luis.machado@linaro.org>
2698 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2699 <prefetch_dynamic_strides>: New const bool field.
2700 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2701 prefetch_dynamic_strides.
2702 (exynosm1_prefetch_tune): Likewise.
2703 (thunderxt88_prefetch_tune): Likewise.
2704 (thunderx_prefetch_tune): Likewise.
2705 (thunderx2t99_prefetch_tune): Likewise.
2706 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2707 (aarch64_override_options_internal): Update to set
2708 PARAM_PREFETCH_DYNAMIC_STRIDES.
2709 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2710 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2711 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2712 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2713 prefetch-dynamic-strides setting.
2715 2018-05-07 Luis Machado <luis.machado@linaro.org>
2717 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2718 <minimum_stride>: New const int field.
2719 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2720 minimum_stride field.
2721 (exynosm1_prefetch_tune): Likewise.
2722 (thunderxt88_prefetch_tune): Likewise.
2723 (thunderx_prefetch_tune): Likewise.
2724 (thunderx2t99_prefetch_tune): Likewise.
2725 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2726 (aarch64_override_options_internal): Update to set
2727 PARAM_PREFETCH_MINIMUM_STRIDE.
2728 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2729 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2730 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2731 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2732 stride is constant and is below the minimum stride threshold.
2734 2018-05-06 Jakub Jelinek <jakub@redhat.com>
2737 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2738 the type is addressable. Don't force op into register if it has
2741 2018-05-05 Roland McGrath <mcgrathr@google.com>
2744 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2745 any section for which we don't know a specific type it should have,
2746 regardless of name. Previously this was done only for the exact
2747 names ".init_array", ".fini_array", and ".preinit_array".
2748 (default_elf_asm_named_section): Add comment about
2749 relationship with default_section_type_flags and SECTION_NOTYPE.
2750 (get_section): Don't consider it a type conflict if one side has
2751 SECTION_NOTYPE and the other doesn't, as long as neither has the
2752 SECTION_BSS et al used in the default_section_type_flags logic.
2754 2018-05-05 Tom de Vries <tom@codesourcery.com>
2757 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2758 (workaround_barsyncs): New function.
2759 (nvptx_reorg): Use workaround_barsyncs.
2760 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2761 (define_expand "nvptx_membar_cta"): New define_expand.
2762 (define_insn "*nvptx_membar_cta"): New insn.
2764 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
2766 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2767 To improve optimization opportunities.
2768 * builtin-types.def: The new needed builtin types for the above.
2770 2018-05-04 Richard Biener <rguenther@suse.de>
2772 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2773 * gimple-ssa-store-merging.c
2774 (imm_store_chain_info::output_merged_store): Remove redundant create,
2775 release split_store vector contents on failure.
2776 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2777 scalar stmt vector on cache hit.
2779 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
2781 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2783 * config.gcc (powerpc-xilinx-eabi*): Remove.
2784 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2786 (fusion_addis_mem_combo_load): Ditto.
2787 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2789 (rs6000_cpu_cpp_builtins): Ditto.
2790 * config/rs6000/rs6000-linux.c
2791 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2792 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2793 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2795 (rs6000_setup_reg_addr_masks): Ditto.
2796 (rs6000_init_hard_regno_mode_ok): Ditto.
2797 (rs6000_option_override_internal): Ditto.
2798 (legitimate_lo_sum_address_p): Ditto.
2799 (rs6000_legitimize_address): Ditto.
2800 (rs6000_legitimize_reload_address): Ditto.
2801 (rs6000_legitimate_address_p): Ditto.
2802 (abi_v4_pass_in_fpr): Ditto.
2803 (setup_incoming_varargs): Ditto.
2804 (rs6000_gimplify_va_arg): Ditto.
2805 (rs6000_split_multireg_move): Ditto.
2806 (rs6000_savres_strategy): Ditto.
2807 (rs6000_emit_prologue_components): Ditto.
2808 (rs6000_emit_epilogue_components): Ditto.
2809 (rs6000_emit_prologue): Ditto.
2810 (rs6000_emit_epilogue): Ditto.
2811 (rs6000_elf_file_end): Ditto.
2812 (rs6000_function_value): Ditto.
2813 (rs6000_libcall_value): Ditto.
2814 * config/rs6000/rs6000.h: Ditto.
2815 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2816 (TARGET_MINMAX): ... this. New.
2817 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2818 * config/rs6000/rs6000.md: Remove Xilinx FP support.
2819 (*movsi_internal1_single): Delete.
2820 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2821 mfpu=, mxilinx-fpu): Delete.
2822 * config/rs6000/singlefp.h: Delete.
2823 * config/rs6000/sysv4.h: Remove Xilinx FP support.
2824 * config/rs6000/t-rs6000: Ditto.
2825 * config/rs6000/t-xilinx: Delete.
2826 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2827 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2828 (VStype_simple): Delete.
2829 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2830 * config/rs6000/xfpu.h: Delete.
2831 * config/rs6000/xfpu.md: Delete.
2832 * config/rs6000/xilinx.h: Delete.
2833 * config/rs6000/xilinx.opt: Delete.
2834 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2835 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2837 2018-05-04 Tom de Vries <tom@codesourcery.com>
2840 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2843 2018-05-04 Richard Biener <rguenther@suse.de>
2846 * tree-complex.c (update_complex_assignment): We are always in SSA form.
2847 (expand_complex_div_wide): Likewise.
2848 (expand_complex_operations_1): Likewise.
2849 (expand_complex_libcall): Preserve EH info of the original stmt.
2850 (tree_lower_complex): Handle removed blocks.
2851 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2852 on complex multiplication and division libcall builtins.
2854 2018-05-04 Richard Biener <rguenther@suse.de>
2857 * fold-const.c (negate_expr_p): Restrict negation of operand
2858 zero of a division to when we know that can happen without
2860 (fold_negate_expr_1): Likewise.
2862 2018-05-04 Jakub Jelinek <jakub@redhat.com>
2865 * real.h (real_nextafter): Declare.
2866 * real.c (real_nextafter): New function.
2867 * fold-const-call.c (fold_const_nextafter): New function.
2868 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2869 CASE_CFN_NEXTTOWARD.
2870 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2871 even when arg1_mode is different from arg0_mode.
2873 2018-05-03 Nathan Sidwell <nathan@acm.org>
2875 * doc/extend.texi (Deprecated Features): Remove
2877 (Backwards Compatibility): Likewise.
2878 * doc/invoke.texi (C++ Language Options): Likewise.
2879 (C++ Dialect Options): Likewise.
2881 2018-05-03 Jakub Jelinek <jakub@redhat.com>
2884 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2885 _mm512_mask_mullox_epi64): New intrinsics.
2887 2018-05-03 Tom de Vries <tom@codesourcery.com>
2890 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2891 dump files): Add offload-tree.
2893 2018-05-03 Richard Biener <rguenther@suse.de>
2895 PR tree-optimization/85615
2896 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2897 to loops not nested in BBs loop father to avoid creating multi-entry
2900 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2902 PR tree-optimization/70291
2903 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2904 arguments. Change return type to tree. Emit libcall as a new
2905 statement rather than replacing existing one when inplace_p is true.
2906 (expand_complex_multiplication_components): New function.
2907 (expand_complex_multiplication): Expand floating-point complex
2908 multiplication using the above.
2909 (expand_complex_division): Rename inner_type parameter to type.
2910 Update expand_complex_libcall call-site.
2911 (expand_complex_operations_1): Update expand_complex_multiplication
2912 and expand_complex_division call-sites.
2914 2018-05-02 Jakub Jelinek <jakub@redhat.com>
2917 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2918 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2919 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2920 the highest significant bit of the shift count mask is clear. In
2921 check whether and[sq]i3 is needed verify that all significant bits
2922 of the shift count other than the highest are set.
2924 2018-05-02 Tom de Vries <tom@codesourcery.com>
2927 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2928 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2929 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2930 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2931 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2932 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2933 __builtin_goacc_parlevel_size.
2935 2018-05-02 Richard Biener <rguenther@suse.de>
2937 PR tree-optimization/85597
2938 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2939 do not use split vect_get_vec_defs call but call vect_get_slp_defs
2942 2018-05-02 Tom de Vries <tom@codesourcery.com>
2945 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2946 dump files): Add ltrans-tree.
2948 2018-05-02 Tom de Vries <tom@codesourcery.com>
2951 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2952 dump files): Add wpa-ipa.
2954 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
2956 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
2957 powerpc*-*-linux*paired* target.
2958 * config/rs6000/750cl.h: Delete.
2959 * config/rs6000/paired.h: Delete.
2960 * config/rs6000/paired.md: Delete.
2961 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2963 * config/rs6000/rs6000-builtin.def: Remove paired float support.
2964 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2965 comment. Remove paired float support.
2966 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2967 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2969 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2970 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2972 * config/rs6000/rs6000.c: Remove paired float support.
2973 (paired_expand_vector_init, paired_expand_vector_move,
2974 paired_emit_vector_compare, paired_emit_vector_cond_expr,
2975 (paired_expand_lv_builtin, paired_expand_stv_builtin,
2976 paired_expand_builtin, paired_expand_predicate_builtin,
2977 paired_init_builtins): Delete.
2978 * config/rs6000/rs6000.h: Remove paired float support.
2979 * config/rs6000/rs6000.md: Remove paired float support.
2980 (move_from_CR_ov_bit): Delete.
2981 * config/rs6000/rs6000.opt (mpaired): Delete.
2982 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2983 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2985 2018-05-02 Richard Biener <rguenther@suse.de>
2988 * gimplify.c (gimplify_save_expr): When in SSA form allow
2989 SAVE_EXPRs to compute to SSA vars.
2991 2018-05-02 Jakub Jelinek <jakub@redhat.com>
2994 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2995 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2996 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2997 clobber operands[2], instead use a new pseudo. Formatting fixes.
2999 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
3001 PR tree-optimization/85586
3002 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
3003 exit early for statements in the same group if the accesses are
3006 2018-05-02 Tom de Vries <tom@codesourcery.com>
3009 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
3012 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
3014 PR tree-optimization/85143
3015 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
3017 2018-05-01 Tom de Vries <tom@codesourcery.com>
3020 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
3021 not found" error message.
3023 2018-05-01 Tom de Vries <tom@codesourcery.com>
3026 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
3027 * vec.c (test_ordered_remove_if): New function.
3028 (vec_c_tests): Call test_ordered_remove_if.
3029 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
3030 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
3031 * tree-vect-patterns.c (vect_pattern_recog_1): Use
3032 VEC_ORDERED_REMOVE_IF.
3034 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3036 PR tree-optimization/82665
3037 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
3038 pointer subtraction where arguments come from a memchr call.
3040 2018-05-01 Jakub Jelinek <jakub@redhat.com>
3042 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
3043 --push-state --as-needed and --pop-state instead of --as-needed and
3044 --no-as-needed if ld supports it.
3045 * configure: Regenerated.
3048 * doc/install.texi2html: Replace _002d with - and _002a with * in
3049 generated html files using sed.
3051 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3054 * gcc-rich-location.c (blank_line_before_p): New function.
3055 (use_new_line): New function.
3056 (gcc_rich_location::add_fixit_insert_formatted): New function.
3057 * gcc-rich-location.h
3058 (gcc_rich_location::add_fixit_insert_formatted): New function.
3060 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3062 * selftest.c (assert_streq): Rename "expected" and "actual" to
3063 "val1" and "val2". Extend NULL-handling to cover both inputs
3064 symmetrically, while still requiring both to be non-NULL for a pass.
3065 * selftest.h (assert_streq): Rename "expected" and "actual" to
3067 (ASSERT_EQ): Likewise.
3068 (ASSERT_EQ_AT): Likewise.
3069 (ASSERT_KNOWN_EQ): Likewise.
3070 (ASSERT_KNOWN_EQ_AT): Likewise.
3071 (ASSERT_NE): Likewise.
3072 (ASSERT_MAYBE_NE): Likewise.
3073 (ASSERT_MAYBE_NE_AT): Likewise.
3074 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
3075 the assertion to pass.
3076 (ASSERT_STREQ_AT): Likewise.
3078 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
3080 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
3081 interaction with -pie.
3083 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3085 * selftest.h: Fix alphabetization of per-source-file selftest
3088 2018-04-30 Jason Merrill <jason@redhat.com>
3090 PR c++/61982 - dead stores to destroyed objects.
3091 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
3094 2018-04-30 Jason Merrill <jason@redhat.com>
3096 * tree.c (build_clobber): New.
3097 * tree.h: Declare it.
3098 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
3100 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3102 * diagnostic-show-locus.c (layout::layout): Update for
3103 location_get_source_line returning a char_span.
3104 (struct char_span): Move to input.h.
3105 (struct correction): Update for fields in char_span becoming
3107 (struct source_line): Update for location_get_source_line
3108 returning a char_span.
3109 (layout::print_line): Likewise.
3110 * edit-context.c (edited_file::print_content): Likewise.
3111 (edited_file::print_diff_hunk): Likewise.
3112 (edited_file::print_run_of_changed_lines): Likewise.
3113 (edited_file::get_num_lines): Likewise.
3114 (edited_line::edited_line): Likewise.
3115 * final.c (asm_show_source): Likewise.
3116 * input.c (location_get_source_line): Convert return type
3117 from const char * to char_span, losing the final "line_len"
3119 (dump_location_info): Update for the above.
3120 (get_substring_ranges_for_loc): Likewise. Use a char_span
3121 when handling the literal within the line.
3122 (test_reading_source_line): Update for location_get_source_line
3123 returning a char_span.
3124 * input.h (class char_span): Move here from
3125 diagnostic-show-locus.c, converting from a struct to a class.
3126 Make data members private.
3127 (char_span::operator bool): New.
3128 (char_span::length): New.
3129 (char_span::get_buffer): New.
3130 (char_span::operator[]): New.
3131 (char_span::subspan): Make const.
3132 (char_span::xstrdup): New.
3133 (location_get_source_line): Convert return type from const char *
3134 to char_span, losing the final "line_size" param.
3136 2018-04-30 Jan Hubicka <jh@suse.cz>
3138 * lto-wrapper.c (ltrans_priorities): New static var.
3139 (cmp_priority): New.
3140 (run_gcc): Read priorities and if doing parallel build order
3141 the Makefile by them.
3143 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3145 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
3147 2018-04-30 Richard Biener <rguenther@suse.de>
3149 * tree-cfg.c (verify_address): Remove base argument, add
3150 flag whether to check TREE_ADDRESSABLE and do that.
3151 (verify_expr): Remove.
3152 (verify_types_in_gimple_reference): Add pieces from verify_expr.
3153 (verify_gimple_assign_single): Likewise.
3154 (verify_gimple_switch): Likewise.
3155 (verify_expr_location_1): Dereference tp once. Add (disabled)
3156 piece from verify_expr.
3157 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
3159 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3161 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
3163 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3165 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
3166 (small_data_pattern): Likewise.
3167 (arc_rewrite_small_data): Likewise.
3168 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
3169 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
3170 (get_symbol_alignment): New function.
3171 (legitimate_small_data_address_p): Likewise.
3172 (legitimate_scaled_address): Update, call
3173 legitimate_small_data_address_p.
3174 (output_sdata): New static variable.
3175 (arc_print_operand): Update how we handle small data operands.
3176 (arc_print_operand_address): Likewise.
3177 (arc_legitimate_address_p): Update, use
3178 legitimate_small_data_address_p.
3179 (arc_rewrite_small_data_p): Remove.
3180 (arc_rewrite_small_data_1): Likewise.
3181 (arc_rewrite_small_data): Likewise.
3182 (small_data_pattern): Likewise.
3183 (compact_sda_memory_operand): Update to use
3184 legitimate_small_data_address_p and get_symbol_alignment.
3185 (prepare_move_operands): Don't rewite sdata pattern.
3186 (prepare_extend_operands): Remove.
3187 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
3189 (zero_extendqisi2): Likewise.
3190 (zero_extendhisi2): Likewise.
3191 (extendqihi2): Likewise.
3192 (extendqisi2): Likewise.
3193 (extendhisi2): Likewise.
3197 * config/arc/constraints.md (Usd): Change it to memory constraint.
3199 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3201 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
3202 as source of std instructions.
3203 * config/arc/arc.md (movsi_insn): Update pattern predicate to
3204 allow 6-bit constants as source for store instructions.
3205 (movdi_insn): Update instruction pattern to allow 6-bit constants
3206 as source for store instructions.
3208 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
3210 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3212 2018-04-30 Nathan Sidwell <nathan@acm.org>
3213 Sandra Loosemore <sandra@codesourcery.com>
3215 * dumpfile.c (dump_open): Allow '-' for stdout.
3216 * doc/invoke.texi (Developer Options): Document dump filename
3217 determination early. Document stdin/stdout selection.
3219 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
3221 Microblaze Target: PIC data text relative
3223 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3224 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3226 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3227 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3228 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3229 New addressing mode for data-text relative position indepenedent code.
3230 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3231 'ADDRESS_SYMBOLIC_TXT_REL'.
3232 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3233 (microblaze_legitimate_pic_operand): Exclude function calls from
3234 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3235 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3237 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3238 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3239 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3240 for 'address + offset'.
3241 (microblaze_expand_prologue): Add new function prologue call for
3243 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3244 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3245 table in case of TARGET_PIC_DATA_TEXT_REL.
3246 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3247 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3248 Add new macros 'UNSPEC_TEXT',
3249 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3250 + exclude function calls from 'UNSPEC_PLT' in case of data text
3252 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3253 new target hook for generating address diff vector tables in case of
3255 * doc/tm.texi : Regenerate.
3256 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3257 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3258 of addr diff vector generation.
3259 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3260 target hook definition.
3261 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3262 Add default function for generate_pic_addr_diff_vec -> flag_pic.
3263 * doc/invoke.texi (Add new pic option): Add new microblaze pic
3264 option for data text relative.
3266 2018-04-30 Richard Biener <rguenther@suse.de>
3268 * tree-chrec.h (evolution_function_is_constant_p): Remove
3270 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3272 2018-04-30 Richard Biener <rguenther@suse.de>
3275 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3277 2018-04-30 Richard Biener <rguenther@suse.de>
3279 PR tree-optimization/28364
3280 PR tree-optimization/85275
3281 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3282 copying first exit test.
3284 2018-04-28 Mark Wielaard <mark@klomp.org>
3286 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3288 (dwarf_AT): Handle DW_AT_addr_base.
3289 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3291 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
3294 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3295 (*ashl<dwi>3_doubleword_mask_1): Ditto.
3296 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3297 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3299 2018-04-28 Richard Biener <rguenther@suse.de>
3301 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3302 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3303 to reflect use. Only add interesting stmts.
3305 2018-04-27 Martin Jambor <mjambor@suse.cz>
3308 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3309 the jump function allows for passing through aggregate values.
3311 2018-04-27 David Malcolm <dmalcolm@redhat.com>
3313 * input.h (in_system_header_at): Convert from macro to inline
3315 (from_macro_expansion_at): Likewise.
3316 (from_macro_definition_at): Likewise.
3318 2018-04-27 Jeff Law <law@redhat.com>
3320 * config.gcc: Mark tile* targets as deprecated/obsolete.
3322 2018-04-27 Richard Biener <rguenther@suse.de>
3324 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3327 2018-04-27 Richard Biener <rguenther@suse.de>
3329 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3331 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
3333 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3334 with Yd constraint. Set "preferred_for_speed" attribute from
3335 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3337 (*movdi_internal): Ditto.
3338 (movti_interunit splitters): Remove
3339 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3340 (movdi_interunit splitters): Ditto.
3341 * config/i386/constraints.md (Ye): Remove.
3342 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3344 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3347 * config/aarch64/constraints.md (Usg): Limit to 31.
3350 2018-04-27 Jakub Jelinek <jakub@redhat.com>
3352 PR tree-optimization/85529
3353 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3354 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3355 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3356 zero extension or masking of the MSB bit.
3357 (optimize_range_tests): Add FIRST_BB argument, pass it through
3358 to optimize_range_tests_var_bound.
3359 (maybe_optimize_range_tests, reassociate_bb): Adjust
3360 optimize_range_tests callers.
3362 2018-04-26 Richard Biener <rguenther@suse.de>
3363 Jakub Jelinek <jakub@redhat.com>
3365 * cgraph.h (symbol_table): Just declare debug method here.
3366 * symtab.c (symbol_table::debug): Define.
3368 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
3370 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3372 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
3374 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3375 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3376 (*movdi_internal): Substitute Yi and Yj constraint with x
3377 and Ym and Yn constraint with y constraint. Update "isa"
3378 attribute and set "preferred_for_speed" attribute from
3379 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3380 (*movsi_internal): Ditto.
3381 (*movdf_internal): Ditto.
3382 (*movsf_internal): Ditto.
3383 (*zero_extendsidi2): Ditto.
3384 * config/i386/sse.md (vec_set<mode>_0): Ditto.
3385 (sse2_loadld): Ditto.
3386 (*vec_extract<ssevecmodelower>_0): Ditto.
3387 (*vec_extractv4si_0_zext_sse4): Ditto.
3388 (vec_concatv2di): Ditto.
3389 (*vec_dup<mode>): Ditto.
3390 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3391 * config/i386/constraints.md (Yi): Remove.
3396 2018-04-26 Nathan Sidwell <nathan@acm.org>
3398 * dumpfile.c (dump_open): New.
3399 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3400 (dump_finish): Detect stdio/stderr by value not name.
3402 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
3404 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3406 2018-04-26 Tom de Vries <tom@codesourcery.com>
3409 * config/nvptx/nvptx.c (verify_neutering_jumps)
3410 (verify_neutering_labels): New function
3411 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3413 2018-04-26 Tom de Vries <tom@codesourcery.com>
3416 * config/nvptx/nvptx.c (needs_neutering_p): New function.
3417 (nvptx_single): Use needs_neutering_p to skip over insns that do not
3420 2018-04-26 Richard Biener <rguenther@suse.de>
3421 Tom de Vries <tom@codesourcery.com>
3424 * lto-streamer-out.c (output_function): Fixup loops if required to match
3425 discovery done in the reader.
3427 2018-04-26 Richard Biener <rguenther@suse.de>
3429 PR tree-optimization/85116
3430 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3431 have a loop exit from the single latch predecessor. Remove
3432 case of header with just condition.
3433 (ch_base::copy_headers): Exclude infinite loops from any
3435 (pass_ch::execute): Record exits.
3437 2018-04-26 Richard Biener <rguenther@suse.de>
3439 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3440 prologue cost vector and pass it to vect_get_load_cost.
3441 (vect_get_peeling_costs_all_drs): Likewise.
3442 (vect_peeling_hash_get_lowest_cost): Likewise.
3443 (vect_enhance_data_refs_alignment): Likewise.
3445 2018-04-26 Richard Biener <rguenther@suse.de>
3448 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3449 checking of integer<->pointer conversions.
3450 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3451 sign-/zero-extending pointer types.
3452 (expand_omp_for_static_chunk): Likewise.
3454 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
3455 Jean Lee <xiaoyur347@gmail.com>
3457 * config/mips/mips.c (mips_asan_shadow_offset): New function.
3458 (TARGET_ASAN_SHADOW_OFFSET): Define.
3459 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3460 true for -fsanitize=address.
3462 2018-04-25 Mark Wielaard <mark@klomp.org>
3464 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3467 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3469 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3470 than "alu", remove explicit "memory" and "imm_disp" attributes.
3471 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3474 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3475 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3476 gen_lowpart_no_emit.
3478 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
3481 * config/i386/i386.c (ix86_expand_builtin): Change memory
3482 operand to XI, extend p0 to Pmode.
3483 * config/i386/i386.md: Change unspec volatile and operand
3484 1 mode to XI, change operand 0 mode to P.
3486 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3488 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3489 GET_MODE_MASK before any checking.
3490 (nds32_can_use_bset_p): Likewise.
3491 (nds32_can_use_btgl_p): Likewise.
3493 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3495 * config/nds32/nds32-doubleword.md: New define_split pattern for
3496 illegal register number.
3498 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3500 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3502 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3504 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3506 2018-04-25 Richard Biener <rguenther@suse.de>
3508 * lto-streamer.h (LTO_major_version): Bump to 8.
3510 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3512 * BASE-VER: Set to 9.0.0.
3514 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
3516 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3517 in __abskf2 and __powikf2.
3519 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3522 * config/aarch64/constraints.md (Usg, Usj): New constraints.
3523 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3524 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3525 Use the above on operand 2. Reindent.
3526 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3528 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
3531 * common/config/i386/i386-common.c (ix86_handle_option): Don't
3533 * config/i386/i386.opt (mcet): Removed.
3534 * doc/install.texi: Remove -mcet documentation.
3535 * doc/invoke.texi: Likewise.
3537 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
3540 * doc/install.texi: Remove -mcet from bootstrap-cet.
3542 2018-04-24 Jakub Jelinek <jakub@redhat.com>
3545 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3546 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3550 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3551 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3552 containing a CONST_VECTOR.
3554 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
3556 * doc/install.texi: Update newlib dependency for nvptx.
3558 2018-04-24 Jakub Jelinek <jakub@redhat.com>
3561 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3562 instead of INTVAL when shifting x left.
3564 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
3566 PR tree-optimization/85478
3567 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3568 vect_grouped_store_supported for single element vectors.
3570 2018-04-24 Richard Biener <rguenther@suse.de>
3573 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3574 load cost increase to the case of non-constant step.
3576 2018-04-24 Jakub Jelinek <jakub@redhat.com>
3579 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3580 destination if any_malformed_asm.
3582 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
3585 * expr.c (store_field): In the bitfield case, if the value comes from
3586 a function call and is returned in registers by means of a PARALLEL,
3587 do not change the mode of the temporary unless BLKmode and VOIDmode.
3589 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
3591 PR rtl-optimization/85423
3592 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3593 dependencies to debug insns when the previous insn is non-debug.
3595 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
3597 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3598 enums into a single definition.
3599 (fls): Fix predicates and printing.
3602 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
3604 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3605 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3606 and short u6 immediate.
3607 (check_if_valid_sleep_operand): Remove.
3608 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3610 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3612 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3613 flag_always_save_lp condition.
3614 * config/nds32/nds32.opt (malways-save-lp): New option.
3616 2018-04-22 Shiva Chen <shiva0217@gmail.com>
3618 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3619 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3620 * config/nds32/nds32.h
3621 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3622 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3624 2018-04-22 Shiva Chen <shiva0217@gmail.com>
3626 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3627 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3629 2018-04-22 Shiva Chen <shiva0217@gmail.com>
3630 Chung-Ju Wu <jasonwucj@gmail.com>
3632 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3634 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3635 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3637 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3639 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3641 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3643 * config/nds32/nds32-protos.h (nds32_data_alignment,
3644 nds32_local_alignment): Declare.
3645 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3646 nds32_local_alignment): New functions.
3647 (TARGET_CONSTANT_ALIGNMENT): Define.
3648 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3650 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3652 * config/nds32/nds32.c
3653 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3654 (TARGET_MODES_TIEABLE_P): Likewise.
3656 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3658 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3661 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
3662 Chung-Ju Wu <jasonwucj@gmail.com>
3664 * config/nds32/constants.md (unspec_volatile_element): Add enum values
3665 for unaligned access.
3666 * config/nds32/nds32-intrinsic.c: Implementation of expanding
3668 * config/nds32/nds32-intrinsic.md: Likewise.
3669 * config/nds32/nds32_intrinsic.h: Likewise.
3670 * config/nds32/nds32.h (nds32_builtins): Likewise.
3671 * config/nds32/nds32.opt (munaligned-access): New option.
3672 * config/nds32/nds32.c (nds32_asm_file_start): Display
3673 flag_unaligned_access status.
3675 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
3677 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3678 -mno-relax is present.
3679 * config/riscv/linux.h (LINK_SPEC): Ditto.
3681 2018-04-20 Martin Sebor <msebor@redhat.com>
3684 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3686 (gimple_fold_builtin_stxcpy_chk): Same.
3687 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3689 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
3692 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3693 __powikf2 when long double is IEEE 128-bit.
3695 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
3697 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3698 step to make sure stack always aligned.
3700 2018-04-20 Carl Love <cel@us.ibm.com>
3703 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3704 size check for arg0.
3706 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
3707 Tom de Vries <tom@codesourcery.com>
3710 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3711 Emit insns for calls too.
3712 (nvptx_find_par): Always look for worker-level predecessor insn.
3713 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
3715 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3716 (nvptx_process_pars): Propagate frames for calls.
3718 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
3721 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3723 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3724 (ix86_handle_option): Don't handle OPT_mibt.
3725 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3727 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3729 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3730 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3731 (ix86_target_macros): Define __CET__ with flag_cf_protection
3732 for -fcf-protection.
3733 * config/i386/i386.c (isa2_opts): Remove -mibt.
3734 * config/i386/i386.h (TARGET_IBT): Removed.
3735 (TARGET_IBT_P): Likewise.
3736 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3737 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3738 * config/i386/i386.opt (mcet): Update help message.
3741 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
3742 -mcet as an alias for -mshstk.
3744 2018-04-20 Richard Biener <rguenther@suse.de>
3747 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3748 complexity by forcing a single use of the multiply operand.
3750 2018-04-20 Martin Jambor <mjambor@suse.cz>
3753 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3754 recursion dependency to only apply to non-clones.
3756 2018-04-20 Martin Jambor <mjambor@suse.cz>
3759 * ipa-cp.c (create_specialized_node): Check that clones of
3760 self-recursive edges exist during IPA-CP.
3762 2018-04-19 Toon Moene <toon@moene.org>
3764 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3767 2018-04-19 Jakub Jelinek <jakub@redhat.com>
3769 PR tree-optimization/85467
3770 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3771 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
3772 VECTOR_CST element to type.
3774 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
3777 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3778 * config/i386/i386.md (builtin_setjmp_setup): Removed.
3779 (builtin_longjmp): Likewise.
3780 (save_stack_nonlocal): New pattern.
3781 (restore_stack_nonlocal): Likewise.
3783 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
3786 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3787 Replace ASM_OUTPUT_LABEL with fprintf.
3789 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
3792 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3793 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3794 * config/i386/i386-c.c (ix86_target_macros_internal): Also
3795 define __IBT__ and __SHSTK__ for -fcf-protection.
3796 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3798 (ix86_trampoline_init): Likewise.
3799 (x86_output_mi_thunk): Likewise.
3800 (ix86_notrack_prefixed_insn_p): Likewise.
3801 (ix86_option_override_internal): Don't disallow -fcf-protection.
3802 * config/i386/i386.md (rdssp<mode>): Also enable for
3804 (incssp<mode>): Likewise.
3805 (nop_endbr): Likewise.
3806 * config/i386/i386.opt (mcet): Change help message to built-in
3810 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3811 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
3812 enable CET built-in functions.
3814 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
3816 * common/config/i386/i386-common.c
3817 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3818 OPTION_MASK_ISA_MOVDIRI_UNSET,
3819 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3820 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3821 * config.gcc (movdirintrin.h): New header.
3822 * config/i386/cpuid.h (bit_MOVDIRI,
3823 bit_MOVDIR64B): New bits.
3824 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3826 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3827 (VOID, PVOID, PCVOID)): New function types.
3828 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3829 __builtin_ia32_directstoreu_u64,
3830 __builtin_ia32_movdir64b): New builtins.
3831 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3832 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3834 (ix86_valid_target_attribute_inner_p): Ditto.
3835 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3836 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3837 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3838 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3839 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3840 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3841 (movdiri<mode>, movdir64b_<mode>): New.
3842 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3843 * config/i386/immintrin.h: Include movdirintrin.h.
3844 * config/i386/movdirintrin.h: New file.
3845 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3847 2018-04-19 Richard Biener <rguenther@suse.de>
3850 * cfg.c (clear_bb_flags): When loop state says we have
3851 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3853 2018-04-19 Richard Biener <rguenther@suse.de>
3855 PR tree-optimization/84737
3856 * tree-vect-data-refs.c (vect_copy_ref_info): New function
3857 copying restrict info.
3858 (vect_setup_realignment): Use it.
3859 * tree-vectorizer.h (vect_copy_ref_info): Declare.
3860 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3861 the first DR to all generated stores.
3862 (vectorizable_load): Likewise for loads.
3864 2018-04-19 Jakub Jelinek <jakub@redhat.com>
3866 PR tree-optimization/85446
3867 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3868 the integral and pointer types to have the same precision.
3870 * doc/install.texi: Document --disable-cet being the default and
3873 2018-04-18 Martin Liska <mliska@suse.cz>
3875 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3878 2018-04-18 Martin Liska <mliska@suse.cz>
3881 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
3884 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3885 arguments if they are comparable.
3887 2018-04-18 Martin Liska <mliska@suse.cz>
3890 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
3893 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3896 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
3899 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3900 ENDBR after calling __morestack.
3902 2018-04-18 David Malcolm <dmalcolm@redhat.com>
3905 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3906 by using gcc_base_ver to generate a gcc_driver_version, and use
3907 it when generating GCC_DRIVER_NAME.
3908 * configure: Regenerate.
3910 2018-04-18 Jakub Jelinek <jakub@redhat.com>
3913 * config.gcc: Obsolete powerpc*-*-*spe*.
3915 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3918 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3919 (stabstr_D): Change type of unum from unsigned int to
3920 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
3923 2018-04-17 Jim Wilson <jimw@sifive.com>
3926 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3927 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3928 Set arg_pointer_offset after using pretend_args_size.
3930 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3932 PR rtl-optimization/85431
3933 * dse.c (record_store): Ignore zero width stores.
3936 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
3937 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3938 __builtin_stack_restore rather than after it.
3939 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3940 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3941 argument instead of virtual_dynamic_stack_rtx.
3943 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
3945 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3947 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3948 Add note to error message to explain internal mapping of overloaded
3949 built-in function name to non-overloaded built-in function name.
3950 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3953 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
3956 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3957 where the inputs overlap with the output.
3959 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3961 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3962 (=v, v) alternative and explicit "memory" attribute.
3963 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
3964 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3966 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3967 "sselog1" type instead of "sselog".
3968 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3969 "sselog". Remove explicit "memory" attribute.
3970 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3971 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3973 (vec_extract_hi_v32hi): Merge all alternatives into one, use
3974 "sselog1" type instead of "sselog". Remove explicit "memory"
3976 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3977 use "sselog1" type instead of "sselog". Remove explicit "memory"
3979 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3980 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3982 (vec_extract_hi_v64qi): Merge all alternatives into one, use
3983 "sselog1" type instead of "sselog". Remove explicit "memory"
3985 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3986 use "sselog1" type instead of "sselog". Remove explicit "memory"
3990 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3993 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3996 2018-04-17 Martin Jambor <mjambor@suse.cz>
3999 * ipa-cp.c (create_specialized_node): Call
4000 expand_all_artificial_thunks if necessary.
4002 2018-04-17 Martin Liska <mliska@suse.cz>
4005 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
4006 in message, remote space in between '_G' and '('.
4008 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4011 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
4012 avx512f_vmcmp<mode>3<round_saeonly_name>,
4013 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
4014 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
4015 avx512f_rndscale<mode><round_saeonly_name>,
4016 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
4017 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
4018 Use %<iptr>2 instead of %2 for -masm=intel.
4019 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
4020 avx512f_vcvttss2usi<round_saeonly_name>,
4021 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
4023 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
4024 avx512f_vcvttsd2usi<round_saeonly_name>,
4025 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
4026 Use %q1 instead of %1 for -masm=intel.
4027 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
4028 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
4029 of %3 for -masm=intel.
4030 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
4032 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
4034 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
4036 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
4037 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
4039 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
4041 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
4042 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
4043 %g1 and one with %0 and %1.
4044 (avx512er_vmrcp28<mode><round_saeonly_name>,
4045 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
4047 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
4048 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
4049 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
4050 of %0 and %{%4%} for -masm=intel.
4051 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
4052 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
4053 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
4054 order of %0 and %{%5%}%{z%} for -masm=intel.
4056 2018-04-17 Jan Hubicka <jh@suse.cz>
4059 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
4061 2018-04-17 Martin Liska <mliska@suse.cz>
4064 * multiple_target.c (create_dispatcher_calls): Set apostrophes
4065 for target_clone error message. Make default implementation
4066 clone to be a local declaration.
4067 (separate_attrs): Add new argument and check for an empty
4069 (expand_target_clones): Handle it.
4070 (ipa_target_clone): Make redirection just for target_clones
4073 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
4074 Tom de Vries <tom@codesourcery.com>
4077 * omp-expand.c (expand_oacc_for): Add dummy false branch for
4078 tiled basic blocks without omp continue statements.
4080 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
4083 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
4084 vec_extract expression as having side effects to make sure it gets
4087 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
4090 * config/i386/i386.c (get_builtin_code_for_version): Check
4093 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
4096 * gcc/config.gcc: Support "skylake".
4097 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
4099 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
4100 (processor_target_table): Add "skylake".
4101 (ix86_option_override_internal): Add "skylake".
4102 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
4103 PROCESSOR_CANNONLAKE.
4104 (get_builtin_code_for_version): Fix priority for
4105 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
4106 PROCESSOR_SKYLAKE-AVX512.
4107 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
4108 (processor_type): Add PROCESSOR_SKYLAKE.
4110 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
4111 Jason Merrill <jason@redhat.com>
4114 * convert.c (convert_to_integer_1): Use direct recursion for
4115 enumeral types and types with a precision less than the number
4116 of bits in their mode.
4118 2018-04-16 Julia Koval <julia.koval@intel.com>
4121 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
4122 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
4124 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
4127 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
4128 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
4129 and -mno-direct-move.
4131 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
4134 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
4135 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
4136 Ensure negative shifts result in {0}.
4138 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
4140 PR rtl-optimization/79916
4141 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
4142 regs (if any) to define how to gnerate SD moves when LRA is in
4145 2018-04-13 Jakub Jelinek <jakub@redhat.com>
4147 PR rtl-optimization/85393
4148 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
4149 * except.c (expand_dw2_landing_pad_for_region): Make static.
4150 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
4151 a label and unconditional jump to old_bb, rather than
4152 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
4155 PR rtl-optimization/85376
4156 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
4157 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
4158 instead of a specific value.
4160 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
4161 Bin Cheng <bin.cheng@arm.com>
4163 PR tree-optimization/82965
4164 PR tree-optimization/83991
4165 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
4166 by_profile_only parameter.
4167 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
4168 information if the loop was predicted to iterate too many times.
4169 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
4171 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
4174 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
4177 2018-04-13 Martin Liska <mliska@suse.cz>
4178 Jakub Jelinek <jakub@redhat.com>
4181 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
4182 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
4183 * builtins.c (expand_builtin_memory_copy_args): Use
4184 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
4185 handle dest_addr == pc_rtx.
4187 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
4190 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
4191 asked to not generate direct moves.
4192 (fix_trunc<mode>si2_stfiwx): Similar.
4193 (fix_trunc<mode>si2_internal): Similar.
4195 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4198 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
4199 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
4200 lookup if dest in some wider mode is known to be const0_rtx and
4201 if so, record permanent equivalence for it to be ZERO_EXTEND of
4202 the narrower mode destination.
4204 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
4206 * lto-streamer-out.c (output_function): Revert 259346.
4207 * omp-expand.c (expand_oacc_for): Likewise.
4209 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
4211 PR rtl-optimization/85354
4212 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4213 * sel-sched.c (sel_global_init): ... here.
4215 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
4218 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4219 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4220 mode for PE-COFF targets.
4221 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4222 (i386_pe_asm_lto_end): Likewise.
4223 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4224 (TARGET_ASM_LTO_END): Likewise.
4225 * config/i386/winnt.c (saved_debug_info_level): New static variable.
4226 (i386_pe_asm_lto_start): New function.
4227 (i386_pe_asm_lto_end): Likewise.
4229 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
4230 Richard Biener <rguenther@suse.de>
4233 * lto-streamer-out.c (output_function): Fix CFG loop state before
4235 * omp-expand.c (expand_oacc_for): Handle calls to internal
4236 functions like regular functions.
4238 2018-04-12 Richard Biener <rguenther@suse.de>
4241 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4242 for the early LTO debug to properly generate references to it
4243 during DIE emission. Do not re-use that for the skeleton for
4245 (dwarf2out_early_finish): Likewise.
4247 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4250 * config/i386/sse.md
4251 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4252 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4253 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4254 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4255 and output is a reg, avoid creating invalid lowpart subreg, but
4256 instead split into a 512-bit move. Don't split if not AVX512VL,
4257 input is xmm16+ reg and output is a mem.
4258 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4259 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4260 xmm16+ reg and output is a mem.
4262 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4264 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4265 also for flag_dwarf2_cfi_asm.
4267 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4269 PR rtl-optimization/85342
4270 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4271 a bool scalar var inside of the loop instead. Don't try to update
4272 recog_data.operand after failed apply_change_group.
4274 2018-04-12 Tom de Vries <tom@codesourcery.com>
4277 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4278 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
4279 array with flexible array member as array without given dimension.
4280 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4281 argument for undefined param to true.
4283 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
4286 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4287 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4288 from PowerPC section.
4289 * config/rs6000/sysv4.opt (mcall-): Improve help text.
4290 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4291 help text that is too long.
4292 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4293 help text that is too long.
4294 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4295 help text that is too long.
4297 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
4299 * config/alpha/alpha.md (stack_probe_internal): Rename
4300 from "probe_stack". Update all callers.
4302 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4304 PR rtl-optimization/84566
4305 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4306 sched_macro_fuse_insns.
4308 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4311 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4312 (compute_block_dependences): ... from here.
4314 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4316 PR tree-optimization/85331
4317 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4318 from int to HOST_WIDE_INT.
4320 2018-04-11 Martin Jambor <mjambor@suse.cz>
4323 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4324 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4325 not the same as the source val.
4326 (cgraph_edge_brings_value_p): New parameter.
4327 (gather_edges_for_value): Pass destination value to
4328 cgraph_edge_brings_value_p.
4329 (perhaps_add_new_callers): Likewise.
4330 (get_info_about_necessary_edges): Likewise and exclude values brought
4331 only by self-recursive edges.
4332 (create_specialized_node): Redirect only clones of self-calling edges.
4333 (+self_recursive_pass_through_p): New function.
4334 (find_more_scalar_values_for_callers_subset): Use it.
4335 (find_aggregate_values_for_callers_subset): Likewise.
4336 (known_aggs_to_agg_replacement_list): Removed.
4337 (decide_whether_version_node): Re-calculate known constants for all
4338 remaining context clones.
4340 2018-04-11 Richard Biener <rguenther@suse.de>
4343 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4344 from early DWARF output.
4345 (dwarf2out_early_finish): Output line info unconditionally into
4346 early DWARF and add reference to it.
4348 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4351 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4352 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4353 other than V2DFmode using iptr mode attribute.
4354 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4356 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4358 PR rtl-optimization/84659
4359 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4361 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4364 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4366 (output_loc_list): Pass address of a dummy size variable even in the
4367 locview handling loop.
4368 (index_location_lists): Add comment on why skip_loc_list_entry can't
4371 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
4374 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4377 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
4380 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4381 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4382 and -mstring-compare-inline-limit.
4384 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4387 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4388 for stack clash protection in a register whenever we need it to be in
4391 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4393 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4394 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4396 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4399 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4401 (mlong-double-): Ditto.
4402 * config/rs6000/sysv4.opt (msdata=): Ditto.
4403 (mtls-size=): Ditto.
4405 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
4407 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4408 erroneous entries for
4409 "vector int vec_ldl (int, long int *)", and
4410 "vector unsigned int vec_ldl (int, unsigned long int *)".
4411 Add comments and entries for
4412 "vector bool char vec_ldl (int, bool char *)",
4413 "vector bool short vec_ldl (int, bool short *)",
4414 "vector bool int vec_ldl (int, bool int *)",
4415 "vector bool long long vec_ldl (int, bool long long *)",
4416 "vector pixel vec_ldl (int, pixel *)",
4417 "vector long long vec_ldl (int, long long *)",
4418 "vector unsigned long long vec_ldl (int, unsigned long long *)".
4419 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4420 type tree bool_long_long_type_node and correct definition of
4421 bool_V2DI_type_node to make reference to this new type tree.
4422 (rs6000_mangle_type): Replace erroneous reference to
4423 bool_long_type_node with bool_long_long_type_node.
4424 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4425 comments to emphasize sign distinctions for char and int types and
4426 replace RS6000_BTI_bool_long constant with
4427 RS6000_BTI_bool_long_long constant. Also add comment to restrict
4428 use of RS6000_BTI_pixel.
4429 (bool_long_type_node): Remove this macro definition.
4430 (bool_long_long_type_node): New macro definition
4432 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4434 PR rtl-optimization/85300
4435 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4436 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4437 simplify_unary_operation fails.
4439 2018-04-10 Martin Liska <mliska@suse.cz>
4441 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4442 cgraph_edge and ipa_ref.
4444 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4448 * config/i386/sse.md
4449 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4450 computation of the VEC_MERGE selector from mask.
4451 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4452 Fix decoding of the VEC_MERGE selector into mask.
4454 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
4456 PR tree-optimization/85286
4457 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4459 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
4461 * final.c (final_1): Set insn_last_address as well as
4462 insn_current_address.
4464 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4467 * explow.c (emit_stack_probe): Call validize_mem on memory location
4468 before passing it to gen_probe_stack. Create address operand and
4469 legitimize it for the probe_stack_address case.
4471 2018-04-09 Jan Hubicka <jh@suse.cz>
4474 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4475 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4476 * tree.c (free_lang_data_in_type): Fix handling of binfos;
4478 (free_lang_data): Rebuild type inheritance graph.
4480 2018-04-09 Martin Sebor <msebor@redhat.com>
4482 * invoke.texi (-finline-small-functions): Mention other optimization
4484 (-findirect-inlining, -fpartial-inlining): Same.
4485 (-finline-functions-called-once): Same.
4486 (-freorder-blocks-and-partition): Same.
4488 2018-04-09 Jan Hubicka <jh@suse.cz>
4491 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4492 jumps; choose last target that matches the criteria (i.e.
4493 no partition changes for non-crossing jumps).
4494 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4495 support for redirecting crossing jumps to non-crossing.
4497 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
4499 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4500 also for naked functions.
4502 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
4504 * config/arc/arc.md (add_shift): New pattern.
4505 (add_shift2): Likewise.
4506 (sub_shift): Likewise.
4507 (sub_shift_cmp0_noout): Likewise.
4508 (compare_si_ashiftsi): Likewise.
4509 (xbfu_cmp0_noout): New combine pattern.
4510 (xbfu_cmp0"): Likewise.
4511 (movsi_set_cc_insn): Place the predicable variant first.
4512 (commutative_binary_cmp0_noout): Remove clobber.
4513 (commutative_binary_cmp0): New pattern.
4514 (noncommutative_binary_cmp0): Likewise.
4515 (noncommutative_binary_cmp0_noout): Likewise.
4516 (noncommutative_binary_comparison_result_used): Removed.
4517 (rsub_cmp0): New pattern.
4518 (rsub_cmp0_noout): Likewise.
4519 (extzvsi): Changed, keep only meaningful variants.
4520 (SQH, SEZ): New iterators.
4521 (SQH_postfix): New mode attribute.
4522 (SEZ_prefix): New code attribute.
4523 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4524 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4525 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4527 (noncommutative_operator): Check the availability of barrel
4530 2018-04-09 Richard Biener <rguenther@suse.de>
4532 PR tree-optimization/85284
4533 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4534 Only use the niter constraining form of simple_iv when the exit
4537 2018-04-09 Tom de Vries <tom@codesourcery.com>
4540 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4541 (define_expand "*memory_barrier"): New define_expand.
4542 (define_insn "memory_barrier"): New insn.
4544 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4546 PR rtl-optimization/80463
4547 PR rtl-optimization/83972
4548 PR rtl-optimization/83480
4550 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4551 correct producer for the insn.
4552 (tidy_control_flow): Fixup seqnos in case of debug insns.
4554 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4556 PR rtl-optimization/83913
4558 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4559 different sched-times when merging exprs.
4561 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4563 PR rtl-optimization/83962
4565 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4566 tidy_fallthru_edge and tidy_control_flow.
4568 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4570 PR rtl-optimization/83530
4572 * sel-sched.c (force_next_insn): New global variable.
4573 (remove_insn_for_debug): When force_next_insn is true, also leave only
4574 next insn in the ready list.
4575 (sel_sched_region): When the region wasn't scheduled, make another pass
4576 over it with force_next_insn set to 1.
4578 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
4580 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4582 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4583 for interrupt control.
4584 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4585 functions for interrupt control.
4586 * config/nds32/nds32-intrinsic.md: Likewise.
4587 * config/nds32/nds32_intrinsic.h: Likewise.
4588 * config/nds32/nds32.h (nds32_builtins): Likewise.
4590 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
4592 * config/nds32/nds32.c (nds32_init_machine_status,
4593 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4594 strict_aligned_p field.
4595 (nds32_expand_to_rtl_hook): New function.
4596 (TARGET_EXPAND_TO_RTL_HOOK): Define.
4597 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4599 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4600 Chung-Ju Wu <jasonwucj@gmail.com>
4602 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4603 * config/nds32/nds32-n7.md: New file.
4604 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4605 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4607 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4608 * config/nds32/nds32.md (pipeline_model): Add n7.
4609 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4610 * config/nds32/pipelines.md: Include n7 settings.
4612 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4613 Chung-Ju Wu <jasonwucj@gmail.com>
4615 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4616 * config/nds32/nds32-e8.md: New file.
4617 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4618 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4620 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4621 * config/nds32/nds32.md (pipeline_model): Add e8.
4622 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4623 * config/nds32/pipelines.md: Include e8 settings.
4625 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4626 Chung-Ju Wu <jasonwucj@gmail.com>
4628 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4629 * config/nds32/nds32-n8.md: New file.
4630 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4631 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4633 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4634 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4635 * config/nds32/nds32.md (pipeline_model): Add n8.
4636 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4637 * config/nds32/pipelines.md: Include n8 settings.
4639 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4640 Chung-Ju Wu <jasonwucj@gmail.com>
4642 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4643 * config/nds32/nds32-n9-2r1w.md: New file.
4644 * config/nds32/nds32-n9-3r2w.md: New file.
4645 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4646 nds32_register_ports): New or modify for cpu n9.
4647 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4649 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4650 * config/nds32/nds32-utils.c: New file.
4651 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4652 TARGET_MUL_SLOW): Define.
4653 * config/nds32/nds32.md (pipeline_model): New attribute.
4654 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4655 New options that support cpu n9.
4656 * config/nds32/pipelines.md: Include n9 settings.
4657 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4659 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
4661 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4662 information if necessary.
4663 (output_cond_branch_compare_zero): Likewise.
4664 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4665 (nds32_target_alignment): Refine for alignment.
4666 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4667 (FUNCTION_BOUNDARY): Modify.
4668 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4670 * config/nds32/nds32.opt (malways-align, malign-functions): New.
4672 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
4674 * config/nds32/constants.md (unspec_volatile_element): Add values for
4675 TLB operation and data prefetch.
4676 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4677 functions for TLB operation and data prefetch.
4678 * config/nds32/nds32-intrinsic.md: Likewise.
4679 * config/nds32/nds32_intrinsic.h: Likewise.
4680 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4681 (nds32_print_operand): Likewise.
4682 * config/nds32/nds32.h (nds32_builtins): Likewise.
4684 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
4685 Andrew Pinski <pinsika@gcc.gnu.org>
4688 * match.pd: Use constant_boolean_node of correct type instead of
4689 boolean_true_node or boolean_false_node for simplifying
4690 pointer comparisons to zero.
4692 2018-04-07 Jakub Jelinek <jakub@redhat.com>
4694 PR tree-optimization/80021
4695 * tree.c (verify_type_variant): Make error call in verify_variant_match
4696 translatable and remove final full stop.
4698 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4700 * config/nds32/constants.md (unspec_volatile_element): Add
4701 UNSPEC_VOLATILE_EH_RETURN.
4702 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4703 nds32_output_stack_pop): Support dwarf exception handling process.
4704 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4705 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4706 exception handling process.
4707 (nds32_compute_stack_frame): Likewise.
4708 (nds32_return_addr_rtx): Likewise.
4709 (nds32_initial_elimination_offset): Likewise.
4710 (nds32_expand_prologue): Likewise.
4711 (nds32_expand_epilogue): Likewise.
4712 (nds32_dynamic_chain_address): New function.
4713 * config/nds32/nds32.h (machine_function): Add fields for dwarf
4715 (DYNAMIC_CHAIN_ADDRESS): Define.
4716 (EH_RETURN_DATA_REGNO): Define.
4717 (EH_RETURN_STACKADJ_RTX): Define.
4718 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4719 patterns for dwarf exception handling.
4721 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4723 * config/nds32/nds32.h: Clean up obsolete macros.
4725 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4727 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4728 Add enum values for particular instructions.
4729 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4730 particular intrinsic functions.
4731 * config/nds32/nds32-intrinsic.md: Likewise.
4732 * config/nds32/nds32_intrinsic.h: Likewise.
4733 * config/nds32/nds32.h (nds32_builtins): Likewise.
4734 * config/nds32/nds32.md (type): Add pbsad and pbsada.
4735 (btst, ave): New patterns for particular instructions.
4737 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4739 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4740 Add enum values for atomic load/store and memory sync.
4741 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4743 * config/nds32/nds32-intrinsic.md: Likewise.
4744 * config/nds32/nds32_intrinsic.h: Likewise.
4745 * config/nds32/nds32.h (nds32_builtins): Likewise.
4747 2018-04-07 Jakub Jelinek <jakub@redhat.com>
4749 PR tree-optimization/85257
4750 * fold-const.c (native_encode_vector): If not all elts could fit
4751 and off is -1, return 0 rather than offset.
4752 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4753 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4754 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
4755 adjust buffer in native_interpret_expr call.
4757 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4759 * config/nds32/constants.md (unspec_volatile_element): Add cache
4760 control enum values.
4761 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4762 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4763 * config/nds32/nds32.c (nds32_cctl_names): New.
4764 (nds32_print_operand): Handle cache control register names.
4765 * config/nds32/nds32.h (nds32_builtins): New enum values.
4766 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4768 * config/nds32/nds32.md (type): Add mmu.
4769 * config/nds32/pipelines.md (simple_insn): Add mmu.
4771 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4773 * config/nds32/nds32.md (type): Remove call.
4774 * config/nds32/pipelines.md (simple_insn): Likewise.
4776 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4778 * config/nds32/constants.md (unspec_volatile_element): Add
4779 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4780 UNSPEC_VOLATILE_FMFCFG.
4781 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4782 description for fmfcfg and fmfcsr.
4783 (bdesc_1arg): Add fmtcsr.
4784 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4785 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4786 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4787 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4788 unspec_fmfcfg): New patterns.
4789 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4790 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4791 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4792 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4793 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4794 __nds32__fmfcfg): Define.
4796 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4798 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4799 intrinsic register names.
4800 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4801 intrinsic register enum values and macros.
4803 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4805 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4806 for load/store addressing form.
4807 (nds32_print_operand_address): Likewise.
4809 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
4812 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4813 based on LABEL_REF. Remove useless assertion.
4814 (pic_address_needs_scratch): Fix formatting.
4815 (sparc_legitimize_pic_address): Minor tweaks.
4816 (sparc_delegitimize_address): Adjust assertion accordingly.
4817 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4818 into symbolic_operand.
4819 (movsi_high_pic_label_ref): Likewise.
4820 (movsi_lo_sum_pic_label_ref): Likewise.
4821 (movdi_pic_label_ref): Likewise.
4822 (movdi_high_pic_label_ref): Likewise.
4823 (movdi_lo_sum_pic_label_ref): Likewise.
4825 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
4827 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4828 custom LIB_SPEC setup.
4830 2018-04-06 Ruslan Bukin <br@bsdpad.com>
4831 Kito Cheng <kito.cheng@gmail.com>
4833 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4834 * config/riscv/freebsd.h: New.
4836 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
4838 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4839 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4842 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
4843 Kito Cheng <kito.cheng@gmail.com>
4845 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4846 nds32_output_call, nds32_symbol_binds_local_p): New functions.
4847 * config/nds32/nds32-protos.h (nds32_output_call,
4848 nds32_output_return): Declare.
4849 * config/nds32/nds32.md: Refine all the call and return patterns.
4851 2018-04-06 Jakub Jelinek <jakub@redhat.com>
4854 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4855 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4857 PR rtl-optimization/84872
4858 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4859 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4862 2018-04-06 Tamar Christina <tamar.christina@arm.com>
4864 * expr.c (copy_blkmode_to_reg): Revert 254862.
4865 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4867 2018-04-06 Richard Biener <rguenther@suse.de>
4870 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4871 after seeing a component reference with an adjacent field. Treat
4872 refs to arrays at struct end of external decls similar to
4873 refs to unconstrained commons.
4875 2018-04-06 Jakub Jelinek <jakub@redhat.com>
4878 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4879 look through SAVE_EXPRs with non-side-effects argument. Adjust
4881 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4884 2018-04-06 Richard Biener <rguenther@suse.de>
4887 * alias.c (find_base_term): New wrapper around find_base_term
4888 unwinding CSELIB_VAL_PTR changes.
4889 (find_base_term): Do not restore CSELIB_VAL_PTR during the
4892 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4894 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4896 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4897 constant definitions.
4898 ("nop"): lr 0,0 -> nopr r0
4899 ("nop_lr0", "nop_lr1"): New insn definitions.
4901 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
4903 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4904 NDS32_V3PUSH_AVAILABLE_P macro.
4906 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
4907 Chung-Ju Wu <jasonwucj@gmail.com>
4909 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4910 (nds32*-*-*): Add float and fpu_config into supported_defaults.
4911 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4912 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4913 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4914 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4915 * config/nds32/constraints.md: New constraints and checking for hard
4916 float configuration.
4917 * config/nds32/iterators.md: New mode iterator and attribute for hard
4918 float configuration.
4919 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4921 * config/nds32/nds32-fpu.md: New file.
4922 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4923 deal with hard float code generation.
4924 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4926 (abi_type, float_reg_number): New enum type.
4927 * config/nds32/nds32-predicates.c: New predicates for hard float.
4928 * config/nds32/nds32-protos.h: Declare functions for hard float.
4929 * config/nds32/nds32.c: Implementation for hard float configuration.
4930 * config/nds32/nds32.h: Definitions for hard float configuration.
4931 * config/nds32/nds32.md: Include hard float machine description and
4932 modify patterns for hard float configuration.
4933 * config/nds32/nds32.opt: New options for hard float configuration.
4934 * config/nds32/predicates.md: New predicates for hard float
4937 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4939 * common/config/nds32/nds32-common.c
4940 (nds32_option_optimization_table): Enable -mreleax-hint by default.
4942 2018-04-05 Jakub Jelinek <jakub@redhat.com>
4945 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4946 CONSTRUCTOR_ELT (ctor, ...)->value.
4948 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
4951 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4953 2018-04-05 Tom de Vries <tom@codesourcery.com>
4956 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4959 2018-04-05 Shiva Chen <shiva0217@gmail.com>
4960 Kito Cheng <kito.cheng@gmail.com>
4962 * config/nds32/constraints.md (U33): Fine-tune checking condition.
4963 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4964 * config/nds32/nds32.h (nds32_16bit_address_type): Add
4965 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4967 2018-04-05 Shiva Chen <shiva0217@gmail.com>
4968 Kito Cheng <kito.cheng@gmail.com>
4970 * config/nds32/constraints.md (Ufe): New memory constraint.
4971 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4972 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4973 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4975 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4976 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4978 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4980 * config/nds32/nds32.md: Use optimize_size in the condition for
4981 alu-shift instructions.
4983 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4985 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4987 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4989 * config/nds32/nds32.md (negsi2): Refine pattern.
4991 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
4992 Chung-Ju Wu <jasonwucj@gmail.com>
4994 * config/nds32/iterators.md (shift_rotate): New code iterator.
4995 (shift): New code attribute.
4996 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4997 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4998 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4999 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
5000 bit-wise operations.
5001 (andsi3, *andsi3): Ditto.
5002 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
5003 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
5004 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
5005 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
5006 nds32_ior_operand, nds32_xor_operand): New predicates.
5008 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5010 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
5011 (addsi3, subsi3): ... this.
5013 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5015 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
5017 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5019 * config/nds32/nds32.md: Adjust indention.
5021 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
5023 * config/nds32/nds32.md (feature): New attribute.
5025 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5027 * config/nds32/nds32.md (subtype): New attribute.
5029 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
5032 * config/arm/arm-builtins.c (arm_expand_builtin): Change
5033 expansion to perform a bitwise AND of the argument followed by a
5034 boolean negation of the result.
5036 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
5038 PR rtl-optimization/84878
5039 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
5040 the basic block. Assert the use reference is not artificial and that
5041 it has an associated insn.
5043 2018-04-04 Michael Matz <matz@suse.de>
5045 * builtins.c (compute_objsize): Pass correct operand
5046 to array_at_struct_end_p.
5048 2018-04-04 Richard Biener <rguenther@suse.de>
5051 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
5052 from contexts for DINFO_LEVEL_TERSE and below.
5054 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5056 * config/nds32/nds32-doubleword.md (move_<mode>): Require
5057 resiter_operand condition.
5058 * config/nds32/nds32.md (*move<mode>): Ditto.
5060 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5061 Monk Chiang <sh.chiang04@gmail.com>
5063 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
5065 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5067 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
5069 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5070 Kito Cheng <kito.cheng@gmail.com>
5072 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
5073 nds32_cond_code_str, output_cond_branch,
5074 output_cond_branch_compare_zero, nds32_expand_cbranch,
5075 nds32_expand_cstore, nds32_expand_movcc,
5076 nds32_output_cbranchsi4_equality_zero,
5077 nds32_output_cbranchsi4_equality_reg,
5078 nds32_output_cbranchsi4_equality_reg_or_const_int,
5079 nds32_output_cbranchsi4_greater_less_zero: New functions.
5080 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
5081 nds32_expand_cstore, nds32_expand_movcc,
5082 nds32_output_cbranchsi4_equality_zero,
5083 nds32_output_cbranchsi4_equality_reg,
5084 nds32_output_cbranchsi4_equality_reg_or_const_int,
5085 nds32_output_cbranchsi4_greater_less_zero): Declare.
5086 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
5087 nds32_rimm11s_operand): New predicates.
5088 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
5089 * config/nds32/nds32.md: Rewrite all the branch and conditional move
5092 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5094 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
5095 * config/nds32/nds32.md: Ditto.
5096 * config/nds32/pipelines.md: Ditto.
5098 2018-04-04 Richard Biener <rguenther@suse.de>
5100 PR tree-optimization/85168
5101 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
5102 propagating abnormals.
5104 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5106 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
5108 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5109 Kito Cheng <kito.cheng@gmail.com>
5111 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
5112 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
5113 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
5114 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
5115 * config/nds32/nds32.md (sibcall_internal): New.
5116 (sibcall_register): Remove.
5117 (sibcall_immediate): Remove.
5118 (sibcall_value_internal): New.
5119 (sibcall_value_register): Remove.
5120 (sibcall_value_immediate): Remove.
5121 * config/nds32/predicates.md (nds32_general_register_operand): New.
5122 (nds32_call_address_operand): New.
5124 2018-04-03 Jakub Jelinek <jakub@redhat.com>
5126 PR rtl-optimization/85167
5127 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
5128 bb_defs if *split_p, instead preinitialize it to NULL.
5130 PR tree-optimization/85156
5131 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
5132 evaluating the argument multiple times.
5134 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
5136 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
5138 (_mm_cvtpd_ps): Likewise.
5139 (_mm_cvttpd_epi32): Likewise.
5140 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
5141 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
5142 vector, pixel, and bool following altivec.h include.
5144 2018-04-03 Martin Sebor <msebor@redhat.com>
5146 * doc/extend.texi (Common Function Attributes): Clarify.
5147 (const attribute): Likewise.
5148 (pure attribute): Likewise.
5150 2018-04-03 Jakub Jelinek <jakub@redhat.com>
5153 * config/i386/i386.c (ix86_expand_vector_set): Use
5154 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
5156 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
5158 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
5159 instructions when changing rounding bits to preserve precision bits
5160 in the x87 control word.
5162 2018-04-03 Martin Liska <mliska@suse.cz>
5164 PR tree-optimization/82491
5165 * rtl.h (strip_offset_and_add): Replace += suboffset with
5166 poly_uint64 () + suboffset.
5168 2018-03-29 Martin Liska <mliska@suse.cz>
5169 Martin Jambor <mjambor@suse.cz>
5172 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
5173 param_type is not an integral or pointer type.
5175 2018-04-03 Richard Biener <rguenther@suse.de>
5177 * sese.h (recompute_all_dominators): Remove.
5179 2018-04-02 Martin Sebor <msebor@redhat.com>
5181 * doc/invoke.texi (-Wrestrict): Fix typos.
5183 2018-04-02 Jim Wilson <jimw@sifive.com>
5185 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
5186 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
5187 (<optab>di3, <optab>si3_extend): Likewise.
5188 (<optab>si3_mask, <optab>si3_mask_1): New.
5189 (<optab>di3_mask, <optab>di3_mask_1): New.
5190 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
5191 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
5192 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
5194 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
5196 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
5199 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
5201 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
5202 (nds32_canonicalize_comparison): New function.
5204 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5205 Kito Cheng <kito.cheng@gmail.com>
5206 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5208 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
5209 * config/nds32/constants.md (unspec_volatile_element): Add
5210 UNSPEC_VOLATILE_RELAX_GROUP.
5211 * config/nds32/nds32-relax-opt.c: New file.
5212 * config/nds32/nds32-predicates.c
5213 (nds32_symbol_load_store_p): New function.
5214 * config/nds32/nds32-protos.h
5215 (nds32_symbol_load_store_p): Declare function.
5216 (make_pass_nds32_relax_opt): Declare new rtl pass function.
5217 * config/nds32/nds32.c
5218 (nds32_register_pass): New function to register pass.
5219 (nds32_register_passes): New function to register passes.
5220 * config/nds32/nds32.md (relax_group): New pattern.
5221 * config/nds32/nds32.opt (mrelax-hint): New option.
5222 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5224 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
5226 * config/nds32/t-nds32: Modify files dependency.
5228 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5230 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5231 (PROFILE_HOOK): Define its implementation.
5233 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5235 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5236 type and 32-bit size.
5238 2018-04-01 Jakub Jelinek <jakub@redhat.com>
5241 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5242 (V_128_256): New mode iterator.
5243 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5244 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5245 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5247 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5248 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5250 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
5253 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5254 NaN inputs correctly.
5256 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
5259 * config/rs6000/vsx.md (??r): New mode attribute.
5260 (*vsx_mov<mode>_64bit): Use it.
5261 (*vsx_mov<mode>_32bit): Likewise.
5263 2018-03-30 Martin Sebor <msebor@redhat.com>
5265 PR tree-optimization/84818
5266 * builtins.c (check_access): Use warning_n.
5268 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
5271 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5273 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5276 2018-03-30 Julia Koval <julia.koval@intel.com>
5279 * x86-tune.def (movx, partial_reg_dependency): Enable for
5282 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
5285 * lra-constraints.c (process_alt_operands): Move setting
5286 this_alternative_matches below.
5288 2018-03-29 Martin Liska <mliska@suse.cz>
5291 * doc/invoke.texi: Document how LTO works with debug info.
5292 Describe auto-load support of binutils. Mention 'x86-64'
5293 as valid option value of -march option.
5295 2018-03-29 Jakub Jelinek <jakub@redhat.com>
5297 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5300 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5301 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5302 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5305 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
5308 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5309 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5310 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5311 for RS6000_BTM_POWERPC64.
5312 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5313 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5314 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5319 2018-03-28 Carl Love <cel@us.ibm.com>
5322 2017-09-27 Carl Love <cel@us.ibm.com>
5324 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5325 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5326 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5329 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5331 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5332 instead of __vector bool.
5333 (_mm_max_pu8): Likewise.
5334 (_mm_min_pi16): Likewise.
5336 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
5339 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5340 (DIVWEUO): Likewise.
5342 (DIVDEUO): Likewise.
5343 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5344 DIVWEUO and DIVDEUO.
5345 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5346 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5347 (div_extend): Likewise.
5348 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5350 (__builtin_divweuo): Likewise.
5351 (__builtin_divdeo): Likewise.
5352 (__builtin_divdeuo): Likewise.
5354 2018-03-28 Jakub Jelinek <jakub@redhat.com>
5357 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5358 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5360 PR tree-optimization/82004
5361 * gimple-match-head.c (optimize_pow_to_exp): New function.
5362 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5363 Don't fold to exp if optimize_pow_to_exp is false.
5365 2018-03-28 Martin Liska <mliska@suse.cz>
5368 * calls.c (initialize_argument_information): Fix trailing space.
5369 * common.opt: Fix typo and provide better explanation for
5370 -fsanitize-coverage option.
5371 * config/i386/i386.opt: Fix typo.
5373 2018-03-28 Jakub Jelinek <jakub@redhat.com>
5374 Martin Liska <mliska@suse.cz>
5377 * gimplify.c (asan_poison_variable): Don't do the check for
5378 gimplify_omp_ctxp here.
5379 (gimplify_decl_expr): Do it here.
5380 (gimplify_target_expr): Likewise.
5382 2018-03-28 Martin Liska <mliska@suse.cz>
5385 * config/i386/i386.c (ix86_function_arg_advance): Do not call
5386 chkp_type_bounds_count if MPX is not enabled.
5388 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
5390 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5392 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5395 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5396 function to create the function decl for complex long double
5397 multiply and divide for -mabi=ieeelongdouble.
5398 (init_float128_ieee): Call it.
5400 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
5403 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5404 -fcf-protection=branch -mibt.
5405 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5407 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5410 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5412 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
5415 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5416 extern array declarations.
5418 2018-03-27 Richard Biener <rguenther@suse.de>
5421 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5422 explicit single_use checks.
5424 2018-03-27 Richard Biener <rguenther@suse.de>
5426 PR tree-optimization/85082
5427 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5430 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5432 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5433 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5434 Turn on fasynchronous-unwind-tables and funwind-tables.
5436 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
5439 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5440 (*bmi_blsr_<mode>_ccz): Ditto.
5442 2018-03-26 Tom de Vries <tom@codesourcery.com>
5444 PR tree-optimization/85063
5445 * omp-general.c (offloading_function_p): New function. Factor out
5447 * omp-offload.c (pass_omp_target_link::gate): ... here.
5448 * omp-general.h (offloading_function_p): Declare.
5449 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5450 with attribute omp declare target for offloading functions.
5452 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
5454 PR tree-optimization/84005
5455 * tree-data-ref.h (get_base_for_alignment): Declare.
5456 * tree-data-ref.c (get_base_for_alignment_1): New function.
5457 (get_base_for_alignment): Likewise.
5458 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5459 get_base_for_alignment to find a suitable base object, instead
5460 of always using drb->base_address.
5462 2018-03-23 Jakub Jelinek <jakub@redhat.com>
5465 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5466 known size by default.
5468 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
5471 * lra-constraints.c (process_alt_operands): Don't match BLKmode
5472 and non BLKmode operands.
5474 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5477 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5478 Clean up attributes.
5480 2018-03-23 Richard Biener <rguenther@suse.de>
5483 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5484 we are going to emit early debug for LTO.
5486 2018-03-23 Jakub Jelinek <jakub@redhat.com>
5489 * function.c (match_asm_constraints_1): Don't optimize if input
5490 doesn't satisfy general_operand predicate for output's mode.
5493 * alias.c (write_dependence_p): Don't require for x_canonicalized
5494 non-VOIDmode if x has VOIDmode.
5497 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5498 just don't try to optimize it rather than assert it never happens.
5500 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5502 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5503 macro expansions for definition of ST_INTERNAL_<mode> and
5504 LD_INTERNAL_<mode> builtins.
5505 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5507 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5509 (altivec_expand_st_builtin): Likewise.
5510 (altivec_expand_builtin): Remove calls to deleted functions.
5511 (rs6000_address_for_altivec): Delete this function.
5512 * config/rs6000/vector.md: Remove expands for
5513 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5515 2018-03-22 Sudakshina Das <sudi.das@arm.com>
5518 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5519 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5520 re-computing once computed.
5521 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5522 (arm_init_machine_status): Initialize
5523 machine->static_chain_stack_bytes.
5525 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5528 * doc/extend.texi: Add four new prototypes for vec_ld.
5529 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5530 definitions for more logical presentation.
5531 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5532 entries for V1TI variants of __builtin_altivec_ld builtin.
5533 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5534 handling of V1TI variant of LVX icode pattern.
5535 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5536 (rs6000_gimple_fold_builtin): Likewise.
5537 (altivec_init_builtins): Add code to define
5538 __builtin_altivec_lvx_v1ti function.
5540 2018-03-22 Jakub Jelinek <jakub@redhat.com>
5543 * function.c (match_asm_constraints_1): Don't do the optimization
5544 if input isn't a REG, SUBREG, MEM or constant.
5546 2018-03-22 Tom de Vries <tom@codesourcery.com>
5548 PR tree-optimization/84956
5549 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5550 bb_has_abnormal_pred.
5552 2018-03-22 Jakub Jelinek <jakub@redhat.com>
5555 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5556 DECL_INITIAL (decl) to decl at the end.
5557 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5560 2018-03-21 Joseph Myers <joseph@codesourcery.com>
5562 * doc/extend.texi (__builtin_tgmath): Document when complex
5563 integer types are treated as _Complex _Float64.
5565 2018-03-21 Tom de Vries <tom@codesourcery.com>
5567 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5569 2018-03-21 Jakub Jelinek <jakub@redhat.com>
5571 PR tree-optimization/84960
5572 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5573 if it is ENTRY block, move them into single succ of ENTRY in that case.
5575 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
5577 PR tree-optimization/84811
5578 * poly-int.h (poly_span_traits): Remove the T3 parameter and
5579 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5580 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5581 (known_subrange_p): Update accordingly. Cast each value involved
5582 in the size comparison, rather than casting the result of the
5585 2018-03-21 Jakub Jelinek <jakub@redhat.com>
5587 PR tree-optimization/84982
5588 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5589 by flipping the least significant bit rather than all bits from
5590 bitpos to bitpos + bitsize - 1.
5592 2018-03-21 Nathan Sidwell <nathan@acm.org>
5594 * doc/extend.texi (Deprecated Features): Remove mention of
5595 long-deleted deprecations.
5597 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5600 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5601 * configure: Regenerate.
5603 2018-03-21 Tom de Vries <tom@codesourcery.com>
5605 PR tree-optimization/83126
5606 * tree-parloops.c (num_phis): New function.
5607 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5609 2018-03-21 Nathan Sidwell <nathan@acm.org>
5611 * doc/extend.texi (Deprecated Features): Update deprecated flags,
5612 mention anon-struct/union members and trailing attributes.
5614 2018-03-21 Bin Cheng <bin.cheng@arm.com>
5616 PR tree-optimization/84969
5617 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5618 builtin memset partitions if they set different rhs values.
5620 2018-03-21 Jakub Jelinek <jakub@redhat.com>
5622 PR rtl-optimization/84989
5623 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5624 VEC_DUPLICATE with scalar result mode.
5626 2018-03-21 Martin Liska <mliska@suse.cz>
5629 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5630 not intended return statement.
5632 2018-03-21 Martin Liska <mliska@suse.cz>
5635 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5636 (chkp_find_bound_slots_1): Limit number of iterations.
5638 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
5641 * Minor grammar fixes for x86 options.
5643 2018-03-20 Jakub Jelinek <jakub@redhat.com>
5646 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5647 holding REG_CFA_RESTORE notes, instead turn them into a USE.
5649 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
5652 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5653 (altivec_lvx_<mode>_1op): Likewise.
5654 (altivec_stvx_<mode>_2op): Likewise.
5655 (altivec_stvx_<mode>_1op): Likewise.
5656 (altivec_lvx_<VM2:mode>): New define_expand.
5657 (altivec_stvx_<VM2:mode>): Likewise.
5658 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5659 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5660 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5661 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5662 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5663 (rs6000_gen_lvx): Likewise.
5664 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5665 (altivec_expand_stv_builtin): Likewise.
5666 (altivec_expand_builtin): Likewise.
5667 * config/rs6000/vector.md: Likewise.
5669 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5672 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5675 2018-03-20 Richard Biener <rguenther@suse.de>
5678 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5679 sign-conversions as zero, fall back to standard scalar_stmt
5682 2018-03-20 Martin Liska <mliska@suse.cz>
5685 * predict.c (rebuild_frequencies): Handle case when we have
5686 PROFILE_ABSENT, but flag_guess_branch_prob is false.
5688 2018-03-20 Jakub Jelinek <jakub@redhat.com>
5691 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5692 flag_section_anchors.
5693 * varasm.c (use_blocks_for_decl_p): Remove hack for
5694 dw2_force_const_mem.
5697 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5699 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
5700 be created, use lowpart_subreg of operands[0] rather than operands[0]
5702 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5703 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5704 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5705 and n constraint instead of aarch64_shift_imm_di and Usd.
5706 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5707 (*aarch64_<optab>_reg_minus<mode>3): ... this.
5709 2018-03-20 Sudakshina Das <sudi.das@arm.com>
5712 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5713 to favor GPR over NEON registers.
5714 (<shift>di3_neon): Likewise.
5716 2018-03-20 Tom de Vries <tom@codesourcery.com>
5719 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5720 (nvptx_process_pars): Emit bar.sync asap and alap.
5722 2018-03-20 Tom de Vries <tom@codesourcery.com>
5725 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5726 seen_label if seen_label is already set.
5728 2018-03-20 Jakub Jelinek <jakub@redhat.com>
5731 * config/i386/i386.c (fold_builtin_cpu): For features above 31
5732 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5733 Use 1U instead of 1. Formatting fixes.
5736 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5737 instead of TREE_TYPE (s1) for the return value.
5739 2018-03-19 Jakub Jelinek <jakub@redhat.com>
5741 PR tree-optimization/84946
5742 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5743 bitsize + bitsize in poly_uint64 rather than poly_int64.
5746 * dwarf2asm.c: Include fold-const.c.
5747 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5748 of decl rather than decl itself.
5750 PR rtl-optimization/84643
5751 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5753 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
5756 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5757 calling assemble_variable.
5759 2018-03-19 Sudakshina Das <sudi.das@arm.com>
5762 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5763 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5765 2018-03-19 Jim Wilson <jimw@sifive.com>
5768 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5769 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5770 (riscv_first_stack_step): Likewise.
5771 (riscv_option_override): Use STACK_BOUNDARY instead of
5773 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5775 (BIGGEST_ALIGNMENT): Set to 128.
5776 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5777 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5780 2018-03-19 Richard Biener <rguenther@suse.de>
5782 PR tree-optimization/84933
5783 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5784 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5786 2018-03-19 Richard Biener <rguenther@suse.de>
5788 PR tree-optimization/84859
5789 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5790 (cond_if_else_store_replacement): Perform sinking operation on
5791 single-store BBs regardless of MAX_STORES_TO_SINK setting.
5792 Generalize what a BB with a single eligible store is.
5794 2018-03-19 Richard Biener <rguenther@suse.de>
5796 PR tree-optimization/84929
5797 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5798 chrec_is_positive against non-chrec arg.
5800 2018-03-19 Tamar Christina <tamar.christina@arm.com>
5803 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5805 2018-03-18 Martin Liska <mliska@suse.cz>
5807 PR rtl-optimization/84635
5808 * regrename.c (build_def_use): Use matches_mode only when
5811 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
5813 PR tree-optimization/84913
5814 * tree-vect-loop.c (vectorizable_reduction): Don't try to
5815 vectorize chains of COND_EXPRs.
5817 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
5819 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5821 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
5823 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5825 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
5827 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5829 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
5830 Kito Cheng <kito.cheng@gmail.com>
5832 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5833 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5834 (nds32_adjust_reg_alloc_order): New function.
5835 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5837 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
5839 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5840 nds32_print_operand, nds32_print_operand_address): Use
5841 HOST_WIDE_INT_PRINT_DEC instead.
5843 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
5845 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5847 2018-03-17 Jakub Jelinek <jakub@redhat.com>
5850 * config/i386/i386.c (initial_ix86_tune_features,
5851 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5853 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5854 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5855 rather than 1u << ix86_tune. Formatting fix.
5856 (ix86_option_override_internal): Change ix86_arch_mask from
5857 unsigned int to unsigned HOST_WIDE_INT, initialize to
5858 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5859 (ix86_function_specific_restore): Likewise.
5861 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5864 * postreload.c (reload_combine_recognize_pattern): Perform
5865 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5866 truncate_int_for_mode the result for the destination's mode.
5869 * hsa-gen.c (mem_type_for_type): Fix comment typo.
5870 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5872 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5875 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
5878 * lra-assigns.c (lra_split_hard_reg_for): Don't use
5879 regno_allocno_class_array and sorted_pseudos.
5880 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5881 insns where regno is used.
5883 2018-03-16 Martin Liska <mliska@suse.cz>
5886 * multiple_target.c (create_dispatcher_calls): Redirect
5887 reference in the symbol table.
5889 2018-03-16 Martin Liska <mliska@suse.cz>
5892 * multiple_target.c (create_dispatcher_calls): Redirect also
5895 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5899 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5900 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5901 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5903 2018-03-16 Julia Koval <julia.koval@intel.com>
5905 * doc/invoke.texi (Skylake Server): Add CLWB.
5906 Cannonlake): Remove CLWB.
5908 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5910 PR tree-optimization/84841
5911 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5913 (FLOAT_ONE_CONST_TYPE): Define.
5914 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5915 (sort_by_operand_rank): Put entries with higher constant_type last
5916 rather than first to match comments.
5918 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
5920 * config/nios2/nios2.md (movsi_internal): Fix thinko in
5923 2018-03-15 Jakub Jelinek <jakub@redhat.com>
5926 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5927 check and use address of target always.
5929 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
5932 * config/i386/i386.c (indirect_thunk_needed): Update comments.
5933 (indirect_thunk_bnd_needed): Likewise.
5934 (indirect_thunks_used): Likewise.
5935 (indirect_thunks_bnd_used): Likewise.
5936 (indirect_return_needed): New.
5937 (indirect_return_bnd_needed): Likewise.
5938 (output_indirect_thunk_function): Add a bool argument for
5940 (output_indirect_thunk_function): Don't generate alias for
5941 function return thunk.
5942 (ix86_code_end): Call output_indirect_thunk_function to generate
5943 function return thunks.
5944 (ix86_output_function_return): Set indirect_return_bnd_needed
5945 and indirect_return_needed instead of indirect_thunk_bnd_needed
5946 and indirect_thunk_needed.
5948 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
5950 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5951 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5952 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5954 2018-03-15 David Malcolm <dmalcolm@redhat.com>
5955 Paul Hua <paul.hua.gm@gmail.com>
5958 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5960 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
5962 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5963 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5966 2018-03-15 Tamar Christina <tamar.christina@arm.com>
5969 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5970 instead of GET_MODE_SIZE when comparing Units.
5972 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5975 * varasm.c (hash_section): Return an unchangeble hash value
5976 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5977 Return !aarch64_can_use_per_function_literal_pools_p ().
5979 2018-03-15 Jakub Jelinek <jakub@redhat.com>
5982 * optabs.c (emit_conditional_move): Pass address of cmode's copy
5983 rather than address of cmode as last argument to prepare_cmp_insn.
5985 2018-03-15 Julia Koval <julia.koval@intel.com>
5987 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5988 F_AVX512VNNI, F_AVX512BITALG): New.
5990 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
5993 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
5994 insn for floating-point loads and stores.
5996 2018-03-14 Carl Love <cel@us.ibm.com>
5998 * config/rs6000/rs6000-c.c: Add macro definitions for
5999 ALTIVEC_BUILTIN_VEC_PERMXOR.
6000 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
6001 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
6002 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
6003 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
6005 * config/doc/extend.texi: Add prototypes for vec_permxor.
6007 2018-03-14 David Malcolm <dmalcolm@redhat.com>
6010 * diagnostic-show-locus.c (class layout_point): Convert m_line
6011 from int to linenum_type.
6012 (line_span::comparator): Use linenum "compare" function when
6013 comparing line numbers.
6014 (test_line_span): New function.
6015 (layout_range::contains_point): Convert param "row" from int to
6017 (layout_range::intersects_line_p): Likewise.
6018 (layout::will_show_line_p): Likewise.
6019 (layout::print_source_line): Likewise.
6020 (layout::should_print_annotation_line_p): Likewise.
6021 (layout::print_annotation_line): Likewise.
6022 (layout::print_leading_fixits): Likewise.
6023 (layout::annotation_line_showed_range_p): Likewise.
6024 (struct line_corrections): Likewise for field m_row.
6025 (line_corrections::line_corrections): Likewise for param "row".
6026 (layout::print_trailing_fixits): Likewise.
6027 (layout::get_state_at_point): Likewise.
6028 (layout::get_x_bound_for_row): Likewise.
6029 (layout::print_line): Likewise.
6030 (diagnostic_show_locus): Likewise for locals "last_line" and
6032 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
6033 * input.c (selftest::test_linenum_comparisons): New function.
6034 (selftest::input_c_tests): Call it.
6035 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
6036 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
6037 * selftest.h (ASSERT_GT): New macro.
6038 (ASSERT_GT_AT): New macro.
6039 (ASSERT_LT): New macro.
6040 (ASSERT_LT_AT): New macro.
6042 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
6044 PR rtl-optimization/84780
6045 * combine.c (distribute_links): Don't make a link based on pc_rtx.
6047 2018-03-14 Martin Liska <mliska@suse.cz>
6049 * tree.c (record_node_allocation_statistics): Use
6050 get_stats_node_kind.
6051 (get_stats_node_kind): New function extracted from
6052 record_node_allocation_statistics.
6053 (free_node): Use get_stats_node_kind.
6055 2018-03-14 Richard Biener <rguenther@suse.de>
6057 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
6058 that the value-set of ANTIC_IN doesn't grow.
6061 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6063 (BB_VISITED_WITH_VISITED_SUCCS): New define.
6064 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6066 2018-03-14 Julia Koval <julia.koval@intel.com>
6068 * config.gcc (icelake-client, icelake-server): New.
6070 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
6071 (initial_ix86_arch_features): Ditto.
6072 (PTA_SKYLAKE): Add SGX.
6073 (PTA_ICELAKE): Remove.
6074 (PTA_ICELAKE_CLIENT): New.
6075 (PTA_ICELAKE_SERVER): New.
6076 (ix86_option_override_internal): Split up icelake on icelake client and
6078 (get_builtin_code_for_version): Ditto.
6079 (fold_builtin_cpu): Ditto.
6080 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
6081 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
6082 * config/i386/i386.h (processor_type): Ditto.
6083 * doc/invoke.texi: Ditto.
6085 2018-03-14 Jakub Jelinek <jakub@redhat.com>
6088 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
6089 INTEGER_CST offset, add it together with bitpos / 8 and
6090 sign extend based on POINTER_SIZE.
6094 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
6097 * config/i386/constraints.md (Yc): New register constraint.
6098 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
6099 Use Yc constraint for alternative 2 of operand 0. Remove
6100 preferred_for_speed attribute.
6102 2018-03-14 Richard Biener <rguenther@suse.de>
6104 PR tree-optimization/84830
6105 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
6106 with the old one to avoid oscillations.
6108 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
6111 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
6113 (assign_by_spills): Return a flag of reload assignment failure.
6114 Do not process the reload assignment failures. Do not spill other
6115 reload pseudos if they has the same reg class. Update n if
6117 (lra_assign): Add a return arg. Set up from the result of
6118 assign_by_spills call.
6119 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6120 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6121 usage_insns if it is not NULL.
6122 (spill_hard_reg_in_range): New function.
6123 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6124 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6125 function prototypes.
6126 (lra_assign): Change prototype.
6127 * lra.c (lra): Add code to deal with fails by splitting hard reg
6130 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
6132 * config/riscv/riscv.opt (mrelax): New option.
6133 * config/riscv/riscv.c (riscv_file_start): Emit ".option
6134 "norelax" when riscv_mrelax is disabled.
6135 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
6137 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6140 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
6141 reassociation for int modes.
6143 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6145 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
6146 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
6148 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
6149 * config/aarch64/aarch64-sve.md
6150 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
6151 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
6152 (*extend<mode><Vwide>2): Rename to...
6153 (aarch64_sve_extend<mode><Vwide>2): ...this.
6154 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
6155 renaming the old pattern to...
6156 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
6158 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
6159 define_expand, renaming the old pattern to...
6160 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
6161 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
6162 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
6163 account when deciding which SVE instruction the optab should use.
6164 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
6166 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6168 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
6169 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
6170 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
6171 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
6172 (tlsdesc_small_<mode>): Turn a define_expand and use
6173 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
6174 (tlsdesc_small_advsimd_<mode>): ...this.
6175 (tlsdesc_small_sve_<mode>): New pattern.
6177 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6179 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
6180 (UNSPEC_UMUL_HIGHPART): New constants.
6181 (MUL_HIGHPART): New int iteraor.
6182 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
6183 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
6185 (*<su>mul<mode>3_highpart): New define_insn.
6187 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
6190 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6193 2018-03-13 Martin Liska <mliska@suse.cz>
6196 * (sem_item_optimizer::sem_item_optimizer): Initialize new
6198 (sem_item_optimizer::~sem_item_optimizer): Release it.
6199 (sem_item_optimizer::merge_classes): Register variable aliases.
6200 (sem_item_optimizer::fixup_pt_set): New function.
6201 (sem_item_optimizer::fixup_points_to_sets): Likewise.
6202 * ipa-icf.h: Declare new variables and functions.
6204 2018-03-13 Jakub Jelinek <jakub@redhat.com>
6207 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
6208 integer_pow2p@2 and test integer_pow2p in condition.
6209 (A < 0 ? C : 0): Similarly for @1.
6212 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6213 characters starting at p contain '\0' character, don't look beyond
6217 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6218 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6221 * reg-stack.c (change_stack): Change update_end var from int to
6222 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6223 also call set_block_for_insn on the newly added insns and rescan.
6226 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6227 on the last operand.
6230 * tree.c (stabilize_reference_1): Return save_expr (e) for
6231 STATEMENT_LIST even if it doesn't have side-effects.
6233 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
6235 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6237 2018-03-12 Renlin Li <renlin.li@arm.com>
6239 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6240 aarch64_output_scalar_simd_mov_immediate.
6242 2018-03-12 Martin Sebor <msebor@redhat.com>
6244 PR tree-optimization/83456
6245 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6246 for perfectly overlapping calls to memcpy.
6247 (gimple_fold_builtin_memory_chk): Same.
6248 (gimple_fold_builtin_strcpy): Handle no-warning.
6249 (gimple_fold_builtin_stxcpy_chk): Same.
6250 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6252 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
6254 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6255 parameter. Use it for SFmode.
6256 (rs6000_function_arg_advance_1): Adjust.
6257 (rs6000_function_arg): Adjust.
6258 (rs6000_gimplify_va_arg): Pass false for that new parameter.
6260 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
6262 PR rtl-optimization/84169
6263 PR rtl-optimization/84780
6264 * combine.c (can_combine_p): Check for a 2-insn combination whether
6265 the destination register is used between the two insns, too.
6267 2018-03-12 Richard Biener <rguenther@suse.de>
6269 PR tree-optimization/84803
6270 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6271 for refs DR analysis didn't process.
6273 2018-03-12 Richard Biener <rguenther@suse.de>
6275 PR tree-optimization/84777
6276 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6277 force-vectorize loops ignore whether we are optimizing for size.
6279 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
6281 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6282 (TARGET_MD_ASM_ADJUST): Define.
6284 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
6285 Kito Cheng <kito.cheng@gmail.com>
6286 Chung-Ju Wu <jasonwucj@gmail.com>
6288 * config/nds32/nds32.c (nds32_compute_stack_frame,
6289 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6290 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6291 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6292 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6293 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6294 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6295 * config/nds32/nds32.md (prologue, epilogue): Use macro
6296 NDS32_V3PUSH_AVAILABLE_P to do checking.
6298 2018-03-11 Jakub Jelinek <jakub@redhat.com>
6301 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6302 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6303 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
6304 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
6305 addition of most attributes on !orig_type_die or the attribute not
6306 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6308 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6309 Chung-Ju Wu <jasonwucj@gmail.com>
6311 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6313 * config/nds32/nds32.opt (mvh): New option.
6315 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6316 Chung-Ju Wu <jasonwucj@gmail.com>
6318 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6320 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6321 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6324 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6325 Chung-Ju Wu <jasonwucj@gmail.com>
6327 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6329 * config/nds32/nds32-multiple.md (strlensi): New pattern.
6330 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6332 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
6333 Kito Cheng <kito.cheng@gmail.com>
6334 Chung-Ju Wu <jasonwucj@gmail.com>
6336 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6337 UNSPEC_FFMISM and UNSPEC_FLMISM.
6338 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6339 for ffb, ffmism and flmism.
6340 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6341 (unspec_ffmism): Ditto.
6342 (unspec_flmism): Ditto.
6343 (nds32_expand_builtin_impl): Check if string extension is available.
6344 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6345 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6347 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
6350 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
6353 * lra-assigns.c (assign_by_spills): Return a flag of reload
6354 assignment failure. Do not process the reload assignment
6355 failures. Do not spill other reload pseudos if they has the same
6357 (lra_assign): Add a return arg. Set up from the result of
6358 assign_by_spills call.
6359 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6360 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6361 usage_insns if it is not NULL.
6362 (spill_hard_reg_in_range): New function.
6363 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6364 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6365 function prototypes.
6366 (lra_assign): Change prototype.
6367 * lra.c (lra): Add code to deal with fails by splitting hard reg
6370 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
6373 * config/i386/i386.opt: Replace Enforcment with Enforcement.
6375 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
6378 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6379 (dw_val_node): Add val_symbolic_view.
6380 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6381 (symview_upper_bound): New.
6382 (new_line_info_table): Initialize symviews_since_reset.
6383 (dwarf2out_source_line): Count symviews_since_reset and set
6384 symview_upper_bound.
6385 (dw_val_equal_p): Handle symview.
6386 (add_AT_symview): New.
6387 (print_dw_val): Handle symview.
6388 (attr_checksum, attr_checksum_ordered): Likewise.
6389 (same_dw_val_p, size_of_die): Likewise.
6390 (value_format, output_die): Likewise.
6391 (add_high_low_attributes): Use add_AT_symview for entry_view.
6392 (dwarf2out_finish): Reset symview_upper_bound, clear
6395 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
6398 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6399 Add strict argument and use it.
6400 (rs6000_split_multireg_move): Update for new strict argument.
6401 (mem_operand_gpr): Disallow all non-offsettable addresses.
6402 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6404 2018-03-09 Jakub Jelinek <jakub@redhat.com>
6407 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6408 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6409 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6412 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6413 decl, use remap_type if we want to use the type.
6415 2018-03-09 Martin Sebor <msebor@redhat.com>
6417 PR tree-optimization/84526
6418 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6420 (builtin_access::generic_overlap): Be prepared to handle non-array
6423 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
6425 PR rtl-optimization/84682
6426 * lra-constraints.c (process_address_1): Check is_address flag
6427 for address constraints.
6428 (process_alt_operands): Likewise.
6429 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6430 preprocess_constraints.
6431 * recog.h (preprocess_constraints): Add oploc parameter.
6433 * recog.c (preprocess_constraints): Test address_operand for
6434 CT_ADDRESS constraints.
6436 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
6439 * lra-assigns.c (assign_by_spills): Return a flag of reload
6440 assignment failure. Do not process the reload assignment
6441 failures. Do not spill other reload pseudos if they has the same
6443 (lra_assign): Add a return arg. Set up from the result of
6444 assign_by_spills call.
6445 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6446 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6447 usage_insns if it is not NULL.
6448 (spill_hard_reg_in_range): New function.
6449 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6450 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6451 function prototypes.
6452 (lra_assign): Change prototype.
6453 * lra.c (lra): Add code to deal with fails by splitting hard reg
6456 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6459 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6460 Accept complain bool parameter. Only emit errors if it is true.
6461 (arm_parse_cpu_option_name): Likewise.
6462 (arm_target_thumb_only): Adjust callers of the above.
6463 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6464 prototype to take a default true bool parameter.
6465 (arm_parse_arch_option_name): Likewise.
6467 2018-03-09 David Malcolm <dmalcolm@redhat.com>
6468 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6472 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6473 * configure: Regenerate.
6474 * configure.ac ("linker --version-script option"): New.
6475 ("linker soname option"): New.
6477 2018-03-09 Richard Biener <rguenther@suse.de>
6479 PR tree-optimization/84775
6480 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6481 immediate uses of predicate stmts and mark them modified.
6484 PR tree-optimization/84178
6485 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6487 (version_loop_for_if_conversion): Delay update_ssa call.
6488 (tree_if_conversion): Delay update_ssa until after predicate
6491 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
6494 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6495 when the function accesses prior frames.
6497 2018-03-08 Jakub Jelinek <jakub@redhat.com>
6500 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6501 gen_llsym, otherwise call maybe_gen_llsym.
6504 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6505 has ',' character inside of it.
6507 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6510 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6511 as clobbering CC_REGNUM.
6513 2018-03-08 Richard Biener <rguenther@suse.de>
6516 * tree-scalar-evolution.c: Include tree-into-ssa.h.
6517 (follow_copies_to_constant): Do not follow SSA names registered
6520 2018-03-08 Richard Biener <rguenther@suse.de>
6522 PR tree-optimization/84178
6523 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6525 (version_loop_for_if_conversion): Delay update_ssa call.
6526 (tree_if_conversion): Delay update_ssa until after predicate
6529 2018-03-08 David Malcolm <dmalcolm@redhat.com>
6531 PR tree-optimization/84178
6532 * tree-if-conv.c (release_bb_predicate): Remove the
6533 the assertion that the stmts have NULL use_ops.
6534 Discard the statements, asserting that they haven't
6535 yet been added to a BB.
6537 2018-03-08 Richard Biener <rguenther@suse.de>
6539 PR tree-optimization/84746
6540 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6541 (phi_translate): Pass in destination ANTIC_OUT set.
6542 (phi_translate_1): Likewise. For a simplified result lookup
6543 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6544 (phi_translate_set): Adjust.
6545 (do_pre_regular_insertion): Likewise.
6546 (do_pre_partial_partial_insertion): Likewise.
6548 2018-03-08 Martin Liska <mliska@suse.cz>
6550 PR gcov-profile/84735
6551 * doc/gcov.texi: Document usage of profile files.
6552 * gcov-io.h: Document changes in the format.
6554 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
6558 * dwarf2out.c (struct dw_line_info_table): Update comments for
6560 (FORCE_RESET_NEXT_VIEW): New.
6561 (FORCE_RESETTING_VIEW_P): New.
6562 (RESETTING_VIEW_P): Check for -1 too.
6563 (ZERO_VIEW_P): Likewise.
6564 (new_line_info_table): Force-reset next view.
6565 (dwarf2out_begin_function): Likewise.
6566 (dwarf2out_source_line): Simplify zero_view_p initialization.
6567 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6568 view directly. Omit view when omitting .loc at line 0.
6570 2018-03-08 Jakub Jelinek <jakub@redhat.com>
6572 PR tree-optimization/84740
6573 * tree-switch-conversion.c (process_switch): Call build_constructors
6574 only if info.phi_count is non-zero.
6576 PR tree-optimization/84739
6577 * tree-tailcall.c (find_tail_calls): Check call arguments against
6578 DECL_ARGUMENTS (current_function_decl) rather than
6579 DECL_ARGUMENTS (func) when checking for tail recursion.
6581 2018-03-07 Jakub Jelinek <jakub@redhat.com>
6583 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6584 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6585 Volker Reichelt's entry and add entries for people that perform
6586 GCC fuzzy testing and report numerous bugs.
6588 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
6591 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6592 readonly data in sdata, if that is disabled.
6593 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6594 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6595 -mreadonly-in-sdata option.
6597 2018-03-07 Martin Sebor <msebor@redhat.com>
6599 PR tree-optimization/84468
6600 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6601 basic block when looking for nul assignment.
6603 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
6606 * except.h (output_function_exception_table): Adjust prototype.
6607 * except.c (output_function_exception_table): Remove FNNAME parameter
6608 and add SECTION parameter. Ouput one part of the table at a time.
6609 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6610 the first part of the exception table and emit unwind directives.
6611 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6612 (i386_pe_seh_cold_init): Likewise.
6613 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6614 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6615 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6616 (ix86_output_call_insn): Emit a nop in one more case for SEH.
6617 * config/i386/winnt.c: Include except.h.
6618 (struct seh_frame_state): Add reg_offset, after_prologue and
6619 in_cold_section fields.
6620 (i386_pe_seh_end_prologue): Set seh->after_prologue.
6621 (i386_pe_seh_cold_init): New function.
6622 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6623 to seh->in_cold_section.
6624 (seh_emit_push): Record the offset of the push.
6625 (seh_emit_save): Record the offet of the save.
6626 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6627 Test seh->after_prologue to disregard the epilogue.
6628 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6629 (i386_pe_end_cold_function): New function.
6631 2018-03-07 Jakub Jelinek <jakub@redhat.com>
6634 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6635 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6638 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6640 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6641 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6644 * multiple_target.c: Include tree-inline.h and intl.h.
6645 (expand_target_clones): Diagnose and fail if node->definition and
6646 !tree_versionable_function_p (node->decl).
6648 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
6650 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6652 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6653 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6654 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6656 2018-03-06 Jakub Jelinek <jakub@redhat.com>
6659 * combine.c (try_combine): Use reg_or_subregno instead of handling
6660 just paradoxical SUBREGs and REGs.
6662 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
6664 * config/arc/arc.c (arc_finalize_pic): Remove function.
6665 (arc_must_save_register): We use single base PIC register, remove
6666 checks to save/restore the PIC register.
6667 (arc_expand_prologue): Likewise.
6668 * config/arc/arc-protos.h (arc_set_default_type_attributes):
6670 (arc_verify_short): Likewise.
6671 (arc_attr_type): Likewise.
6672 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6673 (walk_stores): Likewise.
6674 (arc_address_cost): Make it static.
6675 (arc_verify_short): Likewise.
6676 (branch_dest): Likewise.
6677 (arc_attr_type): Likewise.
6678 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6679 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6680 (arc_final_prescan_insn): Remove inserting the nops due to
6681 hardware hazards. It is done in reorg step.
6682 (insn_length_variant_t): Remove.
6683 (insn_length_parameters_t): Likewise.
6684 (arc_insn_length_parameters): Likewise.
6685 (arc_get_insn_variants): Likewise.
6686 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6688 2018-03-06 Jakub Jelinek <jakub@redhat.com>
6691 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6694 PR tree-optimization/84687
6695 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6697 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6699 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6701 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6702 Rename to ppc_speculation_barrier.
6703 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6704 __builtin_ppc_speculation_barrier.
6706 2018-03-05 Jakub Jelinek <jakub@redhat.com>
6709 * combine.c (combine_simplify_rtx): Don't try to simplify if
6710 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6713 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
6715 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6716 to 32 bytes when compiling for POWER9.
6718 2018-03-05 Jakub Jelinek <jakub@redhat.com>
6721 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6722 regparm >= 3 with no arg reg available also for calls with
6723 flag_force_indirect_call. Pass decl to ix86_function_regparm.
6726 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6728 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
6730 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
6733 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6735 2018-03-05 Richard Biener <rguenther@suse.de>
6737 PR tree-optimization/84486
6738 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6739 When inserting a __builtin_assume_aligned call set the LHS
6740 SSA name alignment info accordingly.
6742 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
6744 PR tree-optimization/84114
6745 * config/aarch64/aarch64.c (aarch64_reassociation_width)
6746 Avoid reassociation of FLOAT_MODE addition.
6748 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
6750 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6751 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6752 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6753 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6754 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6755 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6756 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6758 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6759 __builtin_ia32_wbinvd): New builtins.
6760 (SPECIAL_ARGS2): New.
6761 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6762 (SPECIAL_ARGS2): New.
6763 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6764 (ix86_valid_target_attribute_inner_p): Ditto.
6765 (ix86_init_mmx_sse_builtins): Add special_args2.
6766 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6767 TARGET_WBNOINVD_P): New.
6768 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6769 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6770 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6771 * config/i386/immintrin.h (_wbinvd): New intrinsic.
6772 * config/i386/pconfigintrin.h: New file.
6773 * config/i386/wbnoinvdintrin.h: Ditto.
6774 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6775 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6777 2018-03-05 Richard Biener <rguenther@suse.de>
6779 PR tree-optimization/84670
6780 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6782 (BB_VISITED_WITH_VISITED_SUCCS): New define.
6783 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6784 (compute_antic_aux): Only assert the number of values in ANTIC_IN
6785 doesn't grow if all successors (recursively) were visited at least
6788 2018-03-05 Richard Biener <rguenther@suse.de>
6790 PR tree-optimization/84650
6791 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6792 if executed in the loop pipeline.
6794 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
6796 * doc/configfiles.texi (Configuration Files): Move info about
6797 conditionalizing $target-protos.h to...
6798 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
6799 differs from $target-protos.h.
6801 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
6802 Chung-Ju Wu <jasonwucj@gmail.com>
6804 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6805 * config/nds32/nds32-multiple.md (setmemsi): Define.
6806 * config/nds32/nds32-memory-manipulation.c
6807 (nds32_gen_dup_4_byte_to_word_value): New.
6808 (emit_setmem_word_loop): New.
6809 (emit_setmem_byte_loop): New.
6810 (nds32_expand_setmem_loop): New.
6811 (nds32_expand_setmem_loop_v3m): New.
6812 (nds32_expand_setmem_unroll): New.
6813 (nds32_expand_setmem): New.
6815 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
6816 Chung-Ju Wu <jasonwucj@gmail.com>
6818 * config/nds32/nds32-memory-manipulation.c
6819 (nds32_emit_load_store): New.
6820 (nds32_emit_post_inc_load_store): New.
6821 (nds32_emit_mem_move): New.
6822 (nds32_emit_mem_move_block): New.
6823 (nds32_expand_movmemsi_loop_unknown_size): New.
6824 (nds32_expand_movmemsi_loop_known_size): New.
6825 (nds32_expand_movmemsi_loop): New.
6826 (nds32_expand_movmemsi_unroll): New.
6827 (nds32_expand_movmemqi): Rename ...
6828 (nds32_expand_movmemsi): ... to this.
6829 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6830 (movmemsi): ... to this.
6831 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6832 (nds32_expand_movmemsi): ... to this.
6834 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
6835 Monk Chiang <sh.chiang04@gmail.com>
6836 Chung-Ju Wu <jasonwucj@gmail.com>
6838 * config/nds32/nds32-protos.h
6839 (nds32_expand_load_multiple): New arguments.
6840 (nds32_expand_store_multiple): Ditto.
6841 (nds32_valid_multiple_load_store): Rename ...
6842 (nds32_valid_multiple_load_store_p): ... to this.
6843 * config/nds32/nds32-memory-manipulation.c
6844 (nds32_expand_load_multiple): Refine implementation.
6845 (nds32_expand_store_multiple): Ditto.
6846 * config/nds32/nds32-multiple.md
6847 (load_multiple): Update nds32_expand_load_multiple interface.
6848 (store_multiple): Update nds32_expand_store_multiple interface.
6849 * config/nds32/nds32-predicates.c
6850 (nds32_valid_multiple_load_store): Rename ...
6851 (nds32_valid_multiple_load_store_p): ... to this and refine
6853 * config/nds32/predicates.md
6854 (nds32_load_multiple_and_update_address_operation): New predicate.
6855 (nds32_store_multiple_and_update_address_operation): New predicate.
6857 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
6858 Chung-Ju Wu <jasonwucj@gmail.com>
6860 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6861 (combo): New attribute.
6862 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6864 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
6866 * config/nds32/nds32.opt: Change -mcmodel= default value.
6868 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
6869 Monk Chiang <sh.chiang04@gmail.com>
6870 Chung-Ju Wu <jasonwucj@gmail.com>
6872 * config/nds32/constants.md (unspec_element): New enum.
6873 * config/nds32/constraints.md (Umw): New constraint.
6874 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6875 * config/nds32/nds32-intrinsic.md: Likewise.
6876 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6877 (nds32_valid_smw_lwm_base_p): New.
6878 (nds32_output_smw_single_word): New.
6879 (nds32_output_lmw_single_word): New.
6880 (nds32_expand_unaligned_load): New.
6881 (nds32_expand_unaligned_store): New.
6882 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6883 (nds32_output_smw_single_word): Declare.
6884 (nds32_output_lmw_single_word): Declare.
6885 (nds32_expand_unaligned_load): Declare.
6886 (nds32_expand_unaligned_store): Declare.
6887 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6888 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6889 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6890 NDS32_BUILTIN_UASTORE_DW.
6891 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6894 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
6895 Kito Cheng <kito.cheng@gmail.com>
6896 Chung-Ju Wu <jasonwucj@gmail.com>
6898 * config/nds32/nds32-intrinsic.c
6899 (nds32_expand_builtin_null_ftype_reg): Delete.
6900 (nds32_expand_builtin_reg_ftype_imm): Ditto.
6901 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6902 (nds32_read_argument): New.
6903 (nds32_legitimize_target): Ditto.
6904 (nds32_legitimize_argument): Ditto.
6905 (nds32_check_constant_argument): Ditto.
6906 (nds32_expand_unop_builtin): Ditto.
6907 (nds32_expand_unopimm_builtin): Ditto.
6908 (nds32_expand_binop_builtin): Ditto.
6909 (nds32_builtin_decl_impl): Ditto.
6910 (builtin_description): Ditto.
6911 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6912 (nds32_init_builtins_impl): Ditto.
6913 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6914 (nds32_builtin_decl): New.
6915 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6916 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6918 2018-03-02 Jeff Law <law@redhat.com>
6920 * reorg.c (stop_search_p): Handle DEBUG_INSN.
6921 (redundant_insn, fill_simple_delay_slots): Likewise.
6922 (fill_slots_from_thread): Likewise.
6923 * resource.c (mark_referenced_resources): Likewise.
6924 (mark_set_resources, find_dead_or_set_registers): Likewise.
6926 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6928 * substring-locations.h (format_warning_va): Formatting fix for
6930 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6932 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6933 * substring-locations.c: Include intl.h.
6934 (format_warning_va): Turned into small wrapper around
6935 format_warning_n_va, renamed to ...
6936 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6937 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6939 (format_warning_at_substring_n): New function.
6940 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6941 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
6942 format_warning_at_substring with just a shorter name instead of
6943 const function pointer.
6944 (fmtwarn_n): New function.
6945 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6946 appropriate, get rid of all the fmtstr temporaries, move conditionals
6947 with G_() wrapped string literals directly into fmtwarn arguments,
6948 cast dir.len to (int), formatting fixes.
6950 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
6952 * doc/invoke.texi: Remove "Cilk Plus" references.
6954 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6955 Richard Biener <rguenther@suse.de>
6958 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6959 for error or warning attributes if CALL_FROM_THUNK_P is set.
6962 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6965 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6966 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6969 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6970 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6972 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6973 instead of -1U in last predictors element's probability member.
6975 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
6978 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6979 arguments if they are comparable.
6981 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
6983 PR tree-optimization/84634
6984 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6985 masks and masked_loop_p with a single loop_masks, making sure it's
6986 null for bb vectorization.
6988 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
6990 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6991 (vect_analyze_data_ref_access): Use loop->safe_len rather than
6992 loop->force_vectorize to check whether there is no alias.
6994 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6997 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6999 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
7001 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
7002 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
7003 instead of a loop around prev_real_insn.
7004 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
7008 * config/i386/i386.c (ix86_print_operand): Use conditional
7009 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
7012 2018-03-02 Richard Biener <rguenther@suse.de>
7014 PR tree-optimization/84427
7015 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
7016 (bitmap_set_subtract_values): Rewrite to handle multiple
7019 (prune_clobbered_mems): Likewise.
7020 (phi_translate): Take edge instead of pred/phiblock.
7021 (phi_translate_1): Likewise.
7022 (phi_translate_set): Likewise. Insert all translated
7023 exprs for a value into the set, keeping possibly multiple
7024 expressions per value.
7025 (compute_antic_aux): Adjust for phi_translate changes.
7026 When intersecting union the expressions and prune those
7027 not in the final value set, keeping possibly multiple
7028 expressions per value. Do not use value-insertion
7029 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
7030 all expressions. Add verification that the value-sets
7031 only shrink during iteration.
7032 (compute_partial_antic_aux): Adjust for the phi_translate changes.
7033 (do_pre_regular_insertion): Likewise.
7034 (do_pre_partial_partial_insertion): Likewise.
7036 2018-03-02 Richard Biener <rguenther@suse.de>
7039 * config/darwin.c (saved_debug_info_level): New static global.
7040 (darwin_asm_lto_start): Disable debug info generation for LTO out.
7041 (darwin_asm_lto_end): Restore debug info generation settings.
7043 2018-03-01 Martin Liska <mliska@suse.cz>
7046 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7049 2018-03-01 Richard Biener <rguenther@suse.de>
7052 * dwarf2out.c (gen_variable_die): Properly handle late VLA
7053 type annotation with LTO when debug was disabled at compile-time.
7055 2018-03-01 Matthew Fortune <mfortune@gmail.com>
7057 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
7059 (mips_final_postscan_insn): Likewise.
7061 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
7063 PR rtl-optimization/84528
7064 * alias.c (init_alias_target): Add commentary.
7065 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
7066 a unique base value if the frame pointer is not eliminated
7067 to the stack pointer.
7069 2018-03-01 Tom de Vries <tom@codesourcery.com>
7071 PR rtl-optimization/83327
7072 * lra-int.h (hard_regs_spilled_into): Declare.
7073 * lra.c (hard_regs_spilled_into): Define.
7074 (init_reg_info): Init hard_regs_spilled_into.
7075 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
7076 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
7077 (process_bb_lives): Handle hard_regs_spilled_into.
7078 (lra_create_live_ranges_1): Before doing liveness propagation, clear
7079 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
7081 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
7083 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
7084 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
7085 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
7086 * config/rs6000/aix72.h: New file.
7088 2018-02-28 Jakub Jelinek <jakub@redhat.com>
7090 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
7091 instead of warning_at with conditional singular and plural messages
7095 * stor-layout.c (update_alignment_for_field): For
7096 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
7097 && !DECL_PACKED (field), do the alignment update, just use
7098 only desired_align instead of MAX (type_align, desired_align)
7100 (place_field): Don't do known_align < desired_align handling
7101 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
7102 is non-NULL, instead do it after rli->prev_field handling and
7103 only if not within a bitfield word. For DECL_PACKED (field)
7104 use type_align of BITS_PER_UNIT.
7106 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
7108 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
7109 superfluous parentheses and trailing spaces.
7111 2018-02-28 Richard Biener <rguenther@suse.de>
7113 PR tree-optimization/84584
7114 * graphite-scop-detection.c (scop_detection::add_scop): Discard
7115 SCoPs with fake exit edge.
7117 2018-02-28 Martin Liska <mliska@suse.cz>
7120 * timevar.c (timer::print): Fix format to properly print 100%
7123 2018-02-28 Richard Biener <rguenther@suse.de>
7126 * genmatch.c (capture_info::walk_match): Do not mark
7127 captured expressions without operands as expr_p given
7128 they act more like predicates and should be subject to
7129 "lost tail" side-effect preserving.
7131 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
7133 PR rtl-optimization/81611
7134 * auto-inc-dec.c (attempt_change): Move dead note from
7135 mem_insn if it's the next use of regno
7136 (find_address): Take address use of reg holding
7137 non-incremented value. Add parm to limit search to the named
7139 (merge_in_block): Attempt to use a mem insn that is the next
7140 use of the original regno.
7142 2018-02-27 Martin Sebor <msebor@redhat.com>
7145 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
7146 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
7148 2018-02-27 Martin Sebor <msebor@redhat.com>
7150 PR translation/84207
7151 * diagnostic-core.h (warning_n, error_n, inform_n): Change
7152 n argument to unsigned HOST_WIDE_INT.
7153 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
7154 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
7155 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
7156 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
7158 2018-02-27 Richard Biener <rguenther@suse.de>
7160 PR tree-optimization/84512
7161 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7162 Do not use the estimate returned from record_stmt_cost for
7163 the scalar iteration cost but sum properly using add_stmt_cost.
7165 2018-02-27 Richard Biener <rguenther@suse.de>
7167 PR tree-optimization/84466
7168 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7169 Adjust last change to less strictly validate use operands.
7171 2018-02-27 Martin Liska <mliska@suse.cz>
7173 PR gcov-profile/84548
7174 * gcov.c (process_file): Allow partial overlap and consider it
7175 also as group functions.
7176 (output_lines): Properly calculate range of lines for a group.
7178 2018-02-27 Martin Liska <mliska@suse.cz>
7180 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
7181 'ggc' suffixes. Change first column width.
7182 (timer::print): Fix formatting of the column.
7184 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
7186 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
7187 preserve inline entry blocks for the sake of debug inline
7188 entry point markers alone.
7189 (remove_unused_locals): Suggest in comments a better place to
7190 force the preservation of inline entry blocks that are
7191 otherwise unused, but do not preserve them.
7193 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7195 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
7197 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7200 * config/i386/constraints.md (Bs): Replace
7201 ix86_indirect_branch_register with
7202 TARGET_INDIRECT_BRANCH_REGISTER.
7204 * config/i386/i386.md (indirect_jump): Likewise.
7205 (tablejump): Likewise.
7206 (*sibcall_memory): Likewise.
7207 (*sibcall_value_memory): Likewise.
7208 Peepholes of indirect call and jump via memory: Likewise.
7209 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7210 (*sibcall_value_GOT_32): Likewise.
7211 * config/i386/predicates.md (indirect_branch_operand): Likewise.
7212 (GOT_memory_operand): Likewise.
7213 (call_insn_operand): Likewise.
7214 (sibcall_insn_operand): Likewise.
7215 (GOT32_symbol_operand): Likewise.
7216 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7218 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
7220 PR rtl-optimization/83496
7221 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7222 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
7223 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7224 redundant insn, if any.
7225 (relax_delay_slots): Likewise.
7226 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7228 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
7230 PR tree-optimization/83965
7231 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7232 that grouped statements are part of a reduction chain. Return
7233 true if the statement is not marked as a reduction itself but
7235 (vect_recog_dot_prod_pattern): Don't check whether the statement
7236 is part of a group here.
7237 (vect_recog_sad_pattern): Likewise.
7238 (vect_recog_widen_sum_pattern): Likewise.
7240 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
7243 * final.c (rest_of_clean_state): Also look for calls inside sequences.
7245 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7248 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7250 (ix86_output_indirect_function_return): New prototype.
7251 (ix86_split_simple_return_pop_internal): Likewise.
7252 * config/i386/i386.c (indirect_return_via_cx): New.
7253 (indirect_return_via_cx_bnd): Likewise.
7254 (indirect_thunk_name): Handle return va CX_REG.
7255 (output_indirect_thunk_function): Create alias for
7256 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7257 (ix86_output_indirect_jmp): Remove the bool argument.
7258 (ix86_output_indirect_function_return): New function.
7259 (ix86_split_simple_return_pop_internal): Likewise.
7260 * config/i386/i386.md (*indirect_jump): Don't pass false
7261 to ix86_output_indirect_jmp.
7262 (*tablejump_1): Likewise.
7263 (simple_return_pop_internal): Change it to define_insn_and_split.
7264 Call ix86_split_simple_return_pop_internal to split it for
7266 (simple_return_indirect_internal): Call
7267 ix86_output_indirect_function_return instead of
7268 ix86_output_indirect_jmp.
7270 2018-02-26 Jakub Jelinek <jakub@redhat.com>
7273 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7274 memset and value initialization afterwards.
7276 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
7278 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7280 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7283 * common/config/aarch64/aarch64-common.c
7284 (aarch_option_optimization_table[]): Switch
7285 off fomit-frame-pointer
7287 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
7288 Chung-Ju Wu <jasonwucj@gmail.com>
7290 * config/nds32/nds32-multiple.md (load_multiple): Disallow
7292 (store_multiple): Ditto.
7294 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
7296 * config.gcc: Add --with-cpu support for nds32 target.
7297 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7298 * config/nds32/nds32.opt: Add -mcpu= option.
7300 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
7302 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7303 isel=yes): Warn for these deprecated options.
7305 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
7307 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7308 ISA_2_5_MASKS_EMBEDDED.
7310 2018-02-23 Jakub Jelinek <jakub@redhat.com>
7312 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7313 p->max as pointers rather than using iterative_hash_expr.
7315 2018-02-23 Carl Love <cel@us.ibm.com>
7317 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7318 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7320 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7321 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7322 P8V_BUILTIN_VEC_VUNSIGNED2.
7324 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
7327 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7328 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7330 * lra-constraints.c (curr_insn_transform): Set up
7331 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
7333 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7334 * lra-eliminations.c (spill_pseudos): Ditto.
7335 (process_insn_for_elimination): Ditto.
7336 * lra-lives.c (reg_early_clobber_p): Use the new macros.
7337 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7338 LRA_NON_CLOBBERED_ALT.
7340 2018-02-22 Martin Sebor <msebor@redhat.com>
7342 PR tree-optimization/84480
7343 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7344 to maybe_diag_stxncpy_trunc. Call it.
7345 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7346 from gimple_fold_builtin_strcpy. Print inlining stack.
7347 (handle_builtin_stxncpy): Print inlining stack.
7348 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7350 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
7353 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7354 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7355 and -fcheck-pointer-bounds are used together.
7356 (indirect_thunk_prefix): New enum.
7357 (indirect_thunk_need_prefix): New function.
7358 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
7359 "_nt" instead of "_bnd" for NOTRACK prefix.
7360 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7361 (output_indirect_thunk_function): Likewise.
7363 (ix86_code_end): Update output_indirect_thunk_function calls.
7364 (ix86_output_indirect_branch_via_reg): Replace
7365 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7366 (ix86_output_indirect_branch_via_push): Likewise.
7367 (ix86_output_function_return): Likewise.
7368 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7369 incompatible with -fcf-protection=branch and
7370 -fcheck-pointer-bounds.
7372 2018-02-22 Steve Ellcey <sellcey@cavium.com>
7375 * config/aarch64/aarch64.c (aarch64_print_address_internal):
7376 Change gcc_assert call to output_operand_lossage.
7378 2018-02-22 Steve Ellcey <sellcey@cavium.com>
7380 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7382 2018-02-22 DJ Delorie <dj@redhat.com>
7383 Sebastian Perta <sebastian.perta@renesas.com>
7384 Oleg Endo <olegendo@gcc.gnu.org>
7386 * config/rx/rx.c (rx_rtx_costs): New function.
7387 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7389 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
7391 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7393 2018-02-22 Martin Liska <mliska@suse.cz>
7396 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7397 Add "native" as a possible value.
7399 2018-02-22 Martin Liska <mliska@suse.cz>
7402 * config/i386/i386.c (ix86_option_override_internal):
7403 Add "native" as a possible value for -march and -mtune.
7405 2018-02-22 Jakub Jelinek <jakub@redhat.com>
7408 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7409 to all type variants.
7411 PR tree-optimization/84503
7412 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7413 width as info->bitpos + info->bitsize - start.
7414 (merged_store_group::merge_overlapping): Simplify width computation.
7415 (check_no_overlap): New function.
7416 (imm_store_chain_info::try_coalesce_bswap): Compute expected
7417 start + width and last_order of the group, fail if check_no_overlap
7419 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7420 to group if check_no_overlap fails.
7422 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
7424 * config/rs6000/altivec.md: Delete contraint arguments to
7425 define_expand, define_split, and define_peephole2, and in
7426 define_insn_and_split if always unused.
7427 * config/rs6000/darwin.md: Ditto.
7428 * config/rs6000/dfp.md: Ditto.
7429 * config/rs6000/rs6000.md: Ditto.
7430 * config/rs6000/sync.md: Ditto.
7431 * config/rs6000/vector.md: Ditto.
7432 * config/rs6000/vsx.md: Ditto.
7434 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
7436 * config/rs6000/altivec.md: Write output control strings as braced
7437 blocks instead of double-quoted strings.
7438 * config/rs6000/darwin.md: Ditto.
7439 * config/rs6000/rs6000.md: Ditto.
7440 * config/rs6000/vector.md: Ditto.
7441 * config/rs6000/vsx.md: Ditto.
7443 2018-02-21 Jason Merrill <jason@redhat.com>
7445 PR c++/84314 - ICE with templates and fastcall attribute.
7446 * attribs.c (build_type_attribute_qual_variant): Remove assert.
7448 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
7450 * ipa-cp.c (determine_versionability): Fix comment typos.
7452 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
7455 * ipa-cp.c (determine_versionability): Do not version functions caling
7458 2018-02-21 Martin Liska <mliska@suse.cz>
7461 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7462 Add "native" as a possible value.
7463 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
7464 the macro when native cpu detection is available.
7466 2018-02-21 Martin Liska <mliska@suse.cz>
7469 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7470 Add "native" as a possible value.
7471 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7472 when native cpu detection is available.
7474 2018-02-21 Jakub Jelinek <jakub@redhat.com>
7475 Martin Sebor <msebor@redhat.com>
7477 PR tree-optimization/84478
7478 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7480 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7481 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7482 support which is conservatively correct, for 2 only stay conservative
7483 for maxlen. Formatting and comment capitalization fixes. Add STRICT
7484 argument to the 2 argument get_range_strlen, adjust 6 arg
7485 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7487 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7488 (gimple_fold_builtin_strlen): Pass true as last argument to
7491 2018-02-20 Martin Sebor <msebor@redhat.com>
7494 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7495 (builtin_memref::set_base_and_offset): Same. Handle inner references.
7496 (builtin_memref::builtin_memref): Factor out parts into
7497 set_base_and_offset and call it.
7499 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
7502 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7503 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7504 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
7505 search at the associated MODE_INT.
7507 2018-02-20 Jeff Law <law@redhat.com>
7510 PR tree-optimization/81592
7512 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7513 for range data rather than using global data.
7514 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7515 range data rather than using global data.
7516 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7517 pass it to children as needed.
7518 (struct directive::fmtresult): Similarly.
7519 (struct directive::set_width): Similarly.
7520 (struct directive::set_precision): Similarly.
7521 (format_integer, format_directive, parse_directive): Similarly.
7522 (format_none): Accept unnamed vr_values parameter.
7523 (format_percent, format_floating, format_character): Similarly.
7524 (format_string, format_plain): Similarly.
7525 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7526 the EVRP range analyzer for range data rather than using global data.
7527 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
7528 gimple-ssa-evrp-analyze.h
7529 (class sprintf_dom_walker): Add after_dom_children member function.
7530 Add evrp_range_analyzer member.
7531 (sprintf_dom_walker::before_dom_children): Call into the EVRP
7532 range analyzer as needed.
7533 (sprintf_dom_walker::after_dom_children): New member function.
7534 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7536 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7537 (evrp_range_analyzer::pop_to_marker): Likewise.
7539 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
7541 PR tree-optimization/84419
7542 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7543 with the required type if its current type is compatible but
7546 2018-02-20 Jakub Jelinek <jakub@redhat.com>
7549 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7550 after vectorization.
7552 2018-02-20 Martin Liska <mliska@suse.cz>
7555 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7556 possible values if we don't have a hint.
7558 2018-02-20 Martin Liska <mliska@suse.cz>
7562 * final.c (shorten_branches): Build align_tab array with one
7564 * opts.c (finish_options): Add alignment option limit check.
7565 (MAX_CODE_ALIGN): Likewise.
7566 (MAX_CODE_ALIGN_VALUE): Likewise.
7567 * doc/invoke.texi: Document maximum allowed option value for
7568 all -falign-* options.
7570 2018-02-19 Jakub Jelinek <jakub@redhat.com>
7573 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7574 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7575 * var-tracking.c (emit_note_insn_var_location): Remove all references
7576 to NOTE_INSN_CALL_ARG_LOCATION.
7577 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7578 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7579 Use copy_rtx_if_shared.
7580 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7581 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7582 (dwarf2out_var_location): Remove handling of
7583 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7585 * final.c (final_scan_insn): Remove all references to
7586 NOTE_INSN_CALL_ARG_LOCATION.
7587 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
7588 before dumping final insns.
7589 * except.c (emit_note_eh_region_end): Remove all references to
7590 NOTE_INSN_CALL_ARG_LOCATION.
7591 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7592 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7593 * config/arc/arc.c (hwloop_optimize): Likewise.
7594 * config/arm/arm.c (create_fix_barrier): Likewise.
7595 * config/s390/s390.c (s390_chunkify_start): Likewise.
7596 * config/sh/sh.c (find_barrier): Likewise.
7597 * config/i386/i386.c (rest_of_insert_endbranch,
7598 ix86_seh_fixup_eh_fallthru): Likewise.
7599 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7600 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7601 * config/frv/frv.c (frv_function_prologue): Likewise.
7602 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
7604 (note_outside_basic_block_p): Remove all references to
7605 NOTE_INSN_CALL_ARG_LOCATION.
7606 * gengtype.c (adjust_field_rtx_def): Likewise.
7607 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7609 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7610 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7613 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7616 PR tree-optimization/84452
7617 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7618 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7621 2018-02-19 Martin Liska <mliska@suse.cz>
7624 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7626 2018-02-19 Martin Liska <mliska@suse.cz>
7627 Richard Sandiford <richard.sandiford@linaro.org>
7629 PR tree-optimization/82491
7630 * gimple-fold.c (get_base_constructor): Make earlier bail out
7633 2018-02-19 Carl Love <cel@us.ibm.com>
7635 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7636 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7638 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7639 P8V_BUILTIN_VEC_NEG.
7641 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
7643 * config/rl78/rl78.md (movdf): New define expand.
7645 2018-02-19 Martin Liska <mliska@suse.cz>
7648 * doc/invoke.texi: Fix typo.
7649 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7651 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
7653 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7654 handle rs6000_single_float and rs6000_double_float specially for
7657 2018-02-16 Jeff Law <law@redhat.com>
7659 * config/rx/rx.c (add_pop_cfi_notes): New function.;
7662 2018-02-16 Jakub Jelinek <jakub@redhat.com>
7665 * ipa-inline.c (inline_small_functions): Fix a typo.
7667 2018-02-16 Nathan Sidwell <nathan@acm.org>
7669 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7671 2018-02-16 Carl Love <cel@us.ibm.com>
7673 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7674 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7675 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7676 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7677 expansion to P8V_BUILTIN_VEC_FLOAT2.
7679 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
7681 PR rtl-optimization/70023
7682 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7683 src_regno into account.
7685 2018-02-16 Carl Love <cel@us.ibm.com>
7687 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7688 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7689 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7690 * config/rs6000/rs6000.c: Remove case statements for
7691 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7692 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7693 and P9V_BUILTIN_VEC_VINSERT4B.
7694 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7695 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7696 * config/rs6000/vsx.md:
7697 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7700 2018-02-16 Carl Love <cel@us.ibm.com>
7702 * config/rs6000/altivec.h: Add builtin names vec_extract4b
7704 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7706 * config/rs6000/rs6000-c.c: Add the definitions for
7707 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7708 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7709 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7710 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
7711 definition for insert4b and define insn *insert3b_internal.
7712 * doc/extend.texi: Add documentation for vec_extract4b.
7714 2018-02-16 Nathan Sidwell <nathan@acm.org>
7716 * doc/extend.texi (Backwards Compatibility): Mention friend
7717 injection. Note for-scope is deprecated.
7718 * doc/invoke.texi (-ffriend-injection): Deprecate.
7720 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
7722 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7723 that moved to I2, also allow destinations that are a paradoxical
7724 subreg (instead of a normal reg).
7726 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
7729 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7732 2018-02-16 Richard Biener <rguenther@suse.de>
7734 PR tree-optimization/84037
7735 PR tree-optimization/84016
7737 * config/i386/i386.c (ix86_builtin_vectorization_cost):
7738 Adjust vec_construct for the fact we need additional higher latency
7739 128bit inserts for AVX256 and AVX512 vector builds.
7740 (ix86_add_stmt_cost): Scale vector construction cost for
7743 2018-02-16 Richard Biener <rguenther@suse.de>
7745 PR tree-optimization/84417
7746 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7747 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7748 (non_rewritable_lvalue_p): Likewise, use poly-ints.
7750 2018-02-16 Martin Liska <mliska@suse.cz>
7753 * internal-fn.def (ASAN_CHECK): Set proper flags.
7754 (ASAN_MARK): Likewise.
7756 2018-02-16 Julia Koval <julia.koval@intel.com>
7758 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7759 from PTA_CANNONLAKE.
7761 2018-02-16 Jakub Jelinek <jakub@redhat.com>
7764 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7765 Use ++iter rather than iter++ for std::list iterators.
7766 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
7767 defer deleting them until all nodes in the forest are processed. Do
7768 free even leaf nodes. Change to_process into auto_vec.
7771 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7772 * vec.h (vec_default_construct): Use memset instead of placement new
7773 if BROKEN_VALUE_INITIALIZATION is defined.
7774 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7775 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7778 PR rtl-optimization/83723
7779 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7780 * lra.c (lra_substitute_pseudo): Likewise. If true, use
7781 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
7783 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7785 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7787 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
7789 PR rtl-optimization/81443
7790 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7791 from inner REGs to paradoxical SUBREGs.
7793 2018-02-16 Richard Biener <rguenther@suse.de>
7795 PR tree-optimization/84399
7796 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7797 For operands we can analyze at their definition make sure we can
7798 analyze them at each use as well.
7800 2018-02-16 Richard Biener <rguenther@suse.de>
7802 PR tree-optimization/84190
7803 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7804 volatile accesses if the decl isn't volatile.
7806 2018-02-15 Jason Merrill <jason@redhat.com>
7808 PR c++/84314 - ICE with templates and fastcall attribute.
7809 * attribs.c (build_type_attribute_qual_variant): Don't clobber
7810 TYPE_CANONICAL on an existing type.
7812 2018-02-15 Jakub Jelinek <jakub@redhat.com>
7814 PR tree-optimization/84383
7815 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7816 dstoff nor call operand_equal_p if dstbase is NULL.
7818 PR tree-optimization/84334
7819 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7820 also a CONSTANT_CLASS_P, punt.
7822 2018-02-14 Jim Wilson <jimw@sifive.com>
7824 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7825 first SMALL_OPERAND check. New local min_second_step. Move assert
7826 to where locals are set. Add TARGET_RVC support.
7827 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7829 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
7831 * doc/invoke.texi: Correct -Wformat-overflow code sample.
7833 2018-02-14 Martin Sebor <msebor@redhat.com>
7835 PR tree-optimization/83698
7836 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7837 arrays constrain the offset range to their bounds.
7838 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7839 (builtin_access::overlap): Avoid setting the size of overlap if it's
7841 (maybe_diag_overlap): Also consider arrays when deciding what values
7842 of offsets to include in diagnostics.
7844 2018-02-14 Martin Sebor <msebor@redhat.com>
7847 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7848 that correspond to the kind of a declaration.
7850 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
7853 * config/pa/pa.md: Load address of PIC label using the linkage table
7854 if the label is nonlocal.
7856 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
7858 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7859 warning message if user requests -maltivec=be.
7860 * doc/invoke.texi: Document deprecation of -maltivec=be.
7862 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
7865 * config/rs6000/rs6000-c.c: Update definitions for
7866 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7867 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7869 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7872 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7873 add _get_ssp intrinsics. Remove argument from
7874 __builtin_ia32_rdssp[d|q].
7875 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7876 * config/i386/i386-builtin.def: Remove argument from
7877 __builtin_ia32_rdssp[d|q].
7878 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7879 ix86_expand_special_args_builtin for _rdssp[d|q].
7880 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7881 Clear register before usage.
7882 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7883 Add documentation for new _get_ssp and _inc_ssp intrinsics.
7885 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
7887 PR tree-optimization/84357
7888 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7889 operand 1 of an ARRAY_REF too.
7891 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
7894 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7895 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7897 (set_of_reg): New struct.
7898 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7899 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7900 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7902 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7903 Split into bitclr, bitset, bitinvert patterns if appropriate.
7904 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7905 use rx_fuse_in_memory_bitop.
7906 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7907 to named insn, correct maximum insn length.
7909 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
7912 * machmode.def: Define a complex mode for PARTIAL_INT.
7913 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7915 * doc/rtl.texi: Document CSPImode.
7916 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7918 (msp430_hard_regno_nregs_with_padding): Likewise.
7920 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
7923 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7925 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
7927 PR rtl-optimization/84169
7928 * combine.c (try_combine): New variable split_i2i3. Set it to true if
7929 we generated a parallel as new i3 and we split that to new i2 and i3
7930 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
7931 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
7932 those to i2, not i1. Partially rewrite this scan code.
7934 2018-02-13 Jakub Jelinek <jakub@redhat.com>
7937 * stor-layout.c (place_field): For variable length fields, adjust
7938 offset_align afterwards not just based on the field's alignment,
7939 but also on the size.
7942 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7943 of exps and logs in the use_exp2 case.
7945 2018-02-13 Jeff Law <law@redhat.com>
7947 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7950 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7953 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
7957 * common.opt (gas-loc-support, gas-locview-support): New.
7958 (ginline-points, ginternal-reset-location-views): New.
7959 * doc/invoke.texi: Document them. Use @itemx where intended.
7960 (gvariable-location-views): Adjust.
7961 * target.def (reset_location_view): New.
7962 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7963 (TARGET_RESET_LOCATION_VIEW): New.
7964 * doc/tm.texi: Rebuilt.
7965 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7966 (dwarf2out_default_as_locview_support): New.
7967 (output_asm_line_debug_info): Use option variables.
7968 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7969 (output_loc_list): Likewise.
7970 (add_high_low_attributes): Check option variables.
7971 Don't output entry view attribute in strict mode.
7972 (gen_inlined_subroutine_die): Check option variables.
7973 (dwarf2out_inline_entry): Likewise.
7974 (init_sections_and_labels): Likewise.
7975 (dwarf2out_early_finish): Likewise.
7976 (maybe_reset_location_view): New, from...
7977 (dwarf2out_var_location): ... here. Call it.
7978 * debug.h (dwarf2out_default_as_loc_support): Declare.
7979 (dwarf2out_default_as_locview_support): Declare.
7980 * hooks.c (hook_int_rtx_insn_0): New.
7981 * hooks.h (hook_int_rtx_insn_0): Declare.
7982 * toplev.c (process_options): Take -gas-loc-support and
7983 -gas-locview-support from dwarf2out. Enable
7984 -gvariable-location-views by default only with locview
7985 assembler support. Enable -ginternal-reset-location-views by
7986 default only if the target defines the corresponding hook.
7987 Enable -ginline-points by default if location views are
7988 enabled; force it disabled if statement frontiers are
7990 * tree-inline.c (expand_call_inline): Check option variables.
7991 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7993 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
7995 PR tree-optimization/84321
7996 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7997 handling. Also check whether the anti-range contains any values
7998 that satisfy the mask; switch to a VR_RANGE if not.
8000 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
8003 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
8005 2018-02-13 Martin Jambor <mjambor@suse.cz>
8008 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
8009 of call statements, also set location of a load to a temporary.
8011 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
8013 * config/rl78/rl78.c (add_vector_labels): New function.
8014 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
8015 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
8016 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
8017 which checks that no arguments are passed.
8018 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
8019 * doc/extend.texi: Documentation for the new attribute.
8021 2018-02-13 Andreas Schwab <schwab@suse.de>
8023 * config/riscv/linux.h (CPP_SPEC): Define.
8025 2018-02-13 Jakub Jelinek <jakub@redhat.com>
8028 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
8029 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
8030 OPTION_MASK_ISA_AES as first argument to def_builtin_const
8031 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
8032 instead of OPTION_MASK_ISA_PCLMUL as first argument to
8033 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
8034 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
8035 temporarily for AES and PCLMUL builtins.
8037 PR tree-optimization/84339
8038 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
8039 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
8043 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
8044 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
8045 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
8047 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
8049 * omp-simd-clone.h: New file.
8050 * omp-simd-clone.c: Include omp-simd-clone.h.
8051 (expand_simd_clones): No longer static.
8052 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
8053 cgraph.h and omp-simd-clone.h.
8054 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
8055 (vect_recog_widen_shift_pattern): Formatting fix.
8056 (vect_pattern_recog_1): Don't check optab for calls.
8059 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
8060 operands[2] into a REG before using gen_lowpart on it.
8062 2018-02-12 Jeff Law <law@redhat.com>
8065 * config/sh/sh.c (find_barrier): Consider a sibling call
8068 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
8069 successfully back substituting a reg.
8071 2018-02-12 Richard Biener <rguenther@suse.de>
8073 PR tree-optimization/84037
8074 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
8075 parameter, move visited init to caller.
8076 (vect_slp_analyze_operations): Separate cost from validity
8077 check, initialize visited once for all instances.
8078 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
8080 * tree-vect-stmts.c (vect_model_simple_cost): Make early
8082 (vect_model_promotion_demotion_cost): Likewise.
8083 (vectorizable_bswap): Guard cost modeling with !slp_node
8084 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
8086 (vectorizable_call): Likewise.
8087 (vectorizable_conversion): Likewise.
8088 (vectorizable_assignment): Likewise.
8089 (vectorizable_shift): Likewise.
8090 (vectorizable_operation): Likewise.
8091 (vectorizable_store): Likewise.
8092 (vectorizable_load): Likewise.
8093 (vectorizable_condition): Likewise.
8094 (vectorizable_comparison): Likewise.
8096 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
8099 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
8100 (ASAN_MARK): Fix fnspec to account for return value, change pointer
8101 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
8103 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
8106 * params.def (inline-min-speedup): Increase from 8 to 15.
8107 (max-inline-insns-auto): Decrease from 40 to 30.
8108 * ipa-split.c (consider_split): Add some buffer for function to
8109 be considered inlining candidate.
8110 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
8113 2018-02-12 Richard Biener <rguenther@suse.de>
8115 PR tree-optimization/84037
8116 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
8117 matched stmts if we cannot swap the non-matched ones.
8119 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
8121 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
8122 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
8123 _mm_maskz_scalef_round_ss): New intrinsics.
8124 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
8125 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
8126 __builtin_ia32_scalefss_round): Remove.
8127 (__builtin_ia32_scalefsd_mask_round,
8128 __builtin_ia32_scalefss_mask_round): New intrinsics.
8129 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
8130 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
8131 ((match_operand:VF_128 2 "<round_nimm_predicate>"
8132 "<round_constraint>")): Changed to ...
8133 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
8134 "<round_scalar_constraint>")): ... this.
8135 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
8136 %0, %1, %2<round_op3>}"): Changed to ...
8137 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
8138 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
8139 %2<round_scalar_mask_op3>}"): ... this.
8140 * config/i386/subst.md (round_scalar_nimm_predicate): New.
8142 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
8144 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
8145 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
8146 (_mm_maskz_sqrt_round_ss): New intrinsics.
8147 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
8148 (__builtin_ia32_sqrtsd_mask_round)
8149 (__builtin_ia32_sqrtss_mask_round): New builtins.
8150 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
8151 (__builtin_ia32_sqrtss_round): Remove.
8152 (__builtin_ia32_sqrtsd_mask_round)
8153 (__builtin_ia32_sqrtss_mask_round): New builtins.
8154 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
8155 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
8156 ((match_operand:VF_128 1 "vector_operand"
8157 "xBm,<round_constraint>")): Changed to ...
8158 ((match_operand:VF_128 1 "vector_operand"
8159 "xBm,<round_scalar_constraint>")): ... this.
8160 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
8161 %0, %2, %<iptr>1<round_op3>}): Changed to ...
8162 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
8163 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
8164 %<iptr>1<round_scalar_mask_op3>}): ... this.
8165 ((set_attr "prefix" "<round_prefix>")): Changed to ...
8166 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
8168 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
8171 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
8172 Cast vec_cmpeq result to correct type.
8173 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
8174 Cast vec_cmpgt result to correct type.
8176 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
8178 * final.c (final_scan_insn_1): Renamed from...
8179 (final_scan_insn): ... this. New wrapper, to recover
8180 seen from the outermost call in recursive ones.
8181 * config/sparc/sparc.c (output_return): Drop seen from call.
8182 (output_sibcall): Likewise.
8183 * config/visium/visium.c (output_branch): Likewise.
8185 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
8187 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
8190 2018-02-10 Alan Modra <amodra@gmail.com>
8193 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
8194 Specify LR as an input.
8196 2018-02-10 Jakub Jelinek <jakub@redhat.com>
8199 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
8200 remove_member_access_dummy_vars): New functions.
8201 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
8202 lower_omp_1, execute_lower_omp): Use them.
8204 PR rtl-optimization/84308
8205 * shrink-wrap.c (spread_components): Release todo vector.
8207 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
8209 PR rtl-optimization/57193
8210 * ira-color.c (struct allocno_color_data): Add member
8211 conflict_allocno_hard_prefs.
8212 (update_conflict_allocno_hard_prefs): New.
8213 (bucket_allocno_compare_func): Add a preference based on
8214 conflict_allocno_hard_prefs.
8215 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8216 (color_allocnos): Remove a dead code. Initiate
8217 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
8219 2018-02-09 Jakub Jelinek <jakub@redhat.com>
8222 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8223 constraint from =wa to wa. Avoid a subreg on the output operand,
8224 instead use a pseudo and subreg it in a move.
8225 (p9_xxbrd_<mode>): Changed to ...
8226 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8227 (p9_xxbrd_v2df): New expander.
8228 (p9_xxbrw_<mode>): Changed to ...
8229 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8230 (p9_xxbrw_v4sf): New expander.
8232 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
8234 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8236 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
8239 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8240 multiply in 32-bit mode.
8241 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8242 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8245 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
8247 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8248 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8249 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8250 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8252 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
8255 * dwarf2out.c (is_trivial_indirect_ref): New function.
8256 (dwarf2out_late_global_decl): Do not generate a location
8257 attribute for variables that have a non-trivial DECL_VALUE_EXPR
8258 and that are not defined in the current unit.
8260 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
8262 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8263 instead of a libcall for UNORDERED.
8265 2018-02-09 Tamar Christina <tamar.christina@arm.com>
8268 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8269 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8271 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8274 * config/s390/s390.c (s390_set_current_function): Invoke
8275 s390_indirect_branch_settings also if fndecl didn't change.
8277 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
8279 * config/rs6000/rs6000.md (blockage): Set length to zero.
8281 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
8283 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8285 2018-02-09 Jakub Jelinek <jakub@redhat.com>
8288 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8289 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8293 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8294 PARALLEL incoming that failed vt_get_decl_and_offset check.
8297 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8298 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8300 (get_variable_section): For decls in named .bss* sections pass true as
8301 second argument to bss_initializer_p.
8303 2018-02-09 Marek Polacek <polacek@redhat.com>
8304 Jakub Jelinek <jakub@redhat.com>
8307 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8308 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
8309 Sync some changes from cxx_fold_indirect_ref.
8311 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
8313 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8315 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8316 (BLOCK_INLINE_ENTRY_LABEL): New.
8317 (dwarf2out_var_location): Disregard inline entry markers.
8318 (inline_entry_data): New struct.
8319 (inline_entry_data_hasher): New hashtable type.
8320 (inline_entry_data_hasher::hash): New.
8321 (inline_entry_data_hasher::equal): New.
8322 (inline_entry_data_table): New variable.
8323 (add_high_low_attributes): Add DW_AT_entry_pc and
8324 DW_AT_GNU_entry_view attributes if a pending entry is found
8325 in inline_entry_data_table. Add old entry_pc attribute only
8326 if debug nonbinding markers are disabled.
8327 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8328 markers are enabled.
8329 (block_within_block_p, dwarf2out_inline_entry): New.
8330 (dwarf2out_finish): Check that no entries remained in
8331 inline_entry_data_table.
8332 * final.c (reemit_insn_block_notes): Handle inline entry notes.
8333 (final_scan_insn, notice_source_line): Likewise.
8334 (rest_of_clean_state): Skip inline entry markers.
8335 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8337 * gimple.c (gimple_build_debug_inline_entry): New.
8338 * gimple.h (enum gimple_debug_subcode): Add
8339 GIMPLE_DEBUG_INLINE_ENTRY.
8340 (gimple_build_debug_inline_entry): Declare.
8341 (gimple_debug_inline_entry_p): New.
8342 (gimple_debug_nonbind_marker_p): Adjust.
8343 * insn-notes.def (INLINE_ENTRY): New.
8344 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8345 inline entry marker notes.
8346 (print_insn): Likewise.
8347 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8348 (INSN_DEBUG_MARKER_KIND): Likewise.
8349 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8350 * tree-inline.c (expand_call_inline): Build and insert
8351 debug_inline_entry stmt.
8352 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8353 inline entry blocks early, if nonbind markers are enabled.
8354 (dump_scope_block): Dump fragment info.
8355 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8356 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8357 (gimple_build_debug_inline_entry): New.
8358 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8359 Enable/disable inline entry points too.
8360 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8361 (DEBUG_INSN): Describe inline entry markers.
8363 * common.opt (gvariable-location-views): New.
8364 (gvariable-location-views=incompat5): New.
8365 * config.in: Rebuilt.
8366 * configure: Rebuilt.
8367 * configure.ac: Test assembler for view support.
8368 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8369 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8370 * dwarf2out.c (var_loc_view): New typedef.
8371 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8372 (dwarf2out_locviews_in_attribute): New.
8373 (dwarf2out_locviews_in_loclist): New.
8374 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8375 (enum dw_line_info_opcode): Add LI_adv_address.
8376 (struct dw_line_info_table): Add view.
8377 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8378 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8379 (zero_view_p): New variable.
8380 (ZERO_VIEW_P): New macro.
8381 (output_asm_line_debug_info): New.
8382 (struct var_loc_node): Add view.
8383 (add_AT_view_list, AT_loc_list): New.
8384 (add_var_loc_to_decl): Add view param. Test it against last.
8385 (new_loc_list): Add view params. Record them.
8386 (AT_loc_list_ptr): Handle loc and view lists.
8387 (view_list_to_loc_list_val_node): New.
8388 (print_dw_val): Handle dw_val_class_view_list.
8389 (size_of_die): Likewise.
8390 (value_format): Likewise.
8391 (loc_list_has_views): New.
8392 (gen_llsym): Set vl_symbol too.
8393 (maybe_gen_llsym, skip_loc_list_entry): New.
8394 (dwarf2out_maybe_output_loclist_view_pair): New.
8395 (output_loc_list): Output view list or entries too.
8396 (output_view_list_offset): New.
8397 (output_die): Handle dw_val_class_view_list.
8398 (output_dwarf_version): New.
8399 (output_compilation_unit_header): Use it.
8400 (output_skeleton_debug_sections): Likewise.
8401 (output_rnglists, output_line_info): Likewise.
8402 (output_pubnames, output_aranges): Update version comments.
8403 (output_one_line_info_table): Output view numbers in asm comments.
8404 (dw_loc_list): Determine current endview, pass it to new_loc_list.
8405 Call maybe_gen_llsym.
8406 (loc_list_from_tree_1): Adjust.
8407 (add_AT_location_description): Create view list attribute if
8408 needed, check it's absent otherwise.
8409 (convert_cfa_to_fb_loc_list): Adjust.
8410 (maybe_emit_file): Call output_asm_line_debug_info for test.
8411 (dwarf2out_var_location): Reset views as needed. Precompute
8412 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
8413 attribute. Set view.
8414 (new_line_info_table): Reset next view.
8415 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8416 (dwarf2out_source_line): Likewise. Output view resets and labels to
8417 the assembler, or select appropriate line info opcodes.
8418 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8419 (optimize_string_length): Catch it. Adjust.
8420 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
8421 dw_val_class_view_list, and remove it if no longer needed.
8422 (hash_loc_list): Hash view numbers.
8423 (loc_list_hasher::equal): Compare them.
8424 (optimize_location_lists): Check whether a view list symbol is
8425 needed, and whether the locview attribute is present, and
8426 whether they match. Remove the locview attribute if no longer
8428 (index_location_lists): Call skip_loc_list_entry for test.
8429 (dwarf2out_finish): Call output_asm_line_debug_info for test.
8430 Use output_dwarf_version.
8431 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8432 (struct dw_val_node): Add val_view_list.
8433 * final.c (SEEN_NEXT_VIEW): New.
8434 (set_next_view_needed): New.
8435 (clear_next_view_needed): New.
8436 (maybe_output_next_view): New.
8437 (final_start_function): Rename to...
8438 (final_start_function_1): ... this. Take pointer to FIRST,
8439 add SEEN parameter. Emit param bindings in the initial view.
8440 (final_start_function): Reintroduce SEEN-less interface.
8441 (final): Rename to...
8442 (final_1): ... this. Take SEEN parameter. Output final pending
8443 next view at the end.
8444 (final): Reintroduce seen-less interface.
8445 (final_scan_insn): Output pending next view before switching
8446 sections or ending a block. Mark the next view as needed when
8447 outputting variable locations. Notify debug backend of section
8448 changes, and of location view changes.
8449 (rest_of_handle_final): Adjust.
8450 * toplev.c (process_options): Autodetect value for debug variable
8451 location views option. Warn on incompat5 without -gdwarf-5.
8452 * doc/invoke.texi (gvariable-location-views): New.
8453 (gvariable-location-views=incompat5): New.
8454 (gno-variable-location-views): New.
8456 2018-02-08 David Malcolm <dmalcolm@redhat.com>
8458 PR tree-optimization/84136
8459 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8460 that the result of find_edge is non-NULL.
8462 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
8465 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8466 storing integer register in SImode. Fix cost of 256 and 512
8467 byte aligned SSE register store.
8469 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
8471 * config/i386/i386.c (ix86_multiplication_cost): Fix
8472 multiplication cost for TARGET_AVX512DQ.
8474 2018-02-08 Marek Polacek <polacek@redhat.com>
8476 PR tree-optimization/84238
8477 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8480 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8482 PR tree-optimization/84265
8483 * tree-vect-stmts.c (vectorizable_store): Don't treat
8484 VMAT_CONTIGUOUS accesses as grouped.
8485 (vectorizable_load): Likewise.
8487 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8489 PR tree-optimization/81635
8490 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8491 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8492 (test_round_for_mask): New functions.
8493 (wide_int_cc_tests): Call test_round_for_mask.
8494 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8495 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8496 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8497 range returned by get_range_info.
8499 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
8502 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8503 * symtab.c: Include builtins.h
8504 (symtab_node::output_to_lto_symbol_table_p): Move here
8505 from lto-streamer-out.c:output_symbol_p.
8506 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8507 (output_symbol_p): Move all logic to symtab.c
8508 (produce_symtab): Update.
8510 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8512 * config/s390/s390-opts.h (enum indirect_branch): Define.
8513 * config/s390/s390-protos.h (s390_return_addr_from_memory)
8514 (s390_indirect_branch_via_thunk)
8515 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8516 (enum s390_indirect_branch_type): Define.
8517 * config/s390/s390.c (struct s390_frame_layout, struct
8518 machine_function): Remove.
8519 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8520 (indirect_branch_table_label_no, indirect_branch_table_name):
8522 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8523 (enum s390_indirect_branch_option): Define.
8524 (s390_return_addr_from_memory): New function.
8525 (s390_handle_string_attribute): New function.
8526 (s390_attribute_table): Add new attribute handler.
8527 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8528 (s390_indirect_branch_via_thunk): New function.
8529 (s390_indirect_branch_via_inline_thunk): New function.
8530 (s390_function_ok_for_sibcall): When jumping via thunk disallow
8531 sibling call optimization for non z10 compiles.
8532 (s390_emit_call): Force indirect branch target to be a single
8533 register. Add r1 clobber for non-z10 compiles.
8534 (s390_emit_epilogue): Emit return jump via return_use expander.
8535 (s390_reorg): Handle JUMP_INSNs as execute targets.
8536 (s390_option_override_internal): Perform validity checks for the
8537 new command line options.
8538 (s390_indirect_branch_attrvalue): New function.
8539 (s390_indirect_branch_settings): New function.
8540 (s390_set_current_function): Invoke s390_indirect_branch_settings.
8541 (s390_output_indirect_thunk_function): New function.
8542 (s390_code_end): Implement target hook.
8543 (s390_case_values_threshold): Implement target hook.
8544 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8546 * config/s390/s390.h (struct s390_frame_layout)
8547 (struct machine_function): Move here from s390.c.
8548 (TARGET_INDIRECT_BRANCH_NOBP_RET)
8549 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8550 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8551 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8552 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8553 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8554 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8555 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8556 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8557 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8558 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8559 (mnemonic attribute): Add values which aren't recognized
8561 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8562 pattern for branch conversion. Fix mnemonic attribute.
8563 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8564 indirect branch via thunk if requested.
8565 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8566 ("*indirect_jump"): Disable for branch conversion using out of
8568 ("indirect_jump_via_thunk<mode>_z10")
8569 ("indirect_jump_via_thunk<mode>")
8570 ("indirect_jump_via_inlinethunk<mode>_z10")
8571 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8572 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8573 ("casesi_jump_via_inlinethunk<mode>_z10")
8574 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8575 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8576 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8577 ("*indirect2_jump"): Disable for branch conversion.
8578 ("casesi_jump"): Turn into expander and expand patterns for branch
8580 ("return_use"): New expander.
8581 ("*return"): Emit return via thunk and rename it to ...
8582 ("*return<mode>"): ... this one.
8583 * config/s390/s390.opt: Add new options and and enum for the
8586 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8588 * lra-constraints.c (match_reload): Unconditionally use
8589 gen_lowpart_SUBREG, rather than selecting between that
8590 and equivalent gen_rtx_SUBREG code.
8592 2018-02-08 Richard Biener <rguenther@suse.de>
8594 PR tree-optimization/84233
8595 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8596 changed flag instead of boguously re-using phi_inserted.
8598 2018-02-08 Martin Jambor <mjambor@suse.cz>
8600 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8601 static local variables.
8603 2018-02-08 Richard Biener <rguenther@suse.de>
8605 PR tree-optimization/84278
8606 * tree-vect-stmts.c (vectorizable_store): When looking for
8607 smaller vector types to perform grouped strided loads/stores
8608 make sure the mode is supported by the target.
8609 (vectorizable_load): Likewise.
8611 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
8613 * config/aarch64/aarch64.c (aarch64_components_for_bb):
8614 Increase LDP/STP opportunities by adding adjacent callee-saves.
8616 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
8618 PR rtl-optimization/84068
8619 PR rtl-optimization/83459
8620 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8622 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
8624 PR tree-optimization/84224
8625 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8626 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8629 2018-02-07 Iain Sandoe <iain@codesourcery.com>
8632 * config/rs6000/altivec.md (*restore_world): Remove LR use.
8633 * config/rs6000/predicates.md (restore_world_operation): Adjust op
8634 count, remove one USE.
8636 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
8638 * doc/install.texi (Configuration): Document the
8639 --with-long-double-format={ibm,ieee} PowerPC configuration
8643 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8644 Convert from define_expand to be define_insn_and_split. Rework
8645 float/double/_Float128 conversions to QI/HI/SImode to work with
8646 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
8647 conversions to QI/HImode types did a store and then a load to
8648 truncate the value. For conversions to VSX registers, don't split
8649 the insn, instead emit the code directly. Use the code iterator
8650 any_fix to combine signed and unsigned conversions.
8651 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8652 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8653 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8654 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8655 (fix_<mode>di2_hw): Likewise.
8656 (fixuns_<mode>di2_hw): Likewise.
8657 (fix_<mode>si2_hw): Likewise.
8658 (fixuns_<mode>si2_hw): Likewise.
8659 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8660 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8661 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8662 fix<uns>_trunc<SFDF:mode>si2_p8.
8663 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8665 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8666 (fix<uns>_<mode>_mem): Likewise.
8667 (fctiw<u>z_<mode>_mem): Likewise.
8668 (fix<uns>_<mode>_mem): Likewise.
8669 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8670 the register allocator from doing a direct move to the GPRs to do
8671 a store, and instead use the ISA 3.0 store byte/half-word from
8672 vector register instruction. For IEEE 128-bit floating point,
8673 also optimize stores of 32-bit ints.
8674 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8676 2018-02-07 Alan Hayward <alan.hayward@arm.com>
8678 * genextract.c (push_pathstr_operand): New function to support
8680 (walk_rtx): Call push_pathstr_operand.
8681 (print_path): Support [a-zA-Z].
8683 2018-02-07 Richard Biener <rguenther@suse.de>
8685 PR tree-optimization/84037
8686 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8687 (cse_and_gimplify_to_preheader): Declare.
8688 (vect_get_place_in_interleaving_chain): Likewise.
8689 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8691 (_loop_vec_info::~_loop_vec_info): Delete it.
8692 (cse_and_gimplify_to_preheader): New function.
8693 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8694 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8695 (vectorizable_load): Likewise. For grouped stores always base
8696 the IV on the first element.
8697 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8698 condition before gimplifying.
8700 2018-02-07 Jakub Jelinek <jakub@redhat.com>
8702 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8703 *DIV_EXPR and *MOD_EXPR.
8705 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
8708 * config/i386/i386.c (ix86_option_override_internal): Mask out
8709 the CF_SET bit when checking -fcf-protection.
8711 2018-02-07 Tom de Vries <tom@codesourcery.com>
8714 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8717 2018-02-07 Richard Biener <rguenther@suse.de>
8719 PR tree-optimization/84204
8720 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8723 PR tree-optimization/84205
8724 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8725 special-case isl_ast_op_zdiv_r.
8727 PR tree-optimization/84223
8728 * graphite-scop-detection.c (gather_bbs::before_dom_children):
8729 Only add conditions from within the region.
8730 (gather_bbs::after_dom_children): Adjust.
8732 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
8735 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8736 * config/avr/avr.md: Only post-reload split REG-REG moves if
8737 either register is GENERAL_REG_P.
8739 2018-02-07 Jakub Jelinek <jakub@redhat.com>
8741 PR tree-optimization/84235
8742 * tree-ssa-scopedtables.c
8743 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8744 if the subtraction is performed in floating point type where NaNs are
8745 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8746 build 1. Formatting fix.
8748 2018-02-06 Jakub Jelinek <jakub@redhat.com>
8751 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8752 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8753 and skip it regardless of bb boundaries. Use CALL_P macro,
8754 don't test INSN_P (insn) together with CALL_P or JUMP_P check
8755 unnecessarily, formatting fix.
8757 2018-02-06 Michael Collison <michael.collison@arm.com>
8759 * config/arm/thumb2.md:
8760 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8761 (*thumb_mov_notscc): Ditto.
8763 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
8766 * config/rs6000/rs6000.md (su code attribute): Use "u" for
8767 unsigned_fix, not "s".
8769 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8771 * configure.ac (gcc_fn_eh_frame_ro): New function.
8772 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8773 correct .eh_frame permissions.
8774 * configure: Regenerate.
8776 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
8778 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8781 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8783 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8784 Display warning message for -mno-speculate-indirect-jumps.
8786 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
8788 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8790 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8792 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
8794 PR tree-optimization/84225
8795 * tree-eh.c (find_trapping_overflow): Only call
8796 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8798 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8801 * config/i386/i386.c: Reimplement the check of possible options
8802 -mibt/-mshstk conbination. Change error messages.
8803 * doc/invoke.texi: Fix a typo: remove extra '='.
8805 2018-02-06 Marek Polacek <polacek@redhat.com>
8807 PR tree-optimization/84228
8808 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8810 2018-02-06 Tamar Christina <tamar.christina@arm.com>
8813 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8814 emitted arch directives.
8815 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8816 __ARM_FEATURE_COPROC before changing architectures.
8818 2018-02-06 Richard Biener <rguenther@suse.de>
8820 * config/i386/i386.c (print_reg): Fix typo.
8821 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8823 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
8825 * configure: Regenerate.
8827 2018-02-05 Martin Sebor <msebor@redhat.com>
8829 PR tree-optimization/83369
8830 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8833 2018-02-05 Martin Liska <mliska@suse.cz>
8835 * doc/invoke.texi: Cherry-pick upstream r323995.
8837 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
8839 * ira.c (ira_init_register_move_cost): Adjust comment.
8841 2018-02-05 Martin Liska <mliska@suse.cz>
8843 PR gcov-profile/84137
8844 * doc/gcov.texi: Fix typo in documentation.
8846 2018-02-05 Martin Liska <mliska@suse.cz>
8848 PR gcov-profile/83879
8849 * doc/gcov.texi: Document necessity of --dynamic-list-data when
8850 using dlopen functionality.
8852 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
8854 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8855 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8856 _mm_maskz_range_ss, _mm_mask_range_round_ss,
8857 _mm_maskz_range_round_ss): New intrinsics.
8858 (__builtin_ia32_rangesd128_round)
8859 (__builtin_ia32_rangess128_round): Remove.
8860 (__builtin_ia32_rangesd128_mask_round,
8861 __builtin_ia32_rangess128_mask_round): New builtins.
8862 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8863 __builtin_ia32_rangess128_round): Remove.
8864 (__builtin_ia32_rangesd128_mask_round,
8865 __builtin_ia32_rangess128_mask_round): New builtins.
8866 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8867 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8868 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8869 "<round_saeonly_constraint>")): Changed to ...
8870 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8871 "<round_saeonly_scalar_constraint>")): ... this.
8872 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8873 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8874 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8875 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8876 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8878 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
8880 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8882 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8883 Remove all values except native, 8540 and 8548.
8885 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
8887 * config/i386/i386.c (ix86_output_function_return): Pass
8888 INVALID_REGNUM, instead of -1, as invalid register number to
8889 indirect_thunk_name and output_indirect_thunk.
8891 2018-02-02 Julia Koval <julia.koval@intel.com>
8893 * config.gcc: Add -march=icelake.
8894 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8895 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8896 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8897 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8898 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8899 (processor_target_table): Add icelake.
8900 (ix86_option_override_internal): Handle new PTAs.
8901 (get_builtin_code_for_version): Handle icelake.
8902 (M_INTEL_COREI7_ICELAKE): New.
8903 (fold_builtin_cpu): Handle icelake.
8904 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8905 * doc/invoke.texi: Add -march=icelake.
8907 2018-02-02 Julia Koval <julia.koval@intel.com>
8909 * config/i386/i386.c (ix86_option_override_internal): Change flags type
8910 to wide_int_bitmask.
8911 * wide-int-bitmask.h: New.
8913 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8916 * config/i386/i386.md: Replace Pmode with word_mode in
8917 builtin_setjmp_setup and builtin_longjmp to support x32.
8919 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
8923 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8925 (rs6000_supported_cpu_names): New static variable.
8926 (linux_cpu_translation_table): Likewise.
8927 (elf_platform) <cpu>: Define new static variable and use it.
8928 Translate kernel AT_PLATFORM name to canonical name if needed.
8929 Error if platform name is unknown.
8931 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
8934 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8936 2018-02-01 Jeff Law <law@redhat.com>
8939 * config/i386/i386.c (release_scratch_register_on_entry): Add new
8940 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
8941 the scratch if RELEASE_VIA_POP is false.
8942 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8943 If we have to save a temporary register, decrement SIZE appropriately.
8944 Pass new arguments to release_scratch_register_on_entry.
8945 (ix86_adjust_stack_and_probe): Likewise.
8946 (ix86_emit_probe_stack_range): Pass new arguments to
8947 release_scratch_register_on_entry.
8949 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
8951 PR rtl-optimization/84157
8952 * combine.c (change_zero_ext): Use REG_P predicate in
8953 front of HARD_REGISTER_P predicate.
8955 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
8957 * config/avr/avr.c (avr_option_override): Move disabling of
8958 -fdelete-null-pointer-checks to...
8959 * common/config/avr/avr-common.c (avr_option_optimization_table):
8962 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8964 PR tree-optimization/81635
8965 * tree-data-ref.c (split_constant_offset_1): For types that
8966 wrap on overflow, try to use range info to prove that wrapping
8969 2018-02-01 Renlin Li <renlin.li@arm.com>
8972 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8974 (aarch64_register_move_cost): Likewise.
8975 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8977 (REG_CLASS_NAMES): Likewise.
8978 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8979 TAILCALL_ADDR_REGS. Remove IP registers.
8980 * config/aarch64/aarch64.md (Ucs): Update register constraint.
8982 2018-02-01 Richard Biener <rguenther@suse.de>
8984 * domwalk.h (dom_walker::dom_walker): Add additional constructor
8985 for specifying RPO order and allow NULL for that.
8986 * domwalk.c (dom_walker::dom_walker): Likewise.
8987 (dom_walker::walk): Handle NULL RPO order.
8988 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8990 (rewrite_update_dom_walker): Likewise.
8991 (mark_def_dom_walker): Likewise.
8993 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8995 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8996 (aarch64_maybe_expand_sve_subreg_move): Declare.
8997 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8998 * config/aarch64/predicates.md (aarch64_any_register_operand): New
9000 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
9001 that are semantically a reverse operation.
9002 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
9003 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
9004 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
9006 (aarch64_can_change_mode_class): For big-endian, forbid changes
9007 between two SVE modes if they have different element sizes.
9009 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9011 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
9012 the TImode handling for big-endian targets.
9014 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9016 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
9017 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
9019 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
9020 Remove BSWAP handing for big-endian targets and use the form of
9021 LD1RQ appropariate for the mode.
9023 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9025 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
9026 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
9029 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9032 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
9033 check for operands that need to go through aarch64_sve_reload_be.
9035 2018-02-01 Jakub Jelinek <jakub@redhat.com>
9037 PR tree-optimization/81661
9038 PR tree-optimization/84117
9039 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
9040 * tree-eh.c: Include gimplify.h.
9041 (find_trapping_overflow, replace_trapping_overflow,
9042 rewrite_to_non_trapping_overflow): New functions.
9043 * tree-vect-loop.c: Include tree-eh.h.
9044 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
9045 * tree-data-ref.c: Include tree-eh.h.
9046 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
9048 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
9050 PR rtl-optimization/84123
9051 * combine.c (change_zero_ext): Check if hard register satisfies
9052 can_change_dest_mode before calling gen_lowpart_SUBREG.
9054 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
9057 * ira.c (ira_init_register_move_cost): Remove assert.
9059 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9061 PR rtl-optimization/84071
9062 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
9063 * doc/tm.texi: Regenerate.
9065 2018-01-31 Richard Biener <rguenther@suse.de>
9067 PR tree-optimization/84132
9068 * tree-data-ref.c (analyze_miv_subscript): Properly
9069 check whether evolution_function_is_affine_multivariate_p
9070 before calling gcd_of_steps_may_divide_p.
9072 2018-01-31 Julia Koval <julia.koval@intel.com>
9075 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
9076 * config/i386/i386.md (rdpid_rex64) New.
9077 (rdpid): Make 32bit only.
9079 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
9082 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
9083 an IDENTIFIER_NODE for FUNCTION_TYPE's.
9085 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9088 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
9090 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
9092 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9094 PR rtl-optimization/84071
9095 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
9096 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
9098 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
9100 * config/arc/arc.c (arc_handle_aux_attribute): New function.
9101 (arc_attribute_table): Add 'aux' attribute.
9102 (arc_in_small_data_p): Consider aux like variables.
9103 (arc_is_aux_reg_p): New function.
9104 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
9105 (arc_get_aux_arg): New function.
9106 (prepare_move_operands): Handle aux-register access.
9107 (arc_handle_aux_attribute): New function.
9108 * doc/extend.texi (ARC Variable attributes): Add subsection.
9110 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
9112 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
9113 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
9114 (arc_attribute_table): Add 'uncached' attribute.
9115 (arc_print_operand): Print '.di' flag for uncached memory
9117 (arc_in_small_data_p): Do not consider for small data the uncached
9119 (arc_is_uncached_mem_p): New function.
9120 * config/arc/predicates.md (compact_store_memory_operand): Check
9121 for uncached memory accesses.
9122 (nonvol_nonimm_operand): Likewise.
9123 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
9125 2018-01-31 Jakub Jelinek <jakub@redhat.com>
9128 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
9129 falign-loops=): Add Optimization flag.
9131 2018-01-30 Jeff Law <law@redhat.com>
9134 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
9135 INT_REGISTERS_SAVED. Check it prior to calling
9136 get_scratch_register_on_entry.
9137 (ix86_adjust_stack_and_probe): Similarly.
9138 (ix86_emit_probe_stack_range): Similarly.
9139 (ix86_expand_prologue): Corresponding changes.
9141 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9144 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
9145 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
9147 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
9150 * lra-constraints.c (curr_insn_transform): Process AND in the
9153 2018-01-30 Jakub Jelinek <jakub@redhat.com>
9155 PR rtl-optimization/83986
9156 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
9157 dependence against last_pending_memory_flush in addition to
9160 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
9162 PR tree-optimization/81611
9163 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
9166 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9169 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
9172 2018-01-30 Richard Biener <rguenther@suse.de>
9173 Jakub Jelinek <jakub@redhat.com>
9175 PR tree-optimization/84111
9176 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
9177 inner loops added during recursion, as they don't have up-to-date
9180 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
9183 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
9184 (can_inline_edge_by_limits_p): ... here.
9185 (can_early_inline_edge_p, check_callers,
9186 update_caller_keys, update_callee_keys, recursive_inlining,
9187 add_new_edges_to_heap, speculation_useful_p,
9188 inline_small_functions,
9189 inline_small_functions, flatten_function,
9190 inline_to_all_callers_1): Update.
9192 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
9194 * profile-count.c (profile_count::combine_with_ipa_count): Handle
9197 2018-01-30 Richard Biener <rguenther@suse.de>
9199 PR tree-optimization/83008
9200 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
9201 invariant and constant vector uses in stmts when they need
9204 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9207 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
9208 * configure: Regenerate.
9210 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9212 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9214 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9215 Use gen_rtx_REG rather than gen_lowpart.
9217 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9219 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9220 rather than 0 when creating partial subregs.
9222 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9224 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9227 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
9230 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9231 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9232 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9233 flags. This restores the settings used before the 2017-07-24.
9234 Turning off pre increment/decrement/modify allows IVOPTS to
9235 optimize DF/SF loops where the index is an int.
9237 2018-01-29 Richard Biener <rguenther@suse.de>
9238 Kelvin Nilsen <kelvin@gcc.gnu.org>
9241 * tree-vect-stmts.c (vectorizable_call): Don't call
9242 targetm.vectorize_builtin_md_vectorized_function if callee is
9245 2018-01-22 Carl Love <cel@us.ibm.com>
9247 * doc/extend.tex: Fix typo in second arg in
9248 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9250 2018-01-29 Richard Biener <rguenther@suse.de>
9252 PR tree-optimization/84086
9253 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9254 (flush_ssaname_freelist): When SSA names were released reset
9255 the SCEV hash table.
9257 2018-01-29 Richard Biener <rguenther@suse.de>
9259 PR tree-optimization/84057
9260 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9261 removed paths when removing edges.
9263 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
9265 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9266 -mfunction-return=@var{choice}.
9268 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
9271 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9273 (layout::print_source_line): Likewise.
9274 (test_get_line_width_without_trailing_whitespace): Add test cases.
9276 2018-01-27 Jakub Jelinek <jakub@redhat.com>
9279 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9282 2018-01-26 Jim Wilson <jimw@sifive.com>
9284 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9286 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9289 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9291 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9292 and CMP + SUB-immediate -> SUBS.
9294 2018-01-26 Martin Sebor <msebor@redhat.com>
9296 PR tree-optimization/83896
9297 * tree-ssa-strlen.c (get_string_len): Rename...
9298 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
9299 Avoid assuming length is constant.
9300 (handle_char_store): Use HOST_WIDE_INT for string length.
9302 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
9305 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9306 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9308 2018-01-26 Richard Biener <rguenther@suse.de>
9310 PR rtl-optimization/84003
9311 * dse.c (record_store): Only record redundant stores when
9312 the earlier store aliases at least all accesses the later one does.
9314 2018-01-26 Jakub Jelinek <jakub@redhat.com>
9316 PR rtl-optimization/83985
9317 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9318 REG_CFA_RESTORE insns.
9319 (delete_unmarked_insns): Don't ignore separate shrink wrapping
9320 REG_CFA_RESTORE insns here.
9323 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9324 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9326 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9328 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9329 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9330 (arc_init): Likewise.
9331 (arc_override_options): Likewise.
9332 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9334 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9336 * config/arc/arc.h (TARGET_DBNZ): Define.
9337 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9338 properly set the tune attribute.
9339 (dbnz): Use TARGET_DBNZ guard.
9340 * config/arc/arc.opt (mtune): Add core3 option.
9342 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9344 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9345 recognize new pic like addresses.
9346 (arc_delegitimize_address): Clean up.
9348 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9350 * config/arc/arc-arches.def: Option mrf16 valid for all
9352 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9353 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9354 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9355 * config/arc/arc-tables.opt: Regenerate.
9356 * config/arc/arc.c (arc_conditional_register_usage): Handle
9357 reduced register file case.
9358 (arc_file_start): Set must have build attributes.
9359 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9361 * config/arc/arc.opt (mrf16): Add new option.
9362 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9363 * config/arc/genmultilib.awk: Handle new mrf16 option.
9364 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9365 * config/arc/t-multilib: Regenerate.
9366 * doc/invoke.texi (ARC Options): Document mrf16 option.
9368 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9370 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9371 * config/arc/arc.c (arc_handle_secure_attribute): New function.
9372 (arc_attribute_table): Add 'secure_call' attribute.
9373 (arc_print_operand): Print secure call operand.
9374 (arc_function_ok_for_sibcall): Don't optimize tail calls when
9376 (arc_is_secure_call_p): New function. * config/arc/arc.md
9377 (call_i): Add support for sjli instruction.
9378 (call_value_i): Likewise.
9379 * config/arc/constraints.md (Csc): New constraint.
9381 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9382 John Eric Martin <John.Martin@emmicro-us.com>
9384 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9385 * config/arc/arc.c (_arc_jli_section): New struct.
9386 (arc_jli_section): New type.
9387 (rc_jli_sections): New static variable.
9388 (arc_handle_jli_attribute): New function.
9389 (arc_attribute_table): Add jli_always and jli_fixed attribute.
9390 (arc_file_end): New function.
9391 (TARGET_ASM_FILE_END): Define.
9392 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9393 (arc_add_jli_section): New function.
9394 (jli_call_scan): Likewise.
9395 (arc_reorg): Call jli_call_scan.
9396 (arc_output_addsi): Remove 'S' from printing asm operand.
9397 (arc_is_jli_call_p): New function.
9398 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9400 (movhi_insn): Likewise.
9401 (movsi_insn): Likewise.
9402 (movsi_set_cc_insn): Likewise.
9403 (loadqi_update): Likewise.
9404 (load_zeroextendqisi_update): Likewise.
9405 (load_signextendqisi_update): Likewise.
9406 (loadhi_update): Likewise.
9407 (load_zeroextendhisi_update): Likewise.
9408 (load_signextendhisi_update): Likewise.
9409 (loadsi_update): Likewise.
9410 (loadsf_update): Likewise.
9411 (movsicc_insn): Likewise.
9412 (bset_insn): Likewise.
9413 (bxor_insn): Likewise.
9414 (bclr_insn): Likewise.
9415 (bmsk_insn): Likewise.
9416 (bicsi3_insn): Likewise.
9417 (cmpsi_cc_c_insn): Likewise.
9418 (movsi_ne): Likewise.
9419 (movsi_cond_exec): Likewise.
9420 (clrsbsi2): Likewise.
9431 (call_i): Remove 'S' asm letter, add jli instruction.
9432 (call_value_i): Likewise.
9433 * config/arc/arc.op (mjli-always): New option.
9434 * config/arc/constraints.md (Cji): New constraint.
9435 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9437 (subsf3_fpx): Likewise.
9438 (mulsf3_fpx): Likewise.
9439 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9441 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9443 * doc/invoke.texi (ARC): Document mjli-always option.
9445 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
9447 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
9448 avoid addition with 0 and use incw and decw where possible.
9450 2018-01-26 Richard Biener <rguenther@suse.de>
9452 PR tree-optimization/81082
9453 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9454 association if it requires casting to unsigned.
9455 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9456 from fold_plusminus_mult_expr to catch important cases late when
9457 range info is available.
9459 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9461 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9462 * configure.ac (hidden_linkonce): New test.
9463 * configure: Regenerate.
9464 * config.in: Regenerate.
9466 2018-01-26 Julia Koval <julia.koval@intel.com>
9468 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9469 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9470 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9471 _mm_mask_bitshuffle_epi64_mask): Fix type.
9472 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9473 USI_FTYPE_V4DI_V4DI_USI): Remove.
9474 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9475 __builtin_ia32_vpshufbitqmb256_mask,
9476 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9477 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9478 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9480 2018-01-26 Alan Modra <amodra@gmail.com>
9483 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9484 UNSPEC_VBPERMQ. Sort other unspecs.
9486 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
9488 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9490 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
9493 * predict.c (drop_profile): Do not push/pop cfun; update also
9495 (handle_missing_profiles): Fix logic looking for zero profiles.
9497 2018-01-25 Jakub Jelinek <jakub@redhat.com>
9500 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9501 on functions with #pragma omp declare simd or functions with simd
9503 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9504 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9505 Remove trailing \n from warning_at calls.
9507 2018-01-25 Tom de Vries <tom@codesourcery.com>
9510 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9511 for neutered workers.
9513 2018-01-24 Joseph Myers <joseph@codesourcery.com>
9516 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9517 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9519 2018-01-24 Jeff Law <law@redhat.com>
9522 * i386.c (get_probe_interval): Move to earlier point.
9523 (ix86_compute_frame_layout): If -fstack-clash-protection and
9524 the frame is larger than the probe interval, then use pushes
9525 to save registers rather than reg->mem moves.
9526 (ix86_expand_prologue): Remove conditional for int_registers_saved
9529 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
9532 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9533 min/max for never referenced object.
9535 2018-01-24 Jakub Jelinek <jakub@redhat.com>
9538 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9540 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9541 attributes from DECL_ATTRIBUTES (decl) without affecting
9542 DECL_ATTRIBUTES (current_function_decl).
9543 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9544 functions with non-NULL DECL_ABSTRACT_ORIGIN.
9546 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
9548 PR tree-optimization/83979
9549 * fold-const.c (fold_comparison): Use constant_boolean_node
9550 instead of boolean_{true,false}_node.
9552 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
9554 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9557 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9559 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9560 Simplify the clause that sets the length attribute.
9561 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9562 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9563 clause that sets the length attribute.
9564 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9566 2018-01-24 Tom de Vries <tom@codesourcery.com>
9569 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9570 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9571 Add strict parameter.
9572 (prevent_branch_around_nothing): Insert dummy insn between branch to
9573 label and label with no ptx insn inbetween.
9574 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9576 2018-01-24 Tom de Vries <tom@codesourcery.com>
9579 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9580 for neutered threads in warp.
9581 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9583 2018-01-24 Richard Biener <rguenther@suse.de>
9585 PR tree-optimization/83176
9586 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9589 2018-01-24 Richard Biener <rguenther@suse.de>
9591 PR tree-optimization/82819
9592 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9593 code generating pluses that are no-ops in the target precision.
9595 2018-01-24 Richard Biener <rguenther@suse.de>
9598 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9600 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
9602 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9603 to merge probabilities.
9604 * predict.c (probably_never_executed): Also mark as cold functions
9605 with global 0 profile and guessed local profile.
9606 * profile-count.c (profile_probability::combine_with_count): New
9608 * profile-count.h (profile_probability::operator*,
9609 profile_probability::operator*=, profile_probability::operator/,
9610 profile_probability::operator/=): Reduce precision to adjusted
9611 and set value to guessed on contradictory divisions.
9612 (profile_probability::combine_with_freq): Remove.
9613 (profile_probability::combine_wiht_count): Declare.
9614 (profile_count::force_nonzero):: Set to adjusted.
9615 (profile_count::probability_in):: Set quality to adjusted.
9616 * tree-ssa-tail-merge.c (replace_block_by): Use
9619 2018-01-23 Andrew Waterman <andrew@sifive.com>
9620 Jim Wilson <jimw@sifive.com>
9622 * config/riscv/riscv.c (riscv_stack_boundary): New.
9623 (riscv_option_override): Set riscv_stack_boundary. Handle
9624 riscv_preferred_stack_boundary_arg.
9625 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9626 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9627 (STACK_BOUNDARY): Set to riscv_stack_boundary.
9628 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9629 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9630 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9632 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
9635 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9636 of struct ix86_frame.
9637 (ix86_expand_epilogue): Likewise. Add a local variable for
9638 the reg_save_offset field in struct ix86_frame.
9640 2018-01-23 Bin Cheng <bin.cheng@arm.com>
9642 PR tree-optimization/82604
9643 * tree-loop-distribution.c (enum partition_kind): New enum item
9644 PKIND_PARTIAL_MEMSET.
9645 (partition_builtin_p): Support above new enum item.
9646 (generate_code_for_partition): Ditto.
9647 (compute_access_range): Differentiate cases that equality can be
9648 proven at all loops, the innermost loops or no loops.
9649 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9650 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
9651 (finalize_partitions, distribute_loop): Don't fuse partition of
9652 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9653 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9656 2018-01-23 Martin Liska <mliska@suse.cz>
9658 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9659 order to ignore the predictor.
9660 (PRED_POLYMORPHIC_CALL): Likewise.
9661 (PRED_RECURSIVE_CALL): Likewise.
9663 2018-01-23 Martin Liska <mliska@suse.cz>
9665 * tree-profile.c (tree_profiling): Print function header to
9666 aware reader which function we are working on.
9667 * value-prof.c (gimple_find_values_to_profile): Do not print
9668 not interesting value histograms.
9670 2018-01-23 Martin Liska <mliska@suse.cz>
9672 * profile-count.h (enum profile_quality): Add
9673 profile_uninitialized as the first value. Do not number values
9674 as they are zero based.
9675 (profile_count::verify): Update sanity check.
9676 (profile_probability::verify): Likewise.
9678 2018-01-23 Nathan Sidwell <nathan@acm.org>
9680 * doc/invoke.texi (ffor-scope): Deprecate.
9682 2018-01-23 David Malcolm <dmalcolm@redhat.com>
9684 PR tree-optimization/83510
9685 * domwalk.c (set_all_edges_as_executable): New function.
9686 (dom_walker::dom_walker): Convert bool param
9687 "skip_unreachable_blocks" to enum reachability. Move setup of
9688 edge flags to set_all_edges_as_executable and only do it when
9689 reachability is REACHABLE_BLOCKS.
9690 * domwalk.h (enum dom_walker::reachability): New enum.
9691 (dom_walker::dom_walker): Convert bool param
9692 "skip_unreachable_blocks" to enum reachability.
9693 (set_all_edges_as_executable): New decl.
9694 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
9695 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9697 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9698 but converting true to REACHABLE_BLOCKS.
9699 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9701 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9702 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9703 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9705 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9706 if check_all_array_refs will be called.
9708 2018-01-23 David Malcolm <dmalcolm@redhat.com>
9710 * tree.c (selftest::test_location_wrappers): Add more test
9713 2018-01-23 David Malcolm <dmalcolm@redhat.com>
9715 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9716 (selftest::test_bit_in_range): Likewise.
9718 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
9721 * doc/sourcebuild.texi (vect_float): Say that the selector
9722 only describes the situation when -funsafe-math-optimizations is on.
9723 (vect_float_strict): Document.
9725 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
9727 PR tree-optimization/83965
9728 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9729 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9730 instead of checking only for a reduction.
9731 (vect_recog_widen_sum_pattern): Likewise.
9733 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
9735 * predict.c (probably_never_executed): Only use precise profile info.
9736 (compute_function_frequency): Skip after inlining hack since we now
9737 have quality checking.
9739 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
9741 * profile-count.h (profile_probability::very_unlikely,
9742 profile_probability::unlikely, profile_probability::even): Set
9743 precision to guessed.
9745 2018-01-23 Richard Biener <rguenther@suse.de>
9747 PR tree-optimization/83963
9748 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9749 Properly terminate dominator walk when crossing the exit edge not
9750 when visiting its source block.
9752 2018-01-23 Jakub Jelinek <jakub@redhat.com>
9755 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9756 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9758 2018-01-22 Jakub Jelinek <jakub@redhat.com>
9760 PR tree-optimization/83957
9761 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
9762 semicolon after for body surrounded by braces.
9764 PR tree-optimization/83081
9765 * profile-count.h (profile_probability::split): New method.
9766 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9767 Use profile_probability::split.
9768 (do_compare_rtx_and_jump): Fix adjustment of probabilities
9769 when splitting a single conditional jump into 2.
9771 2018-01-22 David Malcolm <dmalcolm@redhat.com>
9773 PR tree-optimization/69452
9774 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9777 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9779 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9780 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9781 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9783 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9785 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9786 * config/rl78/rl78.md (movdi): New define_expand.
9787 * config/rl78/rl78.c (rl78_split_movdi): New function.
9789 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
9792 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9794 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9795 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9796 128-bit to produce an UNSPEC move to get the double word with the
9797 signbit and then a shift directly to do signbit.
9798 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9799 implementation with a new version that just does either a direct
9800 move or a regular move. Move memory interface to separate insns.
9801 Move insns so they are next to the expander.
9802 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9803 with signbit move. Split big and little endian case.
9804 (signbit<mode>2_dm_mem_le): Likewise.
9805 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9806 (signbit<mode>2_dm2): Likewise.
9808 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9810 * config/rl78/rl78.md (anddi3): New define_expand.
9812 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9814 * config/rl78/rl78.md (umindi3): New define_expand.
9816 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9818 * config/rl78/rl78.md (smindi3): New define_expand.
9820 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9822 * config/rl78/rl78.md (smaxdi3): New define_expand.
9824 2018-01-22 Carl Love <cel@us.ibm.com>
9826 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9827 LVX_V1TI): Add macro expansion.
9828 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9829 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9830 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9831 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9832 Change check to determine if the instruction is a byte reversing
9833 entry. Fix typo in comment.
9834 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9835 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9836 Add def_builtin calls for new builtins.
9837 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9838 Add define_insn expansion.
9840 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9842 * config/rl78/rl78.md (umaxdi3): New define_expand.
9844 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9846 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9847 for non-QImode registers.
9849 2018-01-22 Richard Biener <rguenther@suse.de>
9851 PR tree-optimization/83963
9852 * graphite-scop-detection.c (scop_detection::get_sese): Delay
9853 including the loop exit block.
9854 (scop_detection::merge_sese): Likewise.
9855 (scop_detection::add_scop): Do it here instead.
9857 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9859 * doc/sourcebuild.texi (arm_softfloat): Document.
9861 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
9864 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9865 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9866 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9868 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9869 David Edelsohn <dje.gcc@gmail.com>
9872 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9873 Change "crset eq" to "crset 2".
9874 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9875 (*call_indirect_aix<mode>_nospec): Likewise.
9876 (*call_value_indirect_aix<mode>_nospec): Likewise.
9877 (*call_indirect_elfv2<mode>_nospec): Likewise.
9878 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9879 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9880 change assembly output from . to $.
9881 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9882 (indirect_jump<mode>_nospec): Change assembly output from . to $.
9883 (*tablejump<mode>_internal1_nospec): Likewise.
9885 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
9888 * config/sh/sh_optimize_sett_clrt.cc:
9889 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9891 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
9893 PR tree-optimization/83940
9894 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9895 offset_dt to vect_constant_def rather than vect_unknown_def_type.
9896 (vect_check_load_store_mask): Add a mask_dt_out parameter and
9897 use it to pass back the definition type.
9898 (vect_check_store_rhs): Likewise rhs_dt_out.
9899 (vect_build_gather_load_calls): Add a mask_dt argument and use
9900 it instead of a call to vect_is_simple_use.
9901 (vectorizable_store): Update calls to vect_check_load_store_mask
9902 and vect_check_store_rhs. Use the dt returned by the latter instead
9903 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
9904 instead of calls to vect_is_simple_use. Pass the scalar rather
9905 than the vector operand to vect_is_simple_use when handling
9906 second and subsequent copies of an rhs value.
9907 (vectorizable_load): Update calls to vect_check_load_store_mask
9908 and vect_build_gather_load_calls. Use the cached mask_dt and
9909 gs_info.offset_dt instead of calls to vect_is_simple_use.
9911 2018-01-20 Jakub Jelinek <jakub@redhat.com>
9914 * tree-emutls.c: Include gimplify.h.
9915 (lower_emutls_2): New function.
9916 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9917 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9918 it before further processing.
9921 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9922 UINTVAL (trueop1) instead of INTVAL (op1).
9924 2018-01-19 Jakub Jelinek <jakub@redhat.com>
9928 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9929 INCOMING_FRAME_SP_OFFSET if not defined.
9930 (scan_trace): Add ENTRY argument. If true and
9931 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9932 emit a note to adjust the CFA offset.
9933 (create_cfi_notes): Adjust scan_trace callers.
9934 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9935 INCOMING_FRAME_SP_OFFSET in the CIE.
9936 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9937 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9939 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9940 * doc/tm.texi: Regenerated.
9942 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9944 PR rtl-optimization/83147
9945 * lra-constraints.c (remove_inheritance_pseudos): Use
9946 lra_substitute_pseudo_within_insn.
9948 2018-01-19 Tom de Vries <tom@codesourcery.com>
9949 Cesar Philippidis <cesar@codesourcery.com>
9952 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9954 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
9957 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9958 spaces for function labels.
9960 2018-01-19 Martin Liska <mliska@suse.cz>
9962 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9963 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9964 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9965 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9966 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9967 (PRED_CONST_RETURN): Change from 69 to 65.
9968 (PRED_NULL_RETURN): Change from 91 to 71.
9969 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9970 (PRED_LOOP_GUARD): Change from 66 to 73.
9972 2018-01-19 Martin Liska <mliska@suse.cz>
9974 * predict.c (predict_insn_def): Add new assert.
9975 (struct branch_predictor): Change type to signed integer.
9976 (test_prediction_value_range): Amend test to cover
9978 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9979 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9980 (PRED_LOOP_ITERATIONS_MAX): Likewise.
9981 (PRED_LOOP_IV_COMPARE): Likewise.
9982 * predict.h (PROB_UNINITIALIZED): Define new constant.
9984 2018-01-19 Martin Liska <mliska@suse.cz>
9986 * predict.c (dump_prediction): Add new format for
9987 analyze_brprob.py script which is enabled with -details
9989 * profile-count.h (precise_p): New function.
9991 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
9993 PR tree-optimization/83922
9994 * tree-vect-loop.c (vect_verify_full_masking): Return false if
9995 there are no statements that need masking.
9996 (vect_active_double_reduction_p): New function.
9997 (vect_analyze_loop_operations): Use it when handling phis that
9998 are not in the loop header.
10000 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
10002 PR tree-optimization/83914
10003 * tree-vect-loop.c (vectorizable_induction): Don't convert
10004 init_expr or apply the peeling adjustment for inductions
10005 that are nested within the vectorized loop.
10007 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10009 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
10012 2018-01-18 Jakub Jelinek <jakub@redhat.com>
10016 * function.h (gimplify_parameters): Add gimple_seq * argument.
10017 * function.c: Include gimple.h and options.h.
10018 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
10019 for the added local temporaries if needed.
10020 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
10021 if there are any parameter cleanups, wrap whole body into a
10022 try/finally with the cleanups.
10024 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
10027 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
10028 Use GET_MODE_CLASS for scalar floating point.
10030 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
10034 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
10035 Fix call of call_cgraph_insertion_hooks.
10037 2018-01-18 Martin Sebor <msebor@redhat.com>
10039 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
10041 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
10044 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
10047 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
10050 * common.opt: (-ffile-prefix-map): New option.
10051 * opts.c (common_handle_option): Defer it.
10052 * opts-global.c (handle_common_deferred_options): Handle it.
10053 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
10054 * file-prefix-map.h: New file.
10055 (remap_debug_filename, add_debug_prefix_map): ...here.
10056 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
10057 * final.c (debug_prefix_map, add_debug_prefix_map
10058 remap_debug_filename): Move to...
10059 * file-prefix-map.c: New file.
10060 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
10061 generalize, get rid of alloca(), use strrchr() instead of strchr().
10062 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
10063 Implement in terms of add_prefix_map().
10064 (remap_macro_filename, remap_debug_filename): Implement in term of
10066 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
10067 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
10068 * dbxout.c: Include file-prefix-map.h.
10069 * varasm.c: Likewise.
10070 * vmsdbgout.c: Likewise.
10071 * xcoffout.c: Likewise.
10072 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
10073 * doc/cppopts.texi (-fmacro-prefix-map): Document.
10074 * doc/invoke.texi (-ffile-prefix-map): Document.
10075 (-fdebug-prefix-map): Update description.
10077 2018-01-18 Martin Liska <mliska@suse.cz>
10079 * config/i386/i386.c (indirect_thunk_name): Document that also
10081 (output_indirect_thunk): Document why both instructions
10082 (pause and lfence) are generated.
10084 2018-01-18 Richard Biener <rguenther@suse.de>
10086 PR tree-optimization/83887
10087 * graphite-scop-detection.c
10088 (scop_detection::get_nearest_dom_with_single_entry): Remove.
10089 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
10090 (scop_detection::merge_sese): Re-implement with a flood-fill
10091 algorithm that properly finds a SESE region if it exists.
10093 2018-01-18 Jakub Jelinek <jakub@redhat.com>
10096 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
10097 pointer_diff optimizations use view_convert instead of convert.
10099 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10101 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10102 Generate different code for -mno-speculate-indirect-jumps.
10103 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10104 (*call_indirect_aix<mode>): Disable for
10105 -mno-speculate-indirect-jumps.
10106 (*call_indirect_aix<mode>_nospec): New define_insn.
10107 (*call_value_indirect_aix<mode>): Disable for
10108 -mno-speculate-indirect-jumps.
10109 (*call_value_indirect_aix<mode>_nospec): New define_insn.
10110 (*sibcall_nonlocal_sysv<mode>): Generate different code for
10111 -mno-speculate-indirect-jumps.
10112 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10114 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
10116 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
10117 long double type, set the flags for noting the default long double
10118 type, even if we don't pass or return a long double type.
10120 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
10123 * ipa-inline.c (flatten_function): Do not overwrite final inlining
10126 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
10128 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
10129 support for merge[hl].
10130 (fold_mergehl_helper): New helper function.
10131 (tree-vector-builder.h): New #include for tree_vector_builder usage.
10132 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
10133 (altivec_vmrglw_direct): Add xxmrglw insn.
10135 2018-01-17 Andrew Waterman <andrew@sifive.com>
10137 * config/riscv/riscv.c (riscv_conditional_register_usage): If
10138 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
10140 2018-01-17 David Malcolm <dmalcolm@redhat.com>
10143 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
10144 call the lto_location_cache before reading the
10145 DECL_SOURCE_LOCATION of the types.
10147 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
10148 Richard Sandiford <richard.sandiford@linaro.org>
10150 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
10151 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
10152 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
10153 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
10154 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
10156 * config/aarch64/constraints.md (aarch64_movti_operand):
10158 * config/aarch64/predicates.md (Uti): Add new constraint.
10160 2018-01-17 Carl Love <cel@us.ibm.com>
10162 * config/rs6000/vsx.md (define_expand xl_len_r,
10163 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
10164 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
10166 (define_expand, define_insn): Move the shift left from the
10167 define_insn to the define_expand for lxvl and stxvl instructions.
10168 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
10169 and XL_LEN_R definitions to PURE.
10171 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
10173 * config/i386/i386.c (indirect_thunk_name): Declare regno
10174 as unsigned int. Compare regno with INVALID_REGNUM.
10175 (output_indirect_thunk): Ditto.
10176 (output_indirect_thunk_function): Ditto.
10177 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
10178 in the call to output_indirect_thunk_function.
10180 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
10182 PR middle-end/83884
10183 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
10184 rather than the size of inner_type to determine the stack slot size
10185 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
10187 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
10190 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
10193 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
10195 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
10196 endian Linux systems to optionally enable multilibs for selecting
10197 the long double type if the user configured an explicit type.
10198 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
10199 have no long double multilibs if not defined.
10200 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
10201 warn if the user used -mabi={ieee,ibm}longdouble and we built
10202 multilibs for long double.
10203 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
10204 appropriate multilib option.
10205 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
10207 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
10208 for building long double multilibs.
10209 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10211 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
10213 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10216 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10218 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10221 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10224 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10227 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
10229 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10230 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10232 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10234 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10235 different rtl trees depending on TARGET_64BIT.
10236 (rs6000_gen_lvx): Likewise.
10238 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
10240 * config/visium/visium.md (nop): Tweak comment.
10241 (hazard_nop): Likewise.
10243 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10245 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10246 -mspeculate-indirect-jumps.
10247 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10248 for -mno-speculate-indirect-jumps.
10249 (*call_indirect_elfv2<mode>_nospec): New define_insn.
10250 (*call_value_indirect_elfv2<mode>): Disable for
10251 -mno-speculate-indirect-jumps.
10252 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10253 (indirect_jump): Emit different RTL for
10254 -mno-speculate-indirect-jumps.
10255 (*indirect_jump<mode>): Disable for
10256 -mno-speculate-indirect-jumps.
10257 (*indirect_jump<mode>_nospec): New define_insn.
10258 (tablejump): Emit different RTL for
10259 -mno-speculate-indirect-jumps.
10260 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10261 (tablejumpsi_nospec): New define_expand.
10262 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10263 (tablejumpdi_nospec): New define_expand.
10264 (*tablejump<mode>_internal1): Disable for
10265 -mno-speculate-indirect-jumps.
10266 (*tablejump<mode>_internal1_nospec): New define_insn.
10267 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10270 2018-01-16 Artyom Skrobov tyomitch@gmail.com
10272 * caller-save.c (insert_save): Drop unnecessary parameter. All
10275 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10276 Richard Biener <rguenth@suse.de>
10279 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10280 return early, inline manually is_gimple_sizepos. Make sure if we
10281 call gimplify_expr we don't end up with a gimple constant.
10282 * tree.c (variably_modified_type_p): Don't return true for
10283 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
10284 * gimplify.h (is_gimple_sizepos): Remove.
10286 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10288 PR tree-optimization/83857
10289 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10290 vectorizable_live_operation for pure SLP statements.
10291 (vectorizable_live_operation): Handle PHIs.
10293 2018-01-16 Richard Biener <rguenther@suse.de>
10295 PR tree-optimization/83867
10296 * tree-vect-stmts.c (vect_transform_stmt): Precompute
10297 nested_in_vect_loop_p since the scalar stmt may get invalidated.
10299 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10302 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10303 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10304 If off is not INTEGER_CST, issue a may not be aligned warning
10305 rather than isn't aligned. Use isn%'t rather than isn't.
10306 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10308 <case MULT_EXPR>: Improve the case when bottom and one of the
10309 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10310 operand, in that case check if the other operand is multiple of
10311 bottom divided by the INTEGER_CST operand.
10313 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10316 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10317 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10318 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10319 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10320 * config/pa/pa.c (pa_function_arg_advance): Likewise.
10321 (pa_function_arg, pa_arg_partial_bytes): Likewise.
10322 (pa_function_arg_size): New function.
10324 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10326 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10327 in a separate statement.
10329 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10331 PR tree-optimization/83847
10332 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10333 group gathers and scatters.
10335 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10337 PR rtl-optimization/86620
10338 * params.def (max-sched-ready-insns): Bump minimum value to 1.
10340 PR rtl-optimization/83213
10341 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10342 to last if both are JUMP_INSNs.
10344 PR tree-optimization/83843
10345 * gimple-ssa-store-merging.c
10346 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10347 store_immediate_info for bswap/nop orig_stores.
10349 2018-01-15 Andrew Waterman <andrew@sifive.com>
10351 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10353 <UDIV>: Increase cost if !TARGET_DIV.
10355 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
10357 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10358 (define_attr "cr_logical_3op"): New.
10359 (cceq_ior_compare): Adjust.
10360 (cceq_ior_compare_complement): Adjust.
10361 (*cceq_rev_compare): Adjust.
10362 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10363 (is_cracked_insn): Adjust.
10364 (insn_must_be_first_in_group): Adjust.
10365 * config/rs6000/40x.md: Adjust.
10366 * config/rs6000/440.md: Adjust.
10367 * config/rs6000/476.md: Adjust.
10368 * config/rs6000/601.md: Adjust.
10369 * config/rs6000/603.md: Adjust.
10370 * config/rs6000/6xx.md: Adjust.
10371 * config/rs6000/7450.md: Adjust.
10372 * config/rs6000/7xx.md: Adjust.
10373 * config/rs6000/8540.md: Adjust.
10374 * config/rs6000/cell.md: Adjust.
10375 * config/rs6000/e300c2c3.md: Adjust.
10376 * config/rs6000/e500mc.md: Adjust.
10377 * config/rs6000/e500mc64.md: Adjust.
10378 * config/rs6000/e5500.md: Adjust.
10379 * config/rs6000/e6500.md: Adjust.
10380 * config/rs6000/mpc.md: Adjust.
10381 * config/rs6000/power4.md: Adjust.
10382 * config/rs6000/power5.md: Adjust.
10383 * config/rs6000/power6.md: Adjust.
10384 * config/rs6000/power7.md: Adjust.
10385 * config/rs6000/power8.md: Adjust.
10386 * config/rs6000/power9.md: Adjust.
10387 * config/rs6000/rs64.md: Adjust.
10388 * config/rs6000/titan.md: Adjust.
10390 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10392 * config/i386/predicates.md (indirect_branch_operand): Rewrite
10393 ix86_indirect_branch_register logic.
10395 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10397 * config/i386/constraints.md (Bs): Update
10398 ix86_indirect_branch_register check. Don't check
10399 ix86_indirect_branch_register with GOT_memory_operand.
10401 * config/i386/predicates.md (GOT_memory_operand): Don't check
10402 ix86_indirect_branch_register here.
10403 (GOT32_symbol_operand): Likewise.
10405 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10407 * config/i386/predicates.md (constant_call_address_operand):
10408 Rewrite ix86_indirect_branch_register logic.
10409 (sibcall_insn_operand): Likewise.
10411 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10413 * config/i386/constraints.md (Bs): Replace
10414 ix86_indirect_branch_thunk_register with
10415 ix86_indirect_branch_register.
10417 * config/i386/i386.md (indirect_jump): Likewise.
10418 (tablejump): Likewise.
10419 (*sibcall_memory): Likewise.
10420 (*sibcall_value_memory): Likewise.
10421 Peepholes of indirect call and jump via memory: Likewise.
10422 * config/i386/i386.opt: Likewise.
10423 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10424 (GOT_memory_operand): Likewise.
10425 (call_insn_operand): Likewise.
10426 (sibcall_insn_operand): Likewise.
10427 (GOT32_symbol_operand): Likewise.
10429 2018-01-15 Jakub Jelinek <jakub@redhat.com>
10431 PR middle-end/83837
10432 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10433 type rather than type addr's type points to.
10434 (expand_omp_atomic_mutex): Likewise.
10435 (expand_omp_atomic): Likewise.
10437 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10440 * config/i386/i386.c (output_indirect_thunk_function): Use
10441 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10442 for __x86_return_thunk.
10444 2018-01-15 Richard Biener <rguenther@suse.de>
10446 PR middle-end/83850
10447 * expmed.c (extract_bit_field_1): Fix typo.
10449 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10452 * config/arm/iterators.md (VF): New mode iterator.
10453 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10454 Remove integer-related logic from pattern.
10455 (neon_vabd<mode>_3): Likewise.
10457 2018-01-15 Jakub Jelinek <jakub@redhat.com>
10459 PR middle-end/82694
10460 * common.opt (fstrict-overflow): No longer an alias.
10461 (fwrapv-pointer): New option.
10462 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10463 also for pointer types based on flag_wrapv_pointer.
10464 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10465 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10466 opts->x_flag_wrapv got set.
10467 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10468 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10469 POINTER_TYPE_OVERFLOW_UNDEFINED.
10470 * match.pd: Likewise in address comparison pattern.
10471 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10473 2018-01-15 Richard Biener <rguenther@suse.de>
10476 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10477 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
10478 Reset type names to their identifier if their TYPE_DECL doesn't
10479 have linkage (and thus is used for ODR and devirt).
10480 (save_debug_info_for_decl): Remove.
10481 (save_debug_info_for_type): Likewise.
10482 (add_tree_to_fld_list): Adjust.
10483 * tree-pretty-print.c (dump_generic_node): Make dumping of
10484 type names more robust.
10486 2018-01-15 Richard Biener <rguenther@suse.de>
10488 * BASE-VER: Bump to 8.0.1.
10490 2018-01-14 Martin Sebor <msebor@redhat.com>
10493 * builtins.c (check_access): Avoid warning when the no-warning bit
10496 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
10498 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10499 * ira-color (allocno_hard_regs_compare): Likewise.
10501 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
10504 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10505 Use .pushsection/.popsection.
10507 2018-01-14 Martin Sebor <msebor@redhat.com>
10510 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10512 2018-01-14 Jakub Jelinek <jakub@redhat.com>
10514 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10515 entry from extra_headers.
10516 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10517 extra_headers, make the list bitwise identical to the i?86-*-* one.
10519 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10521 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10522 -mcmodel=large with -mindirect-branch=thunk,
10523 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10524 -mfunction-return=thunk-extern.
10525 * doc/invoke.texi: Document -mcmodel=large is incompatible with
10526 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10527 -mfunction-return=thunk and -mfunction-return=thunk-extern.
10529 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10531 * config/i386/i386.c (print_reg): Print the name of the full
10532 integer register without '%'.
10533 (ix86_print_operand): Handle 'V'.
10534 * doc/extend.texi: Document 'V' modifier.
10536 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10538 * config/i386/constraints.md (Bs): Disallow memory operand for
10539 -mindirect-branch-register.
10541 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10542 (GOT_memory_operand): Likewise.
10543 (call_insn_operand): Likewise.
10544 (sibcall_insn_operand): Likewise.
10545 (GOT32_symbol_operand): Likewise.
10546 * config/i386/i386.md (indirect_jump): Call convert_memory_address
10547 for -mindirect-branch-register.
10548 (tablejump): Likewise.
10549 (*sibcall_memory): Likewise.
10550 (*sibcall_value_memory): Likewise.
10551 Disallow peepholes of indirect call and jump via memory for
10552 -mindirect-branch-register.
10553 (*call_pop): Replace m with Bw.
10554 (*call_value_pop): Likewise.
10555 (*sibcall_pop_memory): Replace m with Bs.
10556 * config/i386/i386.opt (mindirect-branch-register): New option.
10557 * doc/invoke.texi: Document -mindirect-branch-register option.
10559 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10561 * config/i386/i386-protos.h (ix86_output_function_return): New.
10562 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10563 set function_return_type.
10564 (indirect_thunk_name): Add ret_p to indicate thunk for function
10566 (output_indirect_thunk_function): Pass false to
10567 indirect_thunk_name.
10568 (ix86_output_indirect_branch_via_reg): Likewise.
10569 (ix86_output_indirect_branch_via_push): Likewise.
10570 (output_indirect_thunk_function): Create alias for function
10571 return thunk if regno < 0.
10572 (ix86_output_function_return): New function.
10573 (ix86_handle_fndecl_attribute): Handle function_return.
10574 (ix86_attribute_table): Add function_return.
10575 * config/i386/i386.h (machine_function): Add
10576 function_return_type.
10577 * config/i386/i386.md (simple_return_internal): Use
10578 ix86_output_function_return.
10579 (simple_return_internal_long): Likewise.
10580 * config/i386/i386.opt (mfunction-return=): New option.
10581 (indirect_branch): Mention -mfunction-return=.
10582 * doc/extend.texi: Document function_return function attribute.
10583 * doc/invoke.texi: Document -mfunction-return= option.
10585 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10587 * config/i386/i386-opts.h (indirect_branch): New.
10588 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10589 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10590 with local indirect jump when converting indirect call and jump.
10591 (ix86_set_indirect_branch_type): New.
10592 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10593 (indirectlabelno): New.
10594 (indirect_thunk_needed): Likewise.
10595 (indirect_thunk_bnd_needed): Likewise.
10596 (indirect_thunks_used): Likewise.
10597 (indirect_thunks_bnd_used): Likewise.
10598 (INDIRECT_LABEL): Likewise.
10599 (indirect_thunk_name): Likewise.
10600 (output_indirect_thunk): Likewise.
10601 (output_indirect_thunk_function): Likewise.
10602 (ix86_output_indirect_branch_via_reg): Likewise.
10603 (ix86_output_indirect_branch_via_push): Likewise.
10604 (ix86_output_indirect_branch): Likewise.
10605 (ix86_output_indirect_jmp): Likewise.
10606 (ix86_code_end): Call output_indirect_thunk_function if needed.
10607 (ix86_output_call_insn): Call ix86_output_indirect_branch if
10609 (ix86_handle_fndecl_attribute): Handle indirect_branch.
10610 (ix86_attribute_table): Add indirect_branch.
10611 * config/i386/i386.h (machine_function): Add indirect_branch_type
10612 and has_local_indirect_jump.
10613 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10615 (tablejump): Likewise.
10616 (*indirect_jump): Use ix86_output_indirect_jmp.
10617 (*tablejump_1): Likewise.
10618 (simple_return_indirect_internal): Likewise.
10619 * config/i386/i386.opt (mindirect-branch=): New option.
10620 (indirect_branch): New.
10623 (thunk-inline): Likewise.
10624 (thunk-extern): Likewise.
10625 * doc/extend.texi: Document indirect_branch function attribute.
10626 * doc/invoke.texi: Document -mindirect-branch= option.
10628 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
10631 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10633 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
10635 * ipa-inline.c (want_inline_small_function_p): Return false if
10636 inlining has already failed with CIF_FINAL_ERROR.
10637 (update_caller_keys): Call want_inline_small_function_p before
10639 (update_callee_keys): Likewise.
10641 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10643 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10645 (rs6000_quadword_masked_address_p): Likewise.
10646 (quad_aligned_load_p): Likewise.
10647 (quad_aligned_store_p): Likewise.
10648 (const_load_sequence_p): Add comment to describe the outer-most loop.
10649 (mimic_memory_attributes_and_flags): New function.
10650 (rs6000_gen_stvx): Likewise.
10651 (replace_swapped_aligned_store): Likewise.
10652 (rs6000_gen_lvx): Likewise.
10653 (replace_swapped_aligned_load): Likewise.
10654 (replace_swapped_load_constant): Capitalize argument name in
10655 comment describing this function.
10656 (rs6000_analyze_swaps): Add a third pass to search for vector loads
10657 and stores that access quad-word aligned addresses and replace
10658 with stvx or lvx instructions when appropriate.
10659 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10660 New function prototype.
10661 (rs6000_quadword_masked_address_p): Likewise.
10662 (rs6000_gen_lvx): Likewise.
10663 (rs6000_gen_stvx): Likewise.
10664 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10665 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10666 when memory address is aligned.
10667 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10668 this split to select lvx instruction when memory address is aligned.
10669 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10670 instruction when memory address is aligned.
10671 (*vsx_le_perm_load_v16qi): Likewise.
10672 (four unnamed splitters): Modify to select the stvx instruction
10673 when memory is aligned.
10675 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
10677 * predict.c (determine_unlikely_bbs): Handle correctly BBs
10678 which appears in the queue multiple times.
10680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10681 Alan Hayward <alan.hayward@arm.com>
10682 David Sherwood <david.sherwood@arm.com>
10684 * tree-vectorizer.h (vec_lower_bound): New structure.
10685 (_loop_vec_info): Add check_nonzero and lower_bounds.
10686 (LOOP_VINFO_CHECK_NONZERO): New macro.
10687 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10688 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10689 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10690 fields. Make seg_len the distance travelled, not including the
10692 (dr_direction_indicator): Declare.
10693 (dr_zero_step_indicator): Likewise.
10694 (dr_known_forward_stride_p): Likewise.
10695 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10697 (runtime_alias_check_p): Allow runtime alias checks with
10699 (operator ==): Compare access_size and align.
10700 (prune_runtime_alias_test_list): Rework for new distinction between
10701 the access_size and seg_len.
10702 (create_intersect_range_checks_index): Likewise. Cope with polynomial
10704 (get_segment_min_max): New function.
10705 (create_intersect_range_checks): Use it.
10706 (dr_step_indicator): New function.
10707 (dr_direction_indicator): Likewise.
10708 (dr_zero_step_indicator): Likewise.
10709 (dr_known_forward_stride_p): Likewise.
10710 * tree-loop-distribution.c (data_ref_segment_size): Return
10711 DR_STEP * (niters - 1).
10712 (compute_alias_check_pairs): Update call to the dr_with_seg_len
10714 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10715 (vect_preserves_scalar_order_p): New function, split out from...
10716 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
10717 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10718 (vect_vfa_access_size): New function.
10719 (vect_vfa_align): Likewise.
10720 (vect_compile_time_alias): Take access_size_a and access_b arguments.
10721 (dump_lower_bound): New function.
10722 (vect_check_lower_bound): Likewise.
10723 (vect_small_gap_p): Likewise.
10724 (vectorizable_with_step_bound_p): Likewise.
10725 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10726 depencies if the vectorization factor is 1. Convert the checks
10727 for nonzero steps into checks on the bounds of DR_STEP. Try using
10728 a bunds check for variable steps if the minimum required step is
10729 relatively small. Update calls to the dr_with_seg_len
10730 constructor and to vect_compile_time_alias.
10731 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10733 (vect_loop_versioning): Call it.
10734 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10736 (vect_estimate_min_profitable_iters): Account for any bounds checks.
10738 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10739 Alan Hayward <alan.hayward@arm.com>
10740 David Sherwood <david.sherwood@arm.com>
10742 * doc/sourcebuild.texi (vect_scatter_store): Document.
10743 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10745 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10747 * genopinit.c (main): Add supports_vec_scatter_store and
10748 supports_vec_scatter_store_cached to target_optabs.
10749 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10750 IFN_MASK_SCATTER_STORE.
10751 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10753 * internal-fn.h (internal_store_fn_p): Declare.
10754 (internal_fn_stored_value_index): Likewise.
10755 * internal-fn.c (scatter_store_direct): New macro.
10756 (expand_scatter_store_optab_fn): New function.
10757 (direct_scatter_store_optab_supported_p): New macro.
10758 (internal_store_fn_p): New function.
10759 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10760 IFN_MASK_SCATTER_STORE.
10761 (internal_fn_mask_index): Likewise.
10762 (internal_fn_stored_value_index): New function.
10763 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10764 for scatter stores.
10765 * optabs-query.h (supports_vec_scatter_store_p): Declare.
10766 * optabs-query.c (supports_vec_scatter_store_p): New function.
10767 * tree-vectorizer.h (vect_get_store_rhs): Declare.
10768 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10769 true for scatter stores.
10770 (vect_gather_scatter_fn_p): Handle scatter stores too.
10771 (vect_check_gather_scatter): Consider using scatter stores if
10772 supports_vec_scatter_store_p.
10773 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10774 scatter stores too.
10775 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10776 internal_fn_stored_value_index.
10777 (check_load_store_masking): Handle scatter stores too.
10778 (vect_get_store_rhs): Make public.
10779 (vectorizable_call): Use internal_store_fn_p.
10780 (vectorizable_store): Handle scatter store internal functions.
10781 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10782 when deciding whether the end of the group has been reached.
10783 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10784 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10785 (mask_scatter_store<mode>): New insns.
10787 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10788 Alan Hayward <alan.hayward@arm.com>
10789 David Sherwood <david.sherwood@arm.com>
10791 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10792 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10793 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10795 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10796 Use vect_truncate_gather_scatter_offset if we can't treat the
10797 operation as a normal gather load or scatter store.
10798 (get_group_load_store_type): Take the gather_scatter_info
10799 as argument. Try using a gather load or scatter store for
10800 single-element groups.
10801 (get_load_store_type): Update calls to get_group_load_store_type
10802 and vect_use_strided_gather_scatters_p.
10804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10805 Alan Hayward <alan.hayward@arm.com>
10806 David Sherwood <david.sherwood@arm.com>
10808 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10809 optional tree argument.
10810 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10812 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10813 but continue to use the current value as a fallback.
10814 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10815 to compare the updates.
10816 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10817 (get_load_store_type): Use it when handling a strided access.
10818 (vect_get_strided_load_store_ops): New function.
10819 (vect_get_data_ptr_increment): Likewise.
10820 (vectorizable_load): Handle strided gather loads. Always pass
10821 a step to vect_create_data_ref_ptr and bump_vector_ptr.
10823 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10824 Alan Hayward <alan.hayward@arm.com>
10825 David Sherwood <david.sherwood@arm.com>
10827 * doc/md.texi (gather_load@var{m}): Document.
10828 (mask_gather_load@var{m}): Likewise.
10829 * genopinit.c (main): Add supports_vec_gather_load and
10830 supports_vec_gather_load_cached to target_optabs.
10831 * optabs-tree.c (init_tree_optimization_optabs): Use
10832 ggc_cleared_alloc to allocate target_optabs.
10833 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10834 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10836 * internal-fn.h (internal_load_fn_p): Declare.
10837 (internal_gather_scatter_fn_p): Likewise.
10838 (internal_fn_mask_index): Likewise.
10839 (internal_gather_scatter_fn_supported_p): Likewise.
10840 * internal-fn.c (gather_load_direct): New macro.
10841 (expand_gather_load_optab_fn): New function.
10842 (direct_gather_load_optab_supported_p): New macro.
10843 (direct_internal_fn_optab): New function.
10844 (internal_load_fn_p): Likewise.
10845 (internal_gather_scatter_fn_p): Likewise.
10846 (internal_fn_mask_index): Likewise.
10847 (internal_gather_scatter_fn_supported_p): Likewise.
10848 * optabs-query.c (supports_at_least_one_mode_p): New function.
10849 (supports_vec_gather_load_p): Likewise.
10850 * optabs-query.h (supports_vec_gather_load_p): Declare.
10851 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10852 and memory_type field.
10853 (NUM_PATTERNS): Bump to 15.
10854 * tree-vect-data-refs.c: Include internal-fn.h.
10855 (vect_gather_scatter_fn_p): New function.
10856 (vect_describe_gather_scatter_call): Likewise.
10857 (vect_check_gather_scatter): Try using internal functions for
10858 gather loads. Recognize existing calls to a gather load function.
10859 (vect_analyze_data_refs): Consider using gather loads if
10860 supports_vec_gather_load_p.
10861 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10862 (vect_get_gather_scatter_offset_type): Likewise.
10863 (vect_convert_mask_for_vectype): Likewise.
10864 (vect_add_conversion_to_patterm): Likewise.
10865 (vect_try_gather_scatter_pattern): Likewise.
10866 (vect_recog_gather_scatter_pattern): New pattern recognizer.
10867 (vect_vect_recog_func_ptrs): Add it.
10868 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10869 internal_fn_mask_index and internal_gather_scatter_fn_p.
10870 (check_load_store_masking): Take the gather_scatter_info as an
10871 argument and handle gather loads.
10872 (vect_get_gather_scatter_ops): New function.
10873 (vectorizable_call): Check internal_load_fn_p.
10874 (vectorizable_load): Likewise. Handle gather load internal
10876 (vectorizable_store): Update call to check_load_store_masking.
10877 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10878 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10879 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10880 (aarch64_gather_scale_operand_d): New predicates.
10881 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10882 (mask_gather_load<mode>): New insns.
10884 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10885 Alan Hayward <alan.hayward@arm.com>
10886 David Sherwood <david.sherwood@arm.com>
10888 * optabs.def (fold_left_plus_optab): New optab.
10889 * doc/md.texi (fold_left_plus_@var{m}): Document.
10890 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10891 * internal-fn.c (fold_left_direct): Define.
10892 (expand_fold_left_optab_fn): Likewise.
10893 (direct_fold_left_optab_supported_p): Likewise.
10894 * fold-const-call.c (fold_const_fold_left): New function.
10895 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10896 * tree-parloops.c (valid_reduction_p): New function.
10897 (gather_scalar_reductions): Use it.
10898 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10899 (vect_finish_replace_stmt): Declare.
10900 * tree-vect-loop.c (fold_left_reduction_fn): New function.
10901 (needs_fold_left_reduction_p): New function, split out from...
10902 (vect_is_simple_reduction): ...here. Accept reductions that
10903 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10904 (vect_force_simple_reduction): Also store the reduction type in
10905 the assignment's STMT_VINFO_REDUC_TYPE.
10906 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10907 (merge_with_identity): New function.
10908 (vect_expand_fold_left): Likewise.
10909 (vectorize_fold_left_reduction): Likewise.
10910 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
10911 scalar phi in place for it. Check for target support and reject
10912 cases that would reassociate the operation. Defer the transform
10913 phase to vectorize_fold_left_reduction.
10914 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10915 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10916 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10920 * tree-if-conv.c (predicate_mem_writes): Remove redundant
10921 call to ifc_temp_var.
10923 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10924 Alan Hayward <alan.hayward@arm.com>
10925 David Sherwood <david.sherwood@arm.com>
10927 * target.def (legitimize_address_displacement): Take the original
10928 offset as a poly_int.
10929 * targhooks.h (default_legitimize_address_displacement): Update
10931 * targhooks.c (default_legitimize_address_displacement): Likewise.
10932 * doc/tm.texi: Regenerate.
10933 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10934 as an argument, moving assert of ad->disp == ad->disp_term to...
10935 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
10936 Try calling targetm.legitimize_address_displacement before expanding
10937 the address rather than afterwards, and adjust for the new interface.
10938 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10939 Match the new hook interface. Handle SVE addresses.
10940 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10941 new hook interface.
10943 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10945 * Makefile.in (OBJS): Add early-remat.o.
10946 * target.def (select_early_remat_modes): New hook.
10947 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10948 * doc/tm.texi: Regenerate.
10949 * targhooks.h (default_select_early_remat_modes): Declare.
10950 * targhooks.c (default_select_early_remat_modes): New function.
10951 * timevar.def (TV_EARLY_REMAT): New timevar.
10952 * passes.def (pass_early_remat): New pass.
10953 * tree-pass.h (make_pass_early_remat): Declare.
10954 * early-remat.c: New file.
10955 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10957 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10959 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10960 Alan Hayward <alan.hayward@arm.com>
10961 David Sherwood <david.sherwood@arm.com>
10963 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10964 vfm1 with a bound_epilog parameter.
10965 (vect_do_peeling): Update calls accordingly, and move the prologue
10966 call earlier in the function. Treat the base bound_epilog as 0 for
10967 fully-masked loops and retain vf - 1 for other loops. Add 1 to
10968 this base when peeling for gaps.
10969 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10970 with fully-masked loops.
10971 (vect_estimate_min_profitable_iters): Handle the single peeled
10972 iteration in that case.
10974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10975 Alan Hayward <alan.hayward@arm.com>
10976 David Sherwood <david.sherwood@arm.com>
10978 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10979 single-element interleaving even if the size is not a power of 2.
10980 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10981 accesses for single-element interleaving if the group size is
10984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10985 Alan Hayward <alan.hayward@arm.com>
10986 David Sherwood <david.sherwood@arm.com>
10988 * doc/md.texi (fold_extract_last_@var{m}): Document.
10989 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10990 * optabs.def (fold_extract_last_optab): New optab.
10991 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10992 * internal-fn.c (fold_extract_direct): New macro.
10993 (expand_fold_extract_optab_fn): Likewise.
10994 (direct_fold_extract_optab_supported_p): Likewise.
10995 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10996 * tree-vect-loop.c (vect_model_reduction_cost): Handle
10997 EXTRACT_LAST_REDUCTION.
10998 (get_initial_def_for_reduction): Do not create an initial vector
10999 for EXTRACT_LAST_REDUCTION reductions.
11000 (vectorizable_reduction): Leave the scalar phi in place for
11001 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
11002 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
11003 epilogue code for EXTRACT_LAST_REDUCTION and defer the
11004 transform phase to vectorizable_condition.
11005 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
11007 (vect_finish_stmt_generation): ...here.
11008 (vect_finish_replace_stmt): New function.
11009 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
11010 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
11012 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
11014 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11015 Alan Hayward <alan.hayward@arm.com>
11016 David Sherwood <david.sherwood@arm.com>
11018 * doc/md.texi (extract_last_@var{m}): Document.
11019 * optabs.def (extract_last_optab): New optab.
11020 * internal-fn.def (EXTRACT_LAST): New internal function.
11021 * internal-fn.c (cond_unary_direct): New macro.
11022 (expand_cond_unary_optab_fn): Likewise.
11023 (direct_cond_unary_optab_supported_p): Likewise.
11024 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
11025 loops using EXTRACT_LAST.
11026 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
11027 (extract_last_<mode>): ...this optab.
11028 (vec_extract<mode><Vel>): Update accordingly.
11030 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11031 Alan Hayward <alan.hayward@arm.com>
11032 David Sherwood <david.sherwood@arm.com>
11034 * target.def (empty_mask_is_expensive): New hook.
11035 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
11036 * doc/tm.texi: Regenerate.
11037 * targhooks.h (default_empty_mask_is_expensive): Declare.
11038 * targhooks.c (default_empty_mask_is_expensive): New function.
11039 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
11040 if the target says that empty masks are expensive.
11041 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
11043 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
11045 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11046 Alan Hayward <alan.hayward@arm.com>
11047 David Sherwood <david.sherwood@arm.com>
11049 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
11050 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
11051 (vect_use_loop_mask_for_alignment_p): New function.
11052 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
11053 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
11054 niters_skip argument. Make sure that the first niters_skip elements
11055 of the first iteration are inactive.
11056 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
11057 Update call to vect_set_loop_masks_directly.
11058 (get_misalign_in_elems): New function, split out from...
11059 (vect_gen_prolog_loop_niters): ...here.
11060 (vect_update_init_of_dr): Take a code argument that specifies whether
11061 the adjustment should be added or subtracted.
11062 (vect_update_init_of_drs): Likewise.
11063 (vect_prepare_for_masked_peels): New function.
11064 (vect_do_peeling): Skip prologue peeling if we're using a mask
11065 instead. Update call to vect_update_inits_of_drs.
11066 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11068 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
11069 alignment. Do not include the number of peeled iterations in
11070 the minimum threshold in that case.
11071 (vectorizable_induction): Adjust the start value down by
11072 LOOP_VINFO_MASK_SKIP_NITERS iterations.
11073 (vect_transform_loop): Call vect_prepare_for_masked_peels.
11074 Take the number of skipped iterations into account when calculating
11076 * tree-vect-stmts.c (vect_gen_while_not): New function.
11078 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11079 Alan Hayward <alan.hayward@arm.com>
11080 David Sherwood <david.sherwood@arm.com>
11082 * doc/sourcebuild.texi (vect_fully_masked): Document.
11083 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
11084 default value to 0.
11085 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
11087 (vect_analyze_loop_2): ...here. Don't check the vectorization
11088 factor against the number of loop iterations if the loop is
11091 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11092 Alan Hayward <alan.hayward@arm.com>
11093 David Sherwood <david.sherwood@arm.com>
11095 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
11096 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
11097 (dump_groups): Update accordingly.
11098 (iv_use::mem_type): New member variable.
11099 (address_p): New function.
11100 (record_use): Add a mem_type argument and initialize the new
11102 (record_group_use): Add a mem_type argument. Use address_p.
11103 Remove obsolete null checks of base_object. Update call to record_use.
11104 (find_interesting_uses_op): Update call to record_group_use.
11105 (find_interesting_uses_cond): Likewise.
11106 (find_interesting_uses_address): Likewise.
11107 (get_mem_type_for_internal_fn): New function.
11108 (find_address_like_use): Likewise.
11109 (find_interesting_uses_stmt): Try find_address_like_use before
11110 calling find_interesting_uses_op.
11111 (addr_offset_valid_p): Use the iv mem_type field as the type
11112 of the addressed memory.
11113 (add_autoinc_candidates): Likewise.
11114 (get_address_cost): Likewise.
11115 (split_small_address_groups_p): Use address_p.
11116 (split_address_groups): Likewise.
11117 (add_iv_candidate_for_use): Likewise.
11118 (autoinc_possible_for_pair): Likewise.
11119 (rewrite_groups): Likewise.
11120 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
11121 (determine_group_iv_cost): Update after split of USE_ADDRESS.
11122 (get_alias_ptr_type_for_ptr_address): New function.
11123 (rewrite_use_address): Rewrite address uses in calls that were
11124 identified by find_address_like_use.
11126 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11127 Alan Hayward <alan.hayward@arm.com>
11128 David Sherwood <david.sherwood@arm.com>
11130 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
11132 * gimple-expr.h (is_gimple_addressable: Likewise.
11133 * gimple-expr.c (is_gimple_address): Likewise.
11134 * internal-fn.c (expand_call_mem_ref): New function.
11135 (expand_mask_load_optab_fn): Use it.
11136 (expand_mask_store_optab_fn): Likewise.
11138 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11139 Alan Hayward <alan.hayward@arm.com>
11140 David Sherwood <david.sherwood@arm.com>
11142 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
11143 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
11144 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
11145 (cond_umax@var{mode}): Document.
11146 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
11147 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
11148 (cond_umin_optab, cond_umax_optab): New optabs.
11149 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
11150 (COND_IOR, COND_XOR): New internal functions.
11151 * internal-fn.h (get_conditional_internal_fn): Declare.
11152 * internal-fn.c (cond_binary_direct): New macro.
11153 (expand_cond_binary_optab_fn): Likewise.
11154 (direct_cond_binary_optab_supported_p): Likewise.
11155 (get_conditional_internal_fn): New function.
11156 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
11157 Cope with reduction statements that are vectorized as calls rather
11159 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
11160 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
11161 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
11162 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11163 (UNSPEC_COND_EOR): New unspecs.
11164 (optab): Add mappings for them.
11165 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
11166 (sve_int_op, sve_fp_op): New int attributes.
11168 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11169 Alan Hayward <alan.hayward@arm.com>
11170 David Sherwood <david.sherwood@arm.com>
11172 * optabs.def (while_ult_optab): New optab.
11173 * doc/md.texi (while_ult@var{m}@var{n}): Document.
11174 * internal-fn.def (WHILE_ULT): New internal function.
11175 * internal-fn.h (direct_internal_fn_supported_p): New override
11176 that takes two types as argument.
11177 * internal-fn.c (while_direct): New macro.
11178 (expand_while_optab_fn): New function.
11179 (convert_optab_supported_p): Likewise.
11180 (direct_while_optab_supported_p): New macro.
11181 * wide-int.h (wi::udiv_ceil): New function.
11182 * tree-vectorizer.h (rgroup_masks): New structure.
11183 (vec_loop_masks): New typedef.
11184 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
11185 and fully_masked_p.
11186 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
11187 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
11188 (vect_max_vf): New function.
11189 (slpeel_make_loop_iterate_ntimes): Delete.
11190 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
11191 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
11192 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
11193 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
11194 internal-fn.h, stor-layout.h and optabs-query.h.
11195 (vect_set_loop_mask): New function.
11196 (add_preheader_seq): Likewise.
11197 (add_header_seq): Likewise.
11198 (interleave_supported_p): Likewise.
11199 (vect_maybe_permute_loop_masks): Likewise.
11200 (vect_set_loop_masks_directly): Likewise.
11201 (vect_set_loop_condition_masked): Likewise.
11202 (vect_set_loop_condition_unmasked): New function, split out from
11203 slpeel_make_loop_iterate_ntimes.
11204 (slpeel_make_loop_iterate_ntimes): Rename to..
11205 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
11206 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
11207 (vect_do_peeling): Update call accordingly.
11208 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
11210 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11211 mask_compare_type, can_fully_mask_p and fully_masked_p.
11212 (release_vec_loop_masks): New function.
11213 (_loop_vec_info): Use it to free the loop masks.
11214 (can_produce_all_loop_masks_p): New function.
11215 (vect_get_max_nscalars_per_iter): Likewise.
11216 (vect_verify_full_masking): Likewise.
11217 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11218 retries, and free the mask rgroups before retrying. Check loop-wide
11219 reasons for disallowing fully-masked loops. Make the final decision
11220 about whether use a fully-masked loop or not.
11221 (vect_estimate_min_profitable_iters): Do not assume that peeling
11222 for the number of iterations will be needed for fully-masked loops.
11223 (vectorizable_reduction): Disable fully-masked loops.
11224 (vectorizable_live_operation): Likewise.
11225 (vect_halve_mask_nunits): New function.
11226 (vect_double_mask_nunits): Likewise.
11227 (vect_record_loop_mask): Likewise.
11228 (vect_get_loop_mask): Likewise.
11229 (vect_transform_loop): Handle the case in which the final loop
11230 iteration might handle a partial vector. Call vect_set_loop_condition
11231 instead of slpeel_make_loop_iterate_ntimes.
11232 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11233 (check_load_store_masking): New function.
11234 (prepare_load_store_mask): Likewise.
11235 (vectorizable_store): Handle fully-masked loops.
11236 (vectorizable_load): Likewise.
11237 (supportable_widening_operation): Use vect_halve_mask_nunits for
11239 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11240 (vect_gen_while): New function.
11241 * config/aarch64/aarch64.md (umax<mode>3): New expander.
11242 (aarch64_uqdec<mode>): New insn.
11244 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11245 Alan Hayward <alan.hayward@arm.com>
11246 David Sherwood <david.sherwood@arm.com>
11248 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11249 (reduc_xor_scal_optab): New optabs.
11250 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11251 (reduc_xor_scal_@var{m}): Document.
11252 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11253 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11254 internal functions.
11255 * fold-const-call.c (fold_const_call): Handle them.
11256 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11257 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11258 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11259 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11260 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11261 (UNSPEC_XORV): New unspecs.
11262 (optab): Add entries for them.
11263 (BITWISEV): New int iterator.
11264 (bit_reduc_op): New int attributes.
11266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11267 Alan Hayward <alan.hayward@arm.com>
11268 David Sherwood <david.sherwood@arm.com>
11270 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11271 * internal-fn.def (VEC_SHL_INSERT): New internal function.
11272 * optabs.def (vec_shl_insert_optab): New optab.
11273 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11274 (duplicate_and_interleave): Likewise.
11275 * tree-vect-loop.c: Include internal-fn.h.
11276 (neutral_op_for_slp_reduction): New function, split out from
11277 get_initial_defs_for_reduction.
11278 (get_initial_def_for_reduction): Handle option 2 for variable-length
11279 vectors by loading the neutral value into a vector and then shifting
11280 the initial value into element 0.
11281 (get_initial_defs_for_reduction): Replace the code argument with
11282 the neutral value calculated by neutral_op_for_slp_reduction.
11283 Use gimple_build_vector for constant-length vectors.
11284 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11285 but the first group_size elements have a neutral value.
11286 Use duplicate_and_interleave otherwise.
11287 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11288 Update call to get_initial_defs_for_reduction. Handle SLP
11289 reductions for variable-length vectors by creating one vector
11290 result for each scalar result, with the elements associated
11291 with other scalar results stubbed out with the neutral value.
11292 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11293 Require IFN_VEC_SHL_INSERT for double reductions on
11294 variable-length vectors, or SLP reductions that have
11295 a neutral value. Require can_duplicate_and_interleave_p
11296 support for variable-length unchained SLP reductions if there
11297 is no neutral value, such as for MIN/MAX reductions. Also require
11298 the number of vector elements to be a multiple of the number of
11299 SLP statements when doing variable-length unchained SLP reductions.
11300 Update call to vect_create_epilog_for_reduction.
11301 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11302 and remove initial values.
11303 (duplicate_and_interleave): Make public.
11304 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11305 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11307 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11308 Alan Hayward <alan.hayward@arm.com>
11309 David Sherwood <david.sherwood@arm.com>
11311 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11312 (can_duplicate_and_interleave_p): New function.
11313 (vect_get_and_check_slp_defs): Take the vector of statements
11314 rather than just the current one. Remove excess parentheses.
11315 Restriction rejectinon of vect_constant_def and vect_external_def
11316 for variable-length vectors to boolean types, or types for which
11317 can_duplicate_and_interleave_p is false.
11318 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11319 (duplicate_and_interleave): New function.
11320 (vect_get_constant_vectors): Use gimple_build_vector for
11321 constant-length vectors and suitable variable-length constant
11322 vectors. Use duplicate_and_interleave for other variable-length
11323 vectors. Don't defer the update when inserting new statements.
11325 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11326 Alan Hayward <alan.hayward@arm.com>
11327 David Sherwood <david.sherwood@arm.com>
11329 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11330 min_profitable_iters doesn't go negative.
11332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11333 Alan Hayward <alan.hayward@arm.com>
11334 David Sherwood <david.sherwood@arm.com>
11336 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11337 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11338 * optabs.def (vec_mask_load_lanes_optab): New optab.
11339 (vec_mask_store_lanes_optab): Likewise.
11340 * internal-fn.def (MASK_LOAD_LANES): New internal function.
11341 (MASK_STORE_LANES): Likewise.
11342 * internal-fn.c (mask_load_lanes_direct): New macro.
11343 (mask_store_lanes_direct): Likewise.
11344 (expand_mask_load_optab_fn): Handle masked operations.
11345 (expand_mask_load_lanes_optab_fn): New macro.
11346 (expand_mask_store_optab_fn): Handle masked operations.
11347 (expand_mask_store_lanes_optab_fn): New macro.
11348 (direct_mask_load_lanes_optab_supported_p): Likewise.
11349 (direct_mask_store_lanes_optab_supported_p): Likewise.
11350 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11352 (vect_load_lanes_supported): Likewise.
11353 * tree-vect-data-refs.c (strip_conversion): New function.
11354 (can_group_stmts_p): Likewise.
11355 (vect_analyze_data_ref_accesses): Use it instead of checking
11356 for a pair of assignments.
11357 (vect_store_lanes_supported): Take a masked_p parameter.
11358 (vect_load_lanes_supported): Likewise.
11359 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11360 vect_store_lanes_supported and vect_load_lanes_supported.
11361 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11362 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11363 parameter. Don't allow gaps for masked accesses.
11364 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
11365 and vect_load_lanes_supported.
11366 (get_load_store_type): Take a masked_p parameter and update
11367 call to get_group_load_store_type.
11368 (vectorizable_store): Update call to get_load_store_type.
11369 Handle IFN_MASK_STORE_LANES.
11370 (vectorizable_load): Update call to get_load_store_type.
11371 Handle IFN_MASK_LOAD_LANES.
11373 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11374 Alan Hayward <alan.hayward@arm.com>
11375 David Sherwood <david.sherwood@arm.com>
11377 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11379 * config/aarch64/aarch64-protos.h
11380 (aarch64_sve_struct_memory_operand_p): Declare.
11381 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11382 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11383 (VPRED, vpred): Handle SVE structure modes.
11384 * config/aarch64/constraints.md (Utx): New constraint.
11385 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11386 (aarch64_sve_struct_nonimmediate_operand): New predicates.
11387 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11388 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11389 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11390 structure modes. Split into pieces after RA.
11391 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11392 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11394 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11395 SVE structure modes.
11396 (aarch64_classify_address): Likewise.
11397 (sizetochar): Move earlier in file.
11398 (aarch64_print_operand): Handle SVE register lists.
11399 (aarch64_array_mode): New function.
11400 (aarch64_sve_struct_memory_operand_p): Likewise.
11401 (TARGET_ARRAY_MODE): Redefine.
11403 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11404 Alan Hayward <alan.hayward@arm.com>
11405 David Sherwood <david.sherwood@arm.com>
11407 * target.def (array_mode): New target hook.
11408 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11409 * doc/tm.texi: Regenerate.
11410 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11411 * hooks.c (hook_optmode_mode_uhwi_none): New function.
11412 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11413 targetm.array_mode.
11414 * stor-layout.c (mode_for_array): Likewise. Support polynomial
11417 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11418 Alan Hayward <alan.hayward@arm.com>
11419 David Sherwood <david.sherwood@arm.com>
11421 * fold-const.c (fold_binary_loc): Check the argument types
11422 rather than the result type when testing for a vector operation.
11424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11426 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11427 * doc/tm.texi: Regenerate.
11429 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11430 Alan Hayward <alan.hayward@arm.com>
11431 David Sherwood <david.sherwood@arm.com>
11433 * doc/invoke.texi (-msve-vector-bits=): Document new option.
11434 (sve): Document new AArch64 extension.
11435 * doc/md.texi (w): Extend the description of the AArch64
11436 constraint to include SVE vectors.
11437 (Upl, Upa): Document new AArch64 predicate constraints.
11438 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11440 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11441 (msve-vector-bits=): New option.
11442 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11443 SVE when these are disabled.
11444 (sve): New extension.
11445 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11446 modes. Adjust their number of units based on aarch64_sve_vg.
11447 (MAX_BITSIZE_MODE_ANY_MODE): Define.
11448 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11449 aarch64_addr_query_type.
11450 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11451 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11452 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11453 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11454 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11455 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11456 (aarch64_simd_imm_zero_p): Delete.
11457 (aarch64_check_zero_based_sve_index_immediate): Declare.
11458 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11459 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11460 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11461 (aarch64_sve_float_mul_immediate_p): Likewise.
11462 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11463 rather than an rtx.
11464 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11465 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11466 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11467 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11468 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11469 (aarch64_regmode_natural_size): Likewise.
11470 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11471 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11473 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11474 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11475 for VG and the SVE predicate registers.
11476 (V_ALIASES): Add a "z"-prefixed alias.
11477 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11478 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11479 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11480 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11481 (REG_CLASS_NAMES): Add entries for them.
11482 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
11483 and the predicate registers.
11484 (aarch64_sve_vg): Declare.
11485 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11486 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11487 (REGMODE_NATURAL_SIZE): Define.
11488 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11490 * config/aarch64/aarch64.c: Include cfgrtl.h.
11491 (simd_immediate_info): Add a constructor for series vectors,
11492 and an associated step field.
11493 (aarch64_sve_vg): New variable.
11494 (aarch64_dbx_register_number): Handle VG and the predicate registers.
11495 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11496 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11497 (VEC_ANY_DATA, VEC_STRUCT): New constants.
11498 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11499 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11500 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11501 (aarch64_get_mask_mode): New functions.
11502 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11503 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11504 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
11505 predicate modes and predicate registers. Explicitly restrict
11506 GPRs to modes of 16 bytes or smaller. Only allow FP registers
11507 to store a vector mode if it is recognized by
11508 aarch64_classify_vector_mode.
11509 (aarch64_regmode_natural_size): New function.
11510 (aarch64_hard_regno_caller_save_mode): Return the original mode
11512 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11513 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11514 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11515 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11517 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
11518 does not overlap dest if the function is frame-related. Handle
11520 (aarch64_split_add_offset): New function.
11521 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11522 them aarch64_add_offset.
11523 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11524 and update call to aarch64_sub_sp.
11525 (aarch64_add_cfa_expression): New function.
11526 (aarch64_expand_prologue): Pass extra temporary registers to the
11527 functions above. Handle the case in which we need to emit new
11528 DW_CFA_expressions for registers that were originally saved
11529 relative to the stack pointer, but now have to be expressed
11530 relative to the frame pointer.
11531 (aarch64_output_mi_thunk): Pass extra temporary registers to the
11533 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
11534 IP0 and IP1 values for SVE frames.
11535 (aarch64_expand_vec_series): New function.
11536 (aarch64_expand_sve_widened_duplicate): Likewise.
11537 (aarch64_expand_sve_const_vector): Likewise.
11538 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11539 Handle SVE constants. Use emit_move_insn to move a force_const_mem
11540 into the register, rather than emitting a SET directly.
11541 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11542 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11543 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11544 (offset_9bit_signed_scaled_p): New functions.
11545 (aarch64_replicate_bitmask_imm): New function.
11546 (aarch64_bitmask_imm): Use it.
11547 (aarch64_cannot_force_const_mem): Reject expressions involving
11548 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
11549 (aarch64_classify_index): Handle SVE indices, by requiring
11550 a plain register index with a scale that matches the element size.
11551 (aarch64_classify_address): Handle SVE addresses. Assert that
11552 the mode of the address is VOIDmode or an integer mode.
11553 Update call to aarch64_classify_symbol.
11554 (aarch64_classify_symbolic_expression): Update call to
11555 aarch64_classify_symbol.
11556 (aarch64_const_vec_all_in_range_p): New function.
11557 (aarch64_print_vector_float_operand): Likewise.
11558 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
11559 "vN" for FP registers with SVE modes. Handle (const ...) vectors
11560 and the FP immediates 1.0 and 0.5.
11561 (aarch64_print_address_internal): Handle SVE addresses.
11562 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11563 (aarch64_regno_regclass): Handle predicate registers.
11564 (aarch64_secondary_reload): Handle big-endian reloads of SVE
11566 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11567 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11568 (aarch64_convert_sve_vector_bits): New function.
11569 (aarch64_override_options): Use it to handle -msve-vector-bits=.
11570 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11571 rather than an rtx.
11572 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11573 Handle SVE vector and predicate modes. Accept VL-based constants
11574 that need only one temporary register, and VL offsets that require
11575 no temporary registers.
11576 (aarch64_conditional_register_usage): Mark the predicate registers
11577 as fixed if SVE isn't available.
11578 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11579 Return true for SVE vector and predicate modes.
11580 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11581 rather than an unsigned int. Handle SVE modes.
11582 (aarch64_preferred_simd_mode): Update call accordingly. Handle
11584 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11586 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11587 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11588 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11589 (aarch64_sve_float_mul_immediate_p): New functions.
11590 (aarch64_sve_valid_immediate): New function.
11591 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11592 Explicitly reject structure modes. Check for INDEX constants.
11593 Handle PTRUE and PFALSE constants.
11594 (aarch64_check_zero_based_sve_index_immediate): New function.
11595 (aarch64_simd_imm_zero_p): Delete.
11596 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11597 vector modes. Accept constants in the range of CNT[BHWD].
11598 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11599 ask for an Advanced SIMD mode.
11600 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11601 (aarch64_simd_vector_alignment): Handle SVE predicates.
11602 (aarch64_vectorize_preferred_vector_alignment): New function.
11603 (aarch64_simd_vector_alignment_reachable): Use it instead of
11605 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11606 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11608 (MAX_VECT_LEN): Delete.
11609 (expand_vec_perm_d): Add a vec_flags field.
11610 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11611 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11612 (aarch64_evpc_ext): Don't apply a big-endian lane correction
11614 (aarch64_evpc_rev): Rename to...
11615 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
11616 (aarch64_evpc_rev_global): New function.
11617 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11618 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11620 (aarch64_evpc_sve_tbl): New function.
11621 (aarch64_expand_vec_perm_const_1): Update after rename of
11622 aarch64_evpc_rev. Handle SVE permutes too, trying
11623 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11624 than aarch64_evpc_tbl.
11625 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11626 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11627 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11628 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11629 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11630 (aarch64_expand_sve_vcond): New functions.
11631 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11632 of aarch64_vector_mode_p.
11633 (aarch64_dwarf_poly_indeterminate_value): New function.
11634 (aarch64_compute_pressure_classes): Likewise.
11635 (aarch64_can_change_mode_class): Likewise.
11636 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11637 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11638 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11639 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11640 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11641 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11642 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11643 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11645 (Dn, Dl, Dr): Accept const as well as const_vector.
11646 (Dz): Likewise. Compare against CONST0_RTX.
11647 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11648 of "vector" where appropriate.
11649 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11650 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11651 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11652 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11653 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11654 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11655 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11656 (v_int_equiv): Extend to SVE modes.
11657 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11659 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11660 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11661 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11662 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11663 (SVE_COND_FP_CMP): New int iterators.
11664 (perm_hilo): Handle the new unpack unspecs.
11665 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11667 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11668 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11669 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11670 (aarch64_equality_operator, aarch64_constant_vector_operand)
11671 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11672 (aarch64_sve_nonimmediate_operand): Likewise.
11673 (aarch64_sve_general_operand): Likewise.
11674 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11675 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11676 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11677 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11678 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11679 (aarch64_sve_float_arith_immediate): Likewise.
11680 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11681 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11682 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11683 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11684 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11685 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11686 (aarch64_sve_float_arith_operand): Likewise.
11687 (aarch64_sve_float_arith_with_sub_operand): Likewise.
11688 (aarch64_sve_float_mul_operand): Likewise.
11689 (aarch64_sve_vec_perm_operand): Likewise.
11690 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11691 (aarch64_mov_operand): Accept const_poly_int and const_vector.
11692 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11693 as well as const_vector.
11694 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11695 in file. Use CONST0_RTX and CONSTM1_RTX.
11696 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
11697 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11698 Use aarch64_simd_imm_zero.
11699 * config/aarch64/aarch64-sve.md: New file.
11700 * config/aarch64/aarch64.md: Include it.
11701 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11702 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11703 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11704 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11705 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11706 (sve): New attribute.
11707 (enabled): Disable instructions with the sve attribute unless
11709 (movqi, movhi): Pass CONST_POLY_INT operaneds through
11710 aarch64_expand_mov_immediate.
11711 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11712 CNT[BHSD] immediates.
11713 (movti): Split CONST_POLY_INT moves into two halves.
11714 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11715 Split additions that need a temporary here if the destination
11716 is the stack pointer.
11717 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11718 (*add<mode>3_poly_1): New instruction.
11719 (set_clobber_cc): New expander.
11721 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11723 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11724 parameter and use it instead of GET_MODE_SIZE (innermode). Use
11725 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11726 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11727 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
11728 Change innermode from fixed_mode_size to machine_mode.
11729 (simplify_subreg): Update call accordingly. Handle a constant-sized
11730 subreg of a variable-length CONST_VECTOR.
11732 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11733 Alan Hayward <alan.hayward@arm.com>
11734 David Sherwood <david.sherwood@arm.com>
11736 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11737 (add_offset_to_base): New function, split out from...
11738 (create_mem_ref): ...here. When handling a scale other than 1,
11739 check first whether the address is valid without the offset.
11740 Add it into the base if so, leaving the index and scale as-is.
11742 2018-01-12 Jakub Jelinek <jakub@redhat.com>
11745 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11746 fold_for_warn before checking if arg2 is INTEGER_CST.
11748 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
11750 * config/rs6000/predicates.md (load_multiple_operation): Delete.
11751 (store_multiple_operation): Delete.
11752 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11753 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11754 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11755 guarded by TARGET_STRING.
11756 (rs6000_output_load_multiple): Delete.
11757 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11758 OPTION_MASK_STRING / TARGET_STRING handling.
11759 (print_operand) <'N', 'O'>: Add comment that these are unused now.
11760 (const rs6000_opt_masks) <"string">: Change mask to 0.
11761 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11762 (MASK_STRING): Delete.
11763 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11765 (load_multiple): Delete.
11772 (store_multiple): Delete.
11779 (movmemsi_8reg): Delete.
11780 (corresponding unnamed define_insn): Delete.
11781 (movmemsi_6reg): Delete.
11782 (corresponding unnamed define_insn): Delete.
11783 (movmemsi_4reg): Delete.
11784 (corresponding unnamed define_insn): Delete.
11785 (movmemsi_2reg): Delete.
11786 (corresponding unnamed define_insn): Delete.
11787 (movmemsi_1reg): Delete.
11788 (corresponding unnamed define_insn): Delete.
11789 * config/rs6000/rs6000.opt (mno-string): New.
11790 (mstring): Replace by deprecation warning stub.
11791 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11793 2018-01-12 Jakub Jelinek <jakub@redhat.com>
11795 * regrename.c (regrename_do_replace): If replacing the same
11796 reg multiple times, try to reuse last created gen_raw_REG.
11799 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11800 main to workaround a bug in GDB.
11802 2018-01-12 Tom de Vries <tom@codesourcery.com>
11805 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11807 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
11809 PR rtl-optimization/80481
11810 * ira-color.c (get_cap_member): New function.
11811 (allocnos_conflict_by_live_ranges_p): Use it.
11812 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11813 (setup_slot_coalesced_allocno_live_ranges): Ditto.
11815 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
11818 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11819 (*saddl_se_1): Ditto.
11820 (*ssubsi_1): Ditto.
11821 (*ssubl_se_1): Ditto.
11823 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
11825 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11826 rather than wi::to_widest for DR_INITs.
11827 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11828 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11829 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11831 (vect_analyze_group_access_1): Note that here.
11833 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
11835 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11836 polynomial type sizes.
11838 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
11840 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11841 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11842 (gimple_add_tmp_var): Likewise.
11844 2018-01-12 Martin Liska <mliska@suse.cz>
11846 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11847 (gimple_alloc_sizes): Likewise.
11848 (dump_gimple_statistics): Use PRIu64 in printf format.
11849 * gimple.h: Change uint64_t to int.
11851 2018-01-12 Martin Liska <mliska@suse.cz>
11853 * tree-core.h: Use uint64_t instead of int.
11854 * tree.c (tree_node_counts): Likewise.
11855 (tree_node_sizes): Likewise.
11856 (dump_tree_statistics): Use PRIu64 in printf format.
11858 2018-01-12 Martin Liska <mliska@suse.cz>
11860 * Makefile.in: As qsort_chk is implemented in vec.c, add
11861 vec.o to linkage of gencfn-macros.
11862 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11863 passing the info to record_node_allocation_statistics.
11864 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11866 * ggc-common.c (struct ggc_usage): Add operator== and use
11867 it in operator< and compare function.
11868 * mem-stats.h (struct mem_usage): Likewise.
11869 * vec.c (struct vec_usage): Remove operator< and compare
11870 function. Can be simply inherited.
11872 2018-01-12 Martin Jambor <mjambor@suse.cz>
11875 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11876 * tree-ssa-math-opts.c: Include domwalk.h.
11877 (convert_mult_to_fma_1): New function.
11878 (fma_transformation_info): New type.
11879 (fma_deferring_state): Likewise.
11880 (cancel_fma_deferring): New function.
11881 (result_of_phi): Likewise.
11882 (last_fma_candidate_feeds_initial_phi): Likewise.
11883 (convert_mult_to_fma): Added deferring logic, split actual
11884 transformation to convert_mult_to_fma_1.
11885 (math_opts_dom_walker): New type.
11886 (math_opts_dom_walker::after_dom_children): New method, body moved
11887 here from pass_optimize_widening_mul::execute, added deferring logic
11889 (pass_optimize_widening_mul::execute): Moved most of code to
11890 math_opts_dom_walker::after_dom_children.
11891 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11892 * config/i386/i386.c (ix86_option_override_internal): Added
11893 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11895 2018-01-12 Richard Biener <rguenther@suse.de>
11898 * dwarf2out.c (gen_variable_die): Do not reset old_die for
11899 inline instance vars.
11901 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
11904 * config/rx/rx.c (rx_is_restricted_memory_address):
11905 Handle SUBREG case.
11907 2018-01-12 Richard Biener <rguenther@suse.de>
11909 PR tree-optimization/80846
11910 * target.def (split_reduction): New target hook.
11911 * targhooks.c (default_split_reduction): New function.
11912 * targhooks.h (default_split_reduction): Declare.
11913 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11914 target requests first reduce vectors by combining low and high
11916 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11917 (get_vectype_for_scalar_type_and_size): Export.
11918 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11919 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11920 * doc/tm.texi: Regenerate.
11921 * config/i386/i386.c (ix86_split_reduction): Implement
11922 TARGET_VECTORIZE_SPLIT_REDUCTION.
11924 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
11927 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11928 in PIC mode except for TARGET_VXWORKS_RTP.
11929 * config/sparc/sparc.c: Include cfgrtl.h.
11930 (TARGET_INIT_PIC_REG): Define.
11931 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11932 (sparc_pic_register_p): New predicate.
11933 (sparc_legitimate_address_p): Use it.
11934 (sparc_legitimize_pic_address): Likewise.
11935 (sparc_delegitimize_address): Likewise.
11936 (sparc_mode_dependent_address_p): Likewise.
11937 (gen_load_pcrel_sym): Remove 4th parameter.
11938 (load_got_register): Adjust call to above. Remove obsolete stuff.
11939 (sparc_expand_prologue): Do not call load_got_register here.
11940 (sparc_flat_expand_prologue): Likewise.
11941 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11942 (sparc_use_pseudo_pic_reg): New function.
11943 (sparc_init_pic_reg): Likewise.
11944 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11945 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11947 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
11949 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11950 Add item for branch_cost.
11952 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
11954 PR rtl-optimization/83565
11955 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11956 not extend the result to a larger mode for rotate operations.
11957 (num_sign_bit_copies1): Likewise.
11959 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11962 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11964 Use values-Xc.o for -pedantic.
11965 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11967 2018-01-12 Martin Liska <mliska@suse.cz>
11970 * ipa-devirt.c (final_warning_record::grow_type_warnings):
11972 (possible_polymorphic_call_targets): Use it.
11973 (ipa_devirt): Likewise.
11975 2018-01-12 Martin Liska <mliska@suse.cz>
11977 * profile-count.h (enum profile_quality): Use 0 as invalid
11978 enum value of profile_quality.
11980 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
11982 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11983 -mext-string options.
11985 2018-01-12 Richard Biener <rguenther@suse.de>
11987 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11988 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11989 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11991 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11993 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11995 * configure.ac (--with-long-double-format): Add support for the
11996 configuration option to change the default long double format on
11998 * config.gcc (powerpc*-linux*-*): Likewise.
11999 * configure: Regenerate.
12000 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
12001 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
12002 used without modification.
12004 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12006 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
12007 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
12008 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
12009 MISC_BUILTIN_SPEC_BARRIER.
12010 (rs6000_init_builtins): Likewise.
12011 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
12013 (speculation_barrier): New define_insn.
12014 * doc/extend.texi: Document __builtin_speculation_barrier.
12016 2018-01-11 Jakub Jelinek <jakub@redhat.com>
12019 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
12020 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
12021 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
12023 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
12024 integral modes instead of "ss" and "sd".
12025 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
12026 vectors with 32-bit and 64-bit elements.
12027 (vecdupssescalarmodesuffix): New mode attribute.
12028 (vec_dup<mode>): Use it.
12030 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
12033 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
12034 frame if argument is passed on stack.
12036 2018-01-11 Jakub Jelinek <jakub@redhat.com>
12039 * ree.c (combine_reaching_defs): Optimize also
12040 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
12041 reg2=any_extend(exp); reg1=reg2;, formatting fix.
12043 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
12045 PR middle-end/83189
12046 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
12048 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
12050 PR middle-end/83718
12051 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
12052 after they are computed.
12054 2018-01-11 Bin Cheng <bin.cheng@arm.com>
12056 PR tree-optimization/83695
12057 * gimple-loop-linterchange.cc
12058 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
12059 reset cached scev information after interchange.
12060 (pass_linterchange::execute): Remove call to scev_reset_htab.
12062 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12064 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
12065 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
12066 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
12067 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
12068 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
12069 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
12070 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
12071 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
12072 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
12073 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
12074 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
12075 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
12076 (V_lane_reg): Likewise.
12077 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
12079 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
12080 (vfmal_lane_low<mode>_intrinsic,
12081 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
12082 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
12083 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
12084 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
12085 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
12086 vfmsl_lane_high<mode>_intrinsic): New define_insns.
12088 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12090 * config/arm/arm-cpus.in (fp16fml): New feature.
12091 (ALL_SIMD): Add fp16fml.
12092 (armv8.2-a): Add fp16fml as an option.
12093 (armv8.3-a): Likewise.
12094 (armv8.4-a): Add fp16fml as part of fp16.
12095 * config/arm/arm.h (TARGET_FP16FML): Define.
12096 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
12098 * config/arm/arm-modes.def (V2HF): Define.
12099 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
12100 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
12101 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
12102 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
12103 vfmsl_low, vfmsl_high): New set of builtins.
12104 * config/arm/iterators.md (PLUSMINUS): New code iterator.
12105 (vfml_op): New code attribute.
12106 (VFMLHALVES): New int iterator.
12107 (VFML, VFMLSEL): New mode attributes.
12108 (V_reg): Define mapping for V2HF.
12109 (V_hi, V_lo): New mode attributes.
12110 (VF_constraint): Likewise.
12111 (vfml_half, vfml_half_selector): New int attributes.
12112 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
12114 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
12115 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
12117 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
12118 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
12119 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
12120 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
12122 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
12123 Document new effective target and option set.
12125 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12127 * config/arm/arm-cpus.in (armv8_4): New feature.
12128 (ARMv8_4a): New fgroup.
12129 (armv8.4-a): New arch.
12130 * config/arm/arm-tables.opt: Regenerate.
12131 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
12132 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
12133 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
12134 Add matching rules for -march=armv8.4-a and extensions.
12135 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
12137 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
12140 * config/rx/rx.md (BW): New mode attribute.
12141 (sync_lock_test_and_setsi): Add mode suffix to insn output.
12143 2018-01-11 Richard Biener <rguenther@suse.de>
12145 PR tree-optimization/83435
12146 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
12147 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
12148 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
12150 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12151 Alan Hayward <alan.hayward@arm.com>
12152 David Sherwood <david.sherwood@arm.com>
12154 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
12156 (aarch64_classify_address): Initialize it. Track polynomial offsets.
12157 (aarch64_print_address_internal): Use it to check for a zero offset.
12159 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12160 Alan Hayward <alan.hayward@arm.com>
12161 David Sherwood <david.sherwood@arm.com>
12163 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
12164 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
12165 Return a poly_int64 rather than a HOST_WIDE_INT.
12166 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
12167 rather than a HOST_WIDE_INT.
12168 * config/aarch64/aarch64.h (aarch64_frame): Protect with
12169 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
12170 hard_fp_offset, frame_size, initial_adjust, callee_offset and
12171 final_offset from HOST_WIDE_INT to poly_int64.
12172 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
12173 to_constant when getting the number of units in an Advanced SIMD
12175 (aarch64_builtin_vectorized_function): Check for a constant number
12177 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
12179 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
12180 attribute instead of GET_MODE_NUNITS.
12181 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
12182 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
12183 GET_MODE_SIZE for fixed-size registers.
12184 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
12185 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
12186 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
12187 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
12188 (aarch64_print_operand, aarch64_print_address_internal)
12189 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
12190 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
12191 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
12192 Handle polynomial GET_MODE_SIZE.
12193 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
12194 wider than SImode without modification.
12195 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
12196 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
12197 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
12198 passing and returning SVE modes.
12199 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
12200 rather than GEN_INT.
12201 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
12202 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
12203 (aarch64_allocate_and_probe_stack_space): Likewise.
12204 (aarch64_layout_frame): Cope with polynomial offsets.
12205 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
12206 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
12207 polynomial offsets.
12208 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
12209 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12210 poly_int64 rather than a HOST_WIDE_INT.
12211 (aarch64_get_separate_components, aarch64_process_components)
12212 (aarch64_expand_prologue, aarch64_expand_epilogue)
12213 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12214 (aarch64_anchor_offset): New function, split out from...
12215 (aarch64_legitimize_address): ...here.
12216 (aarch64_builtin_vectorization_cost): Handle polynomial
12217 TYPE_VECTOR_SUBPARTS.
12218 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12220 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12221 number of elements from the PARALLEL rather than the mode.
12222 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12223 rather than GET_MODE_BITSIZE.
12224 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12225 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12226 (aarch64_expand_vec_perm_const_1): Handle polynomial
12227 d->perm.length () and d->perm elements.
12228 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
12229 Apply to_constant to d->perm elements.
12230 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12231 polynomial CONST_VECTOR_NUNITS.
12232 (aarch64_move_pointer): Take amount as a poly_int64 rather
12234 (aarch64_progress_pointer): Avoid temporary variable.
12235 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12236 the mode attribute instead of GET_MODE.
12238 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12239 Alan Hayward <alan.hayward@arm.com>
12240 David Sherwood <david.sherwood@arm.com>
12242 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12243 x exists before using it.
12244 (aarch64_add_constant_internal): Rename to...
12245 (aarch64_add_offset_1): ...this. Replace regnum with separate
12246 src and dest rtxes. Handle the case in which they're different,
12247 including when the offset is zero. Replace scratchreg with an rtx.
12248 Use 2 additions if there is no spare register into which we can
12249 move a 16-bit constant.
12250 (aarch64_add_constant): Delete.
12251 (aarch64_add_offset): Replace reg with separate src and dest
12252 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
12253 Use aarch64_add_offset_1.
12254 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12255 an rtx rather than an int. Take the delta as a poly_int64
12256 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
12257 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12258 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12259 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12260 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12261 and aarch64_add_sp.
12262 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12263 aarch64_add_constant.
12265 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12267 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12268 Use scalar_float_mode.
12270 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12272 * config/aarch64/aarch64-simd.md
12273 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12274 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12275 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12276 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12277 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12278 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12279 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12280 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12281 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12282 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12284 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12287 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12288 targ_options->x_arm_arch_string is non NULL.
12290 2018-01-11 Tamar Christina <tamar.christina@arm.com>
12292 * config/aarch64/aarch64.h
12293 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
12295 2018-01-11 Sudakshina Das <sudi.das@arm.com>
12298 * expmed.c (emit_store_flag_force): Swap if const op0
12299 and change VOIDmode to mode of op0.
12301 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12303 PR rtl-optimization/83761
12304 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12305 than bytes to mode_for_size.
12307 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12309 PR middle-end/83189
12310 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12311 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12314 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12316 PR middle-end/83575
12317 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12318 when in layout mode.
12319 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12320 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12323 2018-01-10 Michael Collison <michael.collison@arm.com>
12325 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12326 * config/aarch64/aarch64-option-extension.def: Add
12327 AARCH64_OPT_EXTENSION of 'fp16fml'.
12328 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12329 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12330 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12331 * config/aarch64/constraints.md (Ui7): New constraint.
12332 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12333 (VFMLA_SEL_W): Ditto.
12336 (VFMLA16_LOW): New int iterator.
12337 (VFMLA16_HIGH): Ditto.
12338 (UNSPEC_FMLAL): New unspec.
12339 (UNSPEC_FMLSL): Ditto.
12340 (UNSPEC_FMLAL2): Ditto.
12341 (UNSPEC_FMLSL2): Ditto.
12342 (f16mac): New code attribute.
12343 * config/aarch64/aarch64-simd-builtins.def
12344 (aarch64_fmlal_lowv2sf): Ditto.
12345 (aarch64_fmlsl_lowv2sf): Ditto.
12346 (aarch64_fmlalq_lowv4sf): Ditto.
12347 (aarch64_fmlslq_lowv4sf): Ditto.
12348 (aarch64_fmlal_highv2sf): Ditto.
12349 (aarch64_fmlsl_highv2sf): Ditto.
12350 (aarch64_fmlalq_highv4sf): Ditto.
12351 (aarch64_fmlslq_highv4sf): Ditto.
12352 (aarch64_fmlal_lane_lowv2sf): Ditto.
12353 (aarch64_fmlsl_lane_lowv2sf): Ditto.
12354 (aarch64_fmlal_laneq_lowv2sf): Ditto.
12355 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12356 (aarch64_fmlalq_lane_lowv4sf): Ditto.
12357 (aarch64_fmlsl_lane_lowv4sf): Ditto.
12358 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12359 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12360 (aarch64_fmlal_lane_highv2sf): Ditto.
12361 (aarch64_fmlsl_lane_highv2sf): Ditto.
12362 (aarch64_fmlal_laneq_highv2sf): Ditto.
12363 (aarch64_fmlsl_laneq_highv2sf): Ditto.
12364 (aarch64_fmlalq_lane_highv4sf): Ditto.
12365 (aarch64_fmlsl_lane_highv4sf): Ditto.
12366 (aarch64_fmlalq_laneq_highv4sf): Ditto.
12367 (aarch64_fmlsl_laneq_highv4sf): Ditto.
12368 * config/aarch64/aarch64-simd.md:
12369 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12370 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12371 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12372 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12373 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12374 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12375 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12376 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12377 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12378 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12379 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12380 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12381 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12382 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12383 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12384 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12385 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12386 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12387 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12388 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12389 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12390 (vfmlsl_low_u32): Ditto.
12391 (vfmlalq_low_u32): Ditto.
12392 (vfmlslq_low_u32): Ditto.
12393 (vfmlal_high_u32): Ditto.
12394 (vfmlsl_high_u32): Ditto.
12395 (vfmlalq_high_u32): Ditto.
12396 (vfmlslq_high_u32): Ditto.
12397 (vfmlal_lane_low_u32): Ditto.
12398 (vfmlsl_lane_low_u32): Ditto.
12399 (vfmlal_laneq_low_u32): Ditto.
12400 (vfmlsl_laneq_low_u32): Ditto.
12401 (vfmlalq_lane_low_u32): Ditto.
12402 (vfmlslq_lane_low_u32): Ditto.
12403 (vfmlalq_laneq_low_u32): Ditto.
12404 (vfmlslq_laneq_low_u32): Ditto.
12405 (vfmlal_lane_high_u32): Ditto.
12406 (vfmlsl_lane_high_u32): Ditto.
12407 (vfmlal_laneq_high_u32): Ditto.
12408 (vfmlsl_laneq_high_u32): Ditto.
12409 (vfmlalq_lane_high_u32): Ditto.
12410 (vfmlslq_lane_high_u32): Ditto.
12411 (vfmlalq_laneq_high_u32): Ditto.
12412 (vfmlslq_laneq_high_u32): Ditto.
12413 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12414 (AARCH64_FL_FOR_ARCH8_4): New.
12415 (AARCH64_ISA_F16FML): New ISA flag.
12416 (TARGET_F16FML): New feature flag for fp16fml.
12417 (doc/invoke.texi): Document new fp16fml option.
12419 2018-01-10 Michael Collison <michael.collison@arm.com>
12421 * config/aarch64/aarch64-builtins.c:
12422 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12423 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12424 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12425 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12426 (AARCH64_ISA_SHA3): New ISA flag.
12427 (TARGET_SHA3): New feature flag for sha3.
12428 * config/aarch64/iterators.md (sha512_op): New int attribute.
12429 (CRYPTO_SHA512): New int iterator.
12430 (UNSPEC_SHA512H): New unspec.
12431 (UNSPEC_SHA512H2): Ditto.
12432 (UNSPEC_SHA512SU0): Ditto.
12433 (UNSPEC_SHA512SU1): Ditto.
12434 * config/aarch64/aarch64-simd-builtins.def
12435 (aarch64_crypto_sha512hqv2di): New builtin.
12436 (aarch64_crypto_sha512h2qv2di): Ditto.
12437 (aarch64_crypto_sha512su0qv2di): Ditto.
12438 (aarch64_crypto_sha512su1qv2di): Ditto.
12439 (aarch64_eor3qv8hi): Ditto.
12440 (aarch64_rax1qv2di): Ditto.
12441 (aarch64_xarqv2di): Ditto.
12442 (aarch64_bcaxqv8hi): Ditto.
12443 * config/aarch64/aarch64-simd.md:
12444 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12445 (aarch64_crypto_sha512su0qv2di): Ditto.
12446 (aarch64_crypto_sha512su1qv2di): Ditto.
12447 (aarch64_eor3qv8hi): Ditto.
12448 (aarch64_rax1qv2di): Ditto.
12449 (aarch64_xarqv2di): Ditto.
12450 (aarch64_bcaxqv8hi): Ditto.
12451 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12452 (vsha512h2q_u64): Ditto.
12453 (vsha512su0q_u64): Ditto.
12454 (vsha512su1q_u64): Ditto.
12455 (veor3q_u16): Ditto.
12456 (vrax1q_u64): Ditto.
12457 (vxarq_u64): Ditto.
12458 (vbcaxq_u16): Ditto.
12459 * config/arm/types.md (crypto_sha512): New type attribute.
12460 (crypto_sha3): Ditto.
12461 (doc/invoke.texi): Document new sha3 option.
12463 2018-01-10 Michael Collison <michael.collison@arm.com>
12465 * config/aarch64/aarch64-builtins.c:
12466 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12467 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12468 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12469 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12470 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12471 (AARCH64_ISA_SM4): New ISA flag.
12472 (TARGET_SM4): New feature flag for sm4.
12473 * config/aarch64/aarch64-simd-builtins.def
12474 (aarch64_sm3ss1qv4si): Ditto.
12475 (aarch64_sm3tt1aq4si): Ditto.
12476 (aarch64_sm3tt1bq4si): Ditto.
12477 (aarch64_sm3tt2aq4si): Ditto.
12478 (aarch64_sm3tt2bq4si): Ditto.
12479 (aarch64_sm3partw1qv4si): Ditto.
12480 (aarch64_sm3partw2qv4si): Ditto.
12481 (aarch64_sm4eqv4si): Ditto.
12482 (aarch64_sm4ekeyqv4si): Ditto.
12483 * config/aarch64/aarch64-simd.md:
12484 (aarch64_sm3ss1qv4si): Ditto.
12485 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12486 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12487 (aarch64_sm4eqv4si): Ditto.
12488 (aarch64_sm4ekeyqv4si): Ditto.
12489 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12490 (sm3part_op): Ditto.
12491 (CRYPTO_SM3TT): Ditto.
12492 (CRYPTO_SM3PART): Ditto.
12493 (UNSPEC_SM3SS1): New unspec.
12494 (UNSPEC_SM3TT1A): Ditto.
12495 (UNSPEC_SM3TT1B): Ditto.
12496 (UNSPEC_SM3TT2A): Ditto.
12497 (UNSPEC_SM3TT2B): Ditto.
12498 (UNSPEC_SM3PARTW1): Ditto.
12499 (UNSPEC_SM3PARTW2): Ditto.
12500 (UNSPEC_SM4E): Ditto.
12501 (UNSPEC_SM4EKEY): Ditto.
12502 * config/aarch64/constraints.md (Ui2): New constraint.
12503 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12504 * config/arm/types.md (crypto_sm3): New type attribute.
12505 (crypto_sm4): Ditto.
12506 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12507 (vsm3tt1aq_u32): Ditto.
12508 (vsm3tt1bq_u32): Ditto.
12509 (vsm3tt2aq_u32): Ditto.
12510 (vsm3tt2bq_u32): Ditto.
12511 (vsm3partw1q_u32): Ditto.
12512 (vsm3partw2q_u32): Ditto.
12513 (vsm4eq_u32): Ditto.
12514 (vsm4ekeyq_u32): Ditto.
12515 (doc/invoke.texi): Document new sm4 option.
12517 2018-01-10 Michael Collison <michael.collison@arm.com>
12519 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12520 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12521 (AARCH64_FL_FOR_ARCH8_4): New.
12522 (AARCH64_FL_V8_4): New flag.
12523 (doc/invoke.texi): Document new armv8.4-a option.
12525 2018-01-10 Michael Collison <michael.collison@arm.com>
12527 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12528 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12529 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12530 * config/aarch64/aarch64-option-extension.def: Add
12531 AARCH64_OPT_EXTENSION of 'sha2'.
12532 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12533 (crypto): Disable sha2 and aes if crypto disabled.
12534 (crypto): Enable aes and sha2 if enabled.
12535 (simd): Disable sha2 and aes if simd disabled.
12536 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12538 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12539 (TARGET_SHA2): New feature flag for sha2.
12540 (TARGET_AES): New feature flag for aes.
12541 * config/aarch64/aarch64-simd.md:
12542 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12543 conditional on TARGET_AES.
12544 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12545 (aarch64_crypto_sha1hsi): Make pattern conditional
12547 (aarch64_crypto_sha1hv4si): Ditto.
12548 (aarch64_be_crypto_sha1hv4si): Ditto.
12549 (aarch64_crypto_sha1su1v4si): Ditto.
12550 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12551 (aarch64_crypto_sha1su0v4si): Ditto.
12552 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12553 (aarch64_crypto_sha256su0v4si): Ditto.
12554 (aarch64_crypto_sha256su1v4si): Ditto.
12555 (doc/invoke.texi): Document new aes and sha2 options.
12557 2018-01-10 Martin Sebor <msebor@redhat.com>
12559 PR tree-optimization/83781
12560 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12563 2018-01-11 Martin Sebor <msebor@gmail.com>
12564 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12566 PR tree-optimization/83501
12567 PR tree-optimization/81703
12569 * tree-ssa-strlen.c (get_string_cst): Rename...
12570 (get_string_len): ...to this. Handle global constants.
12571 (handle_char_store): Adjust.
12573 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
12574 Jim Wilson <jimw@sifive.com>
12576 * config/riscv/riscv-protos.h (riscv_output_return): New.
12577 * config/riscv/riscv.c (struct machine_function): New naked_p field.
12578 (riscv_attribute_table, riscv_output_return),
12579 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12580 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12581 (riscv_compute_frame_info): Only compute frame->mask if not a naked
12583 (riscv_expand_prologue): Add early return for naked function.
12584 (riscv_expand_epilogue): Likewise.
12585 (riscv_function_ok_for_sibcall): Return false for naked function.
12586 (riscv_set_current_function): New.
12587 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12588 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12589 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12590 * doc/extend.texi (RISC-V Function Attributes): New.
12592 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12594 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12595 check for 128-bit long double before checking TCmode.
12596 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12597 128-bit long doubles before checking TFmode or TCmode.
12598 (FLOAT128_IBM_P): Likewise.
12600 2018-01-10 Martin Sebor <msebor@redhat.com>
12602 PR tree-optimization/83671
12603 * builtins.c (c_strlen): Unconditionally return zero for the empty
12605 Use -Warray-bounds for warnings.
12606 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12607 for non-constant array indices with COMPONENT_REF, arrays of
12608 arrays, and pointers to arrays.
12609 (gimple_fold_builtin_strlen): Determine and set length range for
12610 non-constant character arrays.
12612 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
12614 PR middle-end/81897
12615 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12618 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
12620 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12622 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
12625 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12626 VECTOR_MEM_ALTIVEC_OR_VSX_P.
12627 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12628 indexed_or_indirect_operand predicate.
12629 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12630 (*vsx_le_perm_load_v8hi): Likewise.
12631 (*vsx_le_perm_load_v16qi): Likewise.
12632 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12633 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12634 (*vsx_le_perm_store_v8hi): Likewise.
12635 (*vsx_le_perm_store_v16qi): Likewise.
12636 (eight unnamed splitters): Likewise.
12638 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
12640 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12641 * config/rs6000/emmintrin.h: Likewise.
12642 * config/rs6000/mmintrin.h: Likewise.
12643 * config/rs6000/xmmintrin.h: Likewise.
12645 2018-01-10 David Malcolm <dmalcolm@redhat.com>
12648 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12650 * tree.c (tree_nop_conversion): Return true for location wrapper
12652 (maybe_wrap_with_location): New function.
12653 (selftest::check_strip_nops): New function.
12654 (selftest::test_location_wrappers): New function.
12655 (selftest::tree_c_tests): Call it.
12656 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12657 (maybe_wrap_with_location): New decl.
12658 (EXPR_LOCATION_WRAPPER_P): New macro.
12659 (location_wrapper_p): New inline function.
12660 (tree_strip_any_location_wrapper): New inline function.
12662 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
12665 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12666 stack_realign_offset for the largest alignment of stack slot
12668 (ix86_find_max_used_stack_alignment): New function.
12669 (ix86_finalize_stack_frame_flags): Use it. Set
12670 max_used_stack_alignment if we don't realign stack.
12671 * config/i386/i386.h (machine_function): Add
12672 max_used_stack_alignment.
12674 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
12676 * config/arm/arm.opt (-mbranch-cost): New option.
12677 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12680 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
12683 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12684 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12686 2018-01-10 Richard Biener <rguenther@suse.de>
12689 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12690 early out so it also covers the case where we have a non-NULL
12693 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
12695 PR tree-optimization/83753
12696 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12697 for non-strided grouped accesses if the number of elements is 1.
12699 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12702 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12703 * i386.h (TARGET_USE_GATHER): Define.
12704 * x86-tune.def (X86_TUNE_USE_GATHER): New.
12706 2018-01-10 Martin Liska <mliska@suse.cz>
12709 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12710 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12712 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12713 CLEANUP_NO_PARTITIONING is not set.
12715 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
12717 * doc/rtl.texi: Remove documentation of (const ...) wrappers
12718 for vectors, as a partial revert of r254296.
12719 * rtl.h (const_vec_p): Delete.
12720 (const_vec_duplicate_p): Don't test for vector CONSTs.
12721 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12722 * expmed.c (make_tree): Likewise.
12725 * common.md (E, F): Use CONSTANT_P instead of checking for
12727 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12728 checking for CONST_VECTOR.
12730 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
12732 PR middle-end/83575
12733 * predict.c (force_edge_cold): Handle in more sane way edges
12734 with no prediction.
12736 2018-01-09 Carl Love <cel@us.ibm.com>
12738 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12740 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12741 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12742 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12743 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
12744 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12745 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
12746 * config/rs6000/rs6000-protos.h: Add extern defition for
12747 rs6000_generate_float2_double_code.
12748 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12750 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12751 (float2_v2df): Add define_expand.
12753 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
12756 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12757 op_mode in the force_to_mode call.
12759 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
12761 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12762 instead of checking each element individually.
12763 (aarch64_evpc_uzp): Likewise.
12764 (aarch64_evpc_zip): Likewise.
12765 (aarch64_evpc_ext): Likewise.
12766 (aarch64_evpc_rev): Likewise.
12767 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12768 instead of checking each element individually. Return true without
12770 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12771 whether all selected elements come from the same input, instead of
12772 checking each element individually. Remove calls to gen_rtx_REG,
12773 start_sequence and end_sequence and instead assert that no rtl is
12776 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
12778 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12779 order of HIGH and CONST checks.
12781 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
12783 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12784 if the destination isn't an SSA_NAME.
12786 2018-01-09 Richard Biener <rguenther@suse.de>
12788 PR tree-optimization/83668
12789 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12791 (canonicalize_loop_form): ... here, renamed from ...
12792 (canonicalize_loop_closed_ssa_form): ... this and amended to
12793 swap successor edges for loop exit blocks to make us use
12794 the RPO order we need for initial schedule generation.
12796 2018-01-09 Joseph Myers <joseph@codesourcery.com>
12798 PR tree-optimization/64811
12799 * match.pd: When optimizing comparisons with Inf, avoid
12800 introducing or losing exceptions from comparisons with NaN.
12802 2018-01-09 Martin Liska <mliska@suse.cz>
12805 * asan.c (shadow_mem_size): Add gcc_assert.
12807 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
12809 Don't save registers in main().
12812 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12813 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12814 * config/avr/avr.c (avr_set_current_function): Don't error if
12815 naked, OS_task or OS_main are specified at the same time.
12816 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12818 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12820 * common/config/avr/avr-common.c (avr_option_optimization_table):
12821 Switch on -mmain-is-OS_task for optimizing compilations.
12823 2018-01-09 Richard Biener <rguenther@suse.de>
12825 PR tree-optimization/83572
12826 * graphite.c: Include cfganal.h.
12827 (graphite_transform_loops): Connect infinite loops to exit
12828 and remove fake edges at the end.
12830 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
12832 * ipa-inline.c (edge_badness): Revert accidental checkin.
12834 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
12837 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12838 symbols; not inline clones.
12840 2018-01-09 Jakub Jelinek <jakub@redhat.com>
12843 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12844 hard registers. Formatting fixes.
12846 PR preprocessor/83722
12847 * gcc.c (try_generate_repro): Pass
12848 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12849 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12852 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
12853 Kito Cheng <kito.cheng@gmail.com>
12855 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12856 (riscv_leaf_function_p): Delete.
12857 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12859 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12861 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12863 (do_ifelse): New function.
12864 (do_isel): New function.
12865 (do_sub3): New function.
12866 (do_add3): New function.
12867 (do_load_mask_compare): New function.
12868 (do_overlap_load_compare): New function.
12869 (expand_compare_loop): New function.
12870 (expand_block_compare): Call expand_compare_loop() when appropriate.
12871 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12872 option description.
12873 (-mblock-compare-inline-loop-limit): New option.
12875 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12878 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12879 Reverse order of second and third operands in first alternative.
12880 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12881 of first and second elements in UNSPEC_VPERMR vector.
12882 (altivec_expand_vec_perm_le): Likewise.
12884 2018-01-08 Jeff Law <law@redhat.com>
12886 PR rtl-optimizatin/81308
12887 * tree-switch-conversion.c (cfg_altered): New file scoped static.
12888 (process_switch): If group_case_labels makes a change, then set
12890 (pass_convert_switch::execute): If a switch is converted, then
12891 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
12893 PR rtl-optimization/81308
12894 * recog.c (split_all_insns): Conditionally cleanup the CFG after
12897 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
12899 PR target/83663 - Revert r255946
12900 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12901 generation for cases where splatting a value is not useful.
12902 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12903 across a vec_duplicate and a paradoxical subreg forming a vector
12904 mode to a vec_concat.
12906 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12908 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12909 -march=armv8.3-a variants.
12910 * config/arm/t-multilib: Likewise.
12911 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
12913 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12915 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12917 (cceq_ior_compare_complement): Give it a name so I can use it, and
12918 change boolean_or_operator predicate to boolean_operator so it can
12919 be used to generate a crand.
12920 (eqne): New code iterator.
12921 (bd/bd_neg): New code_attrs.
12922 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12923 a single define_insn.
12924 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12925 decrement (bdnzt/bdnzf/bdzt/bdzf).
12926 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12927 with the new names of the branch decrement patterns, and added the
12928 names of the branch decrement conditional patterns.
12930 2018-01-08 Richard Biener <rguenther@suse.de>
12932 PR tree-optimization/83563
12933 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12936 2018-01-08 Richard Biener <rguenther@suse.de>
12938 PR middle-end/83713
12939 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12941 2018-01-08 Richard Biener <rguenther@suse.de>
12943 PR tree-optimization/83685
12944 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12945 references to abnormals.
12947 2018-01-08 Richard Biener <rguenther@suse.de>
12950 * dwarf2out.c (output_indirect_strings): Handle empty
12951 skeleton_debug_str_hash.
12952 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12954 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
12956 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12957 (emit_store_direct): Likewise.
12958 (arc_trampoline_adjust_address): Likewise.
12959 (arc_asm_trampoline_template): New function.
12960 (arc_initialize_trampoline): Use asm_trampoline_template.
12961 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12962 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12963 * config/arc/arc.md (flush_icache): Delete pattern.
12965 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
12967 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12968 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12971 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
12974 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12975 by not USED_FOR_TARGET.
12976 (make_pass_resolve_sw_modes): Likewise.
12978 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
12980 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12983 2018-01-08 Richard Biener <rguenther@suse.de>
12985 PR middle-end/83580
12986 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12988 2018-01-08 Richard Biener <rguenther@suse.de>
12990 PR middle-end/83517
12991 * match.pd ((t * 2) / 2) -> t): Add missing :c.
12993 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
12995 PR middle-end/81897
12996 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12997 basic blocks with a small number of successors.
12998 (convert_control_dep_chain_into_preds): Improve handling of
13000 (dump_predicates): Split apart into...
13001 (dump_pred_chain): ...here...
13002 (dump_pred_info): ...and here.
13003 (can_one_predicate_be_invalidated_p): Add debugging printfs.
13004 (can_chain_union_be_invalidated_p): Improve check for invalidation
13006 (uninit_uses_cannot_happen): Avoid unnecessary if
13007 convert_control_dep_chain_into_preds yielded nothing.
13009 2018-01-06 Martin Sebor <msebor@redhat.com>
13011 PR tree-optimization/83640
13012 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
13013 subtracting negative offset from size.
13014 (builtin_access::overlap): Adjust offset bounds of the access to fall
13015 within the size of the object if possible.
13017 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
13019 PR rtl-optimization/83699
13020 * expmed.c (extract_bit_field_1): Restrict the vector usage of
13021 extract_bit_field_as_subreg to cases in which the extracted
13022 value is also a vector.
13024 * lra-constraints.c (process_alt_operands): Test for the equivalence
13025 substitutions when detecting a possible reload cycle.
13027 2018-01-06 Jakub Jelinek <jakub@redhat.com>
13030 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
13031 by default if flag_selective_schedling{,2}. Formatting fixes.
13033 PR rtl-optimization/83682
13034 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
13035 if it has non-VECTOR_MODE element mode.
13036 (vec_duplicate_p): Likewise.
13038 PR middle-end/83694
13039 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
13040 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
13042 2018-01-05 Jakub Jelinek <jakub@redhat.com>
13045 * config/i386/i386-builtin.def
13046 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
13047 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
13048 Require also OPTION_MASK_ISA_AVX512F in addition to
13049 OPTION_MASK_ISA_GFNI.
13050 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
13051 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
13052 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
13053 to OPTION_MASK_ISA_GFNI.
13054 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
13055 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
13056 OPTION_MASK_ISA_AVX512BW.
13057 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
13058 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
13059 addition to OPTION_MASK_ISA_GFNI.
13060 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
13061 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
13062 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
13063 to OPTION_MASK_ISA_GFNI.
13064 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
13065 a requirement for all ISAs rather than any of them with a few
13067 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
13069 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
13070 bitmasks to be enabled with 3 exceptions, instead of requiring any
13071 enabled ISA with lots of exceptions.
13072 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
13073 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
13074 Change avx512bw in isa attribute to avx512f.
13075 * config/i386/sgxintrin.h: Add license boilerplate.
13076 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
13077 to __AVX512F__ and __AVX512VL to __AVX512VL__.
13078 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
13079 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
13081 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
13082 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
13083 temporarily sse2 rather than sse if not enabled already.
13086 * config/i386/sse.md (VI248_VLBW): Rename to ...
13087 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
13088 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
13089 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
13090 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
13091 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
13092 mode iterator instead of VI248_VLBW.
13094 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
13096 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
13097 (record_modified): Skip clobbers; add debug output.
13098 (param_change_prob): Use sreal frequencies.
13100 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
13102 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
13103 punt for user-aligned variables.
13105 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
13107 * tree-chrec.c (chrec_contains_symbols): Return true for
13110 2018-01-05 Sudakshina Das <sudi.das@arm.com>
13113 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
13114 of (x|y) == x for BICS pattern.
13116 2018-01-05 Jakub Jelinek <jakub@redhat.com>
13118 PR tree-optimization/83605
13119 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
13120 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
13123 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
13125 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
13126 * config/epiphany/rtems.h: New file.
13128 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13129 Uros Bizjak <ubizjak@gmail.com>
13132 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
13133 QIreg_operand instead of register_operand predicate.
13134 * config/i386/i386.c (ix86_rop_should_change_byte_p,
13135 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
13136 comments instead of -fmitigate[-_]rop.
13138 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13141 * cgraphunit.c (symbol_table::compile): Switch to text_section
13142 before calling assembly_start debug hook.
13143 * run-rtl-passes.c (run_rtl_passes): Likewise.
13146 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13148 * tree-vrp.c (extract_range_from_binary_expr_1): Check
13149 range_int_cst_p rather than !symbolic_range_p before calling
13150 extract_range_from_multiplicative_op_1.
13152 2018-01-04 Jeff Law <law@redhat.com>
13154 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
13155 redundant test in assertion.
13157 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13159 * doc/rtl.texi: Document machine_mode wrapper classes.
13161 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13163 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
13164 using tree_to_uhwi.
13166 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13168 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
13169 the VEC_PERM_EXPR fold to fail.
13171 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13174 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
13175 to switched_sections.
13177 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13180 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
13181 test for d.testing.
13183 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
13186 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
13187 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
13189 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13192 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
13193 is BLKmode and bitpos not zero or mode change is needed.
13195 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13198 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
13201 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
13204 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
13205 instead of MULT rtx. Update all corresponding splitters.
13206 (*saddl_se): Ditto.
13207 (*ssub<modesuffix>): Ditto.
13208 (*ssubl_se): Ditto.
13209 (*cmp_sadd_di): Update split patterns.
13210 (*cmp_sadd_si): Ditto.
13211 (*cmp_sadd_sidi): Ditto.
13212 (*cmp_ssub_di): Ditto.
13213 (*cmp_ssub_si): Ditto.
13214 (*cmp_ssub_sidi): Ditto.
13215 * config/alpha/predicates.md (const23_operand): New predicate.
13216 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13217 Look for ASHIFT, not MULT inner operand.
13218 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13220 2018-01-04 Martin Liska <mliska@suse.cz>
13222 PR gcov-profile/83669
13223 * gcov.c (output_intermediate_file): Add version to intermediate
13225 * doc/gcov.texi: Document new field 'version' in intermediate
13226 file format. Fix location of '-k' option of gcov command.
13228 2018-01-04 Martin Liska <mliska@suse.cz>
13231 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13233 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13235 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13237 2018-01-03 Martin Sebor <msebor@redhat.com>
13239 PR tree-optimization/83655
13240 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13241 checking calls with invalid arguments.
13243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13245 * tree-vect-stmts.c (vect_get_store_rhs): New function.
13246 (vectorizable_mask_load_store): Delete.
13247 (vectorizable_call): Return false for masked loads and stores.
13248 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
13249 instead of gimple_assign_rhs1.
13250 (vectorizable_load): Handle IFN_MASK_LOAD.
13251 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13255 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13257 (vectorizable_mask_load_store): ...here.
13258 (vectorizable_load): ...and here.
13260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13262 * tree-vect-stmts.c (vect_build_all_ones_mask)
13263 (vect_build_zero_merge_argument): New functions, split out from...
13264 (vectorizable_load): ...here.
13266 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13268 * tree-vect-stmts.c (vect_check_store_rhs): New function,
13270 (vectorizable_mask_load_store): ...here.
13271 (vectorizable_store): ...and here.
13273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13275 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13277 (vectorizable_mask_load_store): ...here.
13279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13281 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13282 (vect_model_store_cost): Take a vec_load_store_type instead of a
13284 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13285 (vect_model_store_cost): Take a vec_load_store_type instead of a
13287 (vectorizable_mask_load_store): Update accordingly.
13288 (vectorizable_store): Likewise.
13289 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13293 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13294 IFN_MASK_LOAD calls here rather than...
13295 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13298 Alan Hayward <alan.hayward@arm.com>
13299 David Sherwood <david.sherwood@arm.com>
13301 * expmed.c (extract_bit_field_1): For vector extracts,
13302 fall back to extract_bit_field_as_subreg if vec_extract
13305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13306 Alan Hayward <alan.hayward@arm.com>
13307 David Sherwood <david.sherwood@arm.com>
13309 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13310 they are variable or constant sized.
13311 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13312 slots for constant-sized data.
13314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13315 Alan Hayward <alan.hayward@arm.com>
13316 David Sherwood <david.sherwood@arm.com>
13318 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13319 handling COND_EXPRs with boolean comparisons, try to find a better
13320 basis for the mask type than the boolean itself.
13322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13324 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13325 is calculated and how it can be overridden.
13326 * genmodes.c (max_bitsize_mode_any_mode): New variable.
13327 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13329 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13332 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13333 Alan Hayward <alan.hayward@arm.com>
13334 David Sherwood <david.sherwood@arm.com>
13336 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13337 Remove the mode argument.
13338 (aarch64_simd_valid_immediate): Remove the mode and inverse
13340 * config/aarch64/iterators.md (bitsize): New iterator.
13341 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13342 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13343 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13344 aarch64_simd_valid_immediate.
13345 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13346 (aarch64_reg_or_bic_imm): Likewise.
13347 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13348 with an insn_type enum and msl with a modifier_type enum.
13349 Replace element_width with a scalar_mode. Change the shift
13350 to unsigned int. Add constructors for scalar_float_mode and
13351 scalar_int_mode elements.
13352 (aarch64_vect_float_const_representable_p): Delete.
13353 (aarch64_can_const_movi_rtx_p)
13354 (aarch64_simd_scalar_immediate_valid_for_move)
13355 (aarch64_simd_make_constant): Update call to
13356 aarch64_simd_valid_immediate.
13357 (aarch64_advsimd_valid_immediate_hs): New function.
13358 (aarch64_advsimd_valid_immediate): Likewise.
13359 (aarch64_simd_valid_immediate): Remove mode and inverse
13360 arguments. Rewrite to use the above. Use const_vec_duplicate_p
13361 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13362 and aarch64_float_const_representable_p on the result.
13363 (aarch64_output_simd_mov_immediate): Remove mode argument.
13364 Update call to aarch64_simd_valid_immediate and use of
13365 simd_immediate_info.
13366 (aarch64_output_scalar_simd_mov_immediate): Update call
13369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13370 Alan Hayward <alan.hayward@arm.com>
13371 David Sherwood <david.sherwood@arm.com>
13373 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13374 (mode_nunits): Likewise CONST_MODE_NUNITS.
13375 * machmode.def (ADJUST_NUNITS): Document.
13376 * genmodes.c (mode_data::need_nunits_adj): New field.
13377 (blank_mode): Update accordingly.
13378 (adj_nunits): New variable.
13379 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13381 (emit_mode_size_inline): Set need_bytesize_adj for all modes
13382 listed in adj_nunits.
13383 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13384 listed in adj_nunits. Don't emit case statements for such modes.
13385 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13386 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
13387 nothing if adj_nunits is nonnull.
13388 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13389 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13390 (emit_mode_fbit): Update use of print_maybe_const_decl.
13391 (emit_move_size): Likewise. Treat the array as non-const
13393 (emit_mode_adjustments): Handle adj_nunits.
13395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13397 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13398 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13399 (VECTOR_MODES): Use it.
13400 (make_vector_modes): Take the prefix as an argument.
13402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13403 Alan Hayward <alan.hayward@arm.com>
13404 David Sherwood <david.sherwood@arm.com>
13406 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13407 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13408 for MODE_VECTOR_BOOL.
13409 * machmode.def (VECTOR_BOOL_MODE): Document.
13410 * genmodes.c (VECTOR_BOOL_MODE): New macro.
13411 (make_vector_bool_mode): New function.
13412 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13414 * lto-streamer-in.c (lto_input_mode_table): Likewise.
13415 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13417 * stor-layout.c (int_mode_for_mode): Likewise.
13418 * tree.c (build_vector_type_for_mode): Likewise.
13419 * varasm.c (output_constant_pool_2): Likewise.
13420 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13421 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
13422 for MODE_VECTOR_BOOL.
13423 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13424 of mode class checks.
13425 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13426 instead of a list of mode class checks.
13427 (expand_vector_scalar_condition): Likewise.
13428 (type_for_widest_vector_mode): Handle BImode as an inner mode.
13430 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13431 Alan Hayward <alan.hayward@arm.com>
13432 David Sherwood <david.sherwood@arm.com>
13434 * machmode.h (mode_size): Change from unsigned short to
13436 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13437 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13438 or if measurement_type is not polynomial.
13439 (fixed_size_mode::includes_p): Check for constant-sized modes.
13440 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13441 return a poly_uint16 rather than an unsigned short.
13442 (emit_mode_size): Change the type of mode_size from unsigned short
13443 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
13444 (emit_mode_adjustments): Cope with polynomial vector sizes.
13445 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13447 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13449 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13450 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13451 * caller-save.c (setup_save_areas): Likewise.
13452 (replace_reg_with_saved_mem): Likewise.
13453 * calls.c (emit_library_call_value_1): Likewise.
13454 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13455 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13456 (gen_lowpart_for_combine): Likewise.
13457 * convert.c (convert_to_integer_1): Likewise.
13458 * cse.c (equiv_constant, cse_insn): Likewise.
13459 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13460 (cselib_subst_to_values): Likewise.
13461 * dce.c (word_dce_process_block): Likewise.
13462 * df-problems.c (df_word_lr_mark_ref): Likewise.
13463 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13464 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13465 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13466 (rtl_for_decl_location): Likewise.
13467 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13468 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13469 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13470 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13471 (expand_expr_real_1): Likewise.
13472 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13473 (pad_below): Likewise.
13474 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13475 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13476 * ira.c (get_subreg_tracking_sizes): Likewise.
13477 * ira-build.c (ira_create_allocno_objects): Likewise.
13478 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13479 (ira_sort_regnos_for_alter_reg): Likewise.
13480 * ira-costs.c (record_operand_costs): Likewise.
13481 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13482 (resolve_simple_move): Likewise.
13483 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13484 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13485 (lra_constraints): Likewise.
13486 (CONST_POOL_OK_P): Reject variable-sized modes.
13487 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13488 (add_pseudo_to_slot, lra_spill): Likewise.
13489 * omp-low.c (omp_clause_aligned_alignment): Likewise.
13490 * optabs-query.c (get_best_extraction_insn): Likewise.
13491 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13492 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13493 (expand_mult_highpart, valid_multiword_target_p): Likewise.
13494 * recog.c (offsettable_address_addr_space_p): Likewise.
13495 * regcprop.c (maybe_mode_change): Likewise.
13496 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13497 * regrename.c (build_def_use): Likewise.
13498 * regstat.c (dump_reg_info): Likewise.
13499 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13500 (find_reloads, find_reloads_subreg_address): Likewise.
13501 * reload1.c (eliminate_regs_1): Likewise.
13502 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13503 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13504 (simplify_binary_operation_1, simplify_subreg): Likewise.
13505 * targhooks.c (default_function_arg_padding): Likewise.
13506 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13507 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13508 (verify_gimple_assign_ternary): Likewise.
13509 * tree-inline.c (estimate_move_cost): Likewise.
13510 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13511 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13512 (get_address_cost_ainc): Likewise.
13513 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13514 (vect_supportable_dr_alignment): Likewise.
13515 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13516 (vectorizable_reduction): Likewise.
13517 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13518 (vectorizable_operation, vectorizable_load): Likewise.
13519 * tree.c (build_same_sized_truth_vector_type): Likewise.
13520 * valtrack.c (cleanup_auto_inc_dec): Likewise.
13521 * var-tracking.c (emit_note_insn_var_location): Likewise.
13522 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13523 (ADDR_VEC_ALIGN): Likewise.
13525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13526 Alan Hayward <alan.hayward@arm.com>
13527 David Sherwood <david.sherwood@arm.com>
13529 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13531 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13532 or if measurement_type is polynomial.
13533 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13534 * combine.c (make_extraction): Likewise.
13535 * dse.c (find_shift_sequence): Likewise.
13536 * dwarf2out.c (mem_loc_descriptor): Likewise.
13537 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13538 (extract_bit_field, extract_low_bits): Likewise.
13539 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13540 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13541 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13542 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13543 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13544 * reload.c (find_reloads): Likewise.
13545 * reload1.c (alter_reg): Likewise.
13546 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13547 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13548 * tree-if-conv.c (predicate_mem_writes): Likewise.
13549 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13550 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13551 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13552 * valtrack.c (dead_debug_insert_temp): Likewise.
13553 * varasm.c (mergeable_constant_section): Likewise.
13554 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13557 Alan Hayward <alan.hayward@arm.com>
13558 David Sherwood <david.sherwood@arm.com>
13560 * expr.c (expand_assignment): Cope with polynomial mode sizes
13561 when assigning to a CONCAT.
13563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13564 Alan Hayward <alan.hayward@arm.com>
13565 David Sherwood <david.sherwood@arm.com>
13567 * machmode.h (mode_precision): Change from unsigned short to
13569 (mode_to_precision): Return a poly_uint16 rather than an unsigned
13571 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13572 or if measurement_type is not polynomial.
13573 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
13574 in which the mode is already known to be a scalar_int_mode.
13575 * genmodes.c (emit_mode_precision): Change the type of mode_precision
13576 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
13578 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13579 for GET_MODE_PRECISION.
13580 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13581 for GET_MODE_PRECISION.
13582 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13584 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13585 (expand_field_assignment, make_extraction): Likewise.
13586 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13587 (get_last_value): Likewise.
13588 * convert.c (convert_to_integer_1): Likewise.
13589 * cse.c (cse_insn): Likewise.
13590 * expr.c (expand_expr_real_1): Likewise.
13591 * lra-constraints.c (simplify_operand_subreg): Likewise.
13592 * optabs-query.c (can_atomic_load_p): Likewise.
13593 * optabs.c (expand_atomic_load): Likewise.
13594 (expand_atomic_store): Likewise.
13595 * ree.c (combine_reaching_defs): Likewise.
13596 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13597 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13598 * tree.h (type_has_mode_precision_p): Likewise.
13599 * ubsan.c (instrument_si_overflow): Likewise.
13601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13602 Alan Hayward <alan.hayward@arm.com>
13603 David Sherwood <david.sherwood@arm.com>
13605 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13606 polynomial numbers of units.
13607 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13608 (valid_vector_subparts_p): New function.
13609 (build_vector_type): Remove temporary shim and take the number
13610 of units as a poly_uint64 rather than an int.
13611 (build_opaque_vector_type): Take the number of units as a
13612 poly_uint64 rather than an int.
13613 * tree.c (build_vector_from_ctor): Handle polynomial
13614 TYPE_VECTOR_SUBPARTS.
13615 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13616 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13617 (build_vector_from_val): If the number of units is variable,
13618 use build_vec_duplicate_cst for constant operands and
13619 VEC_DUPLICATE_EXPR otherwise.
13620 (make_vector_type): Remove temporary is_constant ().
13621 (build_vector_type, build_opaque_vector_type): Take the number of
13622 units as a poly_uint64 rather than an int.
13623 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13625 * cfgexpand.c (expand_debug_expr): Likewise.
13626 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13627 (store_constructor, expand_expr_real_1): Likewise.
13628 (const_scalar_mask_from_tree): Likewise.
13629 * fold-const-call.c (fold_const_reduction): Likewise.
13630 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13631 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13632 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13633 (fold_relational_const): Likewise.
13634 (native_interpret_vector): Likewise. Change the size from an
13635 int to an unsigned int.
13636 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13637 TYPE_VECTOR_SUBPARTS.
13638 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13639 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13640 duplicating a non-constant operand into a variable-length vector.
13641 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13642 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13643 * ipa-icf.c (sem_variable::equals): Likewise.
13644 * match.pd: Likewise.
13645 * omp-simd-clone.c (simd_clone_subparts): Likewise.
13646 * print-tree.c (print_node): Likewise.
13647 * stor-layout.c (layout_type): Likewise.
13648 * targhooks.c (default_builtin_vectorization_cost): Likewise.
13649 * tree-cfg.c (verify_gimple_comparison): Likewise.
13650 (verify_gimple_assign_binary): Likewise.
13651 (verify_gimple_assign_ternary): Likewise.
13652 (verify_gimple_assign_single): Likewise.
13653 * tree-pretty-print.c (dump_generic_node): Likewise.
13654 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13655 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13656 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13657 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13658 (vect_shift_permute_load_chain): Likewise.
13659 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13660 (expand_vector_condition, optimize_vector_constructor): Likewise.
13661 (lower_vec_perm, get_compute_type): Likewise.
13662 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13663 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13664 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13665 (vect_recog_mask_conversion_pattern): Likewise.
13666 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13667 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13668 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13669 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13670 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13671 (vectorizable_shift, vectorizable_operation, vectorizable_store)
13672 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13673 (supportable_widening_operation): Likewise.
13674 (supportable_narrowing_operation): Likewise.
13675 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13677 * varasm.c (output_constant): Likewise.
13679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13680 Alan Hayward <alan.hayward@arm.com>
13681 David Sherwood <david.sherwood@arm.com>
13683 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13684 so that both the length == 3 and length != 3 cases set up their
13685 own permute vectors. Add comments explaining why we know the
13686 number of elements is constant.
13687 (vect_permute_load_chain): Likewise.
13689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13690 Alan Hayward <alan.hayward@arm.com>
13691 David Sherwood <david.sherwood@arm.com>
13693 * machmode.h (mode_nunits): Change from unsigned char to
13695 (ONLY_FIXED_SIZE_MODES): New macro.
13696 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13697 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13698 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13700 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13701 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13702 or if measurement_type is not polynomial.
13703 * genmodes.c (ZERO_COEFFS): New macro.
13704 (emit_mode_nunits_inline): Make mode_nunits_inline return a
13706 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13707 Use ZERO_COEFFS when emitting initializers.
13708 * data-streamer.h (bp_pack_poly_value): New function.
13709 (bp_unpack_poly_value): Likewise.
13710 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13711 for GET_MODE_NUNITS.
13712 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13713 for GET_MODE_NUNITS.
13714 * tree.c (make_vector_type): Remove temporary shim and make
13715 the real function take the number of units as a poly_uint64
13716 rather than an int.
13717 (build_vector_type_for_mode): Handle polynomial nunits.
13718 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13719 * emit-rtl.c (const_vec_series_p_1): Likewise.
13720 (gen_rtx_CONST_VECTOR): Likewise.
13721 * fold-const.c (test_vec_duplicate_folding): Likewise.
13722 * genrecog.c (validate_pattern): Likewise.
13723 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13724 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13725 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13726 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13727 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13728 * rtlanal.c (subreg_get_info): Likewise.
13729 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13730 (vect_grouped_load_supported): Likewise.
13731 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13732 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13733 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13734 (simplify_const_unary_operation, simplify_binary_operation_1)
13735 (simplify_const_binary_operation, simplify_ternary_operation)
13736 (test_vector_ops_duplicate, test_vector_ops): Likewise.
13737 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13738 instead of CONST_VECTOR_NUNITS.
13739 * varasm.c (output_constant_pool_2): Likewise.
13740 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13741 explicit-encoded elements in the XVEC for variable-length vectors.
13743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13745 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13748 Alan Hayward <alan.hayward@arm.com>
13749 David Sherwood <david.sherwood@arm.com>
13751 * coretypes.h (fixed_size_mode): Declare.
13752 (fixed_size_mode_pod): New typedef.
13753 * builtins.h (target_builtins::x_apply_args_mode)
13754 (target_builtins::x_apply_result_mode): Change type to
13755 fixed_size_mode_pod.
13756 * builtins.c (apply_args_size, apply_result_size, result_vector)
13757 (expand_builtin_apply_args_1, expand_builtin_apply)
13758 (expand_builtin_return): Update accordingly.
13760 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13762 * cse.c (hash_rtx_cb): Hash only the encoded elements.
13763 * cselib.c (cselib_hash_rtx): Likewise.
13764 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13765 CONST_VECTOR encoding.
13767 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13768 Jeff Law <law@redhat.com>
13771 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13772 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13773 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13774 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13777 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13778 explicitly probe *sp in a noreturn function if there were any callee
13779 register saves or frame pointer is needed.
13781 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13784 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13785 BLKmode for ternary, binary or unary expressions.
13788 * var-tracking.c (delete_vta_debug_insn): New inline function.
13789 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13790 insns from get_insns () to NULL instead of each bb separately.
13791 Use delete_vta_debug_insn. No longer static.
13792 (vt_debug_insns_local, variable_tracking_main_1): Adjust
13793 delete_vta_debug_insns callers.
13794 * rtl.h (delete_vta_debug_insns): Declare.
13795 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13796 instead of variable_tracking_main.
13798 2018-01-03 Martin Sebor <msebor@redhat.com>
13800 PR tree-optimization/83603
13801 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13802 arguments past the endof the argument list in functions declared
13803 without a prototype.
13804 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13805 Avoid checking when arguments are null.
13807 2018-01-03 Martin Sebor <msebor@redhat.com>
13810 * doc/extend.texi (attribute const): Fix a typo.
13811 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13812 issuing -Wsuggest-attribute for void functions.
13814 2018-01-03 Martin Sebor <msebor@redhat.com>
13816 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13817 offset_int::from instead of wide_int::to_shwi.
13818 (maybe_diag_overlap): Remove assertion.
13819 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13820 * gimple-ssa-sprintf.c (format_directive): Same.
13821 (parse_directive): Same.
13822 (sprintf_dom_walker::compute_format_length): Same.
13823 (try_substitute_return_value): Same.
13825 2018-01-03 Jeff Law <law@redhat.com>
13827 PR middle-end/83654
13828 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13829 non-constant residual for zero at runtime and avoid probing in
13830 that case. Reorganize code for trailing problem to mirror handling
13833 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13835 PR tree-optimization/83501
13836 * tree-ssa-strlen.c (get_string_cst): New.
13837 (handle_char_store): Call get_string_cst.
13839 2018-01-03 Martin Liska <mliska@suse.cz>
13841 PR tree-optimization/83593
13842 * tree-ssa-strlen.c: Include tree-cfg.h.
13843 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13844 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13845 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13847 (strlen_dom_walker::before_dom_children): Call
13848 gimple_purge_dead_eh_edges. Dump tranformation with details
13850 (strlen_dom_walker::before_dom_children): Update call by adding
13851 new argument cleanup_eh.
13852 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13854 2018-01-03 Martin Liska <mliska@suse.cz>
13857 * cif-code.def (VARIADIC_THUNK): New enum value.
13858 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13861 2018-01-03 Jan Beulich <jbeulich@suse.com>
13863 * sse.md (mov<mode>_internal): Tighten condition for when to use
13864 vmovdqu<ssescalarsize> for TI and OI modes.
13866 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13868 Update copyright years.
13870 2018-01-03 Martin Liska <mliska@suse.cz>
13873 * ipa-visibility.c (function_and_variable_visibility): Skip
13874 functions with noipa attribure.
13876 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13878 * gcc.c (process_command): Update copyright notice dates.
13879 * gcov-dump.c (print_version): Ditto.
13880 * gcov.c (print_version): Ditto.
13881 * gcov-tool.c (print_version): Ditto.
13882 * gengtype.c (create_file): Ditto.
13883 * doc/cpp.texi: Bump @copying's copyright year.
13884 * doc/cppinternals.texi: Ditto.
13885 * doc/gcc.texi: Ditto.
13886 * doc/gccint.texi: Ditto.
13887 * doc/gcov.texi: Ditto.
13888 * doc/install.texi: Ditto.
13889 * doc/invoke.texi: Ditto.
13891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13893 * vector-builder.h (vector_builder::m_full_nelts): Change from
13894 unsigned int to poly_uint64.
13895 (vector_builder::full_nelts): Update prototype accordingly.
13896 (vector_builder::new_vector): Likewise.
13897 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13898 (vector_builder::operator ==): Likewise.
13899 (vector_builder::finalize): Likewise.
13900 * int-vector-builder.h (int_vector_builder::int_vector_builder):
13901 Take the number of elements as a poly_uint64 rather than an
13903 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13904 from unsigned int to poly_uint64.
13905 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13906 (vec_perm_indices::new_vector): Likewise.
13907 (vec_perm_indices::length): Likewise.
13908 (vec_perm_indices::nelts_per_input): Likewise.
13909 (vec_perm_indices::input_nelts): Likewise.
13910 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13911 number of elements per input as a poly_uint64 rather than an
13912 unsigned int. Use the original encoding for variable-length
13913 vectors, rather than clamping each individual element.
13914 For the second and subsequent elements in each pattern,
13915 clamp the step and base before clamping their sum.
13916 (vec_perm_indices::series_p): Handle polynomial element counts.
13917 (vec_perm_indices::all_in_range_p): Likewise.
13918 (vec_perm_indices_to_tree): Likewise.
13919 (vec_perm_indices_to_rtx): Likewise.
13920 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13921 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13922 (tree_vector_builder::new_binary_operation): Handle polynomial
13923 element counts. Return false if we need to know the number
13924 of elements at compile time.
13925 * fold-const.c (fold_vec_perm): Punt if the number of elements
13926 isn't known at compile time.
13928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13930 * vec-perm-indices.h (vec_perm_builder): Change element type
13931 from HOST_WIDE_INT to poly_int64.
13932 (vec_perm_indices::element_type): Update accordingly.
13933 (vec_perm_indices::clamp): Handle polynomial element_types.
13934 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13935 (vec_perm_indices::all_in_range_p): Likewise.
13936 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13938 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13939 polynomial vec_perm_indices element types.
13940 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13941 * fold-const.c (fold_vec_perm): Likewise.
13942 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13943 * tree-vect-generic.c (lower_vec_perm): Likewise.
13944 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13945 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13946 element type to HOST_WIDE_INT.
13948 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13949 Alan Hayward <alan.hayward@arm.com>
13950 David Sherwood <david.sherwood@arm.com>
13952 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13953 rather than an int. Use plus_constant.
13954 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13955 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13958 Alan Hayward <alan.hayward@arm.com>
13959 David Sherwood <david.sherwood@arm.com>
13961 * calls.c (emit_call_1, expand_call): Change struct_value_size from
13962 a HOST_WIDE_INT to a poly_int64.
13964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13965 Alan Hayward <alan.hayward@arm.com>
13966 David Sherwood <david.sherwood@arm.com>
13968 * calls.c (load_register_parameters): Cope with polynomial
13969 mode sizes. Require a constant size for BLKmode parameters
13970 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
13971 forces a parameter to be padded at the lsb end in order to
13972 fill a complete number of words, require the parameter size
13973 to be ordered wrt UNITS_PER_WORD.
13975 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13976 Alan Hayward <alan.hayward@arm.com>
13977 David Sherwood <david.sherwood@arm.com>
13979 * reload1.c (spill_stack_slot_width): Change element type
13980 from unsigned int to poly_uint64_pod.
13981 (alter_reg): Treat mode sizes as polynomial.
13983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13984 Alan Hayward <alan.hayward@arm.com>
13985 David Sherwood <david.sherwood@arm.com>
13987 * reload.c (complex_word_subreg_p): New function.
13988 (reload_inner_reg_of_subreg, push_reload): Use it.
13990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13991 Alan Hayward <alan.hayward@arm.com>
13992 David Sherwood <david.sherwood@arm.com>
13994 * lra-constraints.c (process_alt_operands): Reject matched
13995 operands whose sizes aren't ordered.
13996 (match_reload): Refer to this check here.
13998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13999 Alan Hayward <alan.hayward@arm.com>
14000 David Sherwood <david.sherwood@arm.com>
14002 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
14003 that the mode size is in the set {1, 2, 4, 8, 16}.
14005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14006 Alan Hayward <alan.hayward@arm.com>
14007 David Sherwood <david.sherwood@arm.com>
14009 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
14010 Use plus_constant instead of gen_rtx_PLUS.
14012 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14013 Alan Hayward <alan.hayward@arm.com>
14014 David Sherwood <david.sherwood@arm.com>
14016 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
14017 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
14018 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
14019 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
14020 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
14021 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
14022 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
14023 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
14024 * config/i386/i386.c (ix86_push_rounding): ...this new function.
14025 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
14027 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
14028 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
14029 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
14030 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
14031 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
14032 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
14033 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
14034 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
14035 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
14036 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
14038 * expr.c (emit_move_resolve_push): Treat the input and result
14039 of PUSH_ROUNDING as a poly_int64.
14040 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
14041 (emit_push_insn): Likewise.
14042 * lra-eliminations.c (mark_not_eliminable): Likewise.
14043 * recog.c (push_operand): Likewise.
14044 * reload1.c (elimination_effects): Likewise.
14045 * rtlanal.c (nonzero_bits1): Likewise.
14046 * calls.c (store_one_arg): Likewise. Require the padding to be
14047 known at compile time.
14049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14050 Alan Hayward <alan.hayward@arm.com>
14051 David Sherwood <david.sherwood@arm.com>
14053 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
14054 Use plus_constant instead of gen_rtx_PLUS.
14056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14057 Alan Hayward <alan.hayward@arm.com>
14058 David Sherwood <david.sherwood@arm.com>
14060 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
14061 rather than an int.
14063 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14064 Alan Hayward <alan.hayward@arm.com>
14065 David Sherwood <david.sherwood@arm.com>
14067 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
14068 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
14069 via stack temporaries. Treat the mode size as polynomial too.
14071 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14072 Alan Hayward <alan.hayward@arm.com>
14073 David Sherwood <david.sherwood@arm.com>
14075 * expr.c (expand_expr_real_2): When handling conversions involving
14076 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
14077 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
14078 as a poly_uint64 too.
14080 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14081 Alan Hayward <alan.hayward@arm.com>
14082 David Sherwood <david.sherwood@arm.com>
14084 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
14086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14087 Alan Hayward <alan.hayward@arm.com>
14088 David Sherwood <david.sherwood@arm.com>
14090 * combine.c (can_change_dest_mode): Handle polynomial
14091 REGMODE_NATURAL_SIZE.
14092 * expmed.c (store_bit_field_1): Likewise.
14093 * expr.c (store_constructor): Likewise.
14094 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
14095 and polynomial REGMODE_NATURAL_SIZE.
14096 (gen_lowpart_common): Likewise.
14097 * reginfo.c (record_subregs_of_mode): Likewise.
14098 * rtlanal.c (read_modify_subreg_p): Likewise.
14100 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14101 Alan Hayward <alan.hayward@arm.com>
14102 David Sherwood <david.sherwood@arm.com>
14104 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
14105 numbers of elements.
14107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14108 Alan Hayward <alan.hayward@arm.com>
14109 David Sherwood <david.sherwood@arm.com>
14111 * match.pd: Cope with polynomial numbers of vector elements.
14113 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14114 Alan Hayward <alan.hayward@arm.com>
14115 David Sherwood <david.sherwood@arm.com>
14117 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
14118 in a POINTER_PLUS_EXPR.
14120 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14121 Alan Hayward <alan.hayward@arm.com>
14122 David Sherwood <david.sherwood@arm.com>
14124 * omp-simd-clone.c (simd_clone_subparts): New function.
14125 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
14126 (ipa_simd_modify_function_body): Likewise.
14128 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14129 Alan Hayward <alan.hayward@arm.com>
14130 David Sherwood <david.sherwood@arm.com>
14132 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
14133 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
14134 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
14135 (expand_vector_condition, vector_element): Likewise.
14136 (subparts_gt): New function.
14137 (get_compute_type): Use subparts_gt.
14138 (count_type_subparts): Delete.
14139 (expand_vector_operations_1): Use subparts_gt instead of
14140 count_type_subparts.
14142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14143 Alan Hayward <alan.hayward@arm.com>
14144 David Sherwood <david.sherwood@arm.com>
14146 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
14147 (vect_compile_time_alias): ...this new function. Do the calculation
14148 on poly_ints rather than trees.
14149 (vect_prune_runtime_alias_test_list): Update call accordingly.
14151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14152 Alan Hayward <alan.hayward@arm.com>
14153 David Sherwood <david.sherwood@arm.com>
14155 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
14157 (vect_schedule_slp_instance): Likewise.
14159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14160 Alan Hayward <alan.hayward@arm.com>
14161 David Sherwood <david.sherwood@arm.com>
14163 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
14164 constant and extern definitions for variable-length vectors.
14165 (vect_get_constant_vectors): Note that the number of units
14166 is known to be constant.
14168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14169 Alan Hayward <alan.hayward@arm.com>
14170 David Sherwood <david.sherwood@arm.com>
14172 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
14173 of units as polynomial. Choose between WIDE and NARROW based
14176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14177 Alan Hayward <alan.hayward@arm.com>
14178 David Sherwood <david.sherwood@arm.com>
14180 * tree-vect-stmts.c (simd_clone_subparts): New function.
14181 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
14183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14184 Alan Hayward <alan.hayward@arm.com>
14185 David Sherwood <david.sherwood@arm.com>
14187 * tree-vect-stmts.c (vectorizable_call): Treat the number of
14188 vectors as polynomial. Use build_index_vector for
14189 IFN_GOMP_SIMD_LANE.
14191 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14192 Alan Hayward <alan.hayward@arm.com>
14193 David Sherwood <david.sherwood@arm.com>
14195 * tree-vect-stmts.c (get_load_store_type): Treat the number of
14196 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
14197 for variable-length vectors.
14198 (vectorizable_mask_load_store): Treat the number of units as
14199 polynomial, asserting that it is constant if the condition has
14200 already been enforced.
14201 (vectorizable_store, vectorizable_load): Likewise.
14203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14204 Alan Hayward <alan.hayward@arm.com>
14205 David Sherwood <david.sherwood@arm.com>
14207 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
14208 of units as polynomial. Punt if we can't tell at compile time
14209 which vector contains the final result.
14211 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14212 Alan Hayward <alan.hayward@arm.com>
14213 David Sherwood <david.sherwood@arm.com>
14215 * tree-vect-loop.c (vectorizable_induction): Treat the number
14216 of units as polynomial. Punt on SLP inductions. Use an integer
14217 VEC_SERIES_EXPR for variable-length integer reductions. Use a
14218 cast of such a series for variable-length floating-point
14221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14222 Alan Hayward <alan.hayward@arm.com>
14223 David Sherwood <david.sherwood@arm.com>
14225 * tree.h (build_index_vector): Declare.
14226 * tree.c (build_index_vector): New function.
14227 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14228 of units as polynomial, forcibly converting it to a constant if
14229 vectorizable_reduction has already enforced the condition.
14230 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
14231 to create a {1,2,3,...} vector.
14232 (vectorizable_reduction): Treat the number of units as polynomial.
14233 Choose vectype_in based on the largest scalar element size rather
14234 than the smallest number of units. Enforce the restrictions
14237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14238 Alan Hayward <alan.hayward@arm.com>
14239 David Sherwood <david.sherwood@arm.com>
14241 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14242 number of units as polynomial.
14244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14245 Alan Hayward <alan.hayward@arm.com>
14246 David Sherwood <david.sherwood@arm.com>
14248 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14249 * target.def (autovectorize_vector_sizes): Return the vector sizes
14250 by pointer, using vector_sizes rather than a bitmask.
14251 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14252 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14253 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14255 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14256 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14257 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14258 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14259 * omp-general.c (omp_max_vf): Likewise.
14260 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14261 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14262 * tree-vect-loop.c (vect_analyze_loop): Likewise.
14263 * tree-vect-slp.c (vect_slp_bb): Likewise.
14264 * doc/tm.texi: Regenerate.
14265 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14267 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14268 the vector size as a poly_uint64 rather than an unsigned int.
14269 (current_vector_size): Change from an unsigned int to a poly_uint64.
14270 (get_vectype_for_scalar_type): Update accordingly.
14271 * tree.h (build_truth_vector_type): Take the size and number of
14272 units as a poly_uint64 rather than an unsigned int.
14273 (build_vector_type): Add a temporary overload that takes
14274 the number of units as a poly_uint64 rather than an unsigned int.
14275 * tree.c (make_vector_type): Likewise.
14276 (build_truth_vector_type): Take the number of units as a poly_uint64
14277 rather than an unsigned int.
14279 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14280 Alan Hayward <alan.hayward@arm.com>
14281 David Sherwood <david.sherwood@arm.com>
14283 * target.def (get_mask_mode): Take the number of units and length
14284 as poly_uint64s rather than unsigned ints.
14285 * targhooks.h (default_get_mask_mode): Update accordingly.
14286 * targhooks.c (default_get_mask_mode): Likewise.
14287 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14288 * doc/tm.texi: Regenerate.
14290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14291 Alan Hayward <alan.hayward@arm.com>
14292 David Sherwood <david.sherwood@arm.com>
14294 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14295 * omp-general.c (omp_max_vf): Likewise.
14296 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14297 (expand_omp_simd): Handle polynomial safelen.
14298 * omp-low.c (omplow_simd_context): Add a default constructor.
14299 (omplow_simd_context::max_vf): Change from int to poly_uint64.
14300 (lower_rec_simd_input_clauses): Update accordingly.
14301 (lower_rec_input_clauses): Likewise.
14303 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14304 Alan Hayward <alan.hayward@arm.com>
14305 David Sherwood <david.sherwood@arm.com>
14307 * tree-vectorizer.h (vect_nunits_for_cost): New function.
14308 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14309 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14310 (vect_analyze_slp_cost): Likewise.
14311 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14312 (vect_model_load_cost): Likewise.
14314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14315 Alan Hayward <alan.hayward@arm.com>
14316 David Sherwood <david.sherwood@arm.com>
14318 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14319 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14320 from an unsigned int * to a poly_uint64_pod *.
14321 (calculate_unrolling_factor): New function.
14322 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
14324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14325 Alan Hayward <alan.hayward@arm.com>
14326 David Sherwood <david.sherwood@arm.com>
14328 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14329 from an unsigned int to a poly_uint64.
14330 (_loop_vec_info::slp_unrolling_factor): Likewise.
14331 (_loop_vec_info::vectorization_factor): Change from an int
14333 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14334 (vect_get_num_vectors): New function.
14335 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14336 (vect_get_num_copies): Use vect_get_num_vectors.
14337 (vect_analyze_data_ref_dependences): Change max_vf from an int *
14338 to an unsigned int *.
14339 (vect_analyze_data_refs): Change min_vf from an int * to a
14341 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14342 than an unsigned HOST_WIDE_INT.
14343 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14344 (vect_analyze_data_ref_dependence): Change max_vf from an int *
14345 to an unsigned int *.
14346 (vect_analyze_data_ref_dependences): Likewise.
14347 (vect_compute_data_ref_alignment): Handle polynomial vf.
14348 (vect_enhance_data_refs_alignment): Likewise.
14349 (vect_prune_runtime_alias_test_list): Likewise.
14350 (vect_shift_permute_load_chain): Likewise.
14351 (vect_supportable_dr_alignment): Likewise.
14352 (dependence_distance_ge_vf): Take the vectorization factor as a
14353 poly_uint64 rather than an unsigned HOST_WIDE_INT.
14354 (vect_analyze_data_refs): Change min_vf from an int * to a
14356 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14357 vfm1 as a poly_uint64 rather than an int. Make the same change
14358 for the returned bound_scalar.
14359 (vect_gen_vector_loop_niters): Handle polynomial vf.
14360 (vect_do_peeling): Likewise. Update call to
14361 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14362 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14364 * tree-vect-loop.c (vect_determine_vectorization_factor)
14365 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14366 (vect_get_known_peeling_cost): Likewise.
14367 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14368 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14369 (vect_transform_loop): Likewise. Use the lowest possible VF when
14370 updating the upper bounds of the loop.
14371 (vect_min_worthwhile_factor): Make static. Return an unsigned int
14372 rather than an int.
14373 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14374 polynomial unroll factors.
14375 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14376 (vect_make_slp_decision): Likewise.
14377 (vect_supported_load_permutation_p): Likewise, and polynomial
14379 (vect_analyze_slp_cost): Handle polynomial vf.
14380 (vect_slp_analyze_node_operations): Likewise.
14381 (vect_slp_analyze_bb_1): Likewise.
14382 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14383 than an unsigned HOST_WIDE_INT.
14384 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14385 (vectorizable_load): Handle polynomial vf.
14386 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14388 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14391 Alan Hayward <alan.hayward@arm.com>
14392 David Sherwood <david.sherwood@arm.com>
14394 * match.pd: Handle bit operations involving three constants
14395 and try to fold one pair.
14397 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14399 * tree-vect-loop-manip.c: Include gimple-fold.h.
14400 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14401 niters_maybe_zero parameters. Handle other cases besides a step of 1.
14402 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14403 Add a path that uses a step of VF instead of 1, but disable it
14405 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14406 and niters_no_overflow parameters. Update calls to
14407 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14408 Create a new SSA name if the latter choses to use a ste other
14409 than zero, and return it via niters_vector_mult_vf_var.
14410 * tree-vect-loop.c (vect_transform_loop): Update calls to
14411 vect_do_peeling, vect_gen_vector_loop_niters and
14412 slpeel_make_loop_iterate_ntimes.
14413 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14414 (vect_gen_vector_loop_niters): Update declarations after above changes.
14416 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
14418 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14419 128-bit round to integer instructions.
14420 (ceil<mode>2): Likewise.
14421 (btrunc<mode>2): Likewise.
14422 (round<mode>2): Likewise.
14424 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14426 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14427 unaligned VSX load/store on P8/P9.
14428 (expand_block_clear): Allow the use of unaligned VSX
14429 load/store on P8/P9.
14431 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14433 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14435 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14436 swap associated with both a load and a store.
14438 2018-01-02 Andrew Waterman <andrew@sifive.com>
14440 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14441 * config/riscv/riscv.md (clear_cache): Use it.
14443 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
14445 * web.c: Remove out-of-date comment.
14447 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14449 * expr.c (fixup_args_size_notes): Check that any existing
14450 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14451 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14452 (emit_single_push_insn): ...here.
14454 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14456 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14457 (const_vector_encoded_nelts): New function.
14458 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14459 (const_vector_int_elt, const_vector_elt): Declare.
14460 * emit-rtl.c (const_vector_int_elt_1): New function.
14461 (const_vector_elt): Likewise.
14462 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14463 of CONST_VECTOR_ELT.
14465 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14467 * expr.c: Include rtx-vector-builder.h.
14468 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14469 directly on the tree encoding.
14470 (const_vector_from_tree): Likewise.
14471 * optabs.c: Include rtx-vector-builder.h.
14472 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14473 sequence of "u" values.
14474 * vec-perm-indices.c: Include rtx-vector-builder.h.
14475 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14476 directly on the vec_perm_indices encoding.
14478 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14480 * doc/rtl.texi (const_vector): Describe new encoding scheme.
14481 * Makefile.in (OBJS): Add rtx-vector-builder.o.
14482 * rtx-vector-builder.h: New file.
14483 * rtx-vector-builder.c: Likewise.
14484 * rtl.h (rtx_def::u2): Add a const_vector field.
14485 (CONST_VECTOR_NPATTERNS): New macro.
14486 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14487 (CONST_VECTOR_DUPLICATE_P): Likewise.
14488 (CONST_VECTOR_STEPPED_P): Likewise.
14489 (CONST_VECTOR_ENCODED_ELT): Likewise.
14490 (const_vec_duplicate_p): Check for a duplicated vector encoding.
14491 (unwrap_const_vec_duplicate): Likewise.
14492 (const_vec_series_p): Check for a non-duplicated vector encoding.
14493 Say that the function only returns true for integer vectors.
14494 * emit-rtl.c: Include rtx-vector-builder.h.
14495 (gen_const_vec_duplicate_1): Delete.
14496 (gen_const_vector): Call gen_const_vec_duplicate instead of
14497 gen_const_vec_duplicate_1.
14498 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14499 (gen_const_vec_duplicate): Use rtx_vector_builder.
14500 (gen_const_vec_series): Likewise.
14501 (gen_rtx_CONST_VECTOR): Likewise.
14502 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14503 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14504 Build a new vector rather than modifying a CONST_VECTOR in-place.
14505 (handle_special_swappables): Update call accordingly.
14506 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14507 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14508 Build a new vector rather than modifying a CONST_VECTOR in-place.
14509 (handle_special_swappables): Update call accordingly.
14511 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14513 * simplify-rtx.c (simplify_const_binary_operation): Use
14514 CONST_VECTOR_ELT instead of XVECEXP.
14516 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14518 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14519 the selector elements to be different from the data elements
14520 if the selector is a VECTOR_CST.
14521 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14522 ssizetype for the selector.
14524 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14526 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14527 before testing each element individually.
14528 * tree-vect-generic.c (lower_vec_perm): Likewise.
14530 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14532 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14533 * selftest-run-tests.c (selftest::run_tests): Call it.
14534 * vector-builder.h (vector_builder::operator ==): New function.
14535 (vector_builder::operator !=): Likewise.
14536 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14537 (vec_perm_indices::all_from_input_p): New function.
14538 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14539 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14540 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14541 instead of reading the VECTOR_CST directly. Detect whether both
14542 vector inputs are the same before constructing the vec_perm_indices,
14543 and update the number of inputs argument accordingly. Use the
14544 utility functions added above. Only construct sel2 if we need to.
14546 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14548 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14549 the broadcast of the low byte.
14550 (expand_mult_highpart): Use an explicit encoding for the permutes.
14551 * optabs-query.c (can_mult_highpart_p): Likewise.
14552 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14553 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14554 (vectorizable_bswap): Likewise.
14555 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14556 explicit encoding for the power-of-2 permutes.
14557 (vect_permute_store_chain): Likewise.
14558 (vect_grouped_load_supported): Likewise.
14559 (vect_permute_load_chain): Likewise.
14561 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14563 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14564 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14565 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14566 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14567 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14568 (vect_gen_perm_mask_any): Likewise.
14570 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14572 * int-vector-builder.h: New file.
14573 * vec-perm-indices.h: Include int-vector-builder.h.
14574 (vec_perm_indices): Redefine as an int_vector_builder.
14575 (auto_vec_perm_indices): Delete.
14576 (vec_perm_builder): Redefine as a stand-alone class.
14577 (vec_perm_indices::vec_perm_indices): New function.
14578 (vec_perm_indices::clamp): Likewise.
14579 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14580 (vec_perm_indices::new_vector): New function.
14581 (vec_perm_indices::new_expanded_vector): Update for new
14582 vec_perm_indices class.
14583 (vec_perm_indices::rotate_inputs): New function.
14584 (vec_perm_indices::all_in_range_p): Operate directly on the
14585 encoded form, without computing elided elements.
14586 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14587 encoding. Update for new vec_perm_indices class.
14588 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14589 the given vec_perm_builder.
14590 (expand_vec_perm_var): Update vec_perm_builder constructor.
14591 (expand_mult_highpart): Use vec_perm_builder instead of
14592 auto_vec_perm_indices.
14593 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14594 vec_perm_indices instead of auto_vec_perm_indices. Use a single
14595 or double series encoding as appropriate.
14596 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14597 vec_perm_indices instead of auto_vec_perm_indices.
14598 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14599 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14600 (vect_permute_store_chain): Likewise.
14601 (vect_grouped_load_supported): Likewise.
14602 (vect_permute_load_chain): Likewise.
14603 (vect_shift_permute_load_chain): Likewise.
14604 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14605 (vect_transform_slp_perm_load): Likewise.
14606 (vect_schedule_slp_instance): Likewise.
14607 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14608 (vectorizable_mask_load_store): Likewise.
14609 (vectorizable_bswap): Likewise.
14610 (vectorizable_store): Likewise.
14611 (vectorizable_load): Likewise.
14612 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14613 vec_perm_indices instead of auto_vec_perm_indices. Use
14614 tree_to_vec_perm_builder to read the vector from a tree.
14615 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14616 vec_perm_builder instead of a vec_perm_indices.
14617 (have_whole_vector_shift): Use vec_perm_builder and
14618 vec_perm_indices instead of auto_vec_perm_indices. Leave the
14619 truncation to calc_vec_perm_mask_for_shift.
14620 (vect_create_epilog_for_reduction): Likewise.
14621 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14622 from auto_vec_perm_indices to vec_perm_indices.
14623 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14624 instead of changing individual elements.
14625 (aarch64_vectorize_vec_perm_const): Use new_vector to install
14626 the vector in d.perm.
14627 * config/arm/arm.c (expand_vec_perm_d::perm): Change
14628 from auto_vec_perm_indices to vec_perm_indices.
14629 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14630 instead of changing individual elements.
14631 (arm_vectorize_vec_perm_const): Use new_vector to install
14632 the vector in d.perm.
14633 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14634 Update vec_perm_builder constructor.
14635 (rs6000_expand_interleave): Likewise.
14636 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14637 (rs6000_expand_interleave): Likewise.
14639 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14641 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14642 to qimode could truncate the indices.
14643 * optabs.c (expand_vec_perm_var): Likewise.
14645 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14647 * Makefile.in (OBJS): Add vec-perm-indices.o.
14648 * vec-perm-indices.h: New file.
14649 * vec-perm-indices.c: Likewise.
14650 * target.h (vec_perm_indices): Replace with a forward class
14652 (auto_vec_perm_indices): Move to vec-perm-indices.h.
14653 * optabs.h: Include vec-perm-indices.h.
14654 (expand_vec_perm): Delete.
14655 (selector_fits_mode_p, expand_vec_perm_var): Declare.
14656 (expand_vec_perm_const): Declare.
14657 * target.def (vec_perm_const_ok): Replace with...
14658 (vec_perm_const): ...this new hook.
14659 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14660 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14661 * doc/tm.texi: Regenerate.
14662 * optabs.def (vec_perm_const): Delete.
14663 * doc/md.texi (vec_perm_const): Likewise.
14664 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14665 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14666 expand_vec_perm for constant permutation vectors. Assert that
14667 the mode of variable permutation vectors is the integer equivalent
14668 of the mode that is being permuted.
14669 * optabs-query.h (selector_fits_mode_p): Declare.
14670 * optabs-query.c: Include vec-perm-indices.h.
14671 (selector_fits_mode_p): New function.
14672 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14673 is defined, instead of checking whether the vec_perm_const_optab
14674 exists. Use targetm.vectorize.vec_perm_const instead of
14675 targetm.vectorize.vec_perm_const_ok. Check whether the indices
14676 fit in the vector mode before using a variable permute.
14677 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14678 vec_perm_indices instead of an rtx.
14679 (expand_vec_perm): Replace with...
14680 (expand_vec_perm_const): ...this new function. Take the selector
14681 as a vec_perm_indices rather than an rtx. Also take the mode of
14682 the selector. Update call to shift_amt_for_vec_perm_mask.
14683 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14684 Use vec_perm_indices::new_expanded_vector to expand the original
14685 selector into bytes. Check whether the indices fit in the vector
14686 mode before using a variable permute.
14687 (expand_vec_perm_var): Make global.
14688 (expand_mult_highpart): Use expand_vec_perm_const.
14689 * fold-const.c: Includes vec-perm-indices.h.
14690 * tree-ssa-forwprop.c: Likewise.
14691 * tree-vect-data-refs.c: Likewise.
14692 * tree-vect-generic.c: Likewise.
14693 * tree-vect-loop.c: Likewise.
14694 * tree-vect-slp.c: Likewise.
14695 * tree-vect-stmts.c: Likewise.
14696 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14698 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14699 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14700 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14701 (aarch64_vectorize_vec_perm_const): ...this new function.
14702 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14703 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14704 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14705 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14706 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14707 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14708 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14710 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
14711 check for NEON modes.
14712 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14713 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14714 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14715 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14717 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
14718 the old VEC_PERM_CONST conditions.
14719 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14720 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14721 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14722 (ia64_vectorize_vec_perm_const_ok): Merge into...
14723 (ia64_vectorize_vec_perm_const): ...this new function.
14724 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14725 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14726 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14727 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14728 * config/mips/mips.c (mips_expand_vec_perm_const)
14729 (mips_vectorize_vec_perm_const_ok): Merge into...
14730 (mips_vectorize_vec_perm_const): ...this new function.
14731 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14732 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14733 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14734 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14735 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14736 (rs6000_expand_vec_perm_const): Delete.
14737 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14739 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14740 (altivec_expand_vec_perm_const_le): Take each operand individually.
14741 Operate on constant selectors rather than rtxes.
14742 (altivec_expand_vec_perm_const): Likewise. Update call to
14743 altivec_expand_vec_perm_const_le.
14744 (rs6000_expand_vec_perm_const): Delete.
14745 (rs6000_vectorize_vec_perm_const_ok): Delete.
14746 (rs6000_vectorize_vec_perm_const): New function.
14747 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14748 an element count and rtx array.
14749 (rs6000_expand_extract_even): Update call accordingly.
14750 (rs6000_expand_interleave): Likewise.
14751 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14752 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14753 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14754 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14755 (rs6000_expand_vec_perm_const): Delete.
14756 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14757 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14758 (altivec_expand_vec_perm_const_le): Take each operand individually.
14759 Operate on constant selectors rather than rtxes.
14760 (altivec_expand_vec_perm_const): Likewise. Update call to
14761 altivec_expand_vec_perm_const_le.
14762 (rs6000_expand_vec_perm_const): Delete.
14763 (rs6000_vectorize_vec_perm_const_ok): Delete.
14764 (rs6000_vectorize_vec_perm_const): New function. Remove stray
14765 reference to the SPE evmerge intructions.
14766 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14767 an element count and rtx array.
14768 (rs6000_expand_extract_even): Update call accordingly.
14769 (rs6000_expand_interleave): Likewise.
14770 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14771 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14773 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14775 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14777 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14778 vector mode and that that mode matches the mode of the data
14780 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14781 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
14782 directly using expand_vec_perm_1 when forcing selectors into
14784 (expand_vec_perm_var): New function, split out from expand_vec_perm.
14786 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14788 * optabs-query.h (can_vec_perm_p): Delete.
14789 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14790 * optabs-query.c (can_vec_perm_p): Split into...
14791 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14792 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14793 particular selector is valid.
14794 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14795 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14796 (vect_grouped_load_supported): Likewise.
14797 (vect_shift_permute_load_chain): Likewise.
14798 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14799 (vect_transform_slp_perm_load): Likewise.
14800 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14801 (vectorizable_bswap): Likewise.
14802 (vect_gen_perm_mask_checked): Likewise.
14803 * fold-const.c (fold_ternary_loc): Likewise. Don't take
14804 implementations of variable permutation vectors into account
14805 when deciding which selector to use.
14806 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14807 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14808 with a false third argument.
14809 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14810 to test whether the constant selector is valid and can_vec_perm_var_p
14811 to test whether a variable selector is valid.
14813 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14815 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14816 * optabs-query.c (can_vec_perm_p): Likewise.
14817 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14818 instead of vec_perm_indices.
14819 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14820 (vect_gen_perm_mask_checked): Likewise,
14821 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14822 (vect_gen_perm_mask_checked): Likewise,
14824 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14826 * optabs-query.h (qimode_for_vec_perm): Declare.
14827 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14828 (qimode_for_vec_perm): ...this new function.
14829 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14831 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14833 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14834 does not have a conditional at the top.
14836 2018-01-02 Richard Biener <rguenther@suse.de>
14838 * ipa-inline.c (big_speedup_p): Fix expression.
14840 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
14843 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14846 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
14850 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14851 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14852 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14853 cond_taken_branch_cost 3->4.
14855 2018-01-01 Jakub Jelinek <jakub@redhat.com>
14857 PR tree-optimization/83581
14858 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14859 TODO_cleanup_cfg if any changes have been made.
14861 PR middle-end/83608
14862 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14863 convert_modes if target mode has the right side, but different mode
14866 PR middle-end/83609
14867 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14868 last argument when extracting from CONCAT. If either from_real or
14869 from_imag is NULL, use expansion through memory. If result is not
14870 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14871 the parts directly to inner mode, if even that fails, use expansion
14874 PR middle-end/83623
14875 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14876 check for bswap in mode rather than HImode and use that in expand_unop
14879 Copyright (C) 2018 Free Software Foundation, Inc.
14881 Copying and distribution of this file, with or without modification,
14882 are permitted in any medium without royalty provided the copyright
14883 notice and this notice are preserved.