* doc/invoke.texi (-flinker-output): Document
[gcc.git] / gcc / ChangeLog
1 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
2
3 * doc/invoke.texi (-flinker-output): Document
4
5 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
6
7 * passes.c (ipa_write_summaries): Only modify statements if body
8 is in memory.
9 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
10 incrementally linking.
11 (ipa_passes): Likewise.
12 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13 pass down resolution info.
14 * common.opt (flag_incremental_link): Update info.
15 * gcc.c (plugin specs): Turn flinker-output=* to
16 -plugin-opt=-linker-output-known
17 * toplev.c (compile_file): Also cut compilation when doing incremental
18 link.
19 * flag-types. (enum lto_partition_model): Add
20 LTO_LINKER_OUTPUT_NOLTOREL.
21 (invoke.texi): Add -flinker-output docs.
22 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
23 link same way as WPA; do not stream in dead initializers.
24
25 * dwarf2out.c (dwarf2out_die_ref_for_decl,
26 darf2out_register_external_decl): Support incremental link.
27
28 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
29
30 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
31
32 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
33
34 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
35 it down to simple_object_copy_lto_debug_sections.
36 (run_gcc): Determine incremental LTO link time and configure
37 lto1 into non-wpa mode, disable renaming of debug sections.
38
39 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
40
41 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
42 descriptions of various incorrectly documented functions.
43
44 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
45
46 Revert:
47 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
48 address check not strict.
49
50 2018-05-30 Richard Biener <rguenther@suse.de>
51
52 PR tree-optimization/85964
53 * tracer.c (better_p): Drop initialized count check, we only
54 call the function with initialized counts now.
55 (find_best_successor): Do find a best edge if one
56 has uninitialized count.
57 (find_best_predecessor): Likewise. Do BB frequency check only
58 if count is initialized.
59
60 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
61
62 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
63 (aarch64_ldrstr_offset_compare): New.
64 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
65 load/store orderings.
66 (aarch64_gen_adjusted_ldpstp): Likewise.
67
68 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
69
70 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
71 Check for subset of GENERAL_REGS and FP_REGS.
72 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
73 r=w alternative.
74
75 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
76
77 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
78 and wi::to_poly_offset. Add the current offset and then check
79 whether the sum fits, rather than using an unchecked addition of
80 a checked term. Check for a shwi rather than a uhwi.
81 * expr.c (get_bit_range): Use tree_to_poly_uint64.
82 (store_constructor): Use poly_int_tree_p.
83 (expand_expr_real_1): Likewise.
84 * function.c (assign_temp): Likewise.
85 * fold-const.c (const_binop): Use poly_int_tree_p and
86 wi::to_poly_offset.
87 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
88 division.
89 * ipa-icf-gimple.c (func_checker::compare_operand): Use
90 to_poly_offset for MEM offsets.
91 * ipa-icf.c (sem_variable::equals): Likewise.
92 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
93 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
94 wi::to_poly_offset for BIT_FIELD_REF offsets.
95 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
96 wi::to_poly_offset.
97 * var-tracking.c (emit_note_insn_var_location): Use
98 tree_to_poly_uint64.
99
100 2018-05-29 Jim Wilson <jimw@sifive.com>
101
102 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
103
104 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
105
106 PR target/85950
107 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
108 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
109 sequence.
110 (sse4_1_round<mode>2): Use nonimmediate_operand
111 for operand 1 predicate.
112
113 2018-05-29 Martin Sebor <msebor@redhat.com>
114 Richard Biener <rguenther@suse.de>
115
116 PR testsuite/85888
117 * calls.c (get_size_range): Call determine_value_range instead
118 of get_value_range..
119 * tree-vrp.h (determine_value_range): Declared new function.
120 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
121
122 2018-05-29 Richard Biener <rguenther@suse.de>
123
124 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
125 sure to use non-pattern stmts for get_earlier_stmt arguments.
126 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
127 called on pattern stmts.
128 (get_later_stmt): Likewise.
129
130 2018-05-29 Martin Liska <mliska@suse.cz>
131
132 PR gcov-profile/85759
133 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
134 env variables.
135
136 2018-05-29 Jakub Jelinek <jakub@redhat.com>
137
138 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
139 VEC_UNPACK_*_EXPR.
140 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
141 VEC_PACK_*_EXPR.
142
143 PR target/85918
144 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
145 VEC_PACK_FLOAT_EXPR): New tree codes.
146 * tree-pretty-print.c (op_code_prio): Handle
147 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
148 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
149 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
150 * tree-inline.c (estimate_operator_cost): Likewise.
151 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
152 * fold-const.c (const_binop): Likewise.
153 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
154 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
155 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
156 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
157 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
158 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
159 * expr.c (expand_expr_real_2): Likewise.
160 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
161 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
162 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
163 optabs.
164 * optabs.c (expand_widen_pattern_expr): For
165 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
166 sign from result type rather than operand's type.
167 (expand_binop_directly): For vec_packu_float_optab and
168 vec_packs_float_optab allow result type to be different from operand's
169 type.
170 * optabs-tree.c (optab_for_tree_code): Handle
171 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
172 VEC_PACK_FLOAT_EXPR. Formatting fixes.
173 * tree-vect-generic.c (expand_vector_operations_1): Handle
174 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
175 VEC_PACK_FLOAT_EXPR.
176 * tree-vect-stmts.c (supportable_widening_operation): Handle
177 FIX_TRUNC_EXPR.
178 (supportable_narrowing_operation): Handle FLOAT_EXPR.
179 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
180 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
181 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
182 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
183 mode attributes.
184 (vec_pack<floatprefix>_float_<mode>): New expander.
185 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
186 attributes.
187 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
188 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
189 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
190 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
191 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
192 Document.
193 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
194 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
195 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
196 VEC_PACK_FLOAT_EXPR): Document.
197
198 2018-05-29 Richard Biener <rguenther@suse.de>
199
200 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
201 member.
202 (stmt_vec_info_vec): Make pointer.
203 (init_stmt_vec_info_vec): Remove.
204 (free_stmt_vec_info_vec): Likewise.
205 (set_stmt_vec_info_vec): New function.
206 (free_stmt_vec_infos): Likewise.
207 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
208 (set_vinfo_for_stmt): Likewise.
209 (get_earlier_stmt): Likewise.
210 (get_later_stmt): Likewise.
211 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
212 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
213 (vec_info::~vec_info): Free stmt_vec_infos.
214 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
215 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
216 (pass_slp_vectorize::execute): Likewise.
217 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
218 (free_stmt_vec_info_vec): Likewise.
219 (set_stmt_vec_info_vec): New function.
220 (free_stmt_vec_infos): Likewise.
221 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
222 the global stmt_vec_info_vec.
223 * tree-parloops.c (gather_scalar_reductions): Use
224 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
225 vector.
226
227 2018-05-29 Richard Biener <rguenther@suse.de>
228
229 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
230
231 2018-05-29 Martin Liska <mliska@suse.cz>
232 David Malcolm <dmalcolm@redhat.com>
233
234 * vec.c (test_reverse): New.
235 (vec_c_tests): Add new test.
236 * vec.h (vl_ptr>::reverse): New function.
237
238 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
239
240 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
241
242 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
243 and later.
244
245 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
246
247 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
248
249 2018-05-28 Richard Biener <rguenther@suse.de>
250
251 PR tree-optimization/85933
252 * tree-vect-data-refs.c (vect_record_base_alignments): Only
253 look at stmts marked as vectorizable.
254
255 2018-05-28 Richard Biener <rguenther@suse.de>
256
257 PR tree-optimization/85934
258 * tree-vect-generic.c (expand_vector_operations_1): Hoist
259 vector boolean check before scalar optimization.
260
261 2018-05-28 Jakub Jelinek <jakub@redhat.com>
262
263 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
264 for armv5te.
265
266 2018-05-28 Mark Wielaard <mark@klomp.org>
267
268 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
269 if it is an expression containing a minus sign.
270
271 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
272
273 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
274
275 2018-05-27 Paul Koning <ni1d@arrl.net>
276
277 * config/pdp11/pdp11.md (truncsihi2): Remove.
278
279 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
280 Chung-Ju Wu <jasonwucj@gmail.com>
281
282 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
283 implementation.
284 (unaligned_store_dw): Ditto.
285 * config/nds32/nds32-memory-manipulation.c
286 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
287 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
288 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
289 (emit_setmem_word_loop): Rename to ...
290 (emit_setmem_doubleword_loop): ... this.
291 (nds32_gen_dup_4_byte_to_word_value): New function.
292 (nds32_gen_dup_8_byte_to_double_word_value): New function.
293 (nds32_expand_setmem_loop): Refine implementation.
294 (nds32_expand_setmem_loop_v3m): Ditto.
295 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
296 pattern.
297
298 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
299
300 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
301
302 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
303
304 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
305 (nds32_init_machine_status): Initialize machine->attr_naked_p and
306 machine->attr_no_prologue_p.
307 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
308 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
309 (nds32_expand_epilogue): Consider attr_naked_p.
310 (nds32_expand_epilogue_v3pop): Likewise.
311 (nds32_can_use_return_insn): Likewise.
312 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
313 attr_no_prologue_p fields.
314 * config/nds32/nds32.opt (mret-in-naked-func): New option.
315
316 2018-05-27 Jakub Jelinek <jakub@redhat.com>
317
318 PR target/85918
319 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
320 attributes.
321 * config/i386/sse.md
322 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
323 Rename to ...
324 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
325 ... this.
326 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
327 Rename to ...
328 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
329 ... this.
330 (*<floatsuffix>floatv2div2sf2): Rename to ...
331 (*float<floatunssuffix>v2div2sf2): ... this.
332 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
333 (float<floatunssuffix>v2div2sf2_mask): ... this.
334 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
335 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
336 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
337 to ...
338 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
339 ... this.
340 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
341 Rename to ...
342 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
343 ... this.
344 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
345 Rename to ...
346 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
347 ... this.
348 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
349 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
350 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
351 gen_ufix_truncv8dfv8si2.
352 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
353 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
354 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
355 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
356 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
357 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
358 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
359 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
360
361 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
362
363 PR target/85900
364 PR target/85345
365 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
366
367 2018-05-25 Jim Wilson <jimw@sifive.com>
368
369 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
370 * config/riscv/riscv.c (struct machine_function): Add
371 interrupt_handler_p and attribute_checked_p fields.
372 (riscv_attribute_table): Add interrupt.
373 (riscv_interrupt_type_p): New.
374 (riscv_save_reg_p): Save extra regs for interrupt handler.
375 (riscv_use_save_libcall): Return false for interrupt handler.
376 (riscv_first_stack_step): Add forward declaration.
377 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
378 for interrupt handler with large frame. Use it for saved reg list.
379 (riscv_expand_prologue): Move flag_stack_usage_info support to
380 eliminate duplication.
381 (riscv_expand_epilogue): Generate mret for interrupt handler.
382 (riscv_epilogue_uses): New.
383 (riscv_can_use_return_insn): Return false for interrupt handler.
384 (riscv_function_ok_for_sibcall): Likewise.
385 (riscv_set_current_function): Add interrupt handler support.
386 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
387 * config/riscv/riscv.md (UNSPECV_MRET): New.
388 (GP_REGNUM): New.
389 (riscv_frflags, riscv_fsflags): Use tab after opcode.
390 (riscv_mret): New.
391 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
392
393 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
394
395 PR tree-optimization/85712
396 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
397 this candidate has already been replaced in-situ by a copy.
398
399 2018-05-25 Jason Merrill <jason@redhat.com>
400
401 PR c++/80485 - inline function non-zero address.
402 * symtab.c (nonzero_address): Check DECL_COMDAT.
403
404 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
405
406 PR target/83628
407 * config/alpha/alpha.md (ashlsi3): New insn pattern.
408 (*ashlsi_se): Rename from *ashldi_se. Define as sign
409 extension of SImode operation. Use const123_operand predicate.
410 (*saddsi_1): Remove.
411 (*saddl_se_1): Ditto.
412 (*ssubsi_1): Ditto.
413 (*ssubl_se_1): Ditto.
414 * config/alpha/predicates.md (const123_operand): New predicate.
415 * config/alpha/constraints.md (P): Use IN_RANGE.
416
417 2018-05-25 Richard Biener <rguenther@suse.de>
418
419 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
420 defaulted to true.
421 (ref_maybe_used_by_stmt_p): Likewise.
422 (stmt_may_clobber_ref_p): Likewise.
423 (stmt_may_clobber_ref_p_1): Likewise.
424 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
425 and pass it along.
426 (ref_maybe_used_by_stmt_p): Likewise.
427 (stmt_may_clobber_ref_p): Likewise.
428 (stmt_may_clobber_ref_p_1): Likewise.
429 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
430 the alias oracle to disambiguate DRs with stmts DR analysis
431 couldn't handle.
432 (vect_analyze_data_refs): Do not give up on not analyzable
433 DRs for BB vectorization. Remove code truncating the dataref
434 vector.
435
436 2018-05-25 Jakub Jelinek <jakub@redhat.com>
437
438 PR target/85832
439 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
440 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
441 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
442
443 2018-05-25 Richard Biener <rguenther@suse.de>
444
445 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
446 function, combining stmt data ref gathering and fatal analysis
447 parts.
448 (vect_analyze_data_refs): Remove now redudnant code and simplify.
449 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
450 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
451 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
452 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
453
454 2018-05-25 Bin Cheng <bin.cheng@arm.com>
455
456 PR tree-optimization/85720
457 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
458 SCC if all partitions are builtins.
459 (version_loop_by_alias_check): New parameter. Generate cancelable
460 runtime alias check if all partitions are builtins.
461 (distribute_loop): Update call to above function.
462
463 2018-05-25 Bin Cheng <bin.cheng@arm.com>
464
465 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
466 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
467 (parm_default_def_partition_arg): Ditto.
468 (set_parm_default_def_partition): Ditto.
469 (get_parm_default_def_partitions): Ditto and make it static.
470 (get_undefined_value_partitions): Ditto and make it static.
471 (remove_ssa_form): Refactor call to init_var_map here.
472 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
473 computation for loop region.
474 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
475 (register_default_def): Delete.
476 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
477 (parm_default_def_partition_arg): Ditto.
478 (set_parm_default_def_partition): Ditto.
479 (get_parm_default_def_partitions): Ditto and make it static.
480 (get_undefined_value_partitions): Ditto and make it static.
481 (coalesce_with_default, coalesce_with_default): Update comment.
482 (create_coalesce_list_for_region): New func factored out from
483 create_outofssa_var_map.
484 (populate_coalesce_list_for_outofssa): New func factored out from
485 create_outofssa_var_map and coalesce_ssa_name.
486 (create_outofssa_var_map): Delete.
487 (coalesce_ssa_name): Refactor to support live range computation.
488 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
489 (get_parm_default_def_partitions): Delete.
490 (get_undefined_value_partitions): Ditto.
491 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
492 computation for loop region.
493 (new_tree_live_info, loe_visit_block): Ditto.
494 (live_worklist, set_var_live_on_entry): Ditto.
495 (calculate_live_on_exit, verify_live_on_entry): Ditto.
496 * tree-ssa-live.h (struct _var_map): New fields.
497 (init_var_map): Change decl.
498 (region_contains_p): New.
499
500 2018-05-25 Bin Cheng <bin.cheng@arm.com>
501
502 * tree-ssa-live.h (live_merge_and_clear): Delete.
503
504 2018-05-25 Richard Biener <rguenther@suse.de>
505
506 PR c++/85912
507 * tree-dump.c (dequeue_and_dump): Remove access to removed
508 operand 2 of a SWITCH_EXPR.
509
510 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
511
512 * doc/sourcebuild.texi (vect_double_cond_arith): Include
513 multiplication and division.
514 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
515 (cond_udiv@var{m}, cond_umod@var{m}): Document.
516 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
517 (cond_udiv_optab, cond_umod_optab): New optabs.
518 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
519 (IFN_COND_RDIV): New internal functions.
520 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
521 TRUNC_MOD_EXPR and RDIV_EXPR.
522 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
523 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
524 New unspecs.
525 (SVE_INT_BINARY): Include mult.
526 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
527 (optab, sve_int_op): Handle mult.
528 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
529 UNSPEC_COND_DIV.
530 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
531 for SVE_INT_BINARY_SD.
532
533 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
534
535 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
536 (optab, sve_int_op): Handle div and udiv.
537 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
538 for SVE_INT_BINARY_SD.
539 (*<optab><mode>3): New insn for the same.
540
541 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
542
543 * tree-vect-patterns.c: Include predict.h.
544 (vect_recog_divmod_pattern): Restrict check for division support
545 to when optimizing for size.
546
547 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
548
549 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
550 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
551 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
552 (gimple_match_op::set_op): Likewise.
553 (gimple_resimplify4): Declare.
554 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
555 (expr::gen_transform): Likewise.
556 (decision_tree::gen): Generate a simplification routine for 4 operands.
557 * gimple-match-head.c (gimple_simplify): Add an overload for
558 4 operands. In the top-level function, handle up to 4 call
559 arguments and call gimple_resimplify4.
560 (gimple_resimplify4): New function.
561 (build_call_internal): Pass a fourth operand.
562 (maybe_push_to_seq): Likewise.
563 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
564 Fold VEC_COND_EXPRs of an operation and a default value into
565 an IFN_COND_* function if possible.
566 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
567 New unspecs.
568 (SVE_COND_FP_BINARY): Include them.
569 (optab, sve_fp_op): Handle them.
570 (SVE_INT_BINARY_REV): New code iterator.
571 (SVE_COND_FP_BINARY_REV): New int iterator.
572 (commutative): New int attribute.
573 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
574 Declare.
575 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
576 function.
577 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
578 (*cond_<optab><mode>): New patterns for reversed operands.
579
580 2018-05-25 Richard Biener <rguenther@suse.de>
581
582 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
583 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
584 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
585 (STMT_VINFO_GROUPED_ACCESS): Adjust.
586 * tree-vect-data-refs.c (everywhere): Adjust users.
587 * tree-vect-loop.c (everywhere): Likewise.
588 * tree-vect-slp.c (everywhere): Likewise.
589 * tree-vect-stmts.c (everywhere): Likewise.
590 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
591
592 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
593
594 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
595 Rename to...
596 (gcc_cv_as_section_exclude): ... this.
597 Try Solaris as #exclude syntax.
598 * configure: Regenerate.
599 * config.in: Regenerate.
600 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
601 SECTION_EXCLUDE.
602 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
603 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
604
605 * varasm.c (default_elf_asm_named_section): Don't check if
606 HAVE_GAS_SECTION_EXCLUDE is defined.
607
608 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
609
610 * doc/md.texi: Update the documentation of the cond_* optabs
611 to mention the new final operand. Fix GET_MODE_NUNITS call.
612 Describe the scalar case too.
613 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
614 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
615 instead of 2.
616 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
617 (get_conditional_internal_fn): Update comment.
618 * tree-vect-loop.c (vectorizable_reduction): Pass the original
619 accumulator value as a final argument to conditional functions.
620 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
621 a define_expand and add an "else" operand. Assert for now that
622 the else operand is equal to operand 2. Use SVE_INT_BINARY and
623 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
624 (*cond_<optab><mode>): New patterns.
625 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
626 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
627 (UNSPEC_COND_EOR): Delete.
628 (optab): Remove associated mappings.
629 (SVE_INT_BINARY): New code iterator.
630 (sve_int_op): Remove int attribute and add "minus" to the code
631 attribute.
632 (SVE_COND_INT_OP): Delete.
633 (SVE_COND_FP_OP): Rename to...
634 (SVE_COND_FP_BINARY): ...this.
635
636 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
637
638 * optabs.c (can_reuse_operands_p): New function.
639 (maybe_legitimize_operands): Try to reuse the results for
640 earlier operands.
641
642 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
643
644 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
645 Add {q} suffix to insn mnemonic.
646
647 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
648
649 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
650 (msp430_warn_func_return): New.
651
652 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
653
654 * fold-const.c (tree_nonzero_bits): New function.
655 * fold-const.h (tree_nonzero_bits): Likewise.
656 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
657 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
658
659 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
660
661 PR target/85900
662 PR target/85345
663 * varasm.c (assemble_alias): Check ifunc_resolver only on
664 FUNCTION_DECL.
665
666 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
667
668 PR target/85903
669 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
670 when memory input operand is handled.
671
672 2018-05-24 Luis Machado <luis.machado@linaro.org>
673
674 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
675 global.
676 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
677
678 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
679
680 * match.pd: Delay FMA folds until after vectorization.
681
682 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
683
684 PR target/83009
685 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
686 address check not strict.
687
688 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
689
690 * gimple-match.h (gimple_match_op): New class.
691 (mprts_hook): Replace parameters with a gimple_match_op *.
692 (maybe_build_generic_op): Likewise.
693 (gimple_simplified_result_is_gimple_val): Replace parameters with
694 a const gimple_match_op *.
695 (gimple_simplify): Replace code_helper * and tree * parameters with
696 a gimple_match_op * parameter.
697 (gimple_resimplify1): Replace code_helper *, tree and tree *
698 parameters with a gimple_match_op * parameter.
699 (gimple_resimplify2): Likewise.
700 (gimple_resimplify3): Likewise.
701 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
702 parameters with a gimple_match_op * parameter.
703 * gimple-match-head.c (gimple_simplify): Change prototypes of
704 auto-generated functions to take a gimple_match_op * instead of
705 separate code_helper * and tree * parameters. Make the same
706 change in the top-level overload and update calls to the
707 gimple_resimplify routines. Update calls to the auto-generated
708 functions and to maybe_push_res_to_seq in the publicly-facing
709 operation-specific gimple_simplify overloads.
710 (gimple_match_op::MAX_NUM_OPS): Define.
711 (gimple_resimplify1): Replace rcode and ops with a single res_op
712 parameter. Update call to gimple_simplify.
713 (gimple_resimplify2): Likewise.
714 (gimple_resimplify3): Likewise.
715 (mprts_hook): Replace parameters with a gimple_match_op *.
716 (maybe_build_generic_op): Likewise.
717 (build_call_internal): Replace type, nargs and ops with
718 a gimple_match_op *.
719 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
720 with a single gimple_match_op *. Update calls to mprts_hook,
721 build_call_internal and gimple_simplified_result_is_gimple_val.
722 Factor out code that is common to the tree_code and combined_fn cases.
723 * genmatch.c (expr::gen_transform): Replace tem_code and
724 tem_ops with a gimple_match_op called tem_op. Update calls
725 to the gimple_resimplify functions and maybe_push_res_to_seq.
726 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
727 res_ops. Update call to the gimple_resimplify functions.
728 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
729 (decision_tree::gen): Make the functions take a gimple_match_op *
730 called res_op instead of separate res_code and res_ops parameters.
731 Update call accordingly.
732 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
733 and ops with a single res_op parameter. Update calls to
734 maybe_build_generic_op and maybe_push_res_to_seq.
735 (fold_stmt_1): Update calls to gimple_simplify and
736 replace_stmt_with_simplification.
737 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
738 and gimple_simplified_result_is_gimple_val.
739 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
740 gimple_simplify.
741 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
742 with a gimple_match_op *.
743 (vn_nary_build_or_lookup): Likewise. Update call to
744 vn_nary_build_or_lookup_1.
745 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
746 gimple_match_op *. Update calls to the gimple_resimplify routines
747 and to gimple_simplified_result_is_gimple_val.
748 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
749 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
750 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
751 (visit_nary_op): Likewise.
752 (visit_reference_op_load): Likewise.
753
754 2018-05-23 Luis Machado <luis.machado@linaro.org>
755
756 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
757 modifier for printing the step amount.
758
759 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
760
761 PR target/78849
762 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
763 types.
764
765 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
766
767 * doc/sourcebuild.texi (Endianness): New subsubsection.
768
769 2018-05-23 Luis Machado <luis.machado@linaro.org>
770
771 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
772 <prefetch_dynamic_strides>: New const bool field.
773 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
774 prefetch_dynamic_strides.
775 (exynosm1_prefetch_tune): Likewise.
776 (thunderxt88_prefetch_tune): Likewise.
777 (thunderx_prefetch_tune): Likewise.
778 (thunderx2t99_prefetch_tune): Likewise.
779 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
780 false.
781 (aarch64_override_options_internal): Update to set
782 PARAM_PREFETCH_DYNAMIC_STRIDES.
783 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
784 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
785 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
786 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
787 prefetch-dynamic-strides setting.
788
789 2018-05-23 Luis Machado <luis.machado@linaro.org>
790
791 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
792 <minimum_stride>: New const int field.
793 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
794 minimum_stride field defaulting to -1.
795 (exynosm1_prefetch_tune): Likewise.
796 (thunderxt88_prefetch_tune): Likewise.
797 (thunderx_prefetch_tune): Likewise.
798 (thunderx2t99_prefetch_tune): Likewise.
799 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
800 <default_opt_level>: Set to 3.
801 (aarch64_override_options_internal): Update to set
802 PARAM_PREFETCH_MINIMUM_STRIDE.
803 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
804 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
805 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
806 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
807 stride is constant and is below the minimum stride threshold.
808
809 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
810
811 * config/arm/arm-cpus.in (mode26): Delete.
812 (armv4): Delete mode26 reference.
813 * config/arm/arm.c (arm_configure_build_target): Delete use of
814 isa_bit_mode26.
815
816 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
817
818 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
819 New insn pattern.
820 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
821 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
822 for non-SSE modes.
823 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
824 (floatunsdidf2): Ditto.
825
826 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
827
828 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
829 (fixuns_trunc<mode>si2_avx512f): Ditto.
830 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
831 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
832 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
833
834 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
835
836 PR rtl-optimization/79985
837 * df-scan.c (df_insn_refs_collect): Remove special case for
838 global registers and asm statements.
839
840 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
841
842 * extend.texi (Global Register Variables): Rewrite the bullet list.
843 Note that the register is available for allocation. Note that access
844 via inline asm must use constraints. Add note about async-signal
845 handlers. Remove paragraph about automagic register selection.
846
847 2018-05-23 Richard Biener <rguenther@suse.de>
848
849 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
850 of fixed offset from memset VN.
851
852 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
853
854 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
855 first_interp field.
856 (alloc_cand_and_find_basis): Initialize first_interp field.
857 (slsr_process_mul): Modify first_interp field.
858 (slsr_process_add): Likewise.
859 (slsr_process_cast): Modify first_interp field for each new
860 interpretation.
861 (slsr_process_copy): Likewise.
862 (dump_candidate): Dump first_interp field.
863 (replace_mult_candidate): Process all interpretations, not just
864 subsequent ones.
865 (replace_rhs_if_not_dup): Likewise.
866 (replace_one_candidate): Likewise.
867
868 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
869
870 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
871 Add new boolean.
872 (aarch64_needs_frame_chain): New function.
873 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
874
875 2018-05-23 Sudakshina Das <sudi.das@arm.com>
876
877 PR target/84882
878 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
879 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
880 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
881 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
882 as true for strict-align.
883 (aarch64_can_inline_p): Perform checks even when callee has no
884 attributes to check for strict alignment.
885 * doc/extend.texi (AArch64 Function Attributes): Document
886 no-strict-align.
887 * doc/invoke.texi: (AArch64 Options): Likewise.
888
889 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
890
891 PR tree-optimization/85853
892 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
893 the handling of the root of the node to...
894 (vect_slp_analyze_node_operations_1): ...this new function,
895 and run the whole thing with the child nodes' def types
896 set according to their SLP node's def type.
897
898 2018-05-23 Richard Biener <rguenther@suse.de>
899
900 PR middle-end/85874
901 * tree-data-ref.c (create_runtime_alias_checks): Defer
902 and ignore overflow warnings.
903
904 2018-05-23 Yury Gribov <tetra2005@gmail.com>
905
906 PR tree-optimization/85822
907 * tree-vrp.c (is_masked_range_test): Fix handling of negative
908 constants.
909
910 2018-05-23 Richard Biener <rguenther@suse.de>
911
912 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
913 memset constants via native_interpret_expr.
914
915 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
916
917 PR target/85345
918 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
919 attribute.
920 (cgraph_node::create_alias): Likewise.
921 (cgraph_node::get_availability): Check ifunc_resolver instead
922 of looking up ifunc attribute.
923 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
924 * varasm.c (do_assemble_alias): Likewise.
925 (assemble_alias): Likewise.
926 (default_binds_local_p_3): Likewise.
927 * cgraph.h (cgraph_node): Add ifunc_resolver.
928 (cgraph_node::only_called_directly_or_aliased_p): Return false
929 for IFUNC resolver.
930 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
931 attribute.
932 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
933 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
934 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
935 instead of looking up ifunc attribute.
936
937 2018-05-22 Luis Machado <luis.machado@linaro.org>
938
939 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
940
941 2018-05-22 Martin Sebor <msebor@redhat.com>
942
943 PR middle-end/85359
944 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
945 only when expasion succeeds.
946 (expand_builtin_strcmp): Same.
947 (expand_builtin_strncmp): Same.
948
949 2018-05-22 Martin Sebor <msebor@redhat.com>
950
951 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
952
953 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
954 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
955
956 * config/aarch64/aarch64-ldpstp.md: Replace uses of
957 aarch64_mem_pair_operand with memory_operand and delete operand swapping
958 code.
959 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
960 Add check for legitimate_address.
961 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
962 (aarch64_swap_ldrstr_operands): New.
963 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
964 Define prototype.
965
966 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
967 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
968
969 * config/aarch64/aarch64.md: New patterns to generate stp
970 and ldp.
971 (store_pair_sw, store_pair_dw): New patterns to generate stp for
972 single words and double words.
973 (load_pair_sw, load_pair_dw): Likewise.
974 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
975 Delete.
976 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
977 Delete.
978 * config/aarch64/aarch64-ldpstp.md: Modify peephole
979 for different mode ldpstp and add peephole for merged zero stores.
980 Likewise for loads.
981 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
982 Add size check.
983 (aarch64_gen_store_pair): Rename calls to match new patterns.
984 (aarch64_gen_load_pair): Rename calls to match new patterns.
985 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
986 (load_pair<DREG:mode><DREG2:mode>): ... This.
987 (store_pair<mode>): Rename to...
988 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
989 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
990 New mode iterators.
991 (V_INT_EQUIV): Handle SImode.
992 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
993 New predicate.
994
995 2018-05-22 Martin Sebor <msebor@redhat.com>
996
997 PR c/85623
998 * calls.c (maybe_warn_nonstring_arg): Use string length to set
999 or ajust the presumed bound on an operation to avoid unnecessary
1000 warnings.
1001
1002 2018-05-22 Martin Sebor <msebor@redhat.com>
1003
1004 PR tree-optimization/85826
1005 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
1006 assuming that a DECL necesarily has a constant size.
1007
1008 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
1009
1010 PR middle-end/85862
1011 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
1012
1013 2018-05-22 Richard Biener <rguenther@suse.de>
1014
1015 PR tree-optimization/85834
1016 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
1017 non-constant and non-zero memset arguments.
1018
1019 2018-05-22 Martin Liska <mliska@suse.cz>
1020
1021 PR ipa/85607
1022 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
1023
1024 2018-05-22 Richard Biener <rguenther@suse.de>
1025
1026 PR tree-optimization/85863
1027 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
1028 comparisons when vectype is specified.
1029 (vectorizable_condition): Do not specify vectype for
1030 vect_is_simple_cond when SLP vectorizing.
1031
1032 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
1033
1034 PR target/85657
1035 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
1036 define __ibm128 as long double.
1037 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
1038 as a distinct type when IEEE 128-bit support is enabled.
1039 (init_float128_ieee): Fix up conversions between IFmode and IEEE
1040 128-bit types to use the correct functions.
1041 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
1042 convert between 128-bit floating point types that have different
1043 modes but the same representation, instead of using gen_lowpart to
1044 makean alias.
1045 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
1046 KFmode.
1047 (IFKF_reg): New attributes to give the register constraints for
1048 IFmode and KFmode.
1049 (extend<mode>tf2_internal): New insns to mark an explicit
1050 conversion between 128-bit floating point types that have a
1051 different mode but share the same representation.
1052
1053 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
1054
1055 PR tree-optimization/85814
1056 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
1057 a null return from get_strinfo when unsharing the next
1058 strinfo in the chain.
1059
1060 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
1061
1062 PR gcc/84923
1063 * varasm.c (weak_finish): Clean up weak_decls.
1064
1065 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1066
1067 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
1068 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
1069 UNSPEC_UADALP values.
1070 * config/aarch64/iterators.md (ABAL): New int iterator.
1071 (ABDL2): Likewise.
1072 (ADALP): Likewise.
1073 (sur): Add mappings for the above.
1074 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
1075 New define_insn.
1076 (aarch64_<sur>abal<mode>_4): Likewise.
1077 (aarch64_<sur>adalp<mode>_3): Likewise.
1078 (<sur>sadv16qi): New define_expand.
1079
1080 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
1081
1082 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
1083 (*movdf_internal): Ditto.
1084 (*rcpsf2_sse): Ditto.
1085 (*rsqrtsf2_sse): Ditto.
1086 (*sqrt<mode>2_sse): Ditto.
1087
1088 2018-05-21 Tamar Christina <tamar.christina@arm.com>
1089
1090 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
1091 eor3q<mode>4.
1092 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
1093 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
1094 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
1095 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
1096 vbcaxq_s64): New.
1097 * config/aarch64/arm_neon.h: Likewise.
1098 * config/aarch64/iterators.md (VQ_I): New.
1099
1100 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
1101
1102 * config.gcc: Add arc/t-multilib-linux to tmake_file for
1103 arc*-*-linux*.
1104 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
1105 MULTILIB_DIRNAMES
1106
1107 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
1108
1109 * config/nds32/constraints.md (S): New constraint.
1110 * config/nds32/nds32.md (call_internal): Use constraint S.
1111 (call_value_internal): Likewise.
1112 (sibcall_internal): Likewise.
1113 (sibcall_value_internal): Likewise.
1114
1115 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
1116 Chung-Ju Wu <jasonwucj@gmail.com>
1117
1118 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
1119 into consideration.
1120
1121 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
1122 Chung-Ju Wu <jasonwucj@gmail.com>
1123
1124 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
1125 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
1126 (nds32_rtx_costs_impl): Simplify.
1127 (nds32_address_cost_impl): Simplify.
1128 (nds32_init_rtx_costs): New function.
1129 (nds32_rtx_costs_speed_prefer): Likewise.
1130 (nds32_rtx_costs_size_prefer): Likewise.
1131 (nds32_address_cost_speed_prefer): Likewise.
1132 (nds32_address_cost_speed_fwprop): Likewise.
1133 (nds32_address_cost_size_prefer): Likewise.
1134 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
1135 * config/nds32/nds32.c (nds32_option_override): Use
1136 nds32_init_rtx_costs function.
1137
1138 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
1139
1140 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
1141 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
1142 (TARGET_PIPELINE_N8): Likewise.
1143 (TARGET_PIPELINE_N10): Likewise.
1144 (TARGET_PIPELINE_N13): Likewise.
1145 (TARGET_PIPELINE_GRAYWOLF): Likewise.
1146
1147 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
1148
1149 * config/nds32/nds32-fpu.md: Update copyright year.
1150
1151 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1152
1153 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
1154
1155 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1156
1157 * config/nds32/nds32.c
1158 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
1159 * config/nds32/nds32.opt (minline-asm-r15): New option.
1160
1161 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1162
1163 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
1164 MASK_HW_ABS.
1165 * config/nds32/nds32.md (abssi2): New pattern.
1166
1167 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
1168
1169 * config/i386/i386.md (rex64namesuffix): New mode attribute.
1170 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
1171 Merge insn pattern from sse_cvtsi2ss<round_name> and
1172 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
1173 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
1174 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
1175 using SWI48 mode iterator.
1176 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
1177 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
1178 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
1179 pattern from sse_cvttss2si<round_saeonly_name>
1180 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
1181 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
1182 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
1183 using SWI48 mode iterator.
1184 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
1185 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
1186 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
1187 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
1188 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
1189 using SWI48 mode iterator.
1190 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
1191 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
1192 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
1193 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
1194 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
1195 SWI48 mode iterator.
1196 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
1197 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
1198 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
1199 pattern from sse_cvttsd2si<round_saeonly_name>
1200 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
1201
1202 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1203
1204 * config/nds32/nds32-md-auxiliary.c
1205 (nds32_valid_smw_lwm_base_p): Refine.
1206 (nds32_output_smw_single_word): Refine.
1207 (nds32_output_smw_double_word): New.
1208 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
1209
1210 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1211
1212 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
1213 (nds32_output_stack_pop): Refine.
1214 (nds32_expand_unaligned_load): Refine.
1215 (nds32_expand_unaligned_store): Refine.
1216
1217 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1218 Chung-Ju Wu <jasonwucj@gmail.com>
1219
1220 * config/nds32/constants.md: Add TP_REGNUM constant.
1221 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
1222 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
1223 UNSPEC_ADD32.
1224 * config/nds32/nds32-doubleword.md: Consider flag_pic.
1225 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
1226 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
1227 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
1228 and PIC code generation.
1229 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
1230 code generation.
1231 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
1232 optimization.
1233 * config/nds32/nds32.md: Support TLS and PIC.
1234 * config/nds32/nds32.c: Support TLS and PIC.
1235 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
1236 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
1237 predicate.
1238
1239 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
1240
1241 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
1242 mode with E_ prefix.
1243
1244 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1245 Chung-Ju Wu <jasonwucj@gmail.com>
1246
1247 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
1248 * config/nds32/nds32-md-auxiliary.c
1249 (symbolic_reference_mentioned_p): New.
1250 (nds32_legitimize_ict_address): New.
1251 (nds32_expand_ict_move): New.
1252 (nds32_indirect_call_referenced_p): New.
1253 (nds32_symbol_binds_local_p): Delete.
1254 (nds32_long_call_p): Modify.
1255 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
1256 * config/nds32/nds32-protos.h
1257 (symbolic_reference_mentioned_p): Declare.
1258 (nds32_legitimize_ict_address): Declare.
1259 (nds32_expand_ict_move): Declare.
1260 (nds32_indirect_call_referenced_p): Declare.
1261 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
1262 (nds32_relax_group): Use nds32_ict_const_p as condition.
1263 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
1264 (nds32_asm_file_start): Output ict_model directive in asm code.
1265 (nds32_legitimate_address_p): Consider indirect call.
1266 (nds32_print_operand): Consider indirect call.
1267 (nds32_print_operand_address): Consider indirect call.
1268 (nds32_insert_attributes): Handle "indirect_call" attribute.
1269 (TARGET_LEGITIMATE_ADDRESS_P): Define.
1270 (TARGET_LEGITIMATE_CONSTANT_P): Define.
1271 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
1272 (TARGET_DELEGITIMIZE_ADDRESS): Define.
1273 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
1274 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
1275 (TARGET_ICT_MODEL_SMALL): Define.
1276 (TARGET_ICT_MODEL_LARGE): Define.
1277 * config/nds32/nds32.md (movsi): Consider ict model.
1278 (call, call_value): Consider ict model.
1279 (sibcall, sibcall_value): Consider ict model.
1280 * config/nds32/nds32.opt (mict-model): New option.
1281 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
1282 model.
1283
1284 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
1285 Monk Chiang <sh.chiang04@gmail.com>
1286 Jim Wilson <jimw@sifive.com>
1287
1288 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
1289 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
1290 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
1291 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
1292 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
1293 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
1294 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
1295 compute save_libcall_adjustment properly.
1296 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
1297 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
1298 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
1299 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
1300 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
1301 (ABI_SPEC): Handle mabi=ilp32e.
1302 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
1303 (RVE): Add RVE mask.
1304 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
1305 <-march>: Add rv32e as an example.
1306
1307 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
1308
1309 PR c++/82899
1310 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
1311 (intra_create_variable_infos): Handle C++ constructors.
1312
1313 2018-05-18 Martin Liska <mliska@suse.cz>
1314
1315 * passes.def: Remove a redundant pass.
1316
1317 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
1318
1319 PR bootstrap/85838
1320 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
1321
1322 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1323
1324 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
1325 (ARMv4): Update.
1326 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
1327 (ARMv6m): Update.
1328 (armv2, armv2a, armv3, armv3m): Delete architectures.
1329 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
1330 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
1331 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
1332 Delete cpus.
1333 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
1334 (*mulsidi3adddi): Likewise.
1335 (mulsidi3): Likewise.
1336 (*mulsidi3_nov6): Likewise.
1337 (umulsidi3): Likewise.
1338 (umulsidi3_nov6): Likewise.
1339 (umaddsidi4): Likewise.
1340 (*umulsidi3adddi): Likewise.
1341 (smulsi3_highpart): Likewise.
1342 (*smulsi3_highpart_nov6): Likewise.
1343 (umulsi3_highpart): Likewise.
1344 (*umulsi3_highpart_nov6): Likewise.
1345 * config/arm/arm.h (arm_arch3m): Delete.
1346 * config/arm/arm.c (arm_arch3m): Delete.
1347 (arm_option_override_internal): Update armv3-related comment.
1348 (arm_configure_build_target): Delete use of isa_bit_mode32.
1349 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
1350 (arm_rtx_costs_internal): Delete check of arm_arch3m.
1351 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
1352 (mulsa3): Likewise.
1353 (mulusa3): Likewise.
1354 * config/arm/arm-protos.h (arm_arch3m): Delete.
1355 * config/arm/arm-tables.opt: Regenerate.
1356 * config/arm/arm-tune.md: Likewise.
1357 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
1358 deleted architectures.
1359
1360 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1361
1362 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
1363 (armv5t, armv5te): New features.
1364 (ARMv5, ARMv5e): Delete fgroups.
1365 (ARMv5t, ARMv5te): Adjust for above changes.
1366 (ARMv6m): Likewise.
1367 (armv5, armv5e): Delete arches.
1368 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
1369 arm_arch5.
1370 (*call_reg_arm): Likewise.
1371 (*call_value_reg_armv5): Likewise.
1372 (*call_value_reg_arm): Likewise.
1373 (*call_symbol): Likewise.
1374 (*call_value_symbol): Likewise.
1375 (*sibcall_insn): Likewise.
1376 (*sibcall_value_insn): Likewise.
1377 (clzsi2): Likewise.
1378 (prefetch): Likewise.
1379 (define_split and define_peephole2 dependent on arm_arch5):
1380 Likewise.
1381 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
1382 arm_arch5e.
1383 (TARGET_ARM_QBIT): Likewise.
1384 (TARGET_DSP_MULTIPLY): Likewise.
1385 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
1386 (arm_arch5, arm_arch5e): Delete.
1387 (arm_arch5t, arm_arch5te): Declare.
1388 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
1389 (arm_arch5t): Declare.
1390 (arm_option_reconfigure_globals): Update for the above.
1391 (arm_options_perform_arch_sanity_checks): Update comment, replace
1392 use of arm_arch5 with arm_arch5t.
1393 (use_return_insn): Likewise.
1394 (arm_emit_call_insn): Likewise.
1395 (output_return_instruction): Likewise.
1396 (arm_final_prescan_insn): Likewise.
1397 (arm_coproc_builtin_available): Likewise.
1398 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
1399 arm_arch5e with arm_arch5t and arm_arch5te.
1400 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
1401 (arm_arch5t, arm_arch5te): Declare.
1402 * config/arm/arm-tables.opt: Regenerate.
1403 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
1404 * config/arm/t-multilib: Likewise.
1405 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
1406 instead of arm_arch5.
1407 (*call_reg_thumb1): Likewise.
1408 (*call_value_reg_thumb1_v5): Likewise.
1409 (*call_value_reg_thumb1): Likewise.
1410 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
1411 unreachable path.
1412 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
1413
1414 2018-05-18 Martin Liska <mliska@suse.cz>
1415
1416 PR gcov-profile/84846
1417 * doc/gcov.texi: Document -t option of gcov tool.
1418
1419 2018-05-18 Martin Liska <mliska@suse.cz>
1420
1421 PR gcov-profile/84846
1422 * gcov.c (print_usage): Add new -t option.
1423 (process_args): Handle the option.
1424 (generate_results): Use stdout as output when requested by
1425 the option.
1426
1427 2018-05-18 Martin Liska <mliska@suse.cz>
1428
1429 PR gcov-profile/84846
1430 * coverage.c (coverage_init): Write PWD to .gcno file.
1431 * doc/gcov.texi: Document how working directory is printed.
1432 * gcov-dump.c (dump_gcov_file): Print PWD.
1433 * gcov.c (output_intermediate_file): Likewise.
1434 (read_graph_file): Read PWD string.
1435 (output_lines): Print PWD.
1436
1437 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1438
1439 PR middle-end/85817
1440 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
1441 for retval and return false if all args to phi are zero.
1442
1443 2018-05-18 Richard Biener <rguenther@suse.de>
1444
1445 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
1446 method.
1447 (evrp_dom_walker::before_dom_children): Call it.
1448
1449 2018-05-18 Richard Biener <rguenther@suse.de>
1450
1451 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
1452 results when processing array refs with variable index.
1453
1454 2018-05-18 Toon Moene <toon@moene.org>
1455
1456 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
1457 directly after that of -floop-interchange. Indicate that both
1458 options are enabled by default when specifying -O3.
1459
1460 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1461
1462 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
1463 iterator. Delete separate integer-mode vec_set<mode> expander.
1464 (aarch64_simd_vec_setv2di): Delete.
1465 (vec_setv2di): Delete.
1466 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
1467 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
1468 the "w, r" alternative.
1469
1470 2018-05-18 Martin Liska <mliska@suse.cz>
1471
1472 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
1473 * tree-pass.h (make_pass_lower_switch_O0): New function.
1474 * tree-switch-conversion.c (node_has_low_bound): Remove.
1475 (node_has_high_bound): Likewise.
1476 (node_is_bounded): Likewise.
1477 (class pass_lower_switch): Make it a template type and create
1478 two instances.
1479 (pass_lower_switch::execute): Add template argument.
1480 (make_pass_lower_switch): New function.
1481 (make_pass_lower_switch_O0): New function.
1482 (do_jump_if_equal): Remove.
1483 (emit_case_nodes): Simplify to just handle all 3 cases and leave
1484 all the hard work to tree optimization passes.
1485
1486 2018-05-18 Martin Liska <mliska@suse.cz>
1487
1488 * dbgcnt.c (limit_low): Renamed from limit.
1489 (limit_high): New variable.
1490 (dbg_cnt_is_enabled): Check for upper limit.
1491 (dbg_cnt): Adjust dumping.
1492 (dbg_cnt_set_limit_by_index): Add new argument for high
1493 value.
1494 (dbg_cnt_set_limit_by_name): Likewise.
1495 (dbg_cnt_process_single_pair): Parse new format.
1496 (dbg_cnt_process_opt): Use strtok.
1497 (dbg_cnt_list_all_counters): Remove 'value' and add
1498 'limit_high'.
1499 * doc/invoke.texi: Document changes.
1500
1501 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
1502
1503 * doc/sourcebuild.texi (scalar_all_fma): Document.
1504 * tree.def (FMA_EXPR): Delete.
1505 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
1506 * internal-fn.c (ternary_direct): New macro.
1507 (expand_ternary_optab_fn): Likewise.
1508 (direct_ternary_optab_supported_p): Likewise.
1509 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
1510 * builtins.c (fold_builtin_fma): Delete.
1511 (fold_builtin_3): Don't call it.
1512 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
1513 * expr.c (expand_expr_real_2): Likewise.
1514 * fold-const.c (operand_equal_p): Likewise.
1515 (fold_ternary_loc): Likewise.
1516 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
1517 * gimple.c (DEFTREECODE): Likewise.
1518 * gimplify.c (gimplify_expr): Likewise.
1519 * optabs-tree.c (optab_for_tree_code): Likewise.
1520 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
1521 * tree-eh.c (operation_could_trap_p): Likewise.
1522 (stmt_could_throw_1_p): Likewise.
1523 * tree-inline.c (estimate_operator_cost): Likewise.
1524 * tree-pretty-print.c (dump_generic_node): Likewise.
1525 (op_code_prio): Likewise.
1526 * tree-ssa-loop-im.c (stmt_cost): Likewise.
1527 * tree-ssa-operands.c (get_expr_operands): Likewise.
1528 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
1529 * fold-const-call.h (fold_fma): Delete.
1530 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
1531 CFN_FNMA and CFN_FNMS.
1532 (fold_fma): Delete.
1533 * genmatch.c (combined_fn): New enum.
1534 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
1535 (commutative_op): New function.
1536 (commutate): Use it. Handle more than 2 operands.
1537 (dt_operand::gen_gimple_expr): Use commutative_op.
1538 (parser::parse_expr): Allow :c to be used with non-binary
1539 operators if the commutative operand is known.
1540 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
1541 CFN_FMS, CFN_FNMA and CFN_FNMS.
1542 (backprop::process_assign_use): Remove FMA_EXPR handling.
1543 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
1544 (gen_hsa_fma): New function.
1545 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
1546 IFN_FNMA and IFN_FNMS.
1547 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
1548 * gimple-fold.h (follow_all_ssa_edges): Declare.
1549 * gimple-fold.c (follow_all_ssa_edges): New function.
1550 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
1551 gimple_build interface and use follow_all_ssa_edges to fold the result.
1552 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
1553 instead of checking for optabs directly.
1554 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
1555 rather than FMA_EXPRs.
1556 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
1557 call to IFN_FMA instead of an FMA_EXPR.
1558
1559 2018-05-17 Jim Wilson <jimw@sifive.com>
1560
1561 * expr.c (do_tablejump): When converting index to Pmode, if we have a
1562 sign extended promoted subreg, and the range does not have the sign bit
1563 set, then do a sign extend.
1564
1565 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
1566 test, check for sign extended subreg and/or constant operands, and
1567 do a sign extend in that case.
1568
1569 2018-05-17 Steve Ellcey <sellcey@cavium.com>
1570
1571 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
1572 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
1573 Add untyped.
1574 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
1575 Change logics_shift_reg to logics_shift_imm.
1576 (thunderx2t99_fp_loadpair_basic): Delete.
1577 (thunderx2t99_fp_storepair_basic): Delete.
1578 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
1579 (thunderx2t99_asimd_polynomial): Delete.
1580 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
1581 and neon_fp_mul_d_scalar_q.
1582 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
1583 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
1584 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
1585 (thunderx2t99_asimd_lut): Add missing tbl types.
1586 (thunderx2t99_asimd_ext): Delete.
1587 (thunderx2t99_asimd_load1_1_mult): Delete.
1588 (thunderx2t99_asimd_load1_2_mult): Delete.
1589 (thunderx2t99_asimd_load1_ldp): New.
1590 (thunderx2t99_asimd_load1): New.
1591 (thunderx2t99_asimd_load2): Add missing *load2* types.
1592 (thunderx2t99_asimd_load3): New.
1593 (thunderx2t99_asimd_load4): New.
1594 (thunderx2t99_asimd_store1_1_mult): Delete.
1595 (thunderx2t99_asimd_store1_2_mult): Delete.
1596 (thunderx2t99_asimd_store2_mult): Delete.
1597 (thunderx2t99_asimd_store2_onelane): Delete.
1598 (thunderx2t99_asimd_store_stp): New.
1599 (thunderx2t99_asimd_store1): New.
1600 (thunderx2t99_asimd_store2): New.
1601 (thunderx2t99_asimd_store3): New.
1602 (thunderx2t99_asimd_store4): New.
1603
1604 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
1605
1606 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
1607 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
1608
1609 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
1610 Segher Boessenkool <segher@kernel.crashing.org>
1611
1612 PR target/85698
1613 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
1614 operand.
1615
1616 2018-05-17 Richard Biener <rguenther@suse.de>
1617
1618 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
1619 for pruning loop and prune defs feeding only already visited PHIs.
1620
1621 2018-05-17 Richard Biener <rguenther@suse.de>
1622
1623 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
1624
1625 2018-05-17 Bin Cheng <bin.cheng@arm.com>
1626 Richard Biener <rguenther@suse.de>
1627
1628 PR tree-optimization/85793
1629 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
1630 for VMAT_ELEMENTWISE.
1631
1632 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1633
1634 * internal-fn.h (lookup_internal_fn): Declare
1635 * internal-fn.c (lookup_internal_fn): New function.
1636 * gimple.c (gimple_build_call_from_tree): Handle calls to
1637 internal functions.
1638 * gimple-pretty-print.c (dump_gimple_call): Print "." before
1639 internal function names.
1640 * tree-pretty-print.c (dump_generic_node): Likewise.
1641 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
1642
1643 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
1644
1645 * gimple-fold.h (gimple_build): Make the function forms take
1646 combined_fn rather than built_in_function.
1647 (gimple_simplify): Likewise.
1648 * gimple-match-head.c (gimple_simplify): Likewise.
1649 * gimple-fold.c (gimple_build): Likewise.
1650 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
1651 rather than gimple_build_call_internal.
1652 (get_initial_defs_for_reduction): Likewise.
1653 (vect_create_epilog_for_reduction): Likewise.
1654 (vectorizable_live_operation): Likewise.
1655
1656 2018-05-17 Martin Liska <mliska@suse.cz>
1657
1658 * gimple-ssa-sprintf.c (format_directive): Do not use
1659 space in between 'G_' and '('.
1660
1661 2018-05-17 Jakub Jelinek <jakub@redhat.com>
1662
1663 PR target/85323
1664 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
1665 even if the mask is not all ones.
1666
1667 PR target/85323
1668 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
1669 vector.
1670 (ix86_gimple_fold_builtin): Likewise.
1671
1672 PR target/85323
1673 * config/i386/i386.c: Include tree-vector-builder.h.
1674 (ix86_vector_shift_count): New function.
1675 (ix86_fold_builtin): Fold shift builtins by scalar count.
1676 (ix86_gimple_fold_builtin): Likewise.
1677
1678 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
1679 _mm512_setzero): New intrinsics.
1680
1681 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
1682 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1683
1684 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
1685 code generation for cases where splatting a value is not useful.
1686 * simplify-rtx.c (simplify_ternary_operation): Simplify
1687 vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
1688 mode to a vec_concat.
1689
1690 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
1691
1692 * config.gcc: Support "goldmont-plus".
1693 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1694 "goldmont-plus".
1695 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1696 PROCESSOR_GOLDMONT_PLUS.
1697 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
1698 (processor_target_table): Add "goldmont-plus".
1699 (PTA_GOLDMONT_PLUS): Define.
1700 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
1701 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
1702 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
1703 (fold_builtin_cpu): Add "goldmont-plus".
1704 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
1705 (ix86_option_override_internal): Add "goldmont-plus".
1706 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
1707 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
1708 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
1709 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
1710
1711 2018-05-17 Richard Biener <rguenther@suse.de>
1712
1713 PR tree-optimization/85757
1714 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
1715 remove defs that only feed that PHI from further processing.
1716
1717 2018-05-16 Jim Wilson <jimw@sifive.com>
1718
1719 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
1720 asterisk to name.
1721 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
1722
1723 2018-05-16 Mark Wielaard <mark@klomp.org>
1724
1725 * dwarf2out.c (count_index_strings): New function.
1726 (output_indirect_strings): Call count_index_strings and generate
1727 header for dwarf_version >= 5.
1728
1729 2018-05-16 Mark Wielaard <mark@klomp.org>
1730
1731 * dwarf2out.c (dwarf_FORM): New function.
1732 (set_indirect_string): Use dwarf_FORM.
1733 (reset_indirect_string): Likewise.
1734 (size_of_die): Likewise.
1735 (value_format): Likewise.
1736 (output_die): Likewise.
1737 (add_skeleton_AT_string): Likewise.
1738 (output_macinfo_op): Likewise.
1739 (index_string): Likewise.
1740 (output_index_string_offset): Likewise.
1741 (output_index_string): Likewise.
1742 (count_index_strings): Likewise.
1743
1744 2018-05-16 Carl Love <cel@us.ibm.com>
1745
1746 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
1747 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
1748
1749 2018-05-16 Martin Jambor <mjambor@suse.cz>
1750
1751 * ipa-prop.c (ipa_free_all_edge_args): Remove.
1752 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
1753
1754 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
1755
1756 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
1757 (fnma<mode>4): Likewise.
1758 (fms<mode>4): Likewise.
1759 (fnms<mode>4): Likewise.
1760 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
1761 (aarch64_fnma<mode>4): Likewise.
1762 (aarch64_fms<mode>4): Likewise.
1763 (aarch64_fnms<mode>4): Likewise.
1764 (aarch64_fnmadd<mode>4): Likewise.
1765
1766 2018-05-16 Jason Merrill <jason@redhat.com>
1767
1768 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
1769
1770 2018-05-16 Richard Biener <rguenther@suse.de>
1771
1772 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
1773 (dump_stmt_cost): Declare.
1774 (add_stmt_cost): Dump cost we add.
1775 (add_stmt_costs): New function.
1776 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
1777 No longer exported.
1778 (vect_analyze_stmt): Adjust prototype.
1779 (vectorizable_condition): Likewise.
1780 (vectorizable_live_operation): Likewise.
1781 (vectorizable_reduction): Likewise.
1782 (vectorizable_induction): Likewise.
1783 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
1784 cost vector to pass to vectorizable_ and record afterwards.
1785 (vect_model_reduction_cost): Take cost vector argument and adjust.
1786 (vect_model_induction_cost): Likewise.
1787 (vectorizable_reduction): Likewise.
1788 (vectorizable_induction): Likewise.
1789 (vectorizable_live_operation): Likewise.
1790 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
1791 SLP_TREE_NUMBER_OF_VEC_STMTS.
1792 (vect_analyze_slp_cost_1): Remove.
1793 (vect_analyze_slp_cost): Likewise.
1794 (vect_slp_analyze_node_operations): Take visited args and
1795 a target cost vector. Avoid processing already visited stmt sets.
1796 (vect_slp_analyze_operations): Use a local cost vector to gather
1797 costs and register those of non-discarded instances.
1798 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
1799 (vect_schedule_slp_instance): Remove copying of
1800 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
1801 zero.
1802 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
1803 adding cost. Record cost entry location.
1804 (vect_prologue_cost_for_slp_op): Function to compute cost of
1805 a constant or invariant generated for SLP vect in the prologue,
1806 split out from vect_analyze_slp_cost_1.
1807 (vect_model_simple_cost): Make static. Adjust for SLP costing.
1808 (vect_model_promotion_demotion_cost): Likewise.
1809 (vect_model_store_cost): Likewise, make static.
1810 (vect_model_load_cost): Likewise.
1811 (vectorizable_bswap): Add cost vector arg and adjust.
1812 (vectorizable_call): Likewise.
1813 (vectorizable_simd_clone_call): Likewise.
1814 (vectorizable_conversion): Likewise.
1815 (vectorizable_assignment): Likewise.
1816 (vectorizable_shift): Likewise.
1817 (vectorizable_operation): Likewise.
1818 (vectorizable_store): Likewise.
1819 (vectorizable_load): Likewise.
1820 (vectorizable_condition): Likewise.
1821 (vectorizable_comparison): Likewise.
1822 (can_vectorize_live_stmts): Likewise.
1823 (vect_analyze_stmt): Likewise.
1824 (vect_transform_stmt): Adjust calls to vectorizable_*.
1825 * tree-vectorizer.c: Include gimple-pretty-print.h.
1826 (dump_stmt_cost): New function.
1827
1828 2018-05-16 Richard Biener <rguenther@suse.de>
1829
1830 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
1831 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
1832 * tree-ssa-dse.c: Include tree-ssa-loop.h.
1833 (check_name): New callback.
1834 (dse_classify_store): Track cycles via a visited bitmap of PHI
1835 defs and simplify handling of in-loop and across loop dead stores
1836 and properly fail for loop-variant refs. Handle byte-tracking with
1837 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
1838 limiting the walk.
1839
1840 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
1841
1842 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
1843 (vect_get_mask_type_for_stmt): Likewise.
1844 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
1845 split out from...
1846 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
1847 to determine the statement's vector type and the vector type that
1848 should be used for calculating nunits. Deal with cases in which
1849 the type has to be deferred.
1850 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
1851 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
1852 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
1853 (vect_determine_vf_for_stmt): New functions, split out from...
1854 (vect_determine_vectorization_factor): ...here.
1855 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
1856 (vect_get_mask_type_for_stmt): New functions, split out from
1857 vect_determine_vectorization_factor.
1858
1859 2018-05-16 Richard Biener <rguenther@suse.de>
1860
1861 * tree-cfg.c (verify_gimple_assign_ternary): Properly
1862 verify the [VEC_]COND_EXPR embedded comparison.
1863
1864 2018-05-15 Martin Sebor <msebor@redhat.com>
1865
1866 PR tree-optimization/85753
1867 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
1868 RECORD_TYPE in addition to ARRAY_TYPE.
1869
1870 2018-05-15 Martin Sebor <msebor@redhat.com>
1871
1872 PR middle-end/85643
1873 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
1874
1875 2018-05-15 Richard Biener <rguenther@suse.de>
1876
1877 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
1878 add by_clobber_p one. Change algorithm to collect all defs
1879 representing uses we need to walk and try reducing them to
1880 a single one before failing.
1881 (dse_dom_walker::dse_optimize_stmt): Adjust.
1882
1883 2018-05-13 Mark Wielaard <mark@klomp.org>
1884
1885 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
1886 (size_of_loc_descr): Likewise.
1887 (output_loc_operands): Likewise.
1888 (output_loc_operands_raw): Likewise.
1889 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
1890 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
1891 (hash_loc_operands): Likewise.
1892 (compare_loc_operands): Likewise.
1893
1894 2018-05-14 Mark Wielaard <mark@klomp.org>
1895
1896 * dwarf2out.c (count_index_addrs): New function.
1897 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
1898
1899 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1900
1901 PR tree-optimization/83648
1902 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
1903 return value as malloc candidate.
1904
1905 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1906
1907 PR ipa/85734
1908 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
1909 as true in call to suggest_attribute.
1910
1911 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
1912
1913 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
1914 -mreadonly-in-sdata.
1915
1916 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1917
1918 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
1919 New pattern.
1920 (aarch64_crypto_aesd_fused): Likewise.
1921
1922 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
1923
1924 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
1925 (movsi_aarch64): Likewise.
1926 (load_pairsi): Likewise.
1927 (load_pairdi): Likewise.
1928 (store_pairsi): Likewise.
1929 (store_pairdi): Likewise.
1930 (load_pairsf): Likewise.
1931 (load_pairdf): Likewise.
1932 (store_pairsf): Likewise.
1933 (store_pairdf): Likewise.
1934 (zero_extend): Likewise.
1935 (trunc): Swap alternatives.
1936 (fcvt_target): Add '?' to prefer w over r.
1937
1938 2018-05-14 Jakub Jelinek <jakub@redhat.com>
1939
1940 PR target/85756
1941 * config/i386/i386.md: Disallow non-commutative arithmetics in
1942 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
1943 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
1944 in the peephole2 before it.
1945
1946 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
1947
1948 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
1949 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
1950 (ix86_handle_option): Handle -mcldemote.
1951 * config.gcc: New header.
1952 * config/i386/cldemoteintrin.h: New file.
1953 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
1954 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
1955 -mcldemote.
1956 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
1957 OPTION_MASK_ISA_CLDEMOTE.
1958 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
1959 (ix86_valid_target_attribute_inner_p): Ditto.
1960 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
1961 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
1962 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
1963 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
1964 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
1965 (cldemote): New.
1966 * config/i386/i386.opt: Add -mcldemote.
1967 * config/i386/x86intrin.h: New header.
1968 * doc/invoke.texi: Add -mcldemote.
1969
1970 2018-05-14 Richard Biener <rguenther@suse.de>
1971
1972 * doc/match-and-simplify.texi: Adjust :s documentation.
1973
1974 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
1975
1976 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
1977 intended memcpy size.
1978 (REORDER_45): Likewise.
1979
1980 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
1981
1982 * sort.cc: New file.
1983 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
1984 * vec.c (qsort_chk): Use gcc_qsort.
1985 * Makefile.in (OBJS-libcommon): Add sort.o.
1986 (build/sort.o): New target. Use it...
1987 (BUILD_RTL): ... here, and...
1988 (build/gencfn-macros): ... here, and...
1989 (build/genmatch): ... here.
1990
1991 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
1992 Chung-Ju Wu <jasonwucj@gmail.com>
1993
1994 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
1995 * config/nds32/nds32-graywolf.md: New file.
1996 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
1997 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
1998 pipeline.
1999 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
2000 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
2001 * config/nds32/nds32.md (pipeline_model): Add graywolf.
2002 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
2003 * config/nds32/pipelines.md: Include n15 settings.
2004
2005 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2006 Chung-Ju Wu <jasonwucj@gmail.com>
2007
2008 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
2009 * config/nds32/nds32-n13.md: New file.
2010 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
2011 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
2012 pipeline.
2013 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
2014 * config/nds32/nds32.md (pipeline_model): Add n13.
2015 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
2016 * config/nds32/pipelines.md: Include n13 settings.
2017
2018 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
2019 Chung-Ju Wu <jasonwucj@gmail.com>
2020
2021 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
2022 * config/nds32/nds32-n10.md: New file.
2023 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
2024 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
2025 pipeline.
2026 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
2027 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
2028 * config/nds32/nds32.md (pipeline_model): Add n10.
2029 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
2030 * config/nds32/pipelines.md: Include n10 settings.
2031
2032 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
2033 Kito Cheng <kito.cheng@gmail.com>
2034 Chung-Ju Wu <jasonwucj@gmail.com>
2035
2036 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
2037 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2038 Add enum values for DSP extension instructions.
2039 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
2040 New constraints.
2041 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
2042 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
2043 New code iterators.
2044 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
2045 * config/nds32/nds32-dspext.md: New file for DSP implementation.
2046 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
2047 * config/nds32/nds32-intrinsic.md: Likewise.
2048 * config/nds32/nds32_intrinsic.h: Likewise.
2049 * config/nds32/nds32-md-auxiliary.c: Likewise.
2050 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
2051 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
2052 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
2053 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
2054 * config/nds32/nds32-protos.h: New declarations for DSP extension.
2055 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
2056 TYPE_DMAC in switch statement.
2057 * config/nds32/nds32.c: New checking and implementation for DSP
2058 extension instructions.
2059 * config/nds32/nds32.h: Likewise.
2060 * config/nds32/nds32.md: Likewise.
2061 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
2062 * config/nds32/predicates.md: Implement new predicates for DSP
2063 extension.
2064
2065 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
2066
2067 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
2068 Reformat alternatives and attributes so it is easier to identify
2069 which constraints/attributes go with which instruction.
2070 (mov<mode>_hardfloat32, FMOVE64): Likewise.
2071 (mov<mode>_softfloat32, FMOVE64): Likewise.
2072 (mov<mode>_hardfloat64, FMOVE64): Likewise.
2073 (mov<mode>_softfloat64, FMOVE64): Likewise.
2074
2075 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
2076
2077 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2078 subsection.
2079 (Basic PowerPC Built-in Functions): The new name of the
2080 subsection previously known as "PowerPC Built-in Functions".
2081 (Basic PowerPC Built-in Functions Available on all Configurations):
2082 New subsubsection.
2083 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
2084 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
2085 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
2086 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2087
2088 2018-05-11 Martin Jambor <mjambor@suse.cz>
2089
2090 PR ipa/85655
2091 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
2092 single const.
2093
2094 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
2095
2096 PR target/85733
2097 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2098
2099 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
2100
2101 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
2102 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
2103 (ix86_handle_option): Handle -mwaitpkg.
2104 * config.gcc: New header.
2105 * config/i386/cpuid.h (bit_WAITPKG): New bit.
2106 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
2107 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
2108 function type.
2109 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2110 OPTION_MASK_ISA_WAITPKG.
2111 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
2112 (ix86_option_override_internal): Add PTA_WAITPKG.
2113 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
2114 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
2115 IX86_BUILTIN_TPAUSE.
2116 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
2117 __builtin_ia32_umwait and __builtin_ia32_tpause.
2118 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
2119 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
2120 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
2121 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
2122 UNSPECV_TPAUSE): New.
2123 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
2124 * config/i386/i386.opt: Add -mwaitpkg.
2125 * config/i386/waitpkgintrin.h: New file.
2126 * config/i386/x86intrin.h: New header.
2127 * doc/invoke.texi: Add -mwaitpkg.
2128
2129 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
2130
2131 PR target/85606
2132 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
2133 equivalent.
2134 (cortex-m0): Use armv6s-m isa.
2135 (cortex-m0plus): Likewise.
2136 (cortex-m1): Likewise.
2137 (cortex-m0.small-multiply): Likewise.
2138 (cortex-m0plus.small-multiply): Likewise.
2139 (cortex-m1.small-multiply): Likewise.
2140
2141 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
2142 Jakub Jelinek <jakub@redhat.com>
2143
2144 PR tree-optimization/85692
2145 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
2146 source permute as well.
2147
2148 2018-05-11 Martin Liska <mliska@suse.cz>
2149
2150 PR sanitizer/85556
2151 * doc/extend.texi: Document LLVM style format for no_sanitize
2152 attribute.
2153
2154 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
2155
2156 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
2157 mode_supports_vsx_dform_quad to mode_supports_dq_form.
2158 (mode_supports_vsx_dform_quad): Likewise.
2159 (mode_supports_vmx_dform): Move these functions to be next to the
2160 other mode_supports functions.
2161 (mode_supports_dq_form): Likewise.
2162 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
2163 mode_supports_dq_form.
2164 (reg_offset_addressing_ok_p): Likewise.
2165 (offsettable_ok_by_alignment): Likewise.
2166 (rs6000_legitimate_offset_address_p): Likewise.
2167 (legitimate_lo_sum_address_p): Likewise.
2168 (rs6000_legitimize_address): Likewise.
2169 (rs6000_legitimize_reload_address): Likewise.
2170 (rs6000_secondary_reload_inner): Likewise.
2171 (rs6000_preferred_reload_class): Likewise.
2172 (rs6000_output_move_128bit): Likewise.
2173
2174 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
2175
2176 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
2177 Generate SImode target register for null target.
2178 <case IX86_BUILTIN_XGETBV>: Ditto.
2179 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
2180 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2181
2182 2018-05-10 Carl Love <cel@us.ibm.com>
2183
2184 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
2185 dcbtt and dcbtstt if operands[2] is 0.
2186
2187 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
2188
2189 PR target/85693
2190 * config/i386/sse.md (usadv64qi): New expander.
2191
2192 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
2193
2194 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
2195 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
2196 -maltivec=be support.
2197 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
2198 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
2199 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
2200 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
2201 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
2202 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
2203 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
2204 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
2205 altivec_vsumsws): Adjust.
2206 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
2207 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
2208 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
2209 support.
2210 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
2211 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
2212 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
2213 (altivec_lve<VI_char>x): Delete expand.
2214 (*altivec_lve<VI_char>x_internal): Rename to...
2215 (altivec_lve<VI_char>x): ... this.
2216 (altivec_lvxl_<mode>): Delete expand.
2217 (*altivec_lvxl_<mode>_internal): Rename to ...
2218 (altivec_lvxl_<mode>): ... this.
2219 (altivec_stvxl_<mode>): Delete expand.
2220 (*altivec_stvxl_<mode>_internal): Rename to ...
2221 (altivec_stvxl_<mode>): ... this.
2222 (altivec_stve<VI_char>x): Delete expand.
2223 (*altivec_stve<VI_char>x_internal): Rename to ...
2224 (altivec_stve<VI_char>x): ... this.
2225 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
2226 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
2227 reduc_plus_scal_<mode>): Adjust.
2228 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
2229 comment.
2230 (rs6000_cpu_cpp_builtins): Adjust.
2231 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
2232 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
2233 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
2234 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
2235 -maltivec=be support.
2236 (rs6000_split_vec_extract_var): Adjust.
2237 (rs6000_split_v4si_init): Adjust.
2238 (swap_selector_for_mode): Delete.
2239 (altivec_expand_lvx_be, altivec_expand_stvx_be,
2240 altivec_expand_stvex_be): Delete.
2241 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
2242 -maltivec=be support.
2243 (rs6000_gimple_fold_builtin): Ditto.
2244 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
2245 Adjust.
2246 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
2247 (TARGET_DIRECT_MOVE_64BIT): Adjust.
2248 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
2249 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
2250 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
2251 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
2252 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
2253 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
2254 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
2255 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
2256 anonymous split): Adjust.
2257 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
2258 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2259
2260 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2261
2262 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
2263 when --with-gxx-include-dir is also specified.
2264 * configure: Regenerate.
2265
2266 2018-05-09 Jim Wilson <jimw@sifive.com>
2267
2268 PR target/84797
2269 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
2270 * config/riscv/t-withmultilib: New.
2271 * config/riscv/withmultilib.h: New.
2272 * doc/install.texi: Document RISC-V --with-multilib-list support.
2273
2274 2018-05-09 Richard Biener <rguenther@suse.de>
2275
2276 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
2277 vector.
2278 (vect_bb_vectorization_profitable_p): Adjust. Compute
2279 actual scalar cost using the cost vector and the add_stmt_cost
2280 machinery.
2281
2282 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2283
2284 PR rtl-optimization/85645
2285 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
2286 in the REG_CFA_REGISTER note for LR, don't leave it empty.
2287
2288 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2289
2290 PR rtl-optimization/85645
2291 * shrink-wrap.c (spread_components): Return a boolean saying if
2292 anything was changed.
2293 (try_shrink_wrapping_separate): Iterate spread_components until
2294 nothing changes anymore.
2295
2296 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2297
2298 PR rtl-optimization/85645
2299 * regrename.c (build_def_use): Also kill the chains that include the
2300 destination of a REG_CFA_REGISTER note.
2301
2302 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
2303
2304 PR rtl-optimization/85645
2305 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
2306 insn that has a REG_CFA_REGISTER note.
2307
2308 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
2309
2310 * cfgexpand.c (expand_clobber): New function.
2311 (expand_gimple_stmt_1): Use it.
2312 * tree-vect-stmts.c (vect_clobber_variable): New function,
2313 split out from...
2314 (vectorizable_simd_clone_call): ...here.
2315 (vectorizable_store): Emit a clobber either side of an
2316 IFN_STORE_LANES sequence.
2317 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2318
2319 2018-05-09 Tom de Vries <tom@codesourcery.com>
2320
2321 PR target/85626
2322 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
2323 (define_insn "trap_if_false"): Add exit after trap.
2324
2325 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
2326
2327 PR rtl-optimization/85638
2328 * bb-reorder.c: Include common/common-target.h.
2329 (create_forwarder_block): New function extracted from...
2330 (fix_up_crossing_landing_pad): ...here. Rename into...
2331 (dw2_fix_up_crossing_landing_pad): ...this.
2332 (sjlj_fix_up_crossing_landing_pad): New function.
2333 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
2334 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
2335 from both partitions and exit the loop after one iteration.
2336
2337 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
2338
2339 Revert:
2340 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2341 subsection.
2342 (Basic PowerPC Built-in Functions): The new name of the
2343 subsection previously known as "PowerPC Built-in Functions".
2344 (Basic PowerPC Built-in Functions Available on all Configurations):
2345 New subsubsection.
2346 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2347 subsubsection.
2348 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2349 subsubsection.
2350 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2351 subsubsection.
2352 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2353 subsubsection.
2354
2355 2018-05-08 Jim Wilson <jimw@sifive.com>
2356
2357 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
2358 (LD_EMUL_SUFFIX): New.
2359 (LINK_SPEC): Use it.
2360
2361 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
2362
2363 * doc/extend.texi (PowerPC Built-in Functions): Rename this
2364 subsection.
2365 (Basic PowerPC Built-in Functions): The new name of the
2366 subsection previously known as "PowerPC Built-in Functions".
2367 (Basic PowerPC Built-in Functions Available on all Configurations):
2368 New subsubsection.
2369 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
2370 subsubsection.
2371 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
2372 subsubsection.
2373 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
2374 subsubsection.
2375 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
2376 subsubsection.
2377
2378 2018-05-08 Jakub Jelinek <jakub@redhat.com>
2379
2380 PR target/85683
2381 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
2382 after cmpelim optimization.
2383
2384 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
2385
2386 * config.gcc: Support "goldmont".
2387 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
2388 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2389 PROCESSOR_GOLDMONT.
2390 * config/i386/i386.c (m_GOLDMONT): Define.
2391 (processor_target_table): Add "goldmont".
2392 (PTA_GOLDMONT): Define.
2393 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
2394 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
2395 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
2396 (fold_builtin_cpu): Add "goldmont".
2397 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
2398 (ix86_option_override_internal): Add "goldmont".
2399 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
2400 (processor_type): Add PROCESSOR_GOLDMONT.
2401 * config/i386/i386.md: Add CPU "glm".
2402 * config/i386/glm.md: New file.
2403 * config/i386/x86-tune.def: Add m_GOLDMONT.
2404 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2405
2406 2018-05-08 Jakub Jelinek <jakub@redhat.com>
2407
2408 PR target/85572
2409 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
2410 E_V4DImode.
2411 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
2412 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
2413 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
2414
2415 PR target/85317
2416 * config/i386/i386.c (ix86_fold_builtin): Handle
2417 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
2418
2419 PR target/85480
2420 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
2421 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2422
2423 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
2424
2425 PR target/85658
2426 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
2427 (check_arch): Likewise.
2428 (check_fpu): Return the result rather than printing it.
2429 (end arch): Fix operator precedence.
2430 (end cpu): Likewise.
2431 (END): Print the result from check_fpu.
2432
2433 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
2434 Alan Hayward <alan.hayward@arm.com>
2435 David Sherwood <david.sherwood@arm.com>
2436
2437 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
2438 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
2439 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
2440 (*fcmuo<mode>_and): New patterns.
2441
2442 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
2443
2444 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
2445 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
2446 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
2447 (cmp_op, sve_imm_con): New code attributes.
2448 (SVE_COND_INT_CMP, imm_con): Delete.
2449 (cmp_op): Remove above unspecs from int attribute.
2450 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
2451 to...
2452 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
2453 comparison-specific unspecs.
2454 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
2455 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
2456 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
2457 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
2458 (*vec_fcm<cmp_op><mode>): Rename to...
2459 (*fcm<cmp_op><mode>): ...this and adjust likewise.
2460 (*vec_fcmuo<mode>): Rename to...
2461 (*fcmuo<mode>): ...this and adjust likewise.
2462 (*pred_fcm<cmp_op><mode>): New pattern.
2463 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
2464 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
2465 functions.
2466 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
2467 and UNORDERED.
2468 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
2469 (aarch64_emit_sve_predicated_cond): New function.
2470 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
2471 (aarch64_emit_unspec_cond_or): Replace with...
2472 (aarch64_emit_sve_or_conds): ...this new function. Use
2473 aarch64_emit_sve_ptrue_op for the individual comparisons and
2474 aarch64_emit_binop to OR them together.
2475 (aarch64_emit_inverted_unspec_cond): Replace with...
2476 (aarch64_emit_sve_inverted_cond): ...this new function. Use
2477 aarch64_emit_sve_ptrue_op for the comparison and
2478 aarch64_emit_unop to invert the result.
2479 (aarch64_expand_sve_vec_cmp_float): Update after the above
2480 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
2481
2482 2018-05-07 Nathan Sidwell <nathan@acm.org>
2483
2484 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
2485 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
2486 (Backwards Compatibility): Likewise.
2487
2488 2018-05-07 Luis Machado <luis.machado@linaro.org>
2489
2490 PR bootstrap/85681
2491 Revert:
2492 2018-05-07 Luis Machado <luis.machado@linaro.org>
2493
2494 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2495 <prefetch_dynamic_strides>: New const bool field.
2496 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2497 prefetch_dynamic_strides.
2498 (exynosm1_prefetch_tune): Likewise.
2499 (thunderxt88_prefetch_tune): Likewise.
2500 (thunderx_prefetch_tune): Likewise.
2501 (thunderx2t99_prefetch_tune): Likewise.
2502 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2503 (aarch64_override_options_internal): Update to set
2504 PARAM_PREFETCH_DYNAMIC_STRIDES.
2505 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2506 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2507 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2508 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2509 prefetch-dynamic-strides setting.
2510
2511 2018-05-07 Luis Machado <luis.machado@linaro.org>
2512
2513 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2514 <minimum_stride>: New const int field.
2515 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2516 minimum_stride field.
2517 (exynosm1_prefetch_tune): Likewise.
2518 (thunderxt88_prefetch_tune): Likewise.
2519 (thunderx_prefetch_tune): Likewise.
2520 (thunderx2t99_prefetch_tune): Likewise.
2521 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2522 (aarch64_override_options_internal): Update to set
2523 PARAM_PREFETCH_MINIMUM_STRIDE.
2524 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2525 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2526 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2527 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2528 stride is constant and is below the minimum stride threshold.
2529
2530 2018-05-07 Luis Machado <luis.machado@linaro.org>
2531
2532 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
2533 to 512.
2534
2535 2018-05-07 Luis Machado <luis.machado@linaro.org>
2536
2537 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2538 <prefetch_dynamic_strides>: New const bool field.
2539 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2540 prefetch_dynamic_strides.
2541 (exynosm1_prefetch_tune): Likewise.
2542 (thunderxt88_prefetch_tune): Likewise.
2543 (thunderx_prefetch_tune): Likewise.
2544 (thunderx2t99_prefetch_tune): Likewise.
2545 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
2546 (aarch64_override_options_internal): Update to set
2547 PARAM_PREFETCH_DYNAMIC_STRIDES.
2548 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
2549 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
2550 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
2551 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
2552 prefetch-dynamic-strides setting.
2553
2554 2018-05-07 Luis Machado <luis.machado@linaro.org>
2555
2556 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
2557 <minimum_stride>: New const int field.
2558 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
2559 minimum_stride field.
2560 (exynosm1_prefetch_tune): Likewise.
2561 (thunderxt88_prefetch_tune): Likewise.
2562 (thunderx_prefetch_tune): Likewise.
2563 (thunderx2t99_prefetch_tune): Likewise.
2564 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
2565 (aarch64_override_options_internal): Update to set
2566 PARAM_PREFETCH_MINIMUM_STRIDE.
2567 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
2568 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
2569 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
2570 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
2571 stride is constant and is below the minimum stride threshold.
2572
2573 2018-05-06 Jakub Jelinek <jakub@redhat.com>
2574
2575 PR c++/85659
2576 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
2577 the type is addressable. Don't force op into register if it has
2578 BLKmode.
2579
2580 2018-05-05 Roland McGrath <mcgrathr@google.com>
2581
2582 PR other/77609
2583 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
2584 any section for which we don't know a specific type it should have,
2585 regardless of name. Previously this was done only for the exact
2586 names ".init_array", ".fini_array", and ".preinit_array".
2587 (default_elf_asm_named_section): Add comment about
2588 relationship with default_section_type_flags and SECTION_NOTYPE.
2589 (get_section): Don't consider it a type conflict if one side has
2590 SECTION_NOTYPE and the other doesn't, as long as neither has the
2591 SECTION_BSS et al used in the default_section_type_flags logic.
2592
2593 2018-05-05 Tom de Vries <tom@codesourcery.com>
2594
2595 PR target/85653
2596 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
2597 (workaround_barsyncs): New function.
2598 (nvptx_reorg): Use workaround_barsyncs.
2599 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2600 (define_expand "nvptx_membar_cta"): New define_expand.
2601 (define_insn "*nvptx_membar_cta"): New insn.
2602
2603 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
2604
2605 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
2606 To improve optimization opportunities.
2607 * builtin-types.def: The new needed builtin types for the above.
2608
2609 2018-05-04 Richard Biener <rguenther@suse.de>
2610
2611 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
2612 * gimple-ssa-store-merging.c
2613 (imm_store_chain_info::output_merged_store): Remove redundant create,
2614 release split_store vector contents on failure.
2615 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
2616 scalar stmt vector on cache hit.
2617
2618 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
2619
2620 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
2621 Xilinx FP support.
2622 * config.gcc (powerpc-xilinx-eabi*): Remove.
2623 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
2624 support.
2625 (fusion_addis_mem_combo_load): Ditto.
2626 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
2627 FP support.
2628 (rs6000_cpu_cpp_builtins): Ditto.
2629 * config/rs6000/rs6000-linux.c
2630 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
2631 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
2632 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
2633 support.
2634 (rs6000_setup_reg_addr_masks): Ditto.
2635 (rs6000_init_hard_regno_mode_ok): Ditto.
2636 (rs6000_option_override_internal): Ditto.
2637 (legitimate_lo_sum_address_p): Ditto.
2638 (rs6000_legitimize_address): Ditto.
2639 (rs6000_legitimize_reload_address): Ditto.
2640 (rs6000_legitimate_address_p): Ditto.
2641 (abi_v4_pass_in_fpr): Ditto.
2642 (setup_incoming_varargs): Ditto.
2643 (rs6000_gimplify_va_arg): Ditto.
2644 (rs6000_split_multireg_move): Ditto.
2645 (rs6000_savres_strategy): Ditto.
2646 (rs6000_emit_prologue_components): Ditto.
2647 (rs6000_emit_epilogue_components): Ditto.
2648 (rs6000_emit_prologue): Ditto.
2649 (rs6000_emit_epilogue): Ditto.
2650 (rs6000_elf_file_end): Ditto.
2651 (rs6000_function_value): Ditto.
2652 (rs6000_libcall_value): Ditto.
2653 * config/rs6000/rs6000.h: Ditto.
2654 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
2655 (TARGET_MINMAX): ... this. New.
2656 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
2657 * config/rs6000/rs6000.md: Remove Xilinx FP support.
2658 (*movsi_internal1_single): Delete.
2659 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
2660 mfpu=, mxilinx-fpu): Delete.
2661 * config/rs6000/singlefp.h: Delete.
2662 * config/rs6000/sysv4.h: Remove Xilinx FP support.
2663 * config/rs6000/t-rs6000: Ditto.
2664 * config/rs6000/t-xilinx: Delete.
2665 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
2666 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
2667 (VStype_simple): Delete.
2668 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
2669 * config/rs6000/xfpu.h: Delete.
2670 * config/rs6000/xfpu.md: Delete.
2671 * config/rs6000/xilinx.h: Delete.
2672 * config/rs6000/xilinx.opt: Delete.
2673 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
2674 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2675
2676 2018-05-04 Tom de Vries <tom@codesourcery.com>
2677
2678 PR libgomp/85639
2679 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
2680 if ignore == 0.
2681
2682 2018-05-04 Richard Biener <rguenther@suse.de>
2683
2684 PR middle-end/85627
2685 * tree-complex.c (update_complex_assignment): We are always in SSA form.
2686 (expand_complex_div_wide): Likewise.
2687 (expand_complex_operations_1): Likewise.
2688 (expand_complex_libcall): Preserve EH info of the original stmt.
2689 (tree_lower_complex): Handle removed blocks.
2690 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
2691 on complex multiplication and division libcall builtins.
2692
2693 2018-05-04 Richard Biener <rguenther@suse.de>
2694
2695 PR middle-end/85574
2696 * fold-const.c (negate_expr_p): Restrict negation of operand
2697 zero of a division to when we know that can happen without
2698 overflow.
2699 (fold_negate_expr_1): Likewise.
2700
2701 2018-05-04 Jakub Jelinek <jakub@redhat.com>
2702
2703 PR libstdc++/85466
2704 * real.h (real_nextafter): Declare.
2705 * real.c (real_nextafter): New function.
2706 * fold-const-call.c (fold_const_nextafter): New function.
2707 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
2708 CASE_CFN_NEXTTOWARD.
2709 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
2710 even when arg1_mode is different from arg0_mode.
2711
2712 2018-05-03 Nathan Sidwell <nathan@acm.org>
2713
2714 * doc/extend.texi (Deprecated Features): Remove
2715 -ffriend-injection.
2716 (Backwards Compatibility): Likewise.
2717 * doc/invoke.texi (C++ Language Options): Likewise.
2718 (C++ Dialect Options): Likewise.
2719
2720 2018-05-03 Jakub Jelinek <jakub@redhat.com>
2721
2722 PR target/85530
2723 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
2724 _mm512_mask_mullox_epi64): New intrinsics.
2725
2726 2018-05-03 Tom de Vries <tom@codesourcery.com>
2727
2728 PR testsuite/85106
2729 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2730 dump files): Add offload-tree.
2731
2732 2018-05-03 Richard Biener <rguenther@suse.de>
2733
2734 PR tree-optimization/85615
2735 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
2736 to loops not nested in BBs loop father to avoid creating multi-entry
2737 loops.
2738
2739 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2740
2741 PR tree-optimization/70291
2742 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
2743 arguments. Change return type to tree. Emit libcall as a new
2744 statement rather than replacing existing one when inplace_p is true.
2745 (expand_complex_multiplication_components): New function.
2746 (expand_complex_multiplication): Expand floating-point complex
2747 multiplication using the above.
2748 (expand_complex_division): Rename inner_type parameter to type.
2749 Update expand_complex_libcall call-site.
2750 (expand_complex_operations_1): Update expand_complex_multiplication
2751 and expand_complex_division call-sites.
2752
2753 2018-05-02 Jakub Jelinek <jakub@redhat.com>
2754
2755 PR target/85582
2756 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2757 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2758 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
2759 the highest significant bit of the shift count mask is clear. In
2760 check whether and[sq]i3 is needed verify that all significant bits
2761 of the shift count other than the highest are set.
2762
2763 2018-05-02 Tom de Vries <tom@codesourcery.com>
2764
2765 PR libgomp/82428
2766 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
2767 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
2768 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
2769 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
2770 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
2771 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
2772 __builtin_goacc_parlevel_size.
2773
2774 2018-05-02 Richard Biener <rguenther@suse.de>
2775
2776 PR tree-optimization/85597
2777 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
2778 do not use split vect_get_vec_defs call but call vect_get_slp_defs
2779 directly.
2780
2781 2018-05-02 Tom de Vries <tom@codesourcery.com>
2782
2783 PR testsuite/85106
2784 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2785 dump files): Add ltrans-tree.
2786
2787 2018-05-02 Tom de Vries <tom@codesourcery.com>
2788
2789 PR testsuite/85106
2790 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
2791 dump files): Add wpa-ipa.
2792
2793 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
2794
2795 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
2796 powerpc*-*-linux*paired* target.
2797 * config/rs6000/750cl.h: Delete.
2798 * config/rs6000/paired.h: Delete.
2799 * config/rs6000/paired.md: Delete.
2800 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
2801 float support.
2802 * config/rs6000/rs6000-builtin.def: Remove paired float support.
2803 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
2804 comment. Remove paired float support.
2805 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
2806 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2807 VECTOR_PAIRED.
2808 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
2809 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
2810 declarations.
2811 * config/rs6000/rs6000.c: Remove paired float support.
2812 (paired_expand_vector_init, paired_expand_vector_move,
2813 paired_emit_vector_compare, paired_emit_vector_cond_expr,
2814 (paired_expand_lv_builtin, paired_expand_stv_builtin,
2815 paired_expand_builtin, paired_expand_predicate_builtin,
2816 paired_init_builtins): Delete.
2817 * config/rs6000/rs6000.h: Remove paired float support.
2818 * config/rs6000/rs6000.md: Remove paired float support.
2819 (move_from_CR_ov_bit): Delete.
2820 * config/rs6000/rs6000.opt (mpaired): Delete.
2821 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
2822 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2823
2824 2018-05-02 Richard Biener <rguenther@suse.de>
2825
2826 PR middle-end/85567
2827 * gimplify.c (gimplify_save_expr): When in SSA form allow
2828 SAVE_EXPRs to compute to SSA vars.
2829
2830 2018-05-02 Jakub Jelinek <jakub@redhat.com>
2831
2832 PR target/85582
2833 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
2834 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
2835 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
2836 clobber operands[2], instead use a new pseudo. Formatting fixes.
2837
2838 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
2839
2840 PR tree-optimization/85586
2841 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
2842 exit early for statements in the same group if the accesses are
2843 not strided.
2844
2845 2018-05-02 Tom de Vries <tom@codesourcery.com>
2846
2847 PR lto/85451
2848 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
2849 error message.
2850
2851 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
2852
2853 PR tree-optimization/85143
2854 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2855
2856 2018-05-01 Tom de Vries <tom@codesourcery.com>
2857
2858 PR lto/85451
2859 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
2860 not found" error message.
2861
2862 2018-05-01 Tom de Vries <tom@codesourcery.com>
2863
2864 PR other/83786
2865 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
2866 * vec.c (test_ordered_remove_if): New function.
2867 (vec_c_tests): Call test_ordered_remove_if.
2868 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
2869 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
2870 * tree-vect-patterns.c (vect_pattern_recog_1): Use
2871 VEC_ORDERED_REMOVE_IF.
2872
2873 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2874
2875 PR tree-optimization/82665
2876 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
2877 pointer subtraction where arguments come from a memchr call.
2878
2879 2018-05-01 Jakub Jelinek <jakub@redhat.com>
2880
2881 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
2882 --push-state --as-needed and --pop-state instead of --as-needed and
2883 --no-as-needed if ld supports it.
2884 * configure: Regenerated.
2885
2886 PR web/85578
2887 * doc/install.texi2html: Replace _002d with - and _002a with * in
2888 generated html files using sed.
2889
2890 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2891
2892 PR c++/85523
2893 * gcc-rich-location.c (blank_line_before_p): New function.
2894 (use_new_line): New function.
2895 (gcc_rich_location::add_fixit_insert_formatted): New function.
2896 * gcc-rich-location.h
2897 (gcc_rich_location::add_fixit_insert_formatted): New function.
2898
2899 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2900
2901 * selftest.c (assert_streq): Rename "expected" and "actual" to
2902 "val1" and "val2". Extend NULL-handling to cover both inputs
2903 symmetrically, while still requiring both to be non-NULL for a pass.
2904 * selftest.h (assert_streq): Rename "expected" and "actual" to
2905 "val1" and "val2".
2906 (ASSERT_EQ): Likewise.
2907 (ASSERT_EQ_AT): Likewise.
2908 (ASSERT_KNOWN_EQ): Likewise.
2909 (ASSERT_KNOWN_EQ_AT): Likewise.
2910 (ASSERT_NE): Likewise.
2911 (ASSERT_MAYBE_NE): Likewise.
2912 (ASSERT_MAYBE_NE_AT): Likewise.
2913 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
2914 the assertion to pass.
2915 (ASSERT_STREQ_AT): Likewise.
2916
2917 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
2918
2919 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
2920 interaction with -pie.
2921
2922 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2923
2924 * selftest.h: Fix alphabetization of per-source-file selftest
2925 declarations.
2926
2927 2018-04-30 Jason Merrill <jason@redhat.com>
2928
2929 PR c++/61982 - dead stores to destroyed objects.
2930 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
2931 of clobber.
2932
2933 2018-04-30 Jason Merrill <jason@redhat.com>
2934
2935 * tree.c (build_clobber): New.
2936 * tree.h: Declare it.
2937 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2938
2939 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2940
2941 * diagnostic-show-locus.c (layout::layout): Update for
2942 location_get_source_line returning a char_span.
2943 (struct char_span): Move to input.h.
2944 (struct correction): Update for fields in char_span becoming
2945 private.
2946 (struct source_line): Update for location_get_source_line
2947 returning a char_span.
2948 (layout::print_line): Likewise.
2949 * edit-context.c (edited_file::print_content): Likewise.
2950 (edited_file::print_diff_hunk): Likewise.
2951 (edited_file::print_run_of_changed_lines): Likewise.
2952 (edited_file::get_num_lines): Likewise.
2953 (edited_line::edited_line): Likewise.
2954 * final.c (asm_show_source): Likewise.
2955 * input.c (location_get_source_line): Convert return type
2956 from const char * to char_span, losing the final "line_len"
2957 param.
2958 (dump_location_info): Update for the above.
2959 (get_substring_ranges_for_loc): Likewise. Use a char_span
2960 when handling the literal within the line.
2961 (test_reading_source_line): Update for location_get_source_line
2962 returning a char_span.
2963 * input.h (class char_span): Move here from
2964 diagnostic-show-locus.c, converting from a struct to a class.
2965 Make data members private.
2966 (char_span::operator bool): New.
2967 (char_span::length): New.
2968 (char_span::get_buffer): New.
2969 (char_span::operator[]): New.
2970 (char_span::subspan): Make const.
2971 (char_span::xstrdup): New.
2972 (location_get_source_line): Convert return type from const char *
2973 to char_span, losing the final "line_size" param.
2974
2975 2018-04-30 Jan Hubicka <jh@suse.cz>
2976
2977 * lto-wrapper.c (ltrans_priorities): New static var.
2978 (cmp_priority): New.
2979 (run_gcc): Read priorities and if doing parallel build order
2980 the Makefile by them.
2981
2982 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2983
2984 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2985
2986 2018-04-30 Richard Biener <rguenther@suse.de>
2987
2988 * tree-cfg.c (verify_address): Remove base argument, add
2989 flag whether to check TREE_ADDRESSABLE and do that.
2990 (verify_expr): Remove.
2991 (verify_types_in_gimple_reference): Add pieces from verify_expr.
2992 (verify_gimple_assign_single): Likewise.
2993 (verify_gimple_switch): Likewise.
2994 (verify_expr_location_1): Dereference tp once. Add (disabled)
2995 piece from verify_expr.
2996 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
2997
2998 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
2999
3000 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
3001
3002 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3003
3004 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
3005 (small_data_pattern): Likewise.
3006 (arc_rewrite_small_data): Likewise.
3007 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
3008 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
3009 (get_symbol_alignment): New function.
3010 (legitimate_small_data_address_p): Likewise.
3011 (legitimate_scaled_address): Update, call
3012 legitimate_small_data_address_p.
3013 (output_sdata): New static variable.
3014 (arc_print_operand): Update how we handle small data operands.
3015 (arc_print_operand_address): Likewise.
3016 (arc_legitimate_address_p): Update, use
3017 legitimate_small_data_address_p.
3018 (arc_rewrite_small_data_p): Remove.
3019 (arc_rewrite_small_data_1): Likewise.
3020 (arc_rewrite_small_data): Likewise.
3021 (small_data_pattern): Likewise.
3022 (compact_sda_memory_operand): Update to use
3023 legitimate_small_data_address_p and get_symbol_alignment.
3024 (prepare_move_operands): Don't rewite sdata pattern.
3025 (prepare_extend_operands): Remove.
3026 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
3027 pattern.
3028 (zero_extendqisi2): Likewise.
3029 (zero_extendhisi2): Likewise.
3030 (extendqihi2): Likewise.
3031 (extendqisi2): Likewise.
3032 (extendhisi2): Likewise.
3033 (addsi3): Likewise.
3034 (subsi3): Likewise.
3035 (andsi3): Likewise.
3036 * config/arc/constraints.md (Usd): Change it to memory constraint.
3037
3038 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
3039
3040 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
3041 as source of std instructions.
3042 * config/arc/arc.md (movsi_insn): Update pattern predicate to
3043 allow 6-bit constants as source for store instructions.
3044 (movdi_insn): Update instruction pattern to allow 6-bit constants
3045 as source for store instructions.
3046
3047 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
3048
3049 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
3050
3051 2018-04-30 Nathan Sidwell <nathan@acm.org>
3052 Sandra Loosemore <sandra@codesourcery.com>
3053
3054 * dumpfile.c (dump_open): Allow '-' for stdout.
3055 * doc/invoke.texi (Developer Options): Document dump filename
3056 determination early. Document stdin/stdout selection.
3057
3058 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
3059
3060 Microblaze Target: PIC data text relative
3061
3062 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
3063 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
3064 Add declaration.
3065 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
3066 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
3067 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
3068 New addressing mode for data-text relative position indepenedent code.
3069 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
3070 'ADDRESS_SYMBOLIC_TXT_REL'.
3071 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
3072 (microblaze_legitimate_pic_operand): Exclude function calls from
3073 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
3074 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
3075 addresses cases.
3076 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3077 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
3078 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
3079 for 'address + offset'.
3080 (microblaze_expand_prologue): Add new function prologue call for
3081 'r20' assignation.
3082 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
3083 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
3084 table in case of TARGET_PIC_DATA_TEXT_REL.
3085 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
3086 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
3087 Add new macros 'UNSPEC_TEXT',
3088 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
3089 + exclude function calls from 'UNSPEC_PLT' in case of data text
3090 relative mode.
3091 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3092 new target hook for generating address diff vector tables in case of
3093 flag_pic.
3094 * doc/tm.texi : Regenerate.
3095 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
3096 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
3097 of addr diff vector generation.
3098 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
3099 target hook definition.
3100 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
3101 Add default function for generate_pic_addr_diff_vec -> flag_pic.
3102 * doc/invoke.texi (Add new pic option): Add new microblaze pic
3103 option for data text relative.
3104
3105 2018-04-30 Richard Biener <rguenther@suse.de>
3106
3107 * tree-chrec.h (evolution_function_is_constant_p): Remove
3108 redundant check.
3109 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
3110
3111 2018-04-30 Richard Biener <rguenther@suse.de>
3112
3113 PR bootstrap/85571
3114 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
3115
3116 2018-04-30 Richard Biener <rguenther@suse.de>
3117
3118 PR tree-optimization/28364
3119 PR tree-optimization/85275
3120 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
3121 copying first exit test.
3122
3123 2018-04-28 Mark Wielaard <mark@klomp.org>
3124
3125 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
3126 dwarf_version >= 5.
3127 (dwarf_AT): Handle DW_AT_addr_base.
3128 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
3129
3130 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
3131
3132 PR target/84431
3133 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
3134 (*ashl<dwi>3_doubleword_mask_1): Ditto.
3135 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
3136 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
3137
3138 2018-04-28 Richard Biener <rguenther@suse.de>
3139
3140 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
3141 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
3142 to reflect use. Only add interesting stmts.
3143
3144 2018-04-27 Martin Jambor <mjambor@suse.cz>
3145
3146 PR ipa/85549
3147 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
3148 the jump function allows for passing through aggregate values.
3149
3150 2018-04-27 David Malcolm <dmalcolm@redhat.com>
3151
3152 * input.h (in_system_header_at): Convert from macro to inline
3153 function.
3154 (from_macro_expansion_at): Likewise.
3155 (from_macro_definition_at): Likewise.
3156
3157 2018-04-27 Jeff Law <law@redhat.com>
3158
3159 * config.gcc: Mark tile* targets as deprecated/obsolete.
3160
3161 2018-04-27 Richard Biener <rguenther@suse.de>
3162
3163 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
3164 fix for ILP32.
3165
3166 2018-04-27 Richard Biener <rguenther@suse.de>
3167
3168 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
3169
3170 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
3171
3172 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
3173 with Yd constraint. Set "preferred_for_speed" attribute from
3174 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
3175 with Yd constraint.
3176 (*movdi_internal): Ditto.
3177 (movti_interunit splitters): Remove
3178 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
3179 (movdi_interunit splitters): Ditto.
3180 * config/i386/constraints.md (Ye): Remove.
3181 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
3182
3183 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3184
3185 PR target/85512
3186 * config/aarch64/constraints.md (Usg): Limit to 31.
3187 (Usj): Limit to 63.
3188
3189 2018-04-27 Jakub Jelinek <jakub@redhat.com>
3190
3191 PR tree-optimization/85529
3192 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
3193 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
3194 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
3195 zero extension or masking of the MSB bit.
3196 (optimize_range_tests): Add FIRST_BB argument, pass it through
3197 to optimize_range_tests_var_bound.
3198 (maybe_optimize_range_tests, reassociate_bb): Adjust
3199 optimize_range_tests callers.
3200
3201 2018-04-26 Richard Biener <rguenther@suse.de>
3202 Jakub Jelinek <jakub@redhat.com>
3203
3204 * cgraph.h (symbol_table): Just declare debug method here.
3205 * symtab.c (symbol_table::debug): Define.
3206
3207 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
3208
3209 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
3210
3211 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
3212
3213 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
3214 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
3215 (*movdi_internal): Substitute Yi and Yj constraint with x
3216 and Ym and Yn constraint with y constraint. Update "isa"
3217 attribute and set "preferred_for_speed" attribute from
3218 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
3219 (*movsi_internal): Ditto.
3220 (*movdf_internal): Ditto.
3221 (*movsf_internal): Ditto.
3222 (*zero_extendsidi2): Ditto.
3223 * config/i386/sse.md (vec_set<mode>_0): Ditto.
3224 (sse2_loadld): Ditto.
3225 (*vec_extract<ssevecmodelower>_0): Ditto.
3226 (*vec_extractv4si_0_zext_sse4): Ditto.
3227 (vec_concatv2di): Ditto.
3228 (*vec_dup<mode>): Ditto.
3229 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
3230 * config/i386/constraints.md (Yi): Remove.
3231 (Yj): Remove.
3232 (Ym): Remove.
3233 (Yn): Remove.
3234
3235 2018-04-26 Nathan Sidwell <nathan@acm.org>
3236
3237 * dumpfile.c (dump_open): New.
3238 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
3239 (dump_finish): Detect stdio/stderr by value not name.
3240
3241 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
3242
3243 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
3244
3245 2018-04-26 Tom de Vries <tom@codesourcery.com>
3246
3247 PR target/84952
3248 * config/nvptx/nvptx.c (verify_neutering_jumps)
3249 (verify_neutering_labels): New function
3250 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
3251
3252 2018-04-26 Tom de Vries <tom@codesourcery.com>
3253
3254 PR target/84025
3255 * config/nvptx/nvptx.c (needs_neutering_p): New function.
3256 (nvptx_single): Use needs_neutering_p to skip over insns that do not
3257 need neutering.
3258
3259 2018-04-26 Richard Biener <rguenther@suse.de>
3260 Tom de Vries <tom@codesourcery.com>
3261
3262 PR lto/85422
3263 * lto-streamer-out.c (output_function): Fixup loops if required to match
3264 discovery done in the reader.
3265
3266 2018-04-26 Richard Biener <rguenther@suse.de>
3267
3268 PR tree-optimization/85116
3269 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
3270 have a loop exit from the single latch predecessor. Remove
3271 case of header with just condition.
3272 (ch_base::copy_headers): Exclude infinite loops from any
3273 processing.
3274 (pass_ch::execute): Record exits.
3275
3276 2018-04-26 Richard Biener <rguenther@suse.de>
3277
3278 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
3279 prologue cost vector and pass it to vect_get_load_cost.
3280 (vect_get_peeling_costs_all_drs): Likewise.
3281 (vect_peeling_hash_get_lowest_cost): Likewise.
3282 (vect_enhance_data_refs_alignment): Likewise.
3283
3284 2018-04-26 Richard Biener <rguenther@suse.de>
3285
3286 PR middle-end/85450
3287 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
3288 checking of integer<->pointer conversions.
3289 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
3290 sign-/zero-extending pointer types.
3291 (expand_omp_for_static_chunk): Likewise.
3292
3293 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
3294 Jean Lee <xiaoyur347@gmail.com>
3295
3296 * config/mips/mips.c (mips_asan_shadow_offset): New function.
3297 (TARGET_ASAN_SHADOW_OFFSET): Define.
3298 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
3299 true for -fsanitize=address.
3300
3301 2018-04-25 Mark Wielaard <mark@klomp.org>
3302
3303 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
3304 shorter ones.
3305
3306 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3307
3308 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
3309 than "alu", remove explicit "memory" and "imm_disp" attributes.
3310 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
3311
3312 PR middle-end/85414
3313 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
3314 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
3315 gen_lowpart_no_emit.
3316
3317 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
3318
3319 PR target/85473
3320 * config/i386/i386.c (ix86_expand_builtin): Change memory
3321 operand to XI, extend p0 to Pmode.
3322 * config/i386/i386.md: Change unspec volatile and operand
3323 1 mode to XI, change operand 0 mode to P.
3324
3325 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3326
3327 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
3328 GET_MODE_MASK before any checking.
3329 (nds32_can_use_bset_p): Likewise.
3330 (nds32_can_use_btgl_p): Likewise.
3331
3332 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3333
3334 * config/nds32/nds32-doubleword.md: New define_split pattern for
3335 illegal register number.
3336
3337 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3338
3339 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
3340
3341 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
3342
3343 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
3344
3345 2018-04-25 Richard Biener <rguenther@suse.de>
3346
3347 * lto-streamer.h (LTO_major_version): Bump to 8.
3348
3349 2018-04-25 Jakub Jelinek <jakub@redhat.com>
3350
3351 * BASE-VER: Set to 9.0.0.
3352
3353 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
3354
3355 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
3356 in __abskf2 and __powikf2.
3357
3358 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3359
3360 PR target/85512
3361 * config/aarch64/constraints.md (Usg, Usj): New constraints.
3362 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
3363 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
3364 Use the above on operand 2. Reindent.
3365 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
3366
3367 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
3368
3369 PR target/85485
3370 * common/config/i386/i386-common.c (ix86_handle_option): Don't
3371 handle OPT_mcet.
3372 * config/i386/i386.opt (mcet): Removed.
3373 * doc/install.texi: Remove -mcet documentation.
3374 * doc/invoke.texi: Likewise.
3375
3376 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
3377
3378 PR target/85485
3379 * doc/install.texi: Remove -mcet from bootstrap-cet.
3380
3381 2018-04-24 Jakub Jelinek <jakub@redhat.com>
3382
3383 PR target/85511
3384 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
3385 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
3386 if TARGET_64BIT.
3387
3388 PR target/85503
3389 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
3390 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
3391 containing a CONST_VECTOR.
3392
3393 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
3394
3395 * doc/install.texi: Update newlib dependency for nvptx.
3396
3397 2018-04-24 Jakub Jelinek <jakub@redhat.com>
3398
3399 PR target/85508
3400 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
3401 instead of INTVAL when shifting x left.
3402
3403 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
3404
3405 PR tree-optimization/85478
3406 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
3407 vect_grouped_store_supported for single element vectors.
3408
3409 2018-04-24 Richard Biener <rguenther@suse.de>
3410
3411 PR target/85491
3412 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
3413 load cost increase to the case of non-constant step.
3414
3415 2018-04-24 Jakub Jelinek <jakub@redhat.com>
3416
3417 PR target/84828
3418 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
3419 destination if any_malformed_asm.
3420
3421 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
3422
3423 PR middle-end/85496
3424 * expr.c (store_field): In the bitfield case, if the value comes from
3425 a function call and is returned in registers by means of a PARALLEL,
3426 do not change the mode of the temporary unless BLKmode and VOIDmode.
3427
3428 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
3429
3430 PR rtl-optimization/85423
3431 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
3432 dependencies to debug insns when the previous insn is non-debug.
3433
3434 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
3435
3436 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
3437 enums into a single definition.
3438 (fls): Fix predicates and printing.
3439 (seti): Likewise.
3440
3441 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
3442
3443 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
3444 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
3445 and short u6 immediate.
3446 (check_if_valid_sleep_operand): Remove.
3447 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
3448
3449 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3450
3451 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
3452 flag_always_save_lp condition.
3453 * config/nds32/nds32.opt (malways-save-lp): New option.
3454
3455 2018-04-22 Shiva Chen <shiva0217@gmail.com>
3456
3457 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
3458 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
3459 * config/nds32/nds32.h
3460 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
3461 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
3462
3463 2018-04-22 Shiva Chen <shiva0217@gmail.com>
3464
3465 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
3466 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
3467
3468 2018-04-22 Shiva Chen <shiva0217@gmail.com>
3469 Chung-Ju Wu <jasonwucj@gmail.com>
3470
3471 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
3472 Declare.
3473 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
3474 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
3475
3476 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3477
3478 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
3479
3480 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3481
3482 * config/nds32/nds32-protos.h (nds32_data_alignment,
3483 nds32_local_alignment): Declare.
3484 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
3485 nds32_local_alignment): New functions.
3486 (TARGET_CONSTANT_ALIGNMENT): Define.
3487 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
3488
3489 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3490
3491 * config/nds32/nds32.c
3492 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
3493 (TARGET_MODES_TIEABLE_P): Likewise.
3494
3495 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
3496
3497 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
3498 level Ofast and Og.
3499
3500 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
3501 Chung-Ju Wu <jasonwucj@gmail.com>
3502
3503 * config/nds32/constants.md (unspec_volatile_element): Add enum values
3504 for unaligned access.
3505 * config/nds32/nds32-intrinsic.c: Implementation of expanding
3506 unaligned access.
3507 * config/nds32/nds32-intrinsic.md: Likewise.
3508 * config/nds32/nds32_intrinsic.h: Likewise.
3509 * config/nds32/nds32.h (nds32_builtins): Likewise.
3510 * config/nds32/nds32.opt (munaligned-access): New option.
3511 * config/nds32/nds32.c (nds32_asm_file_start): Display
3512 flag_unaligned_access status.
3513
3514 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
3515
3516 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
3517 -mno-relax is present.
3518 * config/riscv/linux.h (LINK_SPEC): Ditto.
3519
3520 2018-04-20 Martin Sebor <msebor@redhat.com>
3521
3522 PR c/85365
3523 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
3524 for null pointers.
3525 (gimple_fold_builtin_stxcpy_chk): Same.
3526 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
3527
3528 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
3529
3530 PR target/85456
3531 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
3532 __powikf2 when long double is IEEE 128-bit.
3533
3534 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
3535
3536 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
3537 step to make sure stack always aligned.
3538
3539 2018-04-20 Carl Love <cel@us.ibm.com>
3540
3541 PR target/83402
3542 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
3543 size check for arg0.
3544
3545 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
3546 Tom de Vries <tom@codesourcery.com>
3547
3548 PR target/85445
3549 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
3550 Emit insns for calls too.
3551 (nvptx_find_par): Always look for worker-level predecessor insn.
3552 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
3553 calls.
3554 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
3555 (nvptx_process_pars): Propagate frames for calls.
3556
3557 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
3558
3559 PR target/85469
3560 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
3561 Removed.
3562 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
3563 (ix86_handle_option): Don't handle OPT_mibt.
3564 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
3565 __SHSTK__.
3566 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
3567 has_ibt and ibt.
3568 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
3569 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
3570 (ix86_target_macros): Define __CET__ with flag_cf_protection
3571 for -fcf-protection.
3572 * config/i386/i386.c (isa2_opts): Remove -mibt.
3573 * config/i386/i386.h (TARGET_IBT): Removed.
3574 (TARGET_IBT_P): Likewise.
3575 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
3576 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
3577 * config/i386/i386.opt (mcet): Update help message.
3578 (mshstk): Likewise.
3579 (mibt): Removed.
3580 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
3581 -mcet as an alias for -mshstk.
3582
3583 2018-04-20 Richard Biener <rguenther@suse.de>
3584
3585 PR middle-end/85475
3586 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
3587 complexity by forcing a single use of the multiply operand.
3588
3589 2018-04-20 Martin Jambor <mjambor@suse.cz>
3590
3591 ipa/85449
3592 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
3593 recursion dependency to only apply to non-clones.
3594
3595 2018-04-20 Martin Jambor <mjambor@suse.cz>
3596
3597 ipa/85447
3598 * ipa-cp.c (create_specialized_node): Check that clones of
3599 self-recursive edges exist during IPA-CP.
3600
3601 2018-04-19 Toon Moene <toon@moene.org>
3602
3603 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
3604 by -O3.
3605
3606 2018-04-19 Jakub Jelinek <jakub@redhat.com>
3607
3608 PR tree-optimization/85467
3609 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
3610 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
3611 VECTOR_CST element to type.
3612
3613 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
3614
3615 PR target/85397
3616 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
3617 * config/i386/i386.md (builtin_setjmp_setup): Removed.
3618 (builtin_longjmp): Likewise.
3619 (save_stack_nonlocal): New pattern.
3620 (restore_stack_nonlocal): Likewise.
3621
3622 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
3623
3624 PR target/85404
3625 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3626 Replace ASM_OUTPUT_LABEL with fprintf.
3627
3628 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
3629
3630 PR target/85417
3631 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
3632 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
3633 * config/i386/i386-c.c (ix86_target_macros_internal): Also
3634 define __IBT__ and __SHSTK__ for -fcf-protection.
3635 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
3636 TARGET_IBT.
3637 (ix86_trampoline_init): Likewise.
3638 (x86_output_mi_thunk): Likewise.
3639 (ix86_notrack_prefixed_insn_p): Likewise.
3640 (ix86_option_override_internal): Don't disallow -fcf-protection.
3641 * config/i386/i386.md (rdssp<mode>): Also enable for
3642 -fcf-protection.
3643 (incssp<mode>): Likewise.
3644 (nop_endbr): Likewise.
3645 * config/i386/i386.opt (mcet): Change help message to built-in
3646 functions only.
3647 (mibt): Likewise.
3648 (mshstk): Likewise.
3649 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
3650 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
3651 enable CET built-in functions.
3652
3653 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
3654
3655 * common/config/i386/i386-common.c
3656 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
3657 OPTION_MASK_ISA_MOVDIRI_UNSET,
3658 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
3659 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
3660 * config.gcc (movdirintrin.h): New header.
3661 * config/i386/cpuid.h (bit_MOVDIRI,
3662 bit_MOVDIR64B): New bits.
3663 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
3664 and -mmvodir64b.
3665 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
3666 (VOID, PVOID, PCVOID)): New function types.
3667 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
3668 __builtin_ia32_directstoreu_u64,
3669 __builtin_ia32_movdir64b): New builtins.
3670 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
3671 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
3672 and -mmovdiri.
3673 (ix86_valid_target_attribute_inner_p): Ditto.
3674 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
3675 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
3676 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
3677 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
3678 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
3679 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
3680 (movdiri<mode>, movdir64b_<mode>): New.
3681 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
3682 * config/i386/immintrin.h: Include movdirintrin.h.
3683 * config/i386/movdirintrin.h: New file.
3684 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
3685
3686 2018-04-19 Richard Biener <rguenther@suse.de>
3687
3688 PR middle-end/85455
3689 * cfg.c (clear_bb_flags): When loop state says we have
3690 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
3691
3692 2018-04-19 Richard Biener <rguenther@suse.de>
3693
3694 PR tree-optimization/84737
3695 * tree-vect-data-refs.c (vect_copy_ref_info): New function
3696 copying restrict info.
3697 (vect_setup_realignment): Use it.
3698 * tree-vectorizer.h (vect_copy_ref_info): Declare.
3699 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
3700 the first DR to all generated stores.
3701 (vectorizable_load): Likewise for loads.
3702
3703 2018-04-19 Jakub Jelinek <jakub@redhat.com>
3704
3705 PR tree-optimization/85446
3706 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
3707 the integral and pointer types to have the same precision.
3708
3709 * doc/install.texi: Document --disable-cet being the default and
3710 --enable-cet=auto.
3711
3712 2018-04-18 Martin Liska <mliska@suse.cz>
3713
3714 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
3715 style.
3716
3717 2018-04-18 Martin Liska <mliska@suse.cz>
3718
3719 Revert
3720 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
3721
3722 PR ipa/83983
3723 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
3724 arguments if they are comparable.
3725
3726 2018-04-18 Martin Liska <mliska@suse.cz>
3727
3728 Revert
3729 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
3730
3731 PR lto/84805
3732 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3733 incomplete types.
3734
3735 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
3736
3737 PR target/85388
3738 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
3739 ENDBR after calling __morestack.
3740
3741 2018-04-18 David Malcolm <dmalcolm@redhat.com>
3742
3743 PR jit/85384
3744 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
3745 by using gcc_base_ver to generate a gcc_driver_version, and use
3746 it when generating GCC_DRIVER_NAME.
3747 * configure: Regenerate.
3748
3749 2018-04-18 Jakub Jelinek <jakub@redhat.com>
3750
3751 PR target/81084
3752 * config.gcc: Obsolete powerpc*-*-*spe*.
3753
3754 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3755
3756 PR debug/84637
3757 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
3758 (stabstr_D): Change type of unum from unsigned int to
3759 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
3760 type.
3761
3762 2018-04-17 Jim Wilson <jimw@sifive.com>
3763
3764 PR 84856
3765 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
3766 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
3767 Set arg_pointer_offset after using pretend_args_size.
3768
3769 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3770
3771 PR rtl-optimization/85431
3772 * dse.c (record_store): Ignore zero width stores.
3773
3774 PR sanitizer/85230
3775 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
3776 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
3777 __builtin_stack_restore rather than after it.
3778 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
3779 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
3780 argument instead of virtual_dynamic_stack_rtx.
3781
3782 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
3783
3784 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
3785 New prototype.
3786 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
3787 Add note to error message to explain internal mapping of overloaded
3788 built-in function name to non-overloaded built-in function name.
3789 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
3790 function.
3791
3792 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
3793
3794 PR target/85424
3795 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
3796 where the inputs overlap with the output.
3797
3798 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3799
3800 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
3801 (=v, v) alternative and explicit "memory" attribute.
3802 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
3803 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3804 attributes.
3805 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
3806 "sselog1" type instead of "sselog".
3807 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
3808 "sselog". Remove explicit "memory" attribute.
3809 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
3810 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3811 attributes.
3812 (vec_extract_hi_v32hi): Merge all alternatives into one, use
3813 "sselog1" type instead of "sselog". Remove explicit "memory"
3814 attribute.
3815 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
3816 use "sselog1" type instead of "sselog". Remove explicit "memory"
3817 attribute.
3818 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
3819 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
3820 attributes.
3821 (vec_extract_hi_v64qi): Merge all alternatives into one, use
3822 "sselog1" type instead of "sselog". Remove explicit "memory"
3823 attribute.
3824 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
3825 use "sselog1" type instead of "sselog". Remove explicit "memory"
3826 attribute.
3827
3828 PR target/85430
3829 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
3830
3831 PR middle-end/85414
3832 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
3833 on a SUBREG.
3834
3835 2018-04-17 Martin Jambor <mjambor@suse.cz>
3836
3837 PR ipa/85421
3838 * ipa-cp.c (create_specialized_node): Call
3839 expand_all_artificial_thunks if necessary.
3840
3841 2018-04-17 Martin Liska <mliska@suse.cz>
3842
3843 PR lto/85405
3844 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
3845 in message, remote space in between '_G' and '('.
3846
3847 2018-04-17 Jakub Jelinek <jakub@redhat.com>
3848
3849 PR target/85281
3850 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
3851 avx512f_vmcmp<mode>3<round_saeonly_name>,
3852 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
3853 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
3854 avx512f_rndscale<mode><round_saeonly_name>,
3855 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
3856 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
3857 Use %<iptr>2 instead of %2 for -masm=intel.
3858 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
3859 avx512f_vcvttss2usi<round_saeonly_name>,
3860 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
3861 -masm=intel.
3862 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
3863 avx512f_vcvttsd2usi<round_saeonly_name>,
3864 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
3865 Use %q1 instead of %1 for -masm=intel.
3866 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
3867 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
3868 of %3 for -masm=intel.
3869 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
3870 -masm=intel.
3871 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
3872 -masm=intel.
3873 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
3874 -masm=intel.
3875 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
3876 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
3877 %g1.
3878 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
3879 -masm=intel.
3880 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
3881 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
3882 %g1 and one with %0 and %1.
3883 (avx512er_vmrcp28<mode><round_saeonly_name>,
3884 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
3885 %1 for -masm=intel.
3886 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
3887 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
3888 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
3889 of %0 and %{%4%} for -masm=intel.
3890 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
3891 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
3892 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
3893 order of %0 and %{%5%}%{z%} for -masm=intel.
3894
3895 2018-04-17 Jan Hubicka <jh@suse.cz>
3896
3897 PR lto/85405
3898 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
3899
3900 2018-04-17 Martin Liska <mliska@suse.cz>
3901
3902 PR ipa/85329
3903 * multiple_target.c (create_dispatcher_calls): Set apostrophes
3904 for target_clone error message. Make default implementation
3905 clone to be a local declaration.
3906 (separate_attrs): Add new argument and check for an empty
3907 string.
3908 (expand_target_clones): Handle it.
3909 (ipa_target_clone): Make redirection just for target_clones
3910 functions.
3911
3912 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
3913 Tom de Vries <tom@codesourcery.com>
3914
3915 PR middle-end/84955
3916 * omp-expand.c (expand_oacc_for): Add dummy false branch for
3917 tiled basic blocks without omp continue statements.
3918
3919 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
3920
3921 PR target/83660
3922 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
3923 vec_extract expression as having side effects to make sure it gets
3924 a cleanup point.
3925
3926 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
3927
3928 PR target/85403
3929 * config/i386/i386.c (get_builtin_code_for_version): Check
3930 error_mark_node.
3931
3932 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
3933
3934 PR target/84331
3935 * gcc/config.gcc: Support "skylake".
3936 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
3937 PROCESSOR_SKYLAKE.
3938 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
3939 (processor_target_table): Add "skylake".
3940 (ix86_option_override_internal): Add "skylake".
3941 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
3942 PROCESSOR_CANNONLAKE.
3943 (get_builtin_code_for_version): Fix priority for
3944 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
3945 PROCESSOR_SKYLAKE-AVX512.
3946 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
3947 (processor_type): Add PROCESSOR_SKYLAKE.
3948
3949 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
3950 Jason Merrill <jason@redhat.com>
3951
3952 PR c++/85112
3953 * convert.c (convert_to_integer_1): Use direct recursion for
3954 enumeral types and types with a precision less than the number
3955 of bits in their mode.
3956
3957 2018-04-16 Julia Koval <julia.koval@intel.com>
3958
3959 PR target/84413
3960 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
3961 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
3962
3963 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
3964
3965 PR target/85293
3966 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
3967 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
3968 and -mno-direct-move.
3969
3970 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
3971
3972 PR target/83402
3973 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
3974 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
3975 Ensure negative shifts result in {0}.
3976
3977 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
3978
3979 PR rtl-optimization/79916
3980 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
3981 regs (if any) to define how to gnerate SD moves when LRA is in
3982 progress.
3983
3984 2018-04-13 Jakub Jelinek <jakub@redhat.com>
3985
3986 PR rtl-optimization/85393
3987 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
3988 * except.c (expand_dw2_landing_pad_for_region): Make static.
3989 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
3990 a label and unconditional jump to old_bb, rather than
3991 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
3992 basic block.
3993
3994 PR rtl-optimization/85376
3995 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
3996 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
3997 instead of a specific value.
3998
3999 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
4000 Bin Cheng <bin.cheng@arm.com>
4001
4002 PR tree-optimization/82965
4003 PR tree-optimization/83991
4004 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
4005 by_profile_only parameter.
4006 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
4007 information if the loop was predicted to iterate too many times.
4008 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
4009
4010 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
4011
4012 PR lto/71991
4013 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
4014 always inline.
4015
4016 2018-04-13 Martin Liska <mliska@suse.cz>
4017 Jakub Jelinek <jakub@redhat.com>
4018
4019 PR middle-end/81657
4020 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
4021 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
4022 * builtins.c (expand_builtin_memory_copy_args): Use
4023 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
4024 handle dest_addr == pc_rtx.
4025
4026 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
4027
4028 PR target/85291
4029 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
4030 asked to not generate direct moves.
4031 (fix_trunc<mode>si2_stfiwx): Similar.
4032 (fix_trunc<mode>si2_internal): Similar.
4033
4034 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4035
4036 PR debug/83157
4037 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
4038 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
4039 lookup if dest in some wider mode is known to be const0_rtx and
4040 if so, record permanent equivalence for it to be ZERO_EXTEND of
4041 the narrower mode destination.
4042
4043 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
4044
4045 * lto-streamer-out.c (output_function): Revert 259346.
4046 * omp-expand.c (expand_oacc_for): Likewise.
4047
4048 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
4049
4050 PR rtl-optimization/85354
4051 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
4052 * sel-sched.c (sel_global_init): ... here.
4053
4054 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
4055
4056 PR target/85238
4057 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
4058 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
4059 mode for PE-COFF targets.
4060 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
4061 (i386_pe_asm_lto_end): Likewise.
4062 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
4063 (TARGET_ASM_LTO_END): Likewise.
4064 * config/i386/winnt.c (saved_debug_info_level): New static variable.
4065 (i386_pe_asm_lto_start): New function.
4066 (i386_pe_asm_lto_end): Likewise.
4067
4068 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
4069 Richard Biener <rguenther@suse.de>
4070
4071 PR middle-end/84955
4072 * lto-streamer-out.c (output_function): Fix CFG loop state before
4073 streaming out.
4074 * omp-expand.c (expand_oacc_for): Handle calls to internal
4075 functions like regular functions.
4076
4077 2018-04-12 Richard Biener <rguenther@suse.de>
4078
4079 PR lto/85371
4080 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
4081 for the early LTO debug to properly generate references to it
4082 during DIE emission. Do not re-use that for the skeleton for
4083 split-dwarf.
4084 (dwarf2out_early_finish): Likewise.
4085
4086 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4087
4088 PR target/85328
4089 * config/i386/sse.md
4090 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
4091 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
4092 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
4093 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
4094 and output is a reg, avoid creating invalid lowpart subreg, but
4095 instead split into a 512-bit move. Don't split if not AVX512VL,
4096 input is xmm16+ reg and output is a mem.
4097 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
4098 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
4099 xmm16+ reg and output is a mem.
4100
4101 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4102
4103 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
4104 also for flag_dwarf2_cfi_asm.
4105
4106 2018-04-12 Jakub Jelinek <jakub@redhat.com>
4107
4108 PR rtl-optimization/85342
4109 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
4110 a bool scalar var inside of the loop instead. Don't try to update
4111 recog_data.operand after failed apply_change_group.
4112
4113 2018-04-12 Tom de Vries <tom@codesourcery.com>
4114
4115 PR target/85296
4116 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
4117 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
4118 array with flexible array member as array without given dimension.
4119 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
4120 argument for undefined param to true.
4121
4122 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
4123
4124 PR target/85321
4125 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4126 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
4127 from PowerPC section.
4128 * config/rs6000/sysv4.opt (mcall-): Improve help text.
4129 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
4130 help text that is too long.
4131 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
4132 help text that is too long.
4133 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
4134 help text that is too long.
4135
4136 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
4137
4138 * config/alpha/alpha.md (stack_probe_internal): Rename
4139 from "probe_stack". Update all callers.
4140
4141 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4142
4143 PR rtl-optimization/84566
4144 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
4145 sched_macro_fuse_insns.
4146
4147 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4148
4149 PR target/84301
4150 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
4151 (compute_block_dependences): ... from here.
4152
4153 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4154
4155 PR tree-optimization/85331
4156 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
4157 from int to HOST_WIDE_INT.
4158
4159 2018-04-11 Martin Jambor <mjambor@suse.cz>
4160
4161 PR ipa/84149
4162 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
4163 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
4164 not the same as the source val.
4165 (cgraph_edge_brings_value_p): New parameter.
4166 (gather_edges_for_value): Pass destination value to
4167 cgraph_edge_brings_value_p.
4168 (perhaps_add_new_callers): Likewise.
4169 (get_info_about_necessary_edges): Likewise and exclude values brought
4170 only by self-recursive edges.
4171 (create_specialized_node): Redirect only clones of self-calling edges.
4172 (+self_recursive_pass_through_p): New function.
4173 (find_more_scalar_values_for_callers_subset): Use it.
4174 (find_aggregate_values_for_callers_subset): Likewise.
4175 (known_aggs_to_agg_replacement_list): Removed.
4176 (decide_whether_version_node): Re-calculate known constants for all
4177 remaining context clones.
4178
4179 2018-04-11 Richard Biener <rguenther@suse.de>
4180
4181 PR lto/85339
4182 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
4183 from early DWARF output.
4184 (dwarf2out_early_finish): Output line info unconditionally into
4185 early DWARF and add reference to it.
4186
4187 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4188
4189 PR target/85281
4190 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
4191 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
4192 other than V2DFmode using iptr mode attribute.
4193 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
4194
4195 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
4196
4197 PR rtl-optimization/84659
4198 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
4199
4200 2018-04-11 Jakub Jelinek <jakub@redhat.com>
4201
4202 PR debug/85302
4203 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
4204 SIZEP is NULL.
4205 (output_loc_list): Pass address of a dummy size variable even in the
4206 locview handling loop.
4207 (index_location_lists): Add comment on why skip_loc_list_entry can't
4208 call size_of_locs.
4209
4210 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
4211
4212 PR target/85261
4213 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
4214 into register.
4215
4216 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
4217
4218 PR target/85321
4219 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
4220 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
4221 and -mstring-compare-inline-limit.
4222
4223 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4224
4225 PR target/85287
4226 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
4227 for stack clash protection in a register whenever we need it to be in
4228 a register.
4229
4230 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4231
4232 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
4233 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
4234
4235 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
4236
4237 PR target/85321
4238 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
4239 the help text.
4240 (mlong-double-): Ditto.
4241 * config/rs6000/sysv4.opt (msdata=): Ditto.
4242 (mtls-size=): Ditto.
4243
4244 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
4245
4246 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
4247 erroneous entries for
4248 "vector int vec_ldl (int, long int *)", and
4249 "vector unsigned int vec_ldl (int, unsigned long int *)".
4250 Add comments and entries for
4251 "vector bool char vec_ldl (int, bool char *)",
4252 "vector bool short vec_ldl (int, bool short *)",
4253 "vector bool int vec_ldl (int, bool int *)",
4254 "vector bool long long vec_ldl (int, bool long long *)",
4255 "vector pixel vec_ldl (int, pixel *)",
4256 "vector long long vec_ldl (int, long long *)",
4257 "vector unsigned long long vec_ldl (int, unsigned long long *)".
4258 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
4259 type tree bool_long_long_type_node and correct definition of
4260 bool_V2DI_type_node to make reference to this new type tree.
4261 (rs6000_mangle_type): Replace erroneous reference to
4262 bool_long_type_node with bool_long_long_type_node.
4263 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
4264 comments to emphasize sign distinctions for char and int types and
4265 replace RS6000_BTI_bool_long constant with
4266 RS6000_BTI_bool_long_long constant. Also add comment to restrict
4267 use of RS6000_BTI_pixel.
4268 (bool_long_type_node): Remove this macro definition.
4269 (bool_long_long_type_node): New macro definition
4270
4271 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4272
4273 PR rtl-optimization/85300
4274 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
4275 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
4276 simplify_unary_operation fails.
4277
4278 2018-04-10 Martin Liska <mliska@suse.cz>
4279
4280 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
4281 cgraph_edge and ipa_ref.
4282
4283 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4284
4285 PR target/85177
4286 PR target/85255
4287 * config/i386/sse.md
4288 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
4289 computation of the VEC_MERGE selector from mask.
4290 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
4291 Fix decoding of the VEC_MERGE selector into mask.
4292
4293 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
4294
4295 PR tree-optimization/85286
4296 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
4297
4298 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
4299
4300 * final.c (final_1): Set insn_last_address as well as
4301 insn_current_address.
4302
4303 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4304
4305 PR target/85173
4306 * explow.c (emit_stack_probe): Call validize_mem on memory location
4307 before passing it to gen_probe_stack. Create address operand and
4308 legitimize it for the probe_stack_address case.
4309
4310 2018-04-09 Jan Hubicka <jh@suse.cz>
4311
4312 PR lto/85078
4313 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
4314 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
4315 * tree.c (free_lang_data_in_type): Fix handling of binfos;
4316 walk basetypes.
4317 (free_lang_data): Rebuild type inheritance graph.
4318
4319 2018-04-09 Martin Sebor <msebor@redhat.com>
4320
4321 * invoke.texi (-finline-small-functions): Mention other optimization
4322 options.
4323 (-findirect-inlining, -fpartial-inlining): Same.
4324 (-finline-functions-called-once): Same.
4325 (-freorder-blocks-and-partition): Same.
4326
4327 2018-04-09 Jan Hubicka <jh@suse.cz>
4328
4329 PR rtl/84058
4330 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
4331 jumps; choose last target that matches the criteria (i.e.
4332 no partition changes for non-crossing jumps).
4333 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
4334 support for redirecting crossing jumps to non-crossing.
4335
4336 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
4337
4338 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
4339 also for naked functions.
4340
4341 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
4342
4343 * config/arc/arc.md (add_shift): New pattern.
4344 (add_shift2): Likewise.
4345 (sub_shift): Likewise.
4346 (sub_shift_cmp0_noout): Likewise.
4347 (compare_si_ashiftsi): Likewise.
4348 (xbfu_cmp0_noout): New combine pattern.
4349 (xbfu_cmp0"): Likewise.
4350 (movsi_set_cc_insn): Place the predicable variant first.
4351 (commutative_binary_cmp0_noout): Remove clobber.
4352 (commutative_binary_cmp0): New pattern.
4353 (noncommutative_binary_cmp0): Likewise.
4354 (noncommutative_binary_cmp0_noout): Likewise.
4355 (noncommutative_binary_comparison_result_used): Removed.
4356 (rsub_cmp0): New pattern.
4357 (rsub_cmp0_noout): Likewise.
4358 (extzvsi): Changed, keep only meaningful variants.
4359 (SQH, SEZ): New iterators.
4360 (SQH_postfix): New mode attribute.
4361 (SEZ_prefix): New code attribute.
4362 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
4363 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
4364 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
4365 of numerical value.
4366 (noncommutative_operator): Check the availability of barrel
4367 shifter option.
4368
4369 2018-04-09 Richard Biener <rguenther@suse.de>
4370
4371 PR tree-optimization/85284
4372 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
4373 Only use the niter constraining form of simple_iv when the exit
4374 is always executed.
4375
4376 2018-04-09 Tom de Vries <tom@codesourcery.com>
4377
4378 PR target/84041
4379 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
4380 (define_expand "*memory_barrier"): New define_expand.
4381 (define_insn "memory_barrier"): New insn.
4382
4383 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4384
4385 PR rtl-optimization/80463
4386 PR rtl-optimization/83972
4387 PR rtl-optimization/83480
4388
4389 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
4390 correct producer for the insn.
4391 (tidy_control_flow): Fixup seqnos in case of debug insns.
4392
4393 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4394
4395 PR rtl-optimization/83913
4396
4397 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
4398 different sched-times when merging exprs.
4399
4400 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4401
4402 PR rtl-optimization/83962
4403
4404 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
4405 tidy_fallthru_edge and tidy_control_flow.
4406
4407 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
4408
4409 PR rtl-optimization/83530
4410
4411 * sel-sched.c (force_next_insn): New global variable.
4412 (remove_insn_for_debug): When force_next_insn is true, also leave only
4413 next insn in the ready list.
4414 (sel_sched_region): When the region wasn't scheduled, make another pass
4415 over it with force_next_insn set to 1.
4416
4417 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
4418
4419 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
4420 into tm_file.
4421 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4422 for interrupt control.
4423 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4424 functions for interrupt control.
4425 * config/nds32/nds32-intrinsic.md: Likewise.
4426 * config/nds32/nds32_intrinsic.h: Likewise.
4427 * config/nds32/nds32.h (nds32_builtins): Likewise.
4428
4429 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
4430
4431 * config/nds32/nds32.c (nds32_init_machine_status,
4432 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
4433 strict_aligned_p field.
4434 (nds32_expand_to_rtl_hook): New function.
4435 (TARGET_EXPAND_TO_RTL_HOOK): Define.
4436 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
4437
4438 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4439 Chung-Ju Wu <jasonwucj@gmail.com>
4440
4441 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
4442 * config/nds32/nds32-n7.md: New file.
4443 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
4444 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
4445 pipeline.
4446 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
4447 * config/nds32/nds32.md (pipeline_model): Add n7.
4448 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
4449 * config/nds32/pipelines.md: Include n7 settings.
4450
4451 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4452 Chung-Ju Wu <jasonwucj@gmail.com>
4453
4454 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
4455 * config/nds32/nds32-e8.md: New file.
4456 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
4457 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
4458 pipeline.
4459 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
4460 * config/nds32/nds32.md (pipeline_model): Add e8.
4461 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
4462 * config/nds32/pipelines.md: Include e8 settings.
4463
4464 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4465 Chung-Ju Wu <jasonwucj@gmail.com>
4466
4467 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
4468 * config/nds32/nds32-n8.md: New file.
4469 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
4470 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
4471 pipeline.
4472 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
4473 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
4474 * config/nds32/nds32.md (pipeline_model): Add n8.
4475 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
4476 * config/nds32/pipelines.md: Include n8 settings.
4477
4478 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
4479 Chung-Ju Wu <jasonwucj@gmail.com>
4480
4481 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
4482 * config/nds32/nds32-n9-2r1w.md: New file.
4483 * config/nds32/nds32-n9-3r2w.md: New file.
4484 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
4485 nds32_register_ports): New or modify for cpu n9.
4486 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
4487 pipeline.
4488 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
4489 * config/nds32/nds32-utils.c: New file.
4490 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
4491 TARGET_MUL_SLOW): Define.
4492 * config/nds32/nds32.md (pipeline_model): New attribute.
4493 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
4494 New options that support cpu n9.
4495 * config/nds32/pipelines.md: Include n9 settings.
4496 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
4497
4498 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
4499
4500 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
4501 information if necessary.
4502 (output_cond_branch_compare_zero): Likewise.
4503 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
4504 (nds32_target_alignment): Refine for alignment.
4505 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
4506 (FUNCTION_BOUNDARY): Modify.
4507 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
4508 align case.
4509 * config/nds32/nds32.opt (malways-align, malign-functions): New.
4510
4511 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
4512
4513 * config/nds32/constants.md (unspec_volatile_element): Add values for
4514 TLB operation and data prefetch.
4515 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
4516 functions for TLB operation and data prefetch.
4517 * config/nds32/nds32-intrinsic.md: Likewise.
4518 * config/nds32/nds32_intrinsic.h: Likewise.
4519 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
4520 (nds32_print_operand): Likewise.
4521 * config/nds32/nds32.h (nds32_builtins): Likewise.
4522
4523 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
4524 Andrew Pinski <pinsika@gcc.gnu.org>
4525
4526 PR middle-end/82976
4527 * match.pd: Use constant_boolean_node of correct type instead of
4528 boolean_true_node or boolean_false_node for simplifying
4529 pointer comparisons to zero.
4530
4531 2018-04-07 Jakub Jelinek <jakub@redhat.com>
4532
4533 PR tree-optimization/80021
4534 * tree.c (verify_type_variant): Make error call in verify_variant_match
4535 translatable and remove final full stop.
4536
4537 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4538
4539 * config/nds32/constants.md (unspec_volatile_element): Add
4540 UNSPEC_VOLATILE_EH_RETURN.
4541 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
4542 nds32_output_stack_pop): Support dwarf exception handling process.
4543 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
4544 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
4545 exception handling process.
4546 (nds32_compute_stack_frame): Likewise.
4547 (nds32_return_addr_rtx): Likewise.
4548 (nds32_initial_elimination_offset): Likewise.
4549 (nds32_expand_prologue): Likewise.
4550 (nds32_expand_epilogue): Likewise.
4551 (nds32_dynamic_chain_address): New function.
4552 * config/nds32/nds32.h (machine_function): Add fields for dwarf
4553 exception handling.
4554 (DYNAMIC_CHAIN_ADDRESS): Define.
4555 (EH_RETURN_DATA_REGNO): Define.
4556 (EH_RETURN_STACKADJ_RTX): Define.
4557 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
4558 patterns for dwarf exception handling.
4559
4560 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4561
4562 * config/nds32/nds32.h: Clean up obsolete macros.
4563
4564 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4565
4566 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4567 Add enum values for particular instructions.
4568 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4569 particular intrinsic functions.
4570 * config/nds32/nds32-intrinsic.md: Likewise.
4571 * config/nds32/nds32_intrinsic.h: Likewise.
4572 * config/nds32/nds32.h (nds32_builtins): Likewise.
4573 * config/nds32/nds32.md (type): Add pbsad and pbsada.
4574 (btst, ave): New patterns for particular instructions.
4575
4576 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4577
4578 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
4579 Add enum values for atomic load/store and memory sync.
4580 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
4581 and memory sync.
4582 * config/nds32/nds32-intrinsic.md: Likewise.
4583 * config/nds32/nds32_intrinsic.h: Likewise.
4584 * config/nds32/nds32.h (nds32_builtins): Likewise.
4585
4586 2018-04-07 Jakub Jelinek <jakub@redhat.com>
4587
4588 PR tree-optimization/85257
4589 * fold-const.c (native_encode_vector): If not all elts could fit
4590 and off is -1, return 0 rather than offset.
4591 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
4592 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
4593 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
4594 adjust buffer in native_interpret_expr call.
4595
4596 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4597
4598 * config/nds32/constants.md (unspec_volatile_element): Add cache
4599 control enum values.
4600 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
4601 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
4602 * config/nds32/nds32.c (nds32_cctl_names): New.
4603 (nds32_print_operand): Handle cache control register names.
4604 * config/nds32/nds32.h (nds32_builtins): New enum values.
4605 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
4606 macros.
4607 * config/nds32/nds32.md (type): Add mmu.
4608 * config/nds32/pipelines.md (simple_insn): Add mmu.
4609
4610 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4611
4612 * config/nds32/nds32.md (type): Remove call.
4613 * config/nds32/pipelines.md (simple_insn): Likewise.
4614
4615 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4616
4617 * config/nds32/constants.md (unspec_volatile_element): Add
4618 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
4619 UNSPEC_VOLATILE_FMFCFG.
4620 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
4621 description for fmfcfg and fmfcsr.
4622 (bdesc_1arg): Add fmtcsr.
4623 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
4624 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
4625 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
4626 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
4627 unspec_fmfcfg): New patterns.
4628 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
4629 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
4630 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
4631 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
4632 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
4633 __nds32__fmfcfg): Define.
4634
4635 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
4636
4637 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
4638 intrinsic register names.
4639 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
4640 intrinsic register enum values and macros.
4641
4642 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
4643
4644 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
4645 for load/store addressing form.
4646 (nds32_print_operand_address): Likewise.
4647
4648 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
4649
4650 PR target/85196
4651 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
4652 based on LABEL_REF. Remove useless assertion.
4653 (pic_address_needs_scratch): Fix formatting.
4654 (sparc_legitimize_pic_address): Minor tweaks.
4655 (sparc_delegitimize_address): Adjust assertion accordingly.
4656 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
4657 into symbolic_operand.
4658 (movsi_high_pic_label_ref): Likewise.
4659 (movsi_lo_sum_pic_label_ref): Likewise.
4660 (movdi_pic_label_ref): Likewise.
4661 (movdi_high_pic_label_ref): Likewise.
4662 (movdi_lo_sum_pic_label_ref): Likewise.
4663
4664 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
4665
4666 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
4667 custom LIB_SPEC setup.
4668
4669 2018-04-06 Ruslan Bukin <br@bsdpad.com>
4670 Kito Cheng <kito.cheng@gmail.com>
4671
4672 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
4673 * config/riscv/freebsd.h: New.
4674
4675 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
4676
4677 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
4678 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
4679 file.
4680
4681 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
4682 Kito Cheng <kito.cheng@gmail.com>
4683
4684 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
4685 nds32_output_call, nds32_symbol_binds_local_p): New functions.
4686 * config/nds32/nds32-protos.h (nds32_output_call,
4687 nds32_output_return): Declare.
4688 * config/nds32/nds32.md: Refine all the call and return patterns.
4689
4690 2018-04-06 Jakub Jelinek <jakub@redhat.com>
4691
4692 PR debug/85252
4693 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
4694 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
4695
4696 PR rtl-optimization/84872
4697 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
4698 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
4699 EDGE_CROSSING edge.
4700
4701 2018-04-06 Tamar Christina <tamar.christina@arm.com>
4702
4703 * expr.c (copy_blkmode_to_reg): Revert 254862.
4704 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
4705
4706 2018-04-06 Richard Biener <rguenther@suse.de>
4707
4708 PR middle-end/85244
4709 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
4710 after seeing a component reference with an adjacent field. Treat
4711 refs to arrays at struct end of external decls similar to
4712 refs to unconstrained commons.
4713
4714 2018-04-06 Jakub Jelinek <jakub@redhat.com>
4715
4716 PR sanitizer/85213
4717 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
4718 look through SAVE_EXPRs with non-side-effects argument. Adjust
4719 recursive calls.
4720 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
4721 save_p here.
4722
4723 2018-04-06 Richard Biener <rguenther@suse.de>
4724
4725 PR middle-end/85180
4726 * alias.c (find_base_term): New wrapper around find_base_term
4727 unwinding CSELIB_VAL_PTR changes.
4728 (find_base_term): Do not restore CSELIB_VAL_PTR during the
4729 recursion.
4730
4731 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
4732
4733 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
4734 instructions.
4735 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
4736 constant definitions.
4737 ("nop"): lr 0,0 -> nopr r0
4738 ("nop_lr0", "nop_lr1"): New insn definitions.
4739
4740 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
4741
4742 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
4743 NDS32_V3PUSH_AVAILABLE_P macro.
4744
4745 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
4746 Chung-Ju Wu <jasonwucj@gmail.com>
4747
4748 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
4749 (nds32*-*-*): Add float and fpu_config into supported_defaults.
4750 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
4751 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
4752 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
4753 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
4754 * config/nds32/constraints.md: New constraints and checking for hard
4755 float configuration.
4756 * config/nds32/iterators.md: New mode iterator and attribute for hard
4757 float configuration.
4758 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
4759 patterns.
4760 * config/nds32/nds32-fpu.md: New file.
4761 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
4762 deal with hard float code generation.
4763 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
4764 ARCH_V3S.
4765 (abi_type, float_reg_number): New enum type.
4766 * config/nds32/nds32-predicates.c: New predicates for hard float.
4767 * config/nds32/nds32-protos.h: Declare functions for hard float.
4768 * config/nds32/nds32.c: Implementation for hard float configuration.
4769 * config/nds32/nds32.h: Definitions for hard float configuration.
4770 * config/nds32/nds32.md: Include hard float machine description and
4771 modify patterns for hard float configuration.
4772 * config/nds32/nds32.opt: New options for hard float configuration.
4773 * config/nds32/predicates.md: New predicates for hard float
4774 configuration.
4775
4776 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
4777
4778 * common/config/nds32/nds32-common.c
4779 (nds32_option_optimization_table): Enable -mreleax-hint by default.
4780
4781 2018-04-05 Jakub Jelinek <jakub@redhat.com>
4782
4783 PR middle-end/85195
4784 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
4785 CONSTRUCTOR_ELT (ctor, ...)->value.
4786
4787 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
4788
4789 PR target/85193
4790 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
4791
4792 2018-04-05 Tom de Vries <tom@codesourcery.com>
4793
4794 PR target/85204
4795 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
4796 cond jump.
4797
4798 2018-04-05 Shiva Chen <shiva0217@gmail.com>
4799 Kito Cheng <kito.cheng@gmail.com>
4800
4801 * config/nds32/constraints.md (U33): Fine-tune checking condition.
4802 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
4803 * config/nds32/nds32.h (nds32_16bit_address_type): Add
4804 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
4805
4806 2018-04-05 Shiva Chen <shiva0217@gmail.com>
4807 Kito Cheng <kito.cheng@gmail.com>
4808
4809 * config/nds32/constraints.md (Ufe): New memory constraint.
4810 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
4811 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
4812 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
4813 operands.
4814 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
4815 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
4816
4817 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4818
4819 * config/nds32/nds32.md: Use optimize_size in the condition for
4820 alu-shift instructions.
4821
4822 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4823
4824 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
4825
4826 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4827
4828 * config/nds32/nds32.md (negsi2): Refine pattern.
4829
4830 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
4831 Chung-Ju Wu <jasonwucj@gmail.com>
4832
4833 * config/nds32/iterators.md (shift_rotate): New code iterator.
4834 (shift): New code attribute.
4835 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
4836 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
4837 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
4838 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
4839 bit-wise operations.
4840 (andsi3, *andsi3): Ditto.
4841 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
4842 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
4843 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
4844 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
4845 nds32_ior_operand, nds32_xor_operand): New predicates.
4846
4847 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4848
4849 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
4850 (addsi3, subsi3): ... this.
4851
4852 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4853
4854 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
4855
4856 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4857
4858 * config/nds32/nds32.md: Adjust indention.
4859
4860 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
4861
4862 * config/nds32/nds32.md (feature): New attribute.
4863
4864 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
4865
4866 * config/nds32/nds32.md (subtype): New attribute.
4867
4868 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
4869
4870 PR target/85203
4871 * config/arm/arm-builtins.c (arm_expand_builtin): Change
4872 expansion to perform a bitwise AND of the argument followed by a
4873 boolean negation of the result.
4874
4875 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
4876
4877 PR rtl-optimization/84878
4878 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
4879 the basic block. Assert the use reference is not artificial and that
4880 it has an associated insn.
4881
4882 2018-04-04 Michael Matz <matz@suse.de>
4883
4884 * builtins.c (compute_objsize): Pass correct operand
4885 to array_at_struct_end_p.
4886
4887 2018-04-04 Richard Biener <rguenther@suse.de>
4888
4889 PR lto/85176
4890 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
4891 from contexts for DINFO_LEVEL_TERSE and below.
4892
4893 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
4894
4895 * config/nds32/nds32-doubleword.md (move_<mode>): Require
4896 resiter_operand condition.
4897 * config/nds32/nds32.md (*move<mode>): Ditto.
4898
4899 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
4900 Monk Chiang <sh.chiang04@gmail.com>
4901
4902 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
4903
4904 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
4905
4906 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
4907
4908 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
4909 Kito Cheng <kito.cheng@gmail.com>
4910
4911 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
4912 nds32_cond_code_str, output_cond_branch,
4913 output_cond_branch_compare_zero, nds32_expand_cbranch,
4914 nds32_expand_cstore, nds32_expand_movcc,
4915 nds32_output_cbranchsi4_equality_zero,
4916 nds32_output_cbranchsi4_equality_reg,
4917 nds32_output_cbranchsi4_equality_reg_or_const_int,
4918 nds32_output_cbranchsi4_greater_less_zero: New functions.
4919 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
4920 nds32_expand_cstore, nds32_expand_movcc,
4921 nds32_output_cbranchsi4_equality_zero,
4922 nds32_output_cbranchsi4_equality_reg,
4923 nds32_output_cbranchsi4_equality_reg_or_const_int,
4924 nds32_output_cbranchsi4_greater_less_zero): Declare.
4925 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
4926 nds32_rimm11s_operand): New predicates.
4927 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
4928 * config/nds32/nds32.md: Rewrite all the branch and conditional move
4929 patterns.
4930
4931 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
4932
4933 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
4934 * config/nds32/nds32.md: Ditto.
4935 * config/nds32/pipelines.md: Ditto.
4936
4937 2018-04-04 Richard Biener <rguenther@suse.de>
4938
4939 PR tree-optimization/85168
4940 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
4941 propagating abnormals.
4942
4943 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
4944
4945 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
4946
4947 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
4948 Kito Cheng <kito.cheng@gmail.com>
4949
4950 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
4951 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
4952 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
4953 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
4954 * config/nds32/nds32.md (sibcall_internal): New.
4955 (sibcall_register): Remove.
4956 (sibcall_immediate): Remove.
4957 (sibcall_value_internal): New.
4958 (sibcall_value_register): Remove.
4959 (sibcall_value_immediate): Remove.
4960 * config/nds32/predicates.md (nds32_general_register_operand): New.
4961 (nds32_call_address_operand): New.
4962
4963 2018-04-03 Jakub Jelinek <jakub@redhat.com>
4964
4965 PR rtl-optimization/85167
4966 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
4967 bb_defs if *split_p, instead preinitialize it to NULL.
4968
4969 PR tree-optimization/85156
4970 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
4971 evaluating the argument multiple times.
4972
4973 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
4974
4975 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
4976 than vector.
4977 (_mm_cvtpd_ps): Likewise.
4978 (_mm_cvttpd_epi32): Likewise.
4979 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
4980 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
4981 vector, pixel, and bool following altivec.h include.
4982
4983 2018-04-03 Martin Sebor <msebor@redhat.com>
4984
4985 * doc/extend.texi (Common Function Attributes): Clarify.
4986 (const attribute): Likewise.
4987 (pure attribute): Likewise.
4988
4989 2018-04-03 Jakub Jelinek <jakub@redhat.com>
4990
4991 PR target/85169
4992 * config/i386/i386.c (ix86_expand_vector_set): Use
4993 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
4994
4995 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
4996
4997 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
4998 instructions when changing rounding bits to preserve precision bits
4999 in the x87 control word.
5000
5001 2018-04-03 Martin Liska <mliska@suse.cz>
5002
5003 PR tree-optimization/82491
5004 * rtl.h (strip_offset_and_add): Replace += suboffset with
5005 poly_uint64 () + suboffset.
5006
5007 2018-03-29 Martin Liska <mliska@suse.cz>
5008 Martin Jambor <mjambor@suse.cz>
5009
5010 PR ipa/84947
5011 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
5012 param_type is not an integral or pointer type.
5013
5014 2018-04-03 Richard Biener <rguenther@suse.de>
5015
5016 * sese.h (recompute_all_dominators): Remove.
5017
5018 2018-04-02 Martin Sebor <msebor@redhat.com>
5019
5020 * doc/invoke.texi (-Wrestrict): Fix typos.
5021
5022 2018-04-02 Jim Wilson <jimw@sifive.com>
5023
5024 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
5025 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
5026 (<optab>di3, <optab>si3_extend): Likewise.
5027 (<optab>si3_mask, <optab>si3_mask_1): New.
5028 (<optab>di3_mask, <optab>di3_mask_1): New.
5029 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
5030 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
5031 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
5032
5033 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
5034
5035 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
5036 example.
5037
5038 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
5039
5040 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
5041 (nds32_canonicalize_comparison): New function.
5042
5043 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5044 Kito Cheng <kito.cheng@gmail.com>
5045 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5046
5047 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
5048 * config/nds32/constants.md (unspec_volatile_element): Add
5049 UNSPEC_VOLATILE_RELAX_GROUP.
5050 * config/nds32/nds32-relax-opt.c: New file.
5051 * config/nds32/nds32-predicates.c
5052 (nds32_symbol_load_store_p): New function.
5053 * config/nds32/nds32-protos.h
5054 (nds32_symbol_load_store_p): Declare function.
5055 (make_pass_nds32_relax_opt): Declare new rtl pass function.
5056 * config/nds32/nds32.c
5057 (nds32_register_pass): New function to register pass.
5058 (nds32_register_passes): New function to register passes.
5059 * config/nds32/nds32.md (relax_group): New pattern.
5060 * config/nds32/nds32.opt (mrelax-hint): New option.
5061 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
5062
5063 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
5064
5065 * config/nds32/t-nds32: Modify files dependency.
5066
5067 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5068
5069 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
5070 (PROFILE_HOOK): Define its implementation.
5071
5072 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
5073
5074 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
5075 type and 32-bit size.
5076
5077 2018-04-01 Jakub Jelinek <jakub@redhat.com>
5078
5079 PR middle-end/85090
5080 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
5081 (V_128_256): New mode iterator.
5082 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
5083 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
5084 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
5085 of V.
5086 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
5087 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
5088
5089 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
5090
5091 PR target/83315
5092 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
5093 NaN inputs correctly.
5094
5095 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
5096
5097 PR target/80546
5098 * config/rs6000/vsx.md (??r): New mode attribute.
5099 (*vsx_mov<mode>_64bit): Use it.
5100 (*vsx_mov<mode>_32bit): Likewise.
5101
5102 2018-03-30 Martin Sebor <msebor@redhat.com>
5103
5104 PR tree-optimization/84818
5105 * builtins.c (check_access): Use warning_n.
5106
5107 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
5108
5109 PR target/83822
5110 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
5111 condition.
5112 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
5113 condition.
5114
5115 2018-03-30 Julia Koval <julia.koval@intel.com>
5116
5117 PR target/84413
5118 * x86-tune.def (movx, partial_reg_dependency): Enable for
5119 m_SKYLAKE_AVX512.
5120
5121 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
5122
5123 PR inline-asm/84985
5124 * lra-constraints.c (process_alt_operands): Move setting
5125 this_alternative_matches below.
5126
5127 2018-03-29 Martin Liska <mliska@suse.cz>
5128
5129 PR lto/84995.
5130 * doc/invoke.texi: Document how LTO works with debug info.
5131 Describe auto-load support of binutils. Mention 'x86-64'
5132 as valid option value of -march option.
5133
5134 2018-03-29 Jakub Jelinek <jakub@redhat.com>
5135
5136 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
5137
5138 PR c/85094
5139 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
5140 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
5141 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
5142 checking.
5143
5144 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
5145
5146 PR target/84912
5147 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
5148 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
5149 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
5150 for RS6000_BTM_POWERPC64.
5151 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
5152 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
5153 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
5154 definition.
5155 (DIVDE): Use it.
5156 (DIVDEU): Likewise.
5157
5158 2018-03-28 Carl Love <cel@us.ibm.com>
5159
5160 Revert
5161 2017-09-27 Carl Love <cel@us.ibm.com>
5162
5163 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
5164 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
5165 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
5166 fctiw instruction.
5167
5168 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5169
5170 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
5171 instead of __vector bool.
5172 (_mm_max_pu8): Likewise.
5173 (_mm_min_pi16): Likewise.
5174
5175 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
5176
5177 PR target/84912
5178 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
5179 (DIVWEUO): Likewise.
5180 (DIVDEO): Likewise.
5181 (DIVDEUO): Likewise.
5182 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
5183 DIVWEUO and DIVDEUO.
5184 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
5185 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
5186 (div_extend): Likewise.
5187 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
5188 builtin function.
5189 (__builtin_divweuo): Likewise.
5190 (__builtin_divdeo): Likewise.
5191 (__builtin_divdeuo): Likewise.
5192
5193 2018-03-28 Jakub Jelinek <jakub@redhat.com>
5194
5195 PR target/85095
5196 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
5197 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
5198
5199 PR tree-optimization/82004
5200 * gimple-match-head.c (optimize_pow_to_exp): New function.
5201 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
5202 Don't fold to exp if optimize_pow_to_exp is false.
5203
5204 2018-03-28 Martin Liska <mliska@suse.cz>
5205
5206 PR other/84819
5207 * calls.c (initialize_argument_information): Fix trailing space.
5208 * common.opt: Fix typo and provide better explanation for
5209 -fsanitize-coverage option.
5210 * config/i386/i386.opt: Fix typo.
5211
5212 2018-03-28 Jakub Jelinek <jakub@redhat.com>
5213 Martin Liska <mliska@suse.cz>
5214
5215 PR sanitizer/85081
5216 * gimplify.c (asan_poison_variable): Don't do the check for
5217 gimplify_omp_ctxp here.
5218 (gimplify_decl_expr): Do it here.
5219 (gimplify_target_expr): Likewise.
5220
5221 2018-03-28 Martin Liska <mliska@suse.cz>
5222
5223 PR target/84988
5224 * config/i386/i386.c (ix86_function_arg_advance): Do not call
5225 chkp_type_bounds_count if MPX is not enabled.
5226
5227 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
5228
5229 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
5230
5231 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5232
5233 PR target/84914
5234 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
5235 function to create the function decl for complex long double
5236 multiply and divide for -mabi=ieeelongdouble.
5237 (init_float128_ieee): Call it.
5238
5239 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
5240
5241 PR target/85044
5242 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
5243 -fcf-protection=branch -mibt.
5244 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
5245
5246 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5247
5248 PR target/81863
5249 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
5250
5251 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
5252
5253 PR target/85056
5254 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
5255 extern array declarations.
5256
5257 2018-03-27 Richard Biener <rguenther@suse.de>
5258
5259 PR middle-end/84067
5260 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
5261 explicit single_use checks.
5262
5263 2018-03-27 Richard Biener <rguenther@suse.de>
5264
5265 PR tree-optimization/85082
5266 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
5267 Valueize the VUSE.
5268
5269 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5270
5271 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
5272 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
5273 Turn on fasynchronous-unwind-tables and funwind-tables.
5274
5275 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
5276
5277 PR target/85073
5278 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
5279 (*bmi_blsr_<mode>_ccz): Ditto.
5280
5281 2018-03-26 Tom de Vries <tom@codesourcery.com>
5282
5283 PR tree-optimization/85063
5284 * omp-general.c (offloading_function_p): New function. Factor out
5285 of ...
5286 * omp-offload.c (pass_omp_target_link::gate): ... here.
5287 * omp-general.h (offloading_function_p): Declare.
5288 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
5289 with attribute omp declare target for offloading functions.
5290
5291 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
5292
5293 PR tree-optimization/84005
5294 * tree-data-ref.h (get_base_for_alignment): Declare.
5295 * tree-data-ref.c (get_base_for_alignment_1): New function.
5296 (get_base_for_alignment): Likewise.
5297 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
5298 get_base_for_alignment to find a suitable base object, instead
5299 of always using drb->base_address.
5300
5301 2018-03-23 Jakub Jelinek <jakub@redhat.com>
5302
5303 PR inline-asm/85022
5304 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
5305 known size by default.
5306
5307 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
5308
5309 PR inline-asm/85030
5310 * lra-constraints.c (process_alt_operands): Don't match BLKmode
5311 and non BLKmode operands.
5312
5313 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5314
5315 PR target/85026
5316 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
5317 Clean up attributes.
5318
5319 2018-03-23 Richard Biener <rguenther@suse.de>
5320
5321 PR debug/85020
5322 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
5323 we are going to emit early debug for LTO.
5324
5325 2018-03-23 Jakub Jelinek <jakub@redhat.com>
5326
5327 PR inline-asm/85034
5328 * function.c (match_asm_constraints_1): Don't optimize if input
5329 doesn't satisfy general_operand predicate for output's mode.
5330
5331 PR inline-asm/85022
5332 * alias.c (write_dependence_p): Don't require for x_canonicalized
5333 non-VOIDmode if x has VOIDmode.
5334
5335 PR sanitizer/85029
5336 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
5337 just don't try to optimize it rather than assert it never happens.
5338
5339 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5340
5341 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
5342 macro expansions for definition of ST_INTERNAL_<mode> and
5343 LD_INTERNAL_<mode> builtins.
5344 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
5345 Remove prototype.
5346 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
5347 function.
5348 (altivec_expand_st_builtin): Likewise.
5349 (altivec_expand_builtin): Remove calls to deleted functions.
5350 (rs6000_address_for_altivec): Delete this function.
5351 * config/rs6000/vector.md: Remove expands for
5352 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
5353
5354 2018-03-22 Sudakshina Das <sudi.das@arm.com>
5355
5356 PR target/84826
5357 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
5358 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
5359 re-computing once computed.
5360 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
5361 (arm_init_machine_status): Initialize
5362 machine->static_chain_stack_bytes.
5363
5364 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
5365
5366 PR target/84760
5367 * doc/extend.texi: Add four new prototypes for vec_ld.
5368 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
5369 definitions for more logical presentation.
5370 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
5371 entries for V1TI variants of __builtin_altivec_ld builtin.
5372 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
5373 handling of V1TI variant of LVX icode pattern.
5374 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
5375 (rs6000_gimple_fold_builtin): Likewise.
5376 (altivec_init_builtins): Add code to define
5377 __builtin_altivec_lvx_v1ti function.
5378
5379 2018-03-22 Jakub Jelinek <jakub@redhat.com>
5380
5381 PR inline-asm/84941
5382 * function.c (match_asm_constraints_1): Don't do the optimization
5383 if input isn't a REG, SUBREG, MEM or constant.
5384
5385 2018-03-22 Tom de Vries <tom@codesourcery.com>
5386
5387 PR tree-optimization/84956
5388 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
5389 bb_has_abnormal_pred.
5390
5391 2018-03-22 Jakub Jelinek <jakub@redhat.com>
5392
5393 PR sanitizer/85018
5394 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
5395 DECL_INITIAL (decl) to decl at the end.
5396 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
5397 adjust the comment.
5398
5399 2018-03-21 Joseph Myers <joseph@codesourcery.com>
5400
5401 * doc/extend.texi (__builtin_tgmath): Document when complex
5402 integer types are treated as _Complex _Float64.
5403
5404 2018-03-21 Tom de Vries <tom@codesourcery.com>
5405
5406 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
5407
5408 2018-03-21 Jakub Jelinek <jakub@redhat.com>
5409
5410 PR tree-optimization/84960
5411 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
5412 if it is ENTRY block, move them into single succ of ENTRY in that case.
5413
5414 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
5415
5416 PR tree-optimization/84811
5417 * poly-int.h (poly_span_traits): Remove the T3 parameter and
5418 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
5419 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
5420 (known_subrange_p): Update accordingly. Cast each value involved
5421 in the size comparison, rather than casting the result of the
5422 subtraction.
5423
5424 2018-03-21 Jakub Jelinek <jakub@redhat.com>
5425
5426 PR tree-optimization/84982
5427 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
5428 by flipping the least significant bit rather than all bits from
5429 bitpos to bitpos + bitsize - 1.
5430
5431 2018-03-21 Nathan Sidwell <nathan@acm.org>
5432
5433 * doc/extend.texi (Deprecated Features): Remove mention of
5434 long-deleted deprecations.
5435
5436 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5437
5438 PR jit/84288
5439 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
5440 * configure: Regenerate.
5441
5442 2018-03-21 Tom de Vries <tom@codesourcery.com>
5443
5444 PR tree-optimization/83126
5445 * tree-parloops.c (num_phis): New function.
5446 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
5447
5448 2018-03-21 Nathan Sidwell <nathan@acm.org>
5449
5450 * doc/extend.texi (Deprecated Features): Update deprecated flags,
5451 mention anon-struct/union members and trailing attributes.
5452
5453 2018-03-21 Bin Cheng <bin.cheng@arm.com>
5454
5455 PR tree-optimization/84969
5456 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
5457 builtin memset partitions if they set different rhs values.
5458
5459 2018-03-21 Jakub Jelinek <jakub@redhat.com>
5460
5461 PR rtl-optimization/84989
5462 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
5463 VEC_DUPLICATE with scalar result mode.
5464
5465 2018-03-21 Martin Liska <mliska@suse.cz>
5466
5467 PR ipa/84963
5468 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
5469 not intended return statement.
5470
5471 2018-03-21 Martin Liska <mliska@suse.cz>
5472
5473 PR target/84988
5474 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
5475 (chkp_find_bound_slots_1): Limit number of iterations.
5476
5477 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
5478
5479 PR target/84838
5480 * Minor grammar fixes for x86 options.
5481
5482 2018-03-20 Jakub Jelinek <jakub@redhat.com>
5483
5484 PR debug/84875
5485 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
5486 holding REG_CFA_RESTORE notes, instead turn them into a USE.
5487
5488 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
5489
5490 PR target/83789
5491 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
5492 (altivec_lvx_<mode>_1op): Likewise.
5493 (altivec_stvx_<mode>_2op): Likewise.
5494 (altivec_stvx_<mode>_1op): Likewise.
5495 (altivec_lvx_<VM2:mode>): New define_expand.
5496 (altivec_stvx_<VM2:mode>): Likewise.
5497 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
5498 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5499 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
5500 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
5501 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
5502 (rs6000_gen_lvx): Likewise.
5503 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
5504 (altivec_expand_stv_builtin): Likewise.
5505 (altivec_expand_builtin): Likewise.
5506 * config/rs6000/vector.md: Likewise.
5507
5508 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5509
5510 PR target/82518
5511 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
5512 BYTES_BIG_ENDIAN.
5513
5514 2018-03-20 Richard Biener <rguenther@suse.de>
5515
5516 PR target/84986
5517 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
5518 sign-conversions as zero, fall back to standard scalar_stmt
5519 cost for the rest.
5520
5521 2018-03-20 Martin Liska <mliska@suse.cz>
5522
5523 PR ipa/84825
5524 * predict.c (rebuild_frequencies): Handle case when we have
5525 PROFILE_ABSENT, but flag_guess_branch_prob is false.
5526
5527 2018-03-20 Jakub Jelinek <jakub@redhat.com>
5528
5529 PR target/84990
5530 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
5531 flag_section_anchors.
5532 * varasm.c (use_blocks_for_decl_p): Remove hack for
5533 dw2_force_const_mem.
5534
5535 PR target/84845
5536 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
5537 to ...
5538 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
5539 be created, use lowpart_subreg of operands[0] rather than operands[0]
5540 itself.
5541 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
5542 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
5543 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
5544 and n constraint instead of aarch64_shift_imm_di and Usd.
5545 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
5546 (*aarch64_<optab>_reg_minus<mode>3): ... this.
5547
5548 2018-03-20 Sudakshina Das <sudi.das@arm.com>
5549
5550 PR target/82989
5551 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
5552 to favor GPR over NEON registers.
5553 (<shift>di3_neon): Likewise.
5554
5555 2018-03-20 Tom de Vries <tom@codesourcery.com>
5556
5557 PR target/84952
5558 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
5559 (nvptx_process_pars): Emit bar.sync asap and alap.
5560
5561 2018-03-20 Tom de Vries <tom@codesourcery.com>
5562
5563 PR target/84954
5564 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
5565 seen_label if seen_label is already set.
5566
5567 2018-03-20 Jakub Jelinek <jakub@redhat.com>
5568
5569 PR target/84945
5570 * config/i386/i386.c (fold_builtin_cpu): For features above 31
5571 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
5572 Use 1U instead of 1. Formatting fixes.
5573
5574 PR c/84953
5575 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
5576 instead of TREE_TYPE (s1) for the return value.
5577
5578 2018-03-19 Jakub Jelinek <jakub@redhat.com>
5579
5580 PR tree-optimization/84946
5581 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
5582 bitsize + bitsize in poly_uint64 rather than poly_int64.
5583
5584 PR sanitizer/78651
5585 * dwarf2asm.c: Include fold-const.c.
5586 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
5587 of decl rather than decl itself.
5588
5589 PR rtl-optimization/84643
5590 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
5591
5592 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
5593
5594 PR sanitizer/78651
5595 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
5596 calling assemble_variable.
5597
5598 2018-03-19 Sudakshina Das <sudi.das@arm.com>
5599
5600 PR target/81647
5601 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
5602 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
5603
5604 2018-03-19 Jim Wilson <jimw@sifive.com>
5605
5606 PR bootstrap/84856
5607 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
5608 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
5609 (riscv_first_stack_step): Likewise.
5610 (riscv_option_override): Use STACK_BOUNDARY instead of
5611 MIN_STACK_BOUNDARY.
5612 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
5613 MIN_STACK_BOUNDARY.
5614 (BIGGEST_ALIGNMENT): Set to 128.
5615 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
5616 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
5617 STACK_BOUNDARY.
5618
5619 2018-03-19 Richard Biener <rguenther@suse.de>
5620
5621 PR tree-optimization/84933
5622 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
5623 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
5624
5625 2018-03-19 Richard Biener <rguenther@suse.de>
5626
5627 PR tree-optimization/84859
5628 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
5629 (cond_if_else_store_replacement): Perform sinking operation on
5630 single-store BBs regardless of MAX_STORES_TO_SINK setting.
5631 Generalize what a BB with a single eligible store is.
5632
5633 2018-03-19 Richard Biener <rguenther@suse.de>
5634
5635 PR tree-optimization/84929
5636 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
5637 chrec_is_positive against non-chrec arg.
5638
5639 2018-03-19 Tamar Christina <tamar.christina@arm.com>
5640
5641 PR target/84711
5642 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
5643
5644 2018-03-18 Martin Liska <mliska@suse.cz>
5645
5646 PR rtl-optimization/84635
5647 * regrename.c (build_def_use): Use matches_mode only when
5648 matches >= 0.
5649
5650 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
5651
5652 PR tree-optimization/84913
5653 * tree-vect-loop.c (vectorizable_reduction): Don't try to
5654 vectorize chains of COND_EXPRs.
5655
5656 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
5657
5658 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
5659
5660 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
5661
5662 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
5663
5664 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
5665
5666 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
5667
5668 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
5669 Kito Cheng <kito.cheng@gmail.com>
5670
5671 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
5672 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
5673 (nds32_adjust_reg_alloc_order): New function.
5674 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
5675
5676 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
5677
5678 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
5679 nds32_print_operand, nds32_print_operand_address): Use
5680 HOST_WIDE_INT_PRINT_DEC instead.
5681
5682 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
5683
5684 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
5685
5686 2018-03-17 Jakub Jelinek <jakub@redhat.com>
5687
5688 PR target/84902
5689 * config/i386/i386.c (initial_ix86_tune_features,
5690 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
5691 unsigned long long.
5692 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
5693 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
5694 rather than 1u << ix86_tune. Formatting fix.
5695 (ix86_option_override_internal): Change ix86_arch_mask from
5696 unsigned int to unsigned HOST_WIDE_INT, initialize to
5697 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
5698 (ix86_function_specific_restore): Likewise.
5699
5700 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5701
5702 PR target/84899
5703 * postreload.c (reload_combine_recognize_pattern): Perform
5704 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
5705 truncate_int_for_mode the result for the destination's mode.
5706
5707 PR c/84909
5708 * hsa-gen.c (mem_type_for_type): Fix comment typo.
5709 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
5710 Likewise.
5711 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
5712 Likewise.
5713
5714 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
5715
5716 PR target/84876
5717 * lra-assigns.c (lra_split_hard_reg_for): Don't use
5718 regno_allocno_class_array and sorted_pseudos.
5719 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
5720 insns where regno is used.
5721
5722 2018-03-16 Martin Liska <mliska@suse.cz>
5723
5724 PR ipa/84833
5725 * multiple_target.c (create_dispatcher_calls): Redirect
5726 reference in the symbol table.
5727
5728 2018-03-16 Martin Liska <mliska@suse.cz>
5729
5730 PR ipa/84722
5731 * multiple_target.c (create_dispatcher_calls): Redirect also
5732 an alias.
5733
5734 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5735
5736 PR c++/79937
5737 PR c++/82410
5738 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
5739 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
5740 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
5741
5742 2018-03-16 Julia Koval <julia.koval@intel.com>
5743
5744 * doc/invoke.texi (Skylake Server): Add CLWB.
5745 Cannonlake): Remove CLWB.
5746
5747 2018-03-16 Jakub Jelinek <jakub@redhat.com>
5748
5749 PR tree-optimization/84841
5750 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
5751 1 << 3.
5752 (FLOAT_ONE_CONST_TYPE): Define.
5753 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
5754 (sort_by_operand_rank): Put entries with higher constant_type last
5755 rather than first to match comments.
5756
5757 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
5758
5759 * config/nios2/nios2.md (movsi_internal): Fix thinko in
5760 split predicate.
5761
5762 2018-03-15 Jakub Jelinek <jakub@redhat.com>
5763
5764 PR c++/79085
5765 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
5766 check and use address of target always.
5767
5768 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
5769
5770 PR target/84574
5771 * config/i386/i386.c (indirect_thunk_needed): Update comments.
5772 (indirect_thunk_bnd_needed): Likewise.
5773 (indirect_thunks_used): Likewise.
5774 (indirect_thunks_bnd_used): Likewise.
5775 (indirect_return_needed): New.
5776 (indirect_return_bnd_needed): Likewise.
5777 (output_indirect_thunk_function): Add a bool argument for
5778 function return.
5779 (output_indirect_thunk_function): Don't generate alias for
5780 function return thunk.
5781 (ix86_code_end): Call output_indirect_thunk_function to generate
5782 function return thunks.
5783 (ix86_output_function_return): Set indirect_return_bnd_needed
5784 and indirect_return_needed instead of indirect_thunk_bnd_needed
5785 and indirect_thunk_needed.
5786
5787 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
5788
5789 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
5790 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
5791 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
5792
5793 2018-03-15 David Malcolm <dmalcolm@redhat.com>
5794 Paul Hua <paul.hua.gm@gmail.com>
5795
5796 PR c/84852
5797 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
5798
5799 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
5800
5801 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
5802 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
5803 resp. SFmode cases.
5804
5805 2018-03-15 Tamar Christina <tamar.christina@arm.com>
5806
5807 PR target/84711
5808 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
5809 instead of GET_MODE_SIZE when comparing Units.
5810
5811 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5812
5813 PR target/68256
5814 * varasm.c (hash_section): Return an unchangeble hash value
5815 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
5816 Return !aarch64_can_use_per_function_literal_pools_p ().
5817
5818 2018-03-15 Jakub Jelinek <jakub@redhat.com>
5819
5820 PR target/84860
5821 * optabs.c (emit_conditional_move): Pass address of cmode's copy
5822 rather than address of cmode as last argument to prepare_cmp_insn.
5823
5824 2018-03-15 Julia Koval <julia.koval@intel.com>
5825
5826 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
5827 F_AVX512VNNI, F_AVX512BITALG): New.
5828
5829 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
5830
5831 PR target/83451
5832 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
5833 insn for floating-point loads and stores.
5834
5835 2018-03-14 Carl Love <cel@us.ibm.com>
5836
5837 * config/rs6000/rs6000-c.c: Add macro definitions for
5838 ALTIVEC_BUILTIN_VEC_PERMXOR.
5839 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
5840 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
5841 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
5842 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
5843 UNSPEC_VPERMXOR.
5844 * config/doc/extend.texi: Add prototypes for vec_permxor.
5845
5846 2018-03-14 David Malcolm <dmalcolm@redhat.com>
5847
5848 PR c/84852
5849 * diagnostic-show-locus.c (class layout_point): Convert m_line
5850 from int to linenum_type.
5851 (line_span::comparator): Use linenum "compare" function when
5852 comparing line numbers.
5853 (test_line_span): New function.
5854 (layout_range::contains_point): Convert param "row" from int to
5855 linenum_type.
5856 (layout_range::intersects_line_p): Likewise.
5857 (layout::will_show_line_p): Likewise.
5858 (layout::print_source_line): Likewise.
5859 (layout::should_print_annotation_line_p): Likewise.
5860 (layout::print_annotation_line): Likewise.
5861 (layout::print_leading_fixits): Likewise.
5862 (layout::annotation_line_showed_range_p): Likewise.
5863 (struct line_corrections): Likewise for field m_row.
5864 (line_corrections::line_corrections): Likewise for param "row".
5865 (layout::print_trailing_fixits): Likewise.
5866 (layout::get_state_at_point): Likewise.
5867 (layout::get_x_bound_for_row): Likewise.
5868 (layout::print_line): Likewise.
5869 (diagnostic_show_locus): Likewise for locals "last_line" and
5870 "row".
5871 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
5872 * input.c (selftest::test_linenum_comparisons): New function.
5873 (selftest::input_c_tests): Call it.
5874 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
5875 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
5876 * selftest.h (ASSERT_GT): New macro.
5877 (ASSERT_GT_AT): New macro.
5878 (ASSERT_LT): New macro.
5879 (ASSERT_LT_AT): New macro.
5880
5881 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
5882
5883 PR rtl-optimization/84780
5884 * combine.c (distribute_links): Don't make a link based on pc_rtx.
5885
5886 2018-03-14 Martin Liska <mliska@suse.cz>
5887
5888 * tree.c (record_node_allocation_statistics): Use
5889 get_stats_node_kind.
5890 (get_stats_node_kind): New function extracted from
5891 record_node_allocation_statistics.
5892 (free_node): Use get_stats_node_kind.
5893
5894 2018-03-14 Richard Biener <rguenther@suse.de>
5895
5896 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
5897 that the value-set of ANTIC_IN doesn't grow.
5898
5899 Revert
5900 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5901 member.
5902 (BB_VISITED_WITH_VISITED_SUCCS): New define.
5903 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5904
5905 2018-03-14 Julia Koval <julia.koval@intel.com>
5906
5907 * config.gcc (icelake-client, icelake-server): New.
5908 (icelake): Remove.
5909 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
5910 (initial_ix86_arch_features): Ditto.
5911 (PTA_SKYLAKE): Add SGX.
5912 (PTA_ICELAKE): Remove.
5913 (PTA_ICELAKE_CLIENT): New.
5914 (PTA_ICELAKE_SERVER): New.
5915 (ix86_option_override_internal): Split up icelake on icelake client and
5916 icelake server.
5917 (get_builtin_code_for_version): Ditto.
5918 (fold_builtin_cpu): Ditto.
5919 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
5920 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
5921 * config/i386/i386.h (processor_type): Ditto.
5922 * doc/invoke.texi: Ditto.
5923
5924 2018-03-14 Jakub Jelinek <jakub@redhat.com>
5925
5926 PR sanitizer/83392
5927 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
5928 INTEGER_CST offset, add it together with bitpos / 8 and
5929 sign extend based on POINTER_SIZE.
5930
5931 PR target/84844
5932 Revert
5933 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
5934
5935 PR target/78090
5936 * config/i386/constraints.md (Yc): New register constraint.
5937 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
5938 Use Yc constraint for alternative 2 of operand 0. Remove
5939 preferred_for_speed attribute.
5940
5941 2018-03-14 Richard Biener <rguenther@suse.de>
5942
5943 PR tree-optimization/84830
5944 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
5945 with the old one to avoid oscillations.
5946
5947 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
5948
5949 PR target/83712
5950 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
5951 pseudos.
5952 (assign_by_spills): Return a flag of reload assignment failure.
5953 Do not process the reload assignment failures. Do not spill other
5954 reload pseudos if they has the same reg class. Update n if
5955 necessary.
5956 (lra_assign): Add a return arg. Set up from the result of
5957 assign_by_spills call.
5958 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
5959 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
5960 usage_insns if it is not NULL.
5961 (spill_hard_reg_in_range): New function.
5962 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
5963 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
5964 function prototypes.
5965 (lra_assign): Change prototype.
5966 * lra.c (lra): Add code to deal with fails by splitting hard reg
5967 live ranges.
5968
5969 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
5970
5971 * config/riscv/riscv.opt (mrelax): New option.
5972 * config/riscv/riscv.c (riscv_file_start): Emit ".option
5973 "norelax" when riscv_mrelax is disabled.
5974 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
5975
5976 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
5977
5978 PR target/84743
5979 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
5980 reassociation for int modes.
5981
5982 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
5983
5984 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
5985 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
5986 for big-endian.
5987 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
5988 * config/aarch64/aarch64-sve.md
5989 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
5990 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
5991 (*extend<mode><Vwide>2): Rename to...
5992 (aarch64_sve_extend<mode><Vwide>2): ...this.
5993 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
5994 renaming the old pattern to...
5995 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
5996 unsigned packs.
5997 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
5998 define_expand, renaming the old pattern to...
5999 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
6000 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
6001 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
6002 account when deciding which SVE instruction the optab should use.
6003 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
6004
6005 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6006
6007 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
6008 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
6009 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
6010 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
6011 (tlsdesc_small_<mode>): Turn a define_expand and use
6012 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
6013 (tlsdesc_small_advsimd_<mode>): ...this.
6014 (tlsdesc_small_sve_<mode>): New pattern.
6015
6016 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
6017
6018 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
6019 (UNSPEC_UMUL_HIGHPART): New constants.
6020 (MUL_HIGHPART): New int iteraor.
6021 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
6022 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
6023 define_expand.
6024 (*<su>mul<mode>3_highpart): New define_insn.
6025
6026 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
6027
6028 PR lto/84805
6029 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
6030 incomplete types.
6031
6032 2018-03-13 Martin Liska <mliska@suse.cz>
6033
6034 PR ipa/84658.
6035 * (sem_item_optimizer::sem_item_optimizer): Initialize new
6036 vector.
6037 (sem_item_optimizer::~sem_item_optimizer): Release it.
6038 (sem_item_optimizer::merge_classes): Register variable aliases.
6039 (sem_item_optimizer::fixup_pt_set): New function.
6040 (sem_item_optimizer::fixup_points_to_sets): Likewise.
6041 * ipa-icf.h: Declare new variables and functions.
6042
6043 2018-03-13 Jakub Jelinek <jakub@redhat.com>
6044
6045 PR middle-end/84834
6046 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
6047 integer_pow2p@2 and test integer_pow2p in condition.
6048 (A < 0 ? C : 0): Similarly for @1.
6049
6050 PR middle-end/84831
6051 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
6052 characters starting at p contain '\0' character, don't look beyond
6053 that.
6054
6055 PR target/84827
6056 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
6057 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
6058
6059 PR target/84828
6060 * reg-stack.c (change_stack): Change update_end var from int to
6061 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
6062 also call set_block_for_insn on the newly added insns and rescan.
6063
6064 PR target/84786
6065 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
6066 on the last operand.
6067
6068 PR c++/84704
6069 * tree.c (stabilize_reference_1): Return save_expr (e) for
6070 STATEMENT_LIST even if it doesn't have side-effects.
6071
6072 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
6073
6074 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
6075
6076 2018-03-12 Renlin Li <renlin.li@arm.com>
6077
6078 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
6079 aarch64_output_scalar_simd_mov_immediate.
6080
6081 2018-03-12 Martin Sebor <msebor@redhat.com>
6082
6083 PR tree-optimization/83456
6084 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
6085 for perfectly overlapping calls to memcpy.
6086 (gimple_fold_builtin_memory_chk): Same.
6087 (gimple_fold_builtin_strcpy): Handle no-warning.
6088 (gimple_fold_builtin_stxcpy_chk): Same.
6089 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
6090
6091 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
6092
6093 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
6094 parameter. Use it for SFmode.
6095 (rs6000_function_arg_advance_1): Adjust.
6096 (rs6000_function_arg): Adjust.
6097 (rs6000_gimplify_va_arg): Pass false for that new parameter.
6098
6099 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
6100
6101 PR rtl-optimization/84169
6102 PR rtl-optimization/84780
6103 * combine.c (can_combine_p): Check for a 2-insn combination whether
6104 the destination register is used between the two insns, too.
6105
6106 2018-03-12 Richard Biener <rguenther@suse.de>
6107
6108 PR tree-optimization/84803
6109 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
6110 for refs DR analysis didn't process.
6111
6112 2018-03-12 Richard Biener <rguenther@suse.de>
6113
6114 PR tree-optimization/84777
6115 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
6116 force-vectorize loops ignore whether we are optimizing for size.
6117
6118 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
6119
6120 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
6121 (TARGET_MD_ASM_ADJUST): Define.
6122
6123 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
6124 Kito Cheng <kito.cheng@gmail.com>
6125 Chung-Ju Wu <jasonwucj@gmail.com>
6126
6127 * config/nds32/nds32.c (nds32_compute_stack_frame,
6128 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
6129 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
6130 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
6131 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
6132 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
6133 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
6134 * config/nds32/nds32.md (prologue, epilogue): Use macro
6135 NDS32_V3PUSH_AVAILABLE_P to do checking.
6136
6137 2018-03-11 Jakub Jelinek <jakub@redhat.com>
6138
6139 PR debug/58150
6140 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
6141 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
6142 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
6143 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
6144 addition of most attributes on !orig_type_die or the attribute not
6145 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
6146
6147 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6148 Chung-Ju Wu <jasonwucj@gmail.com>
6149
6150 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
6151 __NDS32_VH__ macro.
6152 * config/nds32/nds32.opt (mvh): New option.
6153
6154 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6155 Chung-Ju Wu <jasonwucj@gmail.com>
6156
6157 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
6158 function.
6159 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
6160 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
6161 definition.
6162
6163 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
6164 Chung-Ju Wu <jasonwucj@gmail.com>
6165
6166 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
6167 function.
6168 * config/nds32/nds32-multiple.md (strlensi): New pattern.
6169 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
6170
6171 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
6172 Kito Cheng <kito.cheng@gmail.com>
6173 Chung-Ju Wu <jasonwucj@gmail.com>
6174
6175 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
6176 UNSPEC_FFMISM and UNSPEC_FLMISM.
6177 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
6178 for ffb, ffmism and flmism.
6179 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
6180 (unspec_ffmism): Ditto.
6181 (unspec_flmism): Ditto.
6182 (nds32_expand_builtin_impl): Check if string extension is available.
6183 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
6184 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
6185
6186 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
6187
6188 Reverting patch:
6189 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
6190
6191 PR target/83712
6192 * lra-assigns.c (assign_by_spills): Return a flag of reload
6193 assignment failure. Do not process the reload assignment
6194 failures. Do not spill other reload pseudos if they has the same
6195 reg class.
6196 (lra_assign): Add a return arg. Set up from the result of
6197 assign_by_spills call.
6198 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6199 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6200 usage_insns if it is not NULL.
6201 (spill_hard_reg_in_range): New function.
6202 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6203 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6204 function prototypes.
6205 (lra_assign): Change prototype.
6206 * lra.c (lra): Add code to deal with fails by splitting hard reg
6207 live ranges.
6208
6209 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
6210
6211 PR target/84807
6212 * config/i386/i386.opt: Replace Enforcment with Enforcement.
6213
6214 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
6215
6216 PR debug/84620
6217 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
6218 (dw_val_node): Add val_symbolic_view.
6219 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
6220 (symview_upper_bound): New.
6221 (new_line_info_table): Initialize symviews_since_reset.
6222 (dwarf2out_source_line): Count symviews_since_reset and set
6223 symview_upper_bound.
6224 (dw_val_equal_p): Handle symview.
6225 (add_AT_symview): New.
6226 (print_dw_val): Handle symview.
6227 (attr_checksum, attr_checksum_ordered): Likewise.
6228 (same_dw_val_p, size_of_die): Likewise.
6229 (value_format, output_die): Likewise.
6230 (add_high_low_attributes): Use add_AT_symview for entry_view.
6231 (dwarf2out_finish): Reset symview_upper_bound, clear
6232 zero_view_p.
6233
6234 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
6235
6236 PR target/83969
6237 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
6238 Add strict argument and use it.
6239 (rs6000_split_multireg_move): Update for new strict argument.
6240 (mem_operand_gpr): Disallow all non-offsettable addresses.
6241 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
6242
6243 2018-03-09 Jakub Jelinek <jakub@redhat.com>
6244
6245 PR target/84772
6246 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
6247 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
6248 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
6249
6250 PR c++/84767
6251 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
6252 decl, use remap_type if we want to use the type.
6253
6254 2018-03-09 Martin Sebor <msebor@redhat.com>
6255
6256 PR tree-optimization/84526
6257 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6258 Remove dead code.
6259 (builtin_access::generic_overlap): Be prepared to handle non-array
6260 base objects.
6261
6262 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
6263
6264 PR rtl-optimization/84682
6265 * lra-constraints.c (process_address_1): Check is_address flag
6266 for address constraints.
6267 (process_alt_operands): Likewise.
6268 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
6269 preprocess_constraints.
6270 * recog.h (preprocess_constraints): Add oploc parameter.
6271 Adjust callers.
6272 * recog.c (preprocess_constraints): Test address_operand for
6273 CT_ADDRESS constraints.
6274
6275 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
6276
6277 PR target/83712
6278 * lra-assigns.c (assign_by_spills): Return a flag of reload
6279 assignment failure. Do not process the reload assignment
6280 failures. Do not spill other reload pseudos if they has the same
6281 reg class.
6282 (lra_assign): Add a return arg. Set up from the result of
6283 assign_by_spills call.
6284 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
6285 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
6286 usage_insns if it is not NULL.
6287 (spill_hard_reg_in_range): New function.
6288 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
6289 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
6290 function prototypes.
6291 (lra_assign): Change prototype.
6292 * lra.c (lra): Add code to deal with fails by splitting hard reg
6293 live ranges.
6294
6295 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6296
6297 PR target/83193
6298 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
6299 Accept complain bool parameter. Only emit errors if it is true.
6300 (arm_parse_cpu_option_name): Likewise.
6301 (arm_target_thumb_only): Adjust callers of the above.
6302 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
6303 prototype to take a default true bool parameter.
6304 (arm_parse_arch_option_name): Likewise.
6305
6306 2018-03-09 David Malcolm <dmalcolm@redhat.com>
6307 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
6308
6309 PR jit/64089
6310 PR jit/84288
6311 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
6312 * configure: Regenerate.
6313 * configure.ac ("linker --version-script option"): New.
6314 ("linker soname option"): New.
6315
6316 2018-03-09 Richard Biener <rguenther@suse.de>
6317
6318 PR tree-optimization/84775
6319 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
6320 immediate uses of predicate stmts and mark them modified.
6321
6322 Revert
6323 PR tree-optimization/84178
6324 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6325 to caller.
6326 (version_loop_for_if_conversion): Delay update_ssa call.
6327 (tree_if_conversion): Delay update_ssa until after predicate
6328 insertion.
6329
6330 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
6331
6332 PR target/84763
6333 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
6334 when the function accesses prior frames.
6335
6336 2018-03-08 Jakub Jelinek <jakub@redhat.com>
6337
6338 PR debug/84456
6339 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
6340 gen_llsym, otherwise call maybe_gen_llsym.
6341
6342 PR inline-asm/84742
6343 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
6344 has ',' character inside of it.
6345
6346 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6347
6348 PR target/84748
6349 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
6350 as clobbering CC_REGNUM.
6351
6352 2018-03-08 Richard Biener <rguenther@suse.de>
6353
6354 PR middle-end/84552
6355 * tree-scalar-evolution.c: Include tree-into-ssa.h.
6356 (follow_copies_to_constant): Do not follow SSA names registered
6357 for update.
6358
6359 2018-03-08 Richard Biener <rguenther@suse.de>
6360
6361 PR tree-optimization/84178
6362 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
6363 to caller.
6364 (version_loop_for_if_conversion): Delay update_ssa call.
6365 (tree_if_conversion): Delay update_ssa until after predicate
6366 insertion.
6367
6368 2018-03-08 David Malcolm <dmalcolm@redhat.com>
6369
6370 PR tree-optimization/84178
6371 * tree-if-conv.c (release_bb_predicate): Remove the
6372 the assertion that the stmts have NULL use_ops.
6373 Discard the statements, asserting that they haven't
6374 yet been added to a BB.
6375
6376 2018-03-08 Richard Biener <rguenther@suse.de>
6377
6378 PR tree-optimization/84746
6379 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
6380 (phi_translate): Pass in destination ANTIC_OUT set.
6381 (phi_translate_1): Likewise. For a simplified result lookup
6382 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
6383 (phi_translate_set): Adjust.
6384 (do_pre_regular_insertion): Likewise.
6385 (do_pre_partial_partial_insertion): Likewise.
6386
6387 2018-03-08 Martin Liska <mliska@suse.cz>
6388
6389 PR gcov-profile/84735
6390 * doc/gcov.texi: Document usage of profile files.
6391 * gcov-io.h: Document changes in the format.
6392
6393 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
6394
6395 PR debug/84404
6396 PR debug/84408
6397 * dwarf2out.c (struct dw_line_info_table): Update comments for
6398 view == -1.
6399 (FORCE_RESET_NEXT_VIEW): New.
6400 (FORCE_RESETTING_VIEW_P): New.
6401 (RESETTING_VIEW_P): Check for -1 too.
6402 (ZERO_VIEW_P): Likewise.
6403 (new_line_info_table): Force-reset next view.
6404 (dwarf2out_begin_function): Likewise.
6405 (dwarf2out_source_line): Simplify zero_view_p initialization.
6406 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
6407 view directly. Omit view when omitting .loc at line 0.
6408
6409 2018-03-08 Jakub Jelinek <jakub@redhat.com>
6410
6411 PR tree-optimization/84740
6412 * tree-switch-conversion.c (process_switch): Call build_constructors
6413 only if info.phi_count is non-zero.
6414
6415 PR tree-optimization/84739
6416 * tree-tailcall.c (find_tail_calls): Check call arguments against
6417 DECL_ARGUMENTS (current_function_decl) rather than
6418 DECL_ARGUMENTS (func) when checking for tail recursion.
6419
6420 2018-03-07 Jakub Jelinek <jakub@redhat.com>
6421
6422 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
6423 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
6424 Volker Reichelt's entry and add entries for people that perform
6425 GCC fuzzy testing and report numerous bugs.
6426
6427 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
6428
6429 PR target/82411
6430 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
6431 readonly data in sdata, if that is disabled.
6432 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
6433 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
6434 -mreadonly-in-sdata option.
6435
6436 2018-03-07 Martin Sebor <msebor@redhat.com>
6437
6438 PR tree-optimization/84468
6439 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
6440 basic block when looking for nul assignment.
6441
6442 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
6443
6444 PR target/84277
6445 * except.h (output_function_exception_table): Adjust prototype.
6446 * except.c (output_function_exception_table): Remove FNNAME parameter
6447 and add SECTION parameter. Ouput one part of the table at a time.
6448 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
6449 the first part of the exception table and emit unwind directives.
6450 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
6451 (i386_pe_seh_cold_init): Likewise.
6452 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
6453 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
6454 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
6455 (ix86_output_call_insn): Emit a nop in one more case for SEH.
6456 * config/i386/winnt.c: Include except.h.
6457 (struct seh_frame_state): Add reg_offset, after_prologue and
6458 in_cold_section fields.
6459 (i386_pe_seh_end_prologue): Set seh->after_prologue.
6460 (i386_pe_seh_cold_init): New function.
6461 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
6462 to seh->in_cold_section.
6463 (seh_emit_push): Record the offset of the push.
6464 (seh_emit_save): Record the offet of the save.
6465 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
6466 Test seh->after_prologue to disregard the epilogue.
6467 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
6468 (i386_pe_end_cold_function): New function.
6469
6470 2018-03-07 Jakub Jelinek <jakub@redhat.com>
6471
6472 PR fortran/84565
6473 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
6474 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
6475
6476 PR c++/84704
6477 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
6478 on tmp_var.
6479 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
6480 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
6481
6482 PR middle-end/84723
6483 * multiple_target.c: Include tree-inline.h and intl.h.
6484 (expand_target_clones): Diagnose and fail if node->definition and
6485 !tree_versionable_function_p (node->decl).
6486
6487 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
6488
6489 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
6490 sprint_ul.
6491 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
6492 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
6493 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
6494
6495 2018-03-06 Jakub Jelinek <jakub@redhat.com>
6496
6497 PR target/84710
6498 * combine.c (try_combine): Use reg_or_subregno instead of handling
6499 just paradoxical SUBREGs and REGs.
6500
6501 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
6502
6503 * config/arc/arc.c (arc_finalize_pic): Remove function.
6504 (arc_must_save_register): We use single base PIC register, remove
6505 checks to save/restore the PIC register.
6506 (arc_expand_prologue): Likewise.
6507 * config/arc/arc-protos.h (arc_set_default_type_attributes):
6508 Remove.
6509 (arc_verify_short): Likewise.
6510 (arc_attr_type): Likewise.
6511 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
6512 (walk_stores): Likewise.
6513 (arc_address_cost): Make it static.
6514 (arc_verify_short): Likewise.
6515 (branch_dest): Likewise.
6516 (arc_attr_type): Likewise.
6517 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
6518 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
6519 (arc_final_prescan_insn): Remove inserting the nops due to
6520 hardware hazards. It is done in reorg step.
6521 (insn_length_variant_t): Remove.
6522 (insn_length_parameters_t): Likewise.
6523 (arc_insn_length_parameters): Likewise.
6524 (arc_get_insn_variants): Likewise.
6525 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
6526
6527 2018-03-06 Jakub Jelinek <jakub@redhat.com>
6528
6529 PR inline-asm/84683
6530 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
6531 assertion failure.
6532
6533 PR tree-optimization/84687
6534 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
6535 on new_node->decl.
6536 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
6537
6538 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6539
6540 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
6541 Rename to ppc_speculation_barrier.
6542 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
6543 __builtin_ppc_speculation_barrier.
6544
6545 2018-03-05 Jakub Jelinek <jakub@redhat.com>
6546
6547 PR target/84700
6548 * combine.c (combine_simplify_rtx): Don't try to simplify if
6549 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
6550 are equal to x.
6551
6552 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
6553
6554 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
6555 to 32 bytes when compiling for POWER9.
6556
6557 2018-03-05 Jakub Jelinek <jakub@redhat.com>
6558
6559 PR target/84564
6560 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
6561 regparm >= 3 with no arg reg available also for calls with
6562 flag_force_indirect_call. Pass decl to ix86_function_regparm.
6563
6564 PR target/84524
6565 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
6566 orig,vex.
6567 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
6568
6569 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
6570
6571 PR target/84264
6572 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
6573
6574 2018-03-05 Richard Biener <rguenther@suse.de>
6575
6576 PR tree-optimization/84486
6577 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
6578 When inserting a __builtin_assume_aligned call set the LHS
6579 SSA name alignment info accordingly.
6580
6581 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
6582
6583 PR tree-optimization/84114
6584 * config/aarch64/aarch64.c (aarch64_reassociation_width)
6585 Avoid reassociation of FLOAT_MODE addition.
6586
6587 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
6588
6589 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
6590 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
6591 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
6592 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
6593 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
6594 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
6595 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
6596 and -mwbnoinvd.
6597 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
6598 __builtin_ia32_wbinvd): New builtins.
6599 (SPECIAL_ARGS2): New.
6600 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
6601 (SPECIAL_ARGS2): New.
6602 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
6603 (ix86_valid_target_attribute_inner_p): Ditto.
6604 (ix86_init_mmx_sse_builtins): Add special_args2.
6605 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
6606 TARGET_WBNOINVD_P): New.
6607 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
6608 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
6609 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
6610 * config/i386/immintrin.h (_wbinvd): New intrinsic.
6611 * config/i386/pconfigintrin.h: New file.
6612 * config/i386/wbnoinvdintrin.h: Ditto.
6613 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
6614 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
6615
6616 2018-03-05 Richard Biener <rguenther@suse.de>
6617
6618 PR tree-optimization/84670
6619 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6620 member.
6621 (BB_VISITED_WITH_VISITED_SUCCS): New define.
6622 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6623 (compute_antic_aux): Only assert the number of values in ANTIC_IN
6624 doesn't grow if all successors (recursively) were visited at least
6625 once.
6626
6627 2018-03-05 Richard Biener <rguenther@suse.de>
6628
6629 PR tree-optimization/84650
6630 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
6631 if executed in the loop pipeline.
6632
6633 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
6634
6635 * doc/configfiles.texi (Configuration Files): Move info about
6636 conditionalizing $target-protos.h to...
6637 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
6638 differs from $target-protos.h.
6639
6640 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
6641 Chung-Ju Wu <jasonwucj@gmail.com>
6642
6643 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
6644 * config/nds32/nds32-multiple.md (setmemsi): Define.
6645 * config/nds32/nds32-memory-manipulation.c
6646 (nds32_gen_dup_4_byte_to_word_value): New.
6647 (emit_setmem_word_loop): New.
6648 (emit_setmem_byte_loop): New.
6649 (nds32_expand_setmem_loop): New.
6650 (nds32_expand_setmem_loop_v3m): New.
6651 (nds32_expand_setmem_unroll): New.
6652 (nds32_expand_setmem): New.
6653
6654 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
6655 Chung-Ju Wu <jasonwucj@gmail.com>
6656
6657 * config/nds32/nds32-memory-manipulation.c
6658 (nds32_emit_load_store): New.
6659 (nds32_emit_post_inc_load_store): New.
6660 (nds32_emit_mem_move): New.
6661 (nds32_emit_mem_move_block): New.
6662 (nds32_expand_movmemsi_loop_unknown_size): New.
6663 (nds32_expand_movmemsi_loop_known_size): New.
6664 (nds32_expand_movmemsi_loop): New.
6665 (nds32_expand_movmemsi_unroll): New.
6666 (nds32_expand_movmemqi): Rename ...
6667 (nds32_expand_movmemsi): ... to this.
6668 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
6669 (movmemsi): ... to this.
6670 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
6671 (nds32_expand_movmemsi): ... to this.
6672
6673 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
6674 Monk Chiang <sh.chiang04@gmail.com>
6675 Chung-Ju Wu <jasonwucj@gmail.com>
6676
6677 * config/nds32/nds32-protos.h
6678 (nds32_expand_load_multiple): New arguments.
6679 (nds32_expand_store_multiple): Ditto.
6680 (nds32_valid_multiple_load_store): Rename ...
6681 (nds32_valid_multiple_load_store_p): ... to this.
6682 * config/nds32/nds32-memory-manipulation.c
6683 (nds32_expand_load_multiple): Refine implementation.
6684 (nds32_expand_store_multiple): Ditto.
6685 * config/nds32/nds32-multiple.md
6686 (load_multiple): Update nds32_expand_load_multiple interface.
6687 (store_multiple): Update nds32_expand_store_multiple interface.
6688 * config/nds32/nds32-predicates.c
6689 (nds32_valid_multiple_load_store): Rename ...
6690 (nds32_valid_multiple_load_store_p): ... to this and refine
6691 implementation.
6692 * config/nds32/predicates.md
6693 (nds32_load_multiple_and_update_address_operation): New predicate.
6694 (nds32_store_multiple_and_update_address_operation): New predicate.
6695
6696 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
6697 Chung-Ju Wu <jasonwucj@gmail.com>
6698
6699 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
6700 (combo): New attribute.
6701 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
6702
6703 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
6704
6705 * config/nds32/nds32.opt: Change -mcmodel= default value.
6706
6707 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
6708 Monk Chiang <sh.chiang04@gmail.com>
6709 Chung-Ju Wu <jasonwucj@gmail.com>
6710
6711 * config/nds32/constants.md (unspec_element): New enum.
6712 * config/nds32/constraints.md (Umw): New constraint.
6713 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
6714 * config/nds32/nds32-intrinsic.md: Likewise.
6715 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
6716 (nds32_valid_smw_lwm_base_p): New.
6717 (nds32_output_smw_single_word): New.
6718 (nds32_output_lmw_single_word): New.
6719 (nds32_expand_unaligned_load): New.
6720 (nds32_expand_unaligned_store): New.
6721 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
6722 (nds32_output_smw_single_word): Declare.
6723 (nds32_output_lmw_single_word): Declare.
6724 (nds32_expand_unaligned_load): Declare.
6725 (nds32_expand_unaligned_store): Declare.
6726 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
6727 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
6728 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
6729 NDS32_BUILTIN_UASTORE_DW.
6730 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
6731 predicate.
6732
6733 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
6734 Kito Cheng <kito.cheng@gmail.com>
6735 Chung-Ju Wu <jasonwucj@gmail.com>
6736
6737 * config/nds32/nds32-intrinsic.c
6738 (nds32_expand_builtin_null_ftype_reg): Delete.
6739 (nds32_expand_builtin_reg_ftype_imm): Ditto.
6740 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
6741 (nds32_read_argument): New.
6742 (nds32_legitimize_target): Ditto.
6743 (nds32_legitimize_argument): Ditto.
6744 (nds32_check_constant_argument): Ditto.
6745 (nds32_expand_unop_builtin): Ditto.
6746 (nds32_expand_unopimm_builtin): Ditto.
6747 (nds32_expand_binop_builtin): Ditto.
6748 (nds32_builtin_decl_impl): Ditto.
6749 (builtin_description): Ditto.
6750 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
6751 (nds32_init_builtins_impl): Ditto.
6752 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
6753 (nds32_builtin_decl): New.
6754 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
6755 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
6756
6757 2018-03-02 Jeff Law <law@redhat.com>
6758
6759 * reorg.c (stop_search_p): Handle DEBUG_INSN.
6760 (redundant_insn, fill_simple_delay_slots): Likewise.
6761 (fill_slots_from_thread): Likewise.
6762 * resource.c (mark_referenced_resources): Likewise.
6763 (mark_set_resources, find_dead_or_set_registers): Likewise.
6764
6765 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6766
6767 * substring-locations.h (format_warning_va): Formatting fix for
6768 ATTRIBUTE_GCC_DIAG.
6769 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
6770 argument.
6771 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
6772 * substring-locations.c: Include intl.h.
6773 (format_warning_va): Turned into small wrapper around
6774 format_warning_n_va, renamed to ...
6775 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
6776 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
6777 use ngettext.
6778 (format_warning_at_substring_n): New function.
6779 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
6780 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
6781 format_warning_at_substring with just a shorter name instead of
6782 const function pointer.
6783 (fmtwarn_n): New function.
6784 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
6785 appropriate, get rid of all the fmtstr temporaries, move conditionals
6786 with G_() wrapped string literals directly into fmtwarn arguments,
6787 cast dir.len to (int), formatting fixes.
6788
6789 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
6790
6791 * doc/invoke.texi: Remove "Cilk Plus" references.
6792
6793 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6794 Richard Biener <rguenther@suse.de>
6795
6796 PR ipa/84628
6797 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
6798 for error or warning attributes if CALL_FROM_THUNK_P is set.
6799 Formatting fixes.
6800
6801 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6802
6803 PR target/56540
6804 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
6805 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
6806
6807 PR target/56540
6808 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
6809 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
6810
6811 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
6812 instead of -1U in last predictors element's probability member.
6813
6814 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
6815
6816 PR ipa/83983
6817 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
6818 arguments if they are comparable.
6819
6820 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
6821
6822 PR tree-optimization/84634
6823 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
6824 masks and masked_loop_p with a single loop_masks, making sure it's
6825 null for bb vectorization.
6826
6827 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
6828
6829 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6830 (vect_analyze_data_ref_access): Use loop->safe_len rather than
6831 loop->force_vectorize to check whether there is no alias.
6832
6833 2018-03-02 Jakub Jelinek <jakub@redhat.com>
6834
6835 PR target/84614
6836 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
6837 prototypes.
6838 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
6839 comments.
6840 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
6841 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
6842 instead of a loop around prev_real_insn.
6843 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
6844 prev_real_insn.
6845
6846 PR inline-asm/84625
6847 * config/i386/i386.c (ix86_print_operand): Use conditional
6848 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
6849 zero vector.
6850
6851 2018-03-02 Richard Biener <rguenther@suse.de>
6852
6853 PR tree-optimization/84427
6854 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
6855 (bitmap_set_subtract_values): Rewrite to handle multiple
6856 exprs per value.
6857 (clean): Likewise.
6858 (prune_clobbered_mems): Likewise.
6859 (phi_translate): Take edge instead of pred/phiblock.
6860 (phi_translate_1): Likewise.
6861 (phi_translate_set): Likewise. Insert all translated
6862 exprs for a value into the set, keeping possibly multiple
6863 expressions per value.
6864 (compute_antic_aux): Adjust for phi_translate changes.
6865 When intersecting union the expressions and prune those
6866 not in the final value set, keeping possibly multiple
6867 expressions per value. Do not use value-insertion
6868 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
6869 all expressions. Add verification that the value-sets
6870 only shrink during iteration.
6871 (compute_partial_antic_aux): Adjust for the phi_translate changes.
6872 (do_pre_regular_insertion): Likewise.
6873 (do_pre_partial_partial_insertion): Likewise.
6874
6875 2018-03-02 Richard Biener <rguenther@suse.de>
6876
6877 PR target/82005
6878 * config/darwin.c (saved_debug_info_level): New static global.
6879 (darwin_asm_lto_start): Disable debug info generation for LTO out.
6880 (darwin_asm_lto_end): Restore debug info generation settings.
6881
6882 2018-03-01 Martin Liska <mliska@suse.cz>
6883
6884 PR sanitizer/82484
6885 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
6886 volatile arguments.
6887
6888 2018-03-01 Richard Biener <rguenther@suse.de>
6889
6890 PR debug/84645
6891 * dwarf2out.c (gen_variable_die): Properly handle late VLA
6892 type annotation with LTO when debug was disabled at compile-time.
6893
6894 2018-03-01 Matthew Fortune <mfortune@gmail.com>
6895
6896 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
6897 XINT with INTVAL.
6898 (mips_final_postscan_insn): Likewise.
6899
6900 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
6901
6902 PR rtl-optimization/84528
6903 * alias.c (init_alias_target): Add commentary.
6904 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
6905 a unique base value if the frame pointer is not eliminated
6906 to the stack pointer.
6907
6908 2018-03-01 Tom de Vries <tom@codesourcery.com>
6909
6910 PR rtl-optimization/83327
6911 * lra-int.h (hard_regs_spilled_into): Declare.
6912 * lra.c (hard_regs_spilled_into): Define.
6913 (init_reg_info): Init hard_regs_spilled_into.
6914 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
6915 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
6916 (process_bb_lives): Handle hard_regs_spilled_into.
6917 (lra_create_live_ranges_1): Before doing liveness propagation, clear
6918 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
6919
6920 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
6921
6922 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
6923 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
6924 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
6925 * config/rs6000/aix72.h: New file.
6926
6927 2018-02-28 Jakub Jelinek <jakub@redhat.com>
6928
6929 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
6930 instead of warning_at with conditional singular and plural messages
6931 where possible.
6932
6933 PR target/52991
6934 * stor-layout.c (update_alignment_for_field): For
6935 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
6936 && !DECL_PACKED (field), do the alignment update, just use
6937 only desired_align instead of MAX (type_align, desired_align)
6938 as the alignment.
6939 (place_field): Don't do known_align < desired_align handling
6940 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
6941 is non-NULL, instead do it after rli->prev_field handling and
6942 only if not within a bitfield word. For DECL_PACKED (field)
6943 use type_align of BITS_PER_UNIT.
6944
6945 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
6946
6947 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
6948 superfluous parentheses and trailing spaces.
6949
6950 2018-02-28 Richard Biener <rguenther@suse.de>
6951
6952 PR tree-optimization/84584
6953 * graphite-scop-detection.c (scop_detection::add_scop): Discard
6954 SCoPs with fake exit edge.
6955
6956 2018-02-28 Martin Liska <mliska@suse.cz>
6957
6958 PR testsuite/84597
6959 * timevar.c (timer::print): Fix format to properly print 100%
6960 values.
6961
6962 2018-02-28 Richard Biener <rguenther@suse.de>
6963
6964 PR middle-end/84607
6965 * genmatch.c (capture_info::walk_match): Do not mark
6966 captured expressions without operands as expr_p given
6967 they act more like predicates and should be subject to
6968 "lost tail" side-effect preserving.
6969
6970 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
6971
6972 PR rtl-optimization/81611
6973 * auto-inc-dec.c (attempt_change): Move dead note from
6974 mem_insn if it's the next use of regno
6975 (find_address): Take address use of reg holding
6976 non-incremented value. Add parm to limit search to the named
6977 reg only.
6978 (merge_in_block): Attempt to use a mem insn that is the next
6979 use of the original regno.
6980
6981 2018-02-27 Martin Sebor <msebor@redhat.com>
6982
6983 PR c++/83871
6984 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
6985 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
6986
6987 2018-02-27 Martin Sebor <msebor@redhat.com>
6988
6989 PR translation/84207
6990 * diagnostic-core.h (warning_n, error_n, inform_n): Change
6991 n argument to unsigned HOST_WIDE_INT.
6992 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
6993 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
6994 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
6995 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
6996
6997 2018-02-27 Richard Biener <rguenther@suse.de>
6998
6999 PR tree-optimization/84512
7000 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
7001 Do not use the estimate returned from record_stmt_cost for
7002 the scalar iteration cost but sum properly using add_stmt_cost.
7003
7004 2018-02-27 Richard Biener <rguenther@suse.de>
7005
7006 PR tree-optimization/84466
7007 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7008 Adjust last change to less strictly validate use operands.
7009
7010 2018-02-27 Martin Liska <mliska@suse.cz>
7011
7012 PR gcov-profile/84548
7013 * gcov.c (process_file): Allow partial overlap and consider it
7014 also as group functions.
7015 (output_lines): Properly calculate range of lines for a group.
7016
7017 2018-02-27 Martin Liska <mliska@suse.cz>
7018
7019 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
7020 'ggc' suffixes. Change first column width.
7021 (timer::print): Fix formatting of the column.
7022
7023 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
7024
7025 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
7026 preserve inline entry blocks for the sake of debug inline
7027 entry point markers alone.
7028 (remove_unused_locals): Suggest in comments a better place to
7029 force the preservation of inline entry blocks that are
7030 otherwise unused, but do not preserve them.
7031
7032 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7033
7034 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
7035
7036 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7037
7038 PR target/84039
7039 * config/i386/constraints.md (Bs): Replace
7040 ix86_indirect_branch_register with
7041 TARGET_INDIRECT_BRANCH_REGISTER.
7042 (Bw): Likewise.
7043 * config/i386/i386.md (indirect_jump): Likewise.
7044 (tablejump): Likewise.
7045 (*sibcall_memory): Likewise.
7046 (*sibcall_value_memory): Likewise.
7047 Peepholes of indirect call and jump via memory: Likewise.
7048 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
7049 (*sibcall_value_GOT_32): Likewise.
7050 * config/i386/predicates.md (indirect_branch_operand): Likewise.
7051 (GOT_memory_operand): Likewise.
7052 (call_insn_operand): Likewise.
7053 (sibcall_insn_operand): Likewise.
7054 (GOT32_symbol_operand): Likewise.
7055 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
7056
7057 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
7058
7059 PR rtl-optimization/83496
7060 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
7061 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
7062 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
7063 redundant insn, if any.
7064 (relax_delay_slots): Likewise.
7065 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
7066
7067 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
7068
7069 PR tree-optimization/83965
7070 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
7071 that grouped statements are part of a reduction chain. Return
7072 true if the statement is not marked as a reduction itself but
7073 is part of a group.
7074 (vect_recog_dot_prod_pattern): Don't check whether the statement
7075 is part of a group here.
7076 (vect_recog_sad_pattern): Likewise.
7077 (vect_recog_widen_sum_pattern): Likewise.
7078
7079 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
7080
7081 PR debug/84545
7082 * final.c (rest_of_clean_state): Also look for calls inside sequences.
7083
7084 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
7085
7086 PR target/84530
7087 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
7088 the bool argument.
7089 (ix86_output_indirect_function_return): New prototype.
7090 (ix86_split_simple_return_pop_internal): Likewise.
7091 * config/i386/i386.c (indirect_return_via_cx): New.
7092 (indirect_return_via_cx_bnd): Likewise.
7093 (indirect_thunk_name): Handle return va CX_REG.
7094 (output_indirect_thunk_function): Create alias for
7095 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
7096 (ix86_output_indirect_jmp): Remove the bool argument.
7097 (ix86_output_indirect_function_return): New function.
7098 (ix86_split_simple_return_pop_internal): Likewise.
7099 * config/i386/i386.md (*indirect_jump): Don't pass false
7100 to ix86_output_indirect_jmp.
7101 (*tablejump_1): Likewise.
7102 (simple_return_pop_internal): Change it to define_insn_and_split.
7103 Call ix86_split_simple_return_pop_internal to split it for
7104 -mfunction-return=.
7105 (simple_return_indirect_internal): Call
7106 ix86_output_indirect_function_return instead of
7107 ix86_output_indirect_jmp.
7108
7109 2018-02-26 Jakub Jelinek <jakub@redhat.com>
7110
7111 PR bootstrap/84405
7112 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
7113 memset and value initialization afterwards.
7114
7115 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
7116
7117 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
7118
7119 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7120
7121 PR target/84521
7122 * common/config/aarch64/aarch64-common.c
7123 (aarch_option_optimization_table[]): Switch
7124 off fomit-frame-pointer
7125
7126 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
7127 Chung-Ju Wu <jasonwucj@gmail.com>
7128
7129 * config/nds32/nds32-multiple.md (load_multiple): Disallow
7130 volatile memory.
7131 (store_multiple): Ditto.
7132
7133 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
7134
7135 * config.gcc: Add --with-cpu support for nds32 target.
7136 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
7137 * config/nds32/nds32.opt: Add -mcpu= option.
7138
7139 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
7140
7141 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
7142 isel=yes): Warn for these deprecated options.
7143
7144 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
7145
7146 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
7147 ISA_2_5_MASKS_EMBEDDED.
7148
7149 2018-02-23 Jakub Jelinek <jakub@redhat.com>
7150
7151 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
7152 p->max as pointers rather than using iterative_hash_expr.
7153
7154 2018-02-23 Carl Love <cel@us.ibm.com>
7155
7156 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
7157 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
7158 BU_P8V_OVERLOAD_2.
7159 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
7160 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
7161 P8V_BUILTIN_VEC_VUNSIGNED2.
7162
7163 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
7164
7165 PR target/81572
7166 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
7167 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
7168 LRA_UNKNOWN_ALT.
7169 * lra-constraints.c (curr_insn_transform): Set up
7170 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
7171 LRA_UNKNOWN_ALT.
7172 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
7173 * lra-eliminations.c (spill_pseudos): Ditto.
7174 (process_insn_for_elimination): Ditto.
7175 * lra-lives.c (reg_early_clobber_p): Use the new macros.
7176 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
7177 LRA_NON_CLOBBERED_ALT.
7178
7179 2018-02-22 Martin Sebor <msebor@redhat.com>
7180
7181 PR tree-optimization/84480
7182 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
7183 to maybe_diag_stxncpy_trunc. Call it.
7184 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
7185 from gimple_fold_builtin_strcpy. Print inlining stack.
7186 (handle_builtin_stxncpy): Print inlining stack.
7187 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
7188
7189 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
7190
7191 PR target/84176
7192 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
7193 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
7194 and -fcheck-pointer-bounds are used together.
7195 (indirect_thunk_prefix): New enum.
7196 (indirect_thunk_need_prefix): New function.
7197 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
7198 "_nt" instead of "_bnd" for NOTRACK prefix.
7199 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
7200 (output_indirect_thunk_function): Likewise.
7201 (): Likewise.
7202 (ix86_code_end): Update output_indirect_thunk_function calls.
7203 (ix86_output_indirect_branch_via_reg): Replace
7204 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
7205 (ix86_output_indirect_branch_via_push): Likewise.
7206 (ix86_output_function_return): Likewise.
7207 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
7208 incompatible with -fcf-protection=branch and
7209 -fcheck-pointer-bounds.
7210
7211 2018-02-22 Steve Ellcey <sellcey@cavium.com>
7212
7213 PR target/83335
7214 * config/aarch64/aarch64.c (aarch64_print_address_internal):
7215 Change gcc_assert call to output_operand_lossage.
7216
7217 2018-02-22 Steve Ellcey <sellcey@cavium.com>
7218
7219 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
7220
7221 2018-02-22 DJ Delorie <dj@redhat.com>
7222 Sebastian Perta <sebastian.perta@renesas.com>
7223 Oleg Endo <olegendo@gcc.gnu.org>
7224
7225 * config/rx/rx.c (rx_rtx_costs): New function.
7226 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
7227
7228 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
7229
7230 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
7231
7232 2018-02-22 Martin Liska <mliska@suse.cz>
7233
7234 PR driver/83193
7235 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
7236 Add "native" as a possible value.
7237
7238 2018-02-22 Martin Liska <mliska@suse.cz>
7239
7240 PR driver/83193
7241 * config/i386/i386.c (ix86_option_override_internal):
7242 Add "native" as a possible value for -march and -mtune.
7243
7244 2018-02-22 Jakub Jelinek <jakub@redhat.com>
7245
7246 PR target/84502
7247 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
7248 to all type variants.
7249
7250 PR tree-optimization/84503
7251 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
7252 width as info->bitpos + info->bitsize - start.
7253 (merged_store_group::merge_overlapping): Simplify width computation.
7254 (check_no_overlap): New function.
7255 (imm_store_chain_info::try_coalesce_bswap): Compute expected
7256 start + width and last_order of the group, fail if check_no_overlap
7257 fails.
7258 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
7259 to group if check_no_overlap fails.
7260
7261 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
7262
7263 * config/rs6000/altivec.md: Delete contraint arguments to
7264 define_expand, define_split, and define_peephole2, and in
7265 define_insn_and_split if always unused.
7266 * config/rs6000/darwin.md: Ditto.
7267 * config/rs6000/dfp.md: Ditto.
7268 * config/rs6000/rs6000.md: Ditto.
7269 * config/rs6000/sync.md: Ditto.
7270 * config/rs6000/vector.md: Ditto.
7271 * config/rs6000/vsx.md: Ditto.
7272
7273 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
7274
7275 * config/rs6000/altivec.md: Write output control strings as braced
7276 blocks instead of double-quoted strings.
7277 * config/rs6000/darwin.md: Ditto.
7278 * config/rs6000/rs6000.md: Ditto.
7279 * config/rs6000/vector.md: Ditto.
7280 * config/rs6000/vsx.md: Ditto.
7281
7282 2018-02-21 Jason Merrill <jason@redhat.com>
7283
7284 PR c++/84314 - ICE with templates and fastcall attribute.
7285 * attribs.c (build_type_attribute_qual_variant): Remove assert.
7286
7287 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
7288
7289 * ipa-cp.c (determine_versionability): Fix comment typos.
7290
7291 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
7292
7293 PR c/84229
7294 * ipa-cp.c (determine_versionability): Do not version functions caling
7295 va_arg_pack.
7296
7297 2018-02-21 Martin Liska <mliska@suse.cz>
7298
7299 PR driver/83193
7300 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
7301 Add "native" as a possible value.
7302 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
7303 the macro when native cpu detection is available.
7304
7305 2018-02-21 Martin Liska <mliska@suse.cz>
7306
7307 PR driver/83193
7308 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
7309 Add "native" as a possible value.
7310 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
7311 when native cpu detection is available.
7312
7313 2018-02-21 Jakub Jelinek <jakub@redhat.com>
7314 Martin Sebor <msebor@redhat.com>
7315
7316 PR tree-optimization/84478
7317 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
7318 false.
7319 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
7320 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
7321 support which is conservatively correct, for 2 only stay conservative
7322 for maxlen. Formatting and comment capitalization fixes. Add STRICT
7323 argument to the 2 argument get_range_strlen, adjust 6 arg
7324 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
7325 false.
7326 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
7327 (gimple_fold_builtin_strlen): Pass true as last argument to
7328 get_range_strlen.
7329
7330 2018-02-20 Martin Sebor <msebor@redhat.com>
7331
7332 PR middle-end/84095
7333 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
7334 (builtin_memref::set_base_and_offset): Same. Handle inner references.
7335 (builtin_memref::builtin_memref): Factor out parts into
7336 set_base_and_offset and call it.
7337
7338 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
7339
7340 PR middle-end/84406
7341 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
7342 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
7343 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
7344 search at the associated MODE_INT.
7345
7346 2018-02-20 Jeff Law <law@redhat.com>
7347
7348 PR middle-end/82123
7349 PR tree-optimization/81592
7350 PR middle-end/79257
7351 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
7352 for range data rather than using global data.
7353 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
7354 range data rather than using global data.
7355 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
7356 pass it to children as needed.
7357 (struct directive::fmtresult): Similarly.
7358 (struct directive::set_width): Similarly.
7359 (struct directive::set_precision): Similarly.
7360 (format_integer, format_directive, parse_directive): Similarly.
7361 (format_none): Accept unnamed vr_values parameter.
7362 (format_percent, format_floating, format_character): Similarly.
7363 (format_string, format_plain): Similarly.
7364 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
7365 the EVRP range analyzer for range data rather than using global data.
7366 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
7367 gimple-ssa-evrp-analyze.h
7368 (class sprintf_dom_walker): Add after_dom_children member function.
7369 Add evrp_range_analyzer member.
7370 (sprintf_dom_walker::before_dom_children): Call into the EVRP
7371 range analyzer as needed.
7372 (sprintf_dom_walker::after_dom_children): New member function.
7373 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
7374 if not optimizing.
7375 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
7376 (evrp_range_analyzer::pop_to_marker): Likewise.
7377
7378 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
7379
7380 PR tree-optimization/84419
7381 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
7382 with the required type if its current type is compatible but
7383 different.
7384
7385 2018-02-20 Jakub Jelinek <jakub@redhat.com>
7386
7387 PR middle-end/82004
7388 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
7389 after vectorization.
7390
7391 2018-02-20 Martin Liska <mliska@suse.cz>
7392
7393 PR driver/83193
7394 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
7395 possible values if we don't have a hint.
7396
7397 2018-02-20 Martin Liska <mliska@suse.cz>
7398
7399 PR c/84310
7400 PR target/79747
7401 * final.c (shorten_branches): Build align_tab array with one
7402 more element.
7403 * opts.c (finish_options): Add alignment option limit check.
7404 (MAX_CODE_ALIGN): Likewise.
7405 (MAX_CODE_ALIGN_VALUE): Likewise.
7406 * doc/invoke.texi: Document maximum allowed option value for
7407 all -falign-* options.
7408
7409 2018-02-19 Jakub Jelinek <jakub@redhat.com>
7410
7411 PR target/84146
7412 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
7413 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
7414 * var-tracking.c (emit_note_insn_var_location): Remove all references
7415 to NOTE_INSN_CALL_ARG_LOCATION.
7416 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
7417 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
7418 Use copy_rtx_if_shared.
7419 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
7420 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
7421 (dwarf2out_var_location): Remove handling of
7422 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
7423 on call_insn.
7424 * final.c (final_scan_insn): Remove all references to
7425 NOTE_INSN_CALL_ARG_LOCATION.
7426 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
7427 before dumping final insns.
7428 * except.c (emit_note_eh_region_end): Remove all references to
7429 NOTE_INSN_CALL_ARG_LOCATION.
7430 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
7431 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
7432 * config/arc/arc.c (hwloop_optimize): Likewise.
7433 * config/arm/arm.c (create_fix_barrier): Likewise.
7434 * config/s390/s390.c (s390_chunkify_start): Likewise.
7435 * config/sh/sh.c (find_barrier): Likewise.
7436 * config/i386/i386.c (rest_of_insert_endbranch,
7437 ix86_seh_fixup_eh_fallthru): Likewise.
7438 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
7439 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
7440 * config/frv/frv.c (frv_function_prologue): Likewise.
7441 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
7442 reg note.
7443 (note_outside_basic_block_p): Remove all references to
7444 NOTE_INSN_CALL_ARG_LOCATION.
7445 * gengtype.c (adjust_field_rtx_def): Likewise.
7446 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
7447 Likewise.
7448 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
7449 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
7450
7451 PR c++/84444
7452 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
7453 is ADDR_EXPR.
7454
7455 PR tree-optimization/84452
7456 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
7457 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
7458 is NULL.
7459
7460 2018-02-19 Martin Liska <mliska@suse.cz>
7461
7462 PR sanitizer/82183
7463 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
7464
7465 2018-02-19 Martin Liska <mliska@suse.cz>
7466 Richard Sandiford <richard.sandiford@linaro.org>
7467
7468 PR tree-optimization/82491
7469 * gimple-fold.c (get_base_constructor): Make earlier bail out
7470 to prevent ubsan.
7471
7472 2018-02-19 Carl Love <cel@us.ibm.com>
7473
7474 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
7475 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
7476 BU_P8V_OVERLOAD_1.
7477 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
7478 P8V_BUILTIN_VEC_NEG.
7479
7480 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
7481
7482 * config/rl78/rl78.md (movdf): New define expand.
7483
7484 2018-02-19 Martin Liska <mliska@suse.cz>
7485
7486 PR other/80589
7487 * doc/invoke.texi: Fix typo.
7488 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
7489
7490 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
7491
7492 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
7493 handle rs6000_single_float and rs6000_double_float specially for
7494 e500 family CPUs.
7495
7496 2018-02-16 Jeff Law <law@redhat.com>
7497
7498 * config/rx/rx.c (add_pop_cfi_notes): New function.;
7499 (pop_regs): Use it.
7500
7501 2018-02-16 Jakub Jelinek <jakub@redhat.com>
7502
7503 PR ipa/84425
7504 * ipa-inline.c (inline_small_functions): Fix a typo.
7505
7506 2018-02-16 Nathan Sidwell <nathan@acm.org>
7507
7508 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
7509
7510 2018-02-16 Carl Love <cel@us.ibm.com>
7511
7512 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
7513 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
7514 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
7515 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
7516 expansion to P8V_BUILTIN_VEC_FLOAT2.
7517
7518 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
7519
7520 PR rtl-optimization/70023
7521 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
7522 src_regno into account.
7523
7524 2018-02-16 Carl Love <cel@us.ibm.com>
7525
7526 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
7527 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
7528 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
7529 * config/rs6000/rs6000.c: Remove case statements for
7530 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
7531 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
7532 and P9V_BUILTIN_VEC_VINSERT4B.
7533 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
7534 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
7535 * config/rs6000/vsx.md:
7536 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
7537 vec_insert4b.
7538
7539 2018-02-16 Carl Love <cel@us.ibm.com>
7540
7541 * config/rs6000/altivec.h: Add builtin names vec_extract4b
7542 vec_insert4b.
7543 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
7544 definitions.
7545 * config/rs6000/rs6000-c.c: Add the definitions for
7546 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
7547 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
7548 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
7549 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
7550 definition for insert4b and define insn *insert3b_internal.
7551 * doc/extend.texi: Add documentation for vec_extract4b.
7552
7553 2018-02-16 Nathan Sidwell <nathan@acm.org>
7554
7555 * doc/extend.texi (Backwards Compatibility): Mention friend
7556 injection. Note for-scope is deprecated.
7557 * doc/invoke.texi (-ffriend-injection): Deprecate.
7558
7559 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
7560
7561 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
7562 that moved to I2, also allow destinations that are a paradoxical
7563 subreg (instead of a normal reg).
7564
7565 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
7566
7567 PR target/83831
7568 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
7569 to QImode.
7570
7571 2018-02-16 Richard Biener <rguenther@suse.de>
7572
7573 PR tree-optimization/84037
7574 PR tree-optimization/84016
7575 PR target/82862
7576 * config/i386/i386.c (ix86_builtin_vectorization_cost):
7577 Adjust vec_construct for the fact we need additional higher latency
7578 128bit inserts for AVX256 and AVX512 vector builds.
7579 (ix86_add_stmt_cost): Scale vector construction cost for
7580 elementwise loads.
7581
7582 2018-02-16 Richard Biener <rguenther@suse.de>
7583
7584 PR tree-optimization/84417
7585 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
7586 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
7587 (non_rewritable_lvalue_p): Likewise, use poly-ints.
7588
7589 2018-02-16 Martin Liska <mliska@suse.cz>
7590
7591 PR sanitizer/84307
7592 * internal-fn.def (ASAN_CHECK): Set proper flags.
7593 (ASAN_MARK): Likewise.
7594
7595 2018-02-16 Julia Koval <julia.koval@intel.com>
7596
7597 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
7598 from PTA_CANNONLAKE.
7599
7600 2018-02-16 Jakub Jelinek <jakub@redhat.com>
7601
7602 PR target/84272
7603 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
7604 Use ++iter rather than iter++ for std::list iterators.
7605 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
7606 defer deleting them until all nodes in the forest are processed. Do
7607 free even leaf nodes. Change to_process into auto_vec.
7608
7609 PR bootstrap/84405
7610 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
7611 * vec.h (vec_default_construct): Use memset instead of placement new
7612 if BROKEN_VALUE_INITIALIZATION is defined.
7613 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
7614 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
7615 is defined.
7616
7617 PR rtl-optimization/83723
7618 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
7619 * lra.c (lra_substitute_pseudo): Likewise. If true, use
7620 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
7621 recursive calls.
7622 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
7623 callers.
7624 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
7625
7626 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
7627
7628 PR rtl-optimization/81443
7629 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
7630 from inner REGs to paradoxical SUBREGs.
7631
7632 2018-02-16 Richard Biener <rguenther@suse.de>
7633
7634 PR tree-optimization/84399
7635 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
7636 For operands we can analyze at their definition make sure we can
7637 analyze them at each use as well.
7638
7639 2018-02-16 Richard Biener <rguenther@suse.de>
7640
7641 PR tree-optimization/84190
7642 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
7643 volatile accesses if the decl isn't volatile.
7644
7645 2018-02-15 Jason Merrill <jason@redhat.com>
7646
7647 PR c++/84314 - ICE with templates and fastcall attribute.
7648 * attribs.c (build_type_attribute_qual_variant): Don't clobber
7649 TYPE_CANONICAL on an existing type.
7650
7651 2018-02-15 Jakub Jelinek <jakub@redhat.com>
7652
7653 PR tree-optimization/84383
7654 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
7655 dstoff nor call operand_equal_p if dstbase is NULL.
7656
7657 PR tree-optimization/84334
7658 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
7659 also a CONSTANT_CLASS_P, punt.
7660
7661 2018-02-14 Jim Wilson <jimw@sifive.com>
7662
7663 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
7664 first SMALL_OPERAND check. New local min_second_step. Move assert
7665 to where locals are set. Add TARGET_RVC support.
7666 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
7667
7668 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
7669
7670 * doc/invoke.texi: Correct -Wformat-overflow code sample.
7671
7672 2018-02-14 Martin Sebor <msebor@redhat.com>
7673
7674 PR tree-optimization/83698
7675 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
7676 arrays constrain the offset range to their bounds.
7677 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
7678 (builtin_access::overlap): Avoid setting the size of overlap if it's
7679 already been set.
7680 (maybe_diag_overlap): Also consider arrays when deciding what values
7681 of offsets to include in diagnostics.
7682
7683 2018-02-14 Martin Sebor <msebor@redhat.com>
7684
7685 PR c/84108
7686 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
7687 that correspond to the kind of a declaration.
7688
7689 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
7690
7691 PR target/83984
7692 * config/pa/pa.md: Load address of PIC label using the linkage table
7693 if the label is nonlocal.
7694
7695 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
7696
7697 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
7698 warning message if user requests -maltivec=be.
7699 * doc/invoke.texi: Document deprecation of -maltivec=be.
7700
7701 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
7702
7703 PR target/84220
7704 * config/rs6000/rs6000-c.c: Update definitions for
7705 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
7706 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
7707
7708 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7709
7710 PR target/84239
7711 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
7712 add _get_ssp intrinsics. Remove argument from
7713 __builtin_ia32_rdssp[d|q].
7714 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
7715 * config/i386/i386-builtin.def: Remove argument from
7716 __builtin_ia32_rdssp[d|q].
7717 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
7718 ix86_expand_special_args_builtin for _rdssp[d|q].
7719 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
7720 Clear register before usage.
7721 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
7722 Add documentation for new _get_ssp and _inc_ssp intrinsics.
7723
7724 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
7725
7726 PR tree-optimization/84357
7727 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
7728 operand 1 of an ARRAY_REF too.
7729
7730 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
7731
7732 PR target/83831
7733 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
7734 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7735 declarations.
7736 (set_of_reg): New struct.
7737 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
7738 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
7739 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
7740 functions.
7741 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
7742 Split into bitclr, bitset, bitinvert patterns if appropriate.
7743 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
7744 use rx_fuse_in_memory_bitop.
7745 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
7746 to named insn, correct maximum insn length.
7747
7748 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
7749
7750 PR target/79242
7751 * machmode.def: Define a complex mode for PARTIAL_INT.
7752 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
7753 MODE_PARTIAL_INT.
7754 * doc/rtl.texi: Document CSPImode.
7755 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
7756 handling.
7757 (msp430_hard_regno_nregs_with_padding): Likewise.
7758
7759 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
7760
7761 PR target/84279
7762 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
7763
7764 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
7765
7766 PR rtl-optimization/84169
7767 * combine.c (try_combine): New variable split_i2i3. Set it to true if
7768 we generated a parallel as new i3 and we split that to new i2 and i3
7769 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
7770 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
7771 those to i2, not i1. Partially rewrite this scan code.
7772
7773 2018-02-13 Jakub Jelinek <jakub@redhat.com>
7774
7775 PR c/82210
7776 * stor-layout.c (place_field): For variable length fields, adjust
7777 offset_align afterwards not just based on the field's alignment,
7778 but also on the size.
7779
7780 PR middle-end/84309
7781 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
7782 of exps and logs in the use_exp2 case.
7783
7784 2018-02-13 Jeff Law <law@redhat.com>
7785
7786 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
7787 entry for "vector".
7788
7789 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
7790 ARGS as unused.
7791
7792 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
7793
7794 PR debug/84342
7795 PR debug/84319
7796 * common.opt (gas-loc-support, gas-locview-support): New.
7797 (ginline-points, ginternal-reset-location-views): New.
7798 * doc/invoke.texi: Document them. Use @itemx where intended.
7799 (gvariable-location-views): Adjust.
7800 * target.def (reset_location_view): New.
7801 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
7802 (TARGET_RESET_LOCATION_VIEW): New.
7803 * doc/tm.texi: Rebuilt.
7804 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
7805 (dwarf2out_default_as_locview_support): New.
7806 (output_asm_line_debug_info): Use option variables.
7807 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
7808 (output_loc_list): Likewise.
7809 (add_high_low_attributes): Check option variables.
7810 Don't output entry view attribute in strict mode.
7811 (gen_inlined_subroutine_die): Check option variables.
7812 (dwarf2out_inline_entry): Likewise.
7813 (init_sections_and_labels): Likewise.
7814 (dwarf2out_early_finish): Likewise.
7815 (maybe_reset_location_view): New, from...
7816 (dwarf2out_var_location): ... here. Call it.
7817 * debug.h (dwarf2out_default_as_loc_support): Declare.
7818 (dwarf2out_default_as_locview_support): Declare.
7819 * hooks.c (hook_int_rtx_insn_0): New.
7820 * hooks.h (hook_int_rtx_insn_0): Declare.
7821 * toplev.c (process_options): Take -gas-loc-support and
7822 -gas-locview-support from dwarf2out. Enable
7823 -gvariable-location-views by default only with locview
7824 assembler support. Enable -ginternal-reset-location-views by
7825 default only if the target defines the corresponding hook.
7826 Enable -ginline-points by default if location views are
7827 enabled; force it disabled if statement frontiers are
7828 disabled.
7829 * tree-inline.c (expand_call_inline): Check option variables.
7830 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
7831
7832 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
7833
7834 PR tree-optimization/84321
7835 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
7836 handling. Also check whether the anti-range contains any values
7837 that satisfy the mask; switch to a VR_RANGE if not.
7838
7839 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
7840
7841 PR sanitizer/84340
7842 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
7843
7844 2018-02-13 Martin Jambor <mjambor@suse.cz>
7845
7846 PR c++/83990
7847 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
7848 of call statements, also set location of a load to a temporary.
7849
7850 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
7851
7852 * config/rl78/rl78.c (add_vector_labels): New function.
7853 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
7854 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
7855 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
7856 which checks that no arguments are passed.
7857 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
7858 * doc/extend.texi: Documentation for the new attribute.
7859
7860 2018-02-13 Andreas Schwab <schwab@suse.de>
7861
7862 * config/riscv/linux.h (CPP_SPEC): Define.
7863
7864 2018-02-13 Jakub Jelinek <jakub@redhat.com>
7865
7866 PR target/84335
7867 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
7868 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
7869 OPTION_MASK_ISA_AES as first argument to def_builtin_const
7870 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
7871 instead of OPTION_MASK_ISA_PCLMUL as first argument to
7872 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
7873 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
7874 temporarily for AES and PCLMUL builtins.
7875
7876 PR tree-optimization/84339
7877 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
7878 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
7879 Formatting fixes.
7880
7881 PR middle-end/84309
7882 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
7883 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
7884 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
7885 inline function.
7886 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
7887 inline function.
7888 * omp-simd-clone.h: New file.
7889 * omp-simd-clone.c: Include omp-simd-clone.h.
7890 (expand_simd_clones): No longer static.
7891 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
7892 cgraph.h and omp-simd-clone.h.
7893 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
7894 (vect_recog_widen_shift_pattern): Formatting fix.
7895 (vect_pattern_recog_1): Don't check optab for calls.
7896
7897 PR target/84336
7898 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
7899 operands[2] into a REG before using gen_lowpart on it.
7900
7901 2018-02-12 Jeff Law <law@redhat.com>
7902
7903 PR target/83760
7904 * config/sh/sh.c (find_barrier): Consider a sibling call
7905 a barrier as well.
7906
7907 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
7908 successfully back substituting a reg.
7909
7910 2018-02-12 Richard Biener <rguenther@suse.de>
7911
7912 PR tree-optimization/84037
7913 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
7914 parameter, move visited init to caller.
7915 (vect_slp_analyze_operations): Separate cost from validity
7916 check, initialize visited once for all instances.
7917 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
7918 for all instances.
7919 * tree-vect-stmts.c (vect_model_simple_cost): Make early
7920 out an assert.
7921 (vect_model_promotion_demotion_cost): Likewise.
7922 (vectorizable_bswap): Guard cost modeling with !slp_node
7923 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
7924 SLP stmts.
7925 (vectorizable_call): Likewise.
7926 (vectorizable_conversion): Likewise.
7927 (vectorizable_assignment): Likewise.
7928 (vectorizable_shift): Likewise.
7929 (vectorizable_operation): Likewise.
7930 (vectorizable_store): Likewise.
7931 (vectorizable_load): Likewise.
7932 (vectorizable_condition): Likewise.
7933 (vectorizable_comparison): Likewise.
7934
7935 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
7936
7937 PR sanitizer/84307
7938 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
7939 (ASAN_MARK): Fix fnspec to account for return value, change pointer
7940 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
7941
7942 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
7943
7944 PR middle-end/83665
7945 * params.def (inline-min-speedup): Increase from 8 to 15.
7946 (max-inline-insns-auto): Decrease from 40 to 30.
7947 * ipa-split.c (consider_split): Add some buffer for function to
7948 be considered inlining candidate.
7949 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
7950 default values.
7951
7952 2018-02-12 Richard Biener <rguenther@suse.de>
7953
7954 PR tree-optimization/84037
7955 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
7956 matched stmts if we cannot swap the non-matched ones.
7957
7958 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
7959
7960 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
7961 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
7962 _mm_maskz_scalef_round_ss): New intrinsics.
7963 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
7964 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
7965 __builtin_ia32_scalefss_round): Remove.
7966 (__builtin_ia32_scalefsd_mask_round,
7967 __builtin_ia32_scalefss_mask_round): New intrinsics.
7968 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
7969 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
7970 ((match_operand:VF_128 2 "<round_nimm_predicate>"
7971 "<round_constraint>")): Changed to ...
7972 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
7973 "<round_scalar_constraint>")): ... this.
7974 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
7975 %0, %1, %2<round_op3>}"): Changed to ...
7976 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
7977 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
7978 %2<round_scalar_mask_op3>}"): ... this.
7979 * config/i386/subst.md (round_scalar_nimm_predicate): New.
7980
7981 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
7982
7983 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
7984 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
7985 (_mm_maskz_sqrt_round_ss): New intrinsics.
7986 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
7987 (__builtin_ia32_sqrtsd_mask_round)
7988 (__builtin_ia32_sqrtss_mask_round): New builtins.
7989 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
7990 (__builtin_ia32_sqrtss_round): Remove.
7991 (__builtin_ia32_sqrtsd_mask_round)
7992 (__builtin_ia32_sqrtss_mask_round): New builtins.
7993 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
7994 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
7995 ((match_operand:VF_128 1 "vector_operand"
7996 "xBm,<round_constraint>")): Changed to ...
7997 ((match_operand:VF_128 1 "vector_operand"
7998 "xBm,<round_scalar_constraint>")): ... this.
7999 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
8000 %0, %2, %<iptr>1<round_op3>}): Changed to ...
8001 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
8002 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
8003 %<iptr>1<round_scalar_mask_op3>}): ... this.
8004 ((set_attr "prefix" "<round_prefix>")): Changed to ...
8005 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
8006
8007 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
8008
8009 PR target/84266
8010 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
8011 Cast vec_cmpeq result to correct type.
8012 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
8013 Cast vec_cmpgt result to correct type.
8014
8015 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
8016
8017 * final.c (final_scan_insn_1): Renamed from...
8018 (final_scan_insn): ... this. New wrapper, to recover
8019 seen from the outermost call in recursive ones.
8020 * config/sparc/sparc.c (output_return): Drop seen from call.
8021 (output_sibcall): Likewise.
8022 * config/visium/visium.c (output_branch): Likewise.
8023
8024 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
8025
8026 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
8027 function label.
8028
8029 2018-02-10 Alan Modra <amodra@gmail.com>
8030
8031 PR target/84300
8032 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
8033 Specify LR as an input.
8034
8035 2018-02-10 Jakub Jelinek <jakub@redhat.com>
8036
8037 PR sanitizer/83987
8038 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
8039 remove_member_access_dummy_vars): New functions.
8040 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
8041 lower_omp_1, execute_lower_omp): Use them.
8042
8043 PR rtl-optimization/84308
8044 * shrink-wrap.c (spread_components): Release todo vector.
8045
8046 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
8047
8048 PR rtl-optimization/57193
8049 * ira-color.c (struct allocno_color_data): Add member
8050 conflict_allocno_hard_prefs.
8051 (update_conflict_allocno_hard_prefs): New.
8052 (bucket_allocno_compare_func): Add a preference based on
8053 conflict_allocno_hard_prefs.
8054 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
8055 (color_allocnos): Remove a dead code. Initiate
8056 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
8057
8058 2018-02-09 Jakub Jelinek <jakub@redhat.com>
8059
8060 PR target/84226
8061 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
8062 constraint from =wa to wa. Avoid a subreg on the output operand,
8063 instead use a pseudo and subreg it in a move.
8064 (p9_xxbrd_<mode>): Changed to ...
8065 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
8066 (p9_xxbrd_v2df): New expander.
8067 (p9_xxbrw_<mode>): Changed to ...
8068 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
8069 (p9_xxbrw_v4sf): New expander.
8070
8071 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
8072
8073 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
8074
8075 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
8076
8077 PR target/83926
8078 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
8079 multiply in 32-bit mode.
8080 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
8081 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
8082 mode.
8083
8084 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
8085
8086 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
8087 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
8088 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
8089 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
8090
8091 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
8092
8093 PR lto/84213
8094 * dwarf2out.c (is_trivial_indirect_ref): New function.
8095 (dwarf2out_late_global_decl): Do not generate a location
8096 attribute for variables that have a non-trivial DECL_VALUE_EXPR
8097 and that are not defined in the current unit.
8098
8099 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
8100
8101 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
8102 instead of a libcall for UNORDERED.
8103
8104 2018-02-09 Tamar Christina <tamar.christina@arm.com>
8105
8106 PR target/82641
8107 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
8108 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
8109
8110 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8111
8112 PR target/PR84295
8113 * config/s390/s390.c (s390_set_current_function): Invoke
8114 s390_indirect_branch_settings also if fndecl didn't change.
8115
8116 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
8117
8118 * config/rs6000/rs6000.md (blockage): Set length to zero.
8119
8120 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
8121
8122 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
8123
8124 2018-02-09 Jakub Jelinek <jakub@redhat.com>
8125
8126 PR sanitizer/84285
8127 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
8128 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
8129 -static-lib*san.
8130
8131 PR debug/84252
8132 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
8133 PARALLEL incoming that failed vt_get_decl_and_offset check.
8134
8135 PR middle-end/84237
8136 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
8137 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
8138 TREE_READONLY bit.
8139 (get_variable_section): For decls in named .bss* sections pass true as
8140 second argument to bss_initializer_p.
8141
8142 2018-02-09 Marek Polacek <polacek@redhat.com>
8143 Jakub Jelinek <jakub@redhat.com>
8144
8145 PR c++/83659
8146 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
8147 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
8148 Sync some changes from cxx_fold_indirect_ref.
8149
8150 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
8151
8152 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
8153 markers.
8154 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
8155 (BLOCK_INLINE_ENTRY_LABEL): New.
8156 (dwarf2out_var_location): Disregard inline entry markers.
8157 (inline_entry_data): New struct.
8158 (inline_entry_data_hasher): New hashtable type.
8159 (inline_entry_data_hasher::hash): New.
8160 (inline_entry_data_hasher::equal): New.
8161 (inline_entry_data_table): New variable.
8162 (add_high_low_attributes): Add DW_AT_entry_pc and
8163 DW_AT_GNU_entry_view attributes if a pending entry is found
8164 in inline_entry_data_table. Add old entry_pc attribute only
8165 if debug nonbinding markers are disabled.
8166 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
8167 markers are enabled.
8168 (block_within_block_p, dwarf2out_inline_entry): New.
8169 (dwarf2out_finish): Check that no entries remained in
8170 inline_entry_data_table.
8171 * final.c (reemit_insn_block_notes): Handle inline entry notes.
8172 (final_scan_insn, notice_source_line): Likewise.
8173 (rest_of_clean_state): Skip inline entry markers.
8174 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
8175 markers.
8176 * gimple.c (gimple_build_debug_inline_entry): New.
8177 * gimple.h (enum gimple_debug_subcode): Add
8178 GIMPLE_DEBUG_INLINE_ENTRY.
8179 (gimple_build_debug_inline_entry): Declare.
8180 (gimple_debug_inline_entry_p): New.
8181 (gimple_debug_nonbind_marker_p): Adjust.
8182 * insn-notes.def (INLINE_ENTRY): New.
8183 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
8184 inline entry marker notes.
8185 (print_insn): Likewise.
8186 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
8187 (INSN_DEBUG_MARKER_KIND): Likewise.
8188 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
8189 * tree-inline.c (expand_call_inline): Build and insert
8190 debug_inline_entry stmt.
8191 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
8192 inline entry blocks early, if nonbind markers are enabled.
8193 (dump_scope_block): Dump fragment info.
8194 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
8195 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
8196 (gimple_build_debug_inline_entry): New.
8197 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
8198 Enable/disable inline entry points too.
8199 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
8200 (DEBUG_INSN): Describe inline entry markers.
8201
8202 * common.opt (gvariable-location-views): New.
8203 (gvariable-location-views=incompat5): New.
8204 * config.in: Rebuilt.
8205 * configure: Rebuilt.
8206 * configure.ac: Test assembler for view support.
8207 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
8208 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
8209 * dwarf2out.c (var_loc_view): New typedef.
8210 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
8211 (dwarf2out_locviews_in_attribute): New.
8212 (dwarf2out_locviews_in_loclist): New.
8213 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
8214 (enum dw_line_info_opcode): Add LI_adv_address.
8215 (struct dw_line_info_table): Add view.
8216 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
8217 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
8218 (zero_view_p): New variable.
8219 (ZERO_VIEW_P): New macro.
8220 (output_asm_line_debug_info): New.
8221 (struct var_loc_node): Add view.
8222 (add_AT_view_list, AT_loc_list): New.
8223 (add_var_loc_to_decl): Add view param. Test it against last.
8224 (new_loc_list): Add view params. Record them.
8225 (AT_loc_list_ptr): Handle loc and view lists.
8226 (view_list_to_loc_list_val_node): New.
8227 (print_dw_val): Handle dw_val_class_view_list.
8228 (size_of_die): Likewise.
8229 (value_format): Likewise.
8230 (loc_list_has_views): New.
8231 (gen_llsym): Set vl_symbol too.
8232 (maybe_gen_llsym, skip_loc_list_entry): New.
8233 (dwarf2out_maybe_output_loclist_view_pair): New.
8234 (output_loc_list): Output view list or entries too.
8235 (output_view_list_offset): New.
8236 (output_die): Handle dw_val_class_view_list.
8237 (output_dwarf_version): New.
8238 (output_compilation_unit_header): Use it.
8239 (output_skeleton_debug_sections): Likewise.
8240 (output_rnglists, output_line_info): Likewise.
8241 (output_pubnames, output_aranges): Update version comments.
8242 (output_one_line_info_table): Output view numbers in asm comments.
8243 (dw_loc_list): Determine current endview, pass it to new_loc_list.
8244 Call maybe_gen_llsym.
8245 (loc_list_from_tree_1): Adjust.
8246 (add_AT_location_description): Create view list attribute if
8247 needed, check it's absent otherwise.
8248 (convert_cfa_to_fb_loc_list): Adjust.
8249 (maybe_emit_file): Call output_asm_line_debug_info for test.
8250 (dwarf2out_var_location): Reset views as needed. Precompute
8251 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
8252 attribute. Set view.
8253 (new_line_info_table): Reset next view.
8254 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
8255 (dwarf2out_source_line): Likewise. Output view resets and labels to
8256 the assembler, or select appropriate line info opcodes.
8257 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
8258 (optimize_string_length): Catch it. Adjust.
8259 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
8260 dw_val_class_view_list, and remove it if no longer needed.
8261 (hash_loc_list): Hash view numbers.
8262 (loc_list_hasher::equal): Compare them.
8263 (optimize_location_lists): Check whether a view list symbol is
8264 needed, and whether the locview attribute is present, and
8265 whether they match. Remove the locview attribute if no longer
8266 needed.
8267 (index_location_lists): Call skip_loc_list_entry for test.
8268 (dwarf2out_finish): Call output_asm_line_debug_info for test.
8269 Use output_dwarf_version.
8270 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
8271 (struct dw_val_node): Add val_view_list.
8272 * final.c (SEEN_NEXT_VIEW): New.
8273 (set_next_view_needed): New.
8274 (clear_next_view_needed): New.
8275 (maybe_output_next_view): New.
8276 (final_start_function): Rename to...
8277 (final_start_function_1): ... this. Take pointer to FIRST,
8278 add SEEN parameter. Emit param bindings in the initial view.
8279 (final_start_function): Reintroduce SEEN-less interface.
8280 (final): Rename to...
8281 (final_1): ... this. Take SEEN parameter. Output final pending
8282 next view at the end.
8283 (final): Reintroduce seen-less interface.
8284 (final_scan_insn): Output pending next view before switching
8285 sections or ending a block. Mark the next view as needed when
8286 outputting variable locations. Notify debug backend of section
8287 changes, and of location view changes.
8288 (rest_of_handle_final): Adjust.
8289 * toplev.c (process_options): Autodetect value for debug variable
8290 location views option. Warn on incompat5 without -gdwarf-5.
8291 * doc/invoke.texi (gvariable-location-views): New.
8292 (gvariable-location-views=incompat5): New.
8293 (gno-variable-location-views): New.
8294
8295 2018-02-08 David Malcolm <dmalcolm@redhat.com>
8296
8297 PR tree-optimization/84136
8298 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
8299 that the result of find_edge is non-NULL.
8300
8301 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
8302
8303 PR target/83008
8304 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
8305 storing integer register in SImode. Fix cost of 256 and 512
8306 byte aligned SSE register store.
8307
8308 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
8309
8310 * config/i386/i386.c (ix86_multiplication_cost): Fix
8311 multiplication cost for TARGET_AVX512DQ.
8312
8313 2018-02-08 Marek Polacek <polacek@redhat.com>
8314
8315 PR tree-optimization/84238
8316 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
8317 get_range_strlen.
8318
8319 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8320
8321 PR tree-optimization/84265
8322 * tree-vect-stmts.c (vectorizable_store): Don't treat
8323 VMAT_CONTIGUOUS accesses as grouped.
8324 (vectorizable_load): Likewise.
8325
8326 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8327
8328 PR tree-optimization/81635
8329 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
8330 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
8331 (test_round_for_mask): New functions.
8332 (wide_int_cc_tests): Call test_round_for_mask.
8333 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
8334 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
8335 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
8336 range returned by get_range_info.
8337
8338 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
8339
8340 PR ipa/81360
8341 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
8342 * symtab.c: Include builtins.h
8343 (symtab_node::output_to_lto_symbol_table_p): Move here
8344 from lto-streamer-out.c:output_symbol_p.
8345 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
8346 (output_symbol_p): Move all logic to symtab.c
8347 (produce_symtab): Update.
8348
8349 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8350
8351 * config/s390/s390-opts.h (enum indirect_branch): Define.
8352 * config/s390/s390-protos.h (s390_return_addr_from_memory)
8353 (s390_indirect_branch_via_thunk)
8354 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
8355 (enum s390_indirect_branch_type): Define.
8356 * config/s390/s390.c (struct s390_frame_layout, struct
8357 machine_function): Remove.
8358 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
8359 (indirect_branch_table_label_no, indirect_branch_table_name):
8360 Define variables.
8361 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
8362 (enum s390_indirect_branch_option): Define.
8363 (s390_return_addr_from_memory): New function.
8364 (s390_handle_string_attribute): New function.
8365 (s390_attribute_table): Add new attribute handler.
8366 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
8367 (s390_indirect_branch_via_thunk): New function.
8368 (s390_indirect_branch_via_inline_thunk): New function.
8369 (s390_function_ok_for_sibcall): When jumping via thunk disallow
8370 sibling call optimization for non z10 compiles.
8371 (s390_emit_call): Force indirect branch target to be a single
8372 register. Add r1 clobber for non-z10 compiles.
8373 (s390_emit_epilogue): Emit return jump via return_use expander.
8374 (s390_reorg): Handle JUMP_INSNs as execute targets.
8375 (s390_option_override_internal): Perform validity checks for the
8376 new command line options.
8377 (s390_indirect_branch_attrvalue): New function.
8378 (s390_indirect_branch_settings): New function.
8379 (s390_set_current_function): Invoke s390_indirect_branch_settings.
8380 (s390_output_indirect_thunk_function): New function.
8381 (s390_code_end): Implement target hook.
8382 (s390_case_values_threshold): Implement target hook.
8383 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
8384 macros.
8385 * config/s390/s390.h (struct s390_frame_layout)
8386 (struct machine_function): Move here from s390.c.
8387 (TARGET_INDIRECT_BRANCH_NOBP_RET)
8388 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
8389 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
8390 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
8391 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
8392 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
8393 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
8394 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
8395 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
8396 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
8397 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
8398 (mnemonic attribute): Add values which aren't recognized
8399 automatically.
8400 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
8401 pattern for branch conversion. Fix mnemonic attribute.
8402 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
8403 indirect branch via thunk if requested.
8404 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
8405 ("*indirect_jump"): Disable for branch conversion using out of
8406 line thunks.
8407 ("indirect_jump_via_thunk<mode>_z10")
8408 ("indirect_jump_via_thunk<mode>")
8409 ("indirect_jump_via_inlinethunk<mode>_z10")
8410 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
8411 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
8412 ("casesi_jump_via_inlinethunk<mode>_z10")
8413 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
8414 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
8415 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
8416 ("*indirect2_jump"): Disable for branch conversion.
8417 ("casesi_jump"): Turn into expander and expand patterns for branch
8418 conversion.
8419 ("return_use"): New expander.
8420 ("*return"): Emit return via thunk and rename it to ...
8421 ("*return<mode>"): ... this one.
8422 * config/s390/s390.opt: Add new options and and enum for the
8423 option values.
8424
8425 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
8426
8427 * lra-constraints.c (match_reload): Unconditionally use
8428 gen_lowpart_SUBREG, rather than selecting between that
8429 and equivalent gen_rtx_SUBREG code.
8430
8431 2018-02-08 Richard Biener <rguenther@suse.de>
8432
8433 PR tree-optimization/84233
8434 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
8435 changed flag instead of boguously re-using phi_inserted.
8436
8437 2018-02-08 Martin Jambor <mjambor@suse.cz>
8438
8439 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
8440 static local variables.
8441
8442 2018-02-08 Richard Biener <rguenther@suse.de>
8443
8444 PR tree-optimization/84278
8445 * tree-vect-stmts.c (vectorizable_store): When looking for
8446 smaller vector types to perform grouped strided loads/stores
8447 make sure the mode is supported by the target.
8448 (vectorizable_load): Likewise.
8449
8450 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
8451
8452 * config/aarch64/aarch64.c (aarch64_components_for_bb):
8453 Increase LDP/STP opportunities by adding adjacent callee-saves.
8454
8455 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
8456
8457 PR rtl-optimization/84068
8458 PR rtl-optimization/83459
8459 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
8460
8461 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
8462
8463 PR tree-optimization/84224
8464 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
8465 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
8466 non-zero arguments.
8467
8468 2018-02-07 Iain Sandoe <iain@codesourcery.com>
8469
8470 PR target/84113
8471 * config/rs6000/altivec.md (*restore_world): Remove LR use.
8472 * config/rs6000/predicates.md (restore_world_operation): Adjust op
8473 count, remove one USE.
8474
8475 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
8476
8477 * doc/install.texi (Configuration): Document the
8478 --with-long-double-format={ibm,ieee} PowerPC configuration
8479 options.
8480
8481 PR target/84154
8482 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
8483 Convert from define_expand to be define_insn_and_split. Rework
8484 float/double/_Float128 conversions to QI/HI/SImode to work with
8485 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
8486 conversions to QI/HImode types did a store and then a load to
8487 truncate the value. For conversions to VSX registers, don't split
8488 the insn, instead emit the code directly. Use the code iterator
8489 any_fix to combine signed and unsigned conversions.
8490 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
8491 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
8492 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8493 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
8494 (fix_<mode>di2_hw): Likewise.
8495 (fixuns_<mode>di2_hw): Likewise.
8496 (fix_<mode>si2_hw): Likewise.
8497 (fixuns_<mode>si2_hw): Likewise.
8498 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
8499 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
8500 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
8501 fix<uns>_trunc<SFDF:mode>si2_p8.
8502 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
8503 used.
8504 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
8505 (fix<uns>_<mode>_mem): Likewise.
8506 (fctiw<u>z_<mode>_mem): Likewise.
8507 (fix<uns>_<mode>_mem): Likewise.
8508 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
8509 the register allocator from doing a direct move to the GPRs to do
8510 a store, and instead use the ISA 3.0 store byte/half-word from
8511 vector register instruction. For IEEE 128-bit floating point,
8512 also optimize stores of 32-bit ints.
8513 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
8514
8515 2018-02-07 Alan Hayward <alan.hayward@arm.com>
8516
8517 * genextract.c (push_pathstr_operand): New function to support
8518 [a-zA-Z].
8519 (walk_rtx): Call push_pathstr_operand.
8520 (print_path): Support [a-zA-Z].
8521
8522 2018-02-07 Richard Biener <rguenther@suse.de>
8523
8524 PR tree-optimization/84037
8525 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
8526 (cse_and_gimplify_to_preheader): Declare.
8527 (vect_get_place_in_interleaving_chain): Likewise.
8528 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8529 ivexpr_map.
8530 (_loop_vec_info::~_loop_vec_info): Delete it.
8531 (cse_and_gimplify_to_preheader): New function.
8532 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
8533 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
8534 (vectorizable_load): Likewise. For grouped stores always base
8535 the IV on the first element.
8536 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
8537 condition before gimplifying.
8538
8539 2018-02-07 Jakub Jelinek <jakub@redhat.com>
8540
8541 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
8542 *DIV_EXPR and *MOD_EXPR.
8543
8544 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
8545
8546 PR target/84248
8547 * config/i386/i386.c (ix86_option_override_internal): Mask out
8548 the CF_SET bit when checking -fcf-protection.
8549
8550 2018-02-07 Tom de Vries <tom@codesourcery.com>
8551
8552 PR libgomp/84217
8553 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
8554 enough.
8555
8556 2018-02-07 Richard Biener <rguenther@suse.de>
8557
8558 PR tree-optimization/84204
8559 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
8560 this place.
8561
8562 PR tree-optimization/84205
8563 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
8564 special-case isl_ast_op_zdiv_r.
8565
8566 PR tree-optimization/84223
8567 * graphite-scop-detection.c (gather_bbs::before_dom_children):
8568 Only add conditions from within the region.
8569 (gather_bbs::after_dom_children): Adjust.
8570
8571 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
8572
8573 PR target/84209
8574 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
8575 * config/avr/avr.md: Only post-reload split REG-REG moves if
8576 either register is GENERAL_REG_P.
8577
8578 2018-02-07 Jakub Jelinek <jakub@redhat.com>
8579
8580 PR tree-optimization/84235
8581 * tree-ssa-scopedtables.c
8582 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
8583 if the subtraction is performed in floating point type where NaNs are
8584 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
8585 build 1. Formatting fix.
8586
8587 2018-02-06 Jakub Jelinek <jakub@redhat.com>
8588
8589 PR target/84146
8590 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
8591 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
8592 and skip it regardless of bb boundaries. Use CALL_P macro,
8593 don't test INSN_P (insn) together with CALL_P or JUMP_P check
8594 unnecessarily, formatting fix.
8595
8596 2018-02-06 Michael Collison <michael.collison@arm.com>
8597
8598 * config/arm/thumb2.md:
8599 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
8600 (*thumb_mov_notscc): Ditto.
8601
8602 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
8603
8604 PR target/84154
8605 * config/rs6000/rs6000.md (su code attribute): Use "u" for
8606 unsigned_fix, not "s".
8607
8608 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8609
8610 * configure.ac (gcc_fn_eh_frame_ro): New function.
8611 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
8612 correct .eh_frame permissions.
8613 * configure: Regenerate.
8614
8615 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
8616
8617 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
8618 irrelevant options.
8619
8620 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8621
8622 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8623 Display warning message for -mno-speculate-indirect-jumps.
8624
8625 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
8626
8627 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
8628 Undocumented.
8629 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
8630
8631 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
8632
8633 PR tree-optimization/84225
8634 * tree-eh.c (find_trapping_overflow): Only call
8635 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
8636
8637 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8638
8639 PR target/84145
8640 * config/i386/i386.c: Reimplement the check of possible options
8641 -mibt/-mshstk conbination. Change error messages.
8642 * doc/invoke.texi: Fix a typo: remove extra '='.
8643
8644 2018-02-06 Marek Polacek <polacek@redhat.com>
8645
8646 PR tree-optimization/84228
8647 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
8648
8649 2018-02-06 Tamar Christina <tamar.christina@arm.com>
8650
8651 PR target/82641
8652 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
8653 emitted arch directives.
8654 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
8655 __ARM_FEATURE_COPROC before changing architectures.
8656
8657 2018-02-06 Richard Biener <rguenther@suse.de>
8658
8659 * config/i386/i386.c (print_reg): Fix typo.
8660 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
8661
8662 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
8663
8664 * configure: Regenerate.
8665
8666 2018-02-05 Martin Sebor <msebor@redhat.com>
8667
8668 PR tree-optimization/83369
8669 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
8670 inlining context.
8671
8672 2018-02-05 Martin Liska <mliska@suse.cz>
8673
8674 * doc/invoke.texi: Cherry-pick upstream r323995.
8675
8676 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
8677
8678 * ira.c (ira_init_register_move_cost): Adjust comment.
8679
8680 2018-02-05 Martin Liska <mliska@suse.cz>
8681
8682 PR gcov-profile/84137
8683 * doc/gcov.texi: Fix typo in documentation.
8684
8685 2018-02-05 Martin Liska <mliska@suse.cz>
8686
8687 PR gcov-profile/83879
8688 * doc/gcov.texi: Document necessity of --dynamic-list-data when
8689 using dlopen functionality.
8690
8691 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
8692
8693 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
8694 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
8695 _mm_maskz_range_ss, _mm_mask_range_round_ss,
8696 _mm_maskz_range_round_ss): New intrinsics.
8697 (__builtin_ia32_rangesd128_round)
8698 (__builtin_ia32_rangess128_round): Remove.
8699 (__builtin_ia32_rangesd128_mask_round,
8700 __builtin_ia32_rangess128_mask_round): New builtins.
8701 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
8702 __builtin_ia32_rangess128_round): Remove.
8703 (__builtin_ia32_rangesd128_mask_round,
8704 __builtin_ia32_rangess128_mask_round): New builtins.
8705 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
8706 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
8707 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
8708 "<round_saeonly_constraint>")): Changed to ...
8709 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
8710 "<round_saeonly_scalar_constraint>")): ... this.
8711 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
8712 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
8713 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
8714 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
8715 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
8716
8717 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
8718
8719 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
8720 options.
8721 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
8722 Remove all values except native, 8540 and 8548.
8723
8724 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
8725
8726 * config/i386/i386.c (ix86_output_function_return): Pass
8727 INVALID_REGNUM, instead of -1, as invalid register number to
8728 indirect_thunk_name and output_indirect_thunk.
8729
8730 2018-02-02 Julia Koval <julia.koval@intel.com>
8731
8732 * config.gcc: Add -march=icelake.
8733 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
8734 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
8735 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
8736 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
8737 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
8738 (processor_target_table): Add icelake.
8739 (ix86_option_override_internal): Handle new PTAs.
8740 (get_builtin_code_for_version): Handle icelake.
8741 (M_INTEL_COREI7_ICELAKE): New.
8742 (fold_builtin_cpu): Handle icelake.
8743 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
8744 * doc/invoke.texi: Add -march=icelake.
8745
8746 2018-02-02 Julia Koval <julia.koval@intel.com>
8747
8748 * config/i386/i386.c (ix86_option_override_internal): Change flags type
8749 to wide_int_bitmask.
8750 * wide-int-bitmask.h: New.
8751
8752 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8753
8754 PR target/84066
8755 * config/i386/i386.md: Replace Pmode with word_mode in
8756 builtin_setjmp_setup and builtin_longjmp to support x32.
8757
8758 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
8759
8760 PR target/56010
8761 PR target/83743
8762 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
8763 #include "opts.h".
8764 (rs6000_supported_cpu_names): New static variable.
8765 (linux_cpu_translation_table): Likewise.
8766 (elf_platform) <cpu>: Define new static variable and use it.
8767 Translate kernel AT_PLATFORM name to canonical name if needed.
8768 Error if platform name is unknown.
8769
8770 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
8771
8772 PR target/84089
8773 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
8774
8775 2018-02-01 Jeff Law <law@redhat.com>
8776
8777 PR target/84128
8778 * config/i386/i386.c (release_scratch_register_on_entry): Add new
8779 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
8780 the scratch if RELEASE_VIA_POP is false.
8781 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
8782 If we have to save a temporary register, decrement SIZE appropriately.
8783 Pass new arguments to release_scratch_register_on_entry.
8784 (ix86_adjust_stack_and_probe): Likewise.
8785 (ix86_emit_probe_stack_range): Pass new arguments to
8786 release_scratch_register_on_entry.
8787
8788 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
8789
8790 PR rtl-optimization/84157
8791 * combine.c (change_zero_ext): Use REG_P predicate in
8792 front of HARD_REGISTER_P predicate.
8793
8794 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
8795
8796 * config/avr/avr.c (avr_option_override): Move disabling of
8797 -fdelete-null-pointer-checks to...
8798 * common/config/avr/avr-common.c (avr_option_optimization_table):
8799 ...here.
8800
8801 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8802
8803 PR tree-optimization/81635
8804 * tree-data-ref.c (split_constant_offset_1): For types that
8805 wrap on overflow, try to use range info to prove that wrapping
8806 cannot occur.
8807
8808 2018-02-01 Renlin Li <renlin.li@arm.com>
8809
8810 PR target/83370
8811 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
8812 TAILCALL_ADDR_REGS.
8813 (aarch64_register_move_cost): Likewise.
8814 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
8815 TAILCALL_ADDR_REGS.
8816 (REG_CLASS_NAMES): Likewise.
8817 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
8818 TAILCALL_ADDR_REGS. Remove IP registers.
8819 * config/aarch64/aarch64.md (Ucs): Update register constraint.
8820
8821 2018-02-01 Richard Biener <rguenther@suse.de>
8822
8823 * domwalk.h (dom_walker::dom_walker): Add additional constructor
8824 for specifying RPO order and allow NULL for that.
8825 * domwalk.c (dom_walker::dom_walker): Likewise.
8826 (dom_walker::walk): Handle NULL RPO order.
8827 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
8828 in RPO order.
8829 (rewrite_update_dom_walker): Likewise.
8830 (mark_def_dom_walker): Likewise.
8831
8832 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8833
8834 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
8835 (aarch64_maybe_expand_sve_subreg_move): Declare.
8836 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
8837 * config/aarch64/predicates.md (aarch64_any_register_operand): New
8838 predicate.
8839 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
8840 that are semantically a reverse operation.
8841 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
8842 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
8843 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
8844 functions.
8845 (aarch64_can_change_mode_class): For big-endian, forbid changes
8846 between two SVE modes if they have different element sizes.
8847
8848 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8849
8850 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
8851 the TImode handling for big-endian targets.
8852
8853 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8854
8855 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
8856 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
8857 not just bytes.
8858 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
8859 Remove BSWAP handing for big-endian targets and use the form of
8860 LD1RQ appropariate for the mode.
8861
8862 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8863
8864 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
8865 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
8866 duplicated element.
8867
8868 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
8869
8870 PR tearget/83845
8871 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
8872 check for operands that need to go through aarch64_sve_reload_be.
8873
8874 2018-02-01 Jakub Jelinek <jakub@redhat.com>
8875
8876 PR tree-optimization/81661
8877 PR tree-optimization/84117
8878 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
8879 * tree-eh.c: Include gimplify.h.
8880 (find_trapping_overflow, replace_trapping_overflow,
8881 rewrite_to_non_trapping_overflow): New functions.
8882 * tree-vect-loop.c: Include tree-eh.h.
8883 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
8884 * tree-data-ref.c: Include tree-eh.h.
8885 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
8886
8887 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
8888
8889 PR rtl-optimization/84123
8890 * combine.c (change_zero_ext): Check if hard register satisfies
8891 can_change_dest_mode before calling gen_lowpart_SUBREG.
8892
8893 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
8894
8895 PR target/82444
8896 * ira.c (ira_init_register_move_cost): Remove assert.
8897
8898 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
8899
8900 PR rtl-optimization/84071
8901 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
8902 * doc/tm.texi: Regenerate.
8903
8904 2018-01-31 Richard Biener <rguenther@suse.de>
8905
8906 PR tree-optimization/84132
8907 * tree-data-ref.c (analyze_miv_subscript): Properly
8908 check whether evolution_function_is_affine_multivariate_p
8909 before calling gcd_of_steps_may_divide_p.
8910
8911 2018-01-31 Julia Koval <julia.koval@intel.com>
8912
8913 PR target/83618
8914 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
8915 * config/i386/i386.md (rdpid_rex64) New.
8916 (rdpid): Make 32bit only.
8917
8918 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
8919
8920 PR lto/84105
8921 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
8922 an IDENTIFIER_NODE for FUNCTION_TYPE's.
8923
8924 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
8925
8926 Revert
8927 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
8928
8929 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
8930
8931 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
8932
8933 PR rtl-optimization/84071
8934 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
8935 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
8936
8937 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
8938
8939 * config/arc/arc.c (arc_handle_aux_attribute): New function.
8940 (arc_attribute_table): Add 'aux' attribute.
8941 (arc_in_small_data_p): Consider aux like variables.
8942 (arc_is_aux_reg_p): New function.
8943 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
8944 (arc_get_aux_arg): New function.
8945 (prepare_move_operands): Handle aux-register access.
8946 (arc_handle_aux_attribute): New function.
8947 * doc/extend.texi (ARC Variable attributes): Add subsection.
8948
8949 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
8950
8951 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
8952 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
8953 (arc_attribute_table): Add 'uncached' attribute.
8954 (arc_print_operand): Print '.di' flag for uncached memory
8955 accesses.
8956 (arc_in_small_data_p): Do not consider for small data the uncached
8957 types.
8958 (arc_is_uncached_mem_p): New function.
8959 * config/arc/predicates.md (compact_store_memory_operand): Check
8960 for uncached memory accesses.
8961 (nonvol_nonimm_operand): Likewise.
8962 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
8963
8964 2018-01-31 Jakub Jelinek <jakub@redhat.com>
8965
8966 PR c/84100
8967 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
8968 falign-loops=): Add Optimization flag.
8969
8970 2018-01-30 Jeff Law <law@redhat.com>
8971
8972 PR target/84064
8973 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
8974 INT_REGISTERS_SAVED. Check it prior to calling
8975 get_scratch_register_on_entry.
8976 (ix86_adjust_stack_and_probe): Similarly.
8977 (ix86_emit_probe_stack_range): Similarly.
8978 (ix86_expand_prologue): Corresponding changes.
8979
8980 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8981
8982 PR target/40411
8983 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
8984 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
8985
8986 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
8987
8988 PR target/84112
8989 * lra-constraints.c (curr_insn_transform): Process AND in the
8990 address.
8991
8992 2018-01-30 Jakub Jelinek <jakub@redhat.com>
8993
8994 PR rtl-optimization/83986
8995 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
8996 dependence against last_pending_memory_flush in addition to
8997 pending_jump_insns.
8998
8999 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
9000
9001 PR tree-optimization/81611
9002 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
9003 copies.
9004
9005 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9006
9007 PR target/83758
9008 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
9009 a reg rtx.
9010
9011 2018-01-30 Richard Biener <rguenther@suse.de>
9012 Jakub Jelinek <jakub@redhat.com>
9013
9014 PR tree-optimization/84111
9015 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
9016 inner loops added during recursion, as they don't have up-to-date
9017 SSA form.
9018
9019 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
9020
9021 PR ipa/81360
9022 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
9023 (can_inline_edge_by_limits_p): ... here.
9024 (can_early_inline_edge_p, check_callers,
9025 update_caller_keys, update_callee_keys, recursive_inlining,
9026 add_new_edges_to_heap, speculation_useful_p,
9027 inline_small_functions,
9028 inline_small_functions, flatten_function,
9029 inline_to_all_callers_1): Update.
9030
9031 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
9032
9033 * profile-count.c (profile_count::combine_with_ipa_count): Handle
9034 zeros correctly.
9035
9036 2018-01-30 Richard Biener <rguenther@suse.de>
9037
9038 PR tree-optimization/83008
9039 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
9040 invariant and constant vector uses in stmts when they need
9041 more than one stmt.
9042
9043 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9044
9045 PR bootstrap/84017
9046 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
9047 * configure: Regenerate.
9048
9049 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9050
9051 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
9052 pattern.
9053 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
9054 Use gen_rtx_REG rather than gen_lowpart.
9055
9056 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9057
9058 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
9059 rather than 0 when creating partial subregs.
9060
9061 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
9062
9063 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
9064 of usage.
9065
9066 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
9067
9068 PR target/81550
9069 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
9070 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
9071 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
9072 flags. This restores the settings used before the 2017-07-24.
9073 Turning off pre increment/decrement/modify allows IVOPTS to
9074 optimize DF/SF loops where the index is an int.
9075
9076 2018-01-29 Richard Biener <rguenther@suse.de>
9077 Kelvin Nilsen <kelvin@gcc.gnu.org>
9078
9079 PR bootstrap/80867
9080 * tree-vect-stmts.c (vectorizable_call): Don't call
9081 targetm.vectorize_builtin_md_vectorized_function if callee is
9082 NULL.
9083
9084 2018-01-22 Carl Love <cel@us.ibm.com>
9085
9086 * doc/extend.tex: Fix typo in second arg in
9087 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
9088
9089 2018-01-29 Richard Biener <rguenther@suse.de>
9090
9091 PR tree-optimization/84086
9092 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
9093 (flush_ssaname_freelist): When SSA names were released reset
9094 the SCEV hash table.
9095
9096 2018-01-29 Richard Biener <rguenther@suse.de>
9097
9098 PR tree-optimization/84057
9099 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
9100 removed paths when removing edges.
9101
9102 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
9103
9104 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
9105 -mfunction-return=@var{choice}.
9106
9107 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
9108
9109 PR diagnostic/84034
9110 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
9111 Handle CR like TAB.
9112 (layout::print_source_line): Likewise.
9113 (test_get_line_width_without_trailing_whitespace): Add test cases.
9114
9115 2018-01-27 Jakub Jelinek <jakub@redhat.com>
9116
9117 PR middle-end/84040
9118 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
9119 debug insns.
9120
9121 2018-01-26 Jim Wilson <jimw@sifive.com>
9122
9123 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
9124
9125 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
9126 specified.
9127
9128 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9129
9130 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
9131 and CMP + SUB-immediate -> SUBS.
9132
9133 2018-01-26 Martin Sebor <msebor@redhat.com>
9134
9135 PR tree-optimization/83896
9136 * tree-ssa-strlen.c (get_string_len): Rename...
9137 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
9138 Avoid assuming length is constant.
9139 (handle_char_store): Use HOST_WIDE_INT for string length.
9140
9141 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
9142
9143 PR target/81763
9144 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
9145 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
9146
9147 2018-01-26 Richard Biener <rguenther@suse.de>
9148
9149 PR rtl-optimization/84003
9150 * dse.c (record_store): Only record redundant stores when
9151 the earlier store aliases at least all accesses the later one does.
9152
9153 2018-01-26 Jakub Jelinek <jakub@redhat.com>
9154
9155 PR rtl-optimization/83985
9156 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
9157 REG_CFA_RESTORE insns.
9158 (delete_unmarked_insns): Don't ignore separate shrink wrapping
9159 REG_CFA_RESTORE insns here.
9160
9161 PR c/83989
9162 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
9163 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
9164
9165 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9166
9167 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
9168 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
9169 (arc_init): Likewise.
9170 (arc_override_options): Likewise.
9171 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
9172 value.
9173 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
9174 support.
9175 * config/arc/arc.h (TARGET_DBNZ): Define.
9176 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
9177 properly set the tune attribute.
9178 (dbnz): Use TARGET_DBNZ guard.
9179 * config/arc/arc.opt (mtune): Add core3 option.
9180
9181 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9182
9183 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
9184 recognize new pic like addresses.
9185 (arc_delegitimize_address): Clean up.
9186
9187 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9188
9189 * config/arc/arc-arches.def: Option mrf16 valid for all
9190 architectures.
9191 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
9192 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
9193 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
9194 * config/arc/arc-tables.opt: Regenerate.
9195 * config/arc/arc.c (arc_conditional_register_usage): Handle
9196 reduced register file case.
9197 (arc_file_start): Set must have build attributes.
9198 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
9199 mrf16 option value.
9200 * config/arc/arc.opt (mrf16): Add new option.
9201 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
9202 * config/arc/genmultilib.awk: Handle new mrf16 option.
9203 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
9204 * config/arc/t-multilib: Regenerate.
9205 * doc/invoke.texi (ARC Options): Document mrf16 option.
9206
9207 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9208
9209 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
9210 * config/arc/arc.c (arc_handle_secure_attribute): New function.
9211 (arc_attribute_table): Add 'secure_call' attribute.
9212 (arc_print_operand): Print secure call operand.
9213 (arc_function_ok_for_sibcall): Don't optimize tail calls when
9214 secure.
9215 (arc_is_secure_call_p): New function. * config/arc/arc.md
9216 (call_i): Add support for sjli instruction.
9217 (call_value_i): Likewise.
9218 * config/arc/constraints.md (Csc): New constraint.
9219
9220 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
9221 John Eric Martin <John.Martin@emmicro-us.com>
9222
9223 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
9224 * config/arc/arc.c (_arc_jli_section): New struct.
9225 (arc_jli_section): New type.
9226 (rc_jli_sections): New static variable.
9227 (arc_handle_jli_attribute): New function.
9228 (arc_attribute_table): Add jli_always and jli_fixed attribute.
9229 (arc_file_end): New function.
9230 (TARGET_ASM_FILE_END): Define.
9231 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
9232 (arc_add_jli_section): New function.
9233 (jli_call_scan): Likewise.
9234 (arc_reorg): Call jli_call_scan.
9235 (arc_output_addsi): Remove 'S' from printing asm operand.
9236 (arc_is_jli_call_p): New function.
9237 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
9238 operand.
9239 (movhi_insn): Likewise.
9240 (movsi_insn): Likewise.
9241 (movsi_set_cc_insn): Likewise.
9242 (loadqi_update): Likewise.
9243 (load_zeroextendqisi_update): Likewise.
9244 (load_signextendqisi_update): Likewise.
9245 (loadhi_update): Likewise.
9246 (load_zeroextendhisi_update): Likewise.
9247 (load_signextendhisi_update): Likewise.
9248 (loadsi_update): Likewise.
9249 (loadsf_update): Likewise.
9250 (movsicc_insn): Likewise.
9251 (bset_insn): Likewise.
9252 (bxor_insn): Likewise.
9253 (bclr_insn): Likewise.
9254 (bmsk_insn): Likewise.
9255 (bicsi3_insn): Likewise.
9256 (cmpsi_cc_c_insn): Likewise.
9257 (movsi_ne): Likewise.
9258 (movsi_cond_exec): Likewise.
9259 (clrsbsi2): Likewise.
9260 (norm_f): Likewise.
9261 (normw): Likewise.
9262 (swap): Likewise.
9263 (divaw): Likewise.
9264 (flag): Likewise.
9265 (sr): Likewise.
9266 (kflag): Likewise.
9267 (ffs): Likewise.
9268 (ffs_f): Likewise.
9269 (fls): Likewise.
9270 (call_i): Remove 'S' asm letter, add jli instruction.
9271 (call_value_i): Likewise.
9272 * config/arc/arc.op (mjli-always): New option.
9273 * config/arc/constraints.md (Cji): New constraint.
9274 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
9275 operand.
9276 (subsf3_fpx): Likewise.
9277 (mulsf3_fpx): Likewise.
9278 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
9279 asm operand.
9280 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
9281 function attrbutes.
9282 * doc/invoke.texi (ARC): Document mjli-always option.
9283
9284 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
9285
9286 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
9287 avoid addition with 0 and use incw and decw where possible.
9288
9289 2018-01-26 Richard Biener <rguenther@suse.de>
9290
9291 PR tree-optimization/81082
9292 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
9293 association if it requires casting to unsigned.
9294 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
9295 from fold_plusminus_mult_expr to catch important cases late when
9296 range info is available.
9297
9298 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9299
9300 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
9301 * configure.ac (hidden_linkonce): New test.
9302 * configure: Regenerate.
9303 * config.in: Regenerate.
9304
9305 2018-01-26 Julia Koval <julia.koval@intel.com>
9306
9307 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
9308 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
9309 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
9310 _mm_mask_bitshuffle_epi64_mask): Fix type.
9311 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
9312 USI_FTYPE_V4DI_V4DI_USI): Remove.
9313 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
9314 __builtin_ia32_vpshufbitqmb256_mask,
9315 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
9316 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
9317 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
9318
9319 2018-01-26 Alan Modra <amodra@gmail.com>
9320
9321 PR target/84033
9322 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
9323 UNSPEC_VBPERMQ. Sort other unspecs.
9324
9325 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
9326
9327 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
9328
9329 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
9330
9331 PR middle-end/83055
9332 * predict.c (drop_profile): Do not push/pop cfun; update also
9333 node->count.
9334 (handle_missing_profiles): Fix logic looking for zero profiles.
9335
9336 2018-01-25 Jakub Jelinek <jakub@redhat.com>
9337
9338 PR middle-end/83977
9339 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
9340 on functions with #pragma omp declare simd or functions with simd
9341 attribute.
9342 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
9343 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
9344 Remove trailing \n from warning_at calls.
9345
9346 2018-01-25 Tom de Vries <tom@codesourcery.com>
9347
9348 PR target/84028
9349 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9350 for neutered workers.
9351
9352 2018-01-24 Joseph Myers <joseph@codesourcery.com>
9353
9354 PR target/68467
9355 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
9356 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
9357
9358 2018-01-24 Jeff Law <law@redhat.com>
9359
9360 PR target/83994
9361 * i386.c (get_probe_interval): Move to earlier point.
9362 (ix86_compute_frame_layout): If -fstack-clash-protection and
9363 the frame is larger than the probe interval, then use pushes
9364 to save registers rather than reg->mem moves.
9365 (ix86_expand_prologue): Remove conditional for int_registers_saved
9366 assertion.
9367
9368 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
9369
9370 PR target/84014
9371 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
9372 min/max for never referenced object.
9373
9374 2018-01-24 Jakub Jelinek <jakub@redhat.com>
9375
9376 PR middle-end/83977
9377 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
9378 here.
9379 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
9380 attributes from DECL_ATTRIBUTES (decl) without affecting
9381 DECL_ATTRIBUTES (current_function_decl).
9382 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
9383 functions with non-NULL DECL_ABSTRACT_ORIGIN.
9384
9385 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
9386
9387 PR tree-optimization/83979
9388 * fold-const.c (fold_comparison): Use constant_boolean_node
9389 instead of boolean_{true,false}_node.
9390
9391 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
9392
9393 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
9394 with zero counts.
9395
9396 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9397
9398 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9399 Simplify the clause that sets the length attribute.
9400 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9401 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
9402 clause that sets the length attribute.
9403 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9404
9405 2018-01-24 Tom de Vries <tom@codesourcery.com>
9406
9407 PR target/83589
9408 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
9409 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
9410 Add strict parameter.
9411 (prevent_branch_around_nothing): Insert dummy insn between branch to
9412 label and label with no ptx insn inbetween.
9413 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
9414
9415 2018-01-24 Tom de Vries <tom@codesourcery.com>
9416
9417 PR target/81352
9418 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
9419 for neutered threads in warp.
9420 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
9421
9422 2018-01-24 Richard Biener <rguenther@suse.de>
9423
9424 PR tree-optimization/83176
9425 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
9426 operands.
9427
9428 2018-01-24 Richard Biener <rguenther@suse.de>
9429
9430 PR tree-optimization/82819
9431 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
9432 code generating pluses that are no-ops in the target precision.
9433
9434 2018-01-24 Richard Biener <rguenther@suse.de>
9435
9436 PR middle-end/84000
9437 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
9438
9439 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
9440
9441 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
9442 to merge probabilities.
9443 * predict.c (probably_never_executed): Also mark as cold functions
9444 with global 0 profile and guessed local profile.
9445 * profile-count.c (profile_probability::combine_with_count): New
9446 member function.
9447 * profile-count.h (profile_probability::operator*,
9448 profile_probability::operator*=, profile_probability::operator/,
9449 profile_probability::operator/=): Reduce precision to adjusted
9450 and set value to guessed on contradictory divisions.
9451 (profile_probability::combine_with_freq): Remove.
9452 (profile_probability::combine_wiht_count): Declare.
9453 (profile_count::force_nonzero):: Set to adjusted.
9454 (profile_count::probability_in):: Set quality to adjusted.
9455 * tree-ssa-tail-merge.c (replace_block_by): Use
9456 combine_with_count.
9457
9458 2018-01-23 Andrew Waterman <andrew@sifive.com>
9459 Jim Wilson <jimw@sifive.com>
9460
9461 * config/riscv/riscv.c (riscv_stack_boundary): New.
9462 (riscv_option_override): Set riscv_stack_boundary. Handle
9463 riscv_preferred_stack_boundary_arg.
9464 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
9465 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
9466 (STACK_BOUNDARY): Set to riscv_stack_boundary.
9467 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
9468 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
9469 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
9470
9471 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
9472
9473 PR target/83905
9474 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
9475 of struct ix86_frame.
9476 (ix86_expand_epilogue): Likewise. Add a local variable for
9477 the reg_save_offset field in struct ix86_frame.
9478
9479 2018-01-23 Bin Cheng <bin.cheng@arm.com>
9480
9481 PR tree-optimization/82604
9482 * tree-loop-distribution.c (enum partition_kind): New enum item
9483 PKIND_PARTIAL_MEMSET.
9484 (partition_builtin_p): Support above new enum item.
9485 (generate_code_for_partition): Ditto.
9486 (compute_access_range): Differentiate cases that equality can be
9487 proven at all loops, the innermost loops or no loops.
9488 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
9489 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
9490 (finalize_partitions, distribute_loop): Don't fuse partition of
9491 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
9492 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
9493 parloop is enabled.
9494
9495 2018-01-23 Martin Liska <mliska@suse.cz>
9496
9497 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
9498 order to ignore the predictor.
9499 (PRED_POLYMORPHIC_CALL): Likewise.
9500 (PRED_RECURSIVE_CALL): Likewise.
9501
9502 2018-01-23 Martin Liska <mliska@suse.cz>
9503
9504 * tree-profile.c (tree_profiling): Print function header to
9505 aware reader which function we are working on.
9506 * value-prof.c (gimple_find_values_to_profile): Do not print
9507 not interesting value histograms.
9508
9509 2018-01-23 Martin Liska <mliska@suse.cz>
9510
9511 * profile-count.h (enum profile_quality): Add
9512 profile_uninitialized as the first value. Do not number values
9513 as they are zero based.
9514 (profile_count::verify): Update sanity check.
9515 (profile_probability::verify): Likewise.
9516
9517 2018-01-23 Nathan Sidwell <nathan@acm.org>
9518
9519 * doc/invoke.texi (ffor-scope): Deprecate.
9520
9521 2018-01-23 David Malcolm <dmalcolm@redhat.com>
9522
9523 PR tree-optimization/83510
9524 * domwalk.c (set_all_edges_as_executable): New function.
9525 (dom_walker::dom_walker): Convert bool param
9526 "skip_unreachable_blocks" to enum reachability. Move setup of
9527 edge flags to set_all_edges_as_executable and only do it when
9528 reachability is REACHABLE_BLOCKS.
9529 * domwalk.h (enum dom_walker::reachability): New enum.
9530 (dom_walker::dom_walker): Convert bool param
9531 "skip_unreachable_blocks" to enum reachability.
9532 (set_all_edges_as_executable): New decl.
9533 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
9534 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
9535 "reachability".
9536 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
9537 but converting true to REACHABLE_BLOCKS.
9538 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
9539 * tree-vrp.c
9540 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
9541 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
9542 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
9543 REACHABLE_BLOCKS.
9544 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
9545 if check_all_array_refs will be called.
9546
9547 2018-01-23 David Malcolm <dmalcolm@redhat.com>
9548
9549 * tree.c (selftest::test_location_wrappers): Add more test
9550 coverage.
9551
9552 2018-01-23 David Malcolm <dmalcolm@redhat.com>
9553
9554 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
9555 (selftest::test_bit_in_range): Likewise.
9556
9557 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
9558
9559 PR testsuite/83888
9560 * doc/sourcebuild.texi (vect_float): Say that the selector
9561 only describes the situation when -funsafe-math-optimizations is on.
9562 (vect_float_strict): Document.
9563
9564 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
9565
9566 PR tree-optimization/83965
9567 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9568 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
9569 instead of checking only for a reduction.
9570 (vect_recog_widen_sum_pattern): Likewise.
9571
9572 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
9573
9574 * predict.c (probably_never_executed): Only use precise profile info.
9575 (compute_function_frequency): Skip after inlining hack since we now
9576 have quality checking.
9577
9578 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
9579
9580 * profile-count.h (profile_probability::very_unlikely,
9581 profile_probability::unlikely, profile_probability::even): Set
9582 precision to guessed.
9583
9584 2018-01-23 Richard Biener <rguenther@suse.de>
9585
9586 PR tree-optimization/83963
9587 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
9588 Properly terminate dominator walk when crossing the exit edge not
9589 when visiting its source block.
9590
9591 2018-01-23 Jakub Jelinek <jakub@redhat.com>
9592
9593 PR c++/83918
9594 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
9595 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
9596
9597 2018-01-22 Jakub Jelinek <jakub@redhat.com>
9598
9599 PR tree-optimization/83957
9600 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
9601 semicolon after for body surrounded by braces.
9602
9603 PR tree-optimization/83081
9604 * profile-count.h (profile_probability::split): New method.
9605 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
9606 Use profile_probability::split.
9607 (do_compare_rtx_and_jump): Fix adjustment of probabilities
9608 when splitting a single conditional jump into 2.
9609
9610 2018-01-22 David Malcolm <dmalcolm@redhat.com>
9611
9612 PR tree-optimization/69452
9613 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
9614 decl.
9615
9616 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9617
9618 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
9619 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
9620 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
9621
9622 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9623
9624 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
9625 * config/rl78/rl78.md (movdi): New define_expand.
9626 * config/rl78/rl78.c (rl78_split_movdi): New function.
9627
9628 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
9629
9630 PR target/83862
9631 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
9632 no longer used.
9633 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
9634 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
9635 128-bit to produce an UNSPEC move to get the double word with the
9636 signbit and then a shift directly to do signbit.
9637 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
9638 implementation with a new version that just does either a direct
9639 move or a regular move. Move memory interface to separate insns.
9640 Move insns so they are next to the expander.
9641 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
9642 with signbit move. Split big and little endian case.
9643 (signbit<mode>2_dm_mem_le): Likewise.
9644 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
9645 (signbit<mode>2_dm2): Likewise.
9646
9647 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9648
9649 * config/rl78/rl78.md (anddi3): New define_expand.
9650
9651 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9652
9653 * config/rl78/rl78.md (umindi3): New define_expand.
9654
9655 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9656
9657 * config/rl78/rl78.md (smindi3): New define_expand.
9658
9659 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9660
9661 * config/rl78/rl78.md (smaxdi3): New define_expand.
9662
9663 2018-01-22 Carl Love <cel@us.ibm.com>
9664
9665 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
9666 LVX_V1TI): Add macro expansion.
9667 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
9668 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
9669 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
9670 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
9671 Change check to determine if the instruction is a byte reversing
9672 entry. Fix typo in comment.
9673 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
9674 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
9675 Add def_builtin calls for new builtins.
9676 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
9677 Add define_insn expansion.
9678
9679 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9680
9681 * config/rl78/rl78.md (umaxdi3): New define_expand.
9682
9683 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
9684
9685 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
9686 for non-QImode registers.
9687
9688 2018-01-22 Richard Biener <rguenther@suse.de>
9689
9690 PR tree-optimization/83963
9691 * graphite-scop-detection.c (scop_detection::get_sese): Delay
9692 including the loop exit block.
9693 (scop_detection::merge_sese): Likewise.
9694 (scop_detection::add_scop): Do it here instead.
9695
9696 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9697
9698 * doc/sourcebuild.texi (arm_softfloat): Document.
9699
9700 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
9701
9702 PR gcc/77734
9703 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
9704 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
9705 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
9706
9707 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9708 David Edelsohn <dje.gcc@gmail.com>
9709
9710 PR target/83946
9711 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9712 Change "crset eq" to "crset 2".
9713 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9714 (*call_indirect_aix<mode>_nospec): Likewise.
9715 (*call_value_indirect_aix<mode>_nospec): Likewise.
9716 (*call_indirect_elfv2<mode>_nospec): Likewise.
9717 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
9718 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
9719 change assembly output from . to $.
9720 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9721 (indirect_jump<mode>_nospec): Change assembly output from . to $.
9722 (*tablejump<mode>_internal1_nospec): Likewise.
9723
9724 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
9725
9726 PR target/80870
9727 * config/sh/sh_optimize_sett_clrt.cc:
9728 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
9729
9730 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
9731
9732 PR tree-optimization/83940
9733 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
9734 offset_dt to vect_constant_def rather than vect_unknown_def_type.
9735 (vect_check_load_store_mask): Add a mask_dt_out parameter and
9736 use it to pass back the definition type.
9737 (vect_check_store_rhs): Likewise rhs_dt_out.
9738 (vect_build_gather_load_calls): Add a mask_dt argument and use
9739 it instead of a call to vect_is_simple_use.
9740 (vectorizable_store): Update calls to vect_check_load_store_mask
9741 and vect_check_store_rhs. Use the dt returned by the latter instead
9742 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
9743 instead of calls to vect_is_simple_use. Pass the scalar rather
9744 than the vector operand to vect_is_simple_use when handling
9745 second and subsequent copies of an rhs value.
9746 (vectorizable_load): Update calls to vect_check_load_store_mask
9747 and vect_build_gather_load_calls. Use the cached mask_dt and
9748 gs_info.offset_dt instead of calls to vect_is_simple_use.
9749
9750 2018-01-20 Jakub Jelinek <jakub@redhat.com>
9751
9752 PR middle-end/83945
9753 * tree-emutls.c: Include gimplify.h.
9754 (lower_emutls_2): New function.
9755 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
9756 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
9757 it before further processing.
9758
9759 PR target/83930
9760 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
9761 UINTVAL (trueop1) instead of INTVAL (op1).
9762
9763 2018-01-19 Jakub Jelinek <jakub@redhat.com>
9764
9765 PR debug/81570
9766 PR debug/83728
9767 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
9768 INCOMING_FRAME_SP_OFFSET if not defined.
9769 (scan_trace): Add ENTRY argument. If true and
9770 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
9771 emit a note to adjust the CFA offset.
9772 (create_cfi_notes): Adjust scan_trace callers.
9773 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
9774 INCOMING_FRAME_SP_OFFSET in the CIE.
9775 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
9776 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
9777 Likewise.
9778 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
9779 * doc/tm.texi: Regenerated.
9780
9781 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9782
9783 PR rtl-optimization/83147
9784 * lra-constraints.c (remove_inheritance_pseudos): Use
9785 lra_substitute_pseudo_within_insn.
9786
9787 2018-01-19 Tom de Vries <tom@codesourcery.com>
9788 Cesar Philippidis <cesar@codesourcery.com>
9789
9790 PR target/83920
9791 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
9792
9793 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
9794
9795 PR target/83790
9796 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
9797 spaces for function labels.
9798
9799 2018-01-19 Martin Liska <mliska@suse.cz>
9800
9801 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
9802 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
9803 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
9804 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
9805 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
9806 (PRED_CONST_RETURN): Change from 69 to 65.
9807 (PRED_NULL_RETURN): Change from 91 to 71.
9808 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
9809 (PRED_LOOP_GUARD): Change from 66 to 73.
9810
9811 2018-01-19 Martin Liska <mliska@suse.cz>
9812
9813 * predict.c (predict_insn_def): Add new assert.
9814 (struct branch_predictor): Change type to signed integer.
9815 (test_prediction_value_range): Amend test to cover
9816 PROB_UNINITIALIZED.
9817 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
9818 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
9819 (PRED_LOOP_ITERATIONS_MAX): Likewise.
9820 (PRED_LOOP_IV_COMPARE): Likewise.
9821 * predict.h (PROB_UNINITIALIZED): Define new constant.
9822
9823 2018-01-19 Martin Liska <mliska@suse.cz>
9824
9825 * predict.c (dump_prediction): Add new format for
9826 analyze_brprob.py script which is enabled with -details
9827 suboption.
9828 * profile-count.h (precise_p): New function.
9829
9830 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
9831
9832 PR tree-optimization/83922
9833 * tree-vect-loop.c (vect_verify_full_masking): Return false if
9834 there are no statements that need masking.
9835 (vect_active_double_reduction_p): New function.
9836 (vect_analyze_loop_operations): Use it when handling phis that
9837 are not in the loop header.
9838
9839 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
9840
9841 PR tree-optimization/83914
9842 * tree-vect-loop.c (vectorizable_induction): Don't convert
9843 init_expr or apply the peeling adjustment for inductions
9844 that are nested within the vectorized loop.
9845
9846 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9847
9848 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
9849 instead of NEG.
9850
9851 2018-01-18 Jakub Jelinek <jakub@redhat.com>
9852
9853 PR sanitizer/81715
9854 PR testsuite/83882
9855 * function.h (gimplify_parameters): Add gimple_seq * argument.
9856 * function.c: Include gimple.h and options.h.
9857 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
9858 for the added local temporaries if needed.
9859 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
9860 if there are any parameter cleanups, wrap whole body into a
9861 try/finally with the cleanups.
9862
9863 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
9864
9865 PR target/82964
9866 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
9867 Use GET_MODE_CLASS for scalar floating point.
9868
9869 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
9870
9871 PR ipa/82256
9872 patch by PaX Team
9873 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
9874 Fix call of call_cgraph_insertion_hooks.
9875
9876 2018-01-18 Martin Sebor <msebor@redhat.com>
9877
9878 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
9879
9880 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
9881
9882 PR ipa/83619
9883 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
9884 frequencies.
9885
9886 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
9887
9888 PR other/70268
9889 * common.opt: (-ffile-prefix-map): New option.
9890 * opts.c (common_handle_option): Defer it.
9891 * opts-global.c (handle_common_deferred_options): Handle it.
9892 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
9893 * file-prefix-map.h: New file.
9894 (remap_debug_filename, add_debug_prefix_map): ...here.
9895 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
9896 * final.c (debug_prefix_map, add_debug_prefix_map
9897 remap_debug_filename): Move to...
9898 * file-prefix-map.c: New file.
9899 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
9900 generalize, get rid of alloca(), use strrchr() instead of strchr().
9901 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
9902 Implement in terms of add_prefix_map().
9903 (remap_macro_filename, remap_debug_filename): Implement in term of
9904 remap_filename().
9905 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
9906 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
9907 * dbxout.c: Include file-prefix-map.h.
9908 * varasm.c: Likewise.
9909 * vmsdbgout.c: Likewise.
9910 * xcoffout.c: Likewise.
9911 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
9912 * doc/cppopts.texi (-fmacro-prefix-map): Document.
9913 * doc/invoke.texi (-ffile-prefix-map): Document.
9914 (-fdebug-prefix-map): Update description.
9915
9916 2018-01-18 Martin Liska <mliska@suse.cz>
9917
9918 * config/i386/i386.c (indirect_thunk_name): Document that also
9919 lfence is emitted.
9920 (output_indirect_thunk): Document why both instructions
9921 (pause and lfence) are generated.
9922
9923 2018-01-18 Richard Biener <rguenther@suse.de>
9924
9925 PR tree-optimization/83887
9926 * graphite-scop-detection.c
9927 (scop_detection::get_nearest_dom_with_single_entry): Remove.
9928 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
9929 (scop_detection::merge_sese): Re-implement with a flood-fill
9930 algorithm that properly finds a SESE region if it exists.
9931
9932 2018-01-18 Jakub Jelinek <jakub@redhat.com>
9933
9934 PR c/61240
9935 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
9936 pointer_diff optimizations use view_convert instead of convert.
9937
9938 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9939
9940 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
9941 Generate different code for -mno-speculate-indirect-jumps.
9942 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
9943 (*call_indirect_aix<mode>): Disable for
9944 -mno-speculate-indirect-jumps.
9945 (*call_indirect_aix<mode>_nospec): New define_insn.
9946 (*call_value_indirect_aix<mode>): Disable for
9947 -mno-speculate-indirect-jumps.
9948 (*call_value_indirect_aix<mode>_nospec): New define_insn.
9949 (*sibcall_nonlocal_sysv<mode>): Generate different code for
9950 -mno-speculate-indirect-jumps.
9951 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
9952
9953 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
9954
9955 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
9956 long double type, set the flags for noting the default long double
9957 type, even if we don't pass or return a long double type.
9958
9959 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
9960
9961 PR ipa/83051
9962 * ipa-inline.c (flatten_function): Do not overwrite final inlining
9963 failure.
9964
9965 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
9966
9967 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
9968 support for merge[hl].
9969 (fold_mergehl_helper): New helper function.
9970 (tree-vector-builder.h): New #include for tree_vector_builder usage.
9971 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
9972 (altivec_vmrglw_direct): Add xxmrglw insn.
9973
9974 2018-01-17 Andrew Waterman <andrew@sifive.com>
9975
9976 * config/riscv/riscv.c (riscv_conditional_register_usage): If
9977 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
9978
9979 2018-01-17 David Malcolm <dmalcolm@redhat.com>
9980
9981 PR lto/83121
9982 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
9983 call the lto_location_cache before reading the
9984 DECL_SOURCE_LOCATION of the types.
9985
9986 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
9987 Richard Sandiford <richard.sandiford@linaro.org>
9988
9989 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
9990 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
9991 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
9992 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
9993 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
9994 Add declaration.
9995 * config/aarch64/constraints.md (aarch64_movti_operand):
9996 Limit immediates.
9997 * config/aarch64/predicates.md (Uti): Add new constraint.
9998
9999 2018-01-17 Carl Love <cel@us.ibm.com>
10000
10001 * config/rs6000/vsx.md (define_expand xl_len_r,
10002 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
10003 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
10004 lxvll.
10005 (define_expand, define_insn): Move the shift left from the
10006 define_insn to the define_expand for lxvl and stxvl instructions.
10007 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
10008 and XL_LEN_R definitions to PURE.
10009
10010 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
10011
10012 * config/i386/i386.c (indirect_thunk_name): Declare regno
10013 as unsigned int. Compare regno with INVALID_REGNUM.
10014 (output_indirect_thunk): Ditto.
10015 (output_indirect_thunk_function): Ditto.
10016 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
10017 in the call to output_indirect_thunk_function.
10018
10019 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
10020
10021 PR middle-end/83884
10022 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
10023 rather than the size of inner_type to determine the stack slot size
10024 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
10025
10026 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
10027
10028 PR target/83546
10029 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
10030 to PTA_SILVERMONT.
10031
10032 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
10033
10034 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
10035 endian Linux systems to optionally enable multilibs for selecting
10036 the long double type if the user configured an explicit type.
10037 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
10038 have no long double multilibs if not defined.
10039 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
10040 warn if the user used -mabi={ieee,ibm}longdouble and we built
10041 multilibs for long double.
10042 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
10043 appropriate multilib option.
10044 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
10045 multilib options.
10046 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
10047 for building long double multilibs.
10048 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
10049
10050 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
10051
10052 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
10053 copies.
10054
10055 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
10056 64 bits.
10057 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
10058 128 bits.
10059
10060 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
10061 variables.
10062
10063 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
10064 return value.
10065
10066 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
10067
10068 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
10069 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
10070
10071 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10072
10073 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
10074 different rtl trees depending on TARGET_64BIT.
10075 (rs6000_gen_lvx): Likewise.
10076
10077 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
10078
10079 * config/visium/visium.md (nop): Tweak comment.
10080 (hazard_nop): Likewise.
10081
10082 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10083
10084 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
10085 -mspeculate-indirect-jumps.
10086 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
10087 for -mno-speculate-indirect-jumps.
10088 (*call_indirect_elfv2<mode>_nospec): New define_insn.
10089 (*call_value_indirect_elfv2<mode>): Disable for
10090 -mno-speculate-indirect-jumps.
10091 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
10092 (indirect_jump): Emit different RTL for
10093 -mno-speculate-indirect-jumps.
10094 (*indirect_jump<mode>): Disable for
10095 -mno-speculate-indirect-jumps.
10096 (*indirect_jump<mode>_nospec): New define_insn.
10097 (tablejump): Emit different RTL for
10098 -mno-speculate-indirect-jumps.
10099 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
10100 (tablejumpsi_nospec): New define_expand.
10101 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
10102 (tablejumpdi_nospec): New define_expand.
10103 (*tablejump<mode>_internal1): Disable for
10104 -mno-speculate-indirect-jumps.
10105 (*tablejump<mode>_internal1_nospec): New define_insn.
10106 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
10107 option.
10108
10109 2018-01-16 Artyom Skrobov tyomitch@gmail.com
10110
10111 * caller-save.c (insert_save): Drop unnecessary parameter. All
10112 callers updated.
10113
10114 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10115 Richard Biener <rguenth@suse.de>
10116
10117 PR libgomp/83590
10118 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
10119 return early, inline manually is_gimple_sizepos. Make sure if we
10120 call gimplify_expr we don't end up with a gimple constant.
10121 * tree.c (variably_modified_type_p): Don't return true for
10122 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
10123 * gimplify.h (is_gimple_sizepos): Remove.
10124
10125 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10126
10127 PR tree-optimization/83857
10128 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
10129 vectorizable_live_operation for pure SLP statements.
10130 (vectorizable_live_operation): Handle PHIs.
10131
10132 2018-01-16 Richard Biener <rguenther@suse.de>
10133
10134 PR tree-optimization/83867
10135 * tree-vect-stmts.c (vect_transform_stmt): Precompute
10136 nested_in_vect_loop_p since the scalar stmt may get invalidated.
10137
10138 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10139
10140 PR c/83844
10141 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
10142 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
10143 If off is not INTEGER_CST, issue a may not be aligned warning
10144 rather than isn't aligned. Use isn%'t rather than isn't.
10145 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
10146 into MULT_EXPR.
10147 <case MULT_EXPR>: Improve the case when bottom and one of the
10148 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
10149 operand, in that case check if the other operand is multiple of
10150 bottom divided by the INTEGER_CST operand.
10151
10152 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10153
10154 PR target/83858
10155 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
10156 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
10157 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
10158 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
10159 * config/pa/pa.c (pa_function_arg_advance): Likewise.
10160 (pa_function_arg, pa_arg_partial_bytes): Likewise.
10161 (pa_function_arg_size): New function.
10162
10163 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10164
10165 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
10166 in a separate statement.
10167
10168 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
10169
10170 PR tree-optimization/83847
10171 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
10172 group gathers and scatters.
10173
10174 2018-01-16 Jakub Jelinek <jakub@redhat.com>
10175
10176 PR rtl-optimization/86620
10177 * params.def (max-sched-ready-insns): Bump minimum value to 1.
10178
10179 PR rtl-optimization/83213
10180 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
10181 to last if both are JUMP_INSNs.
10182
10183 PR tree-optimization/83843
10184 * gimple-ssa-store-merging.c
10185 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
10186 store_immediate_info for bswap/nop orig_stores.
10187
10188 2018-01-15 Andrew Waterman <andrew@sifive.com>
10189
10190 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
10191 !TARGET_MUL.
10192 <UDIV>: Increase cost if !TARGET_DIV.
10193
10194 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
10195
10196 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
10197 (define_attr "cr_logical_3op"): New.
10198 (cceq_ior_compare): Adjust.
10199 (cceq_ior_compare_complement): Adjust.
10200 (*cceq_rev_compare): Adjust.
10201 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
10202 (is_cracked_insn): Adjust.
10203 (insn_must_be_first_in_group): Adjust.
10204 * config/rs6000/40x.md: Adjust.
10205 * config/rs6000/440.md: Adjust.
10206 * config/rs6000/476.md: Adjust.
10207 * config/rs6000/601.md: Adjust.
10208 * config/rs6000/603.md: Adjust.
10209 * config/rs6000/6xx.md: Adjust.
10210 * config/rs6000/7450.md: Adjust.
10211 * config/rs6000/7xx.md: Adjust.
10212 * config/rs6000/8540.md: Adjust.
10213 * config/rs6000/cell.md: Adjust.
10214 * config/rs6000/e300c2c3.md: Adjust.
10215 * config/rs6000/e500mc.md: Adjust.
10216 * config/rs6000/e500mc64.md: Adjust.
10217 * config/rs6000/e5500.md: Adjust.
10218 * config/rs6000/e6500.md: Adjust.
10219 * config/rs6000/mpc.md: Adjust.
10220 * config/rs6000/power4.md: Adjust.
10221 * config/rs6000/power5.md: Adjust.
10222 * config/rs6000/power6.md: Adjust.
10223 * config/rs6000/power7.md: Adjust.
10224 * config/rs6000/power8.md: Adjust.
10225 * config/rs6000/power9.md: Adjust.
10226 * config/rs6000/rs64.md: Adjust.
10227 * config/rs6000/titan.md: Adjust.
10228
10229 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10230
10231 * config/i386/predicates.md (indirect_branch_operand): Rewrite
10232 ix86_indirect_branch_register logic.
10233
10234 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10235
10236 * config/i386/constraints.md (Bs): Update
10237 ix86_indirect_branch_register check. Don't check
10238 ix86_indirect_branch_register with GOT_memory_operand.
10239 (Bw): Likewise.
10240 * config/i386/predicates.md (GOT_memory_operand): Don't check
10241 ix86_indirect_branch_register here.
10242 (GOT32_symbol_operand): Likewise.
10243
10244 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10245
10246 * config/i386/predicates.md (constant_call_address_operand):
10247 Rewrite ix86_indirect_branch_register logic.
10248 (sibcall_insn_operand): Likewise.
10249
10250 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10251
10252 * config/i386/constraints.md (Bs): Replace
10253 ix86_indirect_branch_thunk_register with
10254 ix86_indirect_branch_register.
10255 (Bw): Likewise.
10256 * config/i386/i386.md (indirect_jump): Likewise.
10257 (tablejump): Likewise.
10258 (*sibcall_memory): Likewise.
10259 (*sibcall_value_memory): Likewise.
10260 Peepholes of indirect call and jump via memory: Likewise.
10261 * config/i386/i386.opt: Likewise.
10262 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10263 (GOT_memory_operand): Likewise.
10264 (call_insn_operand): Likewise.
10265 (sibcall_insn_operand): Likewise.
10266 (GOT32_symbol_operand): Likewise.
10267
10268 2018-01-15 Jakub Jelinek <jakub@redhat.com>
10269
10270 PR middle-end/83837
10271 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
10272 type rather than type addr's type points to.
10273 (expand_omp_atomic_mutex): Likewise.
10274 (expand_omp_atomic): Likewise.
10275
10276 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
10277
10278 PR target/83839
10279 * config/i386/i386.c (output_indirect_thunk_function): Use
10280 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
10281 for __x86_return_thunk.
10282
10283 2018-01-15 Richard Biener <rguenther@suse.de>
10284
10285 PR middle-end/83850
10286 * expmed.c (extract_bit_field_1): Fix typo.
10287
10288 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10289
10290 PR target/83687
10291 * config/arm/iterators.md (VF): New mode iterator.
10292 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
10293 Remove integer-related logic from pattern.
10294 (neon_vabd<mode>_3): Likewise.
10295
10296 2018-01-15 Jakub Jelinek <jakub@redhat.com>
10297
10298 PR middle-end/82694
10299 * common.opt (fstrict-overflow): No longer an alias.
10300 (fwrapv-pointer): New option.
10301 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
10302 also for pointer types based on flag_wrapv_pointer.
10303 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
10304 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
10305 opts->x_flag_wrapv got set.
10306 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
10307 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
10308 POINTER_TYPE_OVERFLOW_UNDEFINED.
10309 * match.pd: Likewise in address comparison pattern.
10310 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
10311
10312 2018-01-15 Richard Biener <rguenther@suse.de>
10313
10314 PR lto/83804
10315 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
10316 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
10317 Reset type names to their identifier if their TYPE_DECL doesn't
10318 have linkage (and thus is used for ODR and devirt).
10319 (save_debug_info_for_decl): Remove.
10320 (save_debug_info_for_type): Likewise.
10321 (add_tree_to_fld_list): Adjust.
10322 * tree-pretty-print.c (dump_generic_node): Make dumping of
10323 type names more robust.
10324
10325 2018-01-15 Richard Biener <rguenther@suse.de>
10326
10327 * BASE-VER: Bump to 8.0.1.
10328
10329 2018-01-14 Martin Sebor <msebor@redhat.com>
10330
10331 PR other/83508
10332 * builtins.c (check_access): Avoid warning when the no-warning bit
10333 is set.
10334
10335 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
10336
10337 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
10338 * ira-color (allocno_hard_regs_compare): Likewise.
10339
10340 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
10341
10342 PR target/83013
10343 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
10344 Use .pushsection/.popsection.
10345
10346 2018-01-14 Martin Sebor <msebor@redhat.com>
10347
10348 PR c++/81327
10349 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
10350
10351 2018-01-14 Jakub Jelinek <jakub@redhat.com>
10352
10353 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
10354 entry from extra_headers.
10355 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
10356 extra_headers, make the list bitwise identical to the i?86-*-* one.
10357
10358 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10359
10360 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
10361 -mcmodel=large with -mindirect-branch=thunk,
10362 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
10363 -mfunction-return=thunk-extern.
10364 * doc/invoke.texi: Document -mcmodel=large is incompatible with
10365 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
10366 -mfunction-return=thunk and -mfunction-return=thunk-extern.
10367
10368 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10369
10370 * config/i386/i386.c (print_reg): Print the name of the full
10371 integer register without '%'.
10372 (ix86_print_operand): Handle 'V'.
10373 * doc/extend.texi: Document 'V' modifier.
10374
10375 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10376
10377 * config/i386/constraints.md (Bs): Disallow memory operand for
10378 -mindirect-branch-register.
10379 (Bw): Likewise.
10380 * config/i386/predicates.md (indirect_branch_operand): Likewise.
10381 (GOT_memory_operand): Likewise.
10382 (call_insn_operand): Likewise.
10383 (sibcall_insn_operand): Likewise.
10384 (GOT32_symbol_operand): Likewise.
10385 * config/i386/i386.md (indirect_jump): Call convert_memory_address
10386 for -mindirect-branch-register.
10387 (tablejump): Likewise.
10388 (*sibcall_memory): Likewise.
10389 (*sibcall_value_memory): Likewise.
10390 Disallow peepholes of indirect call and jump via memory for
10391 -mindirect-branch-register.
10392 (*call_pop): Replace m with Bw.
10393 (*call_value_pop): Likewise.
10394 (*sibcall_pop_memory): Replace m with Bs.
10395 * config/i386/i386.opt (mindirect-branch-register): New option.
10396 * doc/invoke.texi: Document -mindirect-branch-register option.
10397
10398 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10399
10400 * config/i386/i386-protos.h (ix86_output_function_return): New.
10401 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
10402 set function_return_type.
10403 (indirect_thunk_name): Add ret_p to indicate thunk for function
10404 return.
10405 (output_indirect_thunk_function): Pass false to
10406 indirect_thunk_name.
10407 (ix86_output_indirect_branch_via_reg): Likewise.
10408 (ix86_output_indirect_branch_via_push): Likewise.
10409 (output_indirect_thunk_function): Create alias for function
10410 return thunk if regno < 0.
10411 (ix86_output_function_return): New function.
10412 (ix86_handle_fndecl_attribute): Handle function_return.
10413 (ix86_attribute_table): Add function_return.
10414 * config/i386/i386.h (machine_function): Add
10415 function_return_type.
10416 * config/i386/i386.md (simple_return_internal): Use
10417 ix86_output_function_return.
10418 (simple_return_internal_long): Likewise.
10419 * config/i386/i386.opt (mfunction-return=): New option.
10420 (indirect_branch): Mention -mfunction-return=.
10421 * doc/extend.texi: Document function_return function attribute.
10422 * doc/invoke.texi: Document -mfunction-return= option.
10423
10424 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
10425
10426 * config/i386/i386-opts.h (indirect_branch): New.
10427 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
10428 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
10429 with local indirect jump when converting indirect call and jump.
10430 (ix86_set_indirect_branch_type): New.
10431 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
10432 (indirectlabelno): New.
10433 (indirect_thunk_needed): Likewise.
10434 (indirect_thunk_bnd_needed): Likewise.
10435 (indirect_thunks_used): Likewise.
10436 (indirect_thunks_bnd_used): Likewise.
10437 (INDIRECT_LABEL): Likewise.
10438 (indirect_thunk_name): Likewise.
10439 (output_indirect_thunk): Likewise.
10440 (output_indirect_thunk_function): Likewise.
10441 (ix86_output_indirect_branch_via_reg): Likewise.
10442 (ix86_output_indirect_branch_via_push): Likewise.
10443 (ix86_output_indirect_branch): Likewise.
10444 (ix86_output_indirect_jmp): Likewise.
10445 (ix86_code_end): Call output_indirect_thunk_function if needed.
10446 (ix86_output_call_insn): Call ix86_output_indirect_branch if
10447 needed.
10448 (ix86_handle_fndecl_attribute): Handle indirect_branch.
10449 (ix86_attribute_table): Add indirect_branch.
10450 * config/i386/i386.h (machine_function): Add indirect_branch_type
10451 and has_local_indirect_jump.
10452 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
10453 to true.
10454 (tablejump): Likewise.
10455 (*indirect_jump): Use ix86_output_indirect_jmp.
10456 (*tablejump_1): Likewise.
10457 (simple_return_indirect_internal): Likewise.
10458 * config/i386/i386.opt (mindirect-branch=): New option.
10459 (indirect_branch): New.
10460 (keep): Likewise.
10461 (thunk): Likewise.
10462 (thunk-inline): Likewise.
10463 (thunk-extern): Likewise.
10464 * doc/extend.texi: Document indirect_branch function attribute.
10465 * doc/invoke.texi: Document -mindirect-branch= option.
10466
10467 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
10468
10469 PR ipa/83051
10470 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
10471
10472 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
10473
10474 * ipa-inline.c (want_inline_small_function_p): Return false if
10475 inlining has already failed with CIF_FINAL_ERROR.
10476 (update_caller_keys): Call want_inline_small_function_p before
10477 can_inline_edge_p.
10478 (update_callee_keys): Likewise.
10479
10480 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
10481
10482 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
10483 New function.
10484 (rs6000_quadword_masked_address_p): Likewise.
10485 (quad_aligned_load_p): Likewise.
10486 (quad_aligned_store_p): Likewise.
10487 (const_load_sequence_p): Add comment to describe the outer-most loop.
10488 (mimic_memory_attributes_and_flags): New function.
10489 (rs6000_gen_stvx): Likewise.
10490 (replace_swapped_aligned_store): Likewise.
10491 (rs6000_gen_lvx): Likewise.
10492 (replace_swapped_aligned_load): Likewise.
10493 (replace_swapped_load_constant): Capitalize argument name in
10494 comment describing this function.
10495 (rs6000_analyze_swaps): Add a third pass to search for vector loads
10496 and stores that access quad-word aligned addresses and replace
10497 with stvx or lvx instructions when appropriate.
10498 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
10499 New function prototype.
10500 (rs6000_quadword_masked_address_p): Likewise.
10501 (rs6000_gen_lvx): Likewise.
10502 (rs6000_gen_stvx): Likewise.
10503 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
10504 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
10505 when memory address is aligned.
10506 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
10507 this split to select lvx instruction when memory address is aligned.
10508 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
10509 instruction when memory address is aligned.
10510 (*vsx_le_perm_load_v16qi): Likewise.
10511 (four unnamed splitters): Modify to select the stvx instruction
10512 when memory is aligned.
10513
10514 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
10515
10516 * predict.c (determine_unlikely_bbs): Handle correctly BBs
10517 which appears in the queue multiple times.
10518
10519 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10520 Alan Hayward <alan.hayward@arm.com>
10521 David Sherwood <david.sherwood@arm.com>
10522
10523 * tree-vectorizer.h (vec_lower_bound): New structure.
10524 (_loop_vec_info): Add check_nonzero and lower_bounds.
10525 (LOOP_VINFO_CHECK_NONZERO): New macro.
10526 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
10527 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
10528 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
10529 fields. Make seg_len the distance travelled, not including the
10530 access size.
10531 (dr_direction_indicator): Declare.
10532 (dr_zero_step_indicator): Likewise.
10533 (dr_known_forward_stride_p): Likewise.
10534 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
10535 tree-ssanames.h.
10536 (runtime_alias_check_p): Allow runtime alias checks with
10537 variable strides.
10538 (operator ==): Compare access_size and align.
10539 (prune_runtime_alias_test_list): Rework for new distinction between
10540 the access_size and seg_len.
10541 (create_intersect_range_checks_index): Likewise. Cope with polynomial
10542 segment lengths.
10543 (get_segment_min_max): New function.
10544 (create_intersect_range_checks): Use it.
10545 (dr_step_indicator): New function.
10546 (dr_direction_indicator): Likewise.
10547 (dr_zero_step_indicator): Likewise.
10548 (dr_known_forward_stride_p): Likewise.
10549 * tree-loop-distribution.c (data_ref_segment_size): Return
10550 DR_STEP * (niters - 1).
10551 (compute_alias_check_pairs): Update call to the dr_with_seg_len
10552 constructor.
10553 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
10554 (vect_preserves_scalar_order_p): New function, split out from...
10555 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
10556 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
10557 (vect_vfa_access_size): New function.
10558 (vect_vfa_align): Likewise.
10559 (vect_compile_time_alias): Take access_size_a and access_b arguments.
10560 (dump_lower_bound): New function.
10561 (vect_check_lower_bound): Likewise.
10562 (vect_small_gap_p): Likewise.
10563 (vectorizable_with_step_bound_p): Likewise.
10564 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
10565 depencies if the vectorization factor is 1. Convert the checks
10566 for nonzero steps into checks on the bounds of DR_STEP. Try using
10567 a bunds check for variable steps if the minimum required step is
10568 relatively small. Update calls to the dr_with_seg_len
10569 constructor and to vect_compile_time_alias.
10570 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
10571 function.
10572 (vect_loop_versioning): Call it.
10573 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
10574 when retrying.
10575 (vect_estimate_min_profitable_iters): Account for any bounds checks.
10576
10577 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10578 Alan Hayward <alan.hayward@arm.com>
10579 David Sherwood <david.sherwood@arm.com>
10580
10581 * doc/sourcebuild.texi (vect_scatter_store): Document.
10582 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
10583 optabs.
10584 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
10585 Document.
10586 * genopinit.c (main): Add supports_vec_scatter_store and
10587 supports_vec_scatter_store_cached to target_optabs.
10588 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
10589 IFN_MASK_SCATTER_STORE.
10590 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
10591 functions.
10592 * internal-fn.h (internal_store_fn_p): Declare.
10593 (internal_fn_stored_value_index): Likewise.
10594 * internal-fn.c (scatter_store_direct): New macro.
10595 (expand_scatter_store_optab_fn): New function.
10596 (direct_scatter_store_optab_supported_p): New macro.
10597 (internal_store_fn_p): New function.
10598 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
10599 IFN_MASK_SCATTER_STORE.
10600 (internal_fn_mask_index): Likewise.
10601 (internal_fn_stored_value_index): New function.
10602 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
10603 for scatter stores.
10604 * optabs-query.h (supports_vec_scatter_store_p): Declare.
10605 * optabs-query.c (supports_vec_scatter_store_p): New function.
10606 * tree-vectorizer.h (vect_get_store_rhs): Declare.
10607 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
10608 true for scatter stores.
10609 (vect_gather_scatter_fn_p): Handle scatter stores too.
10610 (vect_check_gather_scatter): Consider using scatter stores if
10611 supports_vec_scatter_store_p.
10612 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
10613 scatter stores too.
10614 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10615 internal_fn_stored_value_index.
10616 (check_load_store_masking): Handle scatter stores too.
10617 (vect_get_store_rhs): Make public.
10618 (vectorizable_call): Use internal_store_fn_p.
10619 (vectorizable_store): Handle scatter store internal functions.
10620 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
10621 when deciding whether the end of the group has been reached.
10622 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
10623 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
10624 (mask_scatter_store<mode>): New insns.
10625
10626 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10627 Alan Hayward <alan.hayward@arm.com>
10628 David Sherwood <david.sherwood@arm.com>
10629
10630 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
10631 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
10632 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
10633 function.
10634 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
10635 Use vect_truncate_gather_scatter_offset if we can't treat the
10636 operation as a normal gather load or scatter store.
10637 (get_group_load_store_type): Take the gather_scatter_info
10638 as argument. Try using a gather load or scatter store for
10639 single-element groups.
10640 (get_load_store_type): Update calls to get_group_load_store_type
10641 and vect_use_strided_gather_scatters_p.
10642
10643 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10644 Alan Hayward <alan.hayward@arm.com>
10645 David Sherwood <david.sherwood@arm.com>
10646
10647 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
10648 optional tree argument.
10649 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
10650 null target hooks.
10651 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
10652 but continue to use the current value as a fallback.
10653 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
10654 to compare the updates.
10655 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
10656 (get_load_store_type): Use it when handling a strided access.
10657 (vect_get_strided_load_store_ops): New function.
10658 (vect_get_data_ptr_increment): Likewise.
10659 (vectorizable_load): Handle strided gather loads. Always pass
10660 a step to vect_create_data_ref_ptr and bump_vector_ptr.
10661
10662 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10663 Alan Hayward <alan.hayward@arm.com>
10664 David Sherwood <david.sherwood@arm.com>
10665
10666 * doc/md.texi (gather_load@var{m}): Document.
10667 (mask_gather_load@var{m}): Likewise.
10668 * genopinit.c (main): Add supports_vec_gather_load and
10669 supports_vec_gather_load_cached to target_optabs.
10670 * optabs-tree.c (init_tree_optimization_optabs): Use
10671 ggc_cleared_alloc to allocate target_optabs.
10672 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
10673 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
10674 functions.
10675 * internal-fn.h (internal_load_fn_p): Declare.
10676 (internal_gather_scatter_fn_p): Likewise.
10677 (internal_fn_mask_index): Likewise.
10678 (internal_gather_scatter_fn_supported_p): Likewise.
10679 * internal-fn.c (gather_load_direct): New macro.
10680 (expand_gather_load_optab_fn): New function.
10681 (direct_gather_load_optab_supported_p): New macro.
10682 (direct_internal_fn_optab): New function.
10683 (internal_load_fn_p): Likewise.
10684 (internal_gather_scatter_fn_p): Likewise.
10685 (internal_fn_mask_index): Likewise.
10686 (internal_gather_scatter_fn_supported_p): Likewise.
10687 * optabs-query.c (supports_at_least_one_mode_p): New function.
10688 (supports_vec_gather_load_p): Likewise.
10689 * optabs-query.h (supports_vec_gather_load_p): Declare.
10690 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
10691 and memory_type field.
10692 (NUM_PATTERNS): Bump to 15.
10693 * tree-vect-data-refs.c: Include internal-fn.h.
10694 (vect_gather_scatter_fn_p): New function.
10695 (vect_describe_gather_scatter_call): Likewise.
10696 (vect_check_gather_scatter): Try using internal functions for
10697 gather loads. Recognize existing calls to a gather load function.
10698 (vect_analyze_data_refs): Consider using gather loads if
10699 supports_vec_gather_load_p.
10700 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
10701 (vect_get_gather_scatter_offset_type): Likewise.
10702 (vect_convert_mask_for_vectype): Likewise.
10703 (vect_add_conversion_to_patterm): Likewise.
10704 (vect_try_gather_scatter_pattern): Likewise.
10705 (vect_recog_gather_scatter_pattern): New pattern recognizer.
10706 (vect_vect_recog_func_ptrs): Add it.
10707 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
10708 internal_fn_mask_index and internal_gather_scatter_fn_p.
10709 (check_load_store_masking): Take the gather_scatter_info as an
10710 argument and handle gather loads.
10711 (vect_get_gather_scatter_ops): New function.
10712 (vectorizable_call): Check internal_load_fn_p.
10713 (vectorizable_load): Likewise. Handle gather load internal
10714 functions.
10715 (vectorizable_store): Update call to check_load_store_masking.
10716 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
10717 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
10718 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
10719 (aarch64_gather_scale_operand_d): New predicates.
10720 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
10721 (mask_gather_load<mode>): New insns.
10722
10723 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10724 Alan Hayward <alan.hayward@arm.com>
10725 David Sherwood <david.sherwood@arm.com>
10726
10727 * optabs.def (fold_left_plus_optab): New optab.
10728 * doc/md.texi (fold_left_plus_@var{m}): Document.
10729 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
10730 * internal-fn.c (fold_left_direct): Define.
10731 (expand_fold_left_optab_fn): Likewise.
10732 (direct_fold_left_optab_supported_p): Likewise.
10733 * fold-const-call.c (fold_const_fold_left): New function.
10734 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
10735 * tree-parloops.c (valid_reduction_p): New function.
10736 (gather_scalar_reductions): Use it.
10737 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
10738 (vect_finish_replace_stmt): Declare.
10739 * tree-vect-loop.c (fold_left_reduction_fn): New function.
10740 (needs_fold_left_reduction_p): New function, split out from...
10741 (vect_is_simple_reduction): ...here. Accept reductions that
10742 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
10743 (vect_force_simple_reduction): Also store the reduction type in
10744 the assignment's STMT_VINFO_REDUC_TYPE.
10745 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
10746 (merge_with_identity): New function.
10747 (vect_expand_fold_left): Likewise.
10748 (vectorize_fold_left_reduction): Likewise.
10749 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
10750 scalar phi in place for it. Check for target support and reject
10751 cases that would reassociate the operation. Defer the transform
10752 phase to vectorize_fold_left_reduction.
10753 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
10754 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
10755 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
10756
10757 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10758
10759 * tree-if-conv.c (predicate_mem_writes): Remove redundant
10760 call to ifc_temp_var.
10761
10762 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10763 Alan Hayward <alan.hayward@arm.com>
10764 David Sherwood <david.sherwood@arm.com>
10765
10766 * target.def (legitimize_address_displacement): Take the original
10767 offset as a poly_int.
10768 * targhooks.h (default_legitimize_address_displacement): Update
10769 accordingly.
10770 * targhooks.c (default_legitimize_address_displacement): Likewise.
10771 * doc/tm.texi: Regenerate.
10772 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
10773 as an argument, moving assert of ad->disp == ad->disp_term to...
10774 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
10775 Try calling targetm.legitimize_address_displacement before expanding
10776 the address rather than afterwards, and adjust for the new interface.
10777 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10778 Match the new hook interface. Handle SVE addresses.
10779 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
10780 new hook interface.
10781
10782 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10783
10784 * Makefile.in (OBJS): Add early-remat.o.
10785 * target.def (select_early_remat_modes): New hook.
10786 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
10787 * doc/tm.texi: Regenerate.
10788 * targhooks.h (default_select_early_remat_modes): Declare.
10789 * targhooks.c (default_select_early_remat_modes): New function.
10790 * timevar.def (TV_EARLY_REMAT): New timevar.
10791 * passes.def (pass_early_remat): New pass.
10792 * tree-pass.h (make_pass_early_remat): Declare.
10793 * early-remat.c: New file.
10794 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
10795 function.
10796 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
10797
10798 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10799 Alan Hayward <alan.hayward@arm.com>
10800 David Sherwood <david.sherwood@arm.com>
10801
10802 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
10803 vfm1 with a bound_epilog parameter.
10804 (vect_do_peeling): Update calls accordingly, and move the prologue
10805 call earlier in the function. Treat the base bound_epilog as 0 for
10806 fully-masked loops and retain vf - 1 for other loops. Add 1 to
10807 this base when peeling for gaps.
10808 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
10809 with fully-masked loops.
10810 (vect_estimate_min_profitable_iters): Handle the single peeled
10811 iteration in that case.
10812
10813 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10814 Alan Hayward <alan.hayward@arm.com>
10815 David Sherwood <david.sherwood@arm.com>
10816
10817 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
10818 single-element interleaving even if the size is not a power of 2.
10819 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
10820 accesses for single-element interleaving if the group size is
10821 not a power of 2.
10822
10823 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10824 Alan Hayward <alan.hayward@arm.com>
10825 David Sherwood <david.sherwood@arm.com>
10826
10827 * doc/md.texi (fold_extract_last_@var{m}): Document.
10828 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
10829 * optabs.def (fold_extract_last_optab): New optab.
10830 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
10831 * internal-fn.c (fold_extract_direct): New macro.
10832 (expand_fold_extract_optab_fn): Likewise.
10833 (direct_fold_extract_optab_supported_p): Likewise.
10834 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
10835 * tree-vect-loop.c (vect_model_reduction_cost): Handle
10836 EXTRACT_LAST_REDUCTION.
10837 (get_initial_def_for_reduction): Do not create an initial vector
10838 for EXTRACT_LAST_REDUCTION reductions.
10839 (vectorizable_reduction): Leave the scalar phi in place for
10840 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
10841 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
10842 epilogue code for EXTRACT_LAST_REDUCTION and defer the
10843 transform phase to vectorizable_condition.
10844 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
10845 split out from...
10846 (vect_finish_stmt_generation): ...here.
10847 (vect_finish_replace_stmt): New function.
10848 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
10849 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
10850 pattern.
10851 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
10852
10853 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10854 Alan Hayward <alan.hayward@arm.com>
10855 David Sherwood <david.sherwood@arm.com>
10856
10857 * doc/md.texi (extract_last_@var{m}): Document.
10858 * optabs.def (extract_last_optab): New optab.
10859 * internal-fn.def (EXTRACT_LAST): New internal function.
10860 * internal-fn.c (cond_unary_direct): New macro.
10861 (expand_cond_unary_optab_fn): Likewise.
10862 (direct_cond_unary_optab_supported_p): Likewise.
10863 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
10864 loops using EXTRACT_LAST.
10865 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
10866 (extract_last_<mode>): ...this optab.
10867 (vec_extract<mode><Vel>): Update accordingly.
10868
10869 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10870 Alan Hayward <alan.hayward@arm.com>
10871 David Sherwood <david.sherwood@arm.com>
10872
10873 * target.def (empty_mask_is_expensive): New hook.
10874 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
10875 * doc/tm.texi: Regenerate.
10876 * targhooks.h (default_empty_mask_is_expensive): Declare.
10877 * targhooks.c (default_empty_mask_is_expensive): New function.
10878 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
10879 if the target says that empty masks are expensive.
10880 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
10881 New function.
10882 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
10883
10884 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10885 Alan Hayward <alan.hayward@arm.com>
10886 David Sherwood <david.sherwood@arm.com>
10887
10888 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
10889 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
10890 (vect_use_loop_mask_for_alignment_p): New function.
10891 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
10892 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
10893 niters_skip argument. Make sure that the first niters_skip elements
10894 of the first iteration are inactive.
10895 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
10896 Update call to vect_set_loop_masks_directly.
10897 (get_misalign_in_elems): New function, split out from...
10898 (vect_gen_prolog_loop_niters): ...here.
10899 (vect_update_init_of_dr): Take a code argument that specifies whether
10900 the adjustment should be added or subtracted.
10901 (vect_update_init_of_drs): Likewise.
10902 (vect_prepare_for_masked_peels): New function.
10903 (vect_do_peeling): Skip prologue peeling if we're using a mask
10904 instead. Update call to vect_update_inits_of_drs.
10905 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
10906 mask_skip_niters.
10907 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
10908 alignment. Do not include the number of peeled iterations in
10909 the minimum threshold in that case.
10910 (vectorizable_induction): Adjust the start value down by
10911 LOOP_VINFO_MASK_SKIP_NITERS iterations.
10912 (vect_transform_loop): Call vect_prepare_for_masked_peels.
10913 Take the number of skipped iterations into account when calculating
10914 the loop bounds.
10915 * tree-vect-stmts.c (vect_gen_while_not): New function.
10916
10917 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10918 Alan Hayward <alan.hayward@arm.com>
10919 David Sherwood <david.sherwood@arm.com>
10920
10921 * doc/sourcebuild.texi (vect_fully_masked): Document.
10922 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
10923 default value to 0.
10924 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
10925 split out from...
10926 (vect_analyze_loop_2): ...here. Don't check the vectorization
10927 factor against the number of loop iterations if the loop is
10928 fully-masked.
10929
10930 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10931 Alan Hayward <alan.hayward@arm.com>
10932 David Sherwood <david.sherwood@arm.com>
10933
10934 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
10935 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
10936 (dump_groups): Update accordingly.
10937 (iv_use::mem_type): New member variable.
10938 (address_p): New function.
10939 (record_use): Add a mem_type argument and initialize the new
10940 mem_type field.
10941 (record_group_use): Add a mem_type argument. Use address_p.
10942 Remove obsolete null checks of base_object. Update call to record_use.
10943 (find_interesting_uses_op): Update call to record_group_use.
10944 (find_interesting_uses_cond): Likewise.
10945 (find_interesting_uses_address): Likewise.
10946 (get_mem_type_for_internal_fn): New function.
10947 (find_address_like_use): Likewise.
10948 (find_interesting_uses_stmt): Try find_address_like_use before
10949 calling find_interesting_uses_op.
10950 (addr_offset_valid_p): Use the iv mem_type field as the type
10951 of the addressed memory.
10952 (add_autoinc_candidates): Likewise.
10953 (get_address_cost): Likewise.
10954 (split_small_address_groups_p): Use address_p.
10955 (split_address_groups): Likewise.
10956 (add_iv_candidate_for_use): Likewise.
10957 (autoinc_possible_for_pair): Likewise.
10958 (rewrite_groups): Likewise.
10959 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
10960 (determine_group_iv_cost): Update after split of USE_ADDRESS.
10961 (get_alias_ptr_type_for_ptr_address): New function.
10962 (rewrite_use_address): Rewrite address uses in calls that were
10963 identified by find_address_like_use.
10964
10965 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10966 Alan Hayward <alan.hayward@arm.com>
10967 David Sherwood <david.sherwood@arm.com>
10968
10969 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
10970 TARGET_MEM_REFs.
10971 * gimple-expr.h (is_gimple_addressable: Likewise.
10972 * gimple-expr.c (is_gimple_address): Likewise.
10973 * internal-fn.c (expand_call_mem_ref): New function.
10974 (expand_mask_load_optab_fn): Use it.
10975 (expand_mask_store_optab_fn): Likewise.
10976
10977 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10978 Alan Hayward <alan.hayward@arm.com>
10979 David Sherwood <david.sherwood@arm.com>
10980
10981 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
10982 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
10983 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
10984 (cond_umax@var{mode}): Document.
10985 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
10986 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
10987 (cond_umin_optab, cond_umax_optab): New optabs.
10988 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
10989 (COND_IOR, COND_XOR): New internal functions.
10990 * internal-fn.h (get_conditional_internal_fn): Declare.
10991 * internal-fn.c (cond_binary_direct): New macro.
10992 (expand_cond_binary_optab_fn): Likewise.
10993 (direct_cond_binary_optab_supported_p): Likewise.
10994 (get_conditional_internal_fn): New function.
10995 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
10996 Cope with reduction statements that are vectorized as calls rather
10997 than assignments.
10998 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
10999 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
11000 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
11001 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
11002 (UNSPEC_COND_EOR): New unspecs.
11003 (optab): Add mappings for them.
11004 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
11005 (sve_int_op, sve_fp_op): New int attributes.
11006
11007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11008 Alan Hayward <alan.hayward@arm.com>
11009 David Sherwood <david.sherwood@arm.com>
11010
11011 * optabs.def (while_ult_optab): New optab.
11012 * doc/md.texi (while_ult@var{m}@var{n}): Document.
11013 * internal-fn.def (WHILE_ULT): New internal function.
11014 * internal-fn.h (direct_internal_fn_supported_p): New override
11015 that takes two types as argument.
11016 * internal-fn.c (while_direct): New macro.
11017 (expand_while_optab_fn): New function.
11018 (convert_optab_supported_p): Likewise.
11019 (direct_while_optab_supported_p): New macro.
11020 * wide-int.h (wi::udiv_ceil): New function.
11021 * tree-vectorizer.h (rgroup_masks): New structure.
11022 (vec_loop_masks): New typedef.
11023 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
11024 and fully_masked_p.
11025 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
11026 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
11027 (vect_max_vf): New function.
11028 (slpeel_make_loop_iterate_ntimes): Delete.
11029 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
11030 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
11031 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
11032 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
11033 internal-fn.h, stor-layout.h and optabs-query.h.
11034 (vect_set_loop_mask): New function.
11035 (add_preheader_seq): Likewise.
11036 (add_header_seq): Likewise.
11037 (interleave_supported_p): Likewise.
11038 (vect_maybe_permute_loop_masks): Likewise.
11039 (vect_set_loop_masks_directly): Likewise.
11040 (vect_set_loop_condition_masked): Likewise.
11041 (vect_set_loop_condition_unmasked): New function, split out from
11042 slpeel_make_loop_iterate_ntimes.
11043 (slpeel_make_loop_iterate_ntimes): Rename to..
11044 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
11045 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
11046 (vect_do_peeling): Update call accordingly.
11047 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
11048 loops.
11049 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11050 mask_compare_type, can_fully_mask_p and fully_masked_p.
11051 (release_vec_loop_masks): New function.
11052 (_loop_vec_info): Use it to free the loop masks.
11053 (can_produce_all_loop_masks_p): New function.
11054 (vect_get_max_nscalars_per_iter): Likewise.
11055 (vect_verify_full_masking): Likewise.
11056 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
11057 retries, and free the mask rgroups before retrying. Check loop-wide
11058 reasons for disallowing fully-masked loops. Make the final decision
11059 about whether use a fully-masked loop or not.
11060 (vect_estimate_min_profitable_iters): Do not assume that peeling
11061 for the number of iterations will be needed for fully-masked loops.
11062 (vectorizable_reduction): Disable fully-masked loops.
11063 (vectorizable_live_operation): Likewise.
11064 (vect_halve_mask_nunits): New function.
11065 (vect_double_mask_nunits): Likewise.
11066 (vect_record_loop_mask): Likewise.
11067 (vect_get_loop_mask): Likewise.
11068 (vect_transform_loop): Handle the case in which the final loop
11069 iteration might handle a partial vector. Call vect_set_loop_condition
11070 instead of slpeel_make_loop_iterate_ntimes.
11071 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
11072 (check_load_store_masking): New function.
11073 (prepare_load_store_mask): Likewise.
11074 (vectorizable_store): Handle fully-masked loops.
11075 (vectorizable_load): Likewise.
11076 (supportable_widening_operation): Use vect_halve_mask_nunits for
11077 booleans.
11078 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
11079 (vect_gen_while): New function.
11080 * config/aarch64/aarch64.md (umax<mode>3): New expander.
11081 (aarch64_uqdec<mode>): New insn.
11082
11083 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11084 Alan Hayward <alan.hayward@arm.com>
11085 David Sherwood <david.sherwood@arm.com>
11086
11087 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
11088 (reduc_xor_scal_optab): New optabs.
11089 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
11090 (reduc_xor_scal_@var{m}): Document.
11091 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
11092 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
11093 internal functions.
11094 * fold-const-call.c (fold_const_call): Handle them.
11095 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
11096 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
11097 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
11098 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
11099 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
11100 (UNSPEC_XORV): New unspecs.
11101 (optab): Add entries for them.
11102 (BITWISEV): New int iterator.
11103 (bit_reduc_op): New int attributes.
11104
11105 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11106 Alan Hayward <alan.hayward@arm.com>
11107 David Sherwood <david.sherwood@arm.com>
11108
11109 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
11110 * internal-fn.def (VEC_SHL_INSERT): New internal function.
11111 * optabs.def (vec_shl_insert_optab): New optab.
11112 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
11113 (duplicate_and_interleave): Likewise.
11114 * tree-vect-loop.c: Include internal-fn.h.
11115 (neutral_op_for_slp_reduction): New function, split out from
11116 get_initial_defs_for_reduction.
11117 (get_initial_def_for_reduction): Handle option 2 for variable-length
11118 vectors by loading the neutral value into a vector and then shifting
11119 the initial value into element 0.
11120 (get_initial_defs_for_reduction): Replace the code argument with
11121 the neutral value calculated by neutral_op_for_slp_reduction.
11122 Use gimple_build_vector for constant-length vectors.
11123 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
11124 but the first group_size elements have a neutral value.
11125 Use duplicate_and_interleave otherwise.
11126 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
11127 Update call to get_initial_defs_for_reduction. Handle SLP
11128 reductions for variable-length vectors by creating one vector
11129 result for each scalar result, with the elements associated
11130 with other scalar results stubbed out with the neutral value.
11131 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
11132 Require IFN_VEC_SHL_INSERT for double reductions on
11133 variable-length vectors, or SLP reductions that have
11134 a neutral value. Require can_duplicate_and_interleave_p
11135 support for variable-length unchained SLP reductions if there
11136 is no neutral value, such as for MIN/MAX reductions. Also require
11137 the number of vector elements to be a multiple of the number of
11138 SLP statements when doing variable-length unchained SLP reductions.
11139 Update call to vect_create_epilog_for_reduction.
11140 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
11141 and remove initial values.
11142 (duplicate_and_interleave): Make public.
11143 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
11144 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
11145
11146 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11147 Alan Hayward <alan.hayward@arm.com>
11148 David Sherwood <david.sherwood@arm.com>
11149
11150 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
11151 (can_duplicate_and_interleave_p): New function.
11152 (vect_get_and_check_slp_defs): Take the vector of statements
11153 rather than just the current one. Remove excess parentheses.
11154 Restriction rejectinon of vect_constant_def and vect_external_def
11155 for variable-length vectors to boolean types, or types for which
11156 can_duplicate_and_interleave_p is false.
11157 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
11158 (duplicate_and_interleave): New function.
11159 (vect_get_constant_vectors): Use gimple_build_vector for
11160 constant-length vectors and suitable variable-length constant
11161 vectors. Use duplicate_and_interleave for other variable-length
11162 vectors. Don't defer the update when inserting new statements.
11163
11164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11165 Alan Hayward <alan.hayward@arm.com>
11166 David Sherwood <david.sherwood@arm.com>
11167
11168 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
11169 min_profitable_iters doesn't go negative.
11170
11171 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11172 Alan Hayward <alan.hayward@arm.com>
11173 David Sherwood <david.sherwood@arm.com>
11174
11175 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
11176 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
11177 * optabs.def (vec_mask_load_lanes_optab): New optab.
11178 (vec_mask_store_lanes_optab): Likewise.
11179 * internal-fn.def (MASK_LOAD_LANES): New internal function.
11180 (MASK_STORE_LANES): Likewise.
11181 * internal-fn.c (mask_load_lanes_direct): New macro.
11182 (mask_store_lanes_direct): Likewise.
11183 (expand_mask_load_optab_fn): Handle masked operations.
11184 (expand_mask_load_lanes_optab_fn): New macro.
11185 (expand_mask_store_optab_fn): Handle masked operations.
11186 (expand_mask_store_lanes_optab_fn): New macro.
11187 (direct_mask_load_lanes_optab_supported_p): Likewise.
11188 (direct_mask_store_lanes_optab_supported_p): Likewise.
11189 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
11190 parameter.
11191 (vect_load_lanes_supported): Likewise.
11192 * tree-vect-data-refs.c (strip_conversion): New function.
11193 (can_group_stmts_p): Likewise.
11194 (vect_analyze_data_ref_accesses): Use it instead of checking
11195 for a pair of assignments.
11196 (vect_store_lanes_supported): Take a masked_p parameter.
11197 (vect_load_lanes_supported): Likewise.
11198 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
11199 vect_store_lanes_supported and vect_load_lanes_supported.
11200 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11201 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
11202 parameter. Don't allow gaps for masked accesses.
11203 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
11204 and vect_load_lanes_supported.
11205 (get_load_store_type): Take a masked_p parameter and update
11206 call to get_group_load_store_type.
11207 (vectorizable_store): Update call to get_load_store_type.
11208 Handle IFN_MASK_STORE_LANES.
11209 (vectorizable_load): Update call to get_load_store_type.
11210 Handle IFN_MASK_LOAD_LANES.
11211
11212 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11213 Alan Hayward <alan.hayward@arm.com>
11214 David Sherwood <david.sherwood@arm.com>
11215
11216 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
11217 modes for SVE.
11218 * config/aarch64/aarch64-protos.h
11219 (aarch64_sve_struct_memory_operand_p): Declare.
11220 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
11221 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
11222 (VPRED, vpred): Handle SVE structure modes.
11223 * config/aarch64/constraints.md (Utx): New constraint.
11224 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
11225 (aarch64_sve_struct_nonimmediate_operand): New predicates.
11226 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
11227 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
11228 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
11229 structure modes. Split into pieces after RA.
11230 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
11231 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
11232 New patterns.
11233 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
11234 SVE structure modes.
11235 (aarch64_classify_address): Likewise.
11236 (sizetochar): Move earlier in file.
11237 (aarch64_print_operand): Handle SVE register lists.
11238 (aarch64_array_mode): New function.
11239 (aarch64_sve_struct_memory_operand_p): Likewise.
11240 (TARGET_ARRAY_MODE): Redefine.
11241
11242 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11243 Alan Hayward <alan.hayward@arm.com>
11244 David Sherwood <david.sherwood@arm.com>
11245
11246 * target.def (array_mode): New target hook.
11247 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
11248 * doc/tm.texi: Regenerate.
11249 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
11250 * hooks.c (hook_optmode_mode_uhwi_none): New function.
11251 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
11252 targetm.array_mode.
11253 * stor-layout.c (mode_for_array): Likewise. Support polynomial
11254 type sizes.
11255
11256 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11257 Alan Hayward <alan.hayward@arm.com>
11258 David Sherwood <david.sherwood@arm.com>
11259
11260 * fold-const.c (fold_binary_loc): Check the argument types
11261 rather than the result type when testing for a vector operation.
11262
11263 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11264
11265 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
11266 * doc/tm.texi: Regenerate.
11267
11268 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11269 Alan Hayward <alan.hayward@arm.com>
11270 David Sherwood <david.sherwood@arm.com>
11271
11272 * doc/invoke.texi (-msve-vector-bits=): Document new option.
11273 (sve): Document new AArch64 extension.
11274 * doc/md.texi (w): Extend the description of the AArch64
11275 constraint to include SVE vectors.
11276 (Upl, Upa): Document new AArch64 predicate constraints.
11277 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
11278 enum.
11279 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
11280 (msve-vector-bits=): New option.
11281 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
11282 SVE when these are disabled.
11283 (sve): New extension.
11284 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
11285 modes. Adjust their number of units based on aarch64_sve_vg.
11286 (MAX_BITSIZE_MODE_ANY_MODE): Define.
11287 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
11288 aarch64_addr_query_type.
11289 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
11290 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
11291 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
11292 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
11293 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
11294 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
11295 (aarch64_simd_imm_zero_p): Delete.
11296 (aarch64_check_zero_based_sve_index_immediate): Declare.
11297 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11298 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11299 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11300 (aarch64_sve_float_mul_immediate_p): Likewise.
11301 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11302 rather than an rtx.
11303 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
11304 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
11305 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
11306 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
11307 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
11308 (aarch64_regmode_natural_size): Likewise.
11309 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
11310 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
11311 left one place.
11312 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
11313 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
11314 for VG and the SVE predicate registers.
11315 (V_ALIASES): Add a "z"-prefixed alias.
11316 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
11317 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
11318 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
11319 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
11320 (REG_CLASS_NAMES): Add entries for them.
11321 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
11322 and the predicate registers.
11323 (aarch64_sve_vg): Declare.
11324 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
11325 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
11326 (REGMODE_NATURAL_SIZE): Define.
11327 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
11328 SVE macros.
11329 * config/aarch64/aarch64.c: Include cfgrtl.h.
11330 (simd_immediate_info): Add a constructor for series vectors,
11331 and an associated step field.
11332 (aarch64_sve_vg): New variable.
11333 (aarch64_dbx_register_number): Handle VG and the predicate registers.
11334 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
11335 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
11336 (VEC_ANY_DATA, VEC_STRUCT): New constants.
11337 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
11338 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
11339 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
11340 (aarch64_get_mask_mode): New functions.
11341 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
11342 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
11343 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
11344 predicate modes and predicate registers. Explicitly restrict
11345 GPRs to modes of 16 bytes or smaller. Only allow FP registers
11346 to store a vector mode if it is recognized by
11347 aarch64_classify_vector_mode.
11348 (aarch64_regmode_natural_size): New function.
11349 (aarch64_hard_regno_caller_save_mode): Return the original mode
11350 for predicates.
11351 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
11352 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
11353 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
11354 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
11355 functions.
11356 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
11357 does not overlap dest if the function is frame-related. Handle
11358 SVE constants.
11359 (aarch64_split_add_offset): New function.
11360 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
11361 them aarch64_add_offset.
11362 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
11363 and update call to aarch64_sub_sp.
11364 (aarch64_add_cfa_expression): New function.
11365 (aarch64_expand_prologue): Pass extra temporary registers to the
11366 functions above. Handle the case in which we need to emit new
11367 DW_CFA_expressions for registers that were originally saved
11368 relative to the stack pointer, but now have to be expressed
11369 relative to the frame pointer.
11370 (aarch64_output_mi_thunk): Pass extra temporary registers to the
11371 functions above.
11372 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
11373 IP0 and IP1 values for SVE frames.
11374 (aarch64_expand_vec_series): New function.
11375 (aarch64_expand_sve_widened_duplicate): Likewise.
11376 (aarch64_expand_sve_const_vector): Likewise.
11377 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
11378 Handle SVE constants. Use emit_move_insn to move a force_const_mem
11379 into the register, rather than emitting a SET directly.
11380 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
11381 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
11382 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
11383 (offset_9bit_signed_scaled_p): New functions.
11384 (aarch64_replicate_bitmask_imm): New function.
11385 (aarch64_bitmask_imm): Use it.
11386 (aarch64_cannot_force_const_mem): Reject expressions involving
11387 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
11388 (aarch64_classify_index): Handle SVE indices, by requiring
11389 a plain register index with a scale that matches the element size.
11390 (aarch64_classify_address): Handle SVE addresses. Assert that
11391 the mode of the address is VOIDmode or an integer mode.
11392 Update call to aarch64_classify_symbol.
11393 (aarch64_classify_symbolic_expression): Update call to
11394 aarch64_classify_symbol.
11395 (aarch64_const_vec_all_in_range_p): New function.
11396 (aarch64_print_vector_float_operand): Likewise.
11397 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
11398 "vN" for FP registers with SVE modes. Handle (const ...) vectors
11399 and the FP immediates 1.0 and 0.5.
11400 (aarch64_print_address_internal): Handle SVE addresses.
11401 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
11402 (aarch64_regno_regclass): Handle predicate registers.
11403 (aarch64_secondary_reload): Handle big-endian reloads of SVE
11404 data modes.
11405 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
11406 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
11407 (aarch64_convert_sve_vector_bits): New function.
11408 (aarch64_override_options): Use it to handle -msve-vector-bits=.
11409 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
11410 rather than an rtx.
11411 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
11412 Handle SVE vector and predicate modes. Accept VL-based constants
11413 that need only one temporary register, and VL offsets that require
11414 no temporary registers.
11415 (aarch64_conditional_register_usage): Mark the predicate registers
11416 as fixed if SVE isn't available.
11417 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
11418 Return true for SVE vector and predicate modes.
11419 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
11420 rather than an unsigned int. Handle SVE modes.
11421 (aarch64_preferred_simd_mode): Update call accordingly. Handle
11422 SVE modes.
11423 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
11424 if SVE is enabled.
11425 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
11426 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
11427 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
11428 (aarch64_sve_float_mul_immediate_p): New functions.
11429 (aarch64_sve_valid_immediate): New function.
11430 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
11431 Explicitly reject structure modes. Check for INDEX constants.
11432 Handle PTRUE and PFALSE constants.
11433 (aarch64_check_zero_based_sve_index_immediate): New function.
11434 (aarch64_simd_imm_zero_p): Delete.
11435 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
11436 vector modes. Accept constants in the range of CNT[BHWD].
11437 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
11438 ask for an Advanced SIMD mode.
11439 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
11440 (aarch64_simd_vector_alignment): Handle SVE predicates.
11441 (aarch64_vectorize_preferred_vector_alignment): New function.
11442 (aarch64_simd_vector_alignment_reachable): Use it instead of
11443 the vector size.
11444 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
11445 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
11446 functions.
11447 (MAX_VECT_LEN): Delete.
11448 (expand_vec_perm_d): Add a vec_flags field.
11449 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
11450 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
11451 (aarch64_evpc_ext): Don't apply a big-endian lane correction
11452 for SVE modes.
11453 (aarch64_evpc_rev): Rename to...
11454 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
11455 (aarch64_evpc_rev_global): New function.
11456 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
11457 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
11458 MAX_VECT_LEN.
11459 (aarch64_evpc_sve_tbl): New function.
11460 (aarch64_expand_vec_perm_const_1): Update after rename of
11461 aarch64_evpc_rev. Handle SVE permutes too, trying
11462 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
11463 than aarch64_evpc_tbl.
11464 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
11465 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
11466 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
11467 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
11468 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
11469 (aarch64_expand_sve_vcond): New functions.
11470 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
11471 of aarch64_vector_mode_p.
11472 (aarch64_dwarf_poly_indeterminate_value): New function.
11473 (aarch64_compute_pressure_classes): Likewise.
11474 (aarch64_can_change_mode_class): Likewise.
11475 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
11476 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
11477 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
11478 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
11479 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
11480 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
11481 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
11482 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
11483 constraints.
11484 (Dn, Dl, Dr): Accept const as well as const_vector.
11485 (Dz): Likewise. Compare against CONST0_RTX.
11486 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
11487 of "vector" where appropriate.
11488 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
11489 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
11490 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
11491 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
11492 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
11493 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
11494 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
11495 (v_int_equiv): Extend to SVE modes.
11496 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
11497 mode attributes.
11498 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
11499 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
11500 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
11501 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
11502 (SVE_COND_FP_CMP): New int iterators.
11503 (perm_hilo): Handle the new unpack unspecs.
11504 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
11505 attributes.
11506 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
11507 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
11508 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
11509 (aarch64_equality_operator, aarch64_constant_vector_operand)
11510 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
11511 (aarch64_sve_nonimmediate_operand): Likewise.
11512 (aarch64_sve_general_operand): Likewise.
11513 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
11514 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
11515 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
11516 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
11517 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
11518 (aarch64_sve_float_arith_immediate): Likewise.
11519 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
11520 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
11521 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
11522 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
11523 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
11524 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
11525 (aarch64_sve_float_arith_operand): Likewise.
11526 (aarch64_sve_float_arith_with_sub_operand): Likewise.
11527 (aarch64_sve_float_mul_operand): Likewise.
11528 (aarch64_sve_vec_perm_operand): Likewise.
11529 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
11530 (aarch64_mov_operand): Accept const_poly_int and const_vector.
11531 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
11532 as well as const_vector.
11533 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
11534 in file. Use CONST0_RTX and CONSTM1_RTX.
11535 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
11536 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
11537 Use aarch64_simd_imm_zero.
11538 * config/aarch64/aarch64-sve.md: New file.
11539 * config/aarch64/aarch64.md: Include it.
11540 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
11541 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
11542 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
11543 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
11544 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
11545 (sve): New attribute.
11546 (enabled): Disable instructions with the sve attribute unless
11547 TARGET_SVE.
11548 (movqi, movhi): Pass CONST_POLY_INT operaneds through
11549 aarch64_expand_mov_immediate.
11550 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
11551 CNT[BHSD] immediates.
11552 (movti): Split CONST_POLY_INT moves into two halves.
11553 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
11554 Split additions that need a temporary here if the destination
11555 is the stack pointer.
11556 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
11557 (*add<mode>3_poly_1): New instruction.
11558 (set_clobber_cc): New expander.
11559
11560 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11561
11562 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
11563 parameter and use it instead of GET_MODE_SIZE (innermode). Use
11564 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
11565 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
11566 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
11567 Change innermode from fixed_mode_size to machine_mode.
11568 (simplify_subreg): Update call accordingly. Handle a constant-sized
11569 subreg of a variable-length CONST_VECTOR.
11570
11571 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11572 Alan Hayward <alan.hayward@arm.com>
11573 David Sherwood <david.sherwood@arm.com>
11574
11575 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
11576 (add_offset_to_base): New function, split out from...
11577 (create_mem_ref): ...here. When handling a scale other than 1,
11578 check first whether the address is valid without the offset.
11579 Add it into the base if so, leaving the index and scale as-is.
11580
11581 2018-01-12 Jakub Jelinek <jakub@redhat.com>
11582
11583 PR c++/83778
11584 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
11585 fold_for_warn before checking if arg2 is INTEGER_CST.
11586
11587 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
11588
11589 * config/rs6000/predicates.md (load_multiple_operation): Delete.
11590 (store_multiple_operation): Delete.
11591 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
11592 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
11593 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
11594 guarded by TARGET_STRING.
11595 (rs6000_output_load_multiple): Delete.
11596 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
11597 OPTION_MASK_STRING / TARGET_STRING handling.
11598 (print_operand) <'N', 'O'>: Add comment that these are unused now.
11599 (const rs6000_opt_masks) <"string">: Change mask to 0.
11600 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
11601 (MASK_STRING): Delete.
11602 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
11603 parts. Simplify.
11604 (load_multiple): Delete.
11605 (*ldmsi8): Delete.
11606 (*ldmsi7): Delete.
11607 (*ldmsi6): Delete.
11608 (*ldmsi5): Delete.
11609 (*ldmsi4): Delete.
11610 (*ldmsi3): Delete.
11611 (store_multiple): Delete.
11612 (*stmsi8): Delete.
11613 (*stmsi7): Delete.
11614 (*stmsi6): Delete.
11615 (*stmsi5): Delete.
11616 (*stmsi4): Delete.
11617 (*stmsi3): Delete.
11618 (movmemsi_8reg): Delete.
11619 (corresponding unnamed define_insn): Delete.
11620 (movmemsi_6reg): Delete.
11621 (corresponding unnamed define_insn): Delete.
11622 (movmemsi_4reg): Delete.
11623 (corresponding unnamed define_insn): Delete.
11624 (movmemsi_2reg): Delete.
11625 (corresponding unnamed define_insn): Delete.
11626 (movmemsi_1reg): Delete.
11627 (corresponding unnamed define_insn): Delete.
11628 * config/rs6000/rs6000.opt (mno-string): New.
11629 (mstring): Replace by deprecation warning stub.
11630 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
11631
11632 2018-01-12 Jakub Jelinek <jakub@redhat.com>
11633
11634 * regrename.c (regrename_do_replace): If replacing the same
11635 reg multiple times, try to reuse last created gen_raw_REG.
11636
11637 PR debug/81155
11638 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
11639 main to workaround a bug in GDB.
11640
11641 2018-01-12 Tom de Vries <tom@codesourcery.com>
11642
11643 PR target/83737
11644 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
11645
11646 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
11647
11648 PR rtl-optimization/80481
11649 * ira-color.c (get_cap_member): New function.
11650 (allocnos_conflict_by_live_ranges_p): Use it.
11651 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
11652 (setup_slot_coalesced_allocno_live_ranges): Ditto.
11653
11654 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
11655
11656 PR target/83628
11657 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
11658 (*saddl_se_1): Ditto.
11659 (*ssubsi_1): Ditto.
11660 (*ssubl_se_1): Ditto.
11661
11662 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
11663
11664 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
11665 rather than wi::to_widest for DR_INITs.
11666 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
11667 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
11668 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
11669 INTEGER_CSTs.
11670 (vect_analyze_group_access_1): Note that here.
11671
11672 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
11673
11674 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
11675 polynomial type sizes.
11676
11677 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
11678
11679 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
11680 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
11681 (gimple_add_tmp_var): Likewise.
11682
11683 2018-01-12 Martin Liska <mliska@suse.cz>
11684
11685 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
11686 (gimple_alloc_sizes): Likewise.
11687 (dump_gimple_statistics): Use PRIu64 in printf format.
11688 * gimple.h: Change uint64_t to int.
11689
11690 2018-01-12 Martin Liska <mliska@suse.cz>
11691
11692 * tree-core.h: Use uint64_t instead of int.
11693 * tree.c (tree_node_counts): Likewise.
11694 (tree_node_sizes): Likewise.
11695 (dump_tree_statistics): Use PRIu64 in printf format.
11696
11697 2018-01-12 Martin Liska <mliska@suse.cz>
11698
11699 * Makefile.in: As qsort_chk is implemented in vec.c, add
11700 vec.o to linkage of gencfn-macros.
11701 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
11702 passing the info to record_node_allocation_statistics.
11703 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
11704 and pass the info.
11705 * ggc-common.c (struct ggc_usage): Add operator== and use
11706 it in operator< and compare function.
11707 * mem-stats.h (struct mem_usage): Likewise.
11708 * vec.c (struct vec_usage): Remove operator< and compare
11709 function. Can be simply inherited.
11710
11711 2018-01-12 Martin Jambor <mjambor@suse.cz>
11712
11713 PR target/81616
11714 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
11715 * tree-ssa-math-opts.c: Include domwalk.h.
11716 (convert_mult_to_fma_1): New function.
11717 (fma_transformation_info): New type.
11718 (fma_deferring_state): Likewise.
11719 (cancel_fma_deferring): New function.
11720 (result_of_phi): Likewise.
11721 (last_fma_candidate_feeds_initial_phi): Likewise.
11722 (convert_mult_to_fma): Added deferring logic, split actual
11723 transformation to convert_mult_to_fma_1.
11724 (math_opts_dom_walker): New type.
11725 (math_opts_dom_walker::after_dom_children): New method, body moved
11726 here from pass_optimize_widening_mul::execute, added deferring logic
11727 bits.
11728 (pass_optimize_widening_mul::execute): Moved most of code to
11729 math_opts_dom_walker::after_dom_children.
11730 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
11731 * config/i386/i386.c (ix86_option_override_internal): Added
11732 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
11733
11734 2018-01-12 Richard Biener <rguenther@suse.de>
11735
11736 PR debug/83157
11737 * dwarf2out.c (gen_variable_die): Do not reset old_die for
11738 inline instance vars.
11739
11740 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
11741
11742 PR target/81819
11743 * config/rx/rx.c (rx_is_restricted_memory_address):
11744 Handle SUBREG case.
11745
11746 2018-01-12 Richard Biener <rguenther@suse.de>
11747
11748 PR tree-optimization/80846
11749 * target.def (split_reduction): New target hook.
11750 * targhooks.c (default_split_reduction): New function.
11751 * targhooks.h (default_split_reduction): Declare.
11752 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
11753 target requests first reduce vectors by combining low and high
11754 parts.
11755 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
11756 (get_vectype_for_scalar_type_and_size): Export.
11757 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
11758 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
11759 * doc/tm.texi: Regenerate.
11760 * config/i386/i386.c (ix86_split_reduction): Implement
11761 TARGET_VECTORIZE_SPLIT_REDUCTION.
11762
11763 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
11764
11765 PR target/83368
11766 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
11767 in PIC mode except for TARGET_VXWORKS_RTP.
11768 * config/sparc/sparc.c: Include cfgrtl.h.
11769 (TARGET_INIT_PIC_REG): Define.
11770 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
11771 (sparc_pic_register_p): New predicate.
11772 (sparc_legitimate_address_p): Use it.
11773 (sparc_legitimize_pic_address): Likewise.
11774 (sparc_delegitimize_address): Likewise.
11775 (sparc_mode_dependent_address_p): Likewise.
11776 (gen_load_pcrel_sym): Remove 4th parameter.
11777 (load_got_register): Adjust call to above. Remove obsolete stuff.
11778 (sparc_expand_prologue): Do not call load_got_register here.
11779 (sparc_flat_expand_prologue): Likewise.
11780 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
11781 (sparc_use_pseudo_pic_reg): New function.
11782 (sparc_init_pic_reg): Likewise.
11783 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
11784 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
11785
11786 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
11787
11788 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
11789 Add item for branch_cost.
11790
11791 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
11792
11793 PR rtl-optimization/83565
11794 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
11795 not extend the result to a larger mode for rotate operations.
11796 (num_sign_bit_copies1): Likewise.
11797
11798 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11799
11800 PR target/40411
11801 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
11802 -symbolic.
11803 Use values-Xc.o for -pedantic.
11804 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
11805
11806 2018-01-12 Martin Liska <mliska@suse.cz>
11807
11808 PR ipa/83054
11809 * ipa-devirt.c (final_warning_record::grow_type_warnings):
11810 New function.
11811 (possible_polymorphic_call_targets): Use it.
11812 (ipa_devirt): Likewise.
11813
11814 2018-01-12 Martin Liska <mliska@suse.cz>
11815
11816 * profile-count.h (enum profile_quality): Use 0 as invalid
11817 enum value of profile_quality.
11818
11819 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
11820
11821 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
11822 -mext-string options.
11823
11824 2018-01-12 Richard Biener <rguenther@suse.de>
11825
11826 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
11827 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
11828 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
11829 Likewise.
11830 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
11831
11832 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
11833
11834 * configure.ac (--with-long-double-format): Add support for the
11835 configuration option to change the default long double format on
11836 PowerPC systems.
11837 * config.gcc (powerpc*-linux*-*): Likewise.
11838 * configure: Regenerate.
11839 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
11840 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
11841 used without modification.
11842
11843 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11844
11845 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
11846 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
11847 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
11848 MISC_BUILTIN_SPEC_BARRIER.
11849 (rs6000_init_builtins): Likewise.
11850 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
11851 enum value.
11852 (speculation_barrier): New define_insn.
11853 * doc/extend.texi: Document __builtin_speculation_barrier.
11854
11855 2018-01-11 Jakub Jelinek <jakub@redhat.com>
11856
11857 PR target/83203
11858 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
11859 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
11860 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
11861 iterators.
11862 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
11863 integral modes instead of "ss" and "sd".
11864 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
11865 vectors with 32-bit and 64-bit elements.
11866 (vecdupssescalarmodesuffix): New mode attribute.
11867 (vec_dup<mode>): Use it.
11868
11869 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
11870
11871 PR target/83330
11872 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
11873 frame if argument is passed on stack.
11874
11875 2018-01-11 Jakub Jelinek <jakub@redhat.com>
11876
11877 PR target/82682
11878 * ree.c (combine_reaching_defs): Optimize also
11879 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
11880 reg2=any_extend(exp); reg1=reg2;, formatting fix.
11881
11882 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
11883
11884 PR middle-end/83189
11885 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
11886
11887 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
11888
11889 PR middle-end/83718
11890 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
11891 after they are computed.
11892
11893 2018-01-11 Bin Cheng <bin.cheng@arm.com>
11894
11895 PR tree-optimization/83695
11896 * gimple-loop-linterchange.cc
11897 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
11898 reset cached scev information after interchange.
11899 (pass_linterchange::execute): Remove call to scev_reset_htab.
11900
11901 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11902
11903 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
11904 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
11905 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
11906 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
11907 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
11908 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
11909 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
11910 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
11911 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
11912 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
11913 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
11914 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
11915 (V_lane_reg): Likewise.
11916 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
11917 New define_expand.
11918 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
11919 (vfmal_lane_low<mode>_intrinsic,
11920 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
11921 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
11922 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
11923 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
11924 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
11925 vfmsl_lane_high<mode>_intrinsic): New define_insns.
11926
11927 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11928
11929 * config/arm/arm-cpus.in (fp16fml): New feature.
11930 (ALL_SIMD): Add fp16fml.
11931 (armv8.2-a): Add fp16fml as an option.
11932 (armv8.3-a): Likewise.
11933 (armv8.4-a): Add fp16fml as part of fp16.
11934 * config/arm/arm.h (TARGET_FP16FML): Define.
11935 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
11936 when appropriate.
11937 * config/arm/arm-modes.def (V2HF): Define.
11938 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
11939 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
11940 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
11941 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
11942 vfmsl_low, vfmsl_high): New set of builtins.
11943 * config/arm/iterators.md (PLUSMINUS): New code iterator.
11944 (vfml_op): New code attribute.
11945 (VFMLHALVES): New int iterator.
11946 (VFML, VFMLSEL): New mode attributes.
11947 (V_reg): Define mapping for V2HF.
11948 (V_hi, V_lo): New mode attributes.
11949 (VF_constraint): Likewise.
11950 (vfml_half, vfml_half_selector): New int attributes.
11951 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
11952 define_expand.
11953 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
11954 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
11955 New define_insn.
11956 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
11957 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
11958 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
11959 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
11960 documentation.
11961 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
11962 Document new effective target and option set.
11963
11964 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11965
11966 * config/arm/arm-cpus.in (armv8_4): New feature.
11967 (ARMv8_4a): New fgroup.
11968 (armv8.4-a): New arch.
11969 * config/arm/arm-tables.opt: Regenerate.
11970 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
11971 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
11972 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
11973 Add matching rules for -march=armv8.4-a and extensions.
11974 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
11975
11976 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
11977
11978 PR target/81821
11979 * config/rx/rx.md (BW): New mode attribute.
11980 (sync_lock_test_and_setsi): Add mode suffix to insn output.
11981
11982 2018-01-11 Richard Biener <rguenther@suse.de>
11983
11984 PR tree-optimization/83435
11985 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
11986 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
11987 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
11988
11989 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11990 Alan Hayward <alan.hayward@arm.com>
11991 David Sherwood <david.sherwood@arm.com>
11992
11993 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
11994 field.
11995 (aarch64_classify_address): Initialize it. Track polynomial offsets.
11996 (aarch64_print_address_internal): Use it to check for a zero offset.
11997
11998 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
11999 Alan Hayward <alan.hayward@arm.com>
12000 David Sherwood <david.sherwood@arm.com>
12001
12002 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
12003 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
12004 Return a poly_int64 rather than a HOST_WIDE_INT.
12005 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
12006 rather than a HOST_WIDE_INT.
12007 * config/aarch64/aarch64.h (aarch64_frame): Protect with
12008 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
12009 hard_fp_offset, frame_size, initial_adjust, callee_offset and
12010 final_offset from HOST_WIDE_INT to poly_int64.
12011 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
12012 to_constant when getting the number of units in an Advanced SIMD
12013 mode.
12014 (aarch64_builtin_vectorized_function): Check for a constant number
12015 of units.
12016 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
12017 GET_MODE_SIZE.
12018 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
12019 attribute instead of GET_MODE_NUNITS.
12020 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
12021 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
12022 GET_MODE_SIZE for fixed-size registers.
12023 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
12024 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
12025 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
12026 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
12027 (aarch64_print_operand, aarch64_print_address_internal)
12028 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
12029 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
12030 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
12031 Handle polynomial GET_MODE_SIZE.
12032 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
12033 wider than SImode without modification.
12034 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
12035 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
12036 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
12037 passing and returning SVE modes.
12038 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
12039 rather than GEN_INT.
12040 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
12041 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
12042 (aarch64_allocate_and_probe_stack_space): Likewise.
12043 (aarch64_layout_frame): Cope with polynomial offsets.
12044 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
12045 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
12046 polynomial offsets.
12047 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
12048 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
12049 poly_int64 rather than a HOST_WIDE_INT.
12050 (aarch64_get_separate_components, aarch64_process_components)
12051 (aarch64_expand_prologue, aarch64_expand_epilogue)
12052 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
12053 (aarch64_anchor_offset): New function, split out from...
12054 (aarch64_legitimize_address): ...here.
12055 (aarch64_builtin_vectorization_cost): Handle polynomial
12056 TYPE_VECTOR_SUBPARTS.
12057 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
12058 GET_MODE_NUNITS.
12059 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
12060 number of elements from the PARALLEL rather than the mode.
12061 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
12062 rather than GET_MODE_BITSIZE.
12063 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
12064 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
12065 (aarch64_expand_vec_perm_const_1): Handle polynomial
12066 d->perm.length () and d->perm elements.
12067 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
12068 Apply to_constant to d->perm elements.
12069 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
12070 polynomial CONST_VECTOR_NUNITS.
12071 (aarch64_move_pointer): Take amount as a poly_int64 rather
12072 than an int.
12073 (aarch64_progress_pointer): Avoid temporary variable.
12074 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
12075 the mode attribute instead of GET_MODE.
12076
12077 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12078 Alan Hayward <alan.hayward@arm.com>
12079 David Sherwood <david.sherwood@arm.com>
12080
12081 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
12082 x exists before using it.
12083 (aarch64_add_constant_internal): Rename to...
12084 (aarch64_add_offset_1): ...this. Replace regnum with separate
12085 src and dest rtxes. Handle the case in which they're different,
12086 including when the offset is zero. Replace scratchreg with an rtx.
12087 Use 2 additions if there is no spare register into which we can
12088 move a 16-bit constant.
12089 (aarch64_add_constant): Delete.
12090 (aarch64_add_offset): Replace reg with separate src and dest
12091 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
12092 Use aarch64_add_offset_1.
12093 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
12094 an rtx rather than an int. Take the delta as a poly_int64
12095 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
12096 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
12097 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
12098 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
12099 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
12100 and aarch64_add_sp.
12101 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
12102 aarch64_add_constant.
12103
12104 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12105
12106 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
12107 Use scalar_float_mode.
12108
12109 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12110
12111 * config/aarch64/aarch64-simd.md
12112 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
12113 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
12114 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
12115 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
12116 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
12117 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
12118 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
12119 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
12120 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
12121 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
12122
12123 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12124
12125 PR target/83514
12126 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
12127 targ_options->x_arm_arch_string is non NULL.
12128
12129 2018-01-11 Tamar Christina <tamar.christina@arm.com>
12130
12131 * config/aarch64/aarch64.h
12132 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
12133
12134 2018-01-11 Sudakshina Das <sudi.das@arm.com>
12135
12136 PR target/82096
12137 * expmed.c (emit_store_flag_force): Swap if const op0
12138 and change VOIDmode to mode of op0.
12139
12140 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
12141
12142 PR rtl-optimization/83761
12143 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
12144 than bytes to mode_for_size.
12145
12146 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12147
12148 PR middle-end/83189
12149 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
12150 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
12151 profile.
12152
12153 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12154
12155 PR middle-end/83575
12156 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
12157 when in layout mode.
12158 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
12159 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
12160 partition fixup.
12161
12162 2018-01-10 Michael Collison <michael.collison@arm.com>
12163
12164 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
12165 * config/aarch64/aarch64-option-extension.def: Add
12166 AARCH64_OPT_EXTENSION of 'fp16fml'.
12167 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12168 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
12169 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
12170 * config/aarch64/constraints.md (Ui7): New constraint.
12171 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
12172 (VFMLA_SEL_W): Ditto.
12173 (f16quad): Ditto.
12174 (f16mac1): Ditto.
12175 (VFMLA16_LOW): New int iterator.
12176 (VFMLA16_HIGH): Ditto.
12177 (UNSPEC_FMLAL): New unspec.
12178 (UNSPEC_FMLSL): Ditto.
12179 (UNSPEC_FMLAL2): Ditto.
12180 (UNSPEC_FMLSL2): Ditto.
12181 (f16mac): New code attribute.
12182 * config/aarch64/aarch64-simd-builtins.def
12183 (aarch64_fmlal_lowv2sf): Ditto.
12184 (aarch64_fmlsl_lowv2sf): Ditto.
12185 (aarch64_fmlalq_lowv4sf): Ditto.
12186 (aarch64_fmlslq_lowv4sf): Ditto.
12187 (aarch64_fmlal_highv2sf): Ditto.
12188 (aarch64_fmlsl_highv2sf): Ditto.
12189 (aarch64_fmlalq_highv4sf): Ditto.
12190 (aarch64_fmlslq_highv4sf): Ditto.
12191 (aarch64_fmlal_lane_lowv2sf): Ditto.
12192 (aarch64_fmlsl_lane_lowv2sf): Ditto.
12193 (aarch64_fmlal_laneq_lowv2sf): Ditto.
12194 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
12195 (aarch64_fmlalq_lane_lowv4sf): Ditto.
12196 (aarch64_fmlsl_lane_lowv4sf): Ditto.
12197 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
12198 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
12199 (aarch64_fmlal_lane_highv2sf): Ditto.
12200 (aarch64_fmlsl_lane_highv2sf): Ditto.
12201 (aarch64_fmlal_laneq_highv2sf): Ditto.
12202 (aarch64_fmlsl_laneq_highv2sf): Ditto.
12203 (aarch64_fmlalq_lane_highv4sf): Ditto.
12204 (aarch64_fmlsl_lane_highv4sf): Ditto.
12205 (aarch64_fmlalq_laneq_highv4sf): Ditto.
12206 (aarch64_fmlsl_laneq_highv4sf): Ditto.
12207 * config/aarch64/aarch64-simd.md:
12208 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
12209 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12210 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
12211 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
12212 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
12213 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
12214 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
12215 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
12216 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
12217 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
12218 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
12219 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
12220 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
12221 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
12222 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
12223 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
12224 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
12225 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
12226 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
12227 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
12228 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
12229 (vfmlsl_low_u32): Ditto.
12230 (vfmlalq_low_u32): Ditto.
12231 (vfmlslq_low_u32): Ditto.
12232 (vfmlal_high_u32): Ditto.
12233 (vfmlsl_high_u32): Ditto.
12234 (vfmlalq_high_u32): Ditto.
12235 (vfmlslq_high_u32): Ditto.
12236 (vfmlal_lane_low_u32): Ditto.
12237 (vfmlsl_lane_low_u32): Ditto.
12238 (vfmlal_laneq_low_u32): Ditto.
12239 (vfmlsl_laneq_low_u32): Ditto.
12240 (vfmlalq_lane_low_u32): Ditto.
12241 (vfmlslq_lane_low_u32): Ditto.
12242 (vfmlalq_laneq_low_u32): Ditto.
12243 (vfmlslq_laneq_low_u32): Ditto.
12244 (vfmlal_lane_high_u32): Ditto.
12245 (vfmlsl_lane_high_u32): Ditto.
12246 (vfmlal_laneq_high_u32): Ditto.
12247 (vfmlsl_laneq_high_u32): Ditto.
12248 (vfmlalq_lane_high_u32): Ditto.
12249 (vfmlslq_lane_high_u32): Ditto.
12250 (vfmlalq_laneq_high_u32): Ditto.
12251 (vfmlslq_laneq_high_u32): Ditto.
12252 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
12253 (AARCH64_FL_FOR_ARCH8_4): New.
12254 (AARCH64_ISA_F16FML): New ISA flag.
12255 (TARGET_F16FML): New feature flag for fp16fml.
12256 (doc/invoke.texi): Document new fp16fml option.
12257
12258 2018-01-10 Michael Collison <michael.collison@arm.com>
12259
12260 * config/aarch64/aarch64-builtins.c:
12261 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
12262 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12263 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
12264 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
12265 (AARCH64_ISA_SHA3): New ISA flag.
12266 (TARGET_SHA3): New feature flag for sha3.
12267 * config/aarch64/iterators.md (sha512_op): New int attribute.
12268 (CRYPTO_SHA512): New int iterator.
12269 (UNSPEC_SHA512H): New unspec.
12270 (UNSPEC_SHA512H2): Ditto.
12271 (UNSPEC_SHA512SU0): Ditto.
12272 (UNSPEC_SHA512SU1): Ditto.
12273 * config/aarch64/aarch64-simd-builtins.def
12274 (aarch64_crypto_sha512hqv2di): New builtin.
12275 (aarch64_crypto_sha512h2qv2di): Ditto.
12276 (aarch64_crypto_sha512su0qv2di): Ditto.
12277 (aarch64_crypto_sha512su1qv2di): Ditto.
12278 (aarch64_eor3qv8hi): Ditto.
12279 (aarch64_rax1qv2di): Ditto.
12280 (aarch64_xarqv2di): Ditto.
12281 (aarch64_bcaxqv8hi): Ditto.
12282 * config/aarch64/aarch64-simd.md:
12283 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
12284 (aarch64_crypto_sha512su0qv2di): Ditto.
12285 (aarch64_crypto_sha512su1qv2di): Ditto.
12286 (aarch64_eor3qv8hi): Ditto.
12287 (aarch64_rax1qv2di): Ditto.
12288 (aarch64_xarqv2di): Ditto.
12289 (aarch64_bcaxqv8hi): Ditto.
12290 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
12291 (vsha512h2q_u64): Ditto.
12292 (vsha512su0q_u64): Ditto.
12293 (vsha512su1q_u64): Ditto.
12294 (veor3q_u16): Ditto.
12295 (vrax1q_u64): Ditto.
12296 (vxarq_u64): Ditto.
12297 (vbcaxq_u16): Ditto.
12298 * config/arm/types.md (crypto_sha512): New type attribute.
12299 (crypto_sha3): Ditto.
12300 (doc/invoke.texi): Document new sha3 option.
12301
12302 2018-01-10 Michael Collison <michael.collison@arm.com>
12303
12304 * config/aarch64/aarch64-builtins.c:
12305 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
12306 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12307 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
12308 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
12309 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
12310 (AARCH64_ISA_SM4): New ISA flag.
12311 (TARGET_SM4): New feature flag for sm4.
12312 * config/aarch64/aarch64-simd-builtins.def
12313 (aarch64_sm3ss1qv4si): Ditto.
12314 (aarch64_sm3tt1aq4si): Ditto.
12315 (aarch64_sm3tt1bq4si): Ditto.
12316 (aarch64_sm3tt2aq4si): Ditto.
12317 (aarch64_sm3tt2bq4si): Ditto.
12318 (aarch64_sm3partw1qv4si): Ditto.
12319 (aarch64_sm3partw2qv4si): Ditto.
12320 (aarch64_sm4eqv4si): Ditto.
12321 (aarch64_sm4ekeyqv4si): Ditto.
12322 * config/aarch64/aarch64-simd.md:
12323 (aarch64_sm3ss1qv4si): Ditto.
12324 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
12325 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
12326 (aarch64_sm4eqv4si): Ditto.
12327 (aarch64_sm4ekeyqv4si): Ditto.
12328 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
12329 (sm3part_op): Ditto.
12330 (CRYPTO_SM3TT): Ditto.
12331 (CRYPTO_SM3PART): Ditto.
12332 (UNSPEC_SM3SS1): New unspec.
12333 (UNSPEC_SM3TT1A): Ditto.
12334 (UNSPEC_SM3TT1B): Ditto.
12335 (UNSPEC_SM3TT2A): Ditto.
12336 (UNSPEC_SM3TT2B): Ditto.
12337 (UNSPEC_SM3PARTW1): Ditto.
12338 (UNSPEC_SM3PARTW2): Ditto.
12339 (UNSPEC_SM4E): Ditto.
12340 (UNSPEC_SM4EKEY): Ditto.
12341 * config/aarch64/constraints.md (Ui2): New constraint.
12342 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
12343 * config/arm/types.md (crypto_sm3): New type attribute.
12344 (crypto_sm4): Ditto.
12345 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
12346 (vsm3tt1aq_u32): Ditto.
12347 (vsm3tt1bq_u32): Ditto.
12348 (vsm3tt2aq_u32): Ditto.
12349 (vsm3tt2bq_u32): Ditto.
12350 (vsm3partw1q_u32): Ditto.
12351 (vsm3partw2q_u32): Ditto.
12352 (vsm4eq_u32): Ditto.
12353 (vsm4ekeyq_u32): Ditto.
12354 (doc/invoke.texi): Document new sm4 option.
12355
12356 2018-01-10 Michael Collison <michael.collison@arm.com>
12357
12358 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
12359 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
12360 (AARCH64_FL_FOR_ARCH8_4): New.
12361 (AARCH64_FL_V8_4): New flag.
12362 (doc/invoke.texi): Document new armv8.4-a option.
12363
12364 2018-01-10 Michael Collison <michael.collison@arm.com>
12365
12366 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
12367 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
12368 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
12369 * config/aarch64/aarch64-option-extension.def: Add
12370 AARCH64_OPT_EXTENSION of 'sha2'.
12371 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
12372 (crypto): Disable sha2 and aes if crypto disabled.
12373 (crypto): Enable aes and sha2 if enabled.
12374 (simd): Disable sha2 and aes if simd disabled.
12375 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
12376 New flags.
12377 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
12378 (TARGET_SHA2): New feature flag for sha2.
12379 (TARGET_AES): New feature flag for aes.
12380 * config/aarch64/aarch64-simd.md:
12381 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
12382 conditional on TARGET_AES.
12383 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
12384 (aarch64_crypto_sha1hsi): Make pattern conditional
12385 on TARGET_SHA2.
12386 (aarch64_crypto_sha1hv4si): Ditto.
12387 (aarch64_be_crypto_sha1hv4si): Ditto.
12388 (aarch64_crypto_sha1su1v4si): Ditto.
12389 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
12390 (aarch64_crypto_sha1su0v4si): Ditto.
12391 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
12392 (aarch64_crypto_sha256su0v4si): Ditto.
12393 (aarch64_crypto_sha256su1v4si): Ditto.
12394 (doc/invoke.texi): Document new aes and sha2 options.
12395
12396 2018-01-10 Martin Sebor <msebor@redhat.com>
12397
12398 PR tree-optimization/83781
12399 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
12400 as string arrays.
12401
12402 2018-01-11 Martin Sebor <msebor@gmail.com>
12403 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12404
12405 PR tree-optimization/83501
12406 PR tree-optimization/81703
12407
12408 * tree-ssa-strlen.c (get_string_cst): Rename...
12409 (get_string_len): ...to this. Handle global constants.
12410 (handle_char_store): Adjust.
12411
12412 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
12413 Jim Wilson <jimw@sifive.com>
12414
12415 * config/riscv/riscv-protos.h (riscv_output_return): New.
12416 * config/riscv/riscv.c (struct machine_function): New naked_p field.
12417 (riscv_attribute_table, riscv_output_return),
12418 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
12419 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
12420 (riscv_compute_frame_info): Only compute frame->mask if not a naked
12421 function.
12422 (riscv_expand_prologue): Add early return for naked function.
12423 (riscv_expand_epilogue): Likewise.
12424 (riscv_function_ok_for_sibcall): Return false for naked function.
12425 (riscv_set_current_function): New.
12426 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
12427 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
12428 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
12429 * doc/extend.texi (RISC-V Function Attributes): New.
12430
12431 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
12432
12433 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
12434 check for 128-bit long double before checking TCmode.
12435 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
12436 128-bit long doubles before checking TFmode or TCmode.
12437 (FLOAT128_IBM_P): Likewise.
12438
12439 2018-01-10 Martin Sebor <msebor@redhat.com>
12440
12441 PR tree-optimization/83671
12442 * builtins.c (c_strlen): Unconditionally return zero for the empty
12443 string.
12444 Use -Warray-bounds for warnings.
12445 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
12446 for non-constant array indices with COMPONENT_REF, arrays of
12447 arrays, and pointers to arrays.
12448 (gimple_fold_builtin_strlen): Determine and set length range for
12449 non-constant character arrays.
12450
12451 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
12452
12453 PR middle-end/81897
12454 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
12455 empty blocks.
12456
12457 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
12458
12459 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
12460
12461 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
12462
12463 PR target/83399
12464 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
12465 VECTOR_MEM_ALTIVEC_OR_VSX_P.
12466 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
12467 indexed_or_indirect_operand predicate.
12468 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
12469 (*vsx_le_perm_load_v8hi): Likewise.
12470 (*vsx_le_perm_load_v16qi): Likewise.
12471 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
12472 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
12473 (*vsx_le_perm_store_v8hi): Likewise.
12474 (*vsx_le_perm_store_v16qi): Likewise.
12475 (eight unnamed splitters): Likewise.
12476
12477 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
12478
12479 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
12480 * config/rs6000/emmintrin.h: Likewise.
12481 * config/rs6000/mmintrin.h: Likewise.
12482 * config/rs6000/xmmintrin.h: Likewise.
12483
12484 2018-01-10 David Malcolm <dmalcolm@redhat.com>
12485
12486 PR c++/43486
12487 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
12488 "public_flag".
12489 * tree.c (tree_nop_conversion): Return true for location wrapper
12490 nodes.
12491 (maybe_wrap_with_location): New function.
12492 (selftest::check_strip_nops): New function.
12493 (selftest::test_location_wrappers): New function.
12494 (selftest::tree_c_tests): Call it.
12495 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
12496 (maybe_wrap_with_location): New decl.
12497 (EXPR_LOCATION_WRAPPER_P): New macro.
12498 (location_wrapper_p): New inline function.
12499 (tree_strip_any_location_wrapper): New inline function.
12500
12501 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
12502
12503 PR target/83735
12504 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
12505 stack_realign_offset for the largest alignment of stack slot
12506 actually used.
12507 (ix86_find_max_used_stack_alignment): New function.
12508 (ix86_finalize_stack_frame_flags): Use it. Set
12509 max_used_stack_alignment if we don't realign stack.
12510 * config/i386/i386.h (machine_function): Add
12511 max_used_stack_alignment.
12512
12513 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
12514
12515 * config/arm/arm.opt (-mbranch-cost): New option.
12516 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
12517 account.
12518
12519 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
12520
12521 PR target/83629
12522 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
12523 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
12524
12525 2018-01-10 Richard Biener <rguenther@suse.de>
12526
12527 PR debug/83765
12528 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
12529 early out so it also covers the case where we have a non-NULL
12530 origin.
12531
12532 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
12533
12534 PR tree-optimization/83753
12535 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
12536 for non-strided grouped accesses if the number of elements is 1.
12537
12538 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
12539
12540 PR target/81616
12541 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
12542 * i386.h (TARGET_USE_GATHER): Define.
12543 * x86-tune.def (X86_TUNE_USE_GATHER): New.
12544
12545 2018-01-10 Martin Liska <mliska@suse.cz>
12546
12547 PR bootstrap/82831
12548 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
12549 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
12550 partitioning.
12551 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
12552 CLEANUP_NO_PARTITIONING is not set.
12553
12554 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
12555
12556 * doc/rtl.texi: Remove documentation of (const ...) wrappers
12557 for vectors, as a partial revert of r254296.
12558 * rtl.h (const_vec_p): Delete.
12559 (const_vec_duplicate_p): Don't test for vector CONSTs.
12560 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
12561 * expmed.c (make_tree): Likewise.
12562
12563 Revert:
12564 * common.md (E, F): Use CONSTANT_P instead of checking for
12565 CONST_VECTOR.
12566 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
12567 checking for CONST_VECTOR.
12568
12569 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
12570
12571 PR middle-end/83575
12572 * predict.c (force_edge_cold): Handle in more sane way edges
12573 with no prediction.
12574
12575 2018-01-09 Carl Love <cel@us.ibm.com>
12576
12577 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
12578 V4SI, V4SF types.
12579 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
12580 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
12581 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
12582 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
12583 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
12584 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
12585 * config/rs6000/rs6000-protos.h: Add extern defition for
12586 rs6000_generate_float2_double_code.
12587 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
12588 function.
12589 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
12590 (float2_v2df): Add define_expand.
12591
12592 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
12593
12594 PR target/83628
12595 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
12596 op_mode in the force_to_mode call.
12597
12598 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
12599
12600 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
12601 instead of checking each element individually.
12602 (aarch64_evpc_uzp): Likewise.
12603 (aarch64_evpc_zip): Likewise.
12604 (aarch64_evpc_ext): Likewise.
12605 (aarch64_evpc_rev): Likewise.
12606 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
12607 instead of checking each element individually. Return true without
12608 generating rtl if
12609 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
12610 whether all selected elements come from the same input, instead of
12611 checking each element individually. Remove calls to gen_rtx_REG,
12612 start_sequence and end_sequence and instead assert that no rtl is
12613 generated.
12614
12615 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
12616
12617 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
12618 order of HIGH and CONST checks.
12619
12620 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
12621
12622 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
12623 if the destination isn't an SSA_NAME.
12624
12625 2018-01-09 Richard Biener <rguenther@suse.de>
12626
12627 PR tree-optimization/83668
12628 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
12629 move prologue...
12630 (canonicalize_loop_form): ... here, renamed from ...
12631 (canonicalize_loop_closed_ssa_form): ... this and amended to
12632 swap successor edges for loop exit blocks to make us use
12633 the RPO order we need for initial schedule generation.
12634
12635 2018-01-09 Joseph Myers <joseph@codesourcery.com>
12636
12637 PR tree-optimization/64811
12638 * match.pd: When optimizing comparisons with Inf, avoid
12639 introducing or losing exceptions from comparisons with NaN.
12640
12641 2018-01-09 Martin Liska <mliska@suse.cz>
12642
12643 PR sanitizer/82517
12644 * asan.c (shadow_mem_size): Add gcc_assert.
12645
12646 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
12647
12648 Don't save registers in main().
12649
12650 PR target/83738
12651 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
12652 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
12653 * config/avr/avr.c (avr_set_current_function): Don't error if
12654 naked, OS_task or OS_main are specified at the same time.
12655 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
12656 OS_main.
12657 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
12658 attribute.
12659 * common/config/avr/avr-common.c (avr_option_optimization_table):
12660 Switch on -mmain-is-OS_task for optimizing compilations.
12661
12662 2018-01-09 Richard Biener <rguenther@suse.de>
12663
12664 PR tree-optimization/83572
12665 * graphite.c: Include cfganal.h.
12666 (graphite_transform_loops): Connect infinite loops to exit
12667 and remove fake edges at the end.
12668
12669 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
12670
12671 * ipa-inline.c (edge_badness): Revert accidental checkin.
12672
12673 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
12674
12675 PR ipa/80763
12676 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
12677 symbols; not inline clones.
12678
12679 2018-01-09 Jakub Jelinek <jakub@redhat.com>
12680
12681 PR target/83507
12682 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
12683 hard registers. Formatting fixes.
12684
12685 PR preprocessor/83722
12686 * gcc.c (try_generate_repro): Pass
12687 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
12688 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
12689 do_report_bug.
12690
12691 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
12692 Kito Cheng <kito.cheng@gmail.com>
12693
12694 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
12695 (riscv_leaf_function_p): Delete.
12696 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
12697
12698 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12699
12700 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
12701 function.
12702 (do_ifelse): New function.
12703 (do_isel): New function.
12704 (do_sub3): New function.
12705 (do_add3): New function.
12706 (do_load_mask_compare): New function.
12707 (do_overlap_load_compare): New function.
12708 (expand_compare_loop): New function.
12709 (expand_block_compare): Call expand_compare_loop() when appropriate.
12710 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
12711 option description.
12712 (-mblock-compare-inline-loop-limit): New option.
12713
12714 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12715
12716 PR target/83677
12717 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
12718 Reverse order of second and third operands in first alternative.
12719 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
12720 of first and second elements in UNSPEC_VPERMR vector.
12721 (altivec_expand_vec_perm_le): Likewise.
12722
12723 2018-01-08 Jeff Law <law@redhat.com>
12724
12725 PR rtl-optimizatin/81308
12726 * tree-switch-conversion.c (cfg_altered): New file scoped static.
12727 (process_switch): If group_case_labels makes a change, then set
12728 cfg_altered.
12729 (pass_convert_switch::execute): If a switch is converted, then
12730 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
12731
12732 PR rtl-optimization/81308
12733 * recog.c (split_all_insns): Conditionally cleanup the CFG after
12734 splitting insns.
12735
12736 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
12737
12738 PR target/83663 - Revert r255946
12739 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
12740 generation for cases where splatting a value is not useful.
12741 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
12742 across a vec_duplicate and a paradoxical subreg forming a vector
12743 mode to a vec_concat.
12744
12745 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12746
12747 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
12748 -march=armv8.3-a variants.
12749 * config/arm/t-multilib: Likewise.
12750 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
12751
12752 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12753
12754 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
12755 to generate rtl.
12756 (cceq_ior_compare_complement): Give it a name so I can use it, and
12757 change boolean_or_operator predicate to boolean_operator so it can
12758 be used to generate a crand.
12759 (eqne): New code iterator.
12760 (bd/bd_neg): New code_attrs.
12761 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
12762 a single define_insn.
12763 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
12764 decrement (bdnzt/bdnzf/bdzt/bdzf).
12765 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
12766 with the new names of the branch decrement patterns, and added the
12767 names of the branch decrement conditional patterns.
12768
12769 2018-01-08 Richard Biener <rguenther@suse.de>
12770
12771 PR tree-optimization/83563
12772 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
12773 cache.
12774
12775 2018-01-08 Richard Biener <rguenther@suse.de>
12776
12777 PR middle-end/83713
12778 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
12779
12780 2018-01-08 Richard Biener <rguenther@suse.de>
12781
12782 PR tree-optimization/83685
12783 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
12784 references to abnormals.
12785
12786 2018-01-08 Richard Biener <rguenther@suse.de>
12787
12788 PR lto/83719
12789 * dwarf2out.c (output_indirect_strings): Handle empty
12790 skeleton_debug_str_hash.
12791 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
12792
12793 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
12794
12795 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
12796 (emit_store_direct): Likewise.
12797 (arc_trampoline_adjust_address): Likewise.
12798 (arc_asm_trampoline_template): New function.
12799 (arc_initialize_trampoline): Use asm_trampoline_template.
12800 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
12801 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
12802 * config/arc/arc.md (flush_icache): Delete pattern.
12803
12804 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
12805
12806 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
12807 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
12808 munaligned-access.
12809
12810 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
12811
12812 PR target/83681
12813 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
12814 by not USED_FOR_TARGET.
12815 (make_pass_resolve_sw_modes): Likewise.
12816
12817 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
12818
12819 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
12820 USED_FOR_TARGET.
12821
12822 2018-01-08 Richard Biener <rguenther@suse.de>
12823
12824 PR middle-end/83580
12825 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
12826
12827 2018-01-08 Richard Biener <rguenther@suse.de>
12828
12829 PR middle-end/83517
12830 * match.pd ((t * 2) / 2) -> t): Add missing :c.
12831
12832 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
12833
12834 PR middle-end/81897
12835 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
12836 basic blocks with a small number of successors.
12837 (convert_control_dep_chain_into_preds): Improve handling of
12838 forwarder blocks.
12839 (dump_predicates): Split apart into...
12840 (dump_pred_chain): ...here...
12841 (dump_pred_info): ...and here.
12842 (can_one_predicate_be_invalidated_p): Add debugging printfs.
12843 (can_chain_union_be_invalidated_p): Improve check for invalidation
12844 of paths.
12845 (uninit_uses_cannot_happen): Avoid unnecessary if
12846 convert_control_dep_chain_into_preds yielded nothing.
12847
12848 2018-01-06 Martin Sebor <msebor@redhat.com>
12849
12850 PR tree-optimization/83640
12851 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
12852 subtracting negative offset from size.
12853 (builtin_access::overlap): Adjust offset bounds of the access to fall
12854 within the size of the object if possible.
12855
12856 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
12857
12858 PR rtl-optimization/83699
12859 * expmed.c (extract_bit_field_1): Restrict the vector usage of
12860 extract_bit_field_as_subreg to cases in which the extracted
12861 value is also a vector.
12862
12863 * lra-constraints.c (process_alt_operands): Test for the equivalence
12864 substitutions when detecting a possible reload cycle.
12865
12866 2018-01-06 Jakub Jelinek <jakub@redhat.com>
12867
12868 PR debug/83480
12869 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
12870 by default if flag_selective_schedling{,2}. Formatting fixes.
12871
12872 PR rtl-optimization/83682
12873 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
12874 if it has non-VECTOR_MODE element mode.
12875 (vec_duplicate_p): Likewise.
12876
12877 PR middle-end/83694
12878 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
12879 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
12880
12881 2018-01-05 Jakub Jelinek <jakub@redhat.com>
12882
12883 PR target/83604
12884 * config/i386/i386-builtin.def
12885 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
12886 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
12887 Require also OPTION_MASK_ISA_AVX512F in addition to
12888 OPTION_MASK_ISA_GFNI.
12889 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
12890 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
12891 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
12892 to OPTION_MASK_ISA_GFNI.
12893 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
12894 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
12895 OPTION_MASK_ISA_AVX512BW.
12896 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
12897 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
12898 addition to OPTION_MASK_ISA_GFNI.
12899 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
12900 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
12901 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
12902 to OPTION_MASK_ISA_GFNI.
12903 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
12904 a requirement for all ISAs rather than any of them with a few
12905 exceptions.
12906 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
12907 processing.
12908 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
12909 bitmasks to be enabled with 3 exceptions, instead of requiring any
12910 enabled ISA with lots of exceptions.
12911 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
12912 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
12913 Change avx512bw in isa attribute to avx512f.
12914 * config/i386/sgxintrin.h: Add license boilerplate.
12915 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
12916 to __AVX512F__ and __AVX512VL to __AVX512VL__.
12917 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
12918 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
12919 defined.
12920 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
12921 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
12922 temporarily sse2 rather than sse if not enabled already.
12923
12924 PR target/83604
12925 * config/i386/sse.md (VI248_VLBW): Rename to ...
12926 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
12927 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
12928 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
12929 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
12930 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
12931 mode iterator instead of VI248_VLBW.
12932
12933 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
12934
12935 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
12936 (record_modified): Skip clobbers; add debug output.
12937 (param_change_prob): Use sreal frequencies.
12938
12939 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
12940
12941 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
12942 punt for user-aligned variables.
12943
12944 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
12945
12946 * tree-chrec.c (chrec_contains_symbols): Return true for
12947 POLY_INT_CST.
12948
12949 2018-01-05 Sudakshina Das <sudi.das@arm.com>
12950
12951 PR target/82439
12952 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
12953 of (x|y) == x for BICS pattern.
12954
12955 2018-01-05 Jakub Jelinek <jakub@redhat.com>
12956
12957 PR tree-optimization/83605
12958 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
12959 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
12960 can throw.
12961
12962 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
12963
12964 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
12965 * config/epiphany/rtems.h: New file.
12966
12967 2018-01-04 Jakub Jelinek <jakub@redhat.com>
12968 Uros Bizjak <ubizjak@gmail.com>
12969
12970 PR target/83554
12971 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
12972 QIreg_operand instead of register_operand predicate.
12973 * config/i386/i386.c (ix86_rop_should_change_byte_p,
12974 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
12975 comments instead of -fmitigate[-_]rop.
12976
12977 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12978
12979 PR bootstrap/81926
12980 * cgraphunit.c (symbol_table::compile): Switch to text_section
12981 before calling assembly_start debug hook.
12982 * run-rtl-passes.c (run_rtl_passes): Likewise.
12983 Include output.h.
12984
12985 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12986
12987 * tree-vrp.c (extract_range_from_binary_expr_1): Check
12988 range_int_cst_p rather than !symbolic_range_p before calling
12989 extract_range_from_multiplicative_op_1.
12990
12991 2018-01-04 Jeff Law <law@redhat.com>
12992
12993 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
12994 redundant test in assertion.
12995
12996 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
12997
12998 * doc/rtl.texi: Document machine_mode wrapper classes.
12999
13000 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13001
13002 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
13003 using tree_to_uhwi.
13004
13005 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13006
13007 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
13008 the VEC_PERM_EXPR fold to fail.
13009
13010 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13011
13012 PR debug/83585
13013 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
13014 to switched_sections.
13015
13016 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13017
13018 PR target/83680
13019 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
13020 test for d.testing.
13021
13022 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
13023
13024 PR target/83387
13025 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
13026 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
13027
13028 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13029
13030 PR debug/83666
13031 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
13032 is BLKmode and bitpos not zero or mode change is needed.
13033
13034 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
13035
13036 PR target/83675
13037 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
13038 TARGET_VIS2.
13039
13040 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
13041
13042 PR target/83628
13043 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
13044 instead of MULT rtx. Update all corresponding splitters.
13045 (*saddl_se): Ditto.
13046 (*ssub<modesuffix>): Ditto.
13047 (*ssubl_se): Ditto.
13048 (*cmp_sadd_di): Update split patterns.
13049 (*cmp_sadd_si): Ditto.
13050 (*cmp_sadd_sidi): Ditto.
13051 (*cmp_ssub_di): Ditto.
13052 (*cmp_ssub_si): Ditto.
13053 (*cmp_ssub_sidi): Ditto.
13054 * config/alpha/predicates.md (const23_operand): New predicate.
13055 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
13056 Look for ASHIFT, not MULT inner operand.
13057 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
13058
13059 2018-01-04 Martin Liska <mliska@suse.cz>
13060
13061 PR gcov-profile/83669
13062 * gcov.c (output_intermediate_file): Add version to intermediate
13063 gcov file.
13064 * doc/gcov.texi: Document new field 'version' in intermediate
13065 file format. Fix location of '-k' option of gcov command.
13066
13067 2018-01-04 Martin Liska <mliska@suse.cz>
13068
13069 PR ipa/82352
13070 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
13071
13072 2018-01-04 Jakub Jelinek <jakub@redhat.com>
13073
13074 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
13075
13076 2018-01-03 Martin Sebor <msebor@redhat.com>
13077
13078 PR tree-optimization/83655
13079 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
13080 checking calls with invalid arguments.
13081
13082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13083
13084 * tree-vect-stmts.c (vect_get_store_rhs): New function.
13085 (vectorizable_mask_load_store): Delete.
13086 (vectorizable_call): Return false for masked loads and stores.
13087 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
13088 instead of gimple_assign_rhs1.
13089 (vectorizable_load): Handle IFN_MASK_LOAD.
13090 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
13091
13092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13093
13094 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
13095 split out from..,
13096 (vectorizable_mask_load_store): ...here.
13097 (vectorizable_load): ...and here.
13098
13099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13100
13101 * tree-vect-stmts.c (vect_build_all_ones_mask)
13102 (vect_build_zero_merge_argument): New functions, split out from...
13103 (vectorizable_load): ...here.
13104
13105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13106
13107 * tree-vect-stmts.c (vect_check_store_rhs): New function,
13108 split out from...
13109 (vectorizable_mask_load_store): ...here.
13110 (vectorizable_store): ...and here.
13111
13112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13113
13114 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
13115 split out from...
13116 (vectorizable_mask_load_store): ...here.
13117
13118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13119
13120 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
13121 (vect_model_store_cost): Take a vec_load_store_type instead of a
13122 vect_def_type.
13123 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
13124 (vect_model_store_cost): Take a vec_load_store_type instead of a
13125 vect_def_type.
13126 (vectorizable_mask_load_store): Update accordingly.
13127 (vectorizable_store): Likewise.
13128 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
13129
13130 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13131
13132 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
13133 IFN_MASK_LOAD calls here rather than...
13134 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
13135
13136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13137 Alan Hayward <alan.hayward@arm.com>
13138 David Sherwood <david.sherwood@arm.com>
13139
13140 * expmed.c (extract_bit_field_1): For vector extracts,
13141 fall back to extract_bit_field_as_subreg if vec_extract
13142 isn't available.
13143
13144 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13145 Alan Hayward <alan.hayward@arm.com>
13146 David Sherwood <david.sherwood@arm.com>
13147
13148 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
13149 they are variable or constant sized.
13150 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
13151 slots for constant-sized data.
13152
13153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13154 Alan Hayward <alan.hayward@arm.com>
13155 David Sherwood <david.sherwood@arm.com>
13156
13157 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
13158 handling COND_EXPRs with boolean comparisons, try to find a better
13159 basis for the mask type than the boolean itself.
13160
13161 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13162
13163 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
13164 is calculated and how it can be overridden.
13165 * genmodes.c (max_bitsize_mode_any_mode): New variable.
13166 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
13167 if defined.
13168 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
13169 if nonzero.
13170
13171 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13172 Alan Hayward <alan.hayward@arm.com>
13173 David Sherwood <david.sherwood@arm.com>
13174
13175 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
13176 Remove the mode argument.
13177 (aarch64_simd_valid_immediate): Remove the mode and inverse
13178 arguments.
13179 * config/aarch64/iterators.md (bitsize): New iterator.
13180 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
13181 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
13182 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
13183 aarch64_simd_valid_immediate.
13184 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
13185 (aarch64_reg_or_bic_imm): Likewise.
13186 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
13187 with an insn_type enum and msl with a modifier_type enum.
13188 Replace element_width with a scalar_mode. Change the shift
13189 to unsigned int. Add constructors for scalar_float_mode and
13190 scalar_int_mode elements.
13191 (aarch64_vect_float_const_representable_p): Delete.
13192 (aarch64_can_const_movi_rtx_p)
13193 (aarch64_simd_scalar_immediate_valid_for_move)
13194 (aarch64_simd_make_constant): Update call to
13195 aarch64_simd_valid_immediate.
13196 (aarch64_advsimd_valid_immediate_hs): New function.
13197 (aarch64_advsimd_valid_immediate): Likewise.
13198 (aarch64_simd_valid_immediate): Remove mode and inverse
13199 arguments. Rewrite to use the above. Use const_vec_duplicate_p
13200 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
13201 and aarch64_float_const_representable_p on the result.
13202 (aarch64_output_simd_mov_immediate): Remove mode argument.
13203 Update call to aarch64_simd_valid_immediate and use of
13204 simd_immediate_info.
13205 (aarch64_output_scalar_simd_mov_immediate): Update call
13206 accordingly.
13207
13208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13209 Alan Hayward <alan.hayward@arm.com>
13210 David Sherwood <david.sherwood@arm.com>
13211
13212 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
13213 (mode_nunits): Likewise CONST_MODE_NUNITS.
13214 * machmode.def (ADJUST_NUNITS): Document.
13215 * genmodes.c (mode_data::need_nunits_adj): New field.
13216 (blank_mode): Update accordingly.
13217 (adj_nunits): New variable.
13218 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
13219 parameter.
13220 (emit_mode_size_inline): Set need_bytesize_adj for all modes
13221 listed in adj_nunits.
13222 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
13223 listed in adj_nunits. Don't emit case statements for such modes.
13224 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
13225 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
13226 nothing if adj_nunits is nonnull.
13227 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
13228 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
13229 (emit_mode_fbit): Update use of print_maybe_const_decl.
13230 (emit_move_size): Likewise. Treat the array as non-const
13231 if adj_nunits.
13232 (emit_mode_adjustments): Handle adj_nunits.
13233
13234 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13235
13236 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
13237 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
13238 (VECTOR_MODES): Use it.
13239 (make_vector_modes): Take the prefix as an argument.
13240
13241 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13242 Alan Hayward <alan.hayward@arm.com>
13243 David Sherwood <david.sherwood@arm.com>
13244
13245 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
13246 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
13247 for MODE_VECTOR_BOOL.
13248 * machmode.def (VECTOR_BOOL_MODE): Document.
13249 * genmodes.c (VECTOR_BOOL_MODE): New macro.
13250 (make_vector_bool_mode): New function.
13251 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
13252 MODE_VECTOR_BOOL.
13253 * lto-streamer-in.c (lto_input_mode_table): Likewise.
13254 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
13255 Likewise.
13256 * stor-layout.c (int_mode_for_mode): Likewise.
13257 * tree.c (build_vector_type_for_mode): Likewise.
13258 * varasm.c (output_constant_pool_2): Likewise.
13259 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
13260 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
13261 for MODE_VECTOR_BOOL.
13262 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
13263 of mode class checks.
13264 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
13265 instead of a list of mode class checks.
13266 (expand_vector_scalar_condition): Likewise.
13267 (type_for_widest_vector_mode): Handle BImode as an inner mode.
13268
13269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13270 Alan Hayward <alan.hayward@arm.com>
13271 David Sherwood <david.sherwood@arm.com>
13272
13273 * machmode.h (mode_size): Change from unsigned short to
13274 poly_uint16_pod.
13275 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
13276 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13277 or if measurement_type is not polynomial.
13278 (fixed_size_mode::includes_p): Check for constant-sized modes.
13279 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
13280 return a poly_uint16 rather than an unsigned short.
13281 (emit_mode_size): Change the type of mode_size from unsigned short
13282 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
13283 (emit_mode_adjustments): Cope with polynomial vector sizes.
13284 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13285 for GET_MODE_SIZE.
13286 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13287 for GET_MODE_SIZE.
13288 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
13289 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
13290 * caller-save.c (setup_save_areas): Likewise.
13291 (replace_reg_with_saved_mem): Likewise.
13292 * calls.c (emit_library_call_value_1): Likewise.
13293 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
13294 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
13295 (gen_lowpart_for_combine): Likewise.
13296 * convert.c (convert_to_integer_1): Likewise.
13297 * cse.c (equiv_constant, cse_insn): Likewise.
13298 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
13299 (cselib_subst_to_values): Likewise.
13300 * dce.c (word_dce_process_block): Likewise.
13301 * df-problems.c (df_word_lr_mark_ref): Likewise.
13302 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
13303 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
13304 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
13305 (rtl_for_decl_location): Likewise.
13306 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
13307 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
13308 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
13309 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
13310 (expand_expr_real_1): Likewise.
13311 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
13312 (pad_below): Likewise.
13313 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13314 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
13315 * ira.c (get_subreg_tracking_sizes): Likewise.
13316 * ira-build.c (ira_create_allocno_objects): Likewise.
13317 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
13318 (ira_sort_regnos_for_alter_reg): Likewise.
13319 * ira-costs.c (record_operand_costs): Likewise.
13320 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
13321 (resolve_simple_move): Likewise.
13322 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
13323 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
13324 (lra_constraints): Likewise.
13325 (CONST_POOL_OK_P): Reject variable-sized modes.
13326 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
13327 (add_pseudo_to_slot, lra_spill): Likewise.
13328 * omp-low.c (omp_clause_aligned_alignment): Likewise.
13329 * optabs-query.c (get_best_extraction_insn): Likewise.
13330 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13331 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
13332 (expand_mult_highpart, valid_multiword_target_p): Likewise.
13333 * recog.c (offsettable_address_addr_space_p): Likewise.
13334 * regcprop.c (maybe_mode_change): Likewise.
13335 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
13336 * regrename.c (build_def_use): Likewise.
13337 * regstat.c (dump_reg_info): Likewise.
13338 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
13339 (find_reloads, find_reloads_subreg_address): Likewise.
13340 * reload1.c (eliminate_regs_1): Likewise.
13341 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
13342 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
13343 (simplify_binary_operation_1, simplify_subreg): Likewise.
13344 * targhooks.c (default_function_arg_padding): Likewise.
13345 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
13346 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
13347 (verify_gimple_assign_ternary): Likewise.
13348 * tree-inline.c (estimate_move_cost): Likewise.
13349 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13350 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
13351 (get_address_cost_ainc): Likewise.
13352 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
13353 (vect_supportable_dr_alignment): Likewise.
13354 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13355 (vectorizable_reduction): Likewise.
13356 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
13357 (vectorizable_operation, vectorizable_load): Likewise.
13358 * tree.c (build_same_sized_truth_vector_type): Likewise.
13359 * valtrack.c (cleanup_auto_inc_dec): Likewise.
13360 * var-tracking.c (emit_note_insn_var_location): Likewise.
13361 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
13362 (ADDR_VEC_ALIGN): Likewise.
13363
13364 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13365 Alan Hayward <alan.hayward@arm.com>
13366 David Sherwood <david.sherwood@arm.com>
13367
13368 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
13369 unsigned short.
13370 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
13371 or if measurement_type is polynomial.
13372 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
13373 * combine.c (make_extraction): Likewise.
13374 * dse.c (find_shift_sequence): Likewise.
13375 * dwarf2out.c (mem_loc_descriptor): Likewise.
13376 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
13377 (extract_bit_field, extract_low_bits): Likewise.
13378 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
13379 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
13380 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
13381 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
13382 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
13383 * reload.c (find_reloads): Likewise.
13384 * reload1.c (alter_reg): Likewise.
13385 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
13386 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
13387 * tree-if-conv.c (predicate_mem_writes): Likewise.
13388 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
13389 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
13390 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
13391 * valtrack.c (dead_debug_insert_temp): Likewise.
13392 * varasm.c (mergeable_constant_section): Likewise.
13393 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
13394
13395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13396 Alan Hayward <alan.hayward@arm.com>
13397 David Sherwood <david.sherwood@arm.com>
13398
13399 * expr.c (expand_assignment): Cope with polynomial mode sizes
13400 when assigning to a CONCAT.
13401
13402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13403 Alan Hayward <alan.hayward@arm.com>
13404 David Sherwood <david.sherwood@arm.com>
13405
13406 * machmode.h (mode_precision): Change from unsigned short to
13407 poly_uint16_pod.
13408 (mode_to_precision): Return a poly_uint16 rather than an unsigned
13409 short.
13410 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
13411 or if measurement_type is not polynomial.
13412 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
13413 in which the mode is already known to be a scalar_int_mode.
13414 * genmodes.c (emit_mode_precision): Change the type of mode_precision
13415 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
13416 initializer.
13417 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13418 for GET_MODE_PRECISION.
13419 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13420 for GET_MODE_PRECISION.
13421 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
13422 as polynomial.
13423 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
13424 (expand_field_assignment, make_extraction): Likewise.
13425 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
13426 (get_last_value): Likewise.
13427 * convert.c (convert_to_integer_1): Likewise.
13428 * cse.c (cse_insn): Likewise.
13429 * expr.c (expand_expr_real_1): Likewise.
13430 * lra-constraints.c (simplify_operand_subreg): Likewise.
13431 * optabs-query.c (can_atomic_load_p): Likewise.
13432 * optabs.c (expand_atomic_load): Likewise.
13433 (expand_atomic_store): Likewise.
13434 * ree.c (combine_reaching_defs): Likewise.
13435 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
13436 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
13437 * tree.h (type_has_mode_precision_p): Likewise.
13438 * ubsan.c (instrument_si_overflow): Likewise.
13439
13440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13441 Alan Hayward <alan.hayward@arm.com>
13442 David Sherwood <david.sherwood@arm.com>
13443
13444 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
13445 polynomial numbers of units.
13446 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
13447 (valid_vector_subparts_p): New function.
13448 (build_vector_type): Remove temporary shim and take the number
13449 of units as a poly_uint64 rather than an int.
13450 (build_opaque_vector_type): Take the number of units as a
13451 poly_uint64 rather than an int.
13452 * tree.c (build_vector_from_ctor): Handle polynomial
13453 TYPE_VECTOR_SUBPARTS.
13454 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
13455 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
13456 (build_vector_from_val): If the number of units is variable,
13457 use build_vec_duplicate_cst for constant operands and
13458 VEC_DUPLICATE_EXPR otherwise.
13459 (make_vector_type): Remove temporary is_constant ().
13460 (build_vector_type, build_opaque_vector_type): Take the number of
13461 units as a poly_uint64 rather than an int.
13462 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
13463 VECTOR_CST_NELTS.
13464 * cfgexpand.c (expand_debug_expr): Likewise.
13465 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
13466 (store_constructor, expand_expr_real_1): Likewise.
13467 (const_scalar_mask_from_tree): Likewise.
13468 * fold-const-call.c (fold_const_reduction): Likewise.
13469 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
13470 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
13471 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
13472 (fold_relational_const): Likewise.
13473 (native_interpret_vector): Likewise. Change the size from an
13474 int to an unsigned int.
13475 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
13476 TYPE_VECTOR_SUBPARTS.
13477 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
13478 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
13479 duplicating a non-constant operand into a variable-length vector.
13480 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
13481 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
13482 * ipa-icf.c (sem_variable::equals): Likewise.
13483 * match.pd: Likewise.
13484 * omp-simd-clone.c (simd_clone_subparts): Likewise.
13485 * print-tree.c (print_node): Likewise.
13486 * stor-layout.c (layout_type): Likewise.
13487 * targhooks.c (default_builtin_vectorization_cost): Likewise.
13488 * tree-cfg.c (verify_gimple_comparison): Likewise.
13489 (verify_gimple_assign_binary): Likewise.
13490 (verify_gimple_assign_ternary): Likewise.
13491 (verify_gimple_assign_single): Likewise.
13492 * tree-pretty-print.c (dump_generic_node): Likewise.
13493 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13494 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
13495 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
13496 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
13497 (vect_shift_permute_load_chain): Likewise.
13498 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
13499 (expand_vector_condition, optimize_vector_constructor): Likewise.
13500 (lower_vec_perm, get_compute_type): Likewise.
13501 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13502 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
13503 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
13504 (vect_recog_mask_conversion_pattern): Likewise.
13505 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
13506 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
13507 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13508 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
13509 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
13510 (vectorizable_shift, vectorizable_operation, vectorizable_store)
13511 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
13512 (supportable_widening_operation): Likewise.
13513 (supportable_narrowing_operation): Likewise.
13514 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
13515 Likewise.
13516 * varasm.c (output_constant): Likewise.
13517
13518 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13519 Alan Hayward <alan.hayward@arm.com>
13520 David Sherwood <david.sherwood@arm.com>
13521
13522 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
13523 so that both the length == 3 and length != 3 cases set up their
13524 own permute vectors. Add comments explaining why we know the
13525 number of elements is constant.
13526 (vect_permute_load_chain): Likewise.
13527
13528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13529 Alan Hayward <alan.hayward@arm.com>
13530 David Sherwood <david.sherwood@arm.com>
13531
13532 * machmode.h (mode_nunits): Change from unsigned char to
13533 poly_uint16_pod.
13534 (ONLY_FIXED_SIZE_MODES): New macro.
13535 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
13536 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
13537 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
13538 New typedefs.
13539 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
13540 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
13541 or if measurement_type is not polynomial.
13542 * genmodes.c (ZERO_COEFFS): New macro.
13543 (emit_mode_nunits_inline): Make mode_nunits_inline return a
13544 poly_uint16.
13545 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
13546 Use ZERO_COEFFS when emitting initializers.
13547 * data-streamer.h (bp_pack_poly_value): New function.
13548 (bp_unpack_poly_value): Likewise.
13549 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
13550 for GET_MODE_NUNITS.
13551 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
13552 for GET_MODE_NUNITS.
13553 * tree.c (make_vector_type): Remove temporary shim and make
13554 the real function take the number of units as a poly_uint64
13555 rather than an int.
13556 (build_vector_type_for_mode): Handle polynomial nunits.
13557 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
13558 * emit-rtl.c (const_vec_series_p_1): Likewise.
13559 (gen_rtx_CONST_VECTOR): Likewise.
13560 * fold-const.c (test_vec_duplicate_folding): Likewise.
13561 * genrecog.c (validate_pattern): Likewise.
13562 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
13563 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
13564 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
13565 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
13566 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
13567 * rtlanal.c (subreg_get_info): Likewise.
13568 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13569 (vect_grouped_load_supported): Likewise.
13570 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
13571 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
13572 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
13573 (simplify_const_unary_operation, simplify_binary_operation_1)
13574 (simplify_const_binary_operation, simplify_ternary_operation)
13575 (test_vector_ops_duplicate, test_vector_ops): Likewise.
13576 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
13577 instead of CONST_VECTOR_NUNITS.
13578 * varasm.c (output_constant_pool_2): Likewise.
13579 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
13580 explicit-encoded elements in the XVEC for variable-length vectors.
13581
13582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13583
13584 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
13585
13586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13587 Alan Hayward <alan.hayward@arm.com>
13588 David Sherwood <david.sherwood@arm.com>
13589
13590 * coretypes.h (fixed_size_mode): Declare.
13591 (fixed_size_mode_pod): New typedef.
13592 * builtins.h (target_builtins::x_apply_args_mode)
13593 (target_builtins::x_apply_result_mode): Change type to
13594 fixed_size_mode_pod.
13595 * builtins.c (apply_args_size, apply_result_size, result_vector)
13596 (expand_builtin_apply_args_1, expand_builtin_apply)
13597 (expand_builtin_return): Update accordingly.
13598
13599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13600
13601 * cse.c (hash_rtx_cb): Hash only the encoded elements.
13602 * cselib.c (cselib_hash_rtx): Likewise.
13603 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
13604 CONST_VECTOR encoding.
13605
13606 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13607 Jeff Law <law@redhat.com>
13608
13609 PR target/83641
13610 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
13611 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
13612 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
13613 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
13614
13615 PR target/83641
13616 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
13617 explicitly probe *sp in a noreturn function if there were any callee
13618 register saves or frame pointer is needed.
13619
13620 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13621
13622 PR debug/83621
13623 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
13624 BLKmode for ternary, binary or unary expressions.
13625
13626 PR debug/83645
13627 * var-tracking.c (delete_vta_debug_insn): New inline function.
13628 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
13629 insns from get_insns () to NULL instead of each bb separately.
13630 Use delete_vta_debug_insn. No longer static.
13631 (vt_debug_insns_local, variable_tracking_main_1): Adjust
13632 delete_vta_debug_insns callers.
13633 * rtl.h (delete_vta_debug_insns): Declare.
13634 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
13635 instead of variable_tracking_main.
13636
13637 2018-01-03 Martin Sebor <msebor@redhat.com>
13638
13639 PR tree-optimization/83603
13640 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
13641 arguments past the endof the argument list in functions declared
13642 without a prototype.
13643 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
13644 Avoid checking when arguments are null.
13645
13646 2018-01-03 Martin Sebor <msebor@redhat.com>
13647
13648 PR c/83559
13649 * doc/extend.texi (attribute const): Fix a typo.
13650 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
13651 issuing -Wsuggest-attribute for void functions.
13652
13653 2018-01-03 Martin Sebor <msebor@redhat.com>
13654
13655 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
13656 offset_int::from instead of wide_int::to_shwi.
13657 (maybe_diag_overlap): Remove assertion.
13658 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
13659 * gimple-ssa-sprintf.c (format_directive): Same.
13660 (parse_directive): Same.
13661 (sprintf_dom_walker::compute_format_length): Same.
13662 (try_substitute_return_value): Same.
13663
13664 2018-01-03 Jeff Law <law@redhat.com>
13665
13666 PR middle-end/83654
13667 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
13668 non-constant residual for zero at runtime and avoid probing in
13669 that case. Reorganize code for trailing problem to mirror handling
13670 of the residual.
13671
13672 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13673
13674 PR tree-optimization/83501
13675 * tree-ssa-strlen.c (get_string_cst): New.
13676 (handle_char_store): Call get_string_cst.
13677
13678 2018-01-03 Martin Liska <mliska@suse.cz>
13679
13680 PR tree-optimization/83593
13681 * tree-ssa-strlen.c: Include tree-cfg.h.
13682 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
13683 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
13684 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
13685 to false.
13686 (strlen_dom_walker::before_dom_children): Call
13687 gimple_purge_dead_eh_edges. Dump tranformation with details
13688 dump flags.
13689 (strlen_dom_walker::before_dom_children): Update call by adding
13690 new argument cleanup_eh.
13691 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
13692
13693 2018-01-03 Martin Liska <mliska@suse.cz>
13694
13695 PR ipa/83549
13696 * cif-code.def (VARIADIC_THUNK): New enum value.
13697 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
13698 thunks.
13699
13700 2018-01-03 Jan Beulich <jbeulich@suse.com>
13701
13702 * sse.md (mov<mode>_internal): Tighten condition for when to use
13703 vmovdqu<ssescalarsize> for TI and OI modes.
13704
13705 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13706
13707 Update copyright years.
13708
13709 2018-01-03 Martin Liska <mliska@suse.cz>
13710
13711 PR ipa/83594
13712 * ipa-visibility.c (function_and_variable_visibility): Skip
13713 functions with noipa attribure.
13714
13715 2018-01-03 Jakub Jelinek <jakub@redhat.com>
13716
13717 * gcc.c (process_command): Update copyright notice dates.
13718 * gcov-dump.c (print_version): Ditto.
13719 * gcov.c (print_version): Ditto.
13720 * gcov-tool.c (print_version): Ditto.
13721 * gengtype.c (create_file): Ditto.
13722 * doc/cpp.texi: Bump @copying's copyright year.
13723 * doc/cppinternals.texi: Ditto.
13724 * doc/gcc.texi: Ditto.
13725 * doc/gccint.texi: Ditto.
13726 * doc/gcov.texi: Ditto.
13727 * doc/install.texi: Ditto.
13728 * doc/invoke.texi: Ditto.
13729
13730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13731
13732 * vector-builder.h (vector_builder::m_full_nelts): Change from
13733 unsigned int to poly_uint64.
13734 (vector_builder::full_nelts): Update prototype accordingly.
13735 (vector_builder::new_vector): Likewise.
13736 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
13737 (vector_builder::operator ==): Likewise.
13738 (vector_builder::finalize): Likewise.
13739 * int-vector-builder.h (int_vector_builder::int_vector_builder):
13740 Take the number of elements as a poly_uint64 rather than an
13741 unsigned int.
13742 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
13743 from unsigned int to poly_uint64.
13744 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
13745 (vec_perm_indices::new_vector): Likewise.
13746 (vec_perm_indices::length): Likewise.
13747 (vec_perm_indices::nelts_per_input): Likewise.
13748 (vec_perm_indices::input_nelts): Likewise.
13749 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
13750 number of elements per input as a poly_uint64 rather than an
13751 unsigned int. Use the original encoding for variable-length
13752 vectors, rather than clamping each individual element.
13753 For the second and subsequent elements in each pattern,
13754 clamp the step and base before clamping their sum.
13755 (vec_perm_indices::series_p): Handle polynomial element counts.
13756 (vec_perm_indices::all_in_range_p): Likewise.
13757 (vec_perm_indices_to_tree): Likewise.
13758 (vec_perm_indices_to_rtx): Likewise.
13759 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
13760 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
13761 (tree_vector_builder::new_binary_operation): Handle polynomial
13762 element counts. Return false if we need to know the number
13763 of elements at compile time.
13764 * fold-const.c (fold_vec_perm): Punt if the number of elements
13765 isn't known at compile time.
13766
13767 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13768
13769 * vec-perm-indices.h (vec_perm_builder): Change element type
13770 from HOST_WIDE_INT to poly_int64.
13771 (vec_perm_indices::element_type): Update accordingly.
13772 (vec_perm_indices::clamp): Handle polynomial element_types.
13773 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
13774 (vec_perm_indices::all_in_range_p): Likewise.
13775 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
13776 than shwi trees.
13777 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
13778 polynomial vec_perm_indices element types.
13779 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
13780 * fold-const.c (fold_vec_perm): Likewise.
13781 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
13782 * tree-vect-generic.c (lower_vec_perm): Likewise.
13783 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
13784 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
13785 element type to HOST_WIDE_INT.
13786
13787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13788 Alan Hayward <alan.hayward@arm.com>
13789 David Sherwood <david.sherwood@arm.com>
13790
13791 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
13792 rather than an int. Use plus_constant.
13793 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
13794 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
13795
13796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13797 Alan Hayward <alan.hayward@arm.com>
13798 David Sherwood <david.sherwood@arm.com>
13799
13800 * calls.c (emit_call_1, expand_call): Change struct_value_size from
13801 a HOST_WIDE_INT to a poly_int64.
13802
13803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13804 Alan Hayward <alan.hayward@arm.com>
13805 David Sherwood <david.sherwood@arm.com>
13806
13807 * calls.c (load_register_parameters): Cope with polynomial
13808 mode sizes. Require a constant size for BLKmode parameters
13809 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
13810 forces a parameter to be padded at the lsb end in order to
13811 fill a complete number of words, require the parameter size
13812 to be ordered wrt UNITS_PER_WORD.
13813
13814 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13815 Alan Hayward <alan.hayward@arm.com>
13816 David Sherwood <david.sherwood@arm.com>
13817
13818 * reload1.c (spill_stack_slot_width): Change element type
13819 from unsigned int to poly_uint64_pod.
13820 (alter_reg): Treat mode sizes as polynomial.
13821
13822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13823 Alan Hayward <alan.hayward@arm.com>
13824 David Sherwood <david.sherwood@arm.com>
13825
13826 * reload.c (complex_word_subreg_p): New function.
13827 (reload_inner_reg_of_subreg, push_reload): Use it.
13828
13829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13830 Alan Hayward <alan.hayward@arm.com>
13831 David Sherwood <david.sherwood@arm.com>
13832
13833 * lra-constraints.c (process_alt_operands): Reject matched
13834 operands whose sizes aren't ordered.
13835 (match_reload): Refer to this check here.
13836
13837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13838 Alan Hayward <alan.hayward@arm.com>
13839 David Sherwood <david.sherwood@arm.com>
13840
13841 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
13842 that the mode size is in the set {1, 2, 4, 8, 16}.
13843
13844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13845 Alan Hayward <alan.hayward@arm.com>
13846 David Sherwood <david.sherwood@arm.com>
13847
13848 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
13849 Use plus_constant instead of gen_rtx_PLUS.
13850
13851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13852 Alan Hayward <alan.hayward@arm.com>
13853 David Sherwood <david.sherwood@arm.com>
13854
13855 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
13856 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
13857 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
13858 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
13859 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
13860 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
13861 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
13862 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
13863 * config/i386/i386.c (ix86_push_rounding): ...this new function.
13864 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
13865 a poly_int64.
13866 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
13867 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
13868 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
13869 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
13870 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
13871 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
13872 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
13873 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
13874 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
13875 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
13876 function.
13877 * expr.c (emit_move_resolve_push): Treat the input and result
13878 of PUSH_ROUNDING as a poly_int64.
13879 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
13880 (emit_push_insn): Likewise.
13881 * lra-eliminations.c (mark_not_eliminable): Likewise.
13882 * recog.c (push_operand): Likewise.
13883 * reload1.c (elimination_effects): Likewise.
13884 * rtlanal.c (nonzero_bits1): Likewise.
13885 * calls.c (store_one_arg): Likewise. Require the padding to be
13886 known at compile time.
13887
13888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13889 Alan Hayward <alan.hayward@arm.com>
13890 David Sherwood <david.sherwood@arm.com>
13891
13892 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
13893 Use plus_constant instead of gen_rtx_PLUS.
13894
13895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13896 Alan Hayward <alan.hayward@arm.com>
13897 David Sherwood <david.sherwood@arm.com>
13898
13899 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
13900 rather than an int.
13901
13902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13903 Alan Hayward <alan.hayward@arm.com>
13904 David Sherwood <david.sherwood@arm.com>
13905
13906 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
13907 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
13908 via stack temporaries. Treat the mode size as polynomial too.
13909
13910 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13911 Alan Hayward <alan.hayward@arm.com>
13912 David Sherwood <david.sherwood@arm.com>
13913
13914 * expr.c (expand_expr_real_2): When handling conversions involving
13915 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
13916 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
13917 as a poly_uint64 too.
13918
13919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13920 Alan Hayward <alan.hayward@arm.com>
13921 David Sherwood <david.sherwood@arm.com>
13922
13923 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
13924
13925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13926 Alan Hayward <alan.hayward@arm.com>
13927 David Sherwood <david.sherwood@arm.com>
13928
13929 * combine.c (can_change_dest_mode): Handle polynomial
13930 REGMODE_NATURAL_SIZE.
13931 * expmed.c (store_bit_field_1): Likewise.
13932 * expr.c (store_constructor): Likewise.
13933 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
13934 and polynomial REGMODE_NATURAL_SIZE.
13935 (gen_lowpart_common): Likewise.
13936 * reginfo.c (record_subregs_of_mode): Likewise.
13937 * rtlanal.c (read_modify_subreg_p): Likewise.
13938
13939 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13940 Alan Hayward <alan.hayward@arm.com>
13941 David Sherwood <david.sherwood@arm.com>
13942
13943 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
13944 numbers of elements.
13945
13946 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13947 Alan Hayward <alan.hayward@arm.com>
13948 David Sherwood <david.sherwood@arm.com>
13949
13950 * match.pd: Cope with polynomial numbers of vector elements.
13951
13952 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13953 Alan Hayward <alan.hayward@arm.com>
13954 David Sherwood <david.sherwood@arm.com>
13955
13956 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
13957 in a POINTER_PLUS_EXPR.
13958
13959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13960 Alan Hayward <alan.hayward@arm.com>
13961 David Sherwood <david.sherwood@arm.com>
13962
13963 * omp-simd-clone.c (simd_clone_subparts): New function.
13964 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
13965 (ipa_simd_modify_function_body): Likewise.
13966
13967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13968 Alan Hayward <alan.hayward@arm.com>
13969 David Sherwood <david.sherwood@arm.com>
13970
13971 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
13972 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
13973 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
13974 (expand_vector_condition, vector_element): Likewise.
13975 (subparts_gt): New function.
13976 (get_compute_type): Use subparts_gt.
13977 (count_type_subparts): Delete.
13978 (expand_vector_operations_1): Use subparts_gt instead of
13979 count_type_subparts.
13980
13981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13982 Alan Hayward <alan.hayward@arm.com>
13983 David Sherwood <david.sherwood@arm.com>
13984
13985 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
13986 (vect_compile_time_alias): ...this new function. Do the calculation
13987 on poly_ints rather than trees.
13988 (vect_prune_runtime_alias_test_list): Update call accordingly.
13989
13990 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13991 Alan Hayward <alan.hayward@arm.com>
13992 David Sherwood <david.sherwood@arm.com>
13993
13994 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
13995 numbers of units.
13996 (vect_schedule_slp_instance): Likewise.
13997
13998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
13999 Alan Hayward <alan.hayward@arm.com>
14000 David Sherwood <david.sherwood@arm.com>
14001
14002 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
14003 constant and extern definitions for variable-length vectors.
14004 (vect_get_constant_vectors): Note that the number of units
14005 is known to be constant.
14006
14007 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14008 Alan Hayward <alan.hayward@arm.com>
14009 David Sherwood <david.sherwood@arm.com>
14010
14011 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
14012 of units as polynomial. Choose between WIDE and NARROW based
14013 on multiple_p.
14014
14015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14016 Alan Hayward <alan.hayward@arm.com>
14017 David Sherwood <david.sherwood@arm.com>
14018
14019 * tree-vect-stmts.c (simd_clone_subparts): New function.
14020 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
14021
14022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14023 Alan Hayward <alan.hayward@arm.com>
14024 David Sherwood <david.sherwood@arm.com>
14025
14026 * tree-vect-stmts.c (vectorizable_call): Treat the number of
14027 vectors as polynomial. Use build_index_vector for
14028 IFN_GOMP_SIMD_LANE.
14029
14030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14031 Alan Hayward <alan.hayward@arm.com>
14032 David Sherwood <david.sherwood@arm.com>
14033
14034 * tree-vect-stmts.c (get_load_store_type): Treat the number of
14035 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
14036 for variable-length vectors.
14037 (vectorizable_mask_load_store): Treat the number of units as
14038 polynomial, asserting that it is constant if the condition has
14039 already been enforced.
14040 (vectorizable_store, vectorizable_load): Likewise.
14041
14042 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14043 Alan Hayward <alan.hayward@arm.com>
14044 David Sherwood <david.sherwood@arm.com>
14045
14046 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
14047 of units as polynomial. Punt if we can't tell at compile time
14048 which vector contains the final result.
14049
14050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14051 Alan Hayward <alan.hayward@arm.com>
14052 David Sherwood <david.sherwood@arm.com>
14053
14054 * tree-vect-loop.c (vectorizable_induction): Treat the number
14055 of units as polynomial. Punt on SLP inductions. Use an integer
14056 VEC_SERIES_EXPR for variable-length integer reductions. Use a
14057 cast of such a series for variable-length floating-point
14058 reductions.
14059
14060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14061 Alan Hayward <alan.hayward@arm.com>
14062 David Sherwood <david.sherwood@arm.com>
14063
14064 * tree.h (build_index_vector): Declare.
14065 * tree.c (build_index_vector): New function.
14066 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
14067 of units as polynomial, forcibly converting it to a constant if
14068 vectorizable_reduction has already enforced the condition.
14069 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
14070 to create a {1,2,3,...} vector.
14071 (vectorizable_reduction): Treat the number of units as polynomial.
14072 Choose vectype_in based on the largest scalar element size rather
14073 than the smallest number of units. Enforce the restrictions
14074 relied on above.
14075
14076 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14077 Alan Hayward <alan.hayward@arm.com>
14078 David Sherwood <david.sherwood@arm.com>
14079
14080 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
14081 number of units as polynomial.
14082
14083 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14084 Alan Hayward <alan.hayward@arm.com>
14085 David Sherwood <david.sherwood@arm.com>
14086
14087 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
14088 * target.def (autovectorize_vector_sizes): Return the vector sizes
14089 by pointer, using vector_sizes rather than a bitmask.
14090 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
14091 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
14092 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
14093 Likewise.
14094 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
14095 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
14096 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
14097 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
14098 * omp-general.c (omp_max_vf): Likewise.
14099 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14100 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
14101 * tree-vect-loop.c (vect_analyze_loop): Likewise.
14102 * tree-vect-slp.c (vect_slp_bb): Likewise.
14103 * doc/tm.texi: Regenerate.
14104 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
14105 to a poly_uint64.
14106 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
14107 the vector size as a poly_uint64 rather than an unsigned int.
14108 (current_vector_size): Change from an unsigned int to a poly_uint64.
14109 (get_vectype_for_scalar_type): Update accordingly.
14110 * tree.h (build_truth_vector_type): Take the size and number of
14111 units as a poly_uint64 rather than an unsigned int.
14112 (build_vector_type): Add a temporary overload that takes
14113 the number of units as a poly_uint64 rather than an unsigned int.
14114 * tree.c (make_vector_type): Likewise.
14115 (build_truth_vector_type): Take the number of units as a poly_uint64
14116 rather than an unsigned int.
14117
14118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14119 Alan Hayward <alan.hayward@arm.com>
14120 David Sherwood <david.sherwood@arm.com>
14121
14122 * target.def (get_mask_mode): Take the number of units and length
14123 as poly_uint64s rather than unsigned ints.
14124 * targhooks.h (default_get_mask_mode): Update accordingly.
14125 * targhooks.c (default_get_mask_mode): Likewise.
14126 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
14127 * doc/tm.texi: Regenerate.
14128
14129 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14130 Alan Hayward <alan.hayward@arm.com>
14131 David Sherwood <david.sherwood@arm.com>
14132
14133 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
14134 * omp-general.c (omp_max_vf): Likewise.
14135 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
14136 (expand_omp_simd): Handle polynomial safelen.
14137 * omp-low.c (omplow_simd_context): Add a default constructor.
14138 (omplow_simd_context::max_vf): Change from int to poly_uint64.
14139 (lower_rec_simd_input_clauses): Update accordingly.
14140 (lower_rec_input_clauses): Likewise.
14141
14142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14143 Alan Hayward <alan.hayward@arm.com>
14144 David Sherwood <david.sherwood@arm.com>
14145
14146 * tree-vectorizer.h (vect_nunits_for_cost): New function.
14147 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
14148 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
14149 (vect_analyze_slp_cost): Likewise.
14150 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
14151 (vect_model_load_cost): Likewise.
14152
14153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14154 Alan Hayward <alan.hayward@arm.com>
14155 David Sherwood <david.sherwood@arm.com>
14156
14157 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
14158 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
14159 from an unsigned int * to a poly_uint64_pod *.
14160 (calculate_unrolling_factor): New function.
14161 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
14162
14163 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14164 Alan Hayward <alan.hayward@arm.com>
14165 David Sherwood <david.sherwood@arm.com>
14166
14167 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
14168 from an unsigned int to a poly_uint64.
14169 (_loop_vec_info::slp_unrolling_factor): Likewise.
14170 (_loop_vec_info::vectorization_factor): Change from an int
14171 to a poly_uint64.
14172 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
14173 (vect_get_num_vectors): New function.
14174 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
14175 (vect_get_num_copies): Use vect_get_num_vectors.
14176 (vect_analyze_data_ref_dependences): Change max_vf from an int *
14177 to an unsigned int *.
14178 (vect_analyze_data_refs): Change min_vf from an int * to a
14179 poly_uint64 *.
14180 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14181 than an unsigned HOST_WIDE_INT.
14182 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
14183 (vect_analyze_data_ref_dependence): Change max_vf from an int *
14184 to an unsigned int *.
14185 (vect_analyze_data_ref_dependences): Likewise.
14186 (vect_compute_data_ref_alignment): Handle polynomial vf.
14187 (vect_enhance_data_refs_alignment): Likewise.
14188 (vect_prune_runtime_alias_test_list): Likewise.
14189 (vect_shift_permute_load_chain): Likewise.
14190 (vect_supportable_dr_alignment): Likewise.
14191 (dependence_distance_ge_vf): Take the vectorization factor as a
14192 poly_uint64 rather than an unsigned HOST_WIDE_INT.
14193 (vect_analyze_data_refs): Change min_vf from an int * to a
14194 poly_uint64 *.
14195 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
14196 vfm1 as a poly_uint64 rather than an int. Make the same change
14197 for the returned bound_scalar.
14198 (vect_gen_vector_loop_niters): Handle polynomial vf.
14199 (vect_do_peeling): Likewise. Update call to
14200 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
14201 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
14202 be constant.
14203 * tree-vect-loop.c (vect_determine_vectorization_factor)
14204 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
14205 (vect_get_known_peeling_cost): Likewise.
14206 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
14207 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
14208 (vect_transform_loop): Likewise. Use the lowest possible VF when
14209 updating the upper bounds of the loop.
14210 (vect_min_worthwhile_factor): Make static. Return an unsigned int
14211 rather than an int.
14212 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
14213 polynomial unroll factors.
14214 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
14215 (vect_make_slp_decision): Likewise.
14216 (vect_supported_load_permutation_p): Likewise, and polynomial
14217 vf too.
14218 (vect_analyze_slp_cost): Handle polynomial vf.
14219 (vect_slp_analyze_node_operations): Likewise.
14220 (vect_slp_analyze_bb_1): Likewise.
14221 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
14222 than an unsigned HOST_WIDE_INT.
14223 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
14224 (vectorizable_load): Handle polynomial vf.
14225 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
14226 a poly_uint64.
14227 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
14228
14229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14230 Alan Hayward <alan.hayward@arm.com>
14231 David Sherwood <david.sherwood@arm.com>
14232
14233 * match.pd: Handle bit operations involving three constants
14234 and try to fold one pair.
14235
14236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14237
14238 * tree-vect-loop-manip.c: Include gimple-fold.h.
14239 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
14240 niters_maybe_zero parameters. Handle other cases besides a step of 1.
14241 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
14242 Add a path that uses a step of VF instead of 1, but disable it
14243 for now.
14244 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
14245 and niters_no_overflow parameters. Update calls to
14246 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
14247 Create a new SSA name if the latter choses to use a ste other
14248 than zero, and return it via niters_vector_mult_vf_var.
14249 * tree-vect-loop.c (vect_transform_loop): Update calls to
14250 vect_do_peeling, vect_gen_vector_loop_niters and
14251 slpeel_make_loop_iterate_ntimes.
14252 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
14253 (vect_gen_vector_loop_niters): Update declarations after above changes.
14254
14255 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
14256
14257 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
14258 128-bit round to integer instructions.
14259 (ceil<mode>2): Likewise.
14260 (btrunc<mode>2): Likewise.
14261 (round<mode>2): Likewise.
14262
14263 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14264
14265 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
14266 unaligned VSX load/store on P8/P9.
14267 (expand_block_clear): Allow the use of unaligned VSX
14268 load/store on P8/P9.
14269
14270 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14271
14272 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
14273 New function.
14274 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
14275 swap associated with both a load and a store.
14276
14277 2018-01-02 Andrew Waterman <andrew@sifive.com>
14278
14279 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
14280 * config/riscv/riscv.md (clear_cache): Use it.
14281
14282 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
14283
14284 * web.c: Remove out-of-date comment.
14285
14286 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14287
14288 * expr.c (fixup_args_size_notes): Check that any existing
14289 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
14290 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
14291 (emit_single_push_insn): ...here.
14292
14293 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14294
14295 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
14296 (const_vector_encoded_nelts): New function.
14297 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
14298 (const_vector_int_elt, const_vector_elt): Declare.
14299 * emit-rtl.c (const_vector_int_elt_1): New function.
14300 (const_vector_elt): Likewise.
14301 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
14302 of CONST_VECTOR_ELT.
14303
14304 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14305
14306 * expr.c: Include rtx-vector-builder.h.
14307 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
14308 directly on the tree encoding.
14309 (const_vector_from_tree): Likewise.
14310 * optabs.c: Include rtx-vector-builder.h.
14311 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
14312 sequence of "u" values.
14313 * vec-perm-indices.c: Include rtx-vector-builder.h.
14314 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
14315 directly on the vec_perm_indices encoding.
14316
14317 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14318
14319 * doc/rtl.texi (const_vector): Describe new encoding scheme.
14320 * Makefile.in (OBJS): Add rtx-vector-builder.o.
14321 * rtx-vector-builder.h: New file.
14322 * rtx-vector-builder.c: Likewise.
14323 * rtl.h (rtx_def::u2): Add a const_vector field.
14324 (CONST_VECTOR_NPATTERNS): New macro.
14325 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
14326 (CONST_VECTOR_DUPLICATE_P): Likewise.
14327 (CONST_VECTOR_STEPPED_P): Likewise.
14328 (CONST_VECTOR_ENCODED_ELT): Likewise.
14329 (const_vec_duplicate_p): Check for a duplicated vector encoding.
14330 (unwrap_const_vec_duplicate): Likewise.
14331 (const_vec_series_p): Check for a non-duplicated vector encoding.
14332 Say that the function only returns true for integer vectors.
14333 * emit-rtl.c: Include rtx-vector-builder.h.
14334 (gen_const_vec_duplicate_1): Delete.
14335 (gen_const_vector): Call gen_const_vec_duplicate instead of
14336 gen_const_vec_duplicate_1.
14337 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
14338 (gen_const_vec_duplicate): Use rtx_vector_builder.
14339 (gen_const_vec_series): Likewise.
14340 (gen_rtx_CONST_VECTOR): Likewise.
14341 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
14342 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14343 Build a new vector rather than modifying a CONST_VECTOR in-place.
14344 (handle_special_swappables): Update call accordingly.
14345 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
14346 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
14347 Build a new vector rather than modifying a CONST_VECTOR in-place.
14348 (handle_special_swappables): Update call accordingly.
14349
14350 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14351
14352 * simplify-rtx.c (simplify_const_binary_operation): Use
14353 CONST_VECTOR_ELT instead of XVECEXP.
14354
14355 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14356
14357 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
14358 the selector elements to be different from the data elements
14359 if the selector is a VECTOR_CST.
14360 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
14361 ssizetype for the selector.
14362
14363 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14364
14365 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
14366 before testing each element individually.
14367 * tree-vect-generic.c (lower_vec_perm): Likewise.
14368
14369 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14370
14371 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
14372 * selftest-run-tests.c (selftest::run_tests): Call it.
14373 * vector-builder.h (vector_builder::operator ==): New function.
14374 (vector_builder::operator !=): Likewise.
14375 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
14376 (vec_perm_indices::all_from_input_p): New function.
14377 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14378 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
14379 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
14380 instead of reading the VECTOR_CST directly. Detect whether both
14381 vector inputs are the same before constructing the vec_perm_indices,
14382 and update the number of inputs argument accordingly. Use the
14383 utility functions added above. Only construct sel2 if we need to.
14384
14385 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14386
14387 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
14388 the broadcast of the low byte.
14389 (expand_mult_highpart): Use an explicit encoding for the permutes.
14390 * optabs-query.c (can_mult_highpart_p): Likewise.
14391 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
14392 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14393 (vectorizable_bswap): Likewise.
14394 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
14395 explicit encoding for the power-of-2 permutes.
14396 (vect_permute_store_chain): Likewise.
14397 (vect_grouped_load_supported): Likewise.
14398 (vect_permute_load_chain): Likewise.
14399
14400 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14401
14402 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
14403 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
14404 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
14405 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14406 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
14407 (vect_gen_perm_mask_any): Likewise.
14408
14409 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14410
14411 * int-vector-builder.h: New file.
14412 * vec-perm-indices.h: Include int-vector-builder.h.
14413 (vec_perm_indices): Redefine as an int_vector_builder.
14414 (auto_vec_perm_indices): Delete.
14415 (vec_perm_builder): Redefine as a stand-alone class.
14416 (vec_perm_indices::vec_perm_indices): New function.
14417 (vec_perm_indices::clamp): Likewise.
14418 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
14419 (vec_perm_indices::new_vector): New function.
14420 (vec_perm_indices::new_expanded_vector): Update for new
14421 vec_perm_indices class.
14422 (vec_perm_indices::rotate_inputs): New function.
14423 (vec_perm_indices::all_in_range_p): Operate directly on the
14424 encoded form, without computing elided elements.
14425 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
14426 encoding. Update for new vec_perm_indices class.
14427 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
14428 the given vec_perm_builder.
14429 (expand_vec_perm_var): Update vec_perm_builder constructor.
14430 (expand_mult_highpart): Use vec_perm_builder instead of
14431 auto_vec_perm_indices.
14432 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
14433 vec_perm_indices instead of auto_vec_perm_indices. Use a single
14434 or double series encoding as appropriate.
14435 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
14436 vec_perm_indices instead of auto_vec_perm_indices.
14437 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14438 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14439 (vect_permute_store_chain): Likewise.
14440 (vect_grouped_load_supported): Likewise.
14441 (vect_permute_load_chain): Likewise.
14442 (vect_shift_permute_load_chain): Likewise.
14443 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14444 (vect_transform_slp_perm_load): Likewise.
14445 (vect_schedule_slp_instance): Likewise.
14446 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14447 (vectorizable_mask_load_store): Likewise.
14448 (vectorizable_bswap): Likewise.
14449 (vectorizable_store): Likewise.
14450 (vectorizable_load): Likewise.
14451 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
14452 vec_perm_indices instead of auto_vec_perm_indices. Use
14453 tree_to_vec_perm_builder to read the vector from a tree.
14454 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
14455 vec_perm_builder instead of a vec_perm_indices.
14456 (have_whole_vector_shift): Use vec_perm_builder and
14457 vec_perm_indices instead of auto_vec_perm_indices. Leave the
14458 truncation to calc_vec_perm_mask_for_shift.
14459 (vect_create_epilog_for_reduction): Likewise.
14460 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
14461 from auto_vec_perm_indices to vec_perm_indices.
14462 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14463 instead of changing individual elements.
14464 (aarch64_vectorize_vec_perm_const): Use new_vector to install
14465 the vector in d.perm.
14466 * config/arm/arm.c (expand_vec_perm_d::perm): Change
14467 from auto_vec_perm_indices to vec_perm_indices.
14468 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
14469 instead of changing individual elements.
14470 (arm_vectorize_vec_perm_const): Use new_vector to install
14471 the vector in d.perm.
14472 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
14473 Update vec_perm_builder constructor.
14474 (rs6000_expand_interleave): Likewise.
14475 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
14476 (rs6000_expand_interleave): Likewise.
14477
14478 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14479
14480 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
14481 to qimode could truncate the indices.
14482 * optabs.c (expand_vec_perm_var): Likewise.
14483
14484 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14485
14486 * Makefile.in (OBJS): Add vec-perm-indices.o.
14487 * vec-perm-indices.h: New file.
14488 * vec-perm-indices.c: Likewise.
14489 * target.h (vec_perm_indices): Replace with a forward class
14490 declaration.
14491 (auto_vec_perm_indices): Move to vec-perm-indices.h.
14492 * optabs.h: Include vec-perm-indices.h.
14493 (expand_vec_perm): Delete.
14494 (selector_fits_mode_p, expand_vec_perm_var): Declare.
14495 (expand_vec_perm_const): Declare.
14496 * target.def (vec_perm_const_ok): Replace with...
14497 (vec_perm_const): ...this new hook.
14498 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
14499 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
14500 * doc/tm.texi: Regenerate.
14501 * optabs.def (vec_perm_const): Delete.
14502 * doc/md.texi (vec_perm_const): Likewise.
14503 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
14504 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
14505 expand_vec_perm for constant permutation vectors. Assert that
14506 the mode of variable permutation vectors is the integer equivalent
14507 of the mode that is being permuted.
14508 * optabs-query.h (selector_fits_mode_p): Declare.
14509 * optabs-query.c: Include vec-perm-indices.h.
14510 (selector_fits_mode_p): New function.
14511 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
14512 is defined, instead of checking whether the vec_perm_const_optab
14513 exists. Use targetm.vectorize.vec_perm_const instead of
14514 targetm.vectorize.vec_perm_const_ok. Check whether the indices
14515 fit in the vector mode before using a variable permute.
14516 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
14517 vec_perm_indices instead of an rtx.
14518 (expand_vec_perm): Replace with...
14519 (expand_vec_perm_const): ...this new function. Take the selector
14520 as a vec_perm_indices rather than an rtx. Also take the mode of
14521 the selector. Update call to shift_amt_for_vec_perm_mask.
14522 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
14523 Use vec_perm_indices::new_expanded_vector to expand the original
14524 selector into bytes. Check whether the indices fit in the vector
14525 mode before using a variable permute.
14526 (expand_vec_perm_var): Make global.
14527 (expand_mult_highpart): Use expand_vec_perm_const.
14528 * fold-const.c: Includes vec-perm-indices.h.
14529 * tree-ssa-forwprop.c: Likewise.
14530 * tree-vect-data-refs.c: Likewise.
14531 * tree-vect-generic.c: Likewise.
14532 * tree-vect-loop.c: Likewise.
14533 * tree-vect-slp.c: Likewise.
14534 * tree-vect-stmts.c: Likewise.
14535 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
14536 Delete.
14537 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
14538 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
14539 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
14540 (aarch64_vectorize_vec_perm_const): ...this new function.
14541 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14542 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14543 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
14544 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
14545 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14546 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14547 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
14548 into...
14549 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
14550 check for NEON modes.
14551 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
14552 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
14553 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
14554 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
14555 into...
14556 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
14557 the old VEC_PERM_CONST conditions.
14558 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
14559 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
14560 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
14561 (ia64_vectorize_vec_perm_const_ok): Merge into...
14562 (ia64_vectorize_vec_perm_const): ...this new function.
14563 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
14564 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
14565 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
14566 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
14567 * config/mips/mips.c (mips_expand_vec_perm_const)
14568 (mips_vectorize_vec_perm_const_ok): Merge into...
14569 (mips_vectorize_vec_perm_const): ...this new function.
14570 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
14571 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
14572 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
14573 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
14574 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
14575 (rs6000_expand_vec_perm_const): Delete.
14576 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
14577 Delete.
14578 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14579 (altivec_expand_vec_perm_const_le): Take each operand individually.
14580 Operate on constant selectors rather than rtxes.
14581 (altivec_expand_vec_perm_const): Likewise. Update call to
14582 altivec_expand_vec_perm_const_le.
14583 (rs6000_expand_vec_perm_const): Delete.
14584 (rs6000_vectorize_vec_perm_const_ok): Delete.
14585 (rs6000_vectorize_vec_perm_const): New function.
14586 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14587 an element count and rtx array.
14588 (rs6000_expand_extract_even): Update call accordingly.
14589 (rs6000_expand_interleave): Likewise.
14590 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
14591 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
14592 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
14593 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
14594 (rs6000_expand_vec_perm_const): Delete.
14595 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
14596 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14597 (altivec_expand_vec_perm_const_le): Take each operand individually.
14598 Operate on constant selectors rather than rtxes.
14599 (altivec_expand_vec_perm_const): Likewise. Update call to
14600 altivec_expand_vec_perm_const_le.
14601 (rs6000_expand_vec_perm_const): Delete.
14602 (rs6000_vectorize_vec_perm_const_ok): Delete.
14603 (rs6000_vectorize_vec_perm_const): New function. Remove stray
14604 reference to the SPE evmerge intructions.
14605 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
14606 an element count and rtx array.
14607 (rs6000_expand_extract_even): Update call accordingly.
14608 (rs6000_expand_interleave): Likewise.
14609 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
14610 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
14611 new function.
14612 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
14613
14614 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14615
14616 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
14617 vector mode and that that mode matches the mode of the data
14618 being permuted.
14619 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
14620 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
14621 directly using expand_vec_perm_1 when forcing selectors into
14622 registers.
14623 (expand_vec_perm_var): New function, split out from expand_vec_perm.
14624
14625 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14626
14627 * optabs-query.h (can_vec_perm_p): Delete.
14628 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
14629 * optabs-query.c (can_vec_perm_p): Split into...
14630 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
14631 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
14632 particular selector is valid.
14633 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14634 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14635 (vect_grouped_load_supported): Likewise.
14636 (vect_shift_permute_load_chain): Likewise.
14637 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
14638 (vect_transform_slp_perm_load): Likewise.
14639 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14640 (vectorizable_bswap): Likewise.
14641 (vect_gen_perm_mask_checked): Likewise.
14642 * fold-const.c (fold_ternary_loc): Likewise. Don't take
14643 implementations of variable permutation vectors into account
14644 when deciding which selector to use.
14645 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
14646 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
14647 with a false third argument.
14648 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
14649 to test whether the constant selector is valid and can_vec_perm_var_p
14650 to test whether a variable selector is valid.
14651
14652 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14653
14654 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
14655 * optabs-query.c (can_vec_perm_p): Likewise.
14656 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
14657 instead of vec_perm_indices.
14658 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
14659 (vect_gen_perm_mask_checked): Likewise,
14660 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
14661 (vect_gen_perm_mask_checked): Likewise,
14662
14663 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
14664
14665 * optabs-query.h (qimode_for_vec_perm): Declare.
14666 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
14667 (qimode_for_vec_perm): ...this new function.
14668 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
14669
14670 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
14671
14672 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
14673 does not have a conditional at the top.
14674
14675 2018-01-02 Richard Biener <rguenther@suse.de>
14676
14677 * ipa-inline.c (big_speedup_p): Fix expression.
14678
14679 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
14680
14681 PR target/81616
14682 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
14683 for generic 4->6.
14684
14685 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
14686
14687 PR target/81616
14688 Generic tuning.
14689 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
14690 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
14691 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
14692 cond_taken_branch_cost 3->4.
14693
14694 2018-01-01 Jakub Jelinek <jakub@redhat.com>
14695
14696 PR tree-optimization/83581
14697 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
14698 TODO_cleanup_cfg if any changes have been made.
14699
14700 PR middle-end/83608
14701 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
14702 convert_modes if target mode has the right side, but different mode
14703 class.
14704
14705 PR middle-end/83609
14706 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14707 last argument when extracting from CONCAT. If either from_real or
14708 from_imag is NULL, use expansion through memory. If result is not
14709 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
14710 the parts directly to inner mode, if even that fails, use expansion
14711 through memory.
14712
14713 PR middle-end/83623
14714 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
14715 check for bswap in mode rather than HImode and use that in expand_unop
14716 too.
14717 \f
14718 Copyright (C) 2018 Free Software Foundation, Inc.
14719
14720 Copying and distribution of this file, with or without modification,
14721 are permitted in any medium without royalty provided the copyright
14722 notice and this notice are preserved.