gcov: add new option -t that prints output to stdout (PR gcov-profile/84846).
[gcc.git] / gcc / ChangeLog
1 2018-05-18 Martin Liska <mliska@suse.cz>
2
3 PR gcov-profile/84846
4 * doc/gcov.texi: Document -t option of gcov tool.
5
6 2018-05-18 Martin Liska <mliska@suse.cz>
7
8 PR gcov-profile/84846
9 * gcov.c (print_usage): Add new -t option.
10 (process_args): Handle the option.
11 (generate_results): Use stdout as output when requested by
12 the option.
13
14 2018-05-18 Martin Liska <mliska@suse.cz>
15
16 PR gcov-profile/84846
17 * coverage.c (coverage_init): Write PWD to .gcno file.
18 * doc/gcov.texi: Document how working directory is printed.
19 * gcov-dump.c (dump_gcov_file): Print PWD.
20 * gcov.c (output_intermediate_file): Likewise.
21 (read_graph_file): Read PWD string.
22 (output_lines): Print PWD.
23
24 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25
26 PR middle-end/85817
27 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
28 for retval and return false if all args to phi are zero.
29
30 2018-05-18 Richard Biener <rguenther@suse.de>
31
32 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
33 method.
34 (evrp_dom_walker::before_dom_children): Call it.
35
36 2018-05-18 Richard Biener <rguenther@suse.de>
37
38 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
39 results when processing array refs with variable index.
40
41 2018-05-18 Toon Moene <toon@moene.org>
42
43 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
44 directly after that of -floop-interchange. Indicate that both
45 options are enabled by default when specifying -O3.
46
47 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
48
49 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
50 iterator. Delete separate integer-mode vec_set<mode> expander.
51 (aarch64_simd_vec_setv2di): Delete.
52 (vec_setv2di): Delete.
53 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
54 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
55 the "w, r" alternative.
56
57 2018-05-18 Martin Liska <mliska@suse.cz>
58
59 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
60 * tree-pass.h (make_pass_lower_switch_O0): New function.
61 * tree-switch-conversion.c (node_has_low_bound): Remove.
62 (node_has_high_bound): Likewise.
63 (node_is_bounded): Likewise.
64 (class pass_lower_switch): Make it a template type and create
65 two instances.
66 (pass_lower_switch::execute): Add template argument.
67 (make_pass_lower_switch): New function.
68 (make_pass_lower_switch_O0): New function.
69 (do_jump_if_equal): Remove.
70 (emit_case_nodes): Simplify to just handle all 3 cases and leave
71 all the hard work to tree optimization passes.
72
73 2018-05-18 Martin Liska <mliska@suse.cz>
74
75 * dbgcnt.c (limit_low): Renamed from limit.
76 (limit_high): New variable.
77 (dbg_cnt_is_enabled): Check for upper limit.
78 (dbg_cnt): Adjust dumping.
79 (dbg_cnt_set_limit_by_index): Add new argument for high
80 value.
81 (dbg_cnt_set_limit_by_name): Likewise.
82 (dbg_cnt_process_single_pair): Parse new format.
83 (dbg_cnt_process_opt): Use strtok.
84 (dbg_cnt_list_all_counters): Remove 'value' and add
85 'limit_high'.
86 * doc/invoke.texi: Document changes.
87
88 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
89
90 * doc/sourcebuild.texi (scalar_all_fma): Document.
91 * tree.def (FMA_EXPR): Delete.
92 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
93 * internal-fn.c (ternary_direct): New macro.
94 (expand_ternary_optab_fn): Likewise.
95 (direct_ternary_optab_supported_p): Likewise.
96 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
97 * builtins.c (fold_builtin_fma): Delete.
98 (fold_builtin_3): Don't call it.
99 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
100 * expr.c (expand_expr_real_2): Likewise.
101 * fold-const.c (operand_equal_p): Likewise.
102 (fold_ternary_loc): Likewise.
103 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
104 * gimple.c (DEFTREECODE): Likewise.
105 * gimplify.c (gimplify_expr): Likewise.
106 * optabs-tree.c (optab_for_tree_code): Likewise.
107 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
108 * tree-eh.c (operation_could_trap_p): Likewise.
109 (stmt_could_throw_1_p): Likewise.
110 * tree-inline.c (estimate_operator_cost): Likewise.
111 * tree-pretty-print.c (dump_generic_node): Likewise.
112 (op_code_prio): Likewise.
113 * tree-ssa-loop-im.c (stmt_cost): Likewise.
114 * tree-ssa-operands.c (get_expr_operands): Likewise.
115 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
116 * fold-const-call.h (fold_fma): Delete.
117 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
118 CFN_FNMA and CFN_FNMS.
119 (fold_fma): Delete.
120 * genmatch.c (combined_fn): New enum.
121 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
122 (commutative_op): New function.
123 (commutate): Use it. Handle more than 2 operands.
124 (dt_operand::gen_gimple_expr): Use commutative_op.
125 (parser::parse_expr): Allow :c to be used with non-binary
126 operators if the commutative operand is known.
127 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
128 CFN_FMS, CFN_FNMA and CFN_FNMS.
129 (backprop::process_assign_use): Remove FMA_EXPR handling.
130 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
131 (gen_hsa_fma): New function.
132 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
133 IFN_FNMA and IFN_FNMS.
134 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
135 * gimple-fold.h (follow_all_ssa_edges): Declare.
136 * gimple-fold.c (follow_all_ssa_edges): New function.
137 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
138 gimple_build interface and use follow_all_ssa_edges to fold the result.
139 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
140 instead of checking for optabs directly.
141 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
142 rather than FMA_EXPRs.
143 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
144 call to IFN_FMA instead of an FMA_EXPR.
145
146 2018-05-17 Jim Wilson <jimw@sifive.com>
147
148 * expr.c (do_tablejump): When converting index to Pmode, if we have a
149 sign extended promoted subreg, and the range does not have the sign bit
150 set, then do a sign extend.
151
152 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
153 test, check for sign extended subreg and/or constant operands, and
154 do a sign extend in that case.
155
156 2018-05-17 Steve Ellcey <sellcey@cavium.com>
157
158 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
159 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
160 Add untyped.
161 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
162 Change logics_shift_reg to logics_shift_imm.
163 (thunderx2t99_fp_loadpair_basic): Delete.
164 (thunderx2t99_fp_storepair_basic): Delete.
165 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
166 (thunderx2t99_asimd_polynomial): Delete.
167 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
168 and neon_fp_mul_d_scalar_q.
169 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
170 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
171 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
172 (thunderx2t99_asimd_lut): Add missing tbl types.
173 (thunderx2t99_asimd_ext): Delete.
174 (thunderx2t99_asimd_load1_1_mult): Delete.
175 (thunderx2t99_asimd_load1_2_mult): Delete.
176 (thunderx2t99_asimd_load1_ldp): New.
177 (thunderx2t99_asimd_load1): New.
178 (thunderx2t99_asimd_load2): Add missing *load2* types.
179 (thunderx2t99_asimd_load3): New.
180 (thunderx2t99_asimd_load4): New.
181 (thunderx2t99_asimd_store1_1_mult): Delete.
182 (thunderx2t99_asimd_store1_2_mult): Delete.
183 (thunderx2t99_asimd_store2_mult): Delete.
184 (thunderx2t99_asimd_store2_onelane): Delete.
185 (thunderx2t99_asimd_store_stp): New.
186 (thunderx2t99_asimd_store1): New.
187 (thunderx2t99_asimd_store2): New.
188 (thunderx2t99_asimd_store3): New.
189 (thunderx2t99_asimd_store4): New.
190
191 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
192
193 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
194 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
195
196 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
197 Segher Boessenkool <segher@kernel.crashing.org>
198
199 PR target/85698
200 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
201 operand.
202
203 2018-05-17 Richard Biener <rguenther@suse.de>
204
205 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
206 for pruning loop and prune defs feeding only already visited PHIs.
207
208 2018-05-17 Richard Biener <rguenther@suse.de>
209
210 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
211
212 2018-05-17 Bin Cheng <bin.cheng@arm.com>
213 Richard Biener <rguenther@suse.de>
214
215 PR tree-optimization/85793
216 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
217 for VMAT_ELEMENTWISE.
218
219 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
220
221 * internal-fn.h (lookup_internal_fn): Declare
222 * internal-fn.c (lookup_internal_fn): New function.
223 * gimple.c (gimple_build_call_from_tree): Handle calls to
224 internal functions.
225 * gimple-pretty-print.c (dump_gimple_call): Print "." before
226 internal function names.
227 * tree-pretty-print.c (dump_generic_node): Likewise.
228 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
229
230 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
231
232 * gimple-fold.h (gimple_build): Make the function forms take
233 combined_fn rather than built_in_function.
234 (gimple_simplify): Likewise.
235 * gimple-match-head.c (gimple_simplify): Likewise.
236 * gimple-fold.c (gimple_build): Likewise.
237 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
238 rather than gimple_build_call_internal.
239 (get_initial_defs_for_reduction): Likewise.
240 (vect_create_epilog_for_reduction): Likewise.
241 (vectorizable_live_operation): Likewise.
242
243 2018-05-17 Martin Liska <mliska@suse.cz>
244
245 * gimple-ssa-sprintf.c (format_directive): Do not use
246 space in between 'G_' and '('.
247
248 2018-05-17 Jakub Jelinek <jakub@redhat.com>
249
250 PR target/85323
251 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
252 even if the mask is not all ones.
253
254 PR target/85323
255 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
256 vector.
257 (ix86_gimple_fold_builtin): Likewise.
258
259 PR target/85323
260 * config/i386/i386.c: Include tree-vector-builder.h.
261 (ix86_vector_shift_count): New function.
262 (ix86_fold_builtin): Fold shift builtins by scalar count.
263 (ix86_gimple_fold_builtin): Likewise.
264
265 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
266 _mm512_setzero): New intrinsics.
267
268 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
269 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
270
271 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
272 code generation for cases where splatting a value is not useful.
273 * simplify-rtx.c (simplify_ternary_operation): Simplify
274 vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
275 mode to a vec_concat.
276
277 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
278
279 * config.gcc: Support "goldmont-plus".
280 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
281 "goldmont-plus".
282 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
283 PROCESSOR_GOLDMONT_PLUS.
284 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
285 (processor_target_table): Add "goldmont-plus".
286 (PTA_GOLDMONT_PLUS): Define.
287 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
288 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
289 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
290 (fold_builtin_cpu): Add "goldmont-plus".
291 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
292 (ix86_option_override_internal): Add "goldmont-plus".
293 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
294 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
295 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
296 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
297
298 2018-05-17 Richard Biener <rguenther@suse.de>
299
300 PR tree-optimization/85757
301 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
302 remove defs that only feed that PHI from further processing.
303
304 2018-05-16 Jim Wilson <jimw@sifive.com>
305
306 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
307 asterisk to name.
308 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
309
310 2018-05-16 Mark Wielaard <mark@klomp.org>
311
312 * dwarf2out.c (count_index_strings): New function.
313 (output_indirect_strings): Call count_index_strings and generate
314 header for dwarf_version >= 5.
315
316 2018-05-16 Mark Wielaard <mark@klomp.org>
317
318 * dwarf2out.c (dwarf_FORM): New function.
319 (set_indirect_string): Use dwarf_FORM.
320 (reset_indirect_string): Likewise.
321 (size_of_die): Likewise.
322 (value_format): Likewise.
323 (output_die): Likewise.
324 (add_skeleton_AT_string): Likewise.
325 (output_macinfo_op): Likewise.
326 (index_string): Likewise.
327 (output_index_string_offset): Likewise.
328 (output_index_string): Likewise.
329 (count_index_strings): Likewise.
330
331 2018-05-16 Carl Love <cel@us.ibm.com>
332
333 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
334 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
335
336 2018-05-16 Martin Jambor <mjambor@suse.cz>
337
338 * ipa-prop.c (ipa_free_all_edge_args): Remove.
339 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
340
341 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
342
343 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
344 (fnma<mode>4): Likewise.
345 (fms<mode>4): Likewise.
346 (fnms<mode>4): Likewise.
347 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
348 (aarch64_fnma<mode>4): Likewise.
349 (aarch64_fms<mode>4): Likewise.
350 (aarch64_fnms<mode>4): Likewise.
351 (aarch64_fnmadd<mode>4): Likewise.
352
353 2018-05-16 Jason Merrill <jason@redhat.com>
354
355 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
356
357 2018-05-16 Richard Biener <rguenther@suse.de>
358
359 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
360 (dump_stmt_cost): Declare.
361 (add_stmt_cost): Dump cost we add.
362 (add_stmt_costs): New function.
363 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
364 No longer exported.
365 (vect_analyze_stmt): Adjust prototype.
366 (vectorizable_condition): Likewise.
367 (vectorizable_live_operation): Likewise.
368 (vectorizable_reduction): Likewise.
369 (vectorizable_induction): Likewise.
370 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
371 cost vector to pass to vectorizable_ and record afterwards.
372 (vect_model_reduction_cost): Take cost vector argument and adjust.
373 (vect_model_induction_cost): Likewise.
374 (vectorizable_reduction): Likewise.
375 (vectorizable_induction): Likewise.
376 (vectorizable_live_operation): Likewise.
377 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
378 SLP_TREE_NUMBER_OF_VEC_STMTS.
379 (vect_analyze_slp_cost_1): Remove.
380 (vect_analyze_slp_cost): Likewise.
381 (vect_slp_analyze_node_operations): Take visited args and
382 a target cost vector. Avoid processing already visited stmt sets.
383 (vect_slp_analyze_operations): Use a local cost vector to gather
384 costs and register those of non-discarded instances.
385 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
386 (vect_schedule_slp_instance): Remove copying of
387 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
388 zero.
389 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
390 adding cost. Record cost entry location.
391 (vect_prologue_cost_for_slp_op): Function to compute cost of
392 a constant or invariant generated for SLP vect in the prologue,
393 split out from vect_analyze_slp_cost_1.
394 (vect_model_simple_cost): Make static. Adjust for SLP costing.
395 (vect_model_promotion_demotion_cost): Likewise.
396 (vect_model_store_cost): Likewise, make static.
397 (vect_model_load_cost): Likewise.
398 (vectorizable_bswap): Add cost vector arg and adjust.
399 (vectorizable_call): Likewise.
400 (vectorizable_simd_clone_call): Likewise.
401 (vectorizable_conversion): Likewise.
402 (vectorizable_assignment): Likewise.
403 (vectorizable_shift): Likewise.
404 (vectorizable_operation): Likewise.
405 (vectorizable_store): Likewise.
406 (vectorizable_load): Likewise.
407 (vectorizable_condition): Likewise.
408 (vectorizable_comparison): Likewise.
409 (can_vectorize_live_stmts): Likewise.
410 (vect_analyze_stmt): Likewise.
411 (vect_transform_stmt): Adjust calls to vectorizable_*.
412 * tree-vectorizer.c: Include gimple-pretty-print.h.
413 (dump_stmt_cost): New function.
414
415 2018-05-16 Richard Biener <rguenther@suse.de>
416
417 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
418 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
419 * tree-ssa-dse.c: Include tree-ssa-loop.h.
420 (check_name): New callback.
421 (dse_classify_store): Track cycles via a visited bitmap of PHI
422 defs and simplify handling of in-loop and across loop dead stores
423 and properly fail for loop-variant refs. Handle byte-tracking with
424 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
425 limiting the walk.
426
427 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
428
429 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
430 (vect_get_mask_type_for_stmt): Likewise.
431 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
432 split out from...
433 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
434 to determine the statement's vector type and the vector type that
435 should be used for calculating nunits. Deal with cases in which
436 the type has to be deferred.
437 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
438 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
439 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
440 (vect_determine_vf_for_stmt): New functions, split out from...
441 (vect_determine_vectorization_factor): ...here.
442 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
443 (vect_get_mask_type_for_stmt): New functions, split out from
444 vect_determine_vectorization_factor.
445
446 2018-05-16 Richard Biener <rguenther@suse.de>
447
448 * tree-cfg.c (verify_gimple_assign_ternary): Properly
449 verify the [VEC_]COND_EXPR embedded comparison.
450
451 2018-05-15 Martin Sebor <msebor@redhat.com>
452
453 PR tree-optimization/85753
454 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
455 RECORD_TYPE in addition to ARRAY_TYPE.
456
457 2018-05-15 Martin Sebor <msebor@redhat.com>
458
459 PR middle-end/85643
460 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
461
462 2018-05-15 Richard Biener <rguenther@suse.de>
463
464 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
465 add by_clobber_p one. Change algorithm to collect all defs
466 representing uses we need to walk and try reducing them to
467 a single one before failing.
468 (dse_dom_walker::dse_optimize_stmt): Adjust.
469
470 2018-05-13 Mark Wielaard <mark@klomp.org>
471
472 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
473 (size_of_loc_descr): Likewise.
474 (output_loc_operands): Likewise.
475 (output_loc_operands_raw): Likewise.
476 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
477 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
478 (hash_loc_operands): Likewise.
479 (compare_loc_operands): Likewise.
480
481 2018-05-14 Mark Wielaard <mark@klomp.org>
482
483 * dwarf2out.c (count_index_addrs): New function.
484 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
485
486 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
487
488 PR tree-optimization/83648
489 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
490 return value as malloc candidate.
491
492 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
493
494 PR ipa/85734
495 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
496 as true in call to suggest_attribute.
497
498 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
499
500 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
501 -mreadonly-in-sdata.
502
503 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
504
505 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
506 New pattern.
507 (aarch64_crypto_aesd_fused): Likewise.
508
509 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
510
511 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
512 (movsi_aarch64): Likewise.
513 (load_pairsi): Likewise.
514 (load_pairdi): Likewise.
515 (store_pairsi): Likewise.
516 (store_pairdi): Likewise.
517 (load_pairsf): Likewise.
518 (load_pairdf): Likewise.
519 (store_pairsf): Likewise.
520 (store_pairdf): Likewise.
521 (zero_extend): Likewise.
522 (trunc): Swap alternatives.
523 (fcvt_target): Add '?' to prefer w over r.
524
525 2018-05-14 Jakub Jelinek <jakub@redhat.com>
526
527 PR target/85756
528 * config/i386/i386.md: Disallow non-commutative arithmetics in
529 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
530 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
531 in the peephole2 before it.
532
533 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
534
535 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
536 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
537 (ix86_handle_option): Handle -mcldemote.
538 * config.gcc: New header.
539 * config/i386/cldemoteintrin.h: New file.
540 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
541 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
542 -mcldemote.
543 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
544 OPTION_MASK_ISA_CLDEMOTE.
545 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
546 (ix86_valid_target_attribute_inner_p): Ditto.
547 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
548 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
549 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
550 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
551 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
552 (cldemote): New.
553 * config/i386/i386.opt: Add -mcldemote.
554 * config/i386/x86intrin.h: New header.
555 * doc/invoke.texi: Add -mcldemote.
556
557 2018-05-14 Richard Biener <rguenther@suse.de>
558
559 * doc/match-and-simplify.texi: Adjust :s documentation.
560
561 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
562
563 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
564 intended memcpy size.
565 (REORDER_45): Likewise.
566
567 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
568
569 * sort.cc: New file.
570 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
571 * vec.c (qsort_chk): Use gcc_qsort.
572 * Makefile.in (OBJS-libcommon): Add sort.o.
573 (build/sort.o): New target. Use it...
574 (BUILD_RTL): ... here, and...
575 (build/gencfn-macros): ... here, and...
576 (build/genmatch): ... here.
577
578 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
579 Chung-Ju Wu <jasonwucj@gmail.com>
580
581 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
582 * config/nds32/nds32-graywolf.md: New file.
583 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
584 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
585 pipeline.
586 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
587 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
588 * config/nds32/nds32.md (pipeline_model): Add graywolf.
589 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
590 * config/nds32/pipelines.md: Include n15 settings.
591
592 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
593 Chung-Ju Wu <jasonwucj@gmail.com>
594
595 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
596 * config/nds32/nds32-n13.md: New file.
597 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
598 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
599 pipeline.
600 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
601 * config/nds32/nds32.md (pipeline_model): Add n13.
602 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
603 * config/nds32/pipelines.md: Include n13 settings.
604
605 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
606 Chung-Ju Wu <jasonwucj@gmail.com>
607
608 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
609 * config/nds32/nds32-n10.md: New file.
610 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
611 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
612 pipeline.
613 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
614 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
615 * config/nds32/nds32.md (pipeline_model): Add n10.
616 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
617 * config/nds32/pipelines.md: Include n10 settings.
618
619 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
620 Kito Cheng <kito.cheng@gmail.com>
621 Chung-Ju Wu <jasonwucj@gmail.com>
622
623 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
624 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
625 Add enum values for DSP extension instructions.
626 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
627 New constraints.
628 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
629 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
630 New code iterators.
631 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
632 * config/nds32/nds32-dspext.md: New file for DSP implementation.
633 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
634 * config/nds32/nds32-intrinsic.md: Likewise.
635 * config/nds32/nds32_intrinsic.h: Likewise.
636 * config/nds32/nds32-md-auxiliary.c: Likewise.
637 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
638 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
639 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
640 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
641 * config/nds32/nds32-protos.h: New declarations for DSP extension.
642 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
643 TYPE_DMAC in switch statement.
644 * config/nds32/nds32.c: New checking and implementation for DSP
645 extension instructions.
646 * config/nds32/nds32.h: Likewise.
647 * config/nds32/nds32.md: Likewise.
648 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
649 * config/nds32/predicates.md: Implement new predicates for DSP
650 extension.
651
652 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
653
654 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
655 Reformat alternatives and attributes so it is easier to identify
656 which constraints/attributes go with which instruction.
657 (mov<mode>_hardfloat32, FMOVE64): Likewise.
658 (mov<mode>_softfloat32, FMOVE64): Likewise.
659 (mov<mode>_hardfloat64, FMOVE64): Likewise.
660 (mov<mode>_softfloat64, FMOVE64): Likewise.
661
662 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
663
664 * doc/extend.texi (PowerPC Built-in Functions): Rename this
665 subsection.
666 (Basic PowerPC Built-in Functions): The new name of the
667 subsection previously known as "PowerPC Built-in Functions".
668 (Basic PowerPC Built-in Functions Available on all Configurations):
669 New subsubsection.
670 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
671 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
672 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
673 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
674
675 2018-05-11 Martin Jambor <mjambor@suse.cz>
676
677 PR ipa/85655
678 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
679 single const.
680
681 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
682
683 PR target/85733
684 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
685
686 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
687
688 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
689 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
690 (ix86_handle_option): Handle -mwaitpkg.
691 * config.gcc: New header.
692 * config/i386/cpuid.h (bit_WAITPKG): New bit.
693 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
694 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
695 function type.
696 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
697 OPTION_MASK_ISA_WAITPKG.
698 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
699 (ix86_option_override_internal): Add PTA_WAITPKG.
700 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
701 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
702 IX86_BUILTIN_TPAUSE.
703 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
704 __builtin_ia32_umwait and __builtin_ia32_tpause.
705 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
706 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
707 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
708 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
709 UNSPECV_TPAUSE): New.
710 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
711 * config/i386/i386.opt: Add -mwaitpkg.
712 * config/i386/waitpkgintrin.h: New file.
713 * config/i386/x86intrin.h: New header.
714 * doc/invoke.texi: Add -mwaitpkg.
715
716 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
717
718 PR target/85606
719 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
720 equivalent.
721 (cortex-m0): Use armv6s-m isa.
722 (cortex-m0plus): Likewise.
723 (cortex-m1): Likewise.
724 (cortex-m0.small-multiply): Likewise.
725 (cortex-m0plus.small-multiply): Likewise.
726 (cortex-m1.small-multiply): Likewise.
727
728 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
729 Jakub Jelinek <jakub@redhat.com>
730
731 PR tree-optimization/85692
732 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
733 source permute as well.
734
735 2018-05-11 Martin Liska <mliska@suse.cz>
736
737 PR sanitizer/85556
738 * doc/extend.texi: Document LLVM style format for no_sanitize
739 attribute.
740
741 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
742
743 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
744 mode_supports_vsx_dform_quad to mode_supports_dq_form.
745 (mode_supports_vsx_dform_quad): Likewise.
746 (mode_supports_vmx_dform): Move these functions to be next to the
747 other mode_supports functions.
748 (mode_supports_dq_form): Likewise.
749 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
750 mode_supports_dq_form.
751 (reg_offset_addressing_ok_p): Likewise.
752 (offsettable_ok_by_alignment): Likewise.
753 (rs6000_legitimate_offset_address_p): Likewise.
754 (legitimate_lo_sum_address_p): Likewise.
755 (rs6000_legitimize_address): Likewise.
756 (rs6000_legitimize_reload_address): Likewise.
757 (rs6000_secondary_reload_inner): Likewise.
758 (rs6000_preferred_reload_class): Likewise.
759 (rs6000_output_move_128bit): Likewise.
760
761 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
762
763 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
764 Generate SImode target register for null target.
765 <case IX86_BUILTIN_XGETBV>: Ditto.
766 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
767 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
768
769 2018-05-10 Carl Love <cel@us.ibm.com>
770
771 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
772 dcbtt and dcbtstt if operands[2] is 0.
773
774 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
775
776 PR target/85693
777 * config/i386/sse.md (usadv64qi): New expander.
778
779 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
780
781 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
782 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
783 -maltivec=be support.
784 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
785 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
786 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
787 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
788 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
789 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
790 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
791 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
792 altivec_vsumsws): Adjust.
793 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
794 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
795 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
796 support.
797 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
798 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
799 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
800 (altivec_lve<VI_char>x): Delete expand.
801 (*altivec_lve<VI_char>x_internal): Rename to...
802 (altivec_lve<VI_char>x): ... this.
803 (altivec_lvxl_<mode>): Delete expand.
804 (*altivec_lvxl_<mode>_internal): Rename to ...
805 (altivec_lvxl_<mode>): ... this.
806 (altivec_stvxl_<mode>): Delete expand.
807 (*altivec_stvxl_<mode>_internal): Rename to ...
808 (altivec_stvxl_<mode>): ... this.
809 (altivec_stve<VI_char>x): Delete expand.
810 (*altivec_stve<VI_char>x_internal): Rename to ...
811 (altivec_stve<VI_char>x): ... this.
812 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
813 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
814 reduc_plus_scal_<mode>): Adjust.
815 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
816 comment.
817 (rs6000_cpu_cpp_builtins): Adjust.
818 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
819 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
820 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
821 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
822 -maltivec=be support.
823 (rs6000_split_vec_extract_var): Adjust.
824 (rs6000_split_v4si_init): Adjust.
825 (swap_selector_for_mode): Delete.
826 (altivec_expand_lvx_be, altivec_expand_stvx_be,
827 altivec_expand_stvex_be): Delete.
828 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
829 -maltivec=be support.
830 (rs6000_gimple_fold_builtin): Ditto.
831 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
832 Adjust.
833 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
834 (TARGET_DIRECT_MOVE_64BIT): Adjust.
835 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
836 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
837 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
838 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
839 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
840 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
841 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
842 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
843 anonymous split): Adjust.
844 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
845 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
846
847 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
848
849 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
850 when --with-gxx-include-dir is also specified.
851 * configure: Regenerate.
852
853 2018-05-09 Jim Wilson <jimw@sifive.com>
854
855 PR target/84797
856 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
857 * config/riscv/t-withmultilib: New.
858 * config/riscv/withmultilib.h: New.
859 * doc/install.texi: Document RISC-V --with-multilib-list support.
860
861 2018-05-09 Richard Biener <rguenther@suse.de>
862
863 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
864 vector.
865 (vect_bb_vectorization_profitable_p): Adjust. Compute
866 actual scalar cost using the cost vector and the add_stmt_cost
867 machinery.
868
869 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
870
871 PR rtl-optimization/85645
872 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
873 in the REG_CFA_REGISTER note for LR, don't leave it empty.
874
875 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
876
877 PR rtl-optimization/85645
878 * shrink-wrap.c (spread_components): Return a boolean saying if
879 anything was changed.
880 (try_shrink_wrapping_separate): Iterate spread_components until
881 nothing changes anymore.
882
883 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
884
885 PR rtl-optimization/85645
886 * regrename.c (build_def_use): Also kill the chains that include the
887 destination of a REG_CFA_REGISTER note.
888
889 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
890
891 PR rtl-optimization/85645
892 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
893 insn that has a REG_CFA_REGISTER note.
894
895 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
896
897 * cfgexpand.c (expand_clobber): New function.
898 (expand_gimple_stmt_1): Use it.
899 * tree-vect-stmts.c (vect_clobber_variable): New function,
900 split out from...
901 (vectorizable_simd_clone_call): ...here.
902 (vectorizable_store): Emit a clobber either side of an
903 IFN_STORE_LANES sequence.
904 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
905
906 2018-05-09 Tom de Vries <tom@codesourcery.com>
907
908 PR target/85626
909 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
910 (define_insn "trap_if_false"): Add exit after trap.
911
912 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
913
914 PR rtl-optimization/85638
915 * bb-reorder.c: Include common/common-target.h.
916 (create_forwarder_block): New function extracted from...
917 (fix_up_crossing_landing_pad): ...here. Rename into...
918 (dw2_fix_up_crossing_landing_pad): ...this.
919 (sjlj_fix_up_crossing_landing_pad): New function.
920 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
921 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
922 from both partitions and exit the loop after one iteration.
923
924 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
925
926 Revert:
927 * doc/extend.texi (PowerPC Built-in Functions): Rename this
928 subsection.
929 (Basic PowerPC Built-in Functions): The new name of the
930 subsection previously known as "PowerPC Built-in Functions".
931 (Basic PowerPC Built-in Functions Available on all Configurations):
932 New subsubsection.
933 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
934 subsubsection.
935 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
936 subsubsection.
937 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
938 subsubsection.
939 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
940 subsubsection.
941
942 2018-05-08 Jim Wilson <jimw@sifive.com>
943
944 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
945 (LD_EMUL_SUFFIX): New.
946 (LINK_SPEC): Use it.
947
948 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
949
950 * doc/extend.texi (PowerPC Built-in Functions): Rename this
951 subsection.
952 (Basic PowerPC Built-in Functions): The new name of the
953 subsection previously known as "PowerPC Built-in Functions".
954 (Basic PowerPC Built-in Functions Available on all Configurations):
955 New subsubsection.
956 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
957 subsubsection.
958 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
959 subsubsection.
960 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
961 subsubsection.
962 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
963 subsubsection.
964
965 2018-05-08 Jakub Jelinek <jakub@redhat.com>
966
967 PR target/85683
968 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
969 after cmpelim optimization.
970
971 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
972
973 * config.gcc: Support "goldmont".
974 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
975 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
976 PROCESSOR_GOLDMONT.
977 * config/i386/i386.c (m_GOLDMONT): Define.
978 (processor_target_table): Add "goldmont".
979 (PTA_GOLDMONT): Define.
980 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
981 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
982 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
983 (fold_builtin_cpu): Add "goldmont".
984 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
985 (ix86_option_override_internal): Add "goldmont".
986 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
987 (processor_type): Add PROCESSOR_GOLDMONT.
988 * config/i386/i386.md: Add CPU "glm".
989 * config/i386/glm.md: New file.
990 * config/i386/x86-tune.def: Add m_GOLDMONT.
991 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
992
993 2018-05-08 Jakub Jelinek <jakub@redhat.com>
994
995 PR target/85572
996 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
997 E_V4DImode.
998 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
999 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
1000 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
1001
1002 PR target/85317
1003 * config/i386/i386.c (ix86_fold_builtin): Handle
1004 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
1005
1006 PR target/85480
1007 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
1008 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
1009
1010 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
1011
1012 PR target/85658
1013 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
1014 (check_arch): Likewise.
1015 (check_fpu): Return the result rather than printing it.
1016 (end arch): Fix operator precedence.
1017 (end cpu): Likewise.
1018 (END): Print the result from check_fpu.
1019
1020 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
1021 Alan Hayward <alan.hayward@arm.com>
1022 David Sherwood <david.sherwood@arm.com>
1023
1024 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
1025 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
1026 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
1027 (*fcmuo<mode>_and): New patterns.
1028
1029 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
1030
1031 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
1032 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
1033 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
1034 (cmp_op, sve_imm_con): New code attributes.
1035 (SVE_COND_INT_CMP, imm_con): Delete.
1036 (cmp_op): Remove above unspecs from int attribute.
1037 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
1038 to...
1039 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
1040 comparison-specific unspecs.
1041 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
1042 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
1043 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
1044 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
1045 (*vec_fcm<cmp_op><mode>): Rename to...
1046 (*fcm<cmp_op><mode>): ...this and adjust likewise.
1047 (*vec_fcmuo<mode>): Rename to...
1048 (*fcmuo<mode>): ...this and adjust likewise.
1049 (*pred_fcm<cmp_op><mode>): New pattern.
1050 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
1051 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
1052 functions.
1053 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
1054 and UNORDERED.
1055 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
1056 (aarch64_emit_sve_predicated_cond): New function.
1057 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
1058 (aarch64_emit_unspec_cond_or): Replace with...
1059 (aarch64_emit_sve_or_conds): ...this new function. Use
1060 aarch64_emit_sve_ptrue_op for the individual comparisons and
1061 aarch64_emit_binop to OR them together.
1062 (aarch64_emit_inverted_unspec_cond): Replace with...
1063 (aarch64_emit_sve_inverted_cond): ...this new function. Use
1064 aarch64_emit_sve_ptrue_op for the comparison and
1065 aarch64_emit_unop to invert the result.
1066 (aarch64_expand_sve_vec_cmp_float): Update after the above
1067 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
1068
1069 2018-05-07 Nathan Sidwell <nathan@acm.org>
1070
1071 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
1072 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
1073 (Backwards Compatibility): Likewise.
1074
1075 2018-05-07 Luis Machado <luis.machado@linaro.org>
1076
1077 PR bootstrap/85681
1078 Revert:
1079 2018-05-07 Luis Machado <luis.machado@linaro.org>
1080
1081 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1082 <prefetch_dynamic_strides>: New const bool field.
1083 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1084 prefetch_dynamic_strides.
1085 (exynosm1_prefetch_tune): Likewise.
1086 (thunderxt88_prefetch_tune): Likewise.
1087 (thunderx_prefetch_tune): Likewise.
1088 (thunderx2t99_prefetch_tune): Likewise.
1089 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1090 (aarch64_override_options_internal): Update to set
1091 PARAM_PREFETCH_DYNAMIC_STRIDES.
1092 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1093 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1094 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1095 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1096 prefetch-dynamic-strides setting.
1097
1098 2018-05-07 Luis Machado <luis.machado@linaro.org>
1099
1100 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1101 <minimum_stride>: New const int field.
1102 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1103 minimum_stride field.
1104 (exynosm1_prefetch_tune): Likewise.
1105 (thunderxt88_prefetch_tune): Likewise.
1106 (thunderx_prefetch_tune): Likewise.
1107 (thunderx2t99_prefetch_tune): Likewise.
1108 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1109 (aarch64_override_options_internal): Update to set
1110 PARAM_PREFETCH_MINIMUM_STRIDE.
1111 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1112 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1113 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1114 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1115 stride is constant and is below the minimum stride threshold.
1116
1117 2018-05-07 Luis Machado <luis.machado@linaro.org>
1118
1119 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
1120 to 512.
1121
1122 2018-05-07 Luis Machado <luis.machado@linaro.org>
1123
1124 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1125 <prefetch_dynamic_strides>: New const bool field.
1126 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1127 prefetch_dynamic_strides.
1128 (exynosm1_prefetch_tune): Likewise.
1129 (thunderxt88_prefetch_tune): Likewise.
1130 (thunderx_prefetch_tune): Likewise.
1131 (thunderx2t99_prefetch_tune): Likewise.
1132 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1133 (aarch64_override_options_internal): Update to set
1134 PARAM_PREFETCH_DYNAMIC_STRIDES.
1135 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1136 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1137 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1138 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1139 prefetch-dynamic-strides setting.
1140
1141 2018-05-07 Luis Machado <luis.machado@linaro.org>
1142
1143 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1144 <minimum_stride>: New const int field.
1145 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1146 minimum_stride field.
1147 (exynosm1_prefetch_tune): Likewise.
1148 (thunderxt88_prefetch_tune): Likewise.
1149 (thunderx_prefetch_tune): Likewise.
1150 (thunderx2t99_prefetch_tune): Likewise.
1151 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1152 (aarch64_override_options_internal): Update to set
1153 PARAM_PREFETCH_MINIMUM_STRIDE.
1154 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1155 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1156 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1157 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1158 stride is constant and is below the minimum stride threshold.
1159
1160 2018-05-06 Jakub Jelinek <jakub@redhat.com>
1161
1162 PR c++/85659
1163 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
1164 the type is addressable. Don't force op into register if it has
1165 BLKmode.
1166
1167 2018-05-05 Roland McGrath <mcgrathr@google.com>
1168
1169 PR other/77609
1170 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
1171 any section for which we don't know a specific type it should have,
1172 regardless of name. Previously this was done only for the exact
1173 names ".init_array", ".fini_array", and ".preinit_array".
1174 (default_elf_asm_named_section): Add comment about
1175 relationship with default_section_type_flags and SECTION_NOTYPE.
1176 (get_section): Don't consider it a type conflict if one side has
1177 SECTION_NOTYPE and the other doesn't, as long as neither has the
1178 SECTION_BSS et al used in the default_section_type_flags logic.
1179
1180 2018-05-05 Tom de Vries <tom@codesourcery.com>
1181
1182 PR target/85653
1183 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
1184 (workaround_barsyncs): New function.
1185 (nvptx_reorg): Use workaround_barsyncs.
1186 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
1187 (define_expand "nvptx_membar_cta"): New define_expand.
1188 (define_insn "*nvptx_membar_cta"): New insn.
1189
1190 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
1191
1192 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
1193 To improve optimization opportunities.
1194 * builtin-types.def: The new needed builtin types for the above.
1195
1196 2018-05-04 Richard Biener <rguenther@suse.de>
1197
1198 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
1199 * gimple-ssa-store-merging.c
1200 (imm_store_chain_info::output_merged_store): Remove redundant create,
1201 release split_store vector contents on failure.
1202 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
1203 scalar stmt vector on cache hit.
1204
1205 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
1206
1207 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
1208 Xilinx FP support.
1209 * config.gcc (powerpc-xilinx-eabi*): Remove.
1210 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
1211 support.
1212 (fusion_addis_mem_combo_load): Ditto.
1213 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
1214 FP support.
1215 (rs6000_cpu_cpp_builtins): Ditto.
1216 * config/rs6000/rs6000-linux.c
1217 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
1218 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
1219 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
1220 support.
1221 (rs6000_setup_reg_addr_masks): Ditto.
1222 (rs6000_init_hard_regno_mode_ok): Ditto.
1223 (rs6000_option_override_internal): Ditto.
1224 (legitimate_lo_sum_address_p): Ditto.
1225 (rs6000_legitimize_address): Ditto.
1226 (rs6000_legitimize_reload_address): Ditto.
1227 (rs6000_legitimate_address_p): Ditto.
1228 (abi_v4_pass_in_fpr): Ditto.
1229 (setup_incoming_varargs): Ditto.
1230 (rs6000_gimplify_va_arg): Ditto.
1231 (rs6000_split_multireg_move): Ditto.
1232 (rs6000_savres_strategy): Ditto.
1233 (rs6000_emit_prologue_components): Ditto.
1234 (rs6000_emit_epilogue_components): Ditto.
1235 (rs6000_emit_prologue): Ditto.
1236 (rs6000_emit_epilogue): Ditto.
1237 (rs6000_elf_file_end): Ditto.
1238 (rs6000_function_value): Ditto.
1239 (rs6000_libcall_value): Ditto.
1240 * config/rs6000/rs6000.h: Ditto.
1241 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
1242 (TARGET_MINMAX): ... this. New.
1243 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
1244 * config/rs6000/rs6000.md: Remove Xilinx FP support.
1245 (*movsi_internal1_single): Delete.
1246 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
1247 mfpu=, mxilinx-fpu): Delete.
1248 * config/rs6000/singlefp.h: Delete.
1249 * config/rs6000/sysv4.h: Remove Xilinx FP support.
1250 * config/rs6000/t-rs6000: Ditto.
1251 * config/rs6000/t-xilinx: Delete.
1252 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
1253 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
1254 (VStype_simple): Delete.
1255 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
1256 * config/rs6000/xfpu.h: Delete.
1257 * config/rs6000/xfpu.md: Delete.
1258 * config/rs6000/xilinx.h: Delete.
1259 * config/rs6000/xilinx.opt: Delete.
1260 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
1261 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
1262
1263 2018-05-04 Tom de Vries <tom@codesourcery.com>
1264
1265 PR libgomp/85639
1266 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
1267 if ignore == 0.
1268
1269 2018-05-04 Richard Biener <rguenther@suse.de>
1270
1271 PR middle-end/85627
1272 * tree-complex.c (update_complex_assignment): We are always in SSA form.
1273 (expand_complex_div_wide): Likewise.
1274 (expand_complex_operations_1): Likewise.
1275 (expand_complex_libcall): Preserve EH info of the original stmt.
1276 (tree_lower_complex): Handle removed blocks.
1277 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
1278 on complex multiplication and division libcall builtins.
1279
1280 2018-05-04 Richard Biener <rguenther@suse.de>
1281
1282 PR middle-end/85574
1283 * fold-const.c (negate_expr_p): Restrict negation of operand
1284 zero of a division to when we know that can happen without
1285 overflow.
1286 (fold_negate_expr_1): Likewise.
1287
1288 2018-05-04 Jakub Jelinek <jakub@redhat.com>
1289
1290 PR libstdc++/85466
1291 * real.h (real_nextafter): Declare.
1292 * real.c (real_nextafter): New function.
1293 * fold-const-call.c (fold_const_nextafter): New function.
1294 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
1295 CASE_CFN_NEXTTOWARD.
1296 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
1297 even when arg1_mode is different from arg0_mode.
1298
1299 2018-05-03 Nathan Sidwell <nathan@acm.org>
1300
1301 * doc/extend.texi (Deprecated Features): Remove
1302 -ffriend-injection.
1303 (Backwards Compatibility): Likewise.
1304 * doc/invoke.texi (C++ Language Options): Likewise.
1305 (C++ Dialect Options): Likewise.
1306
1307 2018-05-03 Jakub Jelinek <jakub@redhat.com>
1308
1309 PR target/85530
1310 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
1311 _mm512_mask_mullox_epi64): New intrinsics.
1312
1313 2018-05-03 Tom de Vries <tom@codesourcery.com>
1314
1315 PR testsuite/85106
1316 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1317 dump files): Add offload-tree.
1318
1319 2018-05-03 Richard Biener <rguenther@suse.de>
1320
1321 PR tree-optimization/85615
1322 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
1323 to loops not nested in BBs loop father to avoid creating multi-entry
1324 loops.
1325
1326 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1327
1328 PR tree-optimization/70291
1329 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
1330 arguments. Change return type to tree. Emit libcall as a new
1331 statement rather than replacing existing one when inplace_p is true.
1332 (expand_complex_multiplication_components): New function.
1333 (expand_complex_multiplication): Expand floating-point complex
1334 multiplication using the above.
1335 (expand_complex_division): Rename inner_type parameter to type.
1336 Update expand_complex_libcall call-site.
1337 (expand_complex_operations_1): Update expand_complex_multiplication
1338 and expand_complex_division call-sites.
1339
1340 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1341
1342 PR target/85582
1343 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1344 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1345 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
1346 the highest significant bit of the shift count mask is clear. In
1347 check whether and[sq]i3 is needed verify that all significant bits
1348 of the shift count other than the highest are set.
1349
1350 2018-05-02 Tom de Vries <tom@codesourcery.com>
1351
1352 PR libgomp/82428
1353 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
1354 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
1355 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
1356 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
1357 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
1358 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
1359 __builtin_goacc_parlevel_size.
1360
1361 2018-05-02 Richard Biener <rguenther@suse.de>
1362
1363 PR tree-optimization/85597
1364 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
1365 do not use split vect_get_vec_defs call but call vect_get_slp_defs
1366 directly.
1367
1368 2018-05-02 Tom de Vries <tom@codesourcery.com>
1369
1370 PR testsuite/85106
1371 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1372 dump files): Add ltrans-tree.
1373
1374 2018-05-02 Tom de Vries <tom@codesourcery.com>
1375
1376 PR testsuite/85106
1377 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1378 dump files): Add wpa-ipa.
1379
1380 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
1381
1382 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
1383 powerpc*-*-linux*paired* target.
1384 * config/rs6000/750cl.h: Delete.
1385 * config/rs6000/paired.h: Delete.
1386 * config/rs6000/paired.md: Delete.
1387 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
1388 float support.
1389 * config/rs6000/rs6000-builtin.def: Remove paired float support.
1390 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
1391 comment. Remove paired float support.
1392 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
1393 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1394 VECTOR_PAIRED.
1395 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
1396 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
1397 declarations.
1398 * config/rs6000/rs6000.c: Remove paired float support.
1399 (paired_expand_vector_init, paired_expand_vector_move,
1400 paired_emit_vector_compare, paired_emit_vector_cond_expr,
1401 (paired_expand_lv_builtin, paired_expand_stv_builtin,
1402 paired_expand_builtin, paired_expand_predicate_builtin,
1403 paired_init_builtins): Delete.
1404 * config/rs6000/rs6000.h: Remove paired float support.
1405 * config/rs6000/rs6000.md: Remove paired float support.
1406 (move_from_CR_ov_bit): Delete.
1407 * config/rs6000/rs6000.opt (mpaired): Delete.
1408 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
1409 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
1410
1411 2018-05-02 Richard Biener <rguenther@suse.de>
1412
1413 PR middle-end/85567
1414 * gimplify.c (gimplify_save_expr): When in SSA form allow
1415 SAVE_EXPRs to compute to SSA vars.
1416
1417 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1418
1419 PR target/85582
1420 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1421 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1422 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
1423 clobber operands[2], instead use a new pseudo. Formatting fixes.
1424
1425 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
1426
1427 PR tree-optimization/85586
1428 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
1429 exit early for statements in the same group if the accesses are
1430 not strided.
1431
1432 2018-05-02 Tom de Vries <tom@codesourcery.com>
1433
1434 PR lto/85451
1435 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
1436 error message.
1437
1438 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
1439
1440 PR tree-optimization/85143
1441 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
1442
1443 2018-05-01 Tom de Vries <tom@codesourcery.com>
1444
1445 PR lto/85451
1446 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
1447 not found" error message.
1448
1449 2018-05-01 Tom de Vries <tom@codesourcery.com>
1450
1451 PR other/83786
1452 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
1453 * vec.c (test_ordered_remove_if): New function.
1454 (vec_c_tests): Call test_ordered_remove_if.
1455 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
1456 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
1457 * tree-vect-patterns.c (vect_pattern_recog_1): Use
1458 VEC_ORDERED_REMOVE_IF.
1459
1460 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1461
1462 PR tree-optimization/82665
1463 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
1464 pointer subtraction where arguments come from a memchr call.
1465
1466 2018-05-01 Jakub Jelinek <jakub@redhat.com>
1467
1468 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
1469 --push-state --as-needed and --pop-state instead of --as-needed and
1470 --no-as-needed if ld supports it.
1471 * configure: Regenerated.
1472
1473 PR web/85578
1474 * doc/install.texi2html: Replace _002d with - and _002a with * in
1475 generated html files using sed.
1476
1477 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1478
1479 PR c++/85523
1480 * gcc-rich-location.c (blank_line_before_p): New function.
1481 (use_new_line): New function.
1482 (gcc_rich_location::add_fixit_insert_formatted): New function.
1483 * gcc-rich-location.h
1484 (gcc_rich_location::add_fixit_insert_formatted): New function.
1485
1486 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1487
1488 * selftest.c (assert_streq): Rename "expected" and "actual" to
1489 "val1" and "val2". Extend NULL-handling to cover both inputs
1490 symmetrically, while still requiring both to be non-NULL for a pass.
1491 * selftest.h (assert_streq): Rename "expected" and "actual" to
1492 "val1" and "val2".
1493 (ASSERT_EQ): Likewise.
1494 (ASSERT_EQ_AT): Likewise.
1495 (ASSERT_KNOWN_EQ): Likewise.
1496 (ASSERT_KNOWN_EQ_AT): Likewise.
1497 (ASSERT_NE): Likewise.
1498 (ASSERT_MAYBE_NE): Likewise.
1499 (ASSERT_MAYBE_NE_AT): Likewise.
1500 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
1501 the assertion to pass.
1502 (ASSERT_STREQ_AT): Likewise.
1503
1504 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1505
1506 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
1507 interaction with -pie.
1508
1509 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1510
1511 * selftest.h: Fix alphabetization of per-source-file selftest
1512 declarations.
1513
1514 2018-04-30 Jason Merrill <jason@redhat.com>
1515
1516 PR c++/61982 - dead stores to destroyed objects.
1517 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
1518 of clobber.
1519
1520 2018-04-30 Jason Merrill <jason@redhat.com>
1521
1522 * tree.c (build_clobber): New.
1523 * tree.h: Declare it.
1524 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
1525
1526 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1527
1528 * diagnostic-show-locus.c (layout::layout): Update for
1529 location_get_source_line returning a char_span.
1530 (struct char_span): Move to input.h.
1531 (struct correction): Update for fields in char_span becoming
1532 private.
1533 (struct source_line): Update for location_get_source_line
1534 returning a char_span.
1535 (layout::print_line): Likewise.
1536 * edit-context.c (edited_file::print_content): Likewise.
1537 (edited_file::print_diff_hunk): Likewise.
1538 (edited_file::print_run_of_changed_lines): Likewise.
1539 (edited_file::get_num_lines): Likewise.
1540 (edited_line::edited_line): Likewise.
1541 * final.c (asm_show_source): Likewise.
1542 * input.c (location_get_source_line): Convert return type
1543 from const char * to char_span, losing the final "line_len"
1544 param.
1545 (dump_location_info): Update for the above.
1546 (get_substring_ranges_for_loc): Likewise. Use a char_span
1547 when handling the literal within the line.
1548 (test_reading_source_line): Update for location_get_source_line
1549 returning a char_span.
1550 * input.h (class char_span): Move here from
1551 diagnostic-show-locus.c, converting from a struct to a class.
1552 Make data members private.
1553 (char_span::operator bool): New.
1554 (char_span::length): New.
1555 (char_span::get_buffer): New.
1556 (char_span::operator[]): New.
1557 (char_span::subspan): Make const.
1558 (char_span::xstrdup): New.
1559 (location_get_source_line): Convert return type from const char *
1560 to char_span, losing the final "line_size" param.
1561
1562 2018-04-30 Jan Hubicka <jh@suse.cz>
1563
1564 * lto-wrapper.c (ltrans_priorities): New static var.
1565 (cmp_priority): New.
1566 (run_gcc): Read priorities and if doing parallel build order
1567 the Makefile by them.
1568
1569 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1570
1571 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
1572
1573 2018-04-30 Richard Biener <rguenther@suse.de>
1574
1575 * tree-cfg.c (verify_address): Remove base argument, add
1576 flag whether to check TREE_ADDRESSABLE and do that.
1577 (verify_expr): Remove.
1578 (verify_types_in_gimple_reference): Add pieces from verify_expr.
1579 (verify_gimple_assign_single): Likewise.
1580 (verify_gimple_switch): Likewise.
1581 (verify_expr_location_1): Dereference tp once. Add (disabled)
1582 piece from verify_expr.
1583 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
1584
1585 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1586
1587 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
1588
1589 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1590
1591 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
1592 (small_data_pattern): Likewise.
1593 (arc_rewrite_small_data): Likewise.
1594 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
1595 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
1596 (get_symbol_alignment): New function.
1597 (legitimate_small_data_address_p): Likewise.
1598 (legitimate_scaled_address): Update, call
1599 legitimate_small_data_address_p.
1600 (output_sdata): New static variable.
1601 (arc_print_operand): Update how we handle small data operands.
1602 (arc_print_operand_address): Likewise.
1603 (arc_legitimate_address_p): Update, use
1604 legitimate_small_data_address_p.
1605 (arc_rewrite_small_data_p): Remove.
1606 (arc_rewrite_small_data_1): Likewise.
1607 (arc_rewrite_small_data): Likewise.
1608 (small_data_pattern): Likewise.
1609 (compact_sda_memory_operand): Update to use
1610 legitimate_small_data_address_p and get_symbol_alignment.
1611 (prepare_move_operands): Don't rewite sdata pattern.
1612 (prepare_extend_operands): Remove.
1613 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
1614 pattern.
1615 (zero_extendqisi2): Likewise.
1616 (zero_extendhisi2): Likewise.
1617 (extendqihi2): Likewise.
1618 (extendqisi2): Likewise.
1619 (extendhisi2): Likewise.
1620 (addsi3): Likewise.
1621 (subsi3): Likewise.
1622 (andsi3): Likewise.
1623 * config/arc/constraints.md (Usd): Change it to memory constraint.
1624
1625 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1626
1627 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
1628 as source of std instructions.
1629 * config/arc/arc.md (movsi_insn): Update pattern predicate to
1630 allow 6-bit constants as source for store instructions.
1631 (movdi_insn): Update instruction pattern to allow 6-bit constants
1632 as source for store instructions.
1633
1634 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1635
1636 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
1637
1638 2018-04-30 Nathan Sidwell <nathan@acm.org>
1639 Sandra Loosemore <sandra@codesourcery.com>
1640
1641 * dumpfile.c (dump_open): Allow '-' for stdout.
1642 * doc/invoke.texi (Developer Options): Document dump filename
1643 determination early. Document stdin/stdout selection.
1644
1645 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
1646
1647 Microblaze Target: PIC data text relative
1648
1649 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
1650 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
1651 Add declaration.
1652 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
1653 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
1654 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
1655 New addressing mode for data-text relative position indepenedent code.
1656 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
1657 'ADDRESS_SYMBOLIC_TXT_REL'.
1658 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
1659 (microblaze_legitimate_pic_operand): Exclude function calls from
1660 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
1661 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
1662 addresses cases.
1663 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1664 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1665 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
1666 for 'address + offset'.
1667 (microblaze_expand_prologue): Add new function prologue call for
1668 'r20' assignation.
1669 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
1670 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
1671 table in case of TARGET_PIC_DATA_TEXT_REL.
1672 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
1673 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
1674 Add new macros 'UNSPEC_TEXT',
1675 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
1676 + exclude function calls from 'UNSPEC_PLT' in case of data text
1677 relative mode.
1678 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1679 new target hook for generating address diff vector tables in case of
1680 flag_pic.
1681 * doc/tm.texi : Regenerate.
1682 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
1683 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
1684 of addr diff vector generation.
1685 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1686 target hook definition.
1687 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
1688 Add default function for generate_pic_addr_diff_vec -> flag_pic.
1689 * doc/invoke.texi (Add new pic option): Add new microblaze pic
1690 option for data text relative.
1691
1692 2018-04-30 Richard Biener <rguenther@suse.de>
1693
1694 * tree-chrec.h (evolution_function_is_constant_p): Remove
1695 redundant check.
1696 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
1697
1698 2018-04-30 Richard Biener <rguenther@suse.de>
1699
1700 PR bootstrap/85571
1701 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
1702
1703 2018-04-30 Richard Biener <rguenther@suse.de>
1704
1705 PR tree-optimization/28364
1706 PR tree-optimization/85275
1707 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
1708 copying first exit test.
1709
1710 2018-04-28 Mark Wielaard <mark@klomp.org>
1711
1712 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
1713 dwarf_version >= 5.
1714 (dwarf_AT): Handle DW_AT_addr_base.
1715 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
1716
1717 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
1718
1719 PR target/84431
1720 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
1721 (*ashl<dwi>3_doubleword_mask_1): Ditto.
1722 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
1723 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
1724
1725 2018-04-28 Richard Biener <rguenther@suse.de>
1726
1727 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
1728 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
1729 to reflect use. Only add interesting stmts.
1730
1731 2018-04-27 Martin Jambor <mjambor@suse.cz>
1732
1733 PR ipa/85549
1734 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
1735 the jump function allows for passing through aggregate values.
1736
1737 2018-04-27 David Malcolm <dmalcolm@redhat.com>
1738
1739 * input.h (in_system_header_at): Convert from macro to inline
1740 function.
1741 (from_macro_expansion_at): Likewise.
1742 (from_macro_definition_at): Likewise.
1743
1744 2018-04-27 Jeff Law <law@redhat.com>
1745
1746 * config.gcc: Mark tile* targets as deprecated/obsolete.
1747
1748 2018-04-27 Richard Biener <rguenther@suse.de>
1749
1750 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
1751 fix for ILP32.
1752
1753 2018-04-27 Richard Biener <rguenther@suse.de>
1754
1755 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
1756
1757 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
1758
1759 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
1760 with Yd constraint. Set "preferred_for_speed" attribute from
1761 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
1762 with Yd constraint.
1763 (*movdi_internal): Ditto.
1764 (movti_interunit splitters): Remove
1765 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
1766 (movdi_interunit splitters): Ditto.
1767 * config/i386/constraints.md (Ye): Remove.
1768 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
1769
1770 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1771
1772 PR target/85512
1773 * config/aarch64/constraints.md (Usg): Limit to 31.
1774 (Usj): Limit to 63.
1775
1776 2018-04-27 Jakub Jelinek <jakub@redhat.com>
1777
1778 PR tree-optimization/85529
1779 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
1780 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
1781 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
1782 zero extension or masking of the MSB bit.
1783 (optimize_range_tests): Add FIRST_BB argument, pass it through
1784 to optimize_range_tests_var_bound.
1785 (maybe_optimize_range_tests, reassociate_bb): Adjust
1786 optimize_range_tests callers.
1787
1788 2018-04-26 Richard Biener <rguenther@suse.de>
1789 Jakub Jelinek <jakub@redhat.com>
1790
1791 * cgraph.h (symbol_table): Just declare debug method here.
1792 * symtab.c (symbol_table::debug): Define.
1793
1794 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
1795
1796 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
1797
1798 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
1799
1800 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
1801 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
1802 (*movdi_internal): Substitute Yi and Yj constraint with x
1803 and Ym and Yn constraint with y constraint. Update "isa"
1804 attribute and set "preferred_for_speed" attribute from
1805 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
1806 (*movsi_internal): Ditto.
1807 (*movdf_internal): Ditto.
1808 (*movsf_internal): Ditto.
1809 (*zero_extendsidi2): Ditto.
1810 * config/i386/sse.md (vec_set<mode>_0): Ditto.
1811 (sse2_loadld): Ditto.
1812 (*vec_extract<ssevecmodelower>_0): Ditto.
1813 (*vec_extractv4si_0_zext_sse4): Ditto.
1814 (vec_concatv2di): Ditto.
1815 (*vec_dup<mode>): Ditto.
1816 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
1817 * config/i386/constraints.md (Yi): Remove.
1818 (Yj): Remove.
1819 (Ym): Remove.
1820 (Yn): Remove.
1821
1822 2018-04-26 Nathan Sidwell <nathan@acm.org>
1823
1824 * dumpfile.c (dump_open): New.
1825 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
1826 (dump_finish): Detect stdio/stderr by value not name.
1827
1828 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
1829
1830 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
1831
1832 2018-04-26 Tom de Vries <tom@codesourcery.com>
1833
1834 PR target/84952
1835 * config/nvptx/nvptx.c (verify_neutering_jumps)
1836 (verify_neutering_labels): New function
1837 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
1838
1839 2018-04-26 Tom de Vries <tom@codesourcery.com>
1840
1841 PR target/84025
1842 * config/nvptx/nvptx.c (needs_neutering_p): New function.
1843 (nvptx_single): Use needs_neutering_p to skip over insns that do not
1844 need neutering.
1845
1846 2018-04-26 Richard Biener <rguenther@suse.de>
1847 Tom de Vries <tom@codesourcery.com>
1848
1849 PR lto/85422
1850 * lto-streamer-out.c (output_function): Fixup loops if required to match
1851 discovery done in the reader.
1852
1853 2018-04-26 Richard Biener <rguenther@suse.de>
1854
1855 PR tree-optimization/85116
1856 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
1857 have a loop exit from the single latch predecessor. Remove
1858 case of header with just condition.
1859 (ch_base::copy_headers): Exclude infinite loops from any
1860 processing.
1861 (pass_ch::execute): Record exits.
1862
1863 2018-04-26 Richard Biener <rguenther@suse.de>
1864
1865 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
1866 prologue cost vector and pass it to vect_get_load_cost.
1867 (vect_get_peeling_costs_all_drs): Likewise.
1868 (vect_peeling_hash_get_lowest_cost): Likewise.
1869 (vect_enhance_data_refs_alignment): Likewise.
1870
1871 2018-04-26 Richard Biener <rguenther@suse.de>
1872
1873 PR middle-end/85450
1874 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
1875 checking of integer<->pointer conversions.
1876 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
1877 sign-/zero-extending pointer types.
1878 (expand_omp_for_static_chunk): Likewise.
1879
1880 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
1881 Jean Lee <xiaoyur347@gmail.com>
1882
1883 * config/mips/mips.c (mips_asan_shadow_offset): New function.
1884 (TARGET_ASAN_SHADOW_OFFSET): Define.
1885 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
1886 true for -fsanitize=address.
1887
1888 2018-04-25 Mark Wielaard <mark@klomp.org>
1889
1890 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
1891 shorter ones.
1892
1893 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1894
1895 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
1896 than "alu", remove explicit "memory" and "imm_disp" attributes.
1897 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
1898
1899 PR middle-end/85414
1900 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
1901 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
1902 gen_lowpart_no_emit.
1903
1904 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
1905
1906 PR target/85473
1907 * config/i386/i386.c (ix86_expand_builtin): Change memory
1908 operand to XI, extend p0 to Pmode.
1909 * config/i386/i386.md: Change unspec volatile and operand
1910 1 mode to XI, change operand 0 mode to P.
1911
1912 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1913
1914 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
1915 GET_MODE_MASK before any checking.
1916 (nds32_can_use_bset_p): Likewise.
1917 (nds32_can_use_btgl_p): Likewise.
1918
1919 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1920
1921 * config/nds32/nds32-doubleword.md: New define_split pattern for
1922 illegal register number.
1923
1924 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1925
1926 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
1927
1928 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1929
1930 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
1931
1932 2018-04-25 Richard Biener <rguenther@suse.de>
1933
1934 * lto-streamer.h (LTO_major_version): Bump to 8.
1935
1936 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1937
1938 * BASE-VER: Set to 9.0.0.
1939
1940 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
1941
1942 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
1943 in __abskf2 and __powikf2.
1944
1945 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1946
1947 PR target/85512
1948 * config/aarch64/constraints.md (Usg, Usj): New constraints.
1949 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
1950 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
1951 Use the above on operand 2. Reindent.
1952 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
1953
1954 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1955
1956 PR target/85485
1957 * common/config/i386/i386-common.c (ix86_handle_option): Don't
1958 handle OPT_mcet.
1959 * config/i386/i386.opt (mcet): Removed.
1960 * doc/install.texi: Remove -mcet documentation.
1961 * doc/invoke.texi: Likewise.
1962
1963 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1964
1965 PR target/85485
1966 * doc/install.texi: Remove -mcet from bootstrap-cet.
1967
1968 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1969
1970 PR target/85511
1971 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
1972 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
1973 if TARGET_64BIT.
1974
1975 PR target/85503
1976 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
1977 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
1978 containing a CONST_VECTOR.
1979
1980 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
1981
1982 * doc/install.texi: Update newlib dependency for nvptx.
1983
1984 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1985
1986 PR target/85508
1987 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
1988 instead of INTVAL when shifting x left.
1989
1990 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
1991
1992 PR tree-optimization/85478
1993 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
1994 vect_grouped_store_supported for single element vectors.
1995
1996 2018-04-24 Richard Biener <rguenther@suse.de>
1997
1998 PR target/85491
1999 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
2000 load cost increase to the case of non-constant step.
2001
2002 2018-04-24 Jakub Jelinek <jakub@redhat.com>
2003
2004 PR target/84828
2005 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
2006 destination if any_malformed_asm.
2007
2008 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 PR middle-end/85496
2011 * expr.c (store_field): In the bitfield case, if the value comes from
2012 a function call and is returned in registers by means of a PARALLEL,
2013 do not change the mode of the temporary unless BLKmode and VOIDmode.
2014
2015 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
2016
2017 PR rtl-optimization/85423
2018 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
2019 dependencies to debug insns when the previous insn is non-debug.
2020
2021 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
2022
2023 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
2024 enums into a single definition.
2025 (fls): Fix predicates and printing.
2026 (seti): Likewise.
2027
2028 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
2029
2030 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
2031 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
2032 and short u6 immediate.
2033 (check_if_valid_sleep_operand): Remove.
2034 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
2035
2036 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2037
2038 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
2039 flag_always_save_lp condition.
2040 * config/nds32/nds32.opt (malways-save-lp): New option.
2041
2042 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2043
2044 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
2045 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
2046 * config/nds32/nds32.h
2047 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
2048 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2049
2050 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2051
2052 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
2053 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
2054
2055 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2056 Chung-Ju Wu <jasonwucj@gmail.com>
2057
2058 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
2059 Declare.
2060 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
2061 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2062
2063 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2064
2065 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2066
2067 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2068
2069 * config/nds32/nds32-protos.h (nds32_data_alignment,
2070 nds32_local_alignment): Declare.
2071 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
2072 nds32_local_alignment): New functions.
2073 (TARGET_CONSTANT_ALIGNMENT): Define.
2074 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2075
2076 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2077
2078 * config/nds32/nds32.c
2079 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
2080 (TARGET_MODES_TIEABLE_P): Likewise.
2081
2082 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2083
2084 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
2085 level Ofast and Og.
2086
2087 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
2088 Chung-Ju Wu <jasonwucj@gmail.com>
2089
2090 * config/nds32/constants.md (unspec_volatile_element): Add enum values
2091 for unaligned access.
2092 * config/nds32/nds32-intrinsic.c: Implementation of expanding
2093 unaligned access.
2094 * config/nds32/nds32-intrinsic.md: Likewise.
2095 * config/nds32/nds32_intrinsic.h: Likewise.
2096 * config/nds32/nds32.h (nds32_builtins): Likewise.
2097 * config/nds32/nds32.opt (munaligned-access): New option.
2098 * config/nds32/nds32.c (nds32_asm_file_start): Display
2099 flag_unaligned_access status.
2100
2101 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2102
2103 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
2104 -mno-relax is present.
2105 * config/riscv/linux.h (LINK_SPEC): Ditto.
2106
2107 2018-04-20 Martin Sebor <msebor@redhat.com>
2108
2109 PR c/85365
2110 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
2111 for null pointers.
2112 (gimple_fold_builtin_stxcpy_chk): Same.
2113 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
2114
2115 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
2116
2117 PR target/85456
2118 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
2119 __powikf2 when long double is IEEE 128-bit.
2120
2121 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2122
2123 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
2124 step to make sure stack always aligned.
2125
2126 2018-04-20 Carl Love <cel@us.ibm.com>
2127
2128 PR target/83402
2129 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
2130 size check for arg0.
2131
2132 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
2133 Tom de Vries <tom@codesourcery.com>
2134
2135 PR target/85445
2136 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
2137 Emit insns for calls too.
2138 (nvptx_find_par): Always look for worker-level predecessor insn.
2139 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
2140 calls.
2141 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
2142 (nvptx_process_pars): Propagate frames for calls.
2143
2144 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
2145
2146 PR target/85469
2147 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
2148 Removed.
2149 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
2150 (ix86_handle_option): Don't handle OPT_mibt.
2151 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
2152 __SHSTK__.
2153 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
2154 has_ibt and ibt.
2155 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
2156 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
2157 (ix86_target_macros): Define __CET__ with flag_cf_protection
2158 for -fcf-protection.
2159 * config/i386/i386.c (isa2_opts): Remove -mibt.
2160 * config/i386/i386.h (TARGET_IBT): Removed.
2161 (TARGET_IBT_P): Likewise.
2162 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
2163 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
2164 * config/i386/i386.opt (mcet): Update help message.
2165 (mshstk): Likewise.
2166 (mibt): Removed.
2167 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
2168 -mcet as an alias for -mshstk.
2169
2170 2018-04-20 Richard Biener <rguenther@suse.de>
2171
2172 PR middle-end/85475
2173 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
2174 complexity by forcing a single use of the multiply operand.
2175
2176 2018-04-20 Martin Jambor <mjambor@suse.cz>
2177
2178 ipa/85449
2179 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
2180 recursion dependency to only apply to non-clones.
2181
2182 2018-04-20 Martin Jambor <mjambor@suse.cz>
2183
2184 ipa/85447
2185 * ipa-cp.c (create_specialized_node): Check that clones of
2186 self-recursive edges exist during IPA-CP.
2187
2188 2018-04-19 Toon Moene <toon@moene.org>
2189
2190 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
2191 by -O3.
2192
2193 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2194
2195 PR tree-optimization/85467
2196 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
2197 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
2198 VECTOR_CST element to type.
2199
2200 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2201
2202 PR target/85397
2203 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
2204 * config/i386/i386.md (builtin_setjmp_setup): Removed.
2205 (builtin_longjmp): Likewise.
2206 (save_stack_nonlocal): New pattern.
2207 (restore_stack_nonlocal): Likewise.
2208
2209 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2210
2211 PR target/85404
2212 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2213 Replace ASM_OUTPUT_LABEL with fprintf.
2214
2215 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2216
2217 PR target/85417
2218 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2219 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
2220 * config/i386/i386-c.c (ix86_target_macros_internal): Also
2221 define __IBT__ and __SHSTK__ for -fcf-protection.
2222 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
2223 TARGET_IBT.
2224 (ix86_trampoline_init): Likewise.
2225 (x86_output_mi_thunk): Likewise.
2226 (ix86_notrack_prefixed_insn_p): Likewise.
2227 (ix86_option_override_internal): Don't disallow -fcf-protection.
2228 * config/i386/i386.md (rdssp<mode>): Also enable for
2229 -fcf-protection.
2230 (incssp<mode>): Likewise.
2231 (nop_endbr): Likewise.
2232 * config/i386/i386.opt (mcet): Change help message to built-in
2233 functions only.
2234 (mibt): Likewise.
2235 (mshstk): Likewise.
2236 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
2237 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
2238 enable CET built-in functions.
2239
2240 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
2241
2242 * common/config/i386/i386-common.c
2243 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
2244 OPTION_MASK_ISA_MOVDIRI_UNSET,
2245 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
2246 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
2247 * config.gcc (movdirintrin.h): New header.
2248 * config/i386/cpuid.h (bit_MOVDIRI,
2249 bit_MOVDIR64B): New bits.
2250 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
2251 and -mmvodir64b.
2252 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
2253 (VOID, PVOID, PCVOID)): New function types.
2254 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
2255 __builtin_ia32_directstoreu_u64,
2256 __builtin_ia32_movdir64b): New builtins.
2257 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
2258 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
2259 and -mmovdiri.
2260 (ix86_valid_target_attribute_inner_p): Ditto.
2261 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
2262 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
2263 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
2264 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
2265 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
2266 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
2267 (movdiri<mode>, movdir64b_<mode>): New.
2268 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
2269 * config/i386/immintrin.h: Include movdirintrin.h.
2270 * config/i386/movdirintrin.h: New file.
2271 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
2272
2273 2018-04-19 Richard Biener <rguenther@suse.de>
2274
2275 PR middle-end/85455
2276 * cfg.c (clear_bb_flags): When loop state says we have
2277 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
2278
2279 2018-04-19 Richard Biener <rguenther@suse.de>
2280
2281 PR tree-optimization/84737
2282 * tree-vect-data-refs.c (vect_copy_ref_info): New function
2283 copying restrict info.
2284 (vect_setup_realignment): Use it.
2285 * tree-vectorizer.h (vect_copy_ref_info): Declare.
2286 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
2287 the first DR to all generated stores.
2288 (vectorizable_load): Likewise for loads.
2289
2290 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2291
2292 PR tree-optimization/85446
2293 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
2294 the integral and pointer types to have the same precision.
2295
2296 * doc/install.texi: Document --disable-cet being the default and
2297 --enable-cet=auto.
2298
2299 2018-04-18 Martin Liska <mliska@suse.cz>
2300
2301 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
2302 style.
2303
2304 2018-04-18 Martin Liska <mliska@suse.cz>
2305
2306 Revert
2307 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
2308
2309 PR ipa/83983
2310 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
2311 arguments if they are comparable.
2312
2313 2018-04-18 Martin Liska <mliska@suse.cz>
2314
2315 Revert
2316 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
2317
2318 PR lto/84805
2319 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
2320 incomplete types.
2321
2322 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
2323
2324 PR target/85388
2325 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
2326 ENDBR after calling __morestack.
2327
2328 2018-04-18 David Malcolm <dmalcolm@redhat.com>
2329
2330 PR jit/85384
2331 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
2332 by using gcc_base_ver to generate a gcc_driver_version, and use
2333 it when generating GCC_DRIVER_NAME.
2334 * configure: Regenerate.
2335
2336 2018-04-18 Jakub Jelinek <jakub@redhat.com>
2337
2338 PR target/81084
2339 * config.gcc: Obsolete powerpc*-*-*spe*.
2340
2341 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2342
2343 PR debug/84637
2344 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
2345 (stabstr_D): Change type of unum from unsigned int to
2346 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
2347 type.
2348
2349 2018-04-17 Jim Wilson <jimw@sifive.com>
2350
2351 PR 84856
2352 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
2353 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
2354 Set arg_pointer_offset after using pretend_args_size.
2355
2356 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2357
2358 PR rtl-optimization/85431
2359 * dse.c (record_store): Ignore zero width stores.
2360
2361 PR sanitizer/85230
2362 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
2363 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
2364 __builtin_stack_restore rather than after it.
2365 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
2366 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
2367 argument instead of virtual_dynamic_stack_rtx.
2368
2369 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
2370
2371 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
2372 New prototype.
2373 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2374 Add note to error message to explain internal mapping of overloaded
2375 built-in function name to non-overloaded built-in function name.
2376 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
2377 function.
2378
2379 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
2380
2381 PR target/85424
2382 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
2383 where the inputs overlap with the output.
2384
2385 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2386
2387 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
2388 (=v, v) alternative and explicit "memory" attribute.
2389 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
2390 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2391 attributes.
2392 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
2393 "sselog1" type instead of "sselog".
2394 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
2395 "sselog". Remove explicit "memory" attribute.
2396 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
2397 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2398 attributes.
2399 (vec_extract_hi_v32hi): Merge all alternatives into one, use
2400 "sselog1" type instead of "sselog". Remove explicit "memory"
2401 attribute.
2402 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
2403 use "sselog1" type instead of "sselog". Remove explicit "memory"
2404 attribute.
2405 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
2406 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2407 attributes.
2408 (vec_extract_hi_v64qi): Merge all alternatives into one, use
2409 "sselog1" type instead of "sselog". Remove explicit "memory"
2410 attribute.
2411 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
2412 use "sselog1" type instead of "sselog". Remove explicit "memory"
2413 attribute.
2414
2415 PR target/85430
2416 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
2417
2418 PR middle-end/85414
2419 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
2420 on a SUBREG.
2421
2422 2018-04-17 Martin Jambor <mjambor@suse.cz>
2423
2424 PR ipa/85421
2425 * ipa-cp.c (create_specialized_node): Call
2426 expand_all_artificial_thunks if necessary.
2427
2428 2018-04-17 Martin Liska <mliska@suse.cz>
2429
2430 PR lto/85405
2431 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
2432 in message, remote space in between '_G' and '('.
2433
2434 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2435
2436 PR target/85281
2437 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
2438 avx512f_vmcmp<mode>3<round_saeonly_name>,
2439 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
2440 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
2441 avx512f_rndscale<mode><round_saeonly_name>,
2442 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
2443 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
2444 Use %<iptr>2 instead of %2 for -masm=intel.
2445 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
2446 avx512f_vcvttss2usi<round_saeonly_name>,
2447 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
2448 -masm=intel.
2449 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
2450 avx512f_vcvttsd2usi<round_saeonly_name>,
2451 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
2452 Use %q1 instead of %1 for -masm=intel.
2453 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
2454 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
2455 of %3 for -masm=intel.
2456 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
2457 -masm=intel.
2458 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
2459 -masm=intel.
2460 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
2461 -masm=intel.
2462 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
2463 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
2464 %g1.
2465 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
2466 -masm=intel.
2467 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
2468 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
2469 %g1 and one with %0 and %1.
2470 (avx512er_vmrcp28<mode><round_saeonly_name>,
2471 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
2472 %1 for -masm=intel.
2473 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
2474 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
2475 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
2476 of %0 and %{%4%} for -masm=intel.
2477 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
2478 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
2479 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
2480 order of %0 and %{%5%}%{z%} for -masm=intel.
2481
2482 2018-04-17 Jan Hubicka <jh@suse.cz>
2483
2484 PR lto/85405
2485 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
2486
2487 2018-04-17 Martin Liska <mliska@suse.cz>
2488
2489 PR ipa/85329
2490 * multiple_target.c (create_dispatcher_calls): Set apostrophes
2491 for target_clone error message. Make default implementation
2492 clone to be a local declaration.
2493 (separate_attrs): Add new argument and check for an empty
2494 string.
2495 (expand_target_clones): Handle it.
2496 (ipa_target_clone): Make redirection just for target_clones
2497 functions.
2498
2499 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
2500 Tom de Vries <tom@codesourcery.com>
2501
2502 PR middle-end/84955
2503 * omp-expand.c (expand_oacc_for): Add dummy false branch for
2504 tiled basic blocks without omp continue statements.
2505
2506 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
2507
2508 PR target/83660
2509 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
2510 vec_extract expression as having side effects to make sure it gets
2511 a cleanup point.
2512
2513 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
2514
2515 PR target/85403
2516 * config/i386/i386.c (get_builtin_code_for_version): Check
2517 error_mark_node.
2518
2519 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
2520
2521 PR target/84331
2522 * gcc/config.gcc: Support "skylake".
2523 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
2524 PROCESSOR_SKYLAKE.
2525 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
2526 (processor_target_table): Add "skylake".
2527 (ix86_option_override_internal): Add "skylake".
2528 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
2529 PROCESSOR_CANNONLAKE.
2530 (get_builtin_code_for_version): Fix priority for
2531 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
2532 PROCESSOR_SKYLAKE-AVX512.
2533 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
2534 (processor_type): Add PROCESSOR_SKYLAKE.
2535
2536 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2537 Jason Merrill <jason@redhat.com>
2538
2539 PR c++/85112
2540 * convert.c (convert_to_integer_1): Use direct recursion for
2541 enumeral types and types with a precision less than the number
2542 of bits in their mode.
2543
2544 2018-04-16 Julia Koval <julia.koval@intel.com>
2545
2546 PR target/84413
2547 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
2548 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
2549
2550 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
2551
2552 PR target/85293
2553 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
2554 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
2555 and -mno-direct-move.
2556
2557 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
2558
2559 PR target/83402
2560 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
2561 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
2562 Ensure negative shifts result in {0}.
2563
2564 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
2565
2566 PR rtl-optimization/79916
2567 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
2568 regs (if any) to define how to gnerate SD moves when LRA is in
2569 progress.
2570
2571 2018-04-13 Jakub Jelinek <jakub@redhat.com>
2572
2573 PR rtl-optimization/85393
2574 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
2575 * except.c (expand_dw2_landing_pad_for_region): Make static.
2576 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
2577 a label and unconditional jump to old_bb, rather than
2578 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
2579 basic block.
2580
2581 PR rtl-optimization/85376
2582 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
2583 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
2584 instead of a specific value.
2585
2586 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2587 Bin Cheng <bin.cheng@arm.com>
2588
2589 PR tree-optimization/82965
2590 PR tree-optimization/83991
2591 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
2592 by_profile_only parameter.
2593 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
2594 information if the loop was predicted to iterate too many times.
2595 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
2596
2597 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2598
2599 PR lto/71991
2600 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
2601 always inline.
2602
2603 2018-04-13 Martin Liska <mliska@suse.cz>
2604 Jakub Jelinek <jakub@redhat.com>
2605
2606 PR middle-end/81657
2607 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
2608 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
2609 * builtins.c (expand_builtin_memory_copy_args): Use
2610 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
2611 handle dest_addr == pc_rtx.
2612
2613 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
2614
2615 PR target/85291
2616 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
2617 asked to not generate direct moves.
2618 (fix_trunc<mode>si2_stfiwx): Similar.
2619 (fix_trunc<mode>si2_internal): Similar.
2620
2621 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2622
2623 PR debug/83157
2624 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
2625 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
2626 lookup if dest in some wider mode is known to be const0_rtx and
2627 if so, record permanent equivalence for it to be ZERO_EXTEND of
2628 the narrower mode destination.
2629
2630 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2631
2632 * lto-streamer-out.c (output_function): Revert 259346.
2633 * omp-expand.c (expand_oacc_for): Likewise.
2634
2635 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
2636
2637 PR rtl-optimization/85354
2638 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
2639 * sel-sched.c (sel_global_init): ... here.
2640
2641 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
2642
2643 PR target/85238
2644 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
2645 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2646 mode for PE-COFF targets.
2647 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
2648 (i386_pe_asm_lto_end): Likewise.
2649 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
2650 (TARGET_ASM_LTO_END): Likewise.
2651 * config/i386/winnt.c (saved_debug_info_level): New static variable.
2652 (i386_pe_asm_lto_start): New function.
2653 (i386_pe_asm_lto_end): Likewise.
2654
2655 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2656 Richard Biener <rguenther@suse.de>
2657
2658 PR middle-end/84955
2659 * lto-streamer-out.c (output_function): Fix CFG loop state before
2660 streaming out.
2661 * omp-expand.c (expand_oacc_for): Handle calls to internal
2662 functions like regular functions.
2663
2664 2018-04-12 Richard Biener <rguenther@suse.de>
2665
2666 PR lto/85371
2667 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
2668 for the early LTO debug to properly generate references to it
2669 during DIE emission. Do not re-use that for the skeleton for
2670 split-dwarf.
2671 (dwarf2out_early_finish): Likewise.
2672
2673 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2674
2675 PR target/85328
2676 * config/i386/sse.md
2677 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
2678 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
2679 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
2680 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
2681 and output is a reg, avoid creating invalid lowpart subreg, but
2682 instead split into a 512-bit move. Don't split if not AVX512VL,
2683 input is xmm16+ reg and output is a mem.
2684 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
2685 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
2686 xmm16+ reg and output is a mem.
2687
2688 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2689
2690 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
2691 also for flag_dwarf2_cfi_asm.
2692
2693 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2694
2695 PR rtl-optimization/85342
2696 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
2697 a bool scalar var inside of the loop instead. Don't try to update
2698 recog_data.operand after failed apply_change_group.
2699
2700 2018-04-12 Tom de Vries <tom@codesourcery.com>
2701
2702 PR target/85296
2703 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
2704 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
2705 array with flexible array member as array without given dimension.
2706 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
2707 argument for undefined param to true.
2708
2709 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
2710
2711 PR target/85321
2712 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
2713 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
2714 from PowerPC section.
2715 * config/rs6000/sysv4.opt (mcall-): Improve help text.
2716 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
2717 help text that is too long.
2718 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
2719 help text that is too long.
2720 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
2721 help text that is too long.
2722
2723 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
2724
2725 * config/alpha/alpha.md (stack_probe_internal): Rename
2726 from "probe_stack". Update all callers.
2727
2728 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2729
2730 PR rtl-optimization/84566
2731 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
2732 sched_macro_fuse_insns.
2733
2734 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2735
2736 PR target/84301
2737 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
2738 (compute_block_dependences): ... from here.
2739
2740 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2741
2742 PR tree-optimization/85331
2743 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
2744 from int to HOST_WIDE_INT.
2745
2746 2018-04-11 Martin Jambor <mjambor@suse.cz>
2747
2748 PR ipa/84149
2749 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
2750 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
2751 not the same as the source val.
2752 (cgraph_edge_brings_value_p): New parameter.
2753 (gather_edges_for_value): Pass destination value to
2754 cgraph_edge_brings_value_p.
2755 (perhaps_add_new_callers): Likewise.
2756 (get_info_about_necessary_edges): Likewise and exclude values brought
2757 only by self-recursive edges.
2758 (create_specialized_node): Redirect only clones of self-calling edges.
2759 (+self_recursive_pass_through_p): New function.
2760 (find_more_scalar_values_for_callers_subset): Use it.
2761 (find_aggregate_values_for_callers_subset): Likewise.
2762 (known_aggs_to_agg_replacement_list): Removed.
2763 (decide_whether_version_node): Re-calculate known constants for all
2764 remaining context clones.
2765
2766 2018-04-11 Richard Biener <rguenther@suse.de>
2767
2768 PR lto/85339
2769 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
2770 from early DWARF output.
2771 (dwarf2out_early_finish): Output line info unconditionally into
2772 early DWARF and add reference to it.
2773
2774 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2775
2776 PR target/85281
2777 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
2778 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
2779 other than V2DFmode using iptr mode attribute.
2780 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
2781
2782 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2783
2784 PR rtl-optimization/84659
2785 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
2786
2787 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2788
2789 PR debug/85302
2790 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
2791 SIZEP is NULL.
2792 (output_loc_list): Pass address of a dummy size variable even in the
2793 locview handling loop.
2794 (index_location_lists): Add comment on why skip_loc_list_entry can't
2795 call size_of_locs.
2796
2797 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
2798
2799 PR target/85261
2800 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
2801 into register.
2802
2803 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
2804
2805 PR target/85321
2806 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
2807 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
2808 and -mstring-compare-inline-limit.
2809
2810 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2811
2812 PR target/85287
2813 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
2814 for stack clash protection in a register whenever we need it to be in
2815 a register.
2816
2817 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2818
2819 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
2820 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
2821
2822 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2823
2824 PR target/85321
2825 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
2826 the help text.
2827 (mlong-double-): Ditto.
2828 * config/rs6000/sysv4.opt (msdata=): Ditto.
2829 (mtls-size=): Ditto.
2830
2831 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
2832
2833 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2834 erroneous entries for
2835 "vector int vec_ldl (int, long int *)", and
2836 "vector unsigned int vec_ldl (int, unsigned long int *)".
2837 Add comments and entries for
2838 "vector bool char vec_ldl (int, bool char *)",
2839 "vector bool short vec_ldl (int, bool short *)",
2840 "vector bool int vec_ldl (int, bool int *)",
2841 "vector bool long long vec_ldl (int, bool long long *)",
2842 "vector pixel vec_ldl (int, pixel *)",
2843 "vector long long vec_ldl (int, long long *)",
2844 "vector unsigned long long vec_ldl (int, unsigned long long *)".
2845 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
2846 type tree bool_long_long_type_node and correct definition of
2847 bool_V2DI_type_node to make reference to this new type tree.
2848 (rs6000_mangle_type): Replace erroneous reference to
2849 bool_long_type_node with bool_long_long_type_node.
2850 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
2851 comments to emphasize sign distinctions for char and int types and
2852 replace RS6000_BTI_bool_long constant with
2853 RS6000_BTI_bool_long_long constant. Also add comment to restrict
2854 use of RS6000_BTI_pixel.
2855 (bool_long_type_node): Remove this macro definition.
2856 (bool_long_long_type_node): New macro definition
2857
2858 2018-04-10 Jakub Jelinek <jakub@redhat.com>
2859
2860 PR rtl-optimization/85300
2861 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
2862 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
2863 simplify_unary_operation fails.
2864
2865 2018-04-10 Martin Liska <mliska@suse.cz>
2866
2867 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
2868 cgraph_edge and ipa_ref.
2869
2870 2018-04-10 Jakub Jelinek <jakub@redhat.com>
2871
2872 PR target/85177
2873 PR target/85255
2874 * config/i386/sse.md
2875 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
2876 computation of the VEC_MERGE selector from mask.
2877 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
2878 Fix decoding of the VEC_MERGE selector into mask.
2879
2880 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
2881
2882 PR tree-optimization/85286
2883 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
2884
2885 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
2886
2887 * final.c (final_1): Set insn_last_address as well as
2888 insn_current_address.
2889
2890 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2891
2892 PR target/85173
2893 * explow.c (emit_stack_probe): Call validize_mem on memory location
2894 before passing it to gen_probe_stack. Create address operand and
2895 legitimize it for the probe_stack_address case.
2896
2897 2018-04-09 Jan Hubicka <jh@suse.cz>
2898
2899 PR lto/85078
2900 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
2901 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
2902 * tree.c (free_lang_data_in_type): Fix handling of binfos;
2903 walk basetypes.
2904 (free_lang_data): Rebuild type inheritance graph.
2905
2906 2018-04-09 Martin Sebor <msebor@redhat.com>
2907
2908 * invoke.texi (-finline-small-functions): Mention other optimization
2909 options.
2910 (-findirect-inlining, -fpartial-inlining): Same.
2911 (-finline-functions-called-once): Same.
2912 (-freorder-blocks-and-partition): Same.
2913
2914 2018-04-09 Jan Hubicka <jh@suse.cz>
2915
2916 PR rtl/84058
2917 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
2918 jumps; choose last target that matches the criteria (i.e.
2919 no partition changes for non-crossing jumps).
2920 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
2921 support for redirecting crossing jumps to non-crossing.
2922
2923 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
2924
2925 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
2926 also for naked functions.
2927
2928 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
2929
2930 * config/arc/arc.md (add_shift): New pattern.
2931 (add_shift2): Likewise.
2932 (sub_shift): Likewise.
2933 (sub_shift_cmp0_noout): Likewise.
2934 (compare_si_ashiftsi): Likewise.
2935 (xbfu_cmp0_noout): New combine pattern.
2936 (xbfu_cmp0"): Likewise.
2937 (movsi_set_cc_insn): Place the predicable variant first.
2938 (commutative_binary_cmp0_noout): Remove clobber.
2939 (commutative_binary_cmp0): New pattern.
2940 (noncommutative_binary_cmp0): Likewise.
2941 (noncommutative_binary_cmp0_noout): Likewise.
2942 (noncommutative_binary_comparison_result_used): Removed.
2943 (rsub_cmp0): New pattern.
2944 (rsub_cmp0_noout): Likewise.
2945 (extzvsi): Changed, keep only meaningful variants.
2946 (SQH, SEZ): New iterators.
2947 (SQH_postfix): New mode attribute.
2948 (SEZ_prefix): New code attribute.
2949 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
2950 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
2951 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
2952 of numerical value.
2953 (noncommutative_operator): Check the availability of barrel
2954 shifter option.
2955
2956 2018-04-09 Richard Biener <rguenther@suse.de>
2957
2958 PR tree-optimization/85284
2959 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
2960 Only use the niter constraining form of simple_iv when the exit
2961 is always executed.
2962
2963 2018-04-09 Tom de Vries <tom@codesourcery.com>
2964
2965 PR target/84041
2966 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2967 (define_expand "*memory_barrier"): New define_expand.
2968 (define_insn "memory_barrier"): New insn.
2969
2970 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2971
2972 PR rtl-optimization/80463
2973 PR rtl-optimization/83972
2974 PR rtl-optimization/83480
2975
2976 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
2977 correct producer for the insn.
2978 (tidy_control_flow): Fixup seqnos in case of debug insns.
2979
2980 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2981
2982 PR rtl-optimization/83913
2983
2984 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
2985 different sched-times when merging exprs.
2986
2987 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2988
2989 PR rtl-optimization/83962
2990
2991 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
2992 tidy_fallthru_edge and tidy_control_flow.
2993
2994 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2995
2996 PR rtl-optimization/83530
2997
2998 * sel-sched.c (force_next_insn): New global variable.
2999 (remove_insn_for_debug): When force_next_insn is true, also leave only
3000 next insn in the ready list.
3001 (sel_sched_region): When the region wasn't scheduled, make another pass
3002 over it with force_next_insn set to 1.
3003
3004 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3005
3006 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
3007 into tm_file.
3008 * config/nds32/constants.md (unspec_volatile_element): Add enum values
3009 for interrupt control.
3010 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3011 functions for interrupt control.
3012 * config/nds32/nds32-intrinsic.md: Likewise.
3013 * config/nds32/nds32_intrinsic.h: Likewise.
3014 * config/nds32/nds32.h (nds32_builtins): Likewise.
3015
3016 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3017
3018 * config/nds32/nds32.c (nds32_init_machine_status,
3019 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
3020 strict_aligned_p field.
3021 (nds32_expand_to_rtl_hook): New function.
3022 (TARGET_EXPAND_TO_RTL_HOOK): Define.
3023 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
3024
3025 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3026 Chung-Ju Wu <jasonwucj@gmail.com>
3027
3028 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
3029 * config/nds32/nds32-n7.md: New file.
3030 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
3031 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
3032 pipeline.
3033 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
3034 * config/nds32/nds32.md (pipeline_model): Add n7.
3035 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
3036 * config/nds32/pipelines.md: Include n7 settings.
3037
3038 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3039 Chung-Ju Wu <jasonwucj@gmail.com>
3040
3041 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
3042 * config/nds32/nds32-e8.md: New file.
3043 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
3044 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
3045 pipeline.
3046 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
3047 * config/nds32/nds32.md (pipeline_model): Add e8.
3048 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
3049 * config/nds32/pipelines.md: Include e8 settings.
3050
3051 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3052 Chung-Ju Wu <jasonwucj@gmail.com>
3053
3054 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
3055 * config/nds32/nds32-n8.md: New file.
3056 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
3057 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
3058 pipeline.
3059 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
3060 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
3061 * config/nds32/nds32.md (pipeline_model): Add n8.
3062 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
3063 * config/nds32/pipelines.md: Include n8 settings.
3064
3065 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3066 Chung-Ju Wu <jasonwucj@gmail.com>
3067
3068 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
3069 * config/nds32/nds32-n9-2r1w.md: New file.
3070 * config/nds32/nds32-n9-3r2w.md: New file.
3071 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
3072 nds32_register_ports): New or modify for cpu n9.
3073 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
3074 pipeline.
3075 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
3076 * config/nds32/nds32-utils.c: New file.
3077 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
3078 TARGET_MUL_SLOW): Define.
3079 * config/nds32/nds32.md (pipeline_model): New attribute.
3080 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
3081 New options that support cpu n9.
3082 * config/nds32/pipelines.md: Include n9 settings.
3083 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
3084
3085 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3086
3087 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
3088 information if necessary.
3089 (output_cond_branch_compare_zero): Likewise.
3090 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
3091 (nds32_target_alignment): Refine for alignment.
3092 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
3093 (FUNCTION_BOUNDARY): Modify.
3094 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
3095 align case.
3096 * config/nds32/nds32.opt (malways-align, malign-functions): New.
3097
3098 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3099
3100 * config/nds32/constants.md (unspec_volatile_element): Add values for
3101 TLB operation and data prefetch.
3102 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3103 functions for TLB operation and data prefetch.
3104 * config/nds32/nds32-intrinsic.md: Likewise.
3105 * config/nds32/nds32_intrinsic.h: Likewise.
3106 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
3107 (nds32_print_operand): Likewise.
3108 * config/nds32/nds32.h (nds32_builtins): Likewise.
3109
3110 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
3111 Andrew Pinski <pinsika@gcc.gnu.org>
3112
3113 PR middle-end/82976
3114 * match.pd: Use constant_boolean_node of correct type instead of
3115 boolean_true_node or boolean_false_node for simplifying
3116 pointer comparisons to zero.
3117
3118 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3119
3120 PR tree-optimization/80021
3121 * tree.c (verify_type_variant): Make error call in verify_variant_match
3122 translatable and remove final full stop.
3123
3124 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3125
3126 * config/nds32/constants.md (unspec_volatile_element): Add
3127 UNSPEC_VOLATILE_EH_RETURN.
3128 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
3129 nds32_output_stack_pop): Support dwarf exception handling process.
3130 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
3131 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
3132 exception handling process.
3133 (nds32_compute_stack_frame): Likewise.
3134 (nds32_return_addr_rtx): Likewise.
3135 (nds32_initial_elimination_offset): Likewise.
3136 (nds32_expand_prologue): Likewise.
3137 (nds32_expand_epilogue): Likewise.
3138 (nds32_dynamic_chain_address): New function.
3139 * config/nds32/nds32.h (machine_function): Add fields for dwarf
3140 exception handling.
3141 (DYNAMIC_CHAIN_ADDRESS): Define.
3142 (EH_RETURN_DATA_REGNO): Define.
3143 (EH_RETURN_STACKADJ_RTX): Define.
3144 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
3145 patterns for dwarf exception handling.
3146
3147 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3148
3149 * config/nds32/nds32.h: Clean up obsolete macros.
3150
3151 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3152
3153 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3154 Add enum values for particular instructions.
3155 * config/nds32/nds32-intrinsic.c: Implementation of expanding
3156 particular intrinsic functions.
3157 * config/nds32/nds32-intrinsic.md: Likewise.
3158 * config/nds32/nds32_intrinsic.h: Likewise.
3159 * config/nds32/nds32.h (nds32_builtins): Likewise.
3160 * config/nds32/nds32.md (type): Add pbsad and pbsada.
3161 (btst, ave): New patterns for particular instructions.
3162
3163 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3164
3165 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3166 Add enum values for atomic load/store and memory sync.
3167 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
3168 and memory sync.
3169 * config/nds32/nds32-intrinsic.md: Likewise.
3170 * config/nds32/nds32_intrinsic.h: Likewise.
3171 * config/nds32/nds32.h (nds32_builtins): Likewise.
3172
3173 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3174
3175 PR tree-optimization/85257
3176 * fold-const.c (native_encode_vector): If not all elts could fit
3177 and off is -1, return 0 rather than offset.
3178 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
3179 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
3180 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
3181 adjust buffer in native_interpret_expr call.
3182
3183 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3184
3185 * config/nds32/constants.md (unspec_volatile_element): Add cache
3186 control enum values.
3187 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
3188 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
3189 * config/nds32/nds32.c (nds32_cctl_names): New.
3190 (nds32_print_operand): Handle cache control register names.
3191 * config/nds32/nds32.h (nds32_builtins): New enum values.
3192 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
3193 macros.
3194 * config/nds32/nds32.md (type): Add mmu.
3195 * config/nds32/pipelines.md (simple_insn): Add mmu.
3196
3197 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3198
3199 * config/nds32/nds32.md (type): Remove call.
3200 * config/nds32/pipelines.md (simple_insn): Likewise.
3201
3202 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3203
3204 * config/nds32/constants.md (unspec_volatile_element): Add
3205 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
3206 UNSPEC_VOLATILE_FMFCFG.
3207 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
3208 description for fmfcfg and fmfcsr.
3209 (bdesc_1arg): Add fmtcsr.
3210 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
3211 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
3212 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
3213 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
3214 unspec_fmfcfg): New patterns.
3215 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
3216 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
3217 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
3218 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
3219 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
3220 __nds32__fmfcfg): Define.
3221
3222 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3223
3224 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
3225 intrinsic register names.
3226 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
3227 intrinsic register enum values and macros.
3228
3229 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3230
3231 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
3232 for load/store addressing form.
3233 (nds32_print_operand_address): Likewise.
3234
3235 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
3236
3237 PR target/85196
3238 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
3239 based on LABEL_REF. Remove useless assertion.
3240 (pic_address_needs_scratch): Fix formatting.
3241 (sparc_legitimize_pic_address): Minor tweaks.
3242 (sparc_delegitimize_address): Adjust assertion accordingly.
3243 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
3244 into symbolic_operand.
3245 (movsi_high_pic_label_ref): Likewise.
3246 (movsi_lo_sum_pic_label_ref): Likewise.
3247 (movdi_pic_label_ref): Likewise.
3248 (movdi_high_pic_label_ref): Likewise.
3249 (movdi_lo_sum_pic_label_ref): Likewise.
3250
3251 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
3252
3253 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
3254 custom LIB_SPEC setup.
3255
3256 2018-04-06 Ruslan Bukin <br@bsdpad.com>
3257 Kito Cheng <kito.cheng@gmail.com>
3258
3259 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
3260 * config/riscv/freebsd.h: New.
3261
3262 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3263
3264 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
3265 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
3266 file.
3267
3268 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3269 Kito Cheng <kito.cheng@gmail.com>
3270
3271 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
3272 nds32_output_call, nds32_symbol_binds_local_p): New functions.
3273 * config/nds32/nds32-protos.h (nds32_output_call,
3274 nds32_output_return): Declare.
3275 * config/nds32/nds32.md: Refine all the call and return patterns.
3276
3277 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3278
3279 PR debug/85252
3280 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
3281 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
3282
3283 PR rtl-optimization/84872
3284 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
3285 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
3286 EDGE_CROSSING edge.
3287
3288 2018-04-06 Tamar Christina <tamar.christina@arm.com>
3289
3290 * expr.c (copy_blkmode_to_reg): Revert 254862.
3291 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
3292
3293 2018-04-06 Richard Biener <rguenther@suse.de>
3294
3295 PR middle-end/85244
3296 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
3297 after seeing a component reference with an adjacent field. Treat
3298 refs to arrays at struct end of external decls similar to
3299 refs to unconstrained commons.
3300
3301 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3302
3303 PR sanitizer/85213
3304 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
3305 look through SAVE_EXPRs with non-side-effects argument. Adjust
3306 recursive calls.
3307 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
3308 save_p here.
3309
3310 2018-04-06 Richard Biener <rguenther@suse.de>
3311
3312 PR middle-end/85180
3313 * alias.c (find_base_term): New wrapper around find_base_term
3314 unwinding CSELIB_VAL_PTR changes.
3315 (find_base_term): Do not restore CSELIB_VAL_PTR during the
3316 recursion.
3317
3318 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3319
3320 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
3321 instructions.
3322 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
3323 constant definitions.
3324 ("nop"): lr 0,0 -> nopr r0
3325 ("nop_lr0", "nop_lr1"): New insn definitions.
3326
3327 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3328
3329 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
3330 NDS32_V3PUSH_AVAILABLE_P macro.
3331
3332 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
3333 Chung-Ju Wu <jasonwucj@gmail.com>
3334
3335 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
3336 (nds32*-*-*): Add float and fpu_config into supported_defaults.
3337 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
3338 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
3339 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
3340 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
3341 * config/nds32/constraints.md: New constraints and checking for hard
3342 float configuration.
3343 * config/nds32/iterators.md: New mode iterator and attribute for hard
3344 float configuration.
3345 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
3346 patterns.
3347 * config/nds32/nds32-fpu.md: New file.
3348 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
3349 deal with hard float code generation.
3350 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
3351 ARCH_V3S.
3352 (abi_type, float_reg_number): New enum type.
3353 * config/nds32/nds32-predicates.c: New predicates for hard float.
3354 * config/nds32/nds32-protos.h: Declare functions for hard float.
3355 * config/nds32/nds32.c: Implementation for hard float configuration.
3356 * config/nds32/nds32.h: Definitions for hard float configuration.
3357 * config/nds32/nds32.md: Include hard float machine description and
3358 modify patterns for hard float configuration.
3359 * config/nds32/nds32.opt: New options for hard float configuration.
3360 * config/nds32/predicates.md: New predicates for hard float
3361 configuration.
3362
3363 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3364
3365 * common/config/nds32/nds32-common.c
3366 (nds32_option_optimization_table): Enable -mreleax-hint by default.
3367
3368 2018-04-05 Jakub Jelinek <jakub@redhat.com>
3369
3370 PR middle-end/85195
3371 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
3372 CONSTRUCTOR_ELT (ctor, ...)->value.
3373
3374 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
3375
3376 PR target/85193
3377 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
3378
3379 2018-04-05 Tom de Vries <tom@codesourcery.com>
3380
3381 PR target/85204
3382 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
3383 cond jump.
3384
3385 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3386 Kito Cheng <kito.cheng@gmail.com>
3387
3388 * config/nds32/constraints.md (U33): Fine-tune checking condition.
3389 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
3390 * config/nds32/nds32.h (nds32_16bit_address_type): Add
3391 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
3392
3393 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3394 Kito Cheng <kito.cheng@gmail.com>
3395
3396 * config/nds32/constraints.md (Ufe): New memory constraint.
3397 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
3398 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
3399 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
3400 operands.
3401 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
3402 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
3403
3404 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3405
3406 * config/nds32/nds32.md: Use optimize_size in the condition for
3407 alu-shift instructions.
3408
3409 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3410
3411 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
3412
3413 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3414
3415 * config/nds32/nds32.md (negsi2): Refine pattern.
3416
3417 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3418 Chung-Ju Wu <jasonwucj@gmail.com>
3419
3420 * config/nds32/iterators.md (shift_rotate): New code iterator.
3421 (shift): New code attribute.
3422 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
3423 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
3424 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
3425 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
3426 bit-wise operations.
3427 (andsi3, *andsi3): Ditto.
3428 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
3429 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
3430 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
3431 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
3432 nds32_ior_operand, nds32_xor_operand): New predicates.
3433
3434 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3435
3436 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
3437 (addsi3, subsi3): ... this.
3438
3439 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3440
3441 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
3442
3443 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3444
3445 * config/nds32/nds32.md: Adjust indention.
3446
3447 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3448
3449 * config/nds32/nds32.md (feature): New attribute.
3450
3451 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3452
3453 * config/nds32/nds32.md (subtype): New attribute.
3454
3455 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
3456
3457 PR target/85203
3458 * config/arm/arm-builtins.c (arm_expand_builtin): Change
3459 expansion to perform a bitwise AND of the argument followed by a
3460 boolean negation of the result.
3461
3462 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
3463
3464 PR rtl-optimization/84878
3465 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
3466 the basic block. Assert the use reference is not artificial and that
3467 it has an associated insn.
3468
3469 2018-04-04 Michael Matz <matz@suse.de>
3470
3471 * builtins.c (compute_objsize): Pass correct operand
3472 to array_at_struct_end_p.
3473
3474 2018-04-04 Richard Biener <rguenther@suse.de>
3475
3476 PR lto/85176
3477 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
3478 from contexts for DINFO_LEVEL_TERSE and below.
3479
3480 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3481
3482 * config/nds32/nds32-doubleword.md (move_<mode>): Require
3483 resiter_operand condition.
3484 * config/nds32/nds32.md (*move<mode>): Ditto.
3485
3486 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3487 Monk Chiang <sh.chiang04@gmail.com>
3488
3489 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
3490
3491 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3492
3493 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
3494
3495 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3496 Kito Cheng <kito.cheng@gmail.com>
3497
3498 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
3499 nds32_cond_code_str, output_cond_branch,
3500 output_cond_branch_compare_zero, nds32_expand_cbranch,
3501 nds32_expand_cstore, nds32_expand_movcc,
3502 nds32_output_cbranchsi4_equality_zero,
3503 nds32_output_cbranchsi4_equality_reg,
3504 nds32_output_cbranchsi4_equality_reg_or_const_int,
3505 nds32_output_cbranchsi4_greater_less_zero: New functions.
3506 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
3507 nds32_expand_cstore, nds32_expand_movcc,
3508 nds32_output_cbranchsi4_equality_zero,
3509 nds32_output_cbranchsi4_equality_reg,
3510 nds32_output_cbranchsi4_equality_reg_or_const_int,
3511 nds32_output_cbranchsi4_greater_less_zero): Declare.
3512 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
3513 nds32_rimm11s_operand): New predicates.
3514 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
3515 * config/nds32/nds32.md: Rewrite all the branch and conditional move
3516 patterns.
3517
3518 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3519
3520 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
3521 * config/nds32/nds32.md: Ditto.
3522 * config/nds32/pipelines.md: Ditto.
3523
3524 2018-04-04 Richard Biener <rguenther@suse.de>
3525
3526 PR tree-optimization/85168
3527 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
3528 propagating abnormals.
3529
3530 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3531
3532 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
3533
3534 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3535 Kito Cheng <kito.cheng@gmail.com>
3536
3537 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
3538 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
3539 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
3540 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
3541 * config/nds32/nds32.md (sibcall_internal): New.
3542 (sibcall_register): Remove.
3543 (sibcall_immediate): Remove.
3544 (sibcall_value_internal): New.
3545 (sibcall_value_register): Remove.
3546 (sibcall_value_immediate): Remove.
3547 * config/nds32/predicates.md (nds32_general_register_operand): New.
3548 (nds32_call_address_operand): New.
3549
3550 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3551
3552 PR rtl-optimization/85167
3553 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
3554 bb_defs if *split_p, instead preinitialize it to NULL.
3555
3556 PR tree-optimization/85156
3557 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
3558 evaluating the argument multiple times.
3559
3560 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
3561
3562 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
3563 than vector.
3564 (_mm_cvtpd_ps): Likewise.
3565 (_mm_cvttpd_epi32): Likewise.
3566 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
3567 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
3568 vector, pixel, and bool following altivec.h include.
3569
3570 2018-04-03 Martin Sebor <msebor@redhat.com>
3571
3572 * doc/extend.texi (Common Function Attributes): Clarify.
3573 (const attribute): Likewise.
3574 (pure attribute): Likewise.
3575
3576 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3577
3578 PR target/85169
3579 * config/i386/i386.c (ix86_expand_vector_set): Use
3580 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
3581
3582 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
3583
3584 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
3585 instructions when changing rounding bits to preserve precision bits
3586 in the x87 control word.
3587
3588 2018-04-03 Martin Liska <mliska@suse.cz>
3589
3590 PR tree-optimization/82491
3591 * rtl.h (strip_offset_and_add): Replace += suboffset with
3592 poly_uint64 () + suboffset.
3593
3594 2018-03-29 Martin Liska <mliska@suse.cz>
3595 Martin Jambor <mjambor@suse.cz>
3596
3597 PR ipa/84947
3598 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
3599 param_type is not an integral or pointer type.
3600
3601 2018-04-03 Richard Biener <rguenther@suse.de>
3602
3603 * sese.h (recompute_all_dominators): Remove.
3604
3605 2018-04-02 Martin Sebor <msebor@redhat.com>
3606
3607 * doc/invoke.texi (-Wrestrict): Fix typos.
3608
3609 2018-04-02 Jim Wilson <jimw@sifive.com>
3610
3611 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
3612 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
3613 (<optab>di3, <optab>si3_extend): Likewise.
3614 (<optab>si3_mask, <optab>si3_mask_1): New.
3615 (<optab>di3_mask, <optab>di3_mask_1): New.
3616 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
3617 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
3618 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
3619
3620 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
3621
3622 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
3623 example.
3624
3625 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
3626
3627 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
3628 (nds32_canonicalize_comparison): New function.
3629
3630 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3631 Kito Cheng <kito.cheng@gmail.com>
3632 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3633
3634 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
3635 * config/nds32/constants.md (unspec_volatile_element): Add
3636 UNSPEC_VOLATILE_RELAX_GROUP.
3637 * config/nds32/nds32-relax-opt.c: New file.
3638 * config/nds32/nds32-predicates.c
3639 (nds32_symbol_load_store_p): New function.
3640 * config/nds32/nds32-protos.h
3641 (nds32_symbol_load_store_p): Declare function.
3642 (make_pass_nds32_relax_opt): Declare new rtl pass function.
3643 * config/nds32/nds32.c
3644 (nds32_register_pass): New function to register pass.
3645 (nds32_register_passes): New function to register passes.
3646 * config/nds32/nds32.md (relax_group): New pattern.
3647 * config/nds32/nds32.opt (mrelax-hint): New option.
3648 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
3649
3650 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
3651
3652 * config/nds32/t-nds32: Modify files dependency.
3653
3654 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3655
3656 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
3657 (PROFILE_HOOK): Define its implementation.
3658
3659 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3660
3661 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
3662 type and 32-bit size.
3663
3664 2018-04-01 Jakub Jelinek <jakub@redhat.com>
3665
3666 PR middle-end/85090
3667 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
3668 (V_128_256): New mode iterator.
3669 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
3670 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
3671 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
3672 of V.
3673 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
3674 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
3675
3676 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
3677
3678 PR target/83315
3679 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
3680 NaN inputs correctly.
3681
3682 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
3683
3684 PR target/80546
3685 * config/rs6000/vsx.md (??r): New mode attribute.
3686 (*vsx_mov<mode>_64bit): Use it.
3687 (*vsx_mov<mode>_32bit): Likewise.
3688
3689 2018-03-30 Martin Sebor <msebor@redhat.com>
3690
3691 PR tree-optimization/84818
3692 * builtins.c (check_access): Use warning_n.
3693
3694 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
3695
3696 PR target/83822
3697 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
3698 condition.
3699 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
3700 condition.
3701
3702 2018-03-30 Julia Koval <julia.koval@intel.com>
3703
3704 PR target/84413
3705 * x86-tune.def (movx, partial_reg_dependency): Enable for
3706 m_SKYLAKE_AVX512.
3707
3708 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
3709
3710 PR inline-asm/84985
3711 * lra-constraints.c (process_alt_operands): Move setting
3712 this_alternative_matches below.
3713
3714 2018-03-29 Martin Liska <mliska@suse.cz>
3715
3716 PR lto/84995.
3717 * doc/invoke.texi: Document how LTO works with debug info.
3718 Describe auto-load support of binutils. Mention 'x86-64'
3719 as valid option value of -march option.
3720
3721 2018-03-29 Jakub Jelinek <jakub@redhat.com>
3722
3723 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
3724
3725 PR c/85094
3726 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
3727 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
3728 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
3729 checking.
3730
3731 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
3732
3733 PR target/84912
3734 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
3735 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
3736 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
3737 for RS6000_BTM_POWERPC64.
3738 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
3739 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
3740 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
3741 definition.
3742 (DIVDE): Use it.
3743 (DIVDEU): Likewise.
3744
3745 2018-03-28 Carl Love <cel@us.ibm.com>
3746
3747 Revert
3748 2017-09-27 Carl Love <cel@us.ibm.com>
3749
3750 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
3751 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
3752 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
3753 fctiw instruction.
3754
3755 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3756
3757 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
3758 instead of __vector bool.
3759 (_mm_max_pu8): Likewise.
3760 (_mm_min_pi16): Likewise.
3761
3762 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
3763
3764 PR target/84912
3765 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
3766 (DIVWEUO): Likewise.
3767 (DIVDEO): Likewise.
3768 (DIVDEUO): Likewise.
3769 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
3770 DIVWEUO and DIVDEUO.
3771 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
3772 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
3773 (div_extend): Likewise.
3774 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
3775 builtin function.
3776 (__builtin_divweuo): Likewise.
3777 (__builtin_divdeo): Likewise.
3778 (__builtin_divdeuo): Likewise.
3779
3780 2018-03-28 Jakub Jelinek <jakub@redhat.com>
3781
3782 PR target/85095
3783 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
3784 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
3785
3786 PR tree-optimization/82004
3787 * gimple-match-head.c (optimize_pow_to_exp): New function.
3788 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
3789 Don't fold to exp if optimize_pow_to_exp is false.
3790
3791 2018-03-28 Martin Liska <mliska@suse.cz>
3792
3793 PR other/84819
3794 * calls.c (initialize_argument_information): Fix trailing space.
3795 * common.opt: Fix typo and provide better explanation for
3796 -fsanitize-coverage option.
3797 * config/i386/i386.opt: Fix typo.
3798
3799 2018-03-28 Jakub Jelinek <jakub@redhat.com>
3800 Martin Liska <mliska@suse.cz>
3801
3802 PR sanitizer/85081
3803 * gimplify.c (asan_poison_variable): Don't do the check for
3804 gimplify_omp_ctxp here.
3805 (gimplify_decl_expr): Do it here.
3806 (gimplify_target_expr): Likewise.
3807
3808 2018-03-28 Martin Liska <mliska@suse.cz>
3809
3810 PR target/84988
3811 * config/i386/i386.c (ix86_function_arg_advance): Do not call
3812 chkp_type_bounds_count if MPX is not enabled.
3813
3814 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
3815
3816 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
3817
3818 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3819
3820 PR target/84914
3821 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
3822 function to create the function decl for complex long double
3823 multiply and divide for -mabi=ieeelongdouble.
3824 (init_float128_ieee): Call it.
3825
3826 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
3827
3828 PR target/85044
3829 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
3830 -fcf-protection=branch -mibt.
3831 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
3832
3833 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3834
3835 PR target/81863
3836 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
3837
3838 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
3839
3840 PR target/85056
3841 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
3842 extern array declarations.
3843
3844 2018-03-27 Richard Biener <rguenther@suse.de>
3845
3846 PR middle-end/84067
3847 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
3848 explicit single_use checks.
3849
3850 2018-03-27 Richard Biener <rguenther@suse.de>
3851
3852 PR tree-optimization/85082
3853 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
3854 Valueize the VUSE.
3855
3856 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3857
3858 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
3859 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
3860 Turn on fasynchronous-unwind-tables and funwind-tables.
3861
3862 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
3863
3864 PR target/85073
3865 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
3866 (*bmi_blsr_<mode>_ccz): Ditto.
3867
3868 2018-03-26 Tom de Vries <tom@codesourcery.com>
3869
3870 PR tree-optimization/85063
3871 * omp-general.c (offloading_function_p): New function. Factor out
3872 of ...
3873 * omp-offload.c (pass_omp_target_link::gate): ... here.
3874 * omp-general.h (offloading_function_p): Declare.
3875 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
3876 with attribute omp declare target for offloading functions.
3877
3878 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
3879
3880 PR tree-optimization/84005
3881 * tree-data-ref.h (get_base_for_alignment): Declare.
3882 * tree-data-ref.c (get_base_for_alignment_1): New function.
3883 (get_base_for_alignment): Likewise.
3884 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
3885 get_base_for_alignment to find a suitable base object, instead
3886 of always using drb->base_address.
3887
3888 2018-03-23 Jakub Jelinek <jakub@redhat.com>
3889
3890 PR inline-asm/85022
3891 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
3892 known size by default.
3893
3894 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
3895
3896 PR inline-asm/85030
3897 * lra-constraints.c (process_alt_operands): Don't match BLKmode
3898 and non BLKmode operands.
3899
3900 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3901
3902 PR target/85026
3903 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
3904 Clean up attributes.
3905
3906 2018-03-23 Richard Biener <rguenther@suse.de>
3907
3908 PR debug/85020
3909 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
3910 we are going to emit early debug for LTO.
3911
3912 2018-03-23 Jakub Jelinek <jakub@redhat.com>
3913
3914 PR inline-asm/85034
3915 * function.c (match_asm_constraints_1): Don't optimize if input
3916 doesn't satisfy general_operand predicate for output's mode.
3917
3918 PR inline-asm/85022
3919 * alias.c (write_dependence_p): Don't require for x_canonicalized
3920 non-VOIDmode if x has VOIDmode.
3921
3922 PR sanitizer/85029
3923 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
3924 just don't try to optimize it rather than assert it never happens.
3925
3926 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3927
3928 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
3929 macro expansions for definition of ST_INTERNAL_<mode> and
3930 LD_INTERNAL_<mode> builtins.
3931 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
3932 Remove prototype.
3933 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
3934 function.
3935 (altivec_expand_st_builtin): Likewise.
3936 (altivec_expand_builtin): Remove calls to deleted functions.
3937 (rs6000_address_for_altivec): Delete this function.
3938 * config/rs6000/vector.md: Remove expands for
3939 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
3940
3941 2018-03-22 Sudakshina Das <sudi.das@arm.com>
3942
3943 PR target/84826
3944 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
3945 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
3946 re-computing once computed.
3947 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
3948 (arm_init_machine_status): Initialize
3949 machine->static_chain_stack_bytes.
3950
3951 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3952
3953 PR target/84760
3954 * doc/extend.texi: Add four new prototypes for vec_ld.
3955 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
3956 definitions for more logical presentation.
3957 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
3958 entries for V1TI variants of __builtin_altivec_ld builtin.
3959 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
3960 handling of V1TI variant of LVX icode pattern.
3961 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
3962 (rs6000_gimple_fold_builtin): Likewise.
3963 (altivec_init_builtins): Add code to define
3964 __builtin_altivec_lvx_v1ti function.
3965
3966 2018-03-22 Jakub Jelinek <jakub@redhat.com>
3967
3968 PR inline-asm/84941
3969 * function.c (match_asm_constraints_1): Don't do the optimization
3970 if input isn't a REG, SUBREG, MEM or constant.
3971
3972 2018-03-22 Tom de Vries <tom@codesourcery.com>
3973
3974 PR tree-optimization/84956
3975 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
3976 bb_has_abnormal_pred.
3977
3978 2018-03-22 Jakub Jelinek <jakub@redhat.com>
3979
3980 PR sanitizer/85018
3981 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
3982 DECL_INITIAL (decl) to decl at the end.
3983 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
3984 adjust the comment.
3985
3986 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3987
3988 * doc/extend.texi (__builtin_tgmath): Document when complex
3989 integer types are treated as _Complex _Float64.
3990
3991 2018-03-21 Tom de Vries <tom@codesourcery.com>
3992
3993 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
3994
3995 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3996
3997 PR tree-optimization/84960
3998 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
3999 if it is ENTRY block, move them into single succ of ENTRY in that case.
4000
4001 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
4002
4003 PR tree-optimization/84811
4004 * poly-int.h (poly_span_traits): Remove the T3 parameter and
4005 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
4006 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
4007 (known_subrange_p): Update accordingly. Cast each value involved
4008 in the size comparison, rather than casting the result of the
4009 subtraction.
4010
4011 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4012
4013 PR tree-optimization/84982
4014 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
4015 by flipping the least significant bit rather than all bits from
4016 bitpos to bitpos + bitsize - 1.
4017
4018 2018-03-21 Nathan Sidwell <nathan@acm.org>
4019
4020 * doc/extend.texi (Deprecated Features): Remove mention of
4021 long-deleted deprecations.
4022
4023 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4024
4025 PR jit/84288
4026 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
4027 * configure: Regenerate.
4028
4029 2018-03-21 Tom de Vries <tom@codesourcery.com>
4030
4031 PR tree-optimization/83126
4032 * tree-parloops.c (num_phis): New function.
4033 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
4034
4035 2018-03-21 Nathan Sidwell <nathan@acm.org>
4036
4037 * doc/extend.texi (Deprecated Features): Update deprecated flags,
4038 mention anon-struct/union members and trailing attributes.
4039
4040 2018-03-21 Bin Cheng <bin.cheng@arm.com>
4041
4042 PR tree-optimization/84969
4043 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
4044 builtin memset partitions if they set different rhs values.
4045
4046 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4047
4048 PR rtl-optimization/84989
4049 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
4050 VEC_DUPLICATE with scalar result mode.
4051
4052 2018-03-21 Martin Liska <mliska@suse.cz>
4053
4054 PR ipa/84963
4055 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
4056 not intended return statement.
4057
4058 2018-03-21 Martin Liska <mliska@suse.cz>
4059
4060 PR target/84988
4061 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
4062 (chkp_find_bound_slots_1): Limit number of iterations.
4063
4064 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
4065
4066 PR target/84838
4067 * Minor grammar fixes for x86 options.
4068
4069 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4070
4071 PR debug/84875
4072 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
4073 holding REG_CFA_RESTORE notes, instead turn them into a USE.
4074
4075 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
4076
4077 PR target/83789
4078 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
4079 (altivec_lvx_<mode>_1op): Likewise.
4080 (altivec_stvx_<mode>_2op): Likewise.
4081 (altivec_stvx_<mode>_1op): Likewise.
4082 (altivec_lvx_<VM2:mode>): New define_expand.
4083 (altivec_stvx_<VM2:mode>): Likewise.
4084 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
4085 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4086 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
4087 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4088 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
4089 (rs6000_gen_lvx): Likewise.
4090 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
4091 (altivec_expand_stv_builtin): Likewise.
4092 (altivec_expand_builtin): Likewise.
4093 * config/rs6000/vector.md: Likewise.
4094
4095 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4096
4097 PR target/82518
4098 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
4099 BYTES_BIG_ENDIAN.
4100
4101 2018-03-20 Richard Biener <rguenther@suse.de>
4102
4103 PR target/84986
4104 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
4105 sign-conversions as zero, fall back to standard scalar_stmt
4106 cost for the rest.
4107
4108 2018-03-20 Martin Liska <mliska@suse.cz>
4109
4110 PR ipa/84825
4111 * predict.c (rebuild_frequencies): Handle case when we have
4112 PROFILE_ABSENT, but flag_guess_branch_prob is false.
4113
4114 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4115
4116 PR target/84990
4117 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
4118 flag_section_anchors.
4119 * varasm.c (use_blocks_for_decl_p): Remove hack for
4120 dw2_force_const_mem.
4121
4122 PR target/84845
4123 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
4124 to ...
4125 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
4126 be created, use lowpart_subreg of operands[0] rather than operands[0]
4127 itself.
4128 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
4129 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
4130 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
4131 and n constraint instead of aarch64_shift_imm_di and Usd.
4132 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
4133 (*aarch64_<optab>_reg_minus<mode>3): ... this.
4134
4135 2018-03-20 Sudakshina Das <sudi.das@arm.com>
4136
4137 PR target/82989
4138 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
4139 to favor GPR over NEON registers.
4140 (<shift>di3_neon): Likewise.
4141
4142 2018-03-20 Tom de Vries <tom@codesourcery.com>
4143
4144 PR target/84952
4145 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
4146 (nvptx_process_pars): Emit bar.sync asap and alap.
4147
4148 2018-03-20 Tom de Vries <tom@codesourcery.com>
4149
4150 PR target/84954
4151 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
4152 seen_label if seen_label is already set.
4153
4154 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4155
4156 PR target/84945
4157 * config/i386/i386.c (fold_builtin_cpu): For features above 31
4158 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
4159 Use 1U instead of 1. Formatting fixes.
4160
4161 PR c/84953
4162 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
4163 instead of TREE_TYPE (s1) for the return value.
4164
4165 2018-03-19 Jakub Jelinek <jakub@redhat.com>
4166
4167 PR tree-optimization/84946
4168 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
4169 bitsize + bitsize in poly_uint64 rather than poly_int64.
4170
4171 PR sanitizer/78651
4172 * dwarf2asm.c: Include fold-const.c.
4173 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
4174 of decl rather than decl itself.
4175
4176 PR rtl-optimization/84643
4177 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
4178
4179 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
4180
4181 PR sanitizer/78651
4182 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
4183 calling assemble_variable.
4184
4185 2018-03-19 Sudakshina Das <sudi.das@arm.com>
4186
4187 PR target/81647
4188 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
4189 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
4190
4191 2018-03-19 Jim Wilson <jimw@sifive.com>
4192
4193 PR bootstrap/84856
4194 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
4195 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
4196 (riscv_first_stack_step): Likewise.
4197 (riscv_option_override): Use STACK_BOUNDARY instead of
4198 MIN_STACK_BOUNDARY.
4199 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
4200 MIN_STACK_BOUNDARY.
4201 (BIGGEST_ALIGNMENT): Set to 128.
4202 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
4203 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
4204 STACK_BOUNDARY.
4205
4206 2018-03-19 Richard Biener <rguenther@suse.de>
4207
4208 PR tree-optimization/84933
4209 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
4210 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
4211
4212 2018-03-19 Richard Biener <rguenther@suse.de>
4213
4214 PR tree-optimization/84859
4215 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
4216 (cond_if_else_store_replacement): Perform sinking operation on
4217 single-store BBs regardless of MAX_STORES_TO_SINK setting.
4218 Generalize what a BB with a single eligible store is.
4219
4220 2018-03-19 Richard Biener <rguenther@suse.de>
4221
4222 PR tree-optimization/84929
4223 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
4224 chrec_is_positive against non-chrec arg.
4225
4226 2018-03-19 Tamar Christina <tamar.christina@arm.com>
4227
4228 PR target/84711
4229 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
4230
4231 2018-03-18 Martin Liska <mliska@suse.cz>
4232
4233 PR rtl-optimization/84635
4234 * regrename.c (build_def_use): Use matches_mode only when
4235 matches >= 0.
4236
4237 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
4238
4239 PR tree-optimization/84913
4240 * tree-vect-loop.c (vectorizable_reduction): Don't try to
4241 vectorize chains of COND_EXPRs.
4242
4243 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4244
4245 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
4246
4247 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4248
4249 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
4250
4251 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4252
4253 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
4254
4255 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4256 Kito Cheng <kito.cheng@gmail.com>
4257
4258 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
4259 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
4260 (nds32_adjust_reg_alloc_order): New function.
4261 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
4262
4263 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
4264
4265 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
4266 nds32_print_operand, nds32_print_operand_address): Use
4267 HOST_WIDE_INT_PRINT_DEC instead.
4268
4269 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4270
4271 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
4272
4273 2018-03-17 Jakub Jelinek <jakub@redhat.com>
4274
4275 PR target/84902
4276 * config/i386/i386.c (initial_ix86_tune_features,
4277 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
4278 unsigned long long.
4279 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
4280 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
4281 rather than 1u << ix86_tune. Formatting fix.
4282 (ix86_option_override_internal): Change ix86_arch_mask from
4283 unsigned int to unsigned HOST_WIDE_INT, initialize to
4284 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
4285 (ix86_function_specific_restore): Likewise.
4286
4287 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4288
4289 PR target/84899
4290 * postreload.c (reload_combine_recognize_pattern): Perform
4291 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
4292 truncate_int_for_mode the result for the destination's mode.
4293
4294 PR c/84909
4295 * hsa-gen.c (mem_type_for_type): Fix comment typo.
4296 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
4297 Likewise.
4298 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4299 Likewise.
4300
4301 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
4302
4303 PR target/84876
4304 * lra-assigns.c (lra_split_hard_reg_for): Don't use
4305 regno_allocno_class_array and sorted_pseudos.
4306 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
4307 insns where regno is used.
4308
4309 2018-03-16 Martin Liska <mliska@suse.cz>
4310
4311 PR ipa/84833
4312 * multiple_target.c (create_dispatcher_calls): Redirect
4313 reference in the symbol table.
4314
4315 2018-03-16 Martin Liska <mliska@suse.cz>
4316
4317 PR ipa/84722
4318 * multiple_target.c (create_dispatcher_calls): Redirect also
4319 an alias.
4320
4321 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4322
4323 PR c++/79937
4324 PR c++/82410
4325 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
4326 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
4327 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
4328
4329 2018-03-16 Julia Koval <julia.koval@intel.com>
4330
4331 * doc/invoke.texi (Skylake Server): Add CLWB.
4332 Cannonlake): Remove CLWB.
4333
4334 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4335
4336 PR tree-optimization/84841
4337 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
4338 1 << 3.
4339 (FLOAT_ONE_CONST_TYPE): Define.
4340 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
4341 (sort_by_operand_rank): Put entries with higher constant_type last
4342 rather than first to match comments.
4343
4344 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
4345
4346 * config/nios2/nios2.md (movsi_internal): Fix thinko in
4347 split predicate.
4348
4349 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4350
4351 PR c++/79085
4352 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
4353 check and use address of target always.
4354
4355 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
4356
4357 PR target/84574
4358 * config/i386/i386.c (indirect_thunk_needed): Update comments.
4359 (indirect_thunk_bnd_needed): Likewise.
4360 (indirect_thunks_used): Likewise.
4361 (indirect_thunks_bnd_used): Likewise.
4362 (indirect_return_needed): New.
4363 (indirect_return_bnd_needed): Likewise.
4364 (output_indirect_thunk_function): Add a bool argument for
4365 function return.
4366 (output_indirect_thunk_function): Don't generate alias for
4367 function return thunk.
4368 (ix86_code_end): Call output_indirect_thunk_function to generate
4369 function return thunks.
4370 (ix86_output_function_return): Set indirect_return_bnd_needed
4371 and indirect_return_needed instead of indirect_thunk_bnd_needed
4372 and indirect_thunk_needed.
4373
4374 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
4375
4376 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
4377 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
4378 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
4379
4380 2018-03-15 David Malcolm <dmalcolm@redhat.com>
4381 Paul Hua <paul.hua.gm@gmail.com>
4382
4383 PR c/84852
4384 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
4385
4386 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
4387
4388 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
4389 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
4390 resp. SFmode cases.
4391
4392 2018-03-15 Tamar Christina <tamar.christina@arm.com>
4393
4394 PR target/84711
4395 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4396 instead of GET_MODE_SIZE when comparing Units.
4397
4398 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4399
4400 PR target/68256
4401 * varasm.c (hash_section): Return an unchangeble hash value
4402 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
4403 Return !aarch64_can_use_per_function_literal_pools_p ().
4404
4405 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4406
4407 PR target/84860
4408 * optabs.c (emit_conditional_move): Pass address of cmode's copy
4409 rather than address of cmode as last argument to prepare_cmp_insn.
4410
4411 2018-03-15 Julia Koval <julia.koval@intel.com>
4412
4413 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
4414 F_AVX512VNNI, F_AVX512BITALG): New.
4415
4416 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
4417
4418 PR target/83451
4419 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
4420 insn for floating-point loads and stores.
4421
4422 2018-03-14 Carl Love <cel@us.ibm.com>
4423
4424 * config/rs6000/rs6000-c.c: Add macro definitions for
4425 ALTIVEC_BUILTIN_VEC_PERMXOR.
4426 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
4427 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
4428 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
4429 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
4430 UNSPEC_VPERMXOR.
4431 * config/doc/extend.texi: Add prototypes for vec_permxor.
4432
4433 2018-03-14 David Malcolm <dmalcolm@redhat.com>
4434
4435 PR c/84852
4436 * diagnostic-show-locus.c (class layout_point): Convert m_line
4437 from int to linenum_type.
4438 (line_span::comparator): Use linenum "compare" function when
4439 comparing line numbers.
4440 (test_line_span): New function.
4441 (layout_range::contains_point): Convert param "row" from int to
4442 linenum_type.
4443 (layout_range::intersects_line_p): Likewise.
4444 (layout::will_show_line_p): Likewise.
4445 (layout::print_source_line): Likewise.
4446 (layout::should_print_annotation_line_p): Likewise.
4447 (layout::print_annotation_line): Likewise.
4448 (layout::print_leading_fixits): Likewise.
4449 (layout::annotation_line_showed_range_p): Likewise.
4450 (struct line_corrections): Likewise for field m_row.
4451 (line_corrections::line_corrections): Likewise for param "row".
4452 (layout::print_trailing_fixits): Likewise.
4453 (layout::get_state_at_point): Likewise.
4454 (layout::get_x_bound_for_row): Likewise.
4455 (layout::print_line): Likewise.
4456 (diagnostic_show_locus): Likewise for locals "last_line" and
4457 "row".
4458 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
4459 * input.c (selftest::test_linenum_comparisons): New function.
4460 (selftest::input_c_tests): Call it.
4461 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
4462 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
4463 * selftest.h (ASSERT_GT): New macro.
4464 (ASSERT_GT_AT): New macro.
4465 (ASSERT_LT): New macro.
4466 (ASSERT_LT_AT): New macro.
4467
4468 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
4469
4470 PR rtl-optimization/84780
4471 * combine.c (distribute_links): Don't make a link based on pc_rtx.
4472
4473 2018-03-14 Martin Liska <mliska@suse.cz>
4474
4475 * tree.c (record_node_allocation_statistics): Use
4476 get_stats_node_kind.
4477 (get_stats_node_kind): New function extracted from
4478 record_node_allocation_statistics.
4479 (free_node): Use get_stats_node_kind.
4480
4481 2018-03-14 Richard Biener <rguenther@suse.de>
4482
4483 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
4484 that the value-set of ANTIC_IN doesn't grow.
4485
4486 Revert
4487 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4488 member.
4489 (BB_VISITED_WITH_VISITED_SUCCS): New define.
4490 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4491
4492 2018-03-14 Julia Koval <julia.koval@intel.com>
4493
4494 * config.gcc (icelake-client, icelake-server): New.
4495 (icelake): Remove.
4496 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
4497 (initial_ix86_arch_features): Ditto.
4498 (PTA_SKYLAKE): Add SGX.
4499 (PTA_ICELAKE): Remove.
4500 (PTA_ICELAKE_CLIENT): New.
4501 (PTA_ICELAKE_SERVER): New.
4502 (ix86_option_override_internal): Split up icelake on icelake client and
4503 icelake server.
4504 (get_builtin_code_for_version): Ditto.
4505 (fold_builtin_cpu): Ditto.
4506 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
4507 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
4508 * config/i386/i386.h (processor_type): Ditto.
4509 * doc/invoke.texi: Ditto.
4510
4511 2018-03-14 Jakub Jelinek <jakub@redhat.com>
4512
4513 PR sanitizer/83392
4514 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
4515 INTEGER_CST offset, add it together with bitpos / 8 and
4516 sign extend based on POINTER_SIZE.
4517
4518 PR target/84844
4519 Revert
4520 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
4521
4522 PR target/78090
4523 * config/i386/constraints.md (Yc): New register constraint.
4524 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
4525 Use Yc constraint for alternative 2 of operand 0. Remove
4526 preferred_for_speed attribute.
4527
4528 2018-03-14 Richard Biener <rguenther@suse.de>
4529
4530 PR tree-optimization/84830
4531 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
4532 with the old one to avoid oscillations.
4533
4534 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
4535
4536 PR target/83712
4537 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
4538 pseudos.
4539 (assign_by_spills): Return a flag of reload assignment failure.
4540 Do not process the reload assignment failures. Do not spill other
4541 reload pseudos if they has the same reg class. Update n if
4542 necessary.
4543 (lra_assign): Add a return arg. Set up from the result of
4544 assign_by_spills call.
4545 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4546 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4547 usage_insns if it is not NULL.
4548 (spill_hard_reg_in_range): New function.
4549 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4550 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4551 function prototypes.
4552 (lra_assign): Change prototype.
4553 * lra.c (lra): Add code to deal with fails by splitting hard reg
4554 live ranges.
4555
4556 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
4557
4558 * config/riscv/riscv.opt (mrelax): New option.
4559 * config/riscv/riscv.c (riscv_file_start): Emit ".option
4560 "norelax" when riscv_mrelax is disabled.
4561 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
4562
4563 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4564
4565 PR target/84743
4566 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
4567 reassociation for int modes.
4568
4569 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4570
4571 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
4572 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
4573 for big-endian.
4574 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
4575 * config/aarch64/aarch64-sve.md
4576 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
4577 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
4578 (*extend<mode><Vwide>2): Rename to...
4579 (aarch64_sve_extend<mode><Vwide>2): ...this.
4580 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
4581 renaming the old pattern to...
4582 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
4583 unsigned packs.
4584 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
4585 define_expand, renaming the old pattern to...
4586 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
4587 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
4588 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
4589 account when deciding which SVE instruction the optab should use.
4590 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
4591
4592 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4593
4594 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
4595 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
4596 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
4597 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
4598 (tlsdesc_small_<mode>): Turn a define_expand and use
4599 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
4600 (tlsdesc_small_advsimd_<mode>): ...this.
4601 (tlsdesc_small_sve_<mode>): New pattern.
4602
4603 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4604
4605 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
4606 (UNSPEC_UMUL_HIGHPART): New constants.
4607 (MUL_HIGHPART): New int iteraor.
4608 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
4609 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
4610 define_expand.
4611 (*<su>mul<mode>3_highpart): New define_insn.
4612
4613 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4614
4615 PR lto/84805
4616 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4617 incomplete types.
4618
4619 2018-03-13 Martin Liska <mliska@suse.cz>
4620
4621 PR ipa/84658.
4622 * (sem_item_optimizer::sem_item_optimizer): Initialize new
4623 vector.
4624 (sem_item_optimizer::~sem_item_optimizer): Release it.
4625 (sem_item_optimizer::merge_classes): Register variable aliases.
4626 (sem_item_optimizer::fixup_pt_set): New function.
4627 (sem_item_optimizer::fixup_points_to_sets): Likewise.
4628 * ipa-icf.h: Declare new variables and functions.
4629
4630 2018-03-13 Jakub Jelinek <jakub@redhat.com>
4631
4632 PR middle-end/84834
4633 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
4634 integer_pow2p@2 and test integer_pow2p in condition.
4635 (A < 0 ? C : 0): Similarly for @1.
4636
4637 PR middle-end/84831
4638 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
4639 characters starting at p contain '\0' character, don't look beyond
4640 that.
4641
4642 PR target/84827
4643 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
4644 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
4645
4646 PR target/84828
4647 * reg-stack.c (change_stack): Change update_end var from int to
4648 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
4649 also call set_block_for_insn on the newly added insns and rescan.
4650
4651 PR target/84786
4652 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
4653 on the last operand.
4654
4655 PR c++/84704
4656 * tree.c (stabilize_reference_1): Return save_expr (e) for
4657 STATEMENT_LIST even if it doesn't have side-effects.
4658
4659 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
4660
4661 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
4662
4663 2018-03-12 Renlin Li <renlin.li@arm.com>
4664
4665 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
4666 aarch64_output_scalar_simd_mov_immediate.
4667
4668 2018-03-12 Martin Sebor <msebor@redhat.com>
4669
4670 PR tree-optimization/83456
4671 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
4672 for perfectly overlapping calls to memcpy.
4673 (gimple_fold_builtin_memory_chk): Same.
4674 (gimple_fold_builtin_strcpy): Handle no-warning.
4675 (gimple_fold_builtin_stxcpy_chk): Same.
4676 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
4677
4678 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4679
4680 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
4681 parameter. Use it for SFmode.
4682 (rs6000_function_arg_advance_1): Adjust.
4683 (rs6000_function_arg): Adjust.
4684 (rs6000_gimplify_va_arg): Pass false for that new parameter.
4685
4686 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4687
4688 PR rtl-optimization/84169
4689 PR rtl-optimization/84780
4690 * combine.c (can_combine_p): Check for a 2-insn combination whether
4691 the destination register is used between the two insns, too.
4692
4693 2018-03-12 Richard Biener <rguenther@suse.de>
4694
4695 PR tree-optimization/84803
4696 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
4697 for refs DR analysis didn't process.
4698
4699 2018-03-12 Richard Biener <rguenther@suse.de>
4700
4701 PR tree-optimization/84777
4702 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
4703 force-vectorize loops ignore whether we are optimizing for size.
4704
4705 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
4706
4707 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
4708 (TARGET_MD_ASM_ADJUST): Define.
4709
4710 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
4711 Kito Cheng <kito.cheng@gmail.com>
4712 Chung-Ju Wu <jasonwucj@gmail.com>
4713
4714 * config/nds32/nds32.c (nds32_compute_stack_frame,
4715 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
4716 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
4717 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
4718 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
4719 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
4720 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
4721 * config/nds32/nds32.md (prologue, epilogue): Use macro
4722 NDS32_V3PUSH_AVAILABLE_P to do checking.
4723
4724 2018-03-11 Jakub Jelinek <jakub@redhat.com>
4725
4726 PR debug/58150
4727 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
4728 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
4729 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
4730 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
4731 addition of most attributes on !orig_type_die or the attribute not
4732 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
4733
4734 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4735 Chung-Ju Wu <jasonwucj@gmail.com>
4736
4737 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
4738 __NDS32_VH__ macro.
4739 * config/nds32/nds32.opt (mvh): New option.
4740
4741 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4742 Chung-Ju Wu <jasonwucj@gmail.com>
4743
4744 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
4745 function.
4746 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
4747 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
4748 definition.
4749
4750 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4751 Chung-Ju Wu <jasonwucj@gmail.com>
4752
4753 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
4754 function.
4755 * config/nds32/nds32-multiple.md (strlensi): New pattern.
4756 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
4757
4758 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
4759 Kito Cheng <kito.cheng@gmail.com>
4760 Chung-Ju Wu <jasonwucj@gmail.com>
4761
4762 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
4763 UNSPEC_FFMISM and UNSPEC_FLMISM.
4764 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
4765 for ffb, ffmism and flmism.
4766 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
4767 (unspec_ffmism): Ditto.
4768 (unspec_flmism): Ditto.
4769 (nds32_expand_builtin_impl): Check if string extension is available.
4770 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
4771 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
4772
4773 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
4774
4775 Reverting patch:
4776 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
4777
4778 PR target/83712
4779 * lra-assigns.c (assign_by_spills): Return a flag of reload
4780 assignment failure. Do not process the reload assignment
4781 failures. Do not spill other reload pseudos if they has the same
4782 reg class.
4783 (lra_assign): Add a return arg. Set up from the result of
4784 assign_by_spills call.
4785 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4786 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4787 usage_insns if it is not NULL.
4788 (spill_hard_reg_in_range): New function.
4789 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4790 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4791 function prototypes.
4792 (lra_assign): Change prototype.
4793 * lra.c (lra): Add code to deal with fails by splitting hard reg
4794 live ranges.
4795
4796 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
4797
4798 PR target/84807
4799 * config/i386/i386.opt: Replace Enforcment with Enforcement.
4800
4801 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
4802
4803 PR debug/84620
4804 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
4805 (dw_val_node): Add val_symbolic_view.
4806 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
4807 (symview_upper_bound): New.
4808 (new_line_info_table): Initialize symviews_since_reset.
4809 (dwarf2out_source_line): Count symviews_since_reset and set
4810 symview_upper_bound.
4811 (dw_val_equal_p): Handle symview.
4812 (add_AT_symview): New.
4813 (print_dw_val): Handle symview.
4814 (attr_checksum, attr_checksum_ordered): Likewise.
4815 (same_dw_val_p, size_of_die): Likewise.
4816 (value_format, output_die): Likewise.
4817 (add_high_low_attributes): Use add_AT_symview for entry_view.
4818 (dwarf2out_finish): Reset symview_upper_bound, clear
4819 zero_view_p.
4820
4821 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
4822
4823 PR target/83969
4824 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
4825 Add strict argument and use it.
4826 (rs6000_split_multireg_move): Update for new strict argument.
4827 (mem_operand_gpr): Disallow all non-offsettable addresses.
4828 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
4829
4830 2018-03-09 Jakub Jelinek <jakub@redhat.com>
4831
4832 PR target/84772
4833 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
4834 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
4835 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
4836
4837 PR c++/84767
4838 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
4839 decl, use remap_type if we want to use the type.
4840
4841 2018-03-09 Martin Sebor <msebor@redhat.com>
4842
4843 PR tree-optimization/84526
4844 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4845 Remove dead code.
4846 (builtin_access::generic_overlap): Be prepared to handle non-array
4847 base objects.
4848
4849 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
4850
4851 PR rtl-optimization/84682
4852 * lra-constraints.c (process_address_1): Check is_address flag
4853 for address constraints.
4854 (process_alt_operands): Likewise.
4855 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
4856 preprocess_constraints.
4857 * recog.h (preprocess_constraints): Add oploc parameter.
4858 Adjust callers.
4859 * recog.c (preprocess_constraints): Test address_operand for
4860 CT_ADDRESS constraints.
4861
4862 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
4863
4864 PR target/83712
4865 * lra-assigns.c (assign_by_spills): Return a flag of reload
4866 assignment failure. Do not process the reload assignment
4867 failures. Do not spill other reload pseudos if they has the same
4868 reg class.
4869 (lra_assign): Add a return arg. Set up from the result of
4870 assign_by_spills call.
4871 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4872 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4873 usage_insns if it is not NULL.
4874 (spill_hard_reg_in_range): New function.
4875 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4876 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4877 function prototypes.
4878 (lra_assign): Change prototype.
4879 * lra.c (lra): Add code to deal with fails by splitting hard reg
4880 live ranges.
4881
4882 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4883
4884 PR target/83193
4885 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
4886 Accept complain bool parameter. Only emit errors if it is true.
4887 (arm_parse_cpu_option_name): Likewise.
4888 (arm_target_thumb_only): Adjust callers of the above.
4889 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
4890 prototype to take a default true bool parameter.
4891 (arm_parse_arch_option_name): Likewise.
4892
4893 2018-03-09 David Malcolm <dmalcolm@redhat.com>
4894 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4895
4896 PR jit/64089
4897 PR jit/84288
4898 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
4899 * configure: Regenerate.
4900 * configure.ac ("linker --version-script option"): New.
4901 ("linker soname option"): New.
4902
4903 2018-03-09 Richard Biener <rguenther@suse.de>
4904
4905 PR tree-optimization/84775
4906 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
4907 immediate uses of predicate stmts and mark them modified.
4908
4909 Revert
4910 PR tree-optimization/84178
4911 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4912 to caller.
4913 (version_loop_for_if_conversion): Delay update_ssa call.
4914 (tree_if_conversion): Delay update_ssa until after predicate
4915 insertion.
4916
4917 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
4918
4919 PR target/84763
4920 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
4921 when the function accesses prior frames.
4922
4923 2018-03-08 Jakub Jelinek <jakub@redhat.com>
4924
4925 PR debug/84456
4926 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
4927 gen_llsym, otherwise call maybe_gen_llsym.
4928
4929 PR inline-asm/84742
4930 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
4931 has ',' character inside of it.
4932
4933 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4934
4935 PR target/84748
4936 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
4937 as clobbering CC_REGNUM.
4938
4939 2018-03-08 Richard Biener <rguenther@suse.de>
4940
4941 PR middle-end/84552
4942 * tree-scalar-evolution.c: Include tree-into-ssa.h.
4943 (follow_copies_to_constant): Do not follow SSA names registered
4944 for update.
4945
4946 2018-03-08 Richard Biener <rguenther@suse.de>
4947
4948 PR tree-optimization/84178
4949 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4950 to caller.
4951 (version_loop_for_if_conversion): Delay update_ssa call.
4952 (tree_if_conversion): Delay update_ssa until after predicate
4953 insertion.
4954
4955 2018-03-08 David Malcolm <dmalcolm@redhat.com>
4956
4957 PR tree-optimization/84178
4958 * tree-if-conv.c (release_bb_predicate): Remove the
4959 the assertion that the stmts have NULL use_ops.
4960 Discard the statements, asserting that they haven't
4961 yet been added to a BB.
4962
4963 2018-03-08 Richard Biener <rguenther@suse.de>
4964
4965 PR tree-optimization/84746
4966 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
4967 (phi_translate): Pass in destination ANTIC_OUT set.
4968 (phi_translate_1): Likewise. For a simplified result lookup
4969 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
4970 (phi_translate_set): Adjust.
4971 (do_pre_regular_insertion): Likewise.
4972 (do_pre_partial_partial_insertion): Likewise.
4973
4974 2018-03-08 Martin Liska <mliska@suse.cz>
4975
4976 PR gcov-profile/84735
4977 * doc/gcov.texi: Document usage of profile files.
4978 * gcov-io.h: Document changes in the format.
4979
4980 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
4981
4982 PR debug/84404
4983 PR debug/84408
4984 * dwarf2out.c (struct dw_line_info_table): Update comments for
4985 view == -1.
4986 (FORCE_RESET_NEXT_VIEW): New.
4987 (FORCE_RESETTING_VIEW_P): New.
4988 (RESETTING_VIEW_P): Check for -1 too.
4989 (ZERO_VIEW_P): Likewise.
4990 (new_line_info_table): Force-reset next view.
4991 (dwarf2out_begin_function): Likewise.
4992 (dwarf2out_source_line): Simplify zero_view_p initialization.
4993 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
4994 view directly. Omit view when omitting .loc at line 0.
4995
4996 2018-03-08 Jakub Jelinek <jakub@redhat.com>
4997
4998 PR tree-optimization/84740
4999 * tree-switch-conversion.c (process_switch): Call build_constructors
5000 only if info.phi_count is non-zero.
5001
5002 PR tree-optimization/84739
5003 * tree-tailcall.c (find_tail_calls): Check call arguments against
5004 DECL_ARGUMENTS (current_function_decl) rather than
5005 DECL_ARGUMENTS (func) when checking for tail recursion.
5006
5007 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5008
5009 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
5010 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
5011 Volker Reichelt's entry and add entries for people that perform
5012 GCC fuzzy testing and report numerous bugs.
5013
5014 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
5015
5016 PR target/82411
5017 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
5018 readonly data in sdata, if that is disabled.
5019 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
5020 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
5021 -mreadonly-in-sdata option.
5022
5023 2018-03-07 Martin Sebor <msebor@redhat.com>
5024
5025 PR tree-optimization/84468
5026 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
5027 basic block when looking for nul assignment.
5028
5029 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
5030
5031 PR target/84277
5032 * except.h (output_function_exception_table): Adjust prototype.
5033 * except.c (output_function_exception_table): Remove FNNAME parameter
5034 and add SECTION parameter. Ouput one part of the table at a time.
5035 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
5036 the first part of the exception table and emit unwind directives.
5037 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
5038 (i386_pe_seh_cold_init): Likewise.
5039 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
5040 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
5041 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
5042 (ix86_output_call_insn): Emit a nop in one more case for SEH.
5043 * config/i386/winnt.c: Include except.h.
5044 (struct seh_frame_state): Add reg_offset, after_prologue and
5045 in_cold_section fields.
5046 (i386_pe_seh_end_prologue): Set seh->after_prologue.
5047 (i386_pe_seh_cold_init): New function.
5048 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
5049 to seh->in_cold_section.
5050 (seh_emit_push): Record the offset of the push.
5051 (seh_emit_save): Record the offet of the save.
5052 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
5053 Test seh->after_prologue to disregard the epilogue.
5054 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
5055 (i386_pe_end_cold_function): New function.
5056
5057 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5058
5059 PR fortran/84565
5060 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
5061 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
5062
5063 PR c++/84704
5064 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
5065 on tmp_var.
5066 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
5067 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
5068
5069 PR middle-end/84723
5070 * multiple_target.c: Include tree-inline.h and intl.h.
5071 (expand_target_clones): Diagnose and fail if node->definition and
5072 !tree_versionable_function_p (node->decl).
5073
5074 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
5075
5076 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
5077 sprint_ul.
5078 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
5079 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
5080 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
5081
5082 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5083
5084 PR target/84710
5085 * combine.c (try_combine): Use reg_or_subregno instead of handling
5086 just paradoxical SUBREGs and REGs.
5087
5088 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
5089
5090 * config/arc/arc.c (arc_finalize_pic): Remove function.
5091 (arc_must_save_register): We use single base PIC register, remove
5092 checks to save/restore the PIC register.
5093 (arc_expand_prologue): Likewise.
5094 * config/arc/arc-protos.h (arc_set_default_type_attributes):
5095 Remove.
5096 (arc_verify_short): Likewise.
5097 (arc_attr_type): Likewise.
5098 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
5099 (walk_stores): Likewise.
5100 (arc_address_cost): Make it static.
5101 (arc_verify_short): Likewise.
5102 (branch_dest): Likewise.
5103 (arc_attr_type): Likewise.
5104 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
5105 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
5106 (arc_final_prescan_insn): Remove inserting the nops due to
5107 hardware hazards. It is done in reorg step.
5108 (insn_length_variant_t): Remove.
5109 (insn_length_parameters_t): Likewise.
5110 (arc_insn_length_parameters): Likewise.
5111 (arc_get_insn_variants): Likewise.
5112 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
5113
5114 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5115
5116 PR inline-asm/84683
5117 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
5118 assertion failure.
5119
5120 PR tree-optimization/84687
5121 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
5122 on new_node->decl.
5123 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
5124
5125 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5126
5127 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
5128 Rename to ppc_speculation_barrier.
5129 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
5130 __builtin_ppc_speculation_barrier.
5131
5132 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5133
5134 PR target/84700
5135 * combine.c (combine_simplify_rtx): Don't try to simplify if
5136 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
5137 are equal to x.
5138
5139 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
5140
5141 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
5142 to 32 bytes when compiling for POWER9.
5143
5144 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5145
5146 PR target/84564
5147 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
5148 regparm >= 3 with no arg reg available also for calls with
5149 flag_force_indirect_call. Pass decl to ix86_function_regparm.
5150
5151 PR target/84524
5152 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
5153 orig,vex.
5154 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
5155
5156 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
5157
5158 PR target/84264
5159 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
5160
5161 2018-03-05 Richard Biener <rguenther@suse.de>
5162
5163 PR tree-optimization/84486
5164 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
5165 When inserting a __builtin_assume_aligned call set the LHS
5166 SSA name alignment info accordingly.
5167
5168 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
5169
5170 PR tree-optimization/84114
5171 * config/aarch64/aarch64.c (aarch64_reassociation_width)
5172 Avoid reassociation of FLOAT_MODE addition.
5173
5174 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
5175
5176 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
5177 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
5178 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
5179 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
5180 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
5181 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
5182 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
5183 and -mwbnoinvd.
5184 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
5185 __builtin_ia32_wbinvd): New builtins.
5186 (SPECIAL_ARGS2): New.
5187 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
5188 (SPECIAL_ARGS2): New.
5189 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
5190 (ix86_valid_target_attribute_inner_p): Ditto.
5191 (ix86_init_mmx_sse_builtins): Add special_args2.
5192 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
5193 TARGET_WBNOINVD_P): New.
5194 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
5195 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
5196 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
5197 * config/i386/immintrin.h (_wbinvd): New intrinsic.
5198 * config/i386/pconfigintrin.h: New file.
5199 * config/i386/wbnoinvdintrin.h: Ditto.
5200 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
5201 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
5202
5203 2018-03-05 Richard Biener <rguenther@suse.de>
5204
5205 PR tree-optimization/84670
5206 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5207 member.
5208 (BB_VISITED_WITH_VISITED_SUCCS): New define.
5209 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5210 (compute_antic_aux): Only assert the number of values in ANTIC_IN
5211 doesn't grow if all successors (recursively) were visited at least
5212 once.
5213
5214 2018-03-05 Richard Biener <rguenther@suse.de>
5215
5216 PR tree-optimization/84650
5217 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
5218 if executed in the loop pipeline.
5219
5220 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
5221
5222 * doc/configfiles.texi (Configuration Files): Move info about
5223 conditionalizing $target-protos.h to...
5224 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
5225 differs from $target-protos.h.
5226
5227 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
5228 Chung-Ju Wu <jasonwucj@gmail.com>
5229
5230 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
5231 * config/nds32/nds32-multiple.md (setmemsi): Define.
5232 * config/nds32/nds32-memory-manipulation.c
5233 (nds32_gen_dup_4_byte_to_word_value): New.
5234 (emit_setmem_word_loop): New.
5235 (emit_setmem_byte_loop): New.
5236 (nds32_expand_setmem_loop): New.
5237 (nds32_expand_setmem_loop_v3m): New.
5238 (nds32_expand_setmem_unroll): New.
5239 (nds32_expand_setmem): New.
5240
5241 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5242 Chung-Ju Wu <jasonwucj@gmail.com>
5243
5244 * config/nds32/nds32-memory-manipulation.c
5245 (nds32_emit_load_store): New.
5246 (nds32_emit_post_inc_load_store): New.
5247 (nds32_emit_mem_move): New.
5248 (nds32_emit_mem_move_block): New.
5249 (nds32_expand_movmemsi_loop_unknown_size): New.
5250 (nds32_expand_movmemsi_loop_known_size): New.
5251 (nds32_expand_movmemsi_loop): New.
5252 (nds32_expand_movmemsi_unroll): New.
5253 (nds32_expand_movmemqi): Rename ...
5254 (nds32_expand_movmemsi): ... to this.
5255 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
5256 (movmemsi): ... to this.
5257 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
5258 (nds32_expand_movmemsi): ... to this.
5259
5260 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5261 Monk Chiang <sh.chiang04@gmail.com>
5262 Chung-Ju Wu <jasonwucj@gmail.com>
5263
5264 * config/nds32/nds32-protos.h
5265 (nds32_expand_load_multiple): New arguments.
5266 (nds32_expand_store_multiple): Ditto.
5267 (nds32_valid_multiple_load_store): Rename ...
5268 (nds32_valid_multiple_load_store_p): ... to this.
5269 * config/nds32/nds32-memory-manipulation.c
5270 (nds32_expand_load_multiple): Refine implementation.
5271 (nds32_expand_store_multiple): Ditto.
5272 * config/nds32/nds32-multiple.md
5273 (load_multiple): Update nds32_expand_load_multiple interface.
5274 (store_multiple): Update nds32_expand_store_multiple interface.
5275 * config/nds32/nds32-predicates.c
5276 (nds32_valid_multiple_load_store): Rename ...
5277 (nds32_valid_multiple_load_store_p): ... to this and refine
5278 implementation.
5279 * config/nds32/predicates.md
5280 (nds32_load_multiple_and_update_address_operation): New predicate.
5281 (nds32_store_multiple_and_update_address_operation): New predicate.
5282
5283 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5284 Chung-Ju Wu <jasonwucj@gmail.com>
5285
5286 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
5287 (combo): New attribute.
5288 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
5289
5290 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
5291
5292 * config/nds32/nds32.opt: Change -mcmodel= default value.
5293
5294 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
5295 Monk Chiang <sh.chiang04@gmail.com>
5296 Chung-Ju Wu <jasonwucj@gmail.com>
5297
5298 * config/nds32/constants.md (unspec_element): New enum.
5299 * config/nds32/constraints.md (Umw): New constraint.
5300 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
5301 * config/nds32/nds32-intrinsic.md: Likewise.
5302 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
5303 (nds32_valid_smw_lwm_base_p): New.
5304 (nds32_output_smw_single_word): New.
5305 (nds32_output_lmw_single_word): New.
5306 (nds32_expand_unaligned_load): New.
5307 (nds32_expand_unaligned_store): New.
5308 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
5309 (nds32_output_smw_single_word): Declare.
5310 (nds32_output_lmw_single_word): Declare.
5311 (nds32_expand_unaligned_load): Declare.
5312 (nds32_expand_unaligned_store): Declare.
5313 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
5314 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
5315 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
5316 NDS32_BUILTIN_UASTORE_DW.
5317 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
5318 predicate.
5319
5320 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
5321 Kito Cheng <kito.cheng@gmail.com>
5322 Chung-Ju Wu <jasonwucj@gmail.com>
5323
5324 * config/nds32/nds32-intrinsic.c
5325 (nds32_expand_builtin_null_ftype_reg): Delete.
5326 (nds32_expand_builtin_reg_ftype_imm): Ditto.
5327 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
5328 (nds32_read_argument): New.
5329 (nds32_legitimize_target): Ditto.
5330 (nds32_legitimize_argument): Ditto.
5331 (nds32_check_constant_argument): Ditto.
5332 (nds32_expand_unop_builtin): Ditto.
5333 (nds32_expand_unopimm_builtin): Ditto.
5334 (nds32_expand_binop_builtin): Ditto.
5335 (nds32_builtin_decl_impl): Ditto.
5336 (builtin_description): Ditto.
5337 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
5338 (nds32_init_builtins_impl): Ditto.
5339 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
5340 (nds32_builtin_decl): New.
5341 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
5342 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
5343
5344 2018-03-02 Jeff Law <law@redhat.com>
5345
5346 * reorg.c (stop_search_p): Handle DEBUG_INSN.
5347 (redundant_insn, fill_simple_delay_slots): Likewise.
5348 (fill_slots_from_thread): Likewise.
5349 * resource.c (mark_referenced_resources): Likewise.
5350 (mark_set_resources, find_dead_or_set_registers): Likewise.
5351
5352 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5353
5354 * substring-locations.h (format_warning_va): Formatting fix for
5355 ATTRIBUTE_GCC_DIAG.
5356 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
5357 argument.
5358 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
5359 * substring-locations.c: Include intl.h.
5360 (format_warning_va): Turned into small wrapper around
5361 format_warning_n_va, renamed to ...
5362 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
5363 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
5364 use ngettext.
5365 (format_warning_at_substring_n): New function.
5366 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
5367 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
5368 format_warning_at_substring with just a shorter name instead of
5369 const function pointer.
5370 (fmtwarn_n): New function.
5371 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
5372 appropriate, get rid of all the fmtstr temporaries, move conditionals
5373 with G_() wrapped string literals directly into fmtwarn arguments,
5374 cast dir.len to (int), formatting fixes.
5375
5376 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5377
5378 * doc/invoke.texi: Remove "Cilk Plus" references.
5379
5380 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5381 Richard Biener <rguenther@suse.de>
5382
5383 PR ipa/84628
5384 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
5385 for error or warning attributes if CALL_FROM_THUNK_P is set.
5386 Formatting fixes.
5387
5388 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5389
5390 PR target/56540
5391 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
5392 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
5393
5394 PR target/56540
5395 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
5396 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
5397
5398 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
5399 instead of -1U in last predictors element's probability member.
5400
5401 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5402
5403 PR ipa/83983
5404 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5405 arguments if they are comparable.
5406
5407 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5408
5409 PR tree-optimization/84634
5410 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
5411 masks and masked_loop_p with a single loop_masks, making sure it's
5412 null for bb vectorization.
5413
5414 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5415
5416 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5417 (vect_analyze_data_ref_access): Use loop->safe_len rather than
5418 loop->force_vectorize to check whether there is no alias.
5419
5420 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5421
5422 PR target/84614
5423 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
5424 prototypes.
5425 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
5426 comments.
5427 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
5428 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
5429 instead of a loop around prev_real_insn.
5430 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
5431 prev_real_insn.
5432
5433 PR inline-asm/84625
5434 * config/i386/i386.c (ix86_print_operand): Use conditional
5435 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
5436 zero vector.
5437
5438 2018-03-02 Richard Biener <rguenther@suse.de>
5439
5440 PR tree-optimization/84427
5441 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
5442 (bitmap_set_subtract_values): Rewrite to handle multiple
5443 exprs per value.
5444 (clean): Likewise.
5445 (prune_clobbered_mems): Likewise.
5446 (phi_translate): Take edge instead of pred/phiblock.
5447 (phi_translate_1): Likewise.
5448 (phi_translate_set): Likewise. Insert all translated
5449 exprs for a value into the set, keeping possibly multiple
5450 expressions per value.
5451 (compute_antic_aux): Adjust for phi_translate changes.
5452 When intersecting union the expressions and prune those
5453 not in the final value set, keeping possibly multiple
5454 expressions per value. Do not use value-insertion
5455 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
5456 all expressions. Add verification that the value-sets
5457 only shrink during iteration.
5458 (compute_partial_antic_aux): Adjust for the phi_translate changes.
5459 (do_pre_regular_insertion): Likewise.
5460 (do_pre_partial_partial_insertion): Likewise.
5461
5462 2018-03-02 Richard Biener <rguenther@suse.de>
5463
5464 PR target/82005
5465 * config/darwin.c (saved_debug_info_level): New static global.
5466 (darwin_asm_lto_start): Disable debug info generation for LTO out.
5467 (darwin_asm_lto_end): Restore debug info generation settings.
5468
5469 2018-03-01 Martin Liska <mliska@suse.cz>
5470
5471 PR sanitizer/82484
5472 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
5473 volatile arguments.
5474
5475 2018-03-01 Richard Biener <rguenther@suse.de>
5476
5477 PR debug/84645
5478 * dwarf2out.c (gen_variable_die): Properly handle late VLA
5479 type annotation with LTO when debug was disabled at compile-time.
5480
5481 2018-03-01 Matthew Fortune <mfortune@gmail.com>
5482
5483 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
5484 XINT with INTVAL.
5485 (mips_final_postscan_insn): Likewise.
5486
5487 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
5488
5489 PR rtl-optimization/84528
5490 * alias.c (init_alias_target): Add commentary.
5491 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
5492 a unique base value if the frame pointer is not eliminated
5493 to the stack pointer.
5494
5495 2018-03-01 Tom de Vries <tom@codesourcery.com>
5496
5497 PR rtl-optimization/83327
5498 * lra-int.h (hard_regs_spilled_into): Declare.
5499 * lra.c (hard_regs_spilled_into): Define.
5500 (init_reg_info): Init hard_regs_spilled_into.
5501 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
5502 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
5503 (process_bb_lives): Handle hard_regs_spilled_into.
5504 (lra_create_live_ranges_1): Before doing liveness propagation, clear
5505 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
5506
5507 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
5508
5509 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
5510 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
5511 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
5512 * config/rs6000/aix72.h: New file.
5513
5514 2018-02-28 Jakub Jelinek <jakub@redhat.com>
5515
5516 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
5517 instead of warning_at with conditional singular and plural messages
5518 where possible.
5519
5520 PR target/52991
5521 * stor-layout.c (update_alignment_for_field): For
5522 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
5523 && !DECL_PACKED (field), do the alignment update, just use
5524 only desired_align instead of MAX (type_align, desired_align)
5525 as the alignment.
5526 (place_field): Don't do known_align < desired_align handling
5527 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
5528 is non-NULL, instead do it after rli->prev_field handling and
5529 only if not within a bitfield word. For DECL_PACKED (field)
5530 use type_align of BITS_PER_UNIT.
5531
5532 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5533
5534 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
5535 superfluous parentheses and trailing spaces.
5536
5537 2018-02-28 Richard Biener <rguenther@suse.de>
5538
5539 PR tree-optimization/84584
5540 * graphite-scop-detection.c (scop_detection::add_scop): Discard
5541 SCoPs with fake exit edge.
5542
5543 2018-02-28 Martin Liska <mliska@suse.cz>
5544
5545 PR testsuite/84597
5546 * timevar.c (timer::print): Fix format to properly print 100%
5547 values.
5548
5549 2018-02-28 Richard Biener <rguenther@suse.de>
5550
5551 PR middle-end/84607
5552 * genmatch.c (capture_info::walk_match): Do not mark
5553 captured expressions without operands as expr_p given
5554 they act more like predicates and should be subject to
5555 "lost tail" side-effect preserving.
5556
5557 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
5558
5559 PR rtl-optimization/81611
5560 * auto-inc-dec.c (attempt_change): Move dead note from
5561 mem_insn if it's the next use of regno
5562 (find_address): Take address use of reg holding
5563 non-incremented value. Add parm to limit search to the named
5564 reg only.
5565 (merge_in_block): Attempt to use a mem insn that is the next
5566 use of the original regno.
5567
5568 2018-02-27 Martin Sebor <msebor@redhat.com>
5569
5570 PR c++/83871
5571 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
5572 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
5573
5574 2018-02-27 Martin Sebor <msebor@redhat.com>
5575
5576 PR translation/84207
5577 * diagnostic-core.h (warning_n, error_n, inform_n): Change
5578 n argument to unsigned HOST_WIDE_INT.
5579 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
5580 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
5581 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
5582 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
5583
5584 2018-02-27 Richard Biener <rguenther@suse.de>
5585
5586 PR tree-optimization/84512
5587 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5588 Do not use the estimate returned from record_stmt_cost for
5589 the scalar iteration cost but sum properly using add_stmt_cost.
5590
5591 2018-02-27 Richard Biener <rguenther@suse.de>
5592
5593 PR tree-optimization/84466
5594 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5595 Adjust last change to less strictly validate use operands.
5596
5597 2018-02-27 Martin Liska <mliska@suse.cz>
5598
5599 PR gcov-profile/84548
5600 * gcov.c (process_file): Allow partial overlap and consider it
5601 also as group functions.
5602 (output_lines): Properly calculate range of lines for a group.
5603
5604 2018-02-27 Martin Liska <mliska@suse.cz>
5605
5606 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
5607 'ggc' suffixes. Change first column width.
5608 (timer::print): Fix formatting of the column.
5609
5610 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
5611
5612 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
5613 preserve inline entry blocks for the sake of debug inline
5614 entry point markers alone.
5615 (remove_unused_locals): Suggest in comments a better place to
5616 force the preservation of inline entry blocks that are
5617 otherwise unused, but do not preserve them.
5618
5619 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5620
5621 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
5622
5623 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5624
5625 PR target/84039
5626 * config/i386/constraints.md (Bs): Replace
5627 ix86_indirect_branch_register with
5628 TARGET_INDIRECT_BRANCH_REGISTER.
5629 (Bw): Likewise.
5630 * config/i386/i386.md (indirect_jump): Likewise.
5631 (tablejump): Likewise.
5632 (*sibcall_memory): Likewise.
5633 (*sibcall_value_memory): Likewise.
5634 Peepholes of indirect call and jump via memory: Likewise.
5635 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
5636 (*sibcall_value_GOT_32): Likewise.
5637 * config/i386/predicates.md (indirect_branch_operand): Likewise.
5638 (GOT_memory_operand): Likewise.
5639 (call_insn_operand): Likewise.
5640 (sibcall_insn_operand): Likewise.
5641 (GOT32_symbol_operand): Likewise.
5642 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
5643
5644 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5645
5646 PR rtl-optimization/83496
5647 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
5648 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
5649 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
5650 redundant insn, if any.
5651 (relax_delay_slots): Likewise.
5652 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
5653
5654 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
5655
5656 PR tree-optimization/83965
5657 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
5658 that grouped statements are part of a reduction chain. Return
5659 true if the statement is not marked as a reduction itself but
5660 is part of a group.
5661 (vect_recog_dot_prod_pattern): Don't check whether the statement
5662 is part of a group here.
5663 (vect_recog_sad_pattern): Likewise.
5664 (vect_recog_widen_sum_pattern): Likewise.
5665
5666 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5667
5668 PR debug/84545
5669 * final.c (rest_of_clean_state): Also look for calls inside sequences.
5670
5671 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5672
5673 PR target/84530
5674 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
5675 the bool argument.
5676 (ix86_output_indirect_function_return): New prototype.
5677 (ix86_split_simple_return_pop_internal): Likewise.
5678 * config/i386/i386.c (indirect_return_via_cx): New.
5679 (indirect_return_via_cx_bnd): Likewise.
5680 (indirect_thunk_name): Handle return va CX_REG.
5681 (output_indirect_thunk_function): Create alias for
5682 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
5683 (ix86_output_indirect_jmp): Remove the bool argument.
5684 (ix86_output_indirect_function_return): New function.
5685 (ix86_split_simple_return_pop_internal): Likewise.
5686 * config/i386/i386.md (*indirect_jump): Don't pass false
5687 to ix86_output_indirect_jmp.
5688 (*tablejump_1): Likewise.
5689 (simple_return_pop_internal): Change it to define_insn_and_split.
5690 Call ix86_split_simple_return_pop_internal to split it for
5691 -mfunction-return=.
5692 (simple_return_indirect_internal): Call
5693 ix86_output_indirect_function_return instead of
5694 ix86_output_indirect_jmp.
5695
5696 2018-02-26 Jakub Jelinek <jakub@redhat.com>
5697
5698 PR bootstrap/84405
5699 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
5700 memset and value initialization afterwards.
5701
5702 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
5703
5704 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
5705
5706 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5707
5708 PR target/84521
5709 * common/config/aarch64/aarch64-common.c
5710 (aarch_option_optimization_table[]): Switch
5711 off fomit-frame-pointer
5712
5713 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
5714 Chung-Ju Wu <jasonwucj@gmail.com>
5715
5716 * config/nds32/nds32-multiple.md (load_multiple): Disallow
5717 volatile memory.
5718 (store_multiple): Ditto.
5719
5720 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
5721
5722 * config.gcc: Add --with-cpu support for nds32 target.
5723 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
5724 * config/nds32/nds32.opt: Add -mcpu= option.
5725
5726 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
5727
5728 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
5729 isel=yes): Warn for these deprecated options.
5730
5731 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
5732
5733 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
5734 ISA_2_5_MASKS_EMBEDDED.
5735
5736 2018-02-23 Jakub Jelinek <jakub@redhat.com>
5737
5738 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
5739 p->max as pointers rather than using iterative_hash_expr.
5740
5741 2018-02-23 Carl Love <cel@us.ibm.com>
5742
5743 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
5744 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
5745 BU_P8V_OVERLOAD_2.
5746 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
5747 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
5748 P8V_BUILTIN_VEC_VUNSIGNED2.
5749
5750 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
5751
5752 PR target/81572
5753 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
5754 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
5755 LRA_UNKNOWN_ALT.
5756 * lra-constraints.c (curr_insn_transform): Set up
5757 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
5758 LRA_UNKNOWN_ALT.
5759 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
5760 * lra-eliminations.c (spill_pseudos): Ditto.
5761 (process_insn_for_elimination): Ditto.
5762 * lra-lives.c (reg_early_clobber_p): Use the new macros.
5763 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
5764 LRA_NON_CLOBBERED_ALT.
5765
5766 2018-02-22 Martin Sebor <msebor@redhat.com>
5767
5768 PR tree-optimization/84480
5769 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
5770 to maybe_diag_stxncpy_trunc. Call it.
5771 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
5772 from gimple_fold_builtin_strcpy. Print inlining stack.
5773 (handle_builtin_stxncpy): Print inlining stack.
5774 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
5775
5776 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
5777
5778 PR target/84176
5779 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
5780 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
5781 and -fcheck-pointer-bounds are used together.
5782 (indirect_thunk_prefix): New enum.
5783 (indirect_thunk_need_prefix): New function.
5784 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
5785 "_nt" instead of "_bnd" for NOTRACK prefix.
5786 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
5787 (output_indirect_thunk_function): Likewise.
5788 (): Likewise.
5789 (ix86_code_end): Update output_indirect_thunk_function calls.
5790 (ix86_output_indirect_branch_via_reg): Replace
5791 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
5792 (ix86_output_indirect_branch_via_push): Likewise.
5793 (ix86_output_function_return): Likewise.
5794 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
5795 incompatible with -fcf-protection=branch and
5796 -fcheck-pointer-bounds.
5797
5798 2018-02-22 Steve Ellcey <sellcey@cavium.com>
5799
5800 PR target/83335
5801 * config/aarch64/aarch64.c (aarch64_print_address_internal):
5802 Change gcc_assert call to output_operand_lossage.
5803
5804 2018-02-22 Steve Ellcey <sellcey@cavium.com>
5805
5806 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
5807
5808 2018-02-22 DJ Delorie <dj@redhat.com>
5809 Sebastian Perta <sebastian.perta@renesas.com>
5810 Oleg Endo <olegendo@gcc.gnu.org>
5811
5812 * config/rx/rx.c (rx_rtx_costs): New function.
5813 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
5814
5815 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
5816
5817 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
5818
5819 2018-02-22 Martin Liska <mliska@suse.cz>
5820
5821 PR driver/83193
5822 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
5823 Add "native" as a possible value.
5824
5825 2018-02-22 Martin Liska <mliska@suse.cz>
5826
5827 PR driver/83193
5828 * config/i386/i386.c (ix86_option_override_internal):
5829 Add "native" as a possible value for -march and -mtune.
5830
5831 2018-02-22 Jakub Jelinek <jakub@redhat.com>
5832
5833 PR target/84502
5834 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
5835 to all type variants.
5836
5837 PR tree-optimization/84503
5838 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
5839 width as info->bitpos + info->bitsize - start.
5840 (merged_store_group::merge_overlapping): Simplify width computation.
5841 (check_no_overlap): New function.
5842 (imm_store_chain_info::try_coalesce_bswap): Compute expected
5843 start + width and last_order of the group, fail if check_no_overlap
5844 fails.
5845 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
5846 to group if check_no_overlap fails.
5847
5848 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
5849
5850 * config/rs6000/altivec.md: Delete contraint arguments to
5851 define_expand, define_split, and define_peephole2, and in
5852 define_insn_and_split if always unused.
5853 * config/rs6000/darwin.md: Ditto.
5854 * config/rs6000/dfp.md: Ditto.
5855 * config/rs6000/rs6000.md: Ditto.
5856 * config/rs6000/sync.md: Ditto.
5857 * config/rs6000/vector.md: Ditto.
5858 * config/rs6000/vsx.md: Ditto.
5859
5860 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
5861
5862 * config/rs6000/altivec.md: Write output control strings as braced
5863 blocks instead of double-quoted strings.
5864 * config/rs6000/darwin.md: Ditto.
5865 * config/rs6000/rs6000.md: Ditto.
5866 * config/rs6000/vector.md: Ditto.
5867 * config/rs6000/vsx.md: Ditto.
5868
5869 2018-02-21 Jason Merrill <jason@redhat.com>
5870
5871 PR c++/84314 - ICE with templates and fastcall attribute.
5872 * attribs.c (build_type_attribute_qual_variant): Remove assert.
5873
5874 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
5875
5876 * ipa-cp.c (determine_versionability): Fix comment typos.
5877
5878 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
5879
5880 PR c/84229
5881 * ipa-cp.c (determine_versionability): Do not version functions caling
5882 va_arg_pack.
5883
5884 2018-02-21 Martin Liska <mliska@suse.cz>
5885
5886 PR driver/83193
5887 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
5888 Add "native" as a possible value.
5889 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
5890 the macro when native cpu detection is available.
5891
5892 2018-02-21 Martin Liska <mliska@suse.cz>
5893
5894 PR driver/83193
5895 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
5896 Add "native" as a possible value.
5897 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
5898 when native cpu detection is available.
5899
5900 2018-02-21 Jakub Jelinek <jakub@redhat.com>
5901 Martin Sebor <msebor@redhat.com>
5902
5903 PR tree-optimization/84478
5904 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
5905 false.
5906 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
5907 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
5908 support which is conservatively correct, for 2 only stay conservative
5909 for maxlen. Formatting and comment capitalization fixes. Add STRICT
5910 argument to the 2 argument get_range_strlen, adjust 6 arg
5911 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
5912 false.
5913 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
5914 (gimple_fold_builtin_strlen): Pass true as last argument to
5915 get_range_strlen.
5916
5917 2018-02-20 Martin Sebor <msebor@redhat.com>
5918
5919 PR middle-end/84095
5920 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
5921 (builtin_memref::set_base_and_offset): Same. Handle inner references.
5922 (builtin_memref::builtin_memref): Factor out parts into
5923 set_base_and_offset and call it.
5924
5925 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
5926
5927 PR middle-end/84406
5928 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
5929 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
5930 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
5931 search at the associated MODE_INT.
5932
5933 2018-02-20 Jeff Law <law@redhat.com>
5934
5935 PR middle-end/82123
5936 PR tree-optimization/81592
5937 PR middle-end/79257
5938 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
5939 for range data rather than using global data.
5940 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
5941 range data rather than using global data.
5942 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
5943 pass it to children as needed.
5944 (struct directive::fmtresult): Similarly.
5945 (struct directive::set_width): Similarly.
5946 (struct directive::set_precision): Similarly.
5947 (format_integer, format_directive, parse_directive): Similarly.
5948 (format_none): Accept unnamed vr_values parameter.
5949 (format_percent, format_floating, format_character): Similarly.
5950 (format_string, format_plain): Similarly.
5951 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
5952 the EVRP range analyzer for range data rather than using global data.
5953 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
5954 gimple-ssa-evrp-analyze.h
5955 (class sprintf_dom_walker): Add after_dom_children member function.
5956 Add evrp_range_analyzer member.
5957 (sprintf_dom_walker::before_dom_children): Call into the EVRP
5958 range analyzer as needed.
5959 (sprintf_dom_walker::after_dom_children): New member function.
5960 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
5961 if not optimizing.
5962 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
5963 (evrp_range_analyzer::pop_to_marker): Likewise.
5964
5965 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
5966
5967 PR tree-optimization/84419
5968 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
5969 with the required type if its current type is compatible but
5970 different.
5971
5972 2018-02-20 Jakub Jelinek <jakub@redhat.com>
5973
5974 PR middle-end/82004
5975 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
5976 after vectorization.
5977
5978 2018-02-20 Martin Liska <mliska@suse.cz>
5979
5980 PR driver/83193
5981 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
5982 possible values if we don't have a hint.
5983
5984 2018-02-20 Martin Liska <mliska@suse.cz>
5985
5986 PR c/84310
5987 PR target/79747
5988 * final.c (shorten_branches): Build align_tab array with one
5989 more element.
5990 * opts.c (finish_options): Add alignment option limit check.
5991 (MAX_CODE_ALIGN): Likewise.
5992 (MAX_CODE_ALIGN_VALUE): Likewise.
5993 * doc/invoke.texi: Document maximum allowed option value for
5994 all -falign-* options.
5995
5996 2018-02-19 Jakub Jelinek <jakub@redhat.com>
5997
5998 PR target/84146
5999 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
6000 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
6001 * var-tracking.c (emit_note_insn_var_location): Remove all references
6002 to NOTE_INSN_CALL_ARG_LOCATION.
6003 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
6004 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
6005 Use copy_rtx_if_shared.
6006 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
6007 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
6008 (dwarf2out_var_location): Remove handling of
6009 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
6010 on call_insn.
6011 * final.c (final_scan_insn): Remove all references to
6012 NOTE_INSN_CALL_ARG_LOCATION.
6013 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
6014 before dumping final insns.
6015 * except.c (emit_note_eh_region_end): Remove all references to
6016 NOTE_INSN_CALL_ARG_LOCATION.
6017 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
6018 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
6019 * config/arc/arc.c (hwloop_optimize): Likewise.
6020 * config/arm/arm.c (create_fix_barrier): Likewise.
6021 * config/s390/s390.c (s390_chunkify_start): Likewise.
6022 * config/sh/sh.c (find_barrier): Likewise.
6023 * config/i386/i386.c (rest_of_insert_endbranch,
6024 ix86_seh_fixup_eh_fallthru): Likewise.
6025 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
6026 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
6027 * config/frv/frv.c (frv_function_prologue): Likewise.
6028 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
6029 reg note.
6030 (note_outside_basic_block_p): Remove all references to
6031 NOTE_INSN_CALL_ARG_LOCATION.
6032 * gengtype.c (adjust_field_rtx_def): Likewise.
6033 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
6034 Likewise.
6035 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
6036 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
6037
6038 PR c++/84444
6039 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
6040 is ADDR_EXPR.
6041
6042 PR tree-optimization/84452
6043 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
6044 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
6045 is NULL.
6046
6047 2018-02-19 Martin Liska <mliska@suse.cz>
6048
6049 PR sanitizer/82183
6050 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
6051
6052 2018-02-19 Martin Liska <mliska@suse.cz>
6053 Richard Sandiford <richard.sandiford@linaro.org>
6054
6055 PR tree-optimization/82491
6056 * gimple-fold.c (get_base_constructor): Make earlier bail out
6057 to prevent ubsan.
6058
6059 2018-02-19 Carl Love <cel@us.ibm.com>
6060
6061 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
6062 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
6063 BU_P8V_OVERLOAD_1.
6064 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
6065 P8V_BUILTIN_VEC_NEG.
6066
6067 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
6068
6069 * config/rl78/rl78.md (movdf): New define expand.
6070
6071 2018-02-19 Martin Liska <mliska@suse.cz>
6072
6073 PR other/80589
6074 * doc/invoke.texi: Fix typo.
6075 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
6076
6077 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
6078
6079 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6080 handle rs6000_single_float and rs6000_double_float specially for
6081 e500 family CPUs.
6082
6083 2018-02-16 Jeff Law <law@redhat.com>
6084
6085 * config/rx/rx.c (add_pop_cfi_notes): New function.;
6086 (pop_regs): Use it.
6087
6088 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6089
6090 PR ipa/84425
6091 * ipa-inline.c (inline_small_functions): Fix a typo.
6092
6093 2018-02-16 Nathan Sidwell <nathan@acm.org>
6094
6095 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
6096
6097 2018-02-16 Carl Love <cel@us.ibm.com>
6098
6099 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
6100 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
6101 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
6102 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
6103 expansion to P8V_BUILTIN_VEC_FLOAT2.
6104
6105 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
6106
6107 PR rtl-optimization/70023
6108 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
6109 src_regno into account.
6110
6111 2018-02-16 Carl Love <cel@us.ibm.com>
6112
6113 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
6114 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
6115 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
6116 * config/rs6000/rs6000.c: Remove case statements for
6117 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
6118 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
6119 and P9V_BUILTIN_VEC_VINSERT4B.
6120 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
6121 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
6122 * config/rs6000/vsx.md:
6123 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
6124 vec_insert4b.
6125
6126 2018-02-16 Carl Love <cel@us.ibm.com>
6127
6128 * config/rs6000/altivec.h: Add builtin names vec_extract4b
6129 vec_insert4b.
6130 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
6131 definitions.
6132 * config/rs6000/rs6000-c.c: Add the definitions for
6133 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
6134 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
6135 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
6136 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
6137 definition for insert4b and define insn *insert3b_internal.
6138 * doc/extend.texi: Add documentation for vec_extract4b.
6139
6140 2018-02-16 Nathan Sidwell <nathan@acm.org>
6141
6142 * doc/extend.texi (Backwards Compatibility): Mention friend
6143 injection. Note for-scope is deprecated.
6144 * doc/invoke.texi (-ffriend-injection): Deprecate.
6145
6146 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
6147
6148 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
6149 that moved to I2, also allow destinations that are a paradoxical
6150 subreg (instead of a normal reg).
6151
6152 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
6153
6154 PR target/83831
6155 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
6156 to QImode.
6157
6158 2018-02-16 Richard Biener <rguenther@suse.de>
6159
6160 PR tree-optimization/84037
6161 PR tree-optimization/84016
6162 PR target/82862
6163 * config/i386/i386.c (ix86_builtin_vectorization_cost):
6164 Adjust vec_construct for the fact we need additional higher latency
6165 128bit inserts for AVX256 and AVX512 vector builds.
6166 (ix86_add_stmt_cost): Scale vector construction cost for
6167 elementwise loads.
6168
6169 2018-02-16 Richard Biener <rguenther@suse.de>
6170
6171 PR tree-optimization/84417
6172 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
6173 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
6174 (non_rewritable_lvalue_p): Likewise, use poly-ints.
6175
6176 2018-02-16 Martin Liska <mliska@suse.cz>
6177
6178 PR sanitizer/84307
6179 * internal-fn.def (ASAN_CHECK): Set proper flags.
6180 (ASAN_MARK): Likewise.
6181
6182 2018-02-16 Julia Koval <julia.koval@intel.com>
6183
6184 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
6185 from PTA_CANNONLAKE.
6186
6187 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6188
6189 PR target/84272
6190 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
6191 Use ++iter rather than iter++ for std::list iterators.
6192 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
6193 defer deleting them until all nodes in the forest are processed. Do
6194 free even leaf nodes. Change to_process into auto_vec.
6195
6196 PR bootstrap/84405
6197 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
6198 * vec.h (vec_default_construct): Use memset instead of placement new
6199 if BROKEN_VALUE_INITIALIZATION is defined.
6200 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
6201 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
6202 is defined.
6203
6204 PR rtl-optimization/83723
6205 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
6206 * lra.c (lra_substitute_pseudo): Likewise. If true, use
6207 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
6208 recursive calls.
6209 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
6210 callers.
6211 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
6212
6213 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
6214
6215 PR rtl-optimization/81443
6216 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
6217 from inner REGs to paradoxical SUBREGs.
6218
6219 2018-02-16 Richard Biener <rguenther@suse.de>
6220
6221 PR tree-optimization/84399
6222 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6223 For operands we can analyze at their definition make sure we can
6224 analyze them at each use as well.
6225
6226 2018-02-16 Richard Biener <rguenther@suse.de>
6227
6228 PR tree-optimization/84190
6229 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
6230 volatile accesses if the decl isn't volatile.
6231
6232 2018-02-15 Jason Merrill <jason@redhat.com>
6233
6234 PR c++/84314 - ICE with templates and fastcall attribute.
6235 * attribs.c (build_type_attribute_qual_variant): Don't clobber
6236 TYPE_CANONICAL on an existing type.
6237
6238 2018-02-15 Jakub Jelinek <jakub@redhat.com>
6239
6240 PR tree-optimization/84383
6241 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
6242 dstoff nor call operand_equal_p if dstbase is NULL.
6243
6244 PR tree-optimization/84334
6245 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
6246 also a CONSTANT_CLASS_P, punt.
6247
6248 2018-02-14 Jim Wilson <jimw@sifive.com>
6249
6250 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
6251 first SMALL_OPERAND check. New local min_second_step. Move assert
6252 to where locals are set. Add TARGET_RVC support.
6253 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
6254
6255 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
6256
6257 * doc/invoke.texi: Correct -Wformat-overflow code sample.
6258
6259 2018-02-14 Martin Sebor <msebor@redhat.com>
6260
6261 PR tree-optimization/83698
6262 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
6263 arrays constrain the offset range to their bounds.
6264 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
6265 (builtin_access::overlap): Avoid setting the size of overlap if it's
6266 already been set.
6267 (maybe_diag_overlap): Also consider arrays when deciding what values
6268 of offsets to include in diagnostics.
6269
6270 2018-02-14 Martin Sebor <msebor@redhat.com>
6271
6272 PR c/84108
6273 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
6274 that correspond to the kind of a declaration.
6275
6276 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
6277
6278 PR target/83984
6279 * config/pa/pa.md: Load address of PIC label using the linkage table
6280 if the label is nonlocal.
6281
6282 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
6283
6284 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
6285 warning message if user requests -maltivec=be.
6286 * doc/invoke.texi: Document deprecation of -maltivec=be.
6287
6288 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
6289
6290 PR target/84220
6291 * config/rs6000/rs6000-c.c: Update definitions for
6292 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
6293 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
6294
6295 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6296
6297 PR target/84239
6298 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
6299 add _get_ssp intrinsics. Remove argument from
6300 __builtin_ia32_rdssp[d|q].
6301 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
6302 * config/i386/i386-builtin.def: Remove argument from
6303 __builtin_ia32_rdssp[d|q].
6304 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
6305 ix86_expand_special_args_builtin for _rdssp[d|q].
6306 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
6307 Clear register before usage.
6308 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
6309 Add documentation for new _get_ssp and _inc_ssp intrinsics.
6310
6311 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
6312
6313 PR tree-optimization/84357
6314 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
6315 operand 1 of an ARRAY_REF too.
6316
6317 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
6318
6319 PR target/83831
6320 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
6321 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6322 declarations.
6323 (set_of_reg): New struct.
6324 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
6325 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
6326 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6327 functions.
6328 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
6329 Split into bitclr, bitset, bitinvert patterns if appropriate.
6330 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
6331 use rx_fuse_in_memory_bitop.
6332 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
6333 to named insn, correct maximum insn length.
6334
6335 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
6336
6337 PR target/79242
6338 * machmode.def: Define a complex mode for PARTIAL_INT.
6339 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
6340 MODE_PARTIAL_INT.
6341 * doc/rtl.texi: Document CSPImode.
6342 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
6343 handling.
6344 (msp430_hard_regno_nregs_with_padding): Likewise.
6345
6346 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
6347
6348 PR target/84279
6349 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
6350
6351 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
6352
6353 PR rtl-optimization/84169
6354 * combine.c (try_combine): New variable split_i2i3. Set it to true if
6355 we generated a parallel as new i3 and we split that to new i2 and i3
6356 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
6357 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
6358 those to i2, not i1. Partially rewrite this scan code.
6359
6360 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6361
6362 PR c/82210
6363 * stor-layout.c (place_field): For variable length fields, adjust
6364 offset_align afterwards not just based on the field's alignment,
6365 but also on the size.
6366
6367 PR middle-end/84309
6368 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
6369 of exps and logs in the use_exp2 case.
6370
6371 2018-02-13 Jeff Law <law@redhat.com>
6372
6373 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
6374 entry for "vector".
6375
6376 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
6377 ARGS as unused.
6378
6379 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
6380
6381 PR debug/84342
6382 PR debug/84319
6383 * common.opt (gas-loc-support, gas-locview-support): New.
6384 (ginline-points, ginternal-reset-location-views): New.
6385 * doc/invoke.texi: Document them. Use @itemx where intended.
6386 (gvariable-location-views): Adjust.
6387 * target.def (reset_location_view): New.
6388 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
6389 (TARGET_RESET_LOCATION_VIEW): New.
6390 * doc/tm.texi: Rebuilt.
6391 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
6392 (dwarf2out_default_as_locview_support): New.
6393 (output_asm_line_debug_info): Use option variables.
6394 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
6395 (output_loc_list): Likewise.
6396 (add_high_low_attributes): Check option variables.
6397 Don't output entry view attribute in strict mode.
6398 (gen_inlined_subroutine_die): Check option variables.
6399 (dwarf2out_inline_entry): Likewise.
6400 (init_sections_and_labels): Likewise.
6401 (dwarf2out_early_finish): Likewise.
6402 (maybe_reset_location_view): New, from...
6403 (dwarf2out_var_location): ... here. Call it.
6404 * debug.h (dwarf2out_default_as_loc_support): Declare.
6405 (dwarf2out_default_as_locview_support): Declare.
6406 * hooks.c (hook_int_rtx_insn_0): New.
6407 * hooks.h (hook_int_rtx_insn_0): Declare.
6408 * toplev.c (process_options): Take -gas-loc-support and
6409 -gas-locview-support from dwarf2out. Enable
6410 -gvariable-location-views by default only with locview
6411 assembler support. Enable -ginternal-reset-location-views by
6412 default only if the target defines the corresponding hook.
6413 Enable -ginline-points by default if location views are
6414 enabled; force it disabled if statement frontiers are
6415 disabled.
6416 * tree-inline.c (expand_call_inline): Check option variables.
6417 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6418
6419 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
6420
6421 PR tree-optimization/84321
6422 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
6423 handling. Also check whether the anti-range contains any values
6424 that satisfy the mask; switch to a VR_RANGE if not.
6425
6426 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
6427
6428 PR sanitizer/84340
6429 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
6430
6431 2018-02-13 Martin Jambor <mjambor@suse.cz>
6432
6433 PR c++/83990
6434 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
6435 of call statements, also set location of a load to a temporary.
6436
6437 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
6438
6439 * config/rl78/rl78.c (add_vector_labels): New function.
6440 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
6441 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
6442 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
6443 which checks that no arguments are passed.
6444 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
6445 * doc/extend.texi: Documentation for the new attribute.
6446
6447 2018-02-13 Andreas Schwab <schwab@suse.de>
6448
6449 * config/riscv/linux.h (CPP_SPEC): Define.
6450
6451 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6452
6453 PR target/84335
6454 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
6455 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
6456 OPTION_MASK_ISA_AES as first argument to def_builtin_const
6457 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
6458 instead of OPTION_MASK_ISA_PCLMUL as first argument to
6459 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
6460 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
6461 temporarily for AES and PCLMUL builtins.
6462
6463 PR tree-optimization/84339
6464 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
6465 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
6466 Formatting fixes.
6467
6468 PR middle-end/84309
6469 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
6470 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
6471 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
6472 inline function.
6473 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
6474 inline function.
6475 * omp-simd-clone.h: New file.
6476 * omp-simd-clone.c: Include omp-simd-clone.h.
6477 (expand_simd_clones): No longer static.
6478 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
6479 cgraph.h and omp-simd-clone.h.
6480 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
6481 (vect_recog_widen_shift_pattern): Formatting fix.
6482 (vect_pattern_recog_1): Don't check optab for calls.
6483
6484 PR target/84336
6485 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
6486 operands[2] into a REG before using gen_lowpart on it.
6487
6488 2018-02-12 Jeff Law <law@redhat.com>
6489
6490 PR target/83760
6491 * config/sh/sh.c (find_barrier): Consider a sibling call
6492 a barrier as well.
6493
6494 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
6495 successfully back substituting a reg.
6496
6497 2018-02-12 Richard Biener <rguenther@suse.de>
6498
6499 PR tree-optimization/84037
6500 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
6501 parameter, move visited init to caller.
6502 (vect_slp_analyze_operations): Separate cost from validity
6503 check, initialize visited once for all instances.
6504 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
6505 for all instances.
6506 * tree-vect-stmts.c (vect_model_simple_cost): Make early
6507 out an assert.
6508 (vect_model_promotion_demotion_cost): Likewise.
6509 (vectorizable_bswap): Guard cost modeling with !slp_node
6510 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
6511 SLP stmts.
6512 (vectorizable_call): Likewise.
6513 (vectorizable_conversion): Likewise.
6514 (vectorizable_assignment): Likewise.
6515 (vectorizable_shift): Likewise.
6516 (vectorizable_operation): Likewise.
6517 (vectorizable_store): Likewise.
6518 (vectorizable_load): Likewise.
6519 (vectorizable_condition): Likewise.
6520 (vectorizable_comparison): Likewise.
6521
6522 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
6523
6524 PR sanitizer/84307
6525 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
6526 (ASAN_MARK): Fix fnspec to account for return value, change pointer
6527 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
6528
6529 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6530
6531 PR middle-end/83665
6532 * params.def (inline-min-speedup): Increase from 8 to 15.
6533 (max-inline-insns-auto): Decrease from 40 to 30.
6534 * ipa-split.c (consider_split): Add some buffer for function to
6535 be considered inlining candidate.
6536 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
6537 default values.
6538
6539 2018-02-12 Richard Biener <rguenther@suse.de>
6540
6541 PR tree-optimization/84037
6542 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
6543 matched stmts if we cannot swap the non-matched ones.
6544
6545 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6546
6547 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
6548 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
6549 _mm_maskz_scalef_round_ss): New intrinsics.
6550 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
6551 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
6552 __builtin_ia32_scalefss_round): Remove.
6553 (__builtin_ia32_scalefsd_mask_round,
6554 __builtin_ia32_scalefss_mask_round): New intrinsics.
6555 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
6556 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
6557 ((match_operand:VF_128 2 "<round_nimm_predicate>"
6558 "<round_constraint>")): Changed to ...
6559 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
6560 "<round_scalar_constraint>")): ... this.
6561 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
6562 %0, %1, %2<round_op3>}"): Changed to ...
6563 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
6564 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
6565 %2<round_scalar_mask_op3>}"): ... this.
6566 * config/i386/subst.md (round_scalar_nimm_predicate): New.
6567
6568 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6569
6570 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
6571 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
6572 (_mm_maskz_sqrt_round_ss): New intrinsics.
6573 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
6574 (__builtin_ia32_sqrtsd_mask_round)
6575 (__builtin_ia32_sqrtss_mask_round): New builtins.
6576 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
6577 (__builtin_ia32_sqrtss_round): Remove.
6578 (__builtin_ia32_sqrtsd_mask_round)
6579 (__builtin_ia32_sqrtss_mask_round): New builtins.
6580 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
6581 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
6582 ((match_operand:VF_128 1 "vector_operand"
6583 "xBm,<round_constraint>")): Changed to ...
6584 ((match_operand:VF_128 1 "vector_operand"
6585 "xBm,<round_scalar_constraint>")): ... this.
6586 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
6587 %0, %2, %<iptr>1<round_op3>}): Changed to ...
6588 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
6589 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
6590 %<iptr>1<round_scalar_mask_op3>}): ... this.
6591 ((set_attr "prefix" "<round_prefix>")): Changed to ...
6592 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
6593
6594 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
6595
6596 PR target/84266
6597 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
6598 Cast vec_cmpeq result to correct type.
6599 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
6600 Cast vec_cmpgt result to correct type.
6601
6602 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
6603
6604 * final.c (final_scan_insn_1): Renamed from...
6605 (final_scan_insn): ... this. New wrapper, to recover
6606 seen from the outermost call in recursive ones.
6607 * config/sparc/sparc.c (output_return): Drop seen from call.
6608 (output_sibcall): Likewise.
6609 * config/visium/visium.c (output_branch): Likewise.
6610
6611 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
6612
6613 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
6614 function label.
6615
6616 2018-02-10 Alan Modra <amodra@gmail.com>
6617
6618 PR target/84300
6619 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
6620 Specify LR as an input.
6621
6622 2018-02-10 Jakub Jelinek <jakub@redhat.com>
6623
6624 PR sanitizer/83987
6625 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
6626 remove_member_access_dummy_vars): New functions.
6627 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
6628 lower_omp_1, execute_lower_omp): Use them.
6629
6630 PR rtl-optimization/84308
6631 * shrink-wrap.c (spread_components): Release todo vector.
6632
6633 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
6634
6635 PR rtl-optimization/57193
6636 * ira-color.c (struct allocno_color_data): Add member
6637 conflict_allocno_hard_prefs.
6638 (update_conflict_allocno_hard_prefs): New.
6639 (bucket_allocno_compare_func): Add a preference based on
6640 conflict_allocno_hard_prefs.
6641 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
6642 (color_allocnos): Remove a dead code. Initiate
6643 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
6644
6645 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6646
6647 PR target/84226
6648 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
6649 constraint from =wa to wa. Avoid a subreg on the output operand,
6650 instead use a pseudo and subreg it in a move.
6651 (p9_xxbrd_<mode>): Changed to ...
6652 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
6653 (p9_xxbrd_v2df): New expander.
6654 (p9_xxbrw_<mode>): Changed to ...
6655 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
6656 (p9_xxbrw_v4sf): New expander.
6657
6658 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6659
6660 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
6661
6662 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
6663
6664 PR target/83926
6665 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
6666 multiply in 32-bit mode.
6667 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
6668 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
6669 mode.
6670
6671 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6672
6673 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
6674 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
6675 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
6676 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
6677
6678 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
6679
6680 PR lto/84213
6681 * dwarf2out.c (is_trivial_indirect_ref): New function.
6682 (dwarf2out_late_global_decl): Do not generate a location
6683 attribute for variables that have a non-trivial DECL_VALUE_EXPR
6684 and that are not defined in the current unit.
6685
6686 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6687
6688 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
6689 instead of a libcall for UNORDERED.
6690
6691 2018-02-09 Tamar Christina <tamar.christina@arm.com>
6692
6693 PR target/82641
6694 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
6695 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
6696
6697 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6698
6699 PR target/PR84295
6700 * config/s390/s390.c (s390_set_current_function): Invoke
6701 s390_indirect_branch_settings also if fndecl didn't change.
6702
6703 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
6704
6705 * config/rs6000/rs6000.md (blockage): Set length to zero.
6706
6707 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6708
6709 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
6710
6711 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6712
6713 PR sanitizer/84285
6714 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
6715 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
6716 -static-lib*san.
6717
6718 PR debug/84252
6719 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
6720 PARALLEL incoming that failed vt_get_decl_and_offset check.
6721
6722 PR middle-end/84237
6723 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
6724 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
6725 TREE_READONLY bit.
6726 (get_variable_section): For decls in named .bss* sections pass true as
6727 second argument to bss_initializer_p.
6728
6729 2018-02-09 Marek Polacek <polacek@redhat.com>
6730 Jakub Jelinek <jakub@redhat.com>
6731
6732 PR c++/83659
6733 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
6734 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
6735 Sync some changes from cxx_fold_indirect_ref.
6736
6737 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
6738
6739 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
6740 markers.
6741 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
6742 (BLOCK_INLINE_ENTRY_LABEL): New.
6743 (dwarf2out_var_location): Disregard inline entry markers.
6744 (inline_entry_data): New struct.
6745 (inline_entry_data_hasher): New hashtable type.
6746 (inline_entry_data_hasher::hash): New.
6747 (inline_entry_data_hasher::equal): New.
6748 (inline_entry_data_table): New variable.
6749 (add_high_low_attributes): Add DW_AT_entry_pc and
6750 DW_AT_GNU_entry_view attributes if a pending entry is found
6751 in inline_entry_data_table. Add old entry_pc attribute only
6752 if debug nonbinding markers are disabled.
6753 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
6754 markers are enabled.
6755 (block_within_block_p, dwarf2out_inline_entry): New.
6756 (dwarf2out_finish): Check that no entries remained in
6757 inline_entry_data_table.
6758 * final.c (reemit_insn_block_notes): Handle inline entry notes.
6759 (final_scan_insn, notice_source_line): Likewise.
6760 (rest_of_clean_state): Skip inline entry markers.
6761 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
6762 markers.
6763 * gimple.c (gimple_build_debug_inline_entry): New.
6764 * gimple.h (enum gimple_debug_subcode): Add
6765 GIMPLE_DEBUG_INLINE_ENTRY.
6766 (gimple_build_debug_inline_entry): Declare.
6767 (gimple_debug_inline_entry_p): New.
6768 (gimple_debug_nonbind_marker_p): Adjust.
6769 * insn-notes.def (INLINE_ENTRY): New.
6770 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
6771 inline entry marker notes.
6772 (print_insn): Likewise.
6773 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
6774 (INSN_DEBUG_MARKER_KIND): Likewise.
6775 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
6776 * tree-inline.c (expand_call_inline): Build and insert
6777 debug_inline_entry stmt.
6778 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
6779 inline entry blocks early, if nonbind markers are enabled.
6780 (dump_scope_block): Dump fragment info.
6781 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
6782 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
6783 (gimple_build_debug_inline_entry): New.
6784 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
6785 Enable/disable inline entry points too.
6786 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
6787 (DEBUG_INSN): Describe inline entry markers.
6788
6789 * common.opt (gvariable-location-views): New.
6790 (gvariable-location-views=incompat5): New.
6791 * config.in: Rebuilt.
6792 * configure: Rebuilt.
6793 * configure.ac: Test assembler for view support.
6794 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
6795 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
6796 * dwarf2out.c (var_loc_view): New typedef.
6797 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
6798 (dwarf2out_locviews_in_attribute): New.
6799 (dwarf2out_locviews_in_loclist): New.
6800 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
6801 (enum dw_line_info_opcode): Add LI_adv_address.
6802 (struct dw_line_info_table): Add view.
6803 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
6804 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
6805 (zero_view_p): New variable.
6806 (ZERO_VIEW_P): New macro.
6807 (output_asm_line_debug_info): New.
6808 (struct var_loc_node): Add view.
6809 (add_AT_view_list, AT_loc_list): New.
6810 (add_var_loc_to_decl): Add view param. Test it against last.
6811 (new_loc_list): Add view params. Record them.
6812 (AT_loc_list_ptr): Handle loc and view lists.
6813 (view_list_to_loc_list_val_node): New.
6814 (print_dw_val): Handle dw_val_class_view_list.
6815 (size_of_die): Likewise.
6816 (value_format): Likewise.
6817 (loc_list_has_views): New.
6818 (gen_llsym): Set vl_symbol too.
6819 (maybe_gen_llsym, skip_loc_list_entry): New.
6820 (dwarf2out_maybe_output_loclist_view_pair): New.
6821 (output_loc_list): Output view list or entries too.
6822 (output_view_list_offset): New.
6823 (output_die): Handle dw_val_class_view_list.
6824 (output_dwarf_version): New.
6825 (output_compilation_unit_header): Use it.
6826 (output_skeleton_debug_sections): Likewise.
6827 (output_rnglists, output_line_info): Likewise.
6828 (output_pubnames, output_aranges): Update version comments.
6829 (output_one_line_info_table): Output view numbers in asm comments.
6830 (dw_loc_list): Determine current endview, pass it to new_loc_list.
6831 Call maybe_gen_llsym.
6832 (loc_list_from_tree_1): Adjust.
6833 (add_AT_location_description): Create view list attribute if
6834 needed, check it's absent otherwise.
6835 (convert_cfa_to_fb_loc_list): Adjust.
6836 (maybe_emit_file): Call output_asm_line_debug_info for test.
6837 (dwarf2out_var_location): Reset views as needed. Precompute
6838 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
6839 attribute. Set view.
6840 (new_line_info_table): Reset next view.
6841 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
6842 (dwarf2out_source_line): Likewise. Output view resets and labels to
6843 the assembler, or select appropriate line info opcodes.
6844 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
6845 (optimize_string_length): Catch it. Adjust.
6846 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
6847 dw_val_class_view_list, and remove it if no longer needed.
6848 (hash_loc_list): Hash view numbers.
6849 (loc_list_hasher::equal): Compare them.
6850 (optimize_location_lists): Check whether a view list symbol is
6851 needed, and whether the locview attribute is present, and
6852 whether they match. Remove the locview attribute if no longer
6853 needed.
6854 (index_location_lists): Call skip_loc_list_entry for test.
6855 (dwarf2out_finish): Call output_asm_line_debug_info for test.
6856 Use output_dwarf_version.
6857 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
6858 (struct dw_val_node): Add val_view_list.
6859 * final.c (SEEN_NEXT_VIEW): New.
6860 (set_next_view_needed): New.
6861 (clear_next_view_needed): New.
6862 (maybe_output_next_view): New.
6863 (final_start_function): Rename to...
6864 (final_start_function_1): ... this. Take pointer to FIRST,
6865 add SEEN parameter. Emit param bindings in the initial view.
6866 (final_start_function): Reintroduce SEEN-less interface.
6867 (final): Rename to...
6868 (final_1): ... this. Take SEEN parameter. Output final pending
6869 next view at the end.
6870 (final): Reintroduce seen-less interface.
6871 (final_scan_insn): Output pending next view before switching
6872 sections or ending a block. Mark the next view as needed when
6873 outputting variable locations. Notify debug backend of section
6874 changes, and of location view changes.
6875 (rest_of_handle_final): Adjust.
6876 * toplev.c (process_options): Autodetect value for debug variable
6877 location views option. Warn on incompat5 without -gdwarf-5.
6878 * doc/invoke.texi (gvariable-location-views): New.
6879 (gvariable-location-views=incompat5): New.
6880 (gno-variable-location-views): New.
6881
6882 2018-02-08 David Malcolm <dmalcolm@redhat.com>
6883
6884 PR tree-optimization/84136
6885 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
6886 that the result of find_edge is non-NULL.
6887
6888 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
6889
6890 PR target/83008
6891 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
6892 storing integer register in SImode. Fix cost of 256 and 512
6893 byte aligned SSE register store.
6894
6895 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
6896
6897 * config/i386/i386.c (ix86_multiplication_cost): Fix
6898 multiplication cost for TARGET_AVX512DQ.
6899
6900 2018-02-08 Marek Polacek <polacek@redhat.com>
6901
6902 PR tree-optimization/84238
6903 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
6904 get_range_strlen.
6905
6906 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6907
6908 PR tree-optimization/84265
6909 * tree-vect-stmts.c (vectorizable_store): Don't treat
6910 VMAT_CONTIGUOUS accesses as grouped.
6911 (vectorizable_load): Likewise.
6912
6913 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6914
6915 PR tree-optimization/81635
6916 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
6917 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
6918 (test_round_for_mask): New functions.
6919 (wide_int_cc_tests): Call test_round_for_mask.
6920 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
6921 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
6922 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
6923 range returned by get_range_info.
6924
6925 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6926
6927 PR ipa/81360
6928 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
6929 * symtab.c: Include builtins.h
6930 (symtab_node::output_to_lto_symbol_table_p): Move here
6931 from lto-streamer-out.c:output_symbol_p.
6932 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
6933 (output_symbol_p): Move all logic to symtab.c
6934 (produce_symtab): Update.
6935
6936 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6937
6938 * config/s390/s390-opts.h (enum indirect_branch): Define.
6939 * config/s390/s390-protos.h (s390_return_addr_from_memory)
6940 (s390_indirect_branch_via_thunk)
6941 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
6942 (enum s390_indirect_branch_type): Define.
6943 * config/s390/s390.c (struct s390_frame_layout, struct
6944 machine_function): Remove.
6945 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
6946 (indirect_branch_table_label_no, indirect_branch_table_name):
6947 Define variables.
6948 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
6949 (enum s390_indirect_branch_option): Define.
6950 (s390_return_addr_from_memory): New function.
6951 (s390_handle_string_attribute): New function.
6952 (s390_attribute_table): Add new attribute handler.
6953 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
6954 (s390_indirect_branch_via_thunk): New function.
6955 (s390_indirect_branch_via_inline_thunk): New function.
6956 (s390_function_ok_for_sibcall): When jumping via thunk disallow
6957 sibling call optimization for non z10 compiles.
6958 (s390_emit_call): Force indirect branch target to be a single
6959 register. Add r1 clobber for non-z10 compiles.
6960 (s390_emit_epilogue): Emit return jump via return_use expander.
6961 (s390_reorg): Handle JUMP_INSNs as execute targets.
6962 (s390_option_override_internal): Perform validity checks for the
6963 new command line options.
6964 (s390_indirect_branch_attrvalue): New function.
6965 (s390_indirect_branch_settings): New function.
6966 (s390_set_current_function): Invoke s390_indirect_branch_settings.
6967 (s390_output_indirect_thunk_function): New function.
6968 (s390_code_end): Implement target hook.
6969 (s390_case_values_threshold): Implement target hook.
6970 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
6971 macros.
6972 * config/s390/s390.h (struct s390_frame_layout)
6973 (struct machine_function): Move here from s390.c.
6974 (TARGET_INDIRECT_BRANCH_NOBP_RET)
6975 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
6976 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
6977 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
6978 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
6979 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
6980 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
6981 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
6982 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
6983 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
6984 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
6985 (mnemonic attribute): Add values which aren't recognized
6986 automatically.
6987 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
6988 pattern for branch conversion. Fix mnemonic attribute.
6989 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
6990 indirect branch via thunk if requested.
6991 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
6992 ("*indirect_jump"): Disable for branch conversion using out of
6993 line thunks.
6994 ("indirect_jump_via_thunk<mode>_z10")
6995 ("indirect_jump_via_thunk<mode>")
6996 ("indirect_jump_via_inlinethunk<mode>_z10")
6997 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
6998 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
6999 ("casesi_jump_via_inlinethunk<mode>_z10")
7000 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
7001 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
7002 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
7003 ("*indirect2_jump"): Disable for branch conversion.
7004 ("casesi_jump"): Turn into expander and expand patterns for branch
7005 conversion.
7006 ("return_use"): New expander.
7007 ("*return"): Emit return via thunk and rename it to ...
7008 ("*return<mode>"): ... this one.
7009 * config/s390/s390.opt: Add new options and and enum for the
7010 option values.
7011
7012 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
7013
7014 * lra-constraints.c (match_reload): Unconditionally use
7015 gen_lowpart_SUBREG, rather than selecting between that
7016 and equivalent gen_rtx_SUBREG code.
7017
7018 2018-02-08 Richard Biener <rguenther@suse.de>
7019
7020 PR tree-optimization/84233
7021 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
7022 changed flag instead of boguously re-using phi_inserted.
7023
7024 2018-02-08 Martin Jambor <mjambor@suse.cz>
7025
7026 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
7027 static local variables.
7028
7029 2018-02-08 Richard Biener <rguenther@suse.de>
7030
7031 PR tree-optimization/84278
7032 * tree-vect-stmts.c (vectorizable_store): When looking for
7033 smaller vector types to perform grouped strided loads/stores
7034 make sure the mode is supported by the target.
7035 (vectorizable_load): Likewise.
7036
7037 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
7038
7039 * config/aarch64/aarch64.c (aarch64_components_for_bb):
7040 Increase LDP/STP opportunities by adding adjacent callee-saves.
7041
7042 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
7043
7044 PR rtl-optimization/84068
7045 PR rtl-optimization/83459
7046 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
7047
7048 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
7049
7050 PR tree-optimization/84224
7051 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
7052 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
7053 non-zero arguments.
7054
7055 2018-02-07 Iain Sandoe <iain@codesourcery.com>
7056
7057 PR target/84113
7058 * config/rs6000/altivec.md (*restore_world): Remove LR use.
7059 * config/rs6000/predicates.md (restore_world_operation): Adjust op
7060 count, remove one USE.
7061
7062 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
7063
7064 * doc/install.texi (Configuration): Document the
7065 --with-long-double-format={ibm,ieee} PowerPC configuration
7066 options.
7067
7068 PR target/84154
7069 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
7070 Convert from define_expand to be define_insn_and_split. Rework
7071 float/double/_Float128 conversions to QI/HI/SImode to work with
7072 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
7073 conversions to QI/HImode types did a store and then a load to
7074 truncate the value. For conversions to VSX registers, don't split
7075 the insn, instead emit the code directly. Use the code iterator
7076 any_fix to combine signed and unsigned conversions.
7077 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
7078 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
7079 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7080 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
7081 (fix_<mode>di2_hw): Likewise.
7082 (fixuns_<mode>di2_hw): Likewise.
7083 (fix_<mode>si2_hw): Likewise.
7084 (fixuns_<mode>si2_hw): Likewise.
7085 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
7086 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7087 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
7088 fix<uns>_trunc<SFDF:mode>si2_p8.
7089 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
7090 used.
7091 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
7092 (fix<uns>_<mode>_mem): Likewise.
7093 (fctiw<u>z_<mode>_mem): Likewise.
7094 (fix<uns>_<mode>_mem): Likewise.
7095 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
7096 the register allocator from doing a direct move to the GPRs to do
7097 a store, and instead use the ISA 3.0 store byte/half-word from
7098 vector register instruction. For IEEE 128-bit floating point,
7099 also optimize stores of 32-bit ints.
7100 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
7101
7102 2018-02-07 Alan Hayward <alan.hayward@arm.com>
7103
7104 * genextract.c (push_pathstr_operand): New function to support
7105 [a-zA-Z].
7106 (walk_rtx): Call push_pathstr_operand.
7107 (print_path): Support [a-zA-Z].
7108
7109 2018-02-07 Richard Biener <rguenther@suse.de>
7110
7111 PR tree-optimization/84037
7112 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
7113 (cse_and_gimplify_to_preheader): Declare.
7114 (vect_get_place_in_interleaving_chain): Likewise.
7115 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
7116 ivexpr_map.
7117 (_loop_vec_info::~_loop_vec_info): Delete it.
7118 (cse_and_gimplify_to_preheader): New function.
7119 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
7120 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
7121 (vectorizable_load): Likewise. For grouped stores always base
7122 the IV on the first element.
7123 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
7124 condition before gimplifying.
7125
7126 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7127
7128 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
7129 *DIV_EXPR and *MOD_EXPR.
7130
7131 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
7132
7133 PR target/84248
7134 * config/i386/i386.c (ix86_option_override_internal): Mask out
7135 the CF_SET bit when checking -fcf-protection.
7136
7137 2018-02-07 Tom de Vries <tom@codesourcery.com>
7138
7139 PR libgomp/84217
7140 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
7141 enough.
7142
7143 2018-02-07 Richard Biener <rguenther@suse.de>
7144
7145 PR tree-optimization/84204
7146 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7147 this place.
7148
7149 PR tree-optimization/84205
7150 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
7151 special-case isl_ast_op_zdiv_r.
7152
7153 PR tree-optimization/84223
7154 * graphite-scop-detection.c (gather_bbs::before_dom_children):
7155 Only add conditions from within the region.
7156 (gather_bbs::after_dom_children): Adjust.
7157
7158 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
7159
7160 PR target/84209
7161 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
7162 * config/avr/avr.md: Only post-reload split REG-REG moves if
7163 either register is GENERAL_REG_P.
7164
7165 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7166
7167 PR tree-optimization/84235
7168 * tree-ssa-scopedtables.c
7169 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
7170 if the subtraction is performed in floating point type where NaNs are
7171 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
7172 build 1. Formatting fix.
7173
7174 2018-02-06 Jakub Jelinek <jakub@redhat.com>
7175
7176 PR target/84146
7177 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
7178 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
7179 and skip it regardless of bb boundaries. Use CALL_P macro,
7180 don't test INSN_P (insn) together with CALL_P or JUMP_P check
7181 unnecessarily, formatting fix.
7182
7183 2018-02-06 Michael Collison <michael.collison@arm.com>
7184
7185 * config/arm/thumb2.md:
7186 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
7187 (*thumb_mov_notscc): Ditto.
7188
7189 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
7190
7191 PR target/84154
7192 * config/rs6000/rs6000.md (su code attribute): Use "u" for
7193 unsigned_fix, not "s".
7194
7195 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7196
7197 * configure.ac (gcc_fn_eh_frame_ro): New function.
7198 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
7199 correct .eh_frame permissions.
7200 * configure: Regenerate.
7201
7202 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
7203
7204 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
7205 irrelevant options.
7206
7207 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7208
7209 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7210 Display warning message for -mno-speculate-indirect-jumps.
7211
7212 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
7213
7214 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
7215 Undocumented.
7216 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
7217
7218 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
7219
7220 PR tree-optimization/84225
7221 * tree-eh.c (find_trapping_overflow): Only call
7222 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
7223
7224 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7225
7226 PR target/84145
7227 * config/i386/i386.c: Reimplement the check of possible options
7228 -mibt/-mshstk conbination. Change error messages.
7229 * doc/invoke.texi: Fix a typo: remove extra '='.
7230
7231 2018-02-06 Marek Polacek <polacek@redhat.com>
7232
7233 PR tree-optimization/84228
7234 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
7235
7236 2018-02-06 Tamar Christina <tamar.christina@arm.com>
7237
7238 PR target/82641
7239 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
7240 emitted arch directives.
7241 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
7242 __ARM_FEATURE_COPROC before changing architectures.
7243
7244 2018-02-06 Richard Biener <rguenther@suse.de>
7245
7246 * config/i386/i386.c (print_reg): Fix typo.
7247 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
7248
7249 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
7250
7251 * configure: Regenerate.
7252
7253 2018-02-05 Martin Sebor <msebor@redhat.com>
7254
7255 PR tree-optimization/83369
7256 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
7257 inlining context.
7258
7259 2018-02-05 Martin Liska <mliska@suse.cz>
7260
7261 * doc/invoke.texi: Cherry-pick upstream r323995.
7262
7263 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
7264
7265 * ira.c (ira_init_register_move_cost): Adjust comment.
7266
7267 2018-02-05 Martin Liska <mliska@suse.cz>
7268
7269 PR gcov-profile/84137
7270 * doc/gcov.texi: Fix typo in documentation.
7271
7272 2018-02-05 Martin Liska <mliska@suse.cz>
7273
7274 PR gcov-profile/83879
7275 * doc/gcov.texi: Document necessity of --dynamic-list-data when
7276 using dlopen functionality.
7277
7278 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
7279
7280 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
7281 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
7282 _mm_maskz_range_ss, _mm_mask_range_round_ss,
7283 _mm_maskz_range_round_ss): New intrinsics.
7284 (__builtin_ia32_rangesd128_round)
7285 (__builtin_ia32_rangess128_round): Remove.
7286 (__builtin_ia32_rangesd128_mask_round,
7287 __builtin_ia32_rangess128_mask_round): New builtins.
7288 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
7289 __builtin_ia32_rangess128_round): Remove.
7290 (__builtin_ia32_rangesd128_mask_round,
7291 __builtin_ia32_rangess128_mask_round): New builtins.
7292 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
7293 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
7294 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
7295 "<round_saeonly_constraint>")): Changed to ...
7296 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
7297 "<round_saeonly_scalar_constraint>")): ... this.
7298 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
7299 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
7300 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
7301 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
7302 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
7303
7304 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
7305
7306 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
7307 options.
7308 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
7309 Remove all values except native, 8540 and 8548.
7310
7311 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
7312
7313 * config/i386/i386.c (ix86_output_function_return): Pass
7314 INVALID_REGNUM, instead of -1, as invalid register number to
7315 indirect_thunk_name and output_indirect_thunk.
7316
7317 2018-02-02 Julia Koval <julia.koval@intel.com>
7318
7319 * config.gcc: Add -march=icelake.
7320 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
7321 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
7322 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
7323 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
7324 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
7325 (processor_target_table): Add icelake.
7326 (ix86_option_override_internal): Handle new PTAs.
7327 (get_builtin_code_for_version): Handle icelake.
7328 (M_INTEL_COREI7_ICELAKE): New.
7329 (fold_builtin_cpu): Handle icelake.
7330 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
7331 * doc/invoke.texi: Add -march=icelake.
7332
7333 2018-02-02 Julia Koval <julia.koval@intel.com>
7334
7335 * config/i386/i386.c (ix86_option_override_internal): Change flags type
7336 to wide_int_bitmask.
7337 * wide-int-bitmask.h: New.
7338
7339 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7340
7341 PR target/84066
7342 * config/i386/i386.md: Replace Pmode with word_mode in
7343 builtin_setjmp_setup and builtin_longjmp to support x32.
7344
7345 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
7346
7347 PR target/56010
7348 PR target/83743
7349 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
7350 #include "opts.h".
7351 (rs6000_supported_cpu_names): New static variable.
7352 (linux_cpu_translation_table): Likewise.
7353 (elf_platform) <cpu>: Define new static variable and use it.
7354 Translate kernel AT_PLATFORM name to canonical name if needed.
7355 Error if platform name is unknown.
7356
7357 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
7358
7359 PR target/84089
7360 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
7361
7362 2018-02-01 Jeff Law <law@redhat.com>
7363
7364 PR target/84128
7365 * config/i386/i386.c (release_scratch_register_on_entry): Add new
7366 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
7367 the scratch if RELEASE_VIA_POP is false.
7368 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
7369 If we have to save a temporary register, decrement SIZE appropriately.
7370 Pass new arguments to release_scratch_register_on_entry.
7371 (ix86_adjust_stack_and_probe): Likewise.
7372 (ix86_emit_probe_stack_range): Pass new arguments to
7373 release_scratch_register_on_entry.
7374
7375 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
7376
7377 PR rtl-optimization/84157
7378 * combine.c (change_zero_ext): Use REG_P predicate in
7379 front of HARD_REGISTER_P predicate.
7380
7381 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
7382
7383 * config/avr/avr.c (avr_option_override): Move disabling of
7384 -fdelete-null-pointer-checks to...
7385 * common/config/avr/avr-common.c (avr_option_optimization_table):
7386 ...here.
7387
7388 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7389
7390 PR tree-optimization/81635
7391 * tree-data-ref.c (split_constant_offset_1): For types that
7392 wrap on overflow, try to use range info to prove that wrapping
7393 cannot occur.
7394
7395 2018-02-01 Renlin Li <renlin.li@arm.com>
7396
7397 PR target/83370
7398 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
7399 TAILCALL_ADDR_REGS.
7400 (aarch64_register_move_cost): Likewise.
7401 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
7402 TAILCALL_ADDR_REGS.
7403 (REG_CLASS_NAMES): Likewise.
7404 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
7405 TAILCALL_ADDR_REGS. Remove IP registers.
7406 * config/aarch64/aarch64.md (Ucs): Update register constraint.
7407
7408 2018-02-01 Richard Biener <rguenther@suse.de>
7409
7410 * domwalk.h (dom_walker::dom_walker): Add additional constructor
7411 for specifying RPO order and allow NULL for that.
7412 * domwalk.c (dom_walker::dom_walker): Likewise.
7413 (dom_walker::walk): Handle NULL RPO order.
7414 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
7415 in RPO order.
7416 (rewrite_update_dom_walker): Likewise.
7417 (mark_def_dom_walker): Likewise.
7418
7419 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7420
7421 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
7422 (aarch64_maybe_expand_sve_subreg_move): Declare.
7423 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
7424 * config/aarch64/predicates.md (aarch64_any_register_operand): New
7425 predicate.
7426 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
7427 that are semantically a reverse operation.
7428 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
7429 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
7430 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
7431 functions.
7432 (aarch64_can_change_mode_class): For big-endian, forbid changes
7433 between two SVE modes if they have different element sizes.
7434
7435 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7436
7437 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
7438 the TImode handling for big-endian targets.
7439
7440 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7441
7442 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
7443 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
7444 not just bytes.
7445 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
7446 Remove BSWAP handing for big-endian targets and use the form of
7447 LD1RQ appropariate for the mode.
7448
7449 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7450
7451 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
7452 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
7453 duplicated element.
7454
7455 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7456
7457 PR tearget/83845
7458 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
7459 check for operands that need to go through aarch64_sve_reload_be.
7460
7461 2018-02-01 Jakub Jelinek <jakub@redhat.com>
7462
7463 PR tree-optimization/81661
7464 PR tree-optimization/84117
7465 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
7466 * tree-eh.c: Include gimplify.h.
7467 (find_trapping_overflow, replace_trapping_overflow,
7468 rewrite_to_non_trapping_overflow): New functions.
7469 * tree-vect-loop.c: Include tree-eh.h.
7470 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
7471 * tree-data-ref.c: Include tree-eh.h.
7472 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
7473
7474 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
7475
7476 PR rtl-optimization/84123
7477 * combine.c (change_zero_ext): Check if hard register satisfies
7478 can_change_dest_mode before calling gen_lowpart_SUBREG.
7479
7480 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
7481
7482 PR target/82444
7483 * ira.c (ira_init_register_move_cost): Remove assert.
7484
7485 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7486
7487 PR rtl-optimization/84071
7488 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
7489 * doc/tm.texi: Regenerate.
7490
7491 2018-01-31 Richard Biener <rguenther@suse.de>
7492
7493 PR tree-optimization/84132
7494 * tree-data-ref.c (analyze_miv_subscript): Properly
7495 check whether evolution_function_is_affine_multivariate_p
7496 before calling gcd_of_steps_may_divide_p.
7497
7498 2018-01-31 Julia Koval <julia.koval@intel.com>
7499
7500 PR target/83618
7501 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
7502 * config/i386/i386.md (rdpid_rex64) New.
7503 (rdpid): Make 32bit only.
7504
7505 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
7506
7507 PR lto/84105
7508 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
7509 an IDENTIFIER_NODE for FUNCTION_TYPE's.
7510
7511 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7512
7513 Revert
7514 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7515
7516 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
7517
7518 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7519
7520 PR rtl-optimization/84071
7521 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
7522 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
7523
7524 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7525
7526 * config/arc/arc.c (arc_handle_aux_attribute): New function.
7527 (arc_attribute_table): Add 'aux' attribute.
7528 (arc_in_small_data_p): Consider aux like variables.
7529 (arc_is_aux_reg_p): New function.
7530 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
7531 (arc_get_aux_arg): New function.
7532 (prepare_move_operands): Handle aux-register access.
7533 (arc_handle_aux_attribute): New function.
7534 * doc/extend.texi (ARC Variable attributes): Add subsection.
7535
7536 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7537
7538 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
7539 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
7540 (arc_attribute_table): Add 'uncached' attribute.
7541 (arc_print_operand): Print '.di' flag for uncached memory
7542 accesses.
7543 (arc_in_small_data_p): Do not consider for small data the uncached
7544 types.
7545 (arc_is_uncached_mem_p): New function.
7546 * config/arc/predicates.md (compact_store_memory_operand): Check
7547 for uncached memory accesses.
7548 (nonvol_nonimm_operand): Likewise.
7549 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
7550
7551 2018-01-31 Jakub Jelinek <jakub@redhat.com>
7552
7553 PR c/84100
7554 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
7555 falign-loops=): Add Optimization flag.
7556
7557 2018-01-30 Jeff Law <law@redhat.com>
7558
7559 PR target/84064
7560 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
7561 INT_REGISTERS_SAVED. Check it prior to calling
7562 get_scratch_register_on_entry.
7563 (ix86_adjust_stack_and_probe): Similarly.
7564 (ix86_emit_probe_stack_range): Similarly.
7565 (ix86_expand_prologue): Corresponding changes.
7566
7567 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7568
7569 PR target/40411
7570 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
7571 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
7572
7573 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
7574
7575 PR target/84112
7576 * lra-constraints.c (curr_insn_transform): Process AND in the
7577 address.
7578
7579 2018-01-30 Jakub Jelinek <jakub@redhat.com>
7580
7581 PR rtl-optimization/83986
7582 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
7583 dependence against last_pending_memory_flush in addition to
7584 pending_jump_insns.
7585
7586 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
7587
7588 PR tree-optimization/81611
7589 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
7590 copies.
7591
7592 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7593
7594 PR target/83758
7595 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
7596 a reg rtx.
7597
7598 2018-01-30 Richard Biener <rguenther@suse.de>
7599 Jakub Jelinek <jakub@redhat.com>
7600
7601 PR tree-optimization/84111
7602 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
7603 inner loops added during recursion, as they don't have up-to-date
7604 SSA form.
7605
7606 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7607
7608 PR ipa/81360
7609 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
7610 (can_inline_edge_by_limits_p): ... here.
7611 (can_early_inline_edge_p, check_callers,
7612 update_caller_keys, update_callee_keys, recursive_inlining,
7613 add_new_edges_to_heap, speculation_useful_p,
7614 inline_small_functions,
7615 inline_small_functions, flatten_function,
7616 inline_to_all_callers_1): Update.
7617
7618 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7619
7620 * profile-count.c (profile_count::combine_with_ipa_count): Handle
7621 zeros correctly.
7622
7623 2018-01-30 Richard Biener <rguenther@suse.de>
7624
7625 PR tree-optimization/83008
7626 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
7627 invariant and constant vector uses in stmts when they need
7628 more than one stmt.
7629
7630 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7631
7632 PR bootstrap/84017
7633 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
7634 * configure: Regenerate.
7635
7636 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7637
7638 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
7639 pattern.
7640 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
7641 Use gen_rtx_REG rather than gen_lowpart.
7642
7643 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7644
7645 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
7646 rather than 0 when creating partial subregs.
7647
7648 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7649
7650 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
7651 of usage.
7652
7653 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
7654
7655 PR target/81550
7656 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
7657 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
7658 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
7659 flags. This restores the settings used before the 2017-07-24.
7660 Turning off pre increment/decrement/modify allows IVOPTS to
7661 optimize DF/SF loops where the index is an int.
7662
7663 2018-01-29 Richard Biener <rguenther@suse.de>
7664 Kelvin Nilsen <kelvin@gcc.gnu.org>
7665
7666 PR bootstrap/80867
7667 * tree-vect-stmts.c (vectorizable_call): Don't call
7668 targetm.vectorize_builtin_md_vectorized_function if callee is
7669 NULL.
7670
7671 2018-01-22 Carl Love <cel@us.ibm.com>
7672
7673 * doc/extend.tex: Fix typo in second arg in
7674 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
7675
7676 2018-01-29 Richard Biener <rguenther@suse.de>
7677
7678 PR tree-optimization/84086
7679 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
7680 (flush_ssaname_freelist): When SSA names were released reset
7681 the SCEV hash table.
7682
7683 2018-01-29 Richard Biener <rguenther@suse.de>
7684
7685 PR tree-optimization/84057
7686 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
7687 removed paths when removing edges.
7688
7689 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
7690
7691 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
7692 -mfunction-return=@var{choice}.
7693
7694 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7695
7696 PR diagnostic/84034
7697 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
7698 Handle CR like TAB.
7699 (layout::print_source_line): Likewise.
7700 (test_get_line_width_without_trailing_whitespace): Add test cases.
7701
7702 2018-01-27 Jakub Jelinek <jakub@redhat.com>
7703
7704 PR middle-end/84040
7705 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
7706 debug insns.
7707
7708 2018-01-26 Jim Wilson <jimw@sifive.com>
7709
7710 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
7711
7712 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
7713 specified.
7714
7715 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7716
7717 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
7718 and CMP + SUB-immediate -> SUBS.
7719
7720 2018-01-26 Martin Sebor <msebor@redhat.com>
7721
7722 PR tree-optimization/83896
7723 * tree-ssa-strlen.c (get_string_len): Rename...
7724 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
7725 Avoid assuming length is constant.
7726 (handle_char_store): Use HOST_WIDE_INT for string length.
7727
7728 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
7729
7730 PR target/81763
7731 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
7732 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
7733
7734 2018-01-26 Richard Biener <rguenther@suse.de>
7735
7736 PR rtl-optimization/84003
7737 * dse.c (record_store): Only record redundant stores when
7738 the earlier store aliases at least all accesses the later one does.
7739
7740 2018-01-26 Jakub Jelinek <jakub@redhat.com>
7741
7742 PR rtl-optimization/83985
7743 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
7744 REG_CFA_RESTORE insns.
7745 (delete_unmarked_insns): Don't ignore separate shrink wrapping
7746 REG_CFA_RESTORE insns here.
7747
7748 PR c/83989
7749 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
7750 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
7751
7752 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7753
7754 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
7755 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
7756 (arc_init): Likewise.
7757 (arc_override_options): Likewise.
7758 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
7759 value.
7760 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
7761 support.
7762 * config/arc/arc.h (TARGET_DBNZ): Define.
7763 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
7764 properly set the tune attribute.
7765 (dbnz): Use TARGET_DBNZ guard.
7766 * config/arc/arc.opt (mtune): Add core3 option.
7767
7768 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7769
7770 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
7771 recognize new pic like addresses.
7772 (arc_delegitimize_address): Clean up.
7773
7774 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7775
7776 * config/arc/arc-arches.def: Option mrf16 valid for all
7777 architectures.
7778 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
7779 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
7780 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
7781 * config/arc/arc-tables.opt: Regenerate.
7782 * config/arc/arc.c (arc_conditional_register_usage): Handle
7783 reduced register file case.
7784 (arc_file_start): Set must have build attributes.
7785 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
7786 mrf16 option value.
7787 * config/arc/arc.opt (mrf16): Add new option.
7788 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
7789 * config/arc/genmultilib.awk: Handle new mrf16 option.
7790 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
7791 * config/arc/t-multilib: Regenerate.
7792 * doc/invoke.texi (ARC Options): Document mrf16 option.
7793
7794 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7795
7796 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
7797 * config/arc/arc.c (arc_handle_secure_attribute): New function.
7798 (arc_attribute_table): Add 'secure_call' attribute.
7799 (arc_print_operand): Print secure call operand.
7800 (arc_function_ok_for_sibcall): Don't optimize tail calls when
7801 secure.
7802 (arc_is_secure_call_p): New function. * config/arc/arc.md
7803 (call_i): Add support for sjli instruction.
7804 (call_value_i): Likewise.
7805 * config/arc/constraints.md (Csc): New constraint.
7806
7807 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7808 John Eric Martin <John.Martin@emmicro-us.com>
7809
7810 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
7811 * config/arc/arc.c (_arc_jli_section): New struct.
7812 (arc_jli_section): New type.
7813 (rc_jli_sections): New static variable.
7814 (arc_handle_jli_attribute): New function.
7815 (arc_attribute_table): Add jli_always and jli_fixed attribute.
7816 (arc_file_end): New function.
7817 (TARGET_ASM_FILE_END): Define.
7818 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
7819 (arc_add_jli_section): New function.
7820 (jli_call_scan): Likewise.
7821 (arc_reorg): Call jli_call_scan.
7822 (arc_output_addsi): Remove 'S' from printing asm operand.
7823 (arc_is_jli_call_p): New function.
7824 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
7825 operand.
7826 (movhi_insn): Likewise.
7827 (movsi_insn): Likewise.
7828 (movsi_set_cc_insn): Likewise.
7829 (loadqi_update): Likewise.
7830 (load_zeroextendqisi_update): Likewise.
7831 (load_signextendqisi_update): Likewise.
7832 (loadhi_update): Likewise.
7833 (load_zeroextendhisi_update): Likewise.
7834 (load_signextendhisi_update): Likewise.
7835 (loadsi_update): Likewise.
7836 (loadsf_update): Likewise.
7837 (movsicc_insn): Likewise.
7838 (bset_insn): Likewise.
7839 (bxor_insn): Likewise.
7840 (bclr_insn): Likewise.
7841 (bmsk_insn): Likewise.
7842 (bicsi3_insn): Likewise.
7843 (cmpsi_cc_c_insn): Likewise.
7844 (movsi_ne): Likewise.
7845 (movsi_cond_exec): Likewise.
7846 (clrsbsi2): Likewise.
7847 (norm_f): Likewise.
7848 (normw): Likewise.
7849 (swap): Likewise.
7850 (divaw): Likewise.
7851 (flag): Likewise.
7852 (sr): Likewise.
7853 (kflag): Likewise.
7854 (ffs): Likewise.
7855 (ffs_f): Likewise.
7856 (fls): Likewise.
7857 (call_i): Remove 'S' asm letter, add jli instruction.
7858 (call_value_i): Likewise.
7859 * config/arc/arc.op (mjli-always): New option.
7860 * config/arc/constraints.md (Cji): New constraint.
7861 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
7862 operand.
7863 (subsf3_fpx): Likewise.
7864 (mulsf3_fpx): Likewise.
7865 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
7866 asm operand.
7867 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
7868 function attrbutes.
7869 * doc/invoke.texi (ARC): Document mjli-always option.
7870
7871 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
7872
7873 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
7874 avoid addition with 0 and use incw and decw where possible.
7875
7876 2018-01-26 Richard Biener <rguenther@suse.de>
7877
7878 PR tree-optimization/81082
7879 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
7880 association if it requires casting to unsigned.
7881 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
7882 from fold_plusminus_mult_expr to catch important cases late when
7883 range info is available.
7884
7885 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7886
7887 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
7888 * configure.ac (hidden_linkonce): New test.
7889 * configure: Regenerate.
7890 * config.in: Regenerate.
7891
7892 2018-01-26 Julia Koval <julia.koval@intel.com>
7893
7894 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
7895 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
7896 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
7897 _mm_mask_bitshuffle_epi64_mask): Fix type.
7898 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
7899 USI_FTYPE_V4DI_V4DI_USI): Remove.
7900 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
7901 __builtin_ia32_vpshufbitqmb256_mask,
7902 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
7903 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
7904 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
7905
7906 2018-01-26 Alan Modra <amodra@gmail.com>
7907
7908 PR target/84033
7909 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
7910 UNSPEC_VBPERMQ. Sort other unspecs.
7911
7912 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
7913
7914 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
7915
7916 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
7917
7918 PR middle-end/83055
7919 * predict.c (drop_profile): Do not push/pop cfun; update also
7920 node->count.
7921 (handle_missing_profiles): Fix logic looking for zero profiles.
7922
7923 2018-01-25 Jakub Jelinek <jakub@redhat.com>
7924
7925 PR middle-end/83977
7926 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
7927 on functions with #pragma omp declare simd or functions with simd
7928 attribute.
7929 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
7930 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
7931 Remove trailing \n from warning_at calls.
7932
7933 2018-01-25 Tom de Vries <tom@codesourcery.com>
7934
7935 PR target/84028
7936 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7937 for neutered workers.
7938
7939 2018-01-24 Joseph Myers <joseph@codesourcery.com>
7940
7941 PR target/68467
7942 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
7943 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
7944
7945 2018-01-24 Jeff Law <law@redhat.com>
7946
7947 PR target/83994
7948 * i386.c (get_probe_interval): Move to earlier point.
7949 (ix86_compute_frame_layout): If -fstack-clash-protection and
7950 the frame is larger than the probe interval, then use pushes
7951 to save registers rather than reg->mem moves.
7952 (ix86_expand_prologue): Remove conditional for int_registers_saved
7953 assertion.
7954
7955 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
7956
7957 PR target/84014
7958 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
7959 min/max for never referenced object.
7960
7961 2018-01-24 Jakub Jelinek <jakub@redhat.com>
7962
7963 PR middle-end/83977
7964 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
7965 here.
7966 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
7967 attributes from DECL_ATTRIBUTES (decl) without affecting
7968 DECL_ATTRIBUTES (current_function_decl).
7969 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
7970 functions with non-NULL DECL_ABSTRACT_ORIGIN.
7971
7972 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
7973
7974 PR tree-optimization/83979
7975 * fold-const.c (fold_comparison): Use constant_boolean_node
7976 instead of boolean_{true,false}_node.
7977
7978 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
7979
7980 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
7981 with zero counts.
7982
7983 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7984
7985 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7986 Simplify the clause that sets the length attribute.
7987 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7988 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
7989 clause that sets the length attribute.
7990 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7991
7992 2018-01-24 Tom de Vries <tom@codesourcery.com>
7993
7994 PR target/83589
7995 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
7996 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
7997 Add strict parameter.
7998 (prevent_branch_around_nothing): Insert dummy insn between branch to
7999 label and label with no ptx insn inbetween.
8000 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
8001
8002 2018-01-24 Tom de Vries <tom@codesourcery.com>
8003
8004 PR target/81352
8005 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
8006 for neutered threads in warp.
8007 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
8008
8009 2018-01-24 Richard Biener <rguenther@suse.de>
8010
8011 PR tree-optimization/83176
8012 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
8013 operands.
8014
8015 2018-01-24 Richard Biener <rguenther@suse.de>
8016
8017 PR tree-optimization/82819
8018 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
8019 code generating pluses that are no-ops in the target precision.
8020
8021 2018-01-24 Richard Biener <rguenther@suse.de>
8022
8023 PR middle-end/84000
8024 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
8025
8026 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8027
8028 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
8029 to merge probabilities.
8030 * predict.c (probably_never_executed): Also mark as cold functions
8031 with global 0 profile and guessed local profile.
8032 * profile-count.c (profile_probability::combine_with_count): New
8033 member function.
8034 * profile-count.h (profile_probability::operator*,
8035 profile_probability::operator*=, profile_probability::operator/,
8036 profile_probability::operator/=): Reduce precision to adjusted
8037 and set value to guessed on contradictory divisions.
8038 (profile_probability::combine_with_freq): Remove.
8039 (profile_probability::combine_wiht_count): Declare.
8040 (profile_count::force_nonzero):: Set to adjusted.
8041 (profile_count::probability_in):: Set quality to adjusted.
8042 * tree-ssa-tail-merge.c (replace_block_by): Use
8043 combine_with_count.
8044
8045 2018-01-23 Andrew Waterman <andrew@sifive.com>
8046 Jim Wilson <jimw@sifive.com>
8047
8048 * config/riscv/riscv.c (riscv_stack_boundary): New.
8049 (riscv_option_override): Set riscv_stack_boundary. Handle
8050 riscv_preferred_stack_boundary_arg.
8051 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
8052 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
8053 (STACK_BOUNDARY): Set to riscv_stack_boundary.
8054 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
8055 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
8056 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
8057
8058 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
8059
8060 PR target/83905
8061 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
8062 of struct ix86_frame.
8063 (ix86_expand_epilogue): Likewise. Add a local variable for
8064 the reg_save_offset field in struct ix86_frame.
8065
8066 2018-01-23 Bin Cheng <bin.cheng@arm.com>
8067
8068 PR tree-optimization/82604
8069 * tree-loop-distribution.c (enum partition_kind): New enum item
8070 PKIND_PARTIAL_MEMSET.
8071 (partition_builtin_p): Support above new enum item.
8072 (generate_code_for_partition): Ditto.
8073 (compute_access_range): Differentiate cases that equality can be
8074 proven at all loops, the innermost loops or no loops.
8075 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
8076 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
8077 (finalize_partitions, distribute_loop): Don't fuse partition of
8078 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
8079 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
8080 parloop is enabled.
8081
8082 2018-01-23 Martin Liska <mliska@suse.cz>
8083
8084 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
8085 order to ignore the predictor.
8086 (PRED_POLYMORPHIC_CALL): Likewise.
8087 (PRED_RECURSIVE_CALL): Likewise.
8088
8089 2018-01-23 Martin Liska <mliska@suse.cz>
8090
8091 * tree-profile.c (tree_profiling): Print function header to
8092 aware reader which function we are working on.
8093 * value-prof.c (gimple_find_values_to_profile): Do not print
8094 not interesting value histograms.
8095
8096 2018-01-23 Martin Liska <mliska@suse.cz>
8097
8098 * profile-count.h (enum profile_quality): Add
8099 profile_uninitialized as the first value. Do not number values
8100 as they are zero based.
8101 (profile_count::verify): Update sanity check.
8102 (profile_probability::verify): Likewise.
8103
8104 2018-01-23 Nathan Sidwell <nathan@acm.org>
8105
8106 * doc/invoke.texi (ffor-scope): Deprecate.
8107
8108 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8109
8110 PR tree-optimization/83510
8111 * domwalk.c (set_all_edges_as_executable): New function.
8112 (dom_walker::dom_walker): Convert bool param
8113 "skip_unreachable_blocks" to enum reachability. Move setup of
8114 edge flags to set_all_edges_as_executable and only do it when
8115 reachability is REACHABLE_BLOCKS.
8116 * domwalk.h (enum dom_walker::reachability): New enum.
8117 (dom_walker::dom_walker): Convert bool param
8118 "skip_unreachable_blocks" to enum reachability.
8119 (set_all_edges_as_executable): New decl.
8120 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
8121 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
8122 "reachability".
8123 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
8124 but converting true to REACHABLE_BLOCKS.
8125 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
8126 * tree-vrp.c
8127 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
8128 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
8129 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
8130 REACHABLE_BLOCKS.
8131 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
8132 if check_all_array_refs will be called.
8133
8134 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8135
8136 * tree.c (selftest::test_location_wrappers): Add more test
8137 coverage.
8138
8139 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8140
8141 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
8142 (selftest::test_bit_in_range): Likewise.
8143
8144 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8145
8146 PR testsuite/83888
8147 * doc/sourcebuild.texi (vect_float): Say that the selector
8148 only describes the situation when -funsafe-math-optimizations is on.
8149 (vect_float_strict): Document.
8150
8151 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8152
8153 PR tree-optimization/83965
8154 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8155 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
8156 instead of checking only for a reduction.
8157 (vect_recog_widen_sum_pattern): Likewise.
8158
8159 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8160
8161 * predict.c (probably_never_executed): Only use precise profile info.
8162 (compute_function_frequency): Skip after inlining hack since we now
8163 have quality checking.
8164
8165 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8166
8167 * profile-count.h (profile_probability::very_unlikely,
8168 profile_probability::unlikely, profile_probability::even): Set
8169 precision to guessed.
8170
8171 2018-01-23 Richard Biener <rguenther@suse.de>
8172
8173 PR tree-optimization/83963
8174 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
8175 Properly terminate dominator walk when crossing the exit edge not
8176 when visiting its source block.
8177
8178 2018-01-23 Jakub Jelinek <jakub@redhat.com>
8179
8180 PR c++/83918
8181 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
8182 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
8183
8184 2018-01-22 Jakub Jelinek <jakub@redhat.com>
8185
8186 PR tree-optimization/83957
8187 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
8188 semicolon after for body surrounded by braces.
8189
8190 PR tree-optimization/83081
8191 * profile-count.h (profile_probability::split): New method.
8192 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
8193 Use profile_probability::split.
8194 (do_compare_rtx_and_jump): Fix adjustment of probabilities
8195 when splitting a single conditional jump into 2.
8196
8197 2018-01-22 David Malcolm <dmalcolm@redhat.com>
8198
8199 PR tree-optimization/69452
8200 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
8201 decl.
8202
8203 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8204
8205 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
8206 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
8207 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
8208
8209 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8210
8211 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
8212 * config/rl78/rl78.md (movdi): New define_expand.
8213 * config/rl78/rl78.c (rl78_split_movdi): New function.
8214
8215 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
8216
8217 PR target/83862
8218 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
8219 no longer used.
8220 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
8221 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
8222 128-bit to produce an UNSPEC move to get the double word with the
8223 signbit and then a shift directly to do signbit.
8224 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
8225 implementation with a new version that just does either a direct
8226 move or a regular move. Move memory interface to separate insns.
8227 Move insns so they are next to the expander.
8228 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
8229 with signbit move. Split big and little endian case.
8230 (signbit<mode>2_dm_mem_le): Likewise.
8231 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
8232 (signbit<mode>2_dm2): Likewise.
8233
8234 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8235
8236 * config/rl78/rl78.md (anddi3): New define_expand.
8237
8238 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8239
8240 * config/rl78/rl78.md (umindi3): New define_expand.
8241
8242 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8243
8244 * config/rl78/rl78.md (smindi3): New define_expand.
8245
8246 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8247
8248 * config/rl78/rl78.md (smaxdi3): New define_expand.
8249
8250 2018-01-22 Carl Love <cel@us.ibm.com>
8251
8252 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
8253 LVX_V1TI): Add macro expansion.
8254 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
8255 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
8256 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
8257 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
8258 Change check to determine if the instruction is a byte reversing
8259 entry. Fix typo in comment.
8260 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
8261 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
8262 Add def_builtin calls for new builtins.
8263 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
8264 Add define_insn expansion.
8265
8266 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8267
8268 * config/rl78/rl78.md (umaxdi3): New define_expand.
8269
8270 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8271
8272 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
8273 for non-QImode registers.
8274
8275 2018-01-22 Richard Biener <rguenther@suse.de>
8276
8277 PR tree-optimization/83963
8278 * graphite-scop-detection.c (scop_detection::get_sese): Delay
8279 including the loop exit block.
8280 (scop_detection::merge_sese): Likewise.
8281 (scop_detection::add_scop): Do it here instead.
8282
8283 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8284
8285 * doc/sourcebuild.texi (arm_softfloat): Document.
8286
8287 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
8288
8289 PR gcc/77734
8290 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
8291 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
8292 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
8293
8294 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8295 David Edelsohn <dje.gcc@gmail.com>
8296
8297 PR target/83946
8298 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8299 Change "crset eq" to "crset 2".
8300 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8301 (*call_indirect_aix<mode>_nospec): Likewise.
8302 (*call_value_indirect_aix<mode>_nospec): Likewise.
8303 (*call_indirect_elfv2<mode>_nospec): Likewise.
8304 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
8305 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
8306 change assembly output from . to $.
8307 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8308 (indirect_jump<mode>_nospec): Change assembly output from . to $.
8309 (*tablejump<mode>_internal1_nospec): Likewise.
8310
8311 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
8312
8313 PR target/80870
8314 * config/sh/sh_optimize_sett_clrt.cc:
8315 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
8316
8317 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
8318
8319 PR tree-optimization/83940
8320 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
8321 offset_dt to vect_constant_def rather than vect_unknown_def_type.
8322 (vect_check_load_store_mask): Add a mask_dt_out parameter and
8323 use it to pass back the definition type.
8324 (vect_check_store_rhs): Likewise rhs_dt_out.
8325 (vect_build_gather_load_calls): Add a mask_dt argument and use
8326 it instead of a call to vect_is_simple_use.
8327 (vectorizable_store): Update calls to vect_check_load_store_mask
8328 and vect_check_store_rhs. Use the dt returned by the latter instead
8329 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
8330 instead of calls to vect_is_simple_use. Pass the scalar rather
8331 than the vector operand to vect_is_simple_use when handling
8332 second and subsequent copies of an rhs value.
8333 (vectorizable_load): Update calls to vect_check_load_store_mask
8334 and vect_build_gather_load_calls. Use the cached mask_dt and
8335 gs_info.offset_dt instead of calls to vect_is_simple_use.
8336
8337 2018-01-20 Jakub Jelinek <jakub@redhat.com>
8338
8339 PR middle-end/83945
8340 * tree-emutls.c: Include gimplify.h.
8341 (lower_emutls_2): New function.
8342 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
8343 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
8344 it before further processing.
8345
8346 PR target/83930
8347 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
8348 UINTVAL (trueop1) instead of INTVAL (op1).
8349
8350 2018-01-19 Jakub Jelinek <jakub@redhat.com>
8351
8352 PR debug/81570
8353 PR debug/83728
8354 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
8355 INCOMING_FRAME_SP_OFFSET if not defined.
8356 (scan_trace): Add ENTRY argument. If true and
8357 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
8358 emit a note to adjust the CFA offset.
8359 (create_cfi_notes): Adjust scan_trace callers.
8360 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
8361 INCOMING_FRAME_SP_OFFSET in the CIE.
8362 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
8363 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
8364 Likewise.
8365 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
8366 * doc/tm.texi: Regenerated.
8367
8368 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8369
8370 PR rtl-optimization/83147
8371 * lra-constraints.c (remove_inheritance_pseudos): Use
8372 lra_substitute_pseudo_within_insn.
8373
8374 2018-01-19 Tom de Vries <tom@codesourcery.com>
8375 Cesar Philippidis <cesar@codesourcery.com>
8376
8377 PR target/83920
8378 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
8379
8380 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
8381
8382 PR target/83790
8383 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
8384 spaces for function labels.
8385
8386 2018-01-19 Martin Liska <mliska@suse.cz>
8387
8388 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
8389 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
8390 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
8391 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
8392 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
8393 (PRED_CONST_RETURN): Change from 69 to 65.
8394 (PRED_NULL_RETURN): Change from 91 to 71.
8395 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
8396 (PRED_LOOP_GUARD): Change from 66 to 73.
8397
8398 2018-01-19 Martin Liska <mliska@suse.cz>
8399
8400 * predict.c (predict_insn_def): Add new assert.
8401 (struct branch_predictor): Change type to signed integer.
8402 (test_prediction_value_range): Amend test to cover
8403 PROB_UNINITIALIZED.
8404 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
8405 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
8406 (PRED_LOOP_ITERATIONS_MAX): Likewise.
8407 (PRED_LOOP_IV_COMPARE): Likewise.
8408 * predict.h (PROB_UNINITIALIZED): Define new constant.
8409
8410 2018-01-19 Martin Liska <mliska@suse.cz>
8411
8412 * predict.c (dump_prediction): Add new format for
8413 analyze_brprob.py script which is enabled with -details
8414 suboption.
8415 * profile-count.h (precise_p): New function.
8416
8417 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8418
8419 PR tree-optimization/83922
8420 * tree-vect-loop.c (vect_verify_full_masking): Return false if
8421 there are no statements that need masking.
8422 (vect_active_double_reduction_p): New function.
8423 (vect_analyze_loop_operations): Use it when handling phis that
8424 are not in the loop header.
8425
8426 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8427
8428 PR tree-optimization/83914
8429 * tree-vect-loop.c (vectorizable_induction): Don't convert
8430 init_expr or apply the peeling adjustment for inductions
8431 that are nested within the vectorized loop.
8432
8433 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8434
8435 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
8436 instead of NEG.
8437
8438 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8439
8440 PR sanitizer/81715
8441 PR testsuite/83882
8442 * function.h (gimplify_parameters): Add gimple_seq * argument.
8443 * function.c: Include gimple.h and options.h.
8444 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
8445 for the added local temporaries if needed.
8446 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
8447 if there are any parameter cleanups, wrap whole body into a
8448 try/finally with the cleanups.
8449
8450 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
8451
8452 PR target/82964
8453 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
8454 Use GET_MODE_CLASS for scalar floating point.
8455
8456 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8457
8458 PR ipa/82256
8459 patch by PaX Team
8460 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8461 Fix call of call_cgraph_insertion_hooks.
8462
8463 2018-01-18 Martin Sebor <msebor@redhat.com>
8464
8465 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
8466
8467 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8468
8469 PR ipa/83619
8470 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
8471 frequencies.
8472
8473 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
8474
8475 PR other/70268
8476 * common.opt: (-ffile-prefix-map): New option.
8477 * opts.c (common_handle_option): Defer it.
8478 * opts-global.c (handle_common_deferred_options): Handle it.
8479 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
8480 * file-prefix-map.h: New file.
8481 (remap_debug_filename, add_debug_prefix_map): ...here.
8482 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
8483 * final.c (debug_prefix_map, add_debug_prefix_map
8484 remap_debug_filename): Move to...
8485 * file-prefix-map.c: New file.
8486 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
8487 generalize, get rid of alloca(), use strrchr() instead of strchr().
8488 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
8489 Implement in terms of add_prefix_map().
8490 (remap_macro_filename, remap_debug_filename): Implement in term of
8491 remap_filename().
8492 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
8493 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
8494 * dbxout.c: Include file-prefix-map.h.
8495 * varasm.c: Likewise.
8496 * vmsdbgout.c: Likewise.
8497 * xcoffout.c: Likewise.
8498 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
8499 * doc/cppopts.texi (-fmacro-prefix-map): Document.
8500 * doc/invoke.texi (-ffile-prefix-map): Document.
8501 (-fdebug-prefix-map): Update description.
8502
8503 2018-01-18 Martin Liska <mliska@suse.cz>
8504
8505 * config/i386/i386.c (indirect_thunk_name): Document that also
8506 lfence is emitted.
8507 (output_indirect_thunk): Document why both instructions
8508 (pause and lfence) are generated.
8509
8510 2018-01-18 Richard Biener <rguenther@suse.de>
8511
8512 PR tree-optimization/83887
8513 * graphite-scop-detection.c
8514 (scop_detection::get_nearest_dom_with_single_entry): Remove.
8515 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
8516 (scop_detection::merge_sese): Re-implement with a flood-fill
8517 algorithm that properly finds a SESE region if it exists.
8518
8519 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8520
8521 PR c/61240
8522 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
8523 pointer_diff optimizations use view_convert instead of convert.
8524
8525 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8526
8527 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8528 Generate different code for -mno-speculate-indirect-jumps.
8529 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8530 (*call_indirect_aix<mode>): Disable for
8531 -mno-speculate-indirect-jumps.
8532 (*call_indirect_aix<mode>_nospec): New define_insn.
8533 (*call_value_indirect_aix<mode>): Disable for
8534 -mno-speculate-indirect-jumps.
8535 (*call_value_indirect_aix<mode>_nospec): New define_insn.
8536 (*sibcall_nonlocal_sysv<mode>): Generate different code for
8537 -mno-speculate-indirect-jumps.
8538 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8539
8540 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8541
8542 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
8543 long double type, set the flags for noting the default long double
8544 type, even if we don't pass or return a long double type.
8545
8546 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
8547
8548 PR ipa/83051
8549 * ipa-inline.c (flatten_function): Do not overwrite final inlining
8550 failure.
8551
8552 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
8553
8554 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
8555 support for merge[hl].
8556 (fold_mergehl_helper): New helper function.
8557 (tree-vector-builder.h): New #include for tree_vector_builder usage.
8558 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
8559 (altivec_vmrglw_direct): Add xxmrglw insn.
8560
8561 2018-01-17 Andrew Waterman <andrew@sifive.com>
8562
8563 * config/riscv/riscv.c (riscv_conditional_register_usage): If
8564 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
8565
8566 2018-01-17 David Malcolm <dmalcolm@redhat.com>
8567
8568 PR lto/83121
8569 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
8570 call the lto_location_cache before reading the
8571 DECL_SOURCE_LOCATION of the types.
8572
8573 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
8574 Richard Sandiford <richard.sandiford@linaro.org>
8575
8576 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
8577 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
8578 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
8579 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
8580 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
8581 Add declaration.
8582 * config/aarch64/constraints.md (aarch64_movti_operand):
8583 Limit immediates.
8584 * config/aarch64/predicates.md (Uti): Add new constraint.
8585
8586 2018-01-17 Carl Love <cel@us.ibm.com>
8587
8588 * config/rs6000/vsx.md (define_expand xl_len_r,
8589 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
8590 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
8591 lxvll.
8592 (define_expand, define_insn): Move the shift left from the
8593 define_insn to the define_expand for lxvl and stxvl instructions.
8594 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
8595 and XL_LEN_R definitions to PURE.
8596
8597 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
8598
8599 * config/i386/i386.c (indirect_thunk_name): Declare regno
8600 as unsigned int. Compare regno with INVALID_REGNUM.
8601 (output_indirect_thunk): Ditto.
8602 (output_indirect_thunk_function): Ditto.
8603 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
8604 in the call to output_indirect_thunk_function.
8605
8606 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
8607
8608 PR middle-end/83884
8609 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
8610 rather than the size of inner_type to determine the stack slot size
8611 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
8612
8613 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
8614
8615 PR target/83546
8616 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
8617 to PTA_SILVERMONT.
8618
8619 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
8620
8621 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
8622 endian Linux systems to optionally enable multilibs for selecting
8623 the long double type if the user configured an explicit type.
8624 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
8625 have no long double multilibs if not defined.
8626 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
8627 warn if the user used -mabi={ieee,ibm}longdouble and we built
8628 multilibs for long double.
8629 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
8630 appropriate multilib option.
8631 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
8632 multilib options.
8633 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
8634 for building long double multilibs.
8635 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
8636
8637 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
8638
8639 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
8640 copies.
8641
8642 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
8643 64 bits.
8644 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
8645 128 bits.
8646
8647 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
8648 variables.
8649
8650 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
8651 return value.
8652
8653 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8654
8655 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
8656 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
8657
8658 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8659
8660 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
8661 different rtl trees depending on TARGET_64BIT.
8662 (rs6000_gen_lvx): Likewise.
8663
8664 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8665
8666 * config/visium/visium.md (nop): Tweak comment.
8667 (hazard_nop): Likewise.
8668
8669 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8670
8671 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
8672 -mspeculate-indirect-jumps.
8673 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
8674 for -mno-speculate-indirect-jumps.
8675 (*call_indirect_elfv2<mode>_nospec): New define_insn.
8676 (*call_value_indirect_elfv2<mode>): Disable for
8677 -mno-speculate-indirect-jumps.
8678 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
8679 (indirect_jump): Emit different RTL for
8680 -mno-speculate-indirect-jumps.
8681 (*indirect_jump<mode>): Disable for
8682 -mno-speculate-indirect-jumps.
8683 (*indirect_jump<mode>_nospec): New define_insn.
8684 (tablejump): Emit different RTL for
8685 -mno-speculate-indirect-jumps.
8686 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
8687 (tablejumpsi_nospec): New define_expand.
8688 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
8689 (tablejumpdi_nospec): New define_expand.
8690 (*tablejump<mode>_internal1): Disable for
8691 -mno-speculate-indirect-jumps.
8692 (*tablejump<mode>_internal1_nospec): New define_insn.
8693 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
8694 option.
8695
8696 2018-01-16 Artyom Skrobov tyomitch@gmail.com
8697
8698 * caller-save.c (insert_save): Drop unnecessary parameter. All
8699 callers updated.
8700
8701 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8702 Richard Biener <rguenth@suse.de>
8703
8704 PR libgomp/83590
8705 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
8706 return early, inline manually is_gimple_sizepos. Make sure if we
8707 call gimplify_expr we don't end up with a gimple constant.
8708 * tree.c (variably_modified_type_p): Don't return true for
8709 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
8710 * gimplify.h (is_gimple_sizepos): Remove.
8711
8712 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8713
8714 PR tree-optimization/83857
8715 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
8716 vectorizable_live_operation for pure SLP statements.
8717 (vectorizable_live_operation): Handle PHIs.
8718
8719 2018-01-16 Richard Biener <rguenther@suse.de>
8720
8721 PR tree-optimization/83867
8722 * tree-vect-stmts.c (vect_transform_stmt): Precompute
8723 nested_in_vect_loop_p since the scalar stmt may get invalidated.
8724
8725 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8726
8727 PR c/83844
8728 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
8729 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
8730 If off is not INTEGER_CST, issue a may not be aligned warning
8731 rather than isn't aligned. Use isn%'t rather than isn't.
8732 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
8733 into MULT_EXPR.
8734 <case MULT_EXPR>: Improve the case when bottom and one of the
8735 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
8736 operand, in that case check if the other operand is multiple of
8737 bottom divided by the INTEGER_CST operand.
8738
8739 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8740
8741 PR target/83858
8742 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
8743 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
8744 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
8745 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
8746 * config/pa/pa.c (pa_function_arg_advance): Likewise.
8747 (pa_function_arg, pa_arg_partial_bytes): Likewise.
8748 (pa_function_arg_size): New function.
8749
8750 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8751
8752 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
8753 in a separate statement.
8754
8755 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8756
8757 PR tree-optimization/83847
8758 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
8759 group gathers and scatters.
8760
8761 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8762
8763 PR rtl-optimization/86620
8764 * params.def (max-sched-ready-insns): Bump minimum value to 1.
8765
8766 PR rtl-optimization/83213
8767 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
8768 to last if both are JUMP_INSNs.
8769
8770 PR tree-optimization/83843
8771 * gimple-ssa-store-merging.c
8772 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
8773 store_immediate_info for bswap/nop orig_stores.
8774
8775 2018-01-15 Andrew Waterman <andrew@sifive.com>
8776
8777 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
8778 !TARGET_MUL.
8779 <UDIV>: Increase cost if !TARGET_DIV.
8780
8781 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
8782
8783 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
8784 (define_attr "cr_logical_3op"): New.
8785 (cceq_ior_compare): Adjust.
8786 (cceq_ior_compare_complement): Adjust.
8787 (*cceq_rev_compare): Adjust.
8788 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
8789 (is_cracked_insn): Adjust.
8790 (insn_must_be_first_in_group): Adjust.
8791 * config/rs6000/40x.md: Adjust.
8792 * config/rs6000/440.md: Adjust.
8793 * config/rs6000/476.md: Adjust.
8794 * config/rs6000/601.md: Adjust.
8795 * config/rs6000/603.md: Adjust.
8796 * config/rs6000/6xx.md: Adjust.
8797 * config/rs6000/7450.md: Adjust.
8798 * config/rs6000/7xx.md: Adjust.
8799 * config/rs6000/8540.md: Adjust.
8800 * config/rs6000/cell.md: Adjust.
8801 * config/rs6000/e300c2c3.md: Adjust.
8802 * config/rs6000/e500mc.md: Adjust.
8803 * config/rs6000/e500mc64.md: Adjust.
8804 * config/rs6000/e5500.md: Adjust.
8805 * config/rs6000/e6500.md: Adjust.
8806 * config/rs6000/mpc.md: Adjust.
8807 * config/rs6000/power4.md: Adjust.
8808 * config/rs6000/power5.md: Adjust.
8809 * config/rs6000/power6.md: Adjust.
8810 * config/rs6000/power7.md: Adjust.
8811 * config/rs6000/power8.md: Adjust.
8812 * config/rs6000/power9.md: Adjust.
8813 * config/rs6000/rs64.md: Adjust.
8814 * config/rs6000/titan.md: Adjust.
8815
8816 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8817
8818 * config/i386/predicates.md (indirect_branch_operand): Rewrite
8819 ix86_indirect_branch_register logic.
8820
8821 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8822
8823 * config/i386/constraints.md (Bs): Update
8824 ix86_indirect_branch_register check. Don't check
8825 ix86_indirect_branch_register with GOT_memory_operand.
8826 (Bw): Likewise.
8827 * config/i386/predicates.md (GOT_memory_operand): Don't check
8828 ix86_indirect_branch_register here.
8829 (GOT32_symbol_operand): Likewise.
8830
8831 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8832
8833 * config/i386/predicates.md (constant_call_address_operand):
8834 Rewrite ix86_indirect_branch_register logic.
8835 (sibcall_insn_operand): Likewise.
8836
8837 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8838
8839 * config/i386/constraints.md (Bs): Replace
8840 ix86_indirect_branch_thunk_register with
8841 ix86_indirect_branch_register.
8842 (Bw): Likewise.
8843 * config/i386/i386.md (indirect_jump): Likewise.
8844 (tablejump): Likewise.
8845 (*sibcall_memory): Likewise.
8846 (*sibcall_value_memory): Likewise.
8847 Peepholes of indirect call and jump via memory: Likewise.
8848 * config/i386/i386.opt: Likewise.
8849 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8850 (GOT_memory_operand): Likewise.
8851 (call_insn_operand): Likewise.
8852 (sibcall_insn_operand): Likewise.
8853 (GOT32_symbol_operand): Likewise.
8854
8855 2018-01-15 Jakub Jelinek <jakub@redhat.com>
8856
8857 PR middle-end/83837
8858 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
8859 type rather than type addr's type points to.
8860 (expand_omp_atomic_mutex): Likewise.
8861 (expand_omp_atomic): Likewise.
8862
8863 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8864
8865 PR target/83839
8866 * config/i386/i386.c (output_indirect_thunk_function): Use
8867 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
8868 for __x86_return_thunk.
8869
8870 2018-01-15 Richard Biener <rguenther@suse.de>
8871
8872 PR middle-end/83850
8873 * expmed.c (extract_bit_field_1): Fix typo.
8874
8875 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8876
8877 PR target/83687
8878 * config/arm/iterators.md (VF): New mode iterator.
8879 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
8880 Remove integer-related logic from pattern.
8881 (neon_vabd<mode>_3): Likewise.
8882
8883 2018-01-15 Jakub Jelinek <jakub@redhat.com>
8884
8885 PR middle-end/82694
8886 * common.opt (fstrict-overflow): No longer an alias.
8887 (fwrapv-pointer): New option.
8888 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
8889 also for pointer types based on flag_wrapv_pointer.
8890 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
8891 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
8892 opts->x_flag_wrapv got set.
8893 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
8894 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
8895 POINTER_TYPE_OVERFLOW_UNDEFINED.
8896 * match.pd: Likewise in address comparison pattern.
8897 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
8898
8899 2018-01-15 Richard Biener <rguenther@suse.de>
8900
8901 PR lto/83804
8902 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
8903 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
8904 Reset type names to their identifier if their TYPE_DECL doesn't
8905 have linkage (and thus is used for ODR and devirt).
8906 (save_debug_info_for_decl): Remove.
8907 (save_debug_info_for_type): Likewise.
8908 (add_tree_to_fld_list): Adjust.
8909 * tree-pretty-print.c (dump_generic_node): Make dumping of
8910 type names more robust.
8911
8912 2018-01-15 Richard Biener <rguenther@suse.de>
8913
8914 * BASE-VER: Bump to 8.0.1.
8915
8916 2018-01-14 Martin Sebor <msebor@redhat.com>
8917
8918 PR other/83508
8919 * builtins.c (check_access): Avoid warning when the no-warning bit
8920 is set.
8921
8922 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
8923
8924 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
8925 * ira-color (allocno_hard_regs_compare): Likewise.
8926
8927 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
8928
8929 PR target/83013
8930 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
8931 Use .pushsection/.popsection.
8932
8933 2018-01-14 Martin Sebor <msebor@redhat.com>
8934
8935 PR c++/81327
8936 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
8937
8938 2018-01-14 Jakub Jelinek <jakub@redhat.com>
8939
8940 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
8941 entry from extra_headers.
8942 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
8943 extra_headers, make the list bitwise identical to the i?86-*-* one.
8944
8945 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8946
8947 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
8948 -mcmodel=large with -mindirect-branch=thunk,
8949 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
8950 -mfunction-return=thunk-extern.
8951 * doc/invoke.texi: Document -mcmodel=large is incompatible with
8952 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
8953 -mfunction-return=thunk and -mfunction-return=thunk-extern.
8954
8955 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8956
8957 * config/i386/i386.c (print_reg): Print the name of the full
8958 integer register without '%'.
8959 (ix86_print_operand): Handle 'V'.
8960 * doc/extend.texi: Document 'V' modifier.
8961
8962 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8963
8964 * config/i386/constraints.md (Bs): Disallow memory operand for
8965 -mindirect-branch-register.
8966 (Bw): Likewise.
8967 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8968 (GOT_memory_operand): Likewise.
8969 (call_insn_operand): Likewise.
8970 (sibcall_insn_operand): Likewise.
8971 (GOT32_symbol_operand): Likewise.
8972 * config/i386/i386.md (indirect_jump): Call convert_memory_address
8973 for -mindirect-branch-register.
8974 (tablejump): Likewise.
8975 (*sibcall_memory): Likewise.
8976 (*sibcall_value_memory): Likewise.
8977 Disallow peepholes of indirect call and jump via memory for
8978 -mindirect-branch-register.
8979 (*call_pop): Replace m with Bw.
8980 (*call_value_pop): Likewise.
8981 (*sibcall_pop_memory): Replace m with Bs.
8982 * config/i386/i386.opt (mindirect-branch-register): New option.
8983 * doc/invoke.texi: Document -mindirect-branch-register option.
8984
8985 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8986
8987 * config/i386/i386-protos.h (ix86_output_function_return): New.
8988 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
8989 set function_return_type.
8990 (indirect_thunk_name): Add ret_p to indicate thunk for function
8991 return.
8992 (output_indirect_thunk_function): Pass false to
8993 indirect_thunk_name.
8994 (ix86_output_indirect_branch_via_reg): Likewise.
8995 (ix86_output_indirect_branch_via_push): Likewise.
8996 (output_indirect_thunk_function): Create alias for function
8997 return thunk if regno < 0.
8998 (ix86_output_function_return): New function.
8999 (ix86_handle_fndecl_attribute): Handle function_return.
9000 (ix86_attribute_table): Add function_return.
9001 * config/i386/i386.h (machine_function): Add
9002 function_return_type.
9003 * config/i386/i386.md (simple_return_internal): Use
9004 ix86_output_function_return.
9005 (simple_return_internal_long): Likewise.
9006 * config/i386/i386.opt (mfunction-return=): New option.
9007 (indirect_branch): Mention -mfunction-return=.
9008 * doc/extend.texi: Document function_return function attribute.
9009 * doc/invoke.texi: Document -mfunction-return= option.
9010
9011 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
9012
9013 * config/i386/i386-opts.h (indirect_branch): New.
9014 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
9015 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
9016 with local indirect jump when converting indirect call and jump.
9017 (ix86_set_indirect_branch_type): New.
9018 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
9019 (indirectlabelno): New.
9020 (indirect_thunk_needed): Likewise.
9021 (indirect_thunk_bnd_needed): Likewise.
9022 (indirect_thunks_used): Likewise.
9023 (indirect_thunks_bnd_used): Likewise.
9024 (INDIRECT_LABEL): Likewise.
9025 (indirect_thunk_name): Likewise.
9026 (output_indirect_thunk): Likewise.
9027 (output_indirect_thunk_function): Likewise.
9028 (ix86_output_indirect_branch_via_reg): Likewise.
9029 (ix86_output_indirect_branch_via_push): Likewise.
9030 (ix86_output_indirect_branch): Likewise.
9031 (ix86_output_indirect_jmp): Likewise.
9032 (ix86_code_end): Call output_indirect_thunk_function if needed.
9033 (ix86_output_call_insn): Call ix86_output_indirect_branch if
9034 needed.
9035 (ix86_handle_fndecl_attribute): Handle indirect_branch.
9036 (ix86_attribute_table): Add indirect_branch.
9037 * config/i386/i386.h (machine_function): Add indirect_branch_type
9038 and has_local_indirect_jump.
9039 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
9040 to true.
9041 (tablejump): Likewise.
9042 (*indirect_jump): Use ix86_output_indirect_jmp.
9043 (*tablejump_1): Likewise.
9044 (simple_return_indirect_internal): Likewise.
9045 * config/i386/i386.opt (mindirect-branch=): New option.
9046 (indirect_branch): New.
9047 (keep): Likewise.
9048 (thunk): Likewise.
9049 (thunk-inline): Likewise.
9050 (thunk-extern): Likewise.
9051 * doc/extend.texi: Document indirect_branch function attribute.
9052 * doc/invoke.texi: Document -mindirect-branch= option.
9053
9054 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
9055
9056 PR ipa/83051
9057 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
9058
9059 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
9060
9061 * ipa-inline.c (want_inline_small_function_p): Return false if
9062 inlining has already failed with CIF_FINAL_ERROR.
9063 (update_caller_keys): Call want_inline_small_function_p before
9064 can_inline_edge_p.
9065 (update_callee_keys): Likewise.
9066
9067 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9068
9069 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
9070 New function.
9071 (rs6000_quadword_masked_address_p): Likewise.
9072 (quad_aligned_load_p): Likewise.
9073 (quad_aligned_store_p): Likewise.
9074 (const_load_sequence_p): Add comment to describe the outer-most loop.
9075 (mimic_memory_attributes_and_flags): New function.
9076 (rs6000_gen_stvx): Likewise.
9077 (replace_swapped_aligned_store): Likewise.
9078 (rs6000_gen_lvx): Likewise.
9079 (replace_swapped_aligned_load): Likewise.
9080 (replace_swapped_load_constant): Capitalize argument name in
9081 comment describing this function.
9082 (rs6000_analyze_swaps): Add a third pass to search for vector loads
9083 and stores that access quad-word aligned addresses and replace
9084 with stvx or lvx instructions when appropriate.
9085 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
9086 New function prototype.
9087 (rs6000_quadword_masked_address_p): Likewise.
9088 (rs6000_gen_lvx): Likewise.
9089 (rs6000_gen_stvx): Likewise.
9090 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
9091 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
9092 when memory address is aligned.
9093 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
9094 this split to select lvx instruction when memory address is aligned.
9095 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
9096 instruction when memory address is aligned.
9097 (*vsx_le_perm_load_v16qi): Likewise.
9098 (four unnamed splitters): Modify to select the stvx instruction
9099 when memory is aligned.
9100
9101 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
9102
9103 * predict.c (determine_unlikely_bbs): Handle correctly BBs
9104 which appears in the queue multiple times.
9105
9106 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9107 Alan Hayward <alan.hayward@arm.com>
9108 David Sherwood <david.sherwood@arm.com>
9109
9110 * tree-vectorizer.h (vec_lower_bound): New structure.
9111 (_loop_vec_info): Add check_nonzero and lower_bounds.
9112 (LOOP_VINFO_CHECK_NONZERO): New macro.
9113 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
9114 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
9115 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
9116 fields. Make seg_len the distance travelled, not including the
9117 access size.
9118 (dr_direction_indicator): Declare.
9119 (dr_zero_step_indicator): Likewise.
9120 (dr_known_forward_stride_p): Likewise.
9121 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
9122 tree-ssanames.h.
9123 (runtime_alias_check_p): Allow runtime alias checks with
9124 variable strides.
9125 (operator ==): Compare access_size and align.
9126 (prune_runtime_alias_test_list): Rework for new distinction between
9127 the access_size and seg_len.
9128 (create_intersect_range_checks_index): Likewise. Cope with polynomial
9129 segment lengths.
9130 (get_segment_min_max): New function.
9131 (create_intersect_range_checks): Use it.
9132 (dr_step_indicator): New function.
9133 (dr_direction_indicator): Likewise.
9134 (dr_zero_step_indicator): Likewise.
9135 (dr_known_forward_stride_p): Likewise.
9136 * tree-loop-distribution.c (data_ref_segment_size): Return
9137 DR_STEP * (niters - 1).
9138 (compute_alias_check_pairs): Update call to the dr_with_seg_len
9139 constructor.
9140 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
9141 (vect_preserves_scalar_order_p): New function, split out from...
9142 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
9143 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
9144 (vect_vfa_access_size): New function.
9145 (vect_vfa_align): Likewise.
9146 (vect_compile_time_alias): Take access_size_a and access_b arguments.
9147 (dump_lower_bound): New function.
9148 (vect_check_lower_bound): Likewise.
9149 (vect_small_gap_p): Likewise.
9150 (vectorizable_with_step_bound_p): Likewise.
9151 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
9152 depencies if the vectorization factor is 1. Convert the checks
9153 for nonzero steps into checks on the bounds of DR_STEP. Try using
9154 a bunds check for variable steps if the minimum required step is
9155 relatively small. Update calls to the dr_with_seg_len
9156 constructor and to vect_compile_time_alias.
9157 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
9158 function.
9159 (vect_loop_versioning): Call it.
9160 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
9161 when retrying.
9162 (vect_estimate_min_profitable_iters): Account for any bounds checks.
9163
9164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9165 Alan Hayward <alan.hayward@arm.com>
9166 David Sherwood <david.sherwood@arm.com>
9167
9168 * doc/sourcebuild.texi (vect_scatter_store): Document.
9169 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
9170 optabs.
9171 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
9172 Document.
9173 * genopinit.c (main): Add supports_vec_scatter_store and
9174 supports_vec_scatter_store_cached to target_optabs.
9175 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
9176 IFN_MASK_SCATTER_STORE.
9177 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
9178 functions.
9179 * internal-fn.h (internal_store_fn_p): Declare.
9180 (internal_fn_stored_value_index): Likewise.
9181 * internal-fn.c (scatter_store_direct): New macro.
9182 (expand_scatter_store_optab_fn): New function.
9183 (direct_scatter_store_optab_supported_p): New macro.
9184 (internal_store_fn_p): New function.
9185 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
9186 IFN_MASK_SCATTER_STORE.
9187 (internal_fn_mask_index): Likewise.
9188 (internal_fn_stored_value_index): New function.
9189 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
9190 for scatter stores.
9191 * optabs-query.h (supports_vec_scatter_store_p): Declare.
9192 * optabs-query.c (supports_vec_scatter_store_p): New function.
9193 * tree-vectorizer.h (vect_get_store_rhs): Declare.
9194 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
9195 true for scatter stores.
9196 (vect_gather_scatter_fn_p): Handle scatter stores too.
9197 (vect_check_gather_scatter): Consider using scatter stores if
9198 supports_vec_scatter_store_p.
9199 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
9200 scatter stores too.
9201 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9202 internal_fn_stored_value_index.
9203 (check_load_store_masking): Handle scatter stores too.
9204 (vect_get_store_rhs): Make public.
9205 (vectorizable_call): Use internal_store_fn_p.
9206 (vectorizable_store): Handle scatter store internal functions.
9207 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
9208 when deciding whether the end of the group has been reached.
9209 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
9210 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
9211 (mask_scatter_store<mode>): New insns.
9212
9213 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9214 Alan Hayward <alan.hayward@arm.com>
9215 David Sherwood <david.sherwood@arm.com>
9216
9217 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
9218 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
9219 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
9220 function.
9221 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
9222 Use vect_truncate_gather_scatter_offset if we can't treat the
9223 operation as a normal gather load or scatter store.
9224 (get_group_load_store_type): Take the gather_scatter_info
9225 as argument. Try using a gather load or scatter store for
9226 single-element groups.
9227 (get_load_store_type): Update calls to get_group_load_store_type
9228 and vect_use_strided_gather_scatters_p.
9229
9230 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9231 Alan Hayward <alan.hayward@arm.com>
9232 David Sherwood <david.sherwood@arm.com>
9233
9234 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
9235 optional tree argument.
9236 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
9237 null target hooks.
9238 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
9239 but continue to use the current value as a fallback.
9240 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
9241 to compare the updates.
9242 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
9243 (get_load_store_type): Use it when handling a strided access.
9244 (vect_get_strided_load_store_ops): New function.
9245 (vect_get_data_ptr_increment): Likewise.
9246 (vectorizable_load): Handle strided gather loads. Always pass
9247 a step to vect_create_data_ref_ptr and bump_vector_ptr.
9248
9249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9250 Alan Hayward <alan.hayward@arm.com>
9251 David Sherwood <david.sherwood@arm.com>
9252
9253 * doc/md.texi (gather_load@var{m}): Document.
9254 (mask_gather_load@var{m}): Likewise.
9255 * genopinit.c (main): Add supports_vec_gather_load and
9256 supports_vec_gather_load_cached to target_optabs.
9257 * optabs-tree.c (init_tree_optimization_optabs): Use
9258 ggc_cleared_alloc to allocate target_optabs.
9259 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
9260 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
9261 functions.
9262 * internal-fn.h (internal_load_fn_p): Declare.
9263 (internal_gather_scatter_fn_p): Likewise.
9264 (internal_fn_mask_index): Likewise.
9265 (internal_gather_scatter_fn_supported_p): Likewise.
9266 * internal-fn.c (gather_load_direct): New macro.
9267 (expand_gather_load_optab_fn): New function.
9268 (direct_gather_load_optab_supported_p): New macro.
9269 (direct_internal_fn_optab): New function.
9270 (internal_load_fn_p): Likewise.
9271 (internal_gather_scatter_fn_p): Likewise.
9272 (internal_fn_mask_index): Likewise.
9273 (internal_gather_scatter_fn_supported_p): Likewise.
9274 * optabs-query.c (supports_at_least_one_mode_p): New function.
9275 (supports_vec_gather_load_p): Likewise.
9276 * optabs-query.h (supports_vec_gather_load_p): Declare.
9277 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
9278 and memory_type field.
9279 (NUM_PATTERNS): Bump to 15.
9280 * tree-vect-data-refs.c: Include internal-fn.h.
9281 (vect_gather_scatter_fn_p): New function.
9282 (vect_describe_gather_scatter_call): Likewise.
9283 (vect_check_gather_scatter): Try using internal functions for
9284 gather loads. Recognize existing calls to a gather load function.
9285 (vect_analyze_data_refs): Consider using gather loads if
9286 supports_vec_gather_load_p.
9287 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
9288 (vect_get_gather_scatter_offset_type): Likewise.
9289 (vect_convert_mask_for_vectype): Likewise.
9290 (vect_add_conversion_to_patterm): Likewise.
9291 (vect_try_gather_scatter_pattern): Likewise.
9292 (vect_recog_gather_scatter_pattern): New pattern recognizer.
9293 (vect_vect_recog_func_ptrs): Add it.
9294 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9295 internal_fn_mask_index and internal_gather_scatter_fn_p.
9296 (check_load_store_masking): Take the gather_scatter_info as an
9297 argument and handle gather loads.
9298 (vect_get_gather_scatter_ops): New function.
9299 (vectorizable_call): Check internal_load_fn_p.
9300 (vectorizable_load): Likewise. Handle gather load internal
9301 functions.
9302 (vectorizable_store): Update call to check_load_store_masking.
9303 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
9304 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
9305 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
9306 (aarch64_gather_scale_operand_d): New predicates.
9307 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
9308 (mask_gather_load<mode>): New insns.
9309
9310 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9311 Alan Hayward <alan.hayward@arm.com>
9312 David Sherwood <david.sherwood@arm.com>
9313
9314 * optabs.def (fold_left_plus_optab): New optab.
9315 * doc/md.texi (fold_left_plus_@var{m}): Document.
9316 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
9317 * internal-fn.c (fold_left_direct): Define.
9318 (expand_fold_left_optab_fn): Likewise.
9319 (direct_fold_left_optab_supported_p): Likewise.
9320 * fold-const-call.c (fold_const_fold_left): New function.
9321 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
9322 * tree-parloops.c (valid_reduction_p): New function.
9323 (gather_scalar_reductions): Use it.
9324 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
9325 (vect_finish_replace_stmt): Declare.
9326 * tree-vect-loop.c (fold_left_reduction_fn): New function.
9327 (needs_fold_left_reduction_p): New function, split out from...
9328 (vect_is_simple_reduction): ...here. Accept reductions that
9329 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
9330 (vect_force_simple_reduction): Also store the reduction type in
9331 the assignment's STMT_VINFO_REDUC_TYPE.
9332 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
9333 (merge_with_identity): New function.
9334 (vect_expand_fold_left): Likewise.
9335 (vectorize_fold_left_reduction): Likewise.
9336 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
9337 scalar phi in place for it. Check for target support and reject
9338 cases that would reassociate the operation. Defer the transform
9339 phase to vectorize_fold_left_reduction.
9340 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
9341 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
9342 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
9343
9344 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9345
9346 * tree-if-conv.c (predicate_mem_writes): Remove redundant
9347 call to ifc_temp_var.
9348
9349 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9350 Alan Hayward <alan.hayward@arm.com>
9351 David Sherwood <david.sherwood@arm.com>
9352
9353 * target.def (legitimize_address_displacement): Take the original
9354 offset as a poly_int.
9355 * targhooks.h (default_legitimize_address_displacement): Update
9356 accordingly.
9357 * targhooks.c (default_legitimize_address_displacement): Likewise.
9358 * doc/tm.texi: Regenerate.
9359 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
9360 as an argument, moving assert of ad->disp == ad->disp_term to...
9361 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
9362 Try calling targetm.legitimize_address_displacement before expanding
9363 the address rather than afterwards, and adjust for the new interface.
9364 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
9365 Match the new hook interface. Handle SVE addresses.
9366 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
9367 new hook interface.
9368
9369 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9370
9371 * Makefile.in (OBJS): Add early-remat.o.
9372 * target.def (select_early_remat_modes): New hook.
9373 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
9374 * doc/tm.texi: Regenerate.
9375 * targhooks.h (default_select_early_remat_modes): Declare.
9376 * targhooks.c (default_select_early_remat_modes): New function.
9377 * timevar.def (TV_EARLY_REMAT): New timevar.
9378 * passes.def (pass_early_remat): New pass.
9379 * tree-pass.h (make_pass_early_remat): Declare.
9380 * early-remat.c: New file.
9381 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
9382 function.
9383 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
9384
9385 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9386 Alan Hayward <alan.hayward@arm.com>
9387 David Sherwood <david.sherwood@arm.com>
9388
9389 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
9390 vfm1 with a bound_epilog parameter.
9391 (vect_do_peeling): Update calls accordingly, and move the prologue
9392 call earlier in the function. Treat the base bound_epilog as 0 for
9393 fully-masked loops and retain vf - 1 for other loops. Add 1 to
9394 this base when peeling for gaps.
9395 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
9396 with fully-masked loops.
9397 (vect_estimate_min_profitable_iters): Handle the single peeled
9398 iteration in that case.
9399
9400 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9401 Alan Hayward <alan.hayward@arm.com>
9402 David Sherwood <david.sherwood@arm.com>
9403
9404 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
9405 single-element interleaving even if the size is not a power of 2.
9406 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
9407 accesses for single-element interleaving if the group size is
9408 not a power of 2.
9409
9410 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9411 Alan Hayward <alan.hayward@arm.com>
9412 David Sherwood <david.sherwood@arm.com>
9413
9414 * doc/md.texi (fold_extract_last_@var{m}): Document.
9415 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
9416 * optabs.def (fold_extract_last_optab): New optab.
9417 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
9418 * internal-fn.c (fold_extract_direct): New macro.
9419 (expand_fold_extract_optab_fn): Likewise.
9420 (direct_fold_extract_optab_supported_p): Likewise.
9421 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
9422 * tree-vect-loop.c (vect_model_reduction_cost): Handle
9423 EXTRACT_LAST_REDUCTION.
9424 (get_initial_def_for_reduction): Do not create an initial vector
9425 for EXTRACT_LAST_REDUCTION reductions.
9426 (vectorizable_reduction): Leave the scalar phi in place for
9427 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
9428 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
9429 epilogue code for EXTRACT_LAST_REDUCTION and defer the
9430 transform phase to vectorizable_condition.
9431 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
9432 split out from...
9433 (vect_finish_stmt_generation): ...here.
9434 (vect_finish_replace_stmt): New function.
9435 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
9436 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
9437 pattern.
9438 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
9439
9440 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9441 Alan Hayward <alan.hayward@arm.com>
9442 David Sherwood <david.sherwood@arm.com>
9443
9444 * doc/md.texi (extract_last_@var{m}): Document.
9445 * optabs.def (extract_last_optab): New optab.
9446 * internal-fn.def (EXTRACT_LAST): New internal function.
9447 * internal-fn.c (cond_unary_direct): New macro.
9448 (expand_cond_unary_optab_fn): Likewise.
9449 (direct_cond_unary_optab_supported_p): Likewise.
9450 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
9451 loops using EXTRACT_LAST.
9452 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
9453 (extract_last_<mode>): ...this optab.
9454 (vec_extract<mode><Vel>): Update accordingly.
9455
9456 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9457 Alan Hayward <alan.hayward@arm.com>
9458 David Sherwood <david.sherwood@arm.com>
9459
9460 * target.def (empty_mask_is_expensive): New hook.
9461 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
9462 * doc/tm.texi: Regenerate.
9463 * targhooks.h (default_empty_mask_is_expensive): Declare.
9464 * targhooks.c (default_empty_mask_is_expensive): New function.
9465 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
9466 if the target says that empty masks are expensive.
9467 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
9468 New function.
9469 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
9470
9471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9472 Alan Hayward <alan.hayward@arm.com>
9473 David Sherwood <david.sherwood@arm.com>
9474
9475 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
9476 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
9477 (vect_use_loop_mask_for_alignment_p): New function.
9478 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
9479 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
9480 niters_skip argument. Make sure that the first niters_skip elements
9481 of the first iteration are inactive.
9482 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
9483 Update call to vect_set_loop_masks_directly.
9484 (get_misalign_in_elems): New function, split out from...
9485 (vect_gen_prolog_loop_niters): ...here.
9486 (vect_update_init_of_dr): Take a code argument that specifies whether
9487 the adjustment should be added or subtracted.
9488 (vect_update_init_of_drs): Likewise.
9489 (vect_prepare_for_masked_peels): New function.
9490 (vect_do_peeling): Skip prologue peeling if we're using a mask
9491 instead. Update call to vect_update_inits_of_drs.
9492 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9493 mask_skip_niters.
9494 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
9495 alignment. Do not include the number of peeled iterations in
9496 the minimum threshold in that case.
9497 (vectorizable_induction): Adjust the start value down by
9498 LOOP_VINFO_MASK_SKIP_NITERS iterations.
9499 (vect_transform_loop): Call vect_prepare_for_masked_peels.
9500 Take the number of skipped iterations into account when calculating
9501 the loop bounds.
9502 * tree-vect-stmts.c (vect_gen_while_not): New function.
9503
9504 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9505 Alan Hayward <alan.hayward@arm.com>
9506 David Sherwood <david.sherwood@arm.com>
9507
9508 * doc/sourcebuild.texi (vect_fully_masked): Document.
9509 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
9510 default value to 0.
9511 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
9512 split out from...
9513 (vect_analyze_loop_2): ...here. Don't check the vectorization
9514 factor against the number of loop iterations if the loop is
9515 fully-masked.
9516
9517 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9518 Alan Hayward <alan.hayward@arm.com>
9519 David Sherwood <david.sherwood@arm.com>
9520
9521 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
9522 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
9523 (dump_groups): Update accordingly.
9524 (iv_use::mem_type): New member variable.
9525 (address_p): New function.
9526 (record_use): Add a mem_type argument and initialize the new
9527 mem_type field.
9528 (record_group_use): Add a mem_type argument. Use address_p.
9529 Remove obsolete null checks of base_object. Update call to record_use.
9530 (find_interesting_uses_op): Update call to record_group_use.
9531 (find_interesting_uses_cond): Likewise.
9532 (find_interesting_uses_address): Likewise.
9533 (get_mem_type_for_internal_fn): New function.
9534 (find_address_like_use): Likewise.
9535 (find_interesting_uses_stmt): Try find_address_like_use before
9536 calling find_interesting_uses_op.
9537 (addr_offset_valid_p): Use the iv mem_type field as the type
9538 of the addressed memory.
9539 (add_autoinc_candidates): Likewise.
9540 (get_address_cost): Likewise.
9541 (split_small_address_groups_p): Use address_p.
9542 (split_address_groups): Likewise.
9543 (add_iv_candidate_for_use): Likewise.
9544 (autoinc_possible_for_pair): Likewise.
9545 (rewrite_groups): Likewise.
9546 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
9547 (determine_group_iv_cost): Update after split of USE_ADDRESS.
9548 (get_alias_ptr_type_for_ptr_address): New function.
9549 (rewrite_use_address): Rewrite address uses in calls that were
9550 identified by find_address_like_use.
9551
9552 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9553 Alan Hayward <alan.hayward@arm.com>
9554 David Sherwood <david.sherwood@arm.com>
9555
9556 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
9557 TARGET_MEM_REFs.
9558 * gimple-expr.h (is_gimple_addressable: Likewise.
9559 * gimple-expr.c (is_gimple_address): Likewise.
9560 * internal-fn.c (expand_call_mem_ref): New function.
9561 (expand_mask_load_optab_fn): Use it.
9562 (expand_mask_store_optab_fn): Likewise.
9563
9564 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9565 Alan Hayward <alan.hayward@arm.com>
9566 David Sherwood <david.sherwood@arm.com>
9567
9568 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
9569 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
9570 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
9571 (cond_umax@var{mode}): Document.
9572 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
9573 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
9574 (cond_umin_optab, cond_umax_optab): New optabs.
9575 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
9576 (COND_IOR, COND_XOR): New internal functions.
9577 * internal-fn.h (get_conditional_internal_fn): Declare.
9578 * internal-fn.c (cond_binary_direct): New macro.
9579 (expand_cond_binary_optab_fn): Likewise.
9580 (direct_cond_binary_optab_supported_p): Likewise.
9581 (get_conditional_internal_fn): New function.
9582 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
9583 Cope with reduction statements that are vectorized as calls rather
9584 than assignments.
9585 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
9586 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
9587 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
9588 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9589 (UNSPEC_COND_EOR): New unspecs.
9590 (optab): Add mappings for them.
9591 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
9592 (sve_int_op, sve_fp_op): New int attributes.
9593
9594 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9595 Alan Hayward <alan.hayward@arm.com>
9596 David Sherwood <david.sherwood@arm.com>
9597
9598 * optabs.def (while_ult_optab): New optab.
9599 * doc/md.texi (while_ult@var{m}@var{n}): Document.
9600 * internal-fn.def (WHILE_ULT): New internal function.
9601 * internal-fn.h (direct_internal_fn_supported_p): New override
9602 that takes two types as argument.
9603 * internal-fn.c (while_direct): New macro.
9604 (expand_while_optab_fn): New function.
9605 (convert_optab_supported_p): Likewise.
9606 (direct_while_optab_supported_p): New macro.
9607 * wide-int.h (wi::udiv_ceil): New function.
9608 * tree-vectorizer.h (rgroup_masks): New structure.
9609 (vec_loop_masks): New typedef.
9610 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
9611 and fully_masked_p.
9612 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
9613 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
9614 (vect_max_vf): New function.
9615 (slpeel_make_loop_iterate_ntimes): Delete.
9616 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
9617 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
9618 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
9619 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
9620 internal-fn.h, stor-layout.h and optabs-query.h.
9621 (vect_set_loop_mask): New function.
9622 (add_preheader_seq): Likewise.
9623 (add_header_seq): Likewise.
9624 (interleave_supported_p): Likewise.
9625 (vect_maybe_permute_loop_masks): Likewise.
9626 (vect_set_loop_masks_directly): Likewise.
9627 (vect_set_loop_condition_masked): Likewise.
9628 (vect_set_loop_condition_unmasked): New function, split out from
9629 slpeel_make_loop_iterate_ntimes.
9630 (slpeel_make_loop_iterate_ntimes): Rename to..
9631 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
9632 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
9633 (vect_do_peeling): Update call accordingly.
9634 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
9635 loops.
9636 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9637 mask_compare_type, can_fully_mask_p and fully_masked_p.
9638 (release_vec_loop_masks): New function.
9639 (_loop_vec_info): Use it to free the loop masks.
9640 (can_produce_all_loop_masks_p): New function.
9641 (vect_get_max_nscalars_per_iter): Likewise.
9642 (vect_verify_full_masking): Likewise.
9643 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
9644 retries, and free the mask rgroups before retrying. Check loop-wide
9645 reasons for disallowing fully-masked loops. Make the final decision
9646 about whether use a fully-masked loop or not.
9647 (vect_estimate_min_profitable_iters): Do not assume that peeling
9648 for the number of iterations will be needed for fully-masked loops.
9649 (vectorizable_reduction): Disable fully-masked loops.
9650 (vectorizable_live_operation): Likewise.
9651 (vect_halve_mask_nunits): New function.
9652 (vect_double_mask_nunits): Likewise.
9653 (vect_record_loop_mask): Likewise.
9654 (vect_get_loop_mask): Likewise.
9655 (vect_transform_loop): Handle the case in which the final loop
9656 iteration might handle a partial vector. Call vect_set_loop_condition
9657 instead of slpeel_make_loop_iterate_ntimes.
9658 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
9659 (check_load_store_masking): New function.
9660 (prepare_load_store_mask): Likewise.
9661 (vectorizable_store): Handle fully-masked loops.
9662 (vectorizable_load): Likewise.
9663 (supportable_widening_operation): Use vect_halve_mask_nunits for
9664 booleans.
9665 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
9666 (vect_gen_while): New function.
9667 * config/aarch64/aarch64.md (umax<mode>3): New expander.
9668 (aarch64_uqdec<mode>): New insn.
9669
9670 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9671 Alan Hayward <alan.hayward@arm.com>
9672 David Sherwood <david.sherwood@arm.com>
9673
9674 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
9675 (reduc_xor_scal_optab): New optabs.
9676 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
9677 (reduc_xor_scal_@var{m}): Document.
9678 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
9679 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
9680 internal functions.
9681 * fold-const-call.c (fold_const_call): Handle them.
9682 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
9683 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
9684 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
9685 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
9686 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
9687 (UNSPEC_XORV): New unspecs.
9688 (optab): Add entries for them.
9689 (BITWISEV): New int iterator.
9690 (bit_reduc_op): New int attributes.
9691
9692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9693 Alan Hayward <alan.hayward@arm.com>
9694 David Sherwood <david.sherwood@arm.com>
9695
9696 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
9697 * internal-fn.def (VEC_SHL_INSERT): New internal function.
9698 * optabs.def (vec_shl_insert_optab): New optab.
9699 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
9700 (duplicate_and_interleave): Likewise.
9701 * tree-vect-loop.c: Include internal-fn.h.
9702 (neutral_op_for_slp_reduction): New function, split out from
9703 get_initial_defs_for_reduction.
9704 (get_initial_def_for_reduction): Handle option 2 for variable-length
9705 vectors by loading the neutral value into a vector and then shifting
9706 the initial value into element 0.
9707 (get_initial_defs_for_reduction): Replace the code argument with
9708 the neutral value calculated by neutral_op_for_slp_reduction.
9709 Use gimple_build_vector for constant-length vectors.
9710 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
9711 but the first group_size elements have a neutral value.
9712 Use duplicate_and_interleave otherwise.
9713 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
9714 Update call to get_initial_defs_for_reduction. Handle SLP
9715 reductions for variable-length vectors by creating one vector
9716 result for each scalar result, with the elements associated
9717 with other scalar results stubbed out with the neutral value.
9718 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
9719 Require IFN_VEC_SHL_INSERT for double reductions on
9720 variable-length vectors, or SLP reductions that have
9721 a neutral value. Require can_duplicate_and_interleave_p
9722 support for variable-length unchained SLP reductions if there
9723 is no neutral value, such as for MIN/MAX reductions. Also require
9724 the number of vector elements to be a multiple of the number of
9725 SLP statements when doing variable-length unchained SLP reductions.
9726 Update call to vect_create_epilog_for_reduction.
9727 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
9728 and remove initial values.
9729 (duplicate_and_interleave): Make public.
9730 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
9731 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
9732
9733 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9734 Alan Hayward <alan.hayward@arm.com>
9735 David Sherwood <david.sherwood@arm.com>
9736
9737 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
9738 (can_duplicate_and_interleave_p): New function.
9739 (vect_get_and_check_slp_defs): Take the vector of statements
9740 rather than just the current one. Remove excess parentheses.
9741 Restriction rejectinon of vect_constant_def and vect_external_def
9742 for variable-length vectors to boolean types, or types for which
9743 can_duplicate_and_interleave_p is false.
9744 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
9745 (duplicate_and_interleave): New function.
9746 (vect_get_constant_vectors): Use gimple_build_vector for
9747 constant-length vectors and suitable variable-length constant
9748 vectors. Use duplicate_and_interleave for other variable-length
9749 vectors. Don't defer the update when inserting new statements.
9750
9751 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9752 Alan Hayward <alan.hayward@arm.com>
9753 David Sherwood <david.sherwood@arm.com>
9754
9755 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
9756 min_profitable_iters doesn't go negative.
9757
9758 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9759 Alan Hayward <alan.hayward@arm.com>
9760 David Sherwood <david.sherwood@arm.com>
9761
9762 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
9763 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
9764 * optabs.def (vec_mask_load_lanes_optab): New optab.
9765 (vec_mask_store_lanes_optab): Likewise.
9766 * internal-fn.def (MASK_LOAD_LANES): New internal function.
9767 (MASK_STORE_LANES): Likewise.
9768 * internal-fn.c (mask_load_lanes_direct): New macro.
9769 (mask_store_lanes_direct): Likewise.
9770 (expand_mask_load_optab_fn): Handle masked operations.
9771 (expand_mask_load_lanes_optab_fn): New macro.
9772 (expand_mask_store_optab_fn): Handle masked operations.
9773 (expand_mask_store_lanes_optab_fn): New macro.
9774 (direct_mask_load_lanes_optab_supported_p): Likewise.
9775 (direct_mask_store_lanes_optab_supported_p): Likewise.
9776 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
9777 parameter.
9778 (vect_load_lanes_supported): Likewise.
9779 * tree-vect-data-refs.c (strip_conversion): New function.
9780 (can_group_stmts_p): Likewise.
9781 (vect_analyze_data_ref_accesses): Use it instead of checking
9782 for a pair of assignments.
9783 (vect_store_lanes_supported): Take a masked_p parameter.
9784 (vect_load_lanes_supported): Likewise.
9785 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
9786 vect_store_lanes_supported and vect_load_lanes_supported.
9787 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9788 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
9789 parameter. Don't allow gaps for masked accesses.
9790 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
9791 and vect_load_lanes_supported.
9792 (get_load_store_type): Take a masked_p parameter and update
9793 call to get_group_load_store_type.
9794 (vectorizable_store): Update call to get_load_store_type.
9795 Handle IFN_MASK_STORE_LANES.
9796 (vectorizable_load): Update call to get_load_store_type.
9797 Handle IFN_MASK_LOAD_LANES.
9798
9799 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9800 Alan Hayward <alan.hayward@arm.com>
9801 David Sherwood <david.sherwood@arm.com>
9802
9803 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
9804 modes for SVE.
9805 * config/aarch64/aarch64-protos.h
9806 (aarch64_sve_struct_memory_operand_p): Declare.
9807 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
9808 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
9809 (VPRED, vpred): Handle SVE structure modes.
9810 * config/aarch64/constraints.md (Utx): New constraint.
9811 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
9812 (aarch64_sve_struct_nonimmediate_operand): New predicates.
9813 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
9814 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
9815 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
9816 structure modes. Split into pieces after RA.
9817 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
9818 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
9819 New patterns.
9820 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
9821 SVE structure modes.
9822 (aarch64_classify_address): Likewise.
9823 (sizetochar): Move earlier in file.
9824 (aarch64_print_operand): Handle SVE register lists.
9825 (aarch64_array_mode): New function.
9826 (aarch64_sve_struct_memory_operand_p): Likewise.
9827 (TARGET_ARRAY_MODE): Redefine.
9828
9829 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9830 Alan Hayward <alan.hayward@arm.com>
9831 David Sherwood <david.sherwood@arm.com>
9832
9833 * target.def (array_mode): New target hook.
9834 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
9835 * doc/tm.texi: Regenerate.
9836 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
9837 * hooks.c (hook_optmode_mode_uhwi_none): New function.
9838 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
9839 targetm.array_mode.
9840 * stor-layout.c (mode_for_array): Likewise. Support polynomial
9841 type sizes.
9842
9843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9844 Alan Hayward <alan.hayward@arm.com>
9845 David Sherwood <david.sherwood@arm.com>
9846
9847 * fold-const.c (fold_binary_loc): Check the argument types
9848 rather than the result type when testing for a vector operation.
9849
9850 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9851
9852 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
9853 * doc/tm.texi: Regenerate.
9854
9855 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9856 Alan Hayward <alan.hayward@arm.com>
9857 David Sherwood <david.sherwood@arm.com>
9858
9859 * doc/invoke.texi (-msve-vector-bits=): Document new option.
9860 (sve): Document new AArch64 extension.
9861 * doc/md.texi (w): Extend the description of the AArch64
9862 constraint to include SVE vectors.
9863 (Upl, Upa): Document new AArch64 predicate constraints.
9864 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
9865 enum.
9866 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
9867 (msve-vector-bits=): New option.
9868 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
9869 SVE when these are disabled.
9870 (sve): New extension.
9871 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
9872 modes. Adjust their number of units based on aarch64_sve_vg.
9873 (MAX_BITSIZE_MODE_ANY_MODE): Define.
9874 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
9875 aarch64_addr_query_type.
9876 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
9877 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
9878 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
9879 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
9880 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
9881 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
9882 (aarch64_simd_imm_zero_p): Delete.
9883 (aarch64_check_zero_based_sve_index_immediate): Declare.
9884 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9885 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9886 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9887 (aarch64_sve_float_mul_immediate_p): Likewise.
9888 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9889 rather than an rtx.
9890 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
9891 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
9892 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
9893 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
9894 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
9895 (aarch64_regmode_natural_size): Likewise.
9896 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
9897 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
9898 left one place.
9899 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
9900 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
9901 for VG and the SVE predicate registers.
9902 (V_ALIASES): Add a "z"-prefixed alias.
9903 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
9904 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
9905 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
9906 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
9907 (REG_CLASS_NAMES): Add entries for them.
9908 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
9909 and the predicate registers.
9910 (aarch64_sve_vg): Declare.
9911 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
9912 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
9913 (REGMODE_NATURAL_SIZE): Define.
9914 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
9915 SVE macros.
9916 * config/aarch64/aarch64.c: Include cfgrtl.h.
9917 (simd_immediate_info): Add a constructor for series vectors,
9918 and an associated step field.
9919 (aarch64_sve_vg): New variable.
9920 (aarch64_dbx_register_number): Handle VG and the predicate registers.
9921 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
9922 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
9923 (VEC_ANY_DATA, VEC_STRUCT): New constants.
9924 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
9925 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
9926 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
9927 (aarch64_get_mask_mode): New functions.
9928 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
9929 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
9930 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
9931 predicate modes and predicate registers. Explicitly restrict
9932 GPRs to modes of 16 bytes or smaller. Only allow FP registers
9933 to store a vector mode if it is recognized by
9934 aarch64_classify_vector_mode.
9935 (aarch64_regmode_natural_size): New function.
9936 (aarch64_hard_regno_caller_save_mode): Return the original mode
9937 for predicates.
9938 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
9939 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
9940 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
9941 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
9942 functions.
9943 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
9944 does not overlap dest if the function is frame-related. Handle
9945 SVE constants.
9946 (aarch64_split_add_offset): New function.
9947 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
9948 them aarch64_add_offset.
9949 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
9950 and update call to aarch64_sub_sp.
9951 (aarch64_add_cfa_expression): New function.
9952 (aarch64_expand_prologue): Pass extra temporary registers to the
9953 functions above. Handle the case in which we need to emit new
9954 DW_CFA_expressions for registers that were originally saved
9955 relative to the stack pointer, but now have to be expressed
9956 relative to the frame pointer.
9957 (aarch64_output_mi_thunk): Pass extra temporary registers to the
9958 functions above.
9959 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
9960 IP0 and IP1 values for SVE frames.
9961 (aarch64_expand_vec_series): New function.
9962 (aarch64_expand_sve_widened_duplicate): Likewise.
9963 (aarch64_expand_sve_const_vector): Likewise.
9964 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
9965 Handle SVE constants. Use emit_move_insn to move a force_const_mem
9966 into the register, rather than emitting a SET directly.
9967 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
9968 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
9969 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
9970 (offset_9bit_signed_scaled_p): New functions.
9971 (aarch64_replicate_bitmask_imm): New function.
9972 (aarch64_bitmask_imm): Use it.
9973 (aarch64_cannot_force_const_mem): Reject expressions involving
9974 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
9975 (aarch64_classify_index): Handle SVE indices, by requiring
9976 a plain register index with a scale that matches the element size.
9977 (aarch64_classify_address): Handle SVE addresses. Assert that
9978 the mode of the address is VOIDmode or an integer mode.
9979 Update call to aarch64_classify_symbol.
9980 (aarch64_classify_symbolic_expression): Update call to
9981 aarch64_classify_symbol.
9982 (aarch64_const_vec_all_in_range_p): New function.
9983 (aarch64_print_vector_float_operand): Likewise.
9984 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
9985 "vN" for FP registers with SVE modes. Handle (const ...) vectors
9986 and the FP immediates 1.0 and 0.5.
9987 (aarch64_print_address_internal): Handle SVE addresses.
9988 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
9989 (aarch64_regno_regclass): Handle predicate registers.
9990 (aarch64_secondary_reload): Handle big-endian reloads of SVE
9991 data modes.
9992 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
9993 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
9994 (aarch64_convert_sve_vector_bits): New function.
9995 (aarch64_override_options): Use it to handle -msve-vector-bits=.
9996 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9997 rather than an rtx.
9998 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
9999 Handle SVE vector and predicate modes. Accept VL-based constants
10000 that need only one temporary register, and VL offsets that require
10001 no temporary registers.
10002 (aarch64_conditional_register_usage): Mark the predicate registers
10003 as fixed if SVE isn't available.
10004 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
10005 Return true for SVE vector and predicate modes.
10006 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
10007 rather than an unsigned int. Handle SVE modes.
10008 (aarch64_preferred_simd_mode): Update call accordingly. Handle
10009 SVE modes.
10010 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
10011 if SVE is enabled.
10012 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
10013 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
10014 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
10015 (aarch64_sve_float_mul_immediate_p): New functions.
10016 (aarch64_sve_valid_immediate): New function.
10017 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
10018 Explicitly reject structure modes. Check for INDEX constants.
10019 Handle PTRUE and PFALSE constants.
10020 (aarch64_check_zero_based_sve_index_immediate): New function.
10021 (aarch64_simd_imm_zero_p): Delete.
10022 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
10023 vector modes. Accept constants in the range of CNT[BHWD].
10024 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
10025 ask for an Advanced SIMD mode.
10026 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
10027 (aarch64_simd_vector_alignment): Handle SVE predicates.
10028 (aarch64_vectorize_preferred_vector_alignment): New function.
10029 (aarch64_simd_vector_alignment_reachable): Use it instead of
10030 the vector size.
10031 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
10032 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
10033 functions.
10034 (MAX_VECT_LEN): Delete.
10035 (expand_vec_perm_d): Add a vec_flags field.
10036 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
10037 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
10038 (aarch64_evpc_ext): Don't apply a big-endian lane correction
10039 for SVE modes.
10040 (aarch64_evpc_rev): Rename to...
10041 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
10042 (aarch64_evpc_rev_global): New function.
10043 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
10044 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
10045 MAX_VECT_LEN.
10046 (aarch64_evpc_sve_tbl): New function.
10047 (aarch64_expand_vec_perm_const_1): Update after rename of
10048 aarch64_evpc_rev. Handle SVE permutes too, trying
10049 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
10050 than aarch64_evpc_tbl.
10051 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
10052 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
10053 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
10054 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
10055 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
10056 (aarch64_expand_sve_vcond): New functions.
10057 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
10058 of aarch64_vector_mode_p.
10059 (aarch64_dwarf_poly_indeterminate_value): New function.
10060 (aarch64_compute_pressure_classes): Likewise.
10061 (aarch64_can_change_mode_class): Likewise.
10062 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
10063 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
10064 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
10065 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
10066 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
10067 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
10068 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
10069 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
10070 constraints.
10071 (Dn, Dl, Dr): Accept const as well as const_vector.
10072 (Dz): Likewise. Compare against CONST0_RTX.
10073 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
10074 of "vector" where appropriate.
10075 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
10076 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
10077 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
10078 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
10079 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
10080 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
10081 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
10082 (v_int_equiv): Extend to SVE modes.
10083 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
10084 mode attributes.
10085 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
10086 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
10087 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
10088 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
10089 (SVE_COND_FP_CMP): New int iterators.
10090 (perm_hilo): Handle the new unpack unspecs.
10091 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
10092 attributes.
10093 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
10094 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
10095 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
10096 (aarch64_equality_operator, aarch64_constant_vector_operand)
10097 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
10098 (aarch64_sve_nonimmediate_operand): Likewise.
10099 (aarch64_sve_general_operand): Likewise.
10100 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
10101 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
10102 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
10103 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
10104 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
10105 (aarch64_sve_float_arith_immediate): Likewise.
10106 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
10107 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
10108 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
10109 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
10110 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
10111 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
10112 (aarch64_sve_float_arith_operand): Likewise.
10113 (aarch64_sve_float_arith_with_sub_operand): Likewise.
10114 (aarch64_sve_float_mul_operand): Likewise.
10115 (aarch64_sve_vec_perm_operand): Likewise.
10116 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
10117 (aarch64_mov_operand): Accept const_poly_int and const_vector.
10118 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
10119 as well as const_vector.
10120 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
10121 in file. Use CONST0_RTX and CONSTM1_RTX.
10122 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
10123 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
10124 Use aarch64_simd_imm_zero.
10125 * config/aarch64/aarch64-sve.md: New file.
10126 * config/aarch64/aarch64.md: Include it.
10127 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
10128 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
10129 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
10130 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
10131 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
10132 (sve): New attribute.
10133 (enabled): Disable instructions with the sve attribute unless
10134 TARGET_SVE.
10135 (movqi, movhi): Pass CONST_POLY_INT operaneds through
10136 aarch64_expand_mov_immediate.
10137 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
10138 CNT[BHSD] immediates.
10139 (movti): Split CONST_POLY_INT moves into two halves.
10140 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
10141 Split additions that need a temporary here if the destination
10142 is the stack pointer.
10143 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
10144 (*add<mode>3_poly_1): New instruction.
10145 (set_clobber_cc): New expander.
10146
10147 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10148
10149 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
10150 parameter and use it instead of GET_MODE_SIZE (innermode). Use
10151 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
10152 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
10153 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
10154 Change innermode from fixed_mode_size to machine_mode.
10155 (simplify_subreg): Update call accordingly. Handle a constant-sized
10156 subreg of a variable-length CONST_VECTOR.
10157
10158 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10159 Alan Hayward <alan.hayward@arm.com>
10160 David Sherwood <david.sherwood@arm.com>
10161
10162 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
10163 (add_offset_to_base): New function, split out from...
10164 (create_mem_ref): ...here. When handling a scale other than 1,
10165 check first whether the address is valid without the offset.
10166 Add it into the base if so, leaving the index and scale as-is.
10167
10168 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10169
10170 PR c++/83778
10171 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
10172 fold_for_warn before checking if arg2 is INTEGER_CST.
10173
10174 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
10175
10176 * config/rs6000/predicates.md (load_multiple_operation): Delete.
10177 (store_multiple_operation): Delete.
10178 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
10179 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
10180 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
10181 guarded by TARGET_STRING.
10182 (rs6000_output_load_multiple): Delete.
10183 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
10184 OPTION_MASK_STRING / TARGET_STRING handling.
10185 (print_operand) <'N', 'O'>: Add comment that these are unused now.
10186 (const rs6000_opt_masks) <"string">: Change mask to 0.
10187 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
10188 (MASK_STRING): Delete.
10189 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
10190 parts. Simplify.
10191 (load_multiple): Delete.
10192 (*ldmsi8): Delete.
10193 (*ldmsi7): Delete.
10194 (*ldmsi6): Delete.
10195 (*ldmsi5): Delete.
10196 (*ldmsi4): Delete.
10197 (*ldmsi3): Delete.
10198 (store_multiple): Delete.
10199 (*stmsi8): Delete.
10200 (*stmsi7): Delete.
10201 (*stmsi6): Delete.
10202 (*stmsi5): Delete.
10203 (*stmsi4): Delete.
10204 (*stmsi3): Delete.
10205 (movmemsi_8reg): Delete.
10206 (corresponding unnamed define_insn): Delete.
10207 (movmemsi_6reg): Delete.
10208 (corresponding unnamed define_insn): Delete.
10209 (movmemsi_4reg): Delete.
10210 (corresponding unnamed define_insn): Delete.
10211 (movmemsi_2reg): Delete.
10212 (corresponding unnamed define_insn): Delete.
10213 (movmemsi_1reg): Delete.
10214 (corresponding unnamed define_insn): Delete.
10215 * config/rs6000/rs6000.opt (mno-string): New.
10216 (mstring): Replace by deprecation warning stub.
10217 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
10218
10219 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10220
10221 * regrename.c (regrename_do_replace): If replacing the same
10222 reg multiple times, try to reuse last created gen_raw_REG.
10223
10224 PR debug/81155
10225 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
10226 main to workaround a bug in GDB.
10227
10228 2018-01-12 Tom de Vries <tom@codesourcery.com>
10229
10230 PR target/83737
10231 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
10232
10233 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
10234
10235 PR rtl-optimization/80481
10236 * ira-color.c (get_cap_member): New function.
10237 (allocnos_conflict_by_live_ranges_p): Use it.
10238 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
10239 (setup_slot_coalesced_allocno_live_ranges): Ditto.
10240
10241 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
10242
10243 PR target/83628
10244 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
10245 (*saddl_se_1): Ditto.
10246 (*ssubsi_1): Ditto.
10247 (*ssubl_se_1): Ditto.
10248
10249 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10250
10251 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
10252 rather than wi::to_widest for DR_INITs.
10253 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
10254 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
10255 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
10256 INTEGER_CSTs.
10257 (vect_analyze_group_access_1): Note that here.
10258
10259 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10260
10261 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
10262 polynomial type sizes.
10263
10264 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10265
10266 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
10267 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
10268 (gimple_add_tmp_var): Likewise.
10269
10270 2018-01-12 Martin Liska <mliska@suse.cz>
10271
10272 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
10273 (gimple_alloc_sizes): Likewise.
10274 (dump_gimple_statistics): Use PRIu64 in printf format.
10275 * gimple.h: Change uint64_t to int.
10276
10277 2018-01-12 Martin Liska <mliska@suse.cz>
10278
10279 * tree-core.h: Use uint64_t instead of int.
10280 * tree.c (tree_node_counts): Likewise.
10281 (tree_node_sizes): Likewise.
10282 (dump_tree_statistics): Use PRIu64 in printf format.
10283
10284 2018-01-12 Martin Liska <mliska@suse.cz>
10285
10286 * Makefile.in: As qsort_chk is implemented in vec.c, add
10287 vec.o to linkage of gencfn-macros.
10288 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
10289 passing the info to record_node_allocation_statistics.
10290 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
10291 and pass the info.
10292 * ggc-common.c (struct ggc_usage): Add operator== and use
10293 it in operator< and compare function.
10294 * mem-stats.h (struct mem_usage): Likewise.
10295 * vec.c (struct vec_usage): Remove operator< and compare
10296 function. Can be simply inherited.
10297
10298 2018-01-12 Martin Jambor <mjambor@suse.cz>
10299
10300 PR target/81616
10301 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
10302 * tree-ssa-math-opts.c: Include domwalk.h.
10303 (convert_mult_to_fma_1): New function.
10304 (fma_transformation_info): New type.
10305 (fma_deferring_state): Likewise.
10306 (cancel_fma_deferring): New function.
10307 (result_of_phi): Likewise.
10308 (last_fma_candidate_feeds_initial_phi): Likewise.
10309 (convert_mult_to_fma): Added deferring logic, split actual
10310 transformation to convert_mult_to_fma_1.
10311 (math_opts_dom_walker): New type.
10312 (math_opts_dom_walker::after_dom_children): New method, body moved
10313 here from pass_optimize_widening_mul::execute, added deferring logic
10314 bits.
10315 (pass_optimize_widening_mul::execute): Moved most of code to
10316 math_opts_dom_walker::after_dom_children.
10317 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
10318 * config/i386/i386.c (ix86_option_override_internal): Added
10319 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
10320
10321 2018-01-12 Richard Biener <rguenther@suse.de>
10322
10323 PR debug/83157
10324 * dwarf2out.c (gen_variable_die): Do not reset old_die for
10325 inline instance vars.
10326
10327 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
10328
10329 PR target/81819
10330 * config/rx/rx.c (rx_is_restricted_memory_address):
10331 Handle SUBREG case.
10332
10333 2018-01-12 Richard Biener <rguenther@suse.de>
10334
10335 PR tree-optimization/80846
10336 * target.def (split_reduction): New target hook.
10337 * targhooks.c (default_split_reduction): New function.
10338 * targhooks.h (default_split_reduction): Declare.
10339 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
10340 target requests first reduce vectors by combining low and high
10341 parts.
10342 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
10343 (get_vectype_for_scalar_type_and_size): Export.
10344 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
10345 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
10346 * doc/tm.texi: Regenerate.
10347 * config/i386/i386.c (ix86_split_reduction): Implement
10348 TARGET_VECTORIZE_SPLIT_REDUCTION.
10349
10350 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10351
10352 PR target/83368
10353 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
10354 in PIC mode except for TARGET_VXWORKS_RTP.
10355 * config/sparc/sparc.c: Include cfgrtl.h.
10356 (TARGET_INIT_PIC_REG): Define.
10357 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
10358 (sparc_pic_register_p): New predicate.
10359 (sparc_legitimate_address_p): Use it.
10360 (sparc_legitimize_pic_address): Likewise.
10361 (sparc_delegitimize_address): Likewise.
10362 (sparc_mode_dependent_address_p): Likewise.
10363 (gen_load_pcrel_sym): Remove 4th parameter.
10364 (load_got_register): Adjust call to above. Remove obsolete stuff.
10365 (sparc_expand_prologue): Do not call load_got_register here.
10366 (sparc_flat_expand_prologue): Likewise.
10367 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
10368 (sparc_use_pseudo_pic_reg): New function.
10369 (sparc_init_pic_reg): Likewise.
10370 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10371 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
10372
10373 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
10374
10375 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
10376 Add item for branch_cost.
10377
10378 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10379
10380 PR rtl-optimization/83565
10381 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
10382 not extend the result to a larger mode for rotate operations.
10383 (num_sign_bit_copies1): Likewise.
10384
10385 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10386
10387 PR target/40411
10388 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
10389 -symbolic.
10390 Use values-Xc.o for -pedantic.
10391 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
10392
10393 2018-01-12 Martin Liska <mliska@suse.cz>
10394
10395 PR ipa/83054
10396 * ipa-devirt.c (final_warning_record::grow_type_warnings):
10397 New function.
10398 (possible_polymorphic_call_targets): Use it.
10399 (ipa_devirt): Likewise.
10400
10401 2018-01-12 Martin Liska <mliska@suse.cz>
10402
10403 * profile-count.h (enum profile_quality): Use 0 as invalid
10404 enum value of profile_quality.
10405
10406 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
10407
10408 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
10409 -mext-string options.
10410
10411 2018-01-12 Richard Biener <rguenther@suse.de>
10412
10413 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
10414 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
10415 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
10416 Likewise.
10417 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
10418
10419 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10420
10421 * configure.ac (--with-long-double-format): Add support for the
10422 configuration option to change the default long double format on
10423 PowerPC systems.
10424 * config.gcc (powerpc*-linux*-*): Likewise.
10425 * configure: Regenerate.
10426 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
10427 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
10428 used without modification.
10429
10430 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10431
10432 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
10433 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
10434 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
10435 MISC_BUILTIN_SPEC_BARRIER.
10436 (rs6000_init_builtins): Likewise.
10437 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
10438 enum value.
10439 (speculation_barrier): New define_insn.
10440 * doc/extend.texi: Document __builtin_speculation_barrier.
10441
10442 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10443
10444 PR target/83203
10445 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
10446 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
10447 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
10448 iterators.
10449 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
10450 integral modes instead of "ss" and "sd".
10451 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
10452 vectors with 32-bit and 64-bit elements.
10453 (vecdupssescalarmodesuffix): New mode attribute.
10454 (vec_dup<mode>): Use it.
10455
10456 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
10457
10458 PR target/83330
10459 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
10460 frame if argument is passed on stack.
10461
10462 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10463
10464 PR target/82682
10465 * ree.c (combine_reaching_defs): Optimize also
10466 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
10467 reg2=any_extend(exp); reg1=reg2;, formatting fix.
10468
10469 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10470
10471 PR middle-end/83189
10472 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
10473
10474 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10475
10476 PR middle-end/83718
10477 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
10478 after they are computed.
10479
10480 2018-01-11 Bin Cheng <bin.cheng@arm.com>
10481
10482 PR tree-optimization/83695
10483 * gimple-loop-linterchange.cc
10484 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
10485 reset cached scev information after interchange.
10486 (pass_linterchange::execute): Remove call to scev_reset_htab.
10487
10488 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10489
10490 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
10491 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
10492 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
10493 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
10494 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
10495 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
10496 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
10497 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
10498 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
10499 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
10500 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
10501 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
10502 (V_lane_reg): Likewise.
10503 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
10504 New define_expand.
10505 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
10506 (vfmal_lane_low<mode>_intrinsic,
10507 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
10508 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
10509 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
10510 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
10511 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
10512 vfmsl_lane_high<mode>_intrinsic): New define_insns.
10513
10514 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10515
10516 * config/arm/arm-cpus.in (fp16fml): New feature.
10517 (ALL_SIMD): Add fp16fml.
10518 (armv8.2-a): Add fp16fml as an option.
10519 (armv8.3-a): Likewise.
10520 (armv8.4-a): Add fp16fml as part of fp16.
10521 * config/arm/arm.h (TARGET_FP16FML): Define.
10522 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
10523 when appropriate.
10524 * config/arm/arm-modes.def (V2HF): Define.
10525 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
10526 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
10527 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
10528 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
10529 vfmsl_low, vfmsl_high): New set of builtins.
10530 * config/arm/iterators.md (PLUSMINUS): New code iterator.
10531 (vfml_op): New code attribute.
10532 (VFMLHALVES): New int iterator.
10533 (VFML, VFMLSEL): New mode attributes.
10534 (V_reg): Define mapping for V2HF.
10535 (V_hi, V_lo): New mode attributes.
10536 (VF_constraint): Likewise.
10537 (vfml_half, vfml_half_selector): New int attributes.
10538 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
10539 define_expand.
10540 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
10541 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
10542 New define_insn.
10543 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
10544 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
10545 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
10546 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
10547 documentation.
10548 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
10549 Document new effective target and option set.
10550
10551 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10552
10553 * config/arm/arm-cpus.in (armv8_4): New feature.
10554 (ARMv8_4a): New fgroup.
10555 (armv8.4-a): New arch.
10556 * config/arm/arm-tables.opt: Regenerate.
10557 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
10558 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
10559 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
10560 Add matching rules for -march=armv8.4-a and extensions.
10561 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
10562
10563 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
10564
10565 PR target/81821
10566 * config/rx/rx.md (BW): New mode attribute.
10567 (sync_lock_test_and_setsi): Add mode suffix to insn output.
10568
10569 2018-01-11 Richard Biener <rguenther@suse.de>
10570
10571 PR tree-optimization/83435
10572 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
10573 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
10574 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
10575
10576 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10577 Alan Hayward <alan.hayward@arm.com>
10578 David Sherwood <david.sherwood@arm.com>
10579
10580 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
10581 field.
10582 (aarch64_classify_address): Initialize it. Track polynomial offsets.
10583 (aarch64_print_address_internal): Use it to check for a zero offset.
10584
10585 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10586 Alan Hayward <alan.hayward@arm.com>
10587 David Sherwood <david.sherwood@arm.com>
10588
10589 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
10590 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
10591 Return a poly_int64 rather than a HOST_WIDE_INT.
10592 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
10593 rather than a HOST_WIDE_INT.
10594 * config/aarch64/aarch64.h (aarch64_frame): Protect with
10595 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
10596 hard_fp_offset, frame_size, initial_adjust, callee_offset and
10597 final_offset from HOST_WIDE_INT to poly_int64.
10598 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
10599 to_constant when getting the number of units in an Advanced SIMD
10600 mode.
10601 (aarch64_builtin_vectorized_function): Check for a constant number
10602 of units.
10603 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
10604 GET_MODE_SIZE.
10605 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
10606 attribute instead of GET_MODE_NUNITS.
10607 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
10608 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
10609 GET_MODE_SIZE for fixed-size registers.
10610 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
10611 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
10612 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
10613 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
10614 (aarch64_print_operand, aarch64_print_address_internal)
10615 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
10616 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
10617 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
10618 Handle polynomial GET_MODE_SIZE.
10619 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
10620 wider than SImode without modification.
10621 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
10622 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
10623 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
10624 passing and returning SVE modes.
10625 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
10626 rather than GEN_INT.
10627 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
10628 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
10629 (aarch64_allocate_and_probe_stack_space): Likewise.
10630 (aarch64_layout_frame): Cope with polynomial offsets.
10631 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
10632 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
10633 polynomial offsets.
10634 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
10635 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
10636 poly_int64 rather than a HOST_WIDE_INT.
10637 (aarch64_get_separate_components, aarch64_process_components)
10638 (aarch64_expand_prologue, aarch64_expand_epilogue)
10639 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
10640 (aarch64_anchor_offset): New function, split out from...
10641 (aarch64_legitimize_address): ...here.
10642 (aarch64_builtin_vectorization_cost): Handle polynomial
10643 TYPE_VECTOR_SUBPARTS.
10644 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
10645 GET_MODE_NUNITS.
10646 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
10647 number of elements from the PARALLEL rather than the mode.
10648 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
10649 rather than GET_MODE_BITSIZE.
10650 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
10651 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
10652 (aarch64_expand_vec_perm_const_1): Handle polynomial
10653 d->perm.length () and d->perm elements.
10654 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
10655 Apply to_constant to d->perm elements.
10656 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
10657 polynomial CONST_VECTOR_NUNITS.
10658 (aarch64_move_pointer): Take amount as a poly_int64 rather
10659 than an int.
10660 (aarch64_progress_pointer): Avoid temporary variable.
10661 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
10662 the mode attribute instead of GET_MODE.
10663
10664 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10665 Alan Hayward <alan.hayward@arm.com>
10666 David Sherwood <david.sherwood@arm.com>
10667
10668 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
10669 x exists before using it.
10670 (aarch64_add_constant_internal): Rename to...
10671 (aarch64_add_offset_1): ...this. Replace regnum with separate
10672 src and dest rtxes. Handle the case in which they're different,
10673 including when the offset is zero. Replace scratchreg with an rtx.
10674 Use 2 additions if there is no spare register into which we can
10675 move a 16-bit constant.
10676 (aarch64_add_constant): Delete.
10677 (aarch64_add_offset): Replace reg with separate src and dest
10678 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
10679 Use aarch64_add_offset_1.
10680 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
10681 an rtx rather than an int. Take the delta as a poly_int64
10682 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
10683 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
10684 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
10685 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
10686 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
10687 and aarch64_add_sp.
10688 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
10689 aarch64_add_constant.
10690
10691 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10692
10693 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
10694 Use scalar_float_mode.
10695
10696 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10697
10698 * config/aarch64/aarch64-simd.md
10699 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
10700 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
10701 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
10702 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
10703 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
10704 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
10705 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
10706 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
10707 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
10708 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
10709
10710 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10711
10712 PR target/83514
10713 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
10714 targ_options->x_arm_arch_string is non NULL.
10715
10716 2018-01-11 Tamar Christina <tamar.christina@arm.com>
10717
10718 * config/aarch64/aarch64.h
10719 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
10720
10721 2018-01-11 Sudakshina Das <sudi.das@arm.com>
10722
10723 PR target/82096
10724 * expmed.c (emit_store_flag_force): Swap if const op0
10725 and change VOIDmode to mode of op0.
10726
10727 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10728
10729 PR rtl-optimization/83761
10730 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
10731 than bytes to mode_for_size.
10732
10733 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10734
10735 PR middle-end/83189
10736 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
10737 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
10738 profile.
10739
10740 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10741
10742 PR middle-end/83575
10743 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
10744 when in layout mode.
10745 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
10746 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
10747 partition fixup.
10748
10749 2018-01-10 Michael Collison <michael.collison@arm.com>
10750
10751 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
10752 * config/aarch64/aarch64-option-extension.def: Add
10753 AARCH64_OPT_EXTENSION of 'fp16fml'.
10754 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10755 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
10756 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
10757 * config/aarch64/constraints.md (Ui7): New constraint.
10758 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
10759 (VFMLA_SEL_W): Ditto.
10760 (f16quad): Ditto.
10761 (f16mac1): Ditto.
10762 (VFMLA16_LOW): New int iterator.
10763 (VFMLA16_HIGH): Ditto.
10764 (UNSPEC_FMLAL): New unspec.
10765 (UNSPEC_FMLSL): Ditto.
10766 (UNSPEC_FMLAL2): Ditto.
10767 (UNSPEC_FMLSL2): Ditto.
10768 (f16mac): New code attribute.
10769 * config/aarch64/aarch64-simd-builtins.def
10770 (aarch64_fmlal_lowv2sf): Ditto.
10771 (aarch64_fmlsl_lowv2sf): Ditto.
10772 (aarch64_fmlalq_lowv4sf): Ditto.
10773 (aarch64_fmlslq_lowv4sf): Ditto.
10774 (aarch64_fmlal_highv2sf): Ditto.
10775 (aarch64_fmlsl_highv2sf): Ditto.
10776 (aarch64_fmlalq_highv4sf): Ditto.
10777 (aarch64_fmlslq_highv4sf): Ditto.
10778 (aarch64_fmlal_lane_lowv2sf): Ditto.
10779 (aarch64_fmlsl_lane_lowv2sf): Ditto.
10780 (aarch64_fmlal_laneq_lowv2sf): Ditto.
10781 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
10782 (aarch64_fmlalq_lane_lowv4sf): Ditto.
10783 (aarch64_fmlsl_lane_lowv4sf): Ditto.
10784 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
10785 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
10786 (aarch64_fmlal_lane_highv2sf): Ditto.
10787 (aarch64_fmlsl_lane_highv2sf): Ditto.
10788 (aarch64_fmlal_laneq_highv2sf): Ditto.
10789 (aarch64_fmlsl_laneq_highv2sf): Ditto.
10790 (aarch64_fmlalq_lane_highv4sf): Ditto.
10791 (aarch64_fmlsl_lane_highv4sf): Ditto.
10792 (aarch64_fmlalq_laneq_highv4sf): Ditto.
10793 (aarch64_fmlsl_laneq_highv4sf): Ditto.
10794 * config/aarch64/aarch64-simd.md:
10795 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
10796 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
10797 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
10798 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
10799 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
10800 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
10801 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
10802 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
10803 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
10804 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
10805 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
10806 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
10807 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
10808 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
10809 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
10810 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
10811 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
10812 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
10813 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
10814 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
10815 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
10816 (vfmlsl_low_u32): Ditto.
10817 (vfmlalq_low_u32): Ditto.
10818 (vfmlslq_low_u32): Ditto.
10819 (vfmlal_high_u32): Ditto.
10820 (vfmlsl_high_u32): Ditto.
10821 (vfmlalq_high_u32): Ditto.
10822 (vfmlslq_high_u32): Ditto.
10823 (vfmlal_lane_low_u32): Ditto.
10824 (vfmlsl_lane_low_u32): Ditto.
10825 (vfmlal_laneq_low_u32): Ditto.
10826 (vfmlsl_laneq_low_u32): Ditto.
10827 (vfmlalq_lane_low_u32): Ditto.
10828 (vfmlslq_lane_low_u32): Ditto.
10829 (vfmlalq_laneq_low_u32): Ditto.
10830 (vfmlslq_laneq_low_u32): Ditto.
10831 (vfmlal_lane_high_u32): Ditto.
10832 (vfmlsl_lane_high_u32): Ditto.
10833 (vfmlal_laneq_high_u32): Ditto.
10834 (vfmlsl_laneq_high_u32): Ditto.
10835 (vfmlalq_lane_high_u32): Ditto.
10836 (vfmlslq_lane_high_u32): Ditto.
10837 (vfmlalq_laneq_high_u32): Ditto.
10838 (vfmlslq_laneq_high_u32): Ditto.
10839 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
10840 (AARCH64_FL_FOR_ARCH8_4): New.
10841 (AARCH64_ISA_F16FML): New ISA flag.
10842 (TARGET_F16FML): New feature flag for fp16fml.
10843 (doc/invoke.texi): Document new fp16fml option.
10844
10845 2018-01-10 Michael Collison <michael.collison@arm.com>
10846
10847 * config/aarch64/aarch64-builtins.c:
10848 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
10849 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10850 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
10851 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
10852 (AARCH64_ISA_SHA3): New ISA flag.
10853 (TARGET_SHA3): New feature flag for sha3.
10854 * config/aarch64/iterators.md (sha512_op): New int attribute.
10855 (CRYPTO_SHA512): New int iterator.
10856 (UNSPEC_SHA512H): New unspec.
10857 (UNSPEC_SHA512H2): Ditto.
10858 (UNSPEC_SHA512SU0): Ditto.
10859 (UNSPEC_SHA512SU1): Ditto.
10860 * config/aarch64/aarch64-simd-builtins.def
10861 (aarch64_crypto_sha512hqv2di): New builtin.
10862 (aarch64_crypto_sha512h2qv2di): Ditto.
10863 (aarch64_crypto_sha512su0qv2di): Ditto.
10864 (aarch64_crypto_sha512su1qv2di): Ditto.
10865 (aarch64_eor3qv8hi): Ditto.
10866 (aarch64_rax1qv2di): Ditto.
10867 (aarch64_xarqv2di): Ditto.
10868 (aarch64_bcaxqv8hi): Ditto.
10869 * config/aarch64/aarch64-simd.md:
10870 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
10871 (aarch64_crypto_sha512su0qv2di): Ditto.
10872 (aarch64_crypto_sha512su1qv2di): Ditto.
10873 (aarch64_eor3qv8hi): Ditto.
10874 (aarch64_rax1qv2di): Ditto.
10875 (aarch64_xarqv2di): Ditto.
10876 (aarch64_bcaxqv8hi): Ditto.
10877 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
10878 (vsha512h2q_u64): Ditto.
10879 (vsha512su0q_u64): Ditto.
10880 (vsha512su1q_u64): Ditto.
10881 (veor3q_u16): Ditto.
10882 (vrax1q_u64): Ditto.
10883 (vxarq_u64): Ditto.
10884 (vbcaxq_u16): Ditto.
10885 * config/arm/types.md (crypto_sha512): New type attribute.
10886 (crypto_sha3): Ditto.
10887 (doc/invoke.texi): Document new sha3 option.
10888
10889 2018-01-10 Michael Collison <michael.collison@arm.com>
10890
10891 * config/aarch64/aarch64-builtins.c:
10892 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
10893 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10894 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
10895 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
10896 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
10897 (AARCH64_ISA_SM4): New ISA flag.
10898 (TARGET_SM4): New feature flag for sm4.
10899 * config/aarch64/aarch64-simd-builtins.def
10900 (aarch64_sm3ss1qv4si): Ditto.
10901 (aarch64_sm3tt1aq4si): Ditto.
10902 (aarch64_sm3tt1bq4si): Ditto.
10903 (aarch64_sm3tt2aq4si): Ditto.
10904 (aarch64_sm3tt2bq4si): Ditto.
10905 (aarch64_sm3partw1qv4si): Ditto.
10906 (aarch64_sm3partw2qv4si): Ditto.
10907 (aarch64_sm4eqv4si): Ditto.
10908 (aarch64_sm4ekeyqv4si): Ditto.
10909 * config/aarch64/aarch64-simd.md:
10910 (aarch64_sm3ss1qv4si): Ditto.
10911 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
10912 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
10913 (aarch64_sm4eqv4si): Ditto.
10914 (aarch64_sm4ekeyqv4si): Ditto.
10915 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
10916 (sm3part_op): Ditto.
10917 (CRYPTO_SM3TT): Ditto.
10918 (CRYPTO_SM3PART): Ditto.
10919 (UNSPEC_SM3SS1): New unspec.
10920 (UNSPEC_SM3TT1A): Ditto.
10921 (UNSPEC_SM3TT1B): Ditto.
10922 (UNSPEC_SM3TT2A): Ditto.
10923 (UNSPEC_SM3TT2B): Ditto.
10924 (UNSPEC_SM3PARTW1): Ditto.
10925 (UNSPEC_SM3PARTW2): Ditto.
10926 (UNSPEC_SM4E): Ditto.
10927 (UNSPEC_SM4EKEY): Ditto.
10928 * config/aarch64/constraints.md (Ui2): New constraint.
10929 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
10930 * config/arm/types.md (crypto_sm3): New type attribute.
10931 (crypto_sm4): Ditto.
10932 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
10933 (vsm3tt1aq_u32): Ditto.
10934 (vsm3tt1bq_u32): Ditto.
10935 (vsm3tt2aq_u32): Ditto.
10936 (vsm3tt2bq_u32): Ditto.
10937 (vsm3partw1q_u32): Ditto.
10938 (vsm3partw2q_u32): Ditto.
10939 (vsm4eq_u32): Ditto.
10940 (vsm4ekeyq_u32): Ditto.
10941 (doc/invoke.texi): Document new sm4 option.
10942
10943 2018-01-10 Michael Collison <michael.collison@arm.com>
10944
10945 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
10946 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
10947 (AARCH64_FL_FOR_ARCH8_4): New.
10948 (AARCH64_FL_V8_4): New flag.
10949 (doc/invoke.texi): Document new armv8.4-a option.
10950
10951 2018-01-10 Michael Collison <michael.collison@arm.com>
10952
10953 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10954 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
10955 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
10956 * config/aarch64/aarch64-option-extension.def: Add
10957 AARCH64_OPT_EXTENSION of 'sha2'.
10958 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
10959 (crypto): Disable sha2 and aes if crypto disabled.
10960 (crypto): Enable aes and sha2 if enabled.
10961 (simd): Disable sha2 and aes if simd disabled.
10962 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
10963 New flags.
10964 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
10965 (TARGET_SHA2): New feature flag for sha2.
10966 (TARGET_AES): New feature flag for aes.
10967 * config/aarch64/aarch64-simd.md:
10968 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
10969 conditional on TARGET_AES.
10970 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
10971 (aarch64_crypto_sha1hsi): Make pattern conditional
10972 on TARGET_SHA2.
10973 (aarch64_crypto_sha1hv4si): Ditto.
10974 (aarch64_be_crypto_sha1hv4si): Ditto.
10975 (aarch64_crypto_sha1su1v4si): Ditto.
10976 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
10977 (aarch64_crypto_sha1su0v4si): Ditto.
10978 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
10979 (aarch64_crypto_sha256su0v4si): Ditto.
10980 (aarch64_crypto_sha256su1v4si): Ditto.
10981 (doc/invoke.texi): Document new aes and sha2 options.
10982
10983 2018-01-10 Martin Sebor <msebor@redhat.com>
10984
10985 PR tree-optimization/83781
10986 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
10987 as string arrays.
10988
10989 2018-01-11 Martin Sebor <msebor@gmail.com>
10990 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10991
10992 PR tree-optimization/83501
10993 PR tree-optimization/81703
10994
10995 * tree-ssa-strlen.c (get_string_cst): Rename...
10996 (get_string_len): ...to this. Handle global constants.
10997 (handle_char_store): Adjust.
10998
10999 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
11000 Jim Wilson <jimw@sifive.com>
11001
11002 * config/riscv/riscv-protos.h (riscv_output_return): New.
11003 * config/riscv/riscv.c (struct machine_function): New naked_p field.
11004 (riscv_attribute_table, riscv_output_return),
11005 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
11006 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
11007 (riscv_compute_frame_info): Only compute frame->mask if not a naked
11008 function.
11009 (riscv_expand_prologue): Add early return for naked function.
11010 (riscv_expand_epilogue): Likewise.
11011 (riscv_function_ok_for_sibcall): Return false for naked function.
11012 (riscv_set_current_function): New.
11013 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
11014 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
11015 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
11016 * doc/extend.texi (RISC-V Function Attributes): New.
11017
11018 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
11019
11020 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
11021 check for 128-bit long double before checking TCmode.
11022 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
11023 128-bit long doubles before checking TFmode or TCmode.
11024 (FLOAT128_IBM_P): Likewise.
11025
11026 2018-01-10 Martin Sebor <msebor@redhat.com>
11027
11028 PR tree-optimization/83671
11029 * builtins.c (c_strlen): Unconditionally return zero for the empty
11030 string.
11031 Use -Warray-bounds for warnings.
11032 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
11033 for non-constant array indices with COMPONENT_REF, arrays of
11034 arrays, and pointers to arrays.
11035 (gimple_fold_builtin_strlen): Determine and set length range for
11036 non-constant character arrays.
11037
11038 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
11039
11040 PR middle-end/81897
11041 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
11042 empty blocks.
11043
11044 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
11045
11046 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
11047
11048 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11049
11050 PR target/83399
11051 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
11052 VECTOR_MEM_ALTIVEC_OR_VSX_P.
11053 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
11054 indexed_or_indirect_operand predicate.
11055 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
11056 (*vsx_le_perm_load_v8hi): Likewise.
11057 (*vsx_le_perm_load_v16qi): Likewise.
11058 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
11059 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
11060 (*vsx_le_perm_store_v8hi): Likewise.
11061 (*vsx_le_perm_store_v16qi): Likewise.
11062 (eight unnamed splitters): Likewise.
11063
11064 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11065
11066 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
11067 * config/rs6000/emmintrin.h: Likewise.
11068 * config/rs6000/mmintrin.h: Likewise.
11069 * config/rs6000/xmmintrin.h: Likewise.
11070
11071 2018-01-10 David Malcolm <dmalcolm@redhat.com>
11072
11073 PR c++/43486
11074 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
11075 "public_flag".
11076 * tree.c (tree_nop_conversion): Return true for location wrapper
11077 nodes.
11078 (maybe_wrap_with_location): New function.
11079 (selftest::check_strip_nops): New function.
11080 (selftest::test_location_wrappers): New function.
11081 (selftest::tree_c_tests): Call it.
11082 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
11083 (maybe_wrap_with_location): New decl.
11084 (EXPR_LOCATION_WRAPPER_P): New macro.
11085 (location_wrapper_p): New inline function.
11086 (tree_strip_any_location_wrapper): New inline function.
11087
11088 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
11089
11090 PR target/83735
11091 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
11092 stack_realign_offset for the largest alignment of stack slot
11093 actually used.
11094 (ix86_find_max_used_stack_alignment): New function.
11095 (ix86_finalize_stack_frame_flags): Use it. Set
11096 max_used_stack_alignment if we don't realign stack.
11097 * config/i386/i386.h (machine_function): Add
11098 max_used_stack_alignment.
11099
11100 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
11101
11102 * config/arm/arm.opt (-mbranch-cost): New option.
11103 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
11104 account.
11105
11106 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
11107
11108 PR target/83629
11109 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
11110 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
11111
11112 2018-01-10 Richard Biener <rguenther@suse.de>
11113
11114 PR debug/83765
11115 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
11116 early out so it also covers the case where we have a non-NULL
11117 origin.
11118
11119 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11120
11121 PR tree-optimization/83753
11122 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
11123 for non-strided grouped accesses if the number of elements is 1.
11124
11125 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11126
11127 PR target/81616
11128 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
11129 * i386.h (TARGET_USE_GATHER): Define.
11130 * x86-tune.def (X86_TUNE_USE_GATHER): New.
11131
11132 2018-01-10 Martin Liska <mliska@suse.cz>
11133
11134 PR bootstrap/82831
11135 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
11136 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
11137 partitioning.
11138 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
11139 CLEANUP_NO_PARTITIONING is not set.
11140
11141 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11142
11143 * doc/rtl.texi: Remove documentation of (const ...) wrappers
11144 for vectors, as a partial revert of r254296.
11145 * rtl.h (const_vec_p): Delete.
11146 (const_vec_duplicate_p): Don't test for vector CONSTs.
11147 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
11148 * expmed.c (make_tree): Likewise.
11149
11150 Revert:
11151 * common.md (E, F): Use CONSTANT_P instead of checking for
11152 CONST_VECTOR.
11153 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
11154 checking for CONST_VECTOR.
11155
11156 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11157
11158 PR middle-end/83575
11159 * predict.c (force_edge_cold): Handle in more sane way edges
11160 with no prediction.
11161
11162 2018-01-09 Carl Love <cel@us.ibm.com>
11163
11164 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
11165 V4SI, V4SF types.
11166 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
11167 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
11168 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
11169 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
11170 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
11171 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
11172 * config/rs6000/rs6000-protos.h: Add extern defition for
11173 rs6000_generate_float2_double_code.
11174 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
11175 function.
11176 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
11177 (float2_v2df): Add define_expand.
11178
11179 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
11180
11181 PR target/83628
11182 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
11183 op_mode in the force_to_mode call.
11184
11185 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11186
11187 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
11188 instead of checking each element individually.
11189 (aarch64_evpc_uzp): Likewise.
11190 (aarch64_evpc_zip): Likewise.
11191 (aarch64_evpc_ext): Likewise.
11192 (aarch64_evpc_rev): Likewise.
11193 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
11194 instead of checking each element individually. Return true without
11195 generating rtl if
11196 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
11197 whether all selected elements come from the same input, instead of
11198 checking each element individually. Remove calls to gen_rtx_REG,
11199 start_sequence and end_sequence and instead assert that no rtl is
11200 generated.
11201
11202 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11203
11204 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
11205 order of HIGH and CONST checks.
11206
11207 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11208
11209 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
11210 if the destination isn't an SSA_NAME.
11211
11212 2018-01-09 Richard Biener <rguenther@suse.de>
11213
11214 PR tree-optimization/83668
11215 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
11216 move prologue...
11217 (canonicalize_loop_form): ... here, renamed from ...
11218 (canonicalize_loop_closed_ssa_form): ... this and amended to
11219 swap successor edges for loop exit blocks to make us use
11220 the RPO order we need for initial schedule generation.
11221
11222 2018-01-09 Joseph Myers <joseph@codesourcery.com>
11223
11224 PR tree-optimization/64811
11225 * match.pd: When optimizing comparisons with Inf, avoid
11226 introducing or losing exceptions from comparisons with NaN.
11227
11228 2018-01-09 Martin Liska <mliska@suse.cz>
11229
11230 PR sanitizer/82517
11231 * asan.c (shadow_mem_size): Add gcc_assert.
11232
11233 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
11234
11235 Don't save registers in main().
11236
11237 PR target/83738
11238 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
11239 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
11240 * config/avr/avr.c (avr_set_current_function): Don't error if
11241 naked, OS_task or OS_main are specified at the same time.
11242 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
11243 OS_main.
11244 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
11245 attribute.
11246 * common/config/avr/avr-common.c (avr_option_optimization_table):
11247 Switch on -mmain-is-OS_task for optimizing compilations.
11248
11249 2018-01-09 Richard Biener <rguenther@suse.de>
11250
11251 PR tree-optimization/83572
11252 * graphite.c: Include cfganal.h.
11253 (graphite_transform_loops): Connect infinite loops to exit
11254 and remove fake edges at the end.
11255
11256 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11257
11258 * ipa-inline.c (edge_badness): Revert accidental checkin.
11259
11260 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11261
11262 PR ipa/80763
11263 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
11264 symbols; not inline clones.
11265
11266 2018-01-09 Jakub Jelinek <jakub@redhat.com>
11267
11268 PR target/83507
11269 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
11270 hard registers. Formatting fixes.
11271
11272 PR preprocessor/83722
11273 * gcc.c (try_generate_repro): Pass
11274 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
11275 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
11276 do_report_bug.
11277
11278 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
11279 Kito Cheng <kito.cheng@gmail.com>
11280
11281 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
11282 (riscv_leaf_function_p): Delete.
11283 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
11284
11285 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11286
11287 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
11288 function.
11289 (do_ifelse): New function.
11290 (do_isel): New function.
11291 (do_sub3): New function.
11292 (do_add3): New function.
11293 (do_load_mask_compare): New function.
11294 (do_overlap_load_compare): New function.
11295 (expand_compare_loop): New function.
11296 (expand_block_compare): Call expand_compare_loop() when appropriate.
11297 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
11298 option description.
11299 (-mblock-compare-inline-loop-limit): New option.
11300
11301 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11302
11303 PR target/83677
11304 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
11305 Reverse order of second and third operands in first alternative.
11306 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
11307 of first and second elements in UNSPEC_VPERMR vector.
11308 (altivec_expand_vec_perm_le): Likewise.
11309
11310 2018-01-08 Jeff Law <law@redhat.com>
11311
11312 PR rtl-optimizatin/81308
11313 * tree-switch-conversion.c (cfg_altered): New file scoped static.
11314 (process_switch): If group_case_labels makes a change, then set
11315 cfg_altered.
11316 (pass_convert_switch::execute): If a switch is converted, then
11317 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
11318
11319 PR rtl-optimization/81308
11320 * recog.c (split_all_insns): Conditionally cleanup the CFG after
11321 splitting insns.
11322
11323 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
11324
11325 PR target/83663 - Revert r255946
11326 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
11327 generation for cases where splatting a value is not useful.
11328 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
11329 across a vec_duplicate and a paradoxical subreg forming a vector
11330 mode to a vec_concat.
11331
11332 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11333
11334 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
11335 -march=armv8.3-a variants.
11336 * config/arm/t-multilib: Likewise.
11337 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
11338
11339 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11340
11341 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
11342 to generate rtl.
11343 (cceq_ior_compare_complement): Give it a name so I can use it, and
11344 change boolean_or_operator predicate to boolean_operator so it can
11345 be used to generate a crand.
11346 (eqne): New code iterator.
11347 (bd/bd_neg): New code_attrs.
11348 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
11349 a single define_insn.
11350 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
11351 decrement (bdnzt/bdnzf/bdzt/bdzf).
11352 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
11353 with the new names of the branch decrement patterns, and added the
11354 names of the branch decrement conditional patterns.
11355
11356 2018-01-08 Richard Biener <rguenther@suse.de>
11357
11358 PR tree-optimization/83563
11359 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
11360 cache.
11361
11362 2018-01-08 Richard Biener <rguenther@suse.de>
11363
11364 PR middle-end/83713
11365 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
11366
11367 2018-01-08 Richard Biener <rguenther@suse.de>
11368
11369 PR tree-optimization/83685
11370 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
11371 references to abnormals.
11372
11373 2018-01-08 Richard Biener <rguenther@suse.de>
11374
11375 PR lto/83719
11376 * dwarf2out.c (output_indirect_strings): Handle empty
11377 skeleton_debug_str_hash.
11378 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
11379
11380 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11381
11382 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
11383 (emit_store_direct): Likewise.
11384 (arc_trampoline_adjust_address): Likewise.
11385 (arc_asm_trampoline_template): New function.
11386 (arc_initialize_trampoline): Use asm_trampoline_template.
11387 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
11388 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
11389 * config/arc/arc.md (flush_icache): Delete pattern.
11390
11391 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11392
11393 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
11394 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
11395 munaligned-access.
11396
11397 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11398
11399 PR target/83681
11400 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
11401 by not USED_FOR_TARGET.
11402 (make_pass_resolve_sw_modes): Likewise.
11403
11404 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11405
11406 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
11407 USED_FOR_TARGET.
11408
11409 2018-01-08 Richard Biener <rguenther@suse.de>
11410
11411 PR middle-end/83580
11412 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
11413
11414 2018-01-08 Richard Biener <rguenther@suse.de>
11415
11416 PR middle-end/83517
11417 * match.pd ((t * 2) / 2) -> t): Add missing :c.
11418
11419 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
11420
11421 PR middle-end/81897
11422 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
11423 basic blocks with a small number of successors.
11424 (convert_control_dep_chain_into_preds): Improve handling of
11425 forwarder blocks.
11426 (dump_predicates): Split apart into...
11427 (dump_pred_chain): ...here...
11428 (dump_pred_info): ...and here.
11429 (can_one_predicate_be_invalidated_p): Add debugging printfs.
11430 (can_chain_union_be_invalidated_p): Improve check for invalidation
11431 of paths.
11432 (uninit_uses_cannot_happen): Avoid unnecessary if
11433 convert_control_dep_chain_into_preds yielded nothing.
11434
11435 2018-01-06 Martin Sebor <msebor@redhat.com>
11436
11437 PR tree-optimization/83640
11438 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
11439 subtracting negative offset from size.
11440 (builtin_access::overlap): Adjust offset bounds of the access to fall
11441 within the size of the object if possible.
11442
11443 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
11444
11445 PR rtl-optimization/83699
11446 * expmed.c (extract_bit_field_1): Restrict the vector usage of
11447 extract_bit_field_as_subreg to cases in which the extracted
11448 value is also a vector.
11449
11450 * lra-constraints.c (process_alt_operands): Test for the equivalence
11451 substitutions when detecting a possible reload cycle.
11452
11453 2018-01-06 Jakub Jelinek <jakub@redhat.com>
11454
11455 PR debug/83480
11456 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
11457 by default if flag_selective_schedling{,2}. Formatting fixes.
11458
11459 PR rtl-optimization/83682
11460 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
11461 if it has non-VECTOR_MODE element mode.
11462 (vec_duplicate_p): Likewise.
11463
11464 PR middle-end/83694
11465 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
11466 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
11467
11468 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11469
11470 PR target/83604
11471 * config/i386/i386-builtin.def
11472 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
11473 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
11474 Require also OPTION_MASK_ISA_AVX512F in addition to
11475 OPTION_MASK_ISA_GFNI.
11476 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
11477 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
11478 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
11479 to OPTION_MASK_ISA_GFNI.
11480 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
11481 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
11482 OPTION_MASK_ISA_AVX512BW.
11483 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
11484 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
11485 addition to OPTION_MASK_ISA_GFNI.
11486 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
11487 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
11488 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
11489 to OPTION_MASK_ISA_GFNI.
11490 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
11491 a requirement for all ISAs rather than any of them with a few
11492 exceptions.
11493 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
11494 processing.
11495 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
11496 bitmasks to be enabled with 3 exceptions, instead of requiring any
11497 enabled ISA with lots of exceptions.
11498 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
11499 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
11500 Change avx512bw in isa attribute to avx512f.
11501 * config/i386/sgxintrin.h: Add license boilerplate.
11502 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
11503 to __AVX512F__ and __AVX512VL to __AVX512VL__.
11504 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
11505 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
11506 defined.
11507 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
11508 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
11509 temporarily sse2 rather than sse if not enabled already.
11510
11511 PR target/83604
11512 * config/i386/sse.md (VI248_VLBW): Rename to ...
11513 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
11514 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
11515 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
11516 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
11517 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
11518 mode iterator instead of VI248_VLBW.
11519
11520 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
11521
11522 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
11523 (record_modified): Skip clobbers; add debug output.
11524 (param_change_prob): Use sreal frequencies.
11525
11526 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11527
11528 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
11529 punt for user-aligned variables.
11530
11531 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11532
11533 * tree-chrec.c (chrec_contains_symbols): Return true for
11534 POLY_INT_CST.
11535
11536 2018-01-05 Sudakshina Das <sudi.das@arm.com>
11537
11538 PR target/82439
11539 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
11540 of (x|y) == x for BICS pattern.
11541
11542 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11543
11544 PR tree-optimization/83605
11545 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
11546 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
11547 can throw.
11548
11549 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
11550
11551 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
11552 * config/epiphany/rtems.h: New file.
11553
11554 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11555 Uros Bizjak <ubizjak@gmail.com>
11556
11557 PR target/83554
11558 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
11559 QIreg_operand instead of register_operand predicate.
11560 * config/i386/i386.c (ix86_rop_should_change_byte_p,
11561 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
11562 comments instead of -fmitigate[-_]rop.
11563
11564 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11565
11566 PR bootstrap/81926
11567 * cgraphunit.c (symbol_table::compile): Switch to text_section
11568 before calling assembly_start debug hook.
11569 * run-rtl-passes.c (run_rtl_passes): Likewise.
11570 Include output.h.
11571
11572 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11573
11574 * tree-vrp.c (extract_range_from_binary_expr_1): Check
11575 range_int_cst_p rather than !symbolic_range_p before calling
11576 extract_range_from_multiplicative_op_1.
11577
11578 2018-01-04 Jeff Law <law@redhat.com>
11579
11580 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
11581 redundant test in assertion.
11582
11583 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11584
11585 * doc/rtl.texi: Document machine_mode wrapper classes.
11586
11587 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11588
11589 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
11590 using tree_to_uhwi.
11591
11592 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11593
11594 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
11595 the VEC_PERM_EXPR fold to fail.
11596
11597 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11598
11599 PR debug/83585
11600 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
11601 to switched_sections.
11602
11603 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11604
11605 PR target/83680
11606 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
11607 test for d.testing.
11608
11609 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
11610
11611 PR target/83387
11612 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
11613 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
11614
11615 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11616
11617 PR debug/83666
11618 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
11619 is BLKmode and bitpos not zero or mode change is needed.
11620
11621 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11622
11623 PR target/83675
11624 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
11625 TARGET_VIS2.
11626
11627 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
11628
11629 PR target/83628
11630 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
11631 instead of MULT rtx. Update all corresponding splitters.
11632 (*saddl_se): Ditto.
11633 (*ssub<modesuffix>): Ditto.
11634 (*ssubl_se): Ditto.
11635 (*cmp_sadd_di): Update split patterns.
11636 (*cmp_sadd_si): Ditto.
11637 (*cmp_sadd_sidi): Ditto.
11638 (*cmp_ssub_di): Ditto.
11639 (*cmp_ssub_si): Ditto.
11640 (*cmp_ssub_sidi): Ditto.
11641 * config/alpha/predicates.md (const23_operand): New predicate.
11642 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
11643 Look for ASHIFT, not MULT inner operand.
11644 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
11645
11646 2018-01-04 Martin Liska <mliska@suse.cz>
11647
11648 PR gcov-profile/83669
11649 * gcov.c (output_intermediate_file): Add version to intermediate
11650 gcov file.
11651 * doc/gcov.texi: Document new field 'version' in intermediate
11652 file format. Fix location of '-k' option of gcov command.
11653
11654 2018-01-04 Martin Liska <mliska@suse.cz>
11655
11656 PR ipa/82352
11657 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
11658
11659 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11660
11661 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
11662
11663 2018-01-03 Martin Sebor <msebor@redhat.com>
11664
11665 PR tree-optimization/83655
11666 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
11667 checking calls with invalid arguments.
11668
11669 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11670
11671 * tree-vect-stmts.c (vect_get_store_rhs): New function.
11672 (vectorizable_mask_load_store): Delete.
11673 (vectorizable_call): Return false for masked loads and stores.
11674 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
11675 instead of gimple_assign_rhs1.
11676 (vectorizable_load): Handle IFN_MASK_LOAD.
11677 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
11678
11679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11680
11681 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
11682 split out from..,
11683 (vectorizable_mask_load_store): ...here.
11684 (vectorizable_load): ...and here.
11685
11686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11687
11688 * tree-vect-stmts.c (vect_build_all_ones_mask)
11689 (vect_build_zero_merge_argument): New functions, split out from...
11690 (vectorizable_load): ...here.
11691
11692 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11693
11694 * tree-vect-stmts.c (vect_check_store_rhs): New function,
11695 split out from...
11696 (vectorizable_mask_load_store): ...here.
11697 (vectorizable_store): ...and here.
11698
11699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11700
11701 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
11702 split out from...
11703 (vectorizable_mask_load_store): ...here.
11704
11705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11706
11707 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
11708 (vect_model_store_cost): Take a vec_load_store_type instead of a
11709 vect_def_type.
11710 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
11711 (vect_model_store_cost): Take a vec_load_store_type instead of a
11712 vect_def_type.
11713 (vectorizable_mask_load_store): Update accordingly.
11714 (vectorizable_store): Likewise.
11715 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
11716
11717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11718
11719 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
11720 IFN_MASK_LOAD calls here rather than...
11721 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
11722
11723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11724 Alan Hayward <alan.hayward@arm.com>
11725 David Sherwood <david.sherwood@arm.com>
11726
11727 * expmed.c (extract_bit_field_1): For vector extracts,
11728 fall back to extract_bit_field_as_subreg if vec_extract
11729 isn't available.
11730
11731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11732 Alan Hayward <alan.hayward@arm.com>
11733 David Sherwood <david.sherwood@arm.com>
11734
11735 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
11736 they are variable or constant sized.
11737 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
11738 slots for constant-sized data.
11739
11740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11741 Alan Hayward <alan.hayward@arm.com>
11742 David Sherwood <david.sherwood@arm.com>
11743
11744 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
11745 handling COND_EXPRs with boolean comparisons, try to find a better
11746 basis for the mask type than the boolean itself.
11747
11748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11749
11750 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
11751 is calculated and how it can be overridden.
11752 * genmodes.c (max_bitsize_mode_any_mode): New variable.
11753 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
11754 if defined.
11755 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
11756 if nonzero.
11757
11758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11759 Alan Hayward <alan.hayward@arm.com>
11760 David Sherwood <david.sherwood@arm.com>
11761
11762 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
11763 Remove the mode argument.
11764 (aarch64_simd_valid_immediate): Remove the mode and inverse
11765 arguments.
11766 * config/aarch64/iterators.md (bitsize): New iterator.
11767 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
11768 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
11769 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
11770 aarch64_simd_valid_immediate.
11771 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
11772 (aarch64_reg_or_bic_imm): Likewise.
11773 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
11774 with an insn_type enum and msl with a modifier_type enum.
11775 Replace element_width with a scalar_mode. Change the shift
11776 to unsigned int. Add constructors for scalar_float_mode and
11777 scalar_int_mode elements.
11778 (aarch64_vect_float_const_representable_p): Delete.
11779 (aarch64_can_const_movi_rtx_p)
11780 (aarch64_simd_scalar_immediate_valid_for_move)
11781 (aarch64_simd_make_constant): Update call to
11782 aarch64_simd_valid_immediate.
11783 (aarch64_advsimd_valid_immediate_hs): New function.
11784 (aarch64_advsimd_valid_immediate): Likewise.
11785 (aarch64_simd_valid_immediate): Remove mode and inverse
11786 arguments. Rewrite to use the above. Use const_vec_duplicate_p
11787 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
11788 and aarch64_float_const_representable_p on the result.
11789 (aarch64_output_simd_mov_immediate): Remove mode argument.
11790 Update call to aarch64_simd_valid_immediate and use of
11791 simd_immediate_info.
11792 (aarch64_output_scalar_simd_mov_immediate): Update call
11793 accordingly.
11794
11795 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11796 Alan Hayward <alan.hayward@arm.com>
11797 David Sherwood <david.sherwood@arm.com>
11798
11799 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
11800 (mode_nunits): Likewise CONST_MODE_NUNITS.
11801 * machmode.def (ADJUST_NUNITS): Document.
11802 * genmodes.c (mode_data::need_nunits_adj): New field.
11803 (blank_mode): Update accordingly.
11804 (adj_nunits): New variable.
11805 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
11806 parameter.
11807 (emit_mode_size_inline): Set need_bytesize_adj for all modes
11808 listed in adj_nunits.
11809 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
11810 listed in adj_nunits. Don't emit case statements for such modes.
11811 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
11812 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
11813 nothing if adj_nunits is nonnull.
11814 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
11815 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
11816 (emit_mode_fbit): Update use of print_maybe_const_decl.
11817 (emit_move_size): Likewise. Treat the array as non-const
11818 if adj_nunits.
11819 (emit_mode_adjustments): Handle adj_nunits.
11820
11821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11822
11823 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
11824 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
11825 (VECTOR_MODES): Use it.
11826 (make_vector_modes): Take the prefix as an argument.
11827
11828 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11829 Alan Hayward <alan.hayward@arm.com>
11830 David Sherwood <david.sherwood@arm.com>
11831
11832 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
11833 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
11834 for MODE_VECTOR_BOOL.
11835 * machmode.def (VECTOR_BOOL_MODE): Document.
11836 * genmodes.c (VECTOR_BOOL_MODE): New macro.
11837 (make_vector_bool_mode): New function.
11838 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
11839 MODE_VECTOR_BOOL.
11840 * lto-streamer-in.c (lto_input_mode_table): Likewise.
11841 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
11842 Likewise.
11843 * stor-layout.c (int_mode_for_mode): Likewise.
11844 * tree.c (build_vector_type_for_mode): Likewise.
11845 * varasm.c (output_constant_pool_2): Likewise.
11846 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
11847 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
11848 for MODE_VECTOR_BOOL.
11849 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
11850 of mode class checks.
11851 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
11852 instead of a list of mode class checks.
11853 (expand_vector_scalar_condition): Likewise.
11854 (type_for_widest_vector_mode): Handle BImode as an inner mode.
11855
11856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11857 Alan Hayward <alan.hayward@arm.com>
11858 David Sherwood <david.sherwood@arm.com>
11859
11860 * machmode.h (mode_size): Change from unsigned short to
11861 poly_uint16_pod.
11862 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
11863 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11864 or if measurement_type is not polynomial.
11865 (fixed_size_mode::includes_p): Check for constant-sized modes.
11866 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
11867 return a poly_uint16 rather than an unsigned short.
11868 (emit_mode_size): Change the type of mode_size from unsigned short
11869 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
11870 (emit_mode_adjustments): Cope with polynomial vector sizes.
11871 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11872 for GET_MODE_SIZE.
11873 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11874 for GET_MODE_SIZE.
11875 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
11876 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
11877 * caller-save.c (setup_save_areas): Likewise.
11878 (replace_reg_with_saved_mem): Likewise.
11879 * calls.c (emit_library_call_value_1): Likewise.
11880 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
11881 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
11882 (gen_lowpart_for_combine): Likewise.
11883 * convert.c (convert_to_integer_1): Likewise.
11884 * cse.c (equiv_constant, cse_insn): Likewise.
11885 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
11886 (cselib_subst_to_values): Likewise.
11887 * dce.c (word_dce_process_block): Likewise.
11888 * df-problems.c (df_word_lr_mark_ref): Likewise.
11889 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
11890 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
11891 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
11892 (rtl_for_decl_location): Likewise.
11893 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
11894 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
11895 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
11896 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
11897 (expand_expr_real_1): Likewise.
11898 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
11899 (pad_below): Likewise.
11900 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11901 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
11902 * ira.c (get_subreg_tracking_sizes): Likewise.
11903 * ira-build.c (ira_create_allocno_objects): Likewise.
11904 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
11905 (ira_sort_regnos_for_alter_reg): Likewise.
11906 * ira-costs.c (record_operand_costs): Likewise.
11907 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
11908 (resolve_simple_move): Likewise.
11909 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
11910 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
11911 (lra_constraints): Likewise.
11912 (CONST_POOL_OK_P): Reject variable-sized modes.
11913 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
11914 (add_pseudo_to_slot, lra_spill): Likewise.
11915 * omp-low.c (omp_clause_aligned_alignment): Likewise.
11916 * optabs-query.c (get_best_extraction_insn): Likewise.
11917 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
11918 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
11919 (expand_mult_highpart, valid_multiword_target_p): Likewise.
11920 * recog.c (offsettable_address_addr_space_p): Likewise.
11921 * regcprop.c (maybe_mode_change): Likewise.
11922 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
11923 * regrename.c (build_def_use): Likewise.
11924 * regstat.c (dump_reg_info): Likewise.
11925 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
11926 (find_reloads, find_reloads_subreg_address): Likewise.
11927 * reload1.c (eliminate_regs_1): Likewise.
11928 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
11929 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
11930 (simplify_binary_operation_1, simplify_subreg): Likewise.
11931 * targhooks.c (default_function_arg_padding): Likewise.
11932 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
11933 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
11934 (verify_gimple_assign_ternary): Likewise.
11935 * tree-inline.c (estimate_move_cost): Likewise.
11936 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11937 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
11938 (get_address_cost_ainc): Likewise.
11939 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
11940 (vect_supportable_dr_alignment): Likewise.
11941 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11942 (vectorizable_reduction): Likewise.
11943 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
11944 (vectorizable_operation, vectorizable_load): Likewise.
11945 * tree.c (build_same_sized_truth_vector_type): Likewise.
11946 * valtrack.c (cleanup_auto_inc_dec): Likewise.
11947 * var-tracking.c (emit_note_insn_var_location): Likewise.
11948 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
11949 (ADDR_VEC_ALIGN): Likewise.
11950
11951 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11952 Alan Hayward <alan.hayward@arm.com>
11953 David Sherwood <david.sherwood@arm.com>
11954
11955 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
11956 unsigned short.
11957 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11958 or if measurement_type is polynomial.
11959 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
11960 * combine.c (make_extraction): Likewise.
11961 * dse.c (find_shift_sequence): Likewise.
11962 * dwarf2out.c (mem_loc_descriptor): Likewise.
11963 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
11964 (extract_bit_field, extract_low_bits): Likewise.
11965 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
11966 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
11967 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
11968 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
11969 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11970 * reload.c (find_reloads): Likewise.
11971 * reload1.c (alter_reg): Likewise.
11972 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
11973 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
11974 * tree-if-conv.c (predicate_mem_writes): Likewise.
11975 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
11976 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
11977 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11978 * valtrack.c (dead_debug_insert_temp): Likewise.
11979 * varasm.c (mergeable_constant_section): Likewise.
11980 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
11981
11982 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11983 Alan Hayward <alan.hayward@arm.com>
11984 David Sherwood <david.sherwood@arm.com>
11985
11986 * expr.c (expand_assignment): Cope with polynomial mode sizes
11987 when assigning to a CONCAT.
11988
11989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11990 Alan Hayward <alan.hayward@arm.com>
11991 David Sherwood <david.sherwood@arm.com>
11992
11993 * machmode.h (mode_precision): Change from unsigned short to
11994 poly_uint16_pod.
11995 (mode_to_precision): Return a poly_uint16 rather than an unsigned
11996 short.
11997 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
11998 or if measurement_type is not polynomial.
11999 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
12000 in which the mode is already known to be a scalar_int_mode.
12001 * genmodes.c (emit_mode_precision): Change the type of mode_precision
12002 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
12003 initializer.
12004 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12005 for GET_MODE_PRECISION.
12006 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12007 for GET_MODE_PRECISION.
12008 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
12009 as polynomial.
12010 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
12011 (expand_field_assignment, make_extraction): Likewise.
12012 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
12013 (get_last_value): Likewise.
12014 * convert.c (convert_to_integer_1): Likewise.
12015 * cse.c (cse_insn): Likewise.
12016 * expr.c (expand_expr_real_1): Likewise.
12017 * lra-constraints.c (simplify_operand_subreg): Likewise.
12018 * optabs-query.c (can_atomic_load_p): Likewise.
12019 * optabs.c (expand_atomic_load): Likewise.
12020 (expand_atomic_store): Likewise.
12021 * ree.c (combine_reaching_defs): Likewise.
12022 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
12023 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
12024 * tree.h (type_has_mode_precision_p): Likewise.
12025 * ubsan.c (instrument_si_overflow): Likewise.
12026
12027 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12028 Alan Hayward <alan.hayward@arm.com>
12029 David Sherwood <david.sherwood@arm.com>
12030
12031 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
12032 polynomial numbers of units.
12033 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
12034 (valid_vector_subparts_p): New function.
12035 (build_vector_type): Remove temporary shim and take the number
12036 of units as a poly_uint64 rather than an int.
12037 (build_opaque_vector_type): Take the number of units as a
12038 poly_uint64 rather than an int.
12039 * tree.c (build_vector_from_ctor): Handle polynomial
12040 TYPE_VECTOR_SUBPARTS.
12041 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
12042 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
12043 (build_vector_from_val): If the number of units is variable,
12044 use build_vec_duplicate_cst for constant operands and
12045 VEC_DUPLICATE_EXPR otherwise.
12046 (make_vector_type): Remove temporary is_constant ().
12047 (build_vector_type, build_opaque_vector_type): Take the number of
12048 units as a poly_uint64 rather than an int.
12049 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
12050 VECTOR_CST_NELTS.
12051 * cfgexpand.c (expand_debug_expr): Likewise.
12052 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
12053 (store_constructor, expand_expr_real_1): Likewise.
12054 (const_scalar_mask_from_tree): Likewise.
12055 * fold-const-call.c (fold_const_reduction): Likewise.
12056 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
12057 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
12058 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
12059 (fold_relational_const): Likewise.
12060 (native_interpret_vector): Likewise. Change the size from an
12061 int to an unsigned int.
12062 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
12063 TYPE_VECTOR_SUBPARTS.
12064 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
12065 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
12066 duplicating a non-constant operand into a variable-length vector.
12067 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
12068 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
12069 * ipa-icf.c (sem_variable::equals): Likewise.
12070 * match.pd: Likewise.
12071 * omp-simd-clone.c (simd_clone_subparts): Likewise.
12072 * print-tree.c (print_node): Likewise.
12073 * stor-layout.c (layout_type): Likewise.
12074 * targhooks.c (default_builtin_vectorization_cost): Likewise.
12075 * tree-cfg.c (verify_gimple_comparison): Likewise.
12076 (verify_gimple_assign_binary): Likewise.
12077 (verify_gimple_assign_ternary): Likewise.
12078 (verify_gimple_assign_single): Likewise.
12079 * tree-pretty-print.c (dump_generic_node): Likewise.
12080 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12081 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
12082 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
12083 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
12084 (vect_shift_permute_load_chain): Likewise.
12085 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
12086 (expand_vector_condition, optimize_vector_constructor): Likewise.
12087 (lower_vec_perm, get_compute_type): Likewise.
12088 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12089 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
12090 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12091 (vect_recog_mask_conversion_pattern): Likewise.
12092 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
12093 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
12094 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12095 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
12096 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
12097 (vectorizable_shift, vectorizable_operation, vectorizable_store)
12098 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
12099 (supportable_widening_operation): Likewise.
12100 (supportable_narrowing_operation): Likewise.
12101 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
12102 Likewise.
12103 * varasm.c (output_constant): Likewise.
12104
12105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12106 Alan Hayward <alan.hayward@arm.com>
12107 David Sherwood <david.sherwood@arm.com>
12108
12109 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
12110 so that both the length == 3 and length != 3 cases set up their
12111 own permute vectors. Add comments explaining why we know the
12112 number of elements is constant.
12113 (vect_permute_load_chain): Likewise.
12114
12115 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12116 Alan Hayward <alan.hayward@arm.com>
12117 David Sherwood <david.sherwood@arm.com>
12118
12119 * machmode.h (mode_nunits): Change from unsigned char to
12120 poly_uint16_pod.
12121 (ONLY_FIXED_SIZE_MODES): New macro.
12122 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
12123 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
12124 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
12125 New typedefs.
12126 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
12127 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
12128 or if measurement_type is not polynomial.
12129 * genmodes.c (ZERO_COEFFS): New macro.
12130 (emit_mode_nunits_inline): Make mode_nunits_inline return a
12131 poly_uint16.
12132 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
12133 Use ZERO_COEFFS when emitting initializers.
12134 * data-streamer.h (bp_pack_poly_value): New function.
12135 (bp_unpack_poly_value): Likewise.
12136 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12137 for GET_MODE_NUNITS.
12138 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12139 for GET_MODE_NUNITS.
12140 * tree.c (make_vector_type): Remove temporary shim and make
12141 the real function take the number of units as a poly_uint64
12142 rather than an int.
12143 (build_vector_type_for_mode): Handle polynomial nunits.
12144 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
12145 * emit-rtl.c (const_vec_series_p_1): Likewise.
12146 (gen_rtx_CONST_VECTOR): Likewise.
12147 * fold-const.c (test_vec_duplicate_folding): Likewise.
12148 * genrecog.c (validate_pattern): Likewise.
12149 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
12150 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12151 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
12152 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
12153 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
12154 * rtlanal.c (subreg_get_info): Likewise.
12155 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12156 (vect_grouped_load_supported): Likewise.
12157 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
12158 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
12159 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
12160 (simplify_const_unary_operation, simplify_binary_operation_1)
12161 (simplify_const_binary_operation, simplify_ternary_operation)
12162 (test_vector_ops_duplicate, test_vector_ops): Likewise.
12163 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
12164 instead of CONST_VECTOR_NUNITS.
12165 * varasm.c (output_constant_pool_2): Likewise.
12166 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
12167 explicit-encoded elements in the XVEC for variable-length vectors.
12168
12169 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12170
12171 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
12172
12173 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12174 Alan Hayward <alan.hayward@arm.com>
12175 David Sherwood <david.sherwood@arm.com>
12176
12177 * coretypes.h (fixed_size_mode): Declare.
12178 (fixed_size_mode_pod): New typedef.
12179 * builtins.h (target_builtins::x_apply_args_mode)
12180 (target_builtins::x_apply_result_mode): Change type to
12181 fixed_size_mode_pod.
12182 * builtins.c (apply_args_size, apply_result_size, result_vector)
12183 (expand_builtin_apply_args_1, expand_builtin_apply)
12184 (expand_builtin_return): Update accordingly.
12185
12186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12187
12188 * cse.c (hash_rtx_cb): Hash only the encoded elements.
12189 * cselib.c (cselib_hash_rtx): Likewise.
12190 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
12191 CONST_VECTOR encoding.
12192
12193 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12194 Jeff Law <law@redhat.com>
12195
12196 PR target/83641
12197 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
12198 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
12199 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
12200 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
12201
12202 PR target/83641
12203 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
12204 explicitly probe *sp in a noreturn function if there were any callee
12205 register saves or frame pointer is needed.
12206
12207 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12208
12209 PR debug/83621
12210 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
12211 BLKmode for ternary, binary or unary expressions.
12212
12213 PR debug/83645
12214 * var-tracking.c (delete_vta_debug_insn): New inline function.
12215 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
12216 insns from get_insns () to NULL instead of each bb separately.
12217 Use delete_vta_debug_insn. No longer static.
12218 (vt_debug_insns_local, variable_tracking_main_1): Adjust
12219 delete_vta_debug_insns callers.
12220 * rtl.h (delete_vta_debug_insns): Declare.
12221 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
12222 instead of variable_tracking_main.
12223
12224 2018-01-03 Martin Sebor <msebor@redhat.com>
12225
12226 PR tree-optimization/83603
12227 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
12228 arguments past the endof the argument list in functions declared
12229 without a prototype.
12230 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
12231 Avoid checking when arguments are null.
12232
12233 2018-01-03 Martin Sebor <msebor@redhat.com>
12234
12235 PR c/83559
12236 * doc/extend.texi (attribute const): Fix a typo.
12237 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
12238 issuing -Wsuggest-attribute for void functions.
12239
12240 2018-01-03 Martin Sebor <msebor@redhat.com>
12241
12242 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
12243 offset_int::from instead of wide_int::to_shwi.
12244 (maybe_diag_overlap): Remove assertion.
12245 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
12246 * gimple-ssa-sprintf.c (format_directive): Same.
12247 (parse_directive): Same.
12248 (sprintf_dom_walker::compute_format_length): Same.
12249 (try_substitute_return_value): Same.
12250
12251 2018-01-03 Jeff Law <law@redhat.com>
12252
12253 PR middle-end/83654
12254 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
12255 non-constant residual for zero at runtime and avoid probing in
12256 that case. Reorganize code for trailing problem to mirror handling
12257 of the residual.
12258
12259 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12260
12261 PR tree-optimization/83501
12262 * tree-ssa-strlen.c (get_string_cst): New.
12263 (handle_char_store): Call get_string_cst.
12264
12265 2018-01-03 Martin Liska <mliska@suse.cz>
12266
12267 PR tree-optimization/83593
12268 * tree-ssa-strlen.c: Include tree-cfg.h.
12269 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
12270 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
12271 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
12272 to false.
12273 (strlen_dom_walker::before_dom_children): Call
12274 gimple_purge_dead_eh_edges. Dump tranformation with details
12275 dump flags.
12276 (strlen_dom_walker::before_dom_children): Update call by adding
12277 new argument cleanup_eh.
12278 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
12279
12280 2018-01-03 Martin Liska <mliska@suse.cz>
12281
12282 PR ipa/83549
12283 * cif-code.def (VARIADIC_THUNK): New enum value.
12284 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
12285 thunks.
12286
12287 2018-01-03 Jan Beulich <jbeulich@suse.com>
12288
12289 * sse.md (mov<mode>_internal): Tighten condition for when to use
12290 vmovdqu<ssescalarsize> for TI and OI modes.
12291
12292 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12293
12294 Update copyright years.
12295
12296 2018-01-03 Martin Liska <mliska@suse.cz>
12297
12298 PR ipa/83594
12299 * ipa-visibility.c (function_and_variable_visibility): Skip
12300 functions with noipa attribure.
12301
12302 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12303
12304 * gcc.c (process_command): Update copyright notice dates.
12305 * gcov-dump.c (print_version): Ditto.
12306 * gcov.c (print_version): Ditto.
12307 * gcov-tool.c (print_version): Ditto.
12308 * gengtype.c (create_file): Ditto.
12309 * doc/cpp.texi: Bump @copying's copyright year.
12310 * doc/cppinternals.texi: Ditto.
12311 * doc/gcc.texi: Ditto.
12312 * doc/gccint.texi: Ditto.
12313 * doc/gcov.texi: Ditto.
12314 * doc/install.texi: Ditto.
12315 * doc/invoke.texi: Ditto.
12316
12317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12318
12319 * vector-builder.h (vector_builder::m_full_nelts): Change from
12320 unsigned int to poly_uint64.
12321 (vector_builder::full_nelts): Update prototype accordingly.
12322 (vector_builder::new_vector): Likewise.
12323 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
12324 (vector_builder::operator ==): Likewise.
12325 (vector_builder::finalize): Likewise.
12326 * int-vector-builder.h (int_vector_builder::int_vector_builder):
12327 Take the number of elements as a poly_uint64 rather than an
12328 unsigned int.
12329 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
12330 from unsigned int to poly_uint64.
12331 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
12332 (vec_perm_indices::new_vector): Likewise.
12333 (vec_perm_indices::length): Likewise.
12334 (vec_perm_indices::nelts_per_input): Likewise.
12335 (vec_perm_indices::input_nelts): Likewise.
12336 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
12337 number of elements per input as a poly_uint64 rather than an
12338 unsigned int. Use the original encoding for variable-length
12339 vectors, rather than clamping each individual element.
12340 For the second and subsequent elements in each pattern,
12341 clamp the step and base before clamping their sum.
12342 (vec_perm_indices::series_p): Handle polynomial element counts.
12343 (vec_perm_indices::all_in_range_p): Likewise.
12344 (vec_perm_indices_to_tree): Likewise.
12345 (vec_perm_indices_to_rtx): Likewise.
12346 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
12347 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
12348 (tree_vector_builder::new_binary_operation): Handle polynomial
12349 element counts. Return false if we need to know the number
12350 of elements at compile time.
12351 * fold-const.c (fold_vec_perm): Punt if the number of elements
12352 isn't known at compile time.
12353
12354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12355
12356 * vec-perm-indices.h (vec_perm_builder): Change element type
12357 from HOST_WIDE_INT to poly_int64.
12358 (vec_perm_indices::element_type): Update accordingly.
12359 (vec_perm_indices::clamp): Handle polynomial element_types.
12360 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12361 (vec_perm_indices::all_in_range_p): Likewise.
12362 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
12363 than shwi trees.
12364 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
12365 polynomial vec_perm_indices element types.
12366 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
12367 * fold-const.c (fold_vec_perm): Likewise.
12368 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
12369 * tree-vect-generic.c (lower_vec_perm): Likewise.
12370 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12371 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
12372 element type to HOST_WIDE_INT.
12373
12374 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12375 Alan Hayward <alan.hayward@arm.com>
12376 David Sherwood <david.sherwood@arm.com>
12377
12378 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
12379 rather than an int. Use plus_constant.
12380 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
12381 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
12382
12383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12384 Alan Hayward <alan.hayward@arm.com>
12385 David Sherwood <david.sherwood@arm.com>
12386
12387 * calls.c (emit_call_1, expand_call): Change struct_value_size from
12388 a HOST_WIDE_INT to a poly_int64.
12389
12390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12391 Alan Hayward <alan.hayward@arm.com>
12392 David Sherwood <david.sherwood@arm.com>
12393
12394 * calls.c (load_register_parameters): Cope with polynomial
12395 mode sizes. Require a constant size for BLKmode parameters
12396 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
12397 forces a parameter to be padded at the lsb end in order to
12398 fill a complete number of words, require the parameter size
12399 to be ordered wrt UNITS_PER_WORD.
12400
12401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12402 Alan Hayward <alan.hayward@arm.com>
12403 David Sherwood <david.sherwood@arm.com>
12404
12405 * reload1.c (spill_stack_slot_width): Change element type
12406 from unsigned int to poly_uint64_pod.
12407 (alter_reg): Treat mode sizes as polynomial.
12408
12409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12410 Alan Hayward <alan.hayward@arm.com>
12411 David Sherwood <david.sherwood@arm.com>
12412
12413 * reload.c (complex_word_subreg_p): New function.
12414 (reload_inner_reg_of_subreg, push_reload): Use it.
12415
12416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12417 Alan Hayward <alan.hayward@arm.com>
12418 David Sherwood <david.sherwood@arm.com>
12419
12420 * lra-constraints.c (process_alt_operands): Reject matched
12421 operands whose sizes aren't ordered.
12422 (match_reload): Refer to this check here.
12423
12424 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12425 Alan Hayward <alan.hayward@arm.com>
12426 David Sherwood <david.sherwood@arm.com>
12427
12428 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
12429 that the mode size is in the set {1, 2, 4, 8, 16}.
12430
12431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12432 Alan Hayward <alan.hayward@arm.com>
12433 David Sherwood <david.sherwood@arm.com>
12434
12435 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
12436 Use plus_constant instead of gen_rtx_PLUS.
12437
12438 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12439 Alan Hayward <alan.hayward@arm.com>
12440 David Sherwood <david.sherwood@arm.com>
12441
12442 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
12443 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
12444 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
12445 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
12446 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
12447 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
12448 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
12449 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
12450 * config/i386/i386.c (ix86_push_rounding): ...this new function.
12451 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
12452 a poly_int64.
12453 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
12454 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
12455 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
12456 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
12457 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
12458 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
12459 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
12460 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
12461 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
12462 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
12463 function.
12464 * expr.c (emit_move_resolve_push): Treat the input and result
12465 of PUSH_ROUNDING as a poly_int64.
12466 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
12467 (emit_push_insn): Likewise.
12468 * lra-eliminations.c (mark_not_eliminable): Likewise.
12469 * recog.c (push_operand): Likewise.
12470 * reload1.c (elimination_effects): Likewise.
12471 * rtlanal.c (nonzero_bits1): Likewise.
12472 * calls.c (store_one_arg): Likewise. Require the padding to be
12473 known at compile time.
12474
12475 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12476 Alan Hayward <alan.hayward@arm.com>
12477 David Sherwood <david.sherwood@arm.com>
12478
12479 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
12480 Use plus_constant instead of gen_rtx_PLUS.
12481
12482 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12483 Alan Hayward <alan.hayward@arm.com>
12484 David Sherwood <david.sherwood@arm.com>
12485
12486 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
12487 rather than an int.
12488
12489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12490 Alan Hayward <alan.hayward@arm.com>
12491 David Sherwood <david.sherwood@arm.com>
12492
12493 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
12494 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
12495 via stack temporaries. Treat the mode size as polynomial too.
12496
12497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12498 Alan Hayward <alan.hayward@arm.com>
12499 David Sherwood <david.sherwood@arm.com>
12500
12501 * expr.c (expand_expr_real_2): When handling conversions involving
12502 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
12503 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
12504 as a poly_uint64 too.
12505
12506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12507 Alan Hayward <alan.hayward@arm.com>
12508 David Sherwood <david.sherwood@arm.com>
12509
12510 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
12511
12512 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12513 Alan Hayward <alan.hayward@arm.com>
12514 David Sherwood <david.sherwood@arm.com>
12515
12516 * combine.c (can_change_dest_mode): Handle polynomial
12517 REGMODE_NATURAL_SIZE.
12518 * expmed.c (store_bit_field_1): Likewise.
12519 * expr.c (store_constructor): Likewise.
12520 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
12521 and polynomial REGMODE_NATURAL_SIZE.
12522 (gen_lowpart_common): Likewise.
12523 * reginfo.c (record_subregs_of_mode): Likewise.
12524 * rtlanal.c (read_modify_subreg_p): Likewise.
12525
12526 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12527 Alan Hayward <alan.hayward@arm.com>
12528 David Sherwood <david.sherwood@arm.com>
12529
12530 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
12531 numbers of elements.
12532
12533 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12534 Alan Hayward <alan.hayward@arm.com>
12535 David Sherwood <david.sherwood@arm.com>
12536
12537 * match.pd: Cope with polynomial numbers of vector elements.
12538
12539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12540 Alan Hayward <alan.hayward@arm.com>
12541 David Sherwood <david.sherwood@arm.com>
12542
12543 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
12544 in a POINTER_PLUS_EXPR.
12545
12546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12547 Alan Hayward <alan.hayward@arm.com>
12548 David Sherwood <david.sherwood@arm.com>
12549
12550 * omp-simd-clone.c (simd_clone_subparts): New function.
12551 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
12552 (ipa_simd_modify_function_body): Likewise.
12553
12554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12555 Alan Hayward <alan.hayward@arm.com>
12556 David Sherwood <david.sherwood@arm.com>
12557
12558 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
12559 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
12560 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
12561 (expand_vector_condition, vector_element): Likewise.
12562 (subparts_gt): New function.
12563 (get_compute_type): Use subparts_gt.
12564 (count_type_subparts): Delete.
12565 (expand_vector_operations_1): Use subparts_gt instead of
12566 count_type_subparts.
12567
12568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12569 Alan Hayward <alan.hayward@arm.com>
12570 David Sherwood <david.sherwood@arm.com>
12571
12572 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
12573 (vect_compile_time_alias): ...this new function. Do the calculation
12574 on poly_ints rather than trees.
12575 (vect_prune_runtime_alias_test_list): Update call accordingly.
12576
12577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12578 Alan Hayward <alan.hayward@arm.com>
12579 David Sherwood <david.sherwood@arm.com>
12580
12581 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
12582 numbers of units.
12583 (vect_schedule_slp_instance): Likewise.
12584
12585 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12586 Alan Hayward <alan.hayward@arm.com>
12587 David Sherwood <david.sherwood@arm.com>
12588
12589 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
12590 constant and extern definitions for variable-length vectors.
12591 (vect_get_constant_vectors): Note that the number of units
12592 is known to be constant.
12593
12594 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12595 Alan Hayward <alan.hayward@arm.com>
12596 David Sherwood <david.sherwood@arm.com>
12597
12598 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
12599 of units as polynomial. Choose between WIDE and NARROW based
12600 on multiple_p.
12601
12602 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12603 Alan Hayward <alan.hayward@arm.com>
12604 David Sherwood <david.sherwood@arm.com>
12605
12606 * tree-vect-stmts.c (simd_clone_subparts): New function.
12607 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
12608
12609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12610 Alan Hayward <alan.hayward@arm.com>
12611 David Sherwood <david.sherwood@arm.com>
12612
12613 * tree-vect-stmts.c (vectorizable_call): Treat the number of
12614 vectors as polynomial. Use build_index_vector for
12615 IFN_GOMP_SIMD_LANE.
12616
12617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12618 Alan Hayward <alan.hayward@arm.com>
12619 David Sherwood <david.sherwood@arm.com>
12620
12621 * tree-vect-stmts.c (get_load_store_type): Treat the number of
12622 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
12623 for variable-length vectors.
12624 (vectorizable_mask_load_store): Treat the number of units as
12625 polynomial, asserting that it is constant if the condition has
12626 already been enforced.
12627 (vectorizable_store, vectorizable_load): Likewise.
12628
12629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12630 Alan Hayward <alan.hayward@arm.com>
12631 David Sherwood <david.sherwood@arm.com>
12632
12633 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
12634 of units as polynomial. Punt if we can't tell at compile time
12635 which vector contains the final result.
12636
12637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12638 Alan Hayward <alan.hayward@arm.com>
12639 David Sherwood <david.sherwood@arm.com>
12640
12641 * tree-vect-loop.c (vectorizable_induction): Treat the number
12642 of units as polynomial. Punt on SLP inductions. Use an integer
12643 VEC_SERIES_EXPR for variable-length integer reductions. Use a
12644 cast of such a series for variable-length floating-point
12645 reductions.
12646
12647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12648 Alan Hayward <alan.hayward@arm.com>
12649 David Sherwood <david.sherwood@arm.com>
12650
12651 * tree.h (build_index_vector): Declare.
12652 * tree.c (build_index_vector): New function.
12653 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
12654 of units as polynomial, forcibly converting it to a constant if
12655 vectorizable_reduction has already enforced the condition.
12656 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
12657 to create a {1,2,3,...} vector.
12658 (vectorizable_reduction): Treat the number of units as polynomial.
12659 Choose vectype_in based on the largest scalar element size rather
12660 than the smallest number of units. Enforce the restrictions
12661 relied on above.
12662
12663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12664 Alan Hayward <alan.hayward@arm.com>
12665 David Sherwood <david.sherwood@arm.com>
12666
12667 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
12668 number of units as polynomial.
12669
12670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12671 Alan Hayward <alan.hayward@arm.com>
12672 David Sherwood <david.sherwood@arm.com>
12673
12674 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
12675 * target.def (autovectorize_vector_sizes): Return the vector sizes
12676 by pointer, using vector_sizes rather than a bitmask.
12677 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
12678 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
12679 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
12680 Likewise.
12681 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
12682 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
12683 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
12684 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
12685 * omp-general.c (omp_max_vf): Likewise.
12686 * omp-low.c (omp_clause_aligned_alignment): Likewise.
12687 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
12688 * tree-vect-loop.c (vect_analyze_loop): Likewise.
12689 * tree-vect-slp.c (vect_slp_bb): Likewise.
12690 * doc/tm.texi: Regenerate.
12691 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
12692 to a poly_uint64.
12693 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
12694 the vector size as a poly_uint64 rather than an unsigned int.
12695 (current_vector_size): Change from an unsigned int to a poly_uint64.
12696 (get_vectype_for_scalar_type): Update accordingly.
12697 * tree.h (build_truth_vector_type): Take the size and number of
12698 units as a poly_uint64 rather than an unsigned int.
12699 (build_vector_type): Add a temporary overload that takes
12700 the number of units as a poly_uint64 rather than an unsigned int.
12701 * tree.c (make_vector_type): Likewise.
12702 (build_truth_vector_type): Take the number of units as a poly_uint64
12703 rather than an unsigned int.
12704
12705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12706 Alan Hayward <alan.hayward@arm.com>
12707 David Sherwood <david.sherwood@arm.com>
12708
12709 * target.def (get_mask_mode): Take the number of units and length
12710 as poly_uint64s rather than unsigned ints.
12711 * targhooks.h (default_get_mask_mode): Update accordingly.
12712 * targhooks.c (default_get_mask_mode): Likewise.
12713 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
12714 * doc/tm.texi: Regenerate.
12715
12716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12717 Alan Hayward <alan.hayward@arm.com>
12718 David Sherwood <david.sherwood@arm.com>
12719
12720 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
12721 * omp-general.c (omp_max_vf): Likewise.
12722 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
12723 (expand_omp_simd): Handle polynomial safelen.
12724 * omp-low.c (omplow_simd_context): Add a default constructor.
12725 (omplow_simd_context::max_vf): Change from int to poly_uint64.
12726 (lower_rec_simd_input_clauses): Update accordingly.
12727 (lower_rec_input_clauses): Likewise.
12728
12729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12730 Alan Hayward <alan.hayward@arm.com>
12731 David Sherwood <david.sherwood@arm.com>
12732
12733 * tree-vectorizer.h (vect_nunits_for_cost): New function.
12734 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
12735 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
12736 (vect_analyze_slp_cost): Likewise.
12737 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
12738 (vect_model_load_cost): Likewise.
12739
12740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12741 Alan Hayward <alan.hayward@arm.com>
12742 David Sherwood <david.sherwood@arm.com>
12743
12744 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
12745 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
12746 from an unsigned int * to a poly_uint64_pod *.
12747 (calculate_unrolling_factor): New function.
12748 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
12749
12750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12751 Alan Hayward <alan.hayward@arm.com>
12752 David Sherwood <david.sherwood@arm.com>
12753
12754 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
12755 from an unsigned int to a poly_uint64.
12756 (_loop_vec_info::slp_unrolling_factor): Likewise.
12757 (_loop_vec_info::vectorization_factor): Change from an int
12758 to a poly_uint64.
12759 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
12760 (vect_get_num_vectors): New function.
12761 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
12762 (vect_get_num_copies): Use vect_get_num_vectors.
12763 (vect_analyze_data_ref_dependences): Change max_vf from an int *
12764 to an unsigned int *.
12765 (vect_analyze_data_refs): Change min_vf from an int * to a
12766 poly_uint64 *.
12767 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
12768 than an unsigned HOST_WIDE_INT.
12769 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12770 (vect_analyze_data_ref_dependence): Change max_vf from an int *
12771 to an unsigned int *.
12772 (vect_analyze_data_ref_dependences): Likewise.
12773 (vect_compute_data_ref_alignment): Handle polynomial vf.
12774 (vect_enhance_data_refs_alignment): Likewise.
12775 (vect_prune_runtime_alias_test_list): Likewise.
12776 (vect_shift_permute_load_chain): Likewise.
12777 (vect_supportable_dr_alignment): Likewise.
12778 (dependence_distance_ge_vf): Take the vectorization factor as a
12779 poly_uint64 rather than an unsigned HOST_WIDE_INT.
12780 (vect_analyze_data_refs): Change min_vf from an int * to a
12781 poly_uint64 *.
12782 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
12783 vfm1 as a poly_uint64 rather than an int. Make the same change
12784 for the returned bound_scalar.
12785 (vect_gen_vector_loop_niters): Handle polynomial vf.
12786 (vect_do_peeling): Likewise. Update call to
12787 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
12788 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
12789 be constant.
12790 * tree-vect-loop.c (vect_determine_vectorization_factor)
12791 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
12792 (vect_get_known_peeling_cost): Likewise.
12793 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
12794 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
12795 (vect_transform_loop): Likewise. Use the lowest possible VF when
12796 updating the upper bounds of the loop.
12797 (vect_min_worthwhile_factor): Make static. Return an unsigned int
12798 rather than an int.
12799 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
12800 polynomial unroll factors.
12801 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
12802 (vect_make_slp_decision): Likewise.
12803 (vect_supported_load_permutation_p): Likewise, and polynomial
12804 vf too.
12805 (vect_analyze_slp_cost): Handle polynomial vf.
12806 (vect_slp_analyze_node_operations): Likewise.
12807 (vect_slp_analyze_bb_1): Likewise.
12808 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
12809 than an unsigned HOST_WIDE_INT.
12810 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
12811 (vectorizable_load): Handle polynomial vf.
12812 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
12813 a poly_uint64.
12814 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
12815
12816 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12817 Alan Hayward <alan.hayward@arm.com>
12818 David Sherwood <david.sherwood@arm.com>
12819
12820 * match.pd: Handle bit operations involving three constants
12821 and try to fold one pair.
12822
12823 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12824
12825 * tree-vect-loop-manip.c: Include gimple-fold.h.
12826 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
12827 niters_maybe_zero parameters. Handle other cases besides a step of 1.
12828 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
12829 Add a path that uses a step of VF instead of 1, but disable it
12830 for now.
12831 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
12832 and niters_no_overflow parameters. Update calls to
12833 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
12834 Create a new SSA name if the latter choses to use a ste other
12835 than zero, and return it via niters_vector_mult_vf_var.
12836 * tree-vect-loop.c (vect_transform_loop): Update calls to
12837 vect_do_peeling, vect_gen_vector_loop_niters and
12838 slpeel_make_loop_iterate_ntimes.
12839 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
12840 (vect_gen_vector_loop_niters): Update declarations after above changes.
12841
12842 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
12843
12844 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
12845 128-bit round to integer instructions.
12846 (ceil<mode>2): Likewise.
12847 (btrunc<mode>2): Likewise.
12848 (round<mode>2): Likewise.
12849
12850 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12851
12852 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
12853 unaligned VSX load/store on P8/P9.
12854 (expand_block_clear): Allow the use of unaligned VSX
12855 load/store on P8/P9.
12856
12857 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12858
12859 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
12860 New function.
12861 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
12862 swap associated with both a load and a store.
12863
12864 2018-01-02 Andrew Waterman <andrew@sifive.com>
12865
12866 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
12867 * config/riscv/riscv.md (clear_cache): Use it.
12868
12869 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
12870
12871 * web.c: Remove out-of-date comment.
12872
12873 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12874
12875 * expr.c (fixup_args_size_notes): Check that any existing
12876 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
12877 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
12878 (emit_single_push_insn): ...here.
12879
12880 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12881
12882 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
12883 (const_vector_encoded_nelts): New function.
12884 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
12885 (const_vector_int_elt, const_vector_elt): Declare.
12886 * emit-rtl.c (const_vector_int_elt_1): New function.
12887 (const_vector_elt): Likewise.
12888 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
12889 of CONST_VECTOR_ELT.
12890
12891 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12892
12893 * expr.c: Include rtx-vector-builder.h.
12894 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
12895 directly on the tree encoding.
12896 (const_vector_from_tree): Likewise.
12897 * optabs.c: Include rtx-vector-builder.h.
12898 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
12899 sequence of "u" values.
12900 * vec-perm-indices.c: Include rtx-vector-builder.h.
12901 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
12902 directly on the vec_perm_indices encoding.
12903
12904 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12905
12906 * doc/rtl.texi (const_vector): Describe new encoding scheme.
12907 * Makefile.in (OBJS): Add rtx-vector-builder.o.
12908 * rtx-vector-builder.h: New file.
12909 * rtx-vector-builder.c: Likewise.
12910 * rtl.h (rtx_def::u2): Add a const_vector field.
12911 (CONST_VECTOR_NPATTERNS): New macro.
12912 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
12913 (CONST_VECTOR_DUPLICATE_P): Likewise.
12914 (CONST_VECTOR_STEPPED_P): Likewise.
12915 (CONST_VECTOR_ENCODED_ELT): Likewise.
12916 (const_vec_duplicate_p): Check for a duplicated vector encoding.
12917 (unwrap_const_vec_duplicate): Likewise.
12918 (const_vec_series_p): Check for a non-duplicated vector encoding.
12919 Say that the function only returns true for integer vectors.
12920 * emit-rtl.c: Include rtx-vector-builder.h.
12921 (gen_const_vec_duplicate_1): Delete.
12922 (gen_const_vector): Call gen_const_vec_duplicate instead of
12923 gen_const_vec_duplicate_1.
12924 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
12925 (gen_const_vec_duplicate): Use rtx_vector_builder.
12926 (gen_const_vec_series): Likewise.
12927 (gen_rtx_CONST_VECTOR): Likewise.
12928 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
12929 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12930 Build a new vector rather than modifying a CONST_VECTOR in-place.
12931 (handle_special_swappables): Update call accordingly.
12932 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
12933 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12934 Build a new vector rather than modifying a CONST_VECTOR in-place.
12935 (handle_special_swappables): Update call accordingly.
12936
12937 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12938
12939 * simplify-rtx.c (simplify_const_binary_operation): Use
12940 CONST_VECTOR_ELT instead of XVECEXP.
12941
12942 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12943
12944 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
12945 the selector elements to be different from the data elements
12946 if the selector is a VECTOR_CST.
12947 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
12948 ssizetype for the selector.
12949
12950 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12951
12952 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
12953 before testing each element individually.
12954 * tree-vect-generic.c (lower_vec_perm): Likewise.
12955
12956 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12957
12958 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
12959 * selftest-run-tests.c (selftest::run_tests): Call it.
12960 * vector-builder.h (vector_builder::operator ==): New function.
12961 (vector_builder::operator !=): Likewise.
12962 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
12963 (vec_perm_indices::all_from_input_p): New function.
12964 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12965 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
12966 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
12967 instead of reading the VECTOR_CST directly. Detect whether both
12968 vector inputs are the same before constructing the vec_perm_indices,
12969 and update the number of inputs argument accordingly. Use the
12970 utility functions added above. Only construct sel2 if we need to.
12971
12972 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12973
12974 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
12975 the broadcast of the low byte.
12976 (expand_mult_highpart): Use an explicit encoding for the permutes.
12977 * optabs-query.c (can_mult_highpart_p): Likewise.
12978 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
12979 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12980 (vectorizable_bswap): Likewise.
12981 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
12982 explicit encoding for the power-of-2 permutes.
12983 (vect_permute_store_chain): Likewise.
12984 (vect_grouped_load_supported): Likewise.
12985 (vect_permute_load_chain): Likewise.
12986
12987 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12988
12989 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
12990 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
12991 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
12992 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12993 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
12994 (vect_gen_perm_mask_any): Likewise.
12995
12996 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12997
12998 * int-vector-builder.h: New file.
12999 * vec-perm-indices.h: Include int-vector-builder.h.
13000 (vec_perm_indices): Redefine as an int_vector_builder.
13001 (auto_vec_perm_indices): Delete.
13002 (vec_perm_builder): Redefine as a stand-alone class.
13003 (vec_perm_indices::vec_perm_indices): New function.
13004 (vec_perm_indices::clamp): Likewise.
13005 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
13006 (vec_perm_indices::new_vector): New function.
13007 (vec_perm_indices::new_expanded_vector): Update for new
13008 vec_perm_indices class.
13009 (vec_perm_indices::rotate_inputs): New function.
13010 (vec_perm_indices::all_in_range_p): Operate directly on the
13011 encoded form, without computing elided elements.
13012 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
13013 encoding. Update for new vec_perm_indices class.
13014 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
13015 the given vec_perm_builder.
13016 (expand_vec_perm_var): Update vec_perm_builder constructor.
13017 (expand_mult_highpart): Use vec_perm_builder instead of
13018 auto_vec_perm_indices.
13019 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
13020 vec_perm_indices instead of auto_vec_perm_indices. Use a single
13021 or double series encoding as appropriate.
13022 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
13023 vec_perm_indices instead of auto_vec_perm_indices.
13024 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13025 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13026 (vect_permute_store_chain): Likewise.
13027 (vect_grouped_load_supported): Likewise.
13028 (vect_permute_load_chain): Likewise.
13029 (vect_shift_permute_load_chain): Likewise.
13030 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13031 (vect_transform_slp_perm_load): Likewise.
13032 (vect_schedule_slp_instance): Likewise.
13033 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13034 (vectorizable_mask_load_store): Likewise.
13035 (vectorizable_bswap): Likewise.
13036 (vectorizable_store): Likewise.
13037 (vectorizable_load): Likewise.
13038 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
13039 vec_perm_indices instead of auto_vec_perm_indices. Use
13040 tree_to_vec_perm_builder to read the vector from a tree.
13041 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
13042 vec_perm_builder instead of a vec_perm_indices.
13043 (have_whole_vector_shift): Use vec_perm_builder and
13044 vec_perm_indices instead of auto_vec_perm_indices. Leave the
13045 truncation to calc_vec_perm_mask_for_shift.
13046 (vect_create_epilog_for_reduction): Likewise.
13047 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
13048 from auto_vec_perm_indices to vec_perm_indices.
13049 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13050 instead of changing individual elements.
13051 (aarch64_vectorize_vec_perm_const): Use new_vector to install
13052 the vector in d.perm.
13053 * config/arm/arm.c (expand_vec_perm_d::perm): Change
13054 from auto_vec_perm_indices to vec_perm_indices.
13055 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13056 instead of changing individual elements.
13057 (arm_vectorize_vec_perm_const): Use new_vector to install
13058 the vector in d.perm.
13059 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
13060 Update vec_perm_builder constructor.
13061 (rs6000_expand_interleave): Likewise.
13062 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
13063 (rs6000_expand_interleave): Likewise.
13064
13065 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13066
13067 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
13068 to qimode could truncate the indices.
13069 * optabs.c (expand_vec_perm_var): Likewise.
13070
13071 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13072
13073 * Makefile.in (OBJS): Add vec-perm-indices.o.
13074 * vec-perm-indices.h: New file.
13075 * vec-perm-indices.c: Likewise.
13076 * target.h (vec_perm_indices): Replace with a forward class
13077 declaration.
13078 (auto_vec_perm_indices): Move to vec-perm-indices.h.
13079 * optabs.h: Include vec-perm-indices.h.
13080 (expand_vec_perm): Delete.
13081 (selector_fits_mode_p, expand_vec_perm_var): Declare.
13082 (expand_vec_perm_const): Declare.
13083 * target.def (vec_perm_const_ok): Replace with...
13084 (vec_perm_const): ...this new hook.
13085 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
13086 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
13087 * doc/tm.texi: Regenerate.
13088 * optabs.def (vec_perm_const): Delete.
13089 * doc/md.texi (vec_perm_const): Likewise.
13090 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
13091 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
13092 expand_vec_perm for constant permutation vectors. Assert that
13093 the mode of variable permutation vectors is the integer equivalent
13094 of the mode that is being permuted.
13095 * optabs-query.h (selector_fits_mode_p): Declare.
13096 * optabs-query.c: Include vec-perm-indices.h.
13097 (selector_fits_mode_p): New function.
13098 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
13099 is defined, instead of checking whether the vec_perm_const_optab
13100 exists. Use targetm.vectorize.vec_perm_const instead of
13101 targetm.vectorize.vec_perm_const_ok. Check whether the indices
13102 fit in the vector mode before using a variable permute.
13103 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
13104 vec_perm_indices instead of an rtx.
13105 (expand_vec_perm): Replace with...
13106 (expand_vec_perm_const): ...this new function. Take the selector
13107 as a vec_perm_indices rather than an rtx. Also take the mode of
13108 the selector. Update call to shift_amt_for_vec_perm_mask.
13109 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
13110 Use vec_perm_indices::new_expanded_vector to expand the original
13111 selector into bytes. Check whether the indices fit in the vector
13112 mode before using a variable permute.
13113 (expand_vec_perm_var): Make global.
13114 (expand_mult_highpart): Use expand_vec_perm_const.
13115 * fold-const.c: Includes vec-perm-indices.h.
13116 * tree-ssa-forwprop.c: Likewise.
13117 * tree-vect-data-refs.c: Likewise.
13118 * tree-vect-generic.c: Likewise.
13119 * tree-vect-loop.c: Likewise.
13120 * tree-vect-slp.c: Likewise.
13121 * tree-vect-stmts.c: Likewise.
13122 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
13123 Delete.
13124 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
13125 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
13126 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
13127 (aarch64_vectorize_vec_perm_const): ...this new function.
13128 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13129 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13130 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
13131 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
13132 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13133 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13134 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
13135 into...
13136 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
13137 check for NEON modes.
13138 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
13139 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
13140 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
13141 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
13142 into...
13143 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
13144 the old VEC_PERM_CONST conditions.
13145 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
13146 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
13147 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
13148 (ia64_vectorize_vec_perm_const_ok): Merge into...
13149 (ia64_vectorize_vec_perm_const): ...this new function.
13150 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
13151 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
13152 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
13153 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
13154 * config/mips/mips.c (mips_expand_vec_perm_const)
13155 (mips_vectorize_vec_perm_const_ok): Merge into...
13156 (mips_vectorize_vec_perm_const): ...this new function.
13157 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
13158 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
13159 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
13160 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
13161 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
13162 (rs6000_expand_vec_perm_const): Delete.
13163 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
13164 Delete.
13165 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13166 (altivec_expand_vec_perm_const_le): Take each operand individually.
13167 Operate on constant selectors rather than rtxes.
13168 (altivec_expand_vec_perm_const): Likewise. Update call to
13169 altivec_expand_vec_perm_const_le.
13170 (rs6000_expand_vec_perm_const): Delete.
13171 (rs6000_vectorize_vec_perm_const_ok): Delete.
13172 (rs6000_vectorize_vec_perm_const): New function.
13173 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13174 an element count and rtx array.
13175 (rs6000_expand_extract_even): Update call accordingly.
13176 (rs6000_expand_interleave): Likewise.
13177 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
13178 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
13179 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
13180 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
13181 (rs6000_expand_vec_perm_const): Delete.
13182 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13183 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13184 (altivec_expand_vec_perm_const_le): Take each operand individually.
13185 Operate on constant selectors rather than rtxes.
13186 (altivec_expand_vec_perm_const): Likewise. Update call to
13187 altivec_expand_vec_perm_const_le.
13188 (rs6000_expand_vec_perm_const): Delete.
13189 (rs6000_vectorize_vec_perm_const_ok): Delete.
13190 (rs6000_vectorize_vec_perm_const): New function. Remove stray
13191 reference to the SPE evmerge intructions.
13192 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13193 an element count and rtx array.
13194 (rs6000_expand_extract_even): Update call accordingly.
13195 (rs6000_expand_interleave): Likewise.
13196 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
13197 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
13198 new function.
13199 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13200
13201 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13202
13203 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
13204 vector mode and that that mode matches the mode of the data
13205 being permuted.
13206 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
13207 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
13208 directly using expand_vec_perm_1 when forcing selectors into
13209 registers.
13210 (expand_vec_perm_var): New function, split out from expand_vec_perm.
13211
13212 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13213
13214 * optabs-query.h (can_vec_perm_p): Delete.
13215 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
13216 * optabs-query.c (can_vec_perm_p): Split into...
13217 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
13218 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
13219 particular selector is valid.
13220 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13221 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13222 (vect_grouped_load_supported): Likewise.
13223 (vect_shift_permute_load_chain): Likewise.
13224 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13225 (vect_transform_slp_perm_load): Likewise.
13226 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13227 (vectorizable_bswap): Likewise.
13228 (vect_gen_perm_mask_checked): Likewise.
13229 * fold-const.c (fold_ternary_loc): Likewise. Don't take
13230 implementations of variable permutation vectors into account
13231 when deciding which selector to use.
13232 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
13233 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
13234 with a false third argument.
13235 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
13236 to test whether the constant selector is valid and can_vec_perm_var_p
13237 to test whether a variable selector is valid.
13238
13239 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13240
13241 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
13242 * optabs-query.c (can_vec_perm_p): Likewise.
13243 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
13244 instead of vec_perm_indices.
13245 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
13246 (vect_gen_perm_mask_checked): Likewise,
13247 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
13248 (vect_gen_perm_mask_checked): Likewise,
13249
13250 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13251
13252 * optabs-query.h (qimode_for_vec_perm): Declare.
13253 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
13254 (qimode_for_vec_perm): ...this new function.
13255 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
13256
13257 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13258
13259 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
13260 does not have a conditional at the top.
13261
13262 2018-01-02 Richard Biener <rguenther@suse.de>
13263
13264 * ipa-inline.c (big_speedup_p): Fix expression.
13265
13266 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13267
13268 PR target/81616
13269 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
13270 for generic 4->6.
13271
13272 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13273
13274 PR target/81616
13275 Generic tuning.
13276 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
13277 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
13278 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
13279 cond_taken_branch_cost 3->4.
13280
13281 2018-01-01 Jakub Jelinek <jakub@redhat.com>
13282
13283 PR tree-optimization/83581
13284 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
13285 TODO_cleanup_cfg if any changes have been made.
13286
13287 PR middle-end/83608
13288 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
13289 convert_modes if target mode has the right side, but different mode
13290 class.
13291
13292 PR middle-end/83609
13293 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
13294 last argument when extracting from CONCAT. If either from_real or
13295 from_imag is NULL, use expansion through memory. If result is not
13296 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
13297 the parts directly to inner mode, if even that fails, use expansion
13298 through memory.
13299
13300 PR middle-end/83623
13301 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
13302 check for bswap in mode rather than HImode and use that in expand_unop
13303 too.
13304 \f
13305 Copyright (C) 2018 Free Software Foundation, Inc.
13306
13307 Copying and distribution of this file, with or without modification,
13308 are permitted in any medium without royalty provided the copyright
13309 notice and this notice are preserved.